4 AM_INIT_AUTOMAKE(abook, 0.4.14)
5 AM_CONFIG_HEADER(config.h)
19 if test "x$U" != "x"; then
20 AC_MSG_ERROR(Compiler not ANSI compliant)
25 AC_CHECK_HEADERS(unistd.h locale.h termios.h linux/termios.h sys/ioctl.h)
26 AC_CHECK_HEADER(stdarg.h,AC_DEFINE(HAVE_STDARG_H),AC_MSG_ERROR([*** stdarg.h is missing on your system ***]))
27 AC_CHECK_FUNCS(setlocale)
29 dnl -------------------
30 dnl (n)curses detection
31 dnl -------------------
34 AC_ARG_WITH(curses, [ --with-curses=DIR Where ncurses is installed ],
35 [if test $withval != yes; then
36 abook_cv_curses=$withval
38 if test x$abook_cv_curses != x/usr; then
39 LDFLAGS="-L${abook_cv_curses}/lib $LDFLAGS"
40 CPPFLAGS="$CPPFLAGS -I${abook_cv_curses}/include"
43 AC_CHECK_LIB(ncurses, initscr,
44 [LIBS="$LIBS -lncurses"
45 if test x$abook_cv_curses = x/usr -a -d /usr/include/ncurses; then
46 CPPFLAGS="$CPPFLAGS -I/usr/include/ncurses"
48 AC_CHECK_HEADERS(ncurses.h)],
51 dnl --------------------------
52 dnl end of (n)curses detection
53 dnl --------------------------
55 AC_CHECK_FUNCS(resizeterm)
57 AC_CHECK_FUNC(snprintf, [AC_DEFINE(HAVE_SNPRINTF)],)
58 AC_CHECK_FUNC(vsnprintf, [AC_DEFINE(HAVE_VSNPRINTF)],)
60 AC_ARG_ENABLE(debug, [ --enable-debug Enable debugging support ], [case "${enableval}" in
63 *) AC_MSG_ERROR(bad value ${enableval} for --enable-debug) ;;
66 if test x$debug = xtrue; then
67 CPPFLAGS="-DDEBUG $CPPFLAGS"
71 if test x$GCC = xyes; then
72 CFLAGS="-Wall $CFLAGS"
75 AC_OUTPUT(Makefile abook.list)