4 AM_INIT_AUTOMAKE(abook, 0.4.13-cvs)
5 AM_CONFIG_HEADER(config.h)
12 if test "x$U" != "x"; then
13 AC_MSG_ERROR(Compiler not ANSI compliant)
18 AC_CHECK_HEADERS(unistd.h locale.h termios.h linux/termios.h sys/ioctl.h)
19 AC_CHECK_HEADER(stdarg.h,AC_DEFINE(HAVE_STDARG_H),AC_MSG_ERROR([*** stdarg.h is missing on your system ***]))
20 AC_CHECK_FUNCS(setlocale)
22 dnl -------------------
23 dnl (n)curses detection
24 dnl -------------------
27 AC_ARG_WITH(curses, [ --with-curses=DIR Where ncurses is installed ],
28 [if test $withval != yes; then
29 abook_cv_curses=$withval
31 if test x$abook_cv_curses != x/usr; then
32 LDFLAGS="-L${abook_cv_curses}/lib $LDFLAGS"
33 CPPFLAGS="$CPPFLAGS -I${abook_cv_curses}/include"
36 AC_CHECK_LIB(ncurses, initscr,
37 [LIBS="$LIBS -lncurses"
38 if test x$abook_cv_curses = x/usr -a -d /usr/include/ncurses; then
39 CPPFLAGS="$CPPFLAGS -I/usr/include/ncurses"
41 AC_CHECK_HEADERS(ncurses.h)],
44 dnl --------------------------
45 dnl end of (n)curses detection
46 dnl --------------------------
48 AC_CHECK_FUNCS(resizeterm)
50 AC_CHECK_FUNC(snprintf, [AC_DEFINE(HAVE_SNPRINTF)],)
51 AC_CHECK_FUNC(vsnprintf, [AC_DEFINE(HAVE_VSNPRINTF)],)
53 AC_ARG_ENABLE(debug, [ --enable-debug Enable debugging support ], [case "${enableval}" in
56 *) AC_MSG_ERROR(bad value ${enableval} for --enable-debug) ;;
59 if test x$debug = xtrue; then
60 CPPFLAGS="-DDEBUG $CPPFLAGS"
64 AC_ARG_ENABLE(nonascii, [ --disable-nonascii Disable usage of non-ascii characters ], [case "${enableval}" in
67 *) AC_MSG_ERROR(bad value ${enableval} for --disable-nonascii) ;;
68 esac], [nonascii=true])
70 if test x$nonascii = xfalse; then
71 AC_DEFINE(USE_ASCII_ONLY)
74 if test x$GCC = xyes; then
75 CFLAGS="-Wall $CFLAGS"