]> git.deb.at Git - pkg/abook.git/blob - configure.in
Version number change
[pkg/abook.git] / configure.in
1 dnl abook configure.in
2
3 AC_INIT(abook.c)
4 AM_INIT_AUTOMAKE(abook, 0.4.13-cvs)
5 AM_CONFIG_HEADER(config.h)
6
7 AC_CANONICAL_HOST
8
9 AC_PROG_CC
10 AC_ISC_POSIX
11 AM_C_PROTOTYPES
12 if test "x$U" != "x"; then
13         AC_MSG_ERROR(Compiler not ANSI compliant)
14 fi
15 AC_C_INLINE
16 AC_PROG_INSTALL
17 AC_HEADER_STDC
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)
21
22 dnl -------------------
23 dnl (n)curses detection
24 dnl -------------------
25
26 abook_cv_curses=/usr
27 AC_ARG_WITH(curses, [  --with-curses=DIR          Where ncurses is installed ],
28         [if test $withval != yes; then
29                 abook_cv_curses=$withval
30         fi
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"
34         fi])
35
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"
40         fi
41         AC_CHECK_HEADERS(ncurses.h)],
42         [CF_CURSES_LIBS])
43
44 dnl --------------------------
45 dnl end of (n)curses detection
46 dnl --------------------------
47
48 AC_CHECK_FUNCS(resizeterm)
49
50 AC_CHECK_FUNC(snprintf, [AC_DEFINE(HAVE_SNPRINTF)],)
51 AC_CHECK_FUNC(vsnprintf, [AC_DEFINE(HAVE_VSNPRINTF)],)
52
53 AC_ARG_ENABLE(debug, [  --enable-debug    Enable debugging support ], [case "${enableval}" in
54         yes) debug=true ;;
55         no) debug=false ;;
56         *) AC_MSG_ERROR(bad value ${enableval} for --enable-debug) ;;
57         esac], [debug=false])
58
59 if test x$debug = xtrue; then
60         CPPFLAGS="-DDEBUG $CPPFLAGS"
61         CFLAGS="-g $CFLAGS"
62 fi
63
64 if test x$GCC = xyes; then
65         CFLAGS="-Wall $CFLAGS"
66 fi
67
68 AC_OUTPUT(Makefile)
69