]> git.deb.at Git - pkg/abook.git/blob - contrib/epm/configure.in
Bump standards version to 3.9.6
[pkg/abook.git] / contrib / epm / configure.in
1 dnl abook configure.in
2
3 AC_INIT(abook.c)
4 AM_INIT_AUTOMAKE(abook, 0.4.14)
5 AM_CONFIG_HEADER(config.h)
6
7 AC_CANONICAL_HOST
8
9 MAJOR=0
10 MINOR=4
11 PATCHLEVEL=14
12 AC_SUBST(MAJOR)
13 AC_SUBST(MINOR)
14 AC_SUBST(PATCHLEVEL)
15
16 AC_PROG_CC
17 AC_ISC_POSIX
18 AM_C_PROTOTYPES
19 if test "x$U" != "x"; then
20         AC_MSG_ERROR(Compiler not ANSI compliant)
21 fi
22 AC_C_INLINE
23 AC_PROG_INSTALL
24 AC_HEADER_STDC
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)
28
29 dnl -------------------
30 dnl (n)curses detection
31 dnl -------------------
32
33 abook_cv_curses=/usr
34 AC_ARG_WITH(curses, [  --with-curses=DIR       Where ncurses is installed ],
35         [if test $withval != yes; then
36                 abook_cv_curses=$withval
37         fi
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"
41         fi])
42
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"
47         fi
48         AC_CHECK_HEADERS(ncurses.h)],
49         [CF_CURSES_LIBS])
50
51 dnl --------------------------
52 dnl end of (n)curses detection
53 dnl --------------------------
54
55 AC_CHECK_FUNCS(resizeterm)
56
57 AC_CHECK_FUNC(snprintf, [AC_DEFINE(HAVE_SNPRINTF)],)
58 AC_CHECK_FUNC(vsnprintf, [AC_DEFINE(HAVE_VSNPRINTF)],)
59
60 AC_ARG_ENABLE(debug, [  --enable-debug          Enable debugging support ], [case "${enableval}" in
61         yes) debug=true ;;
62         no) debug=false ;;
63         *) AC_MSG_ERROR(bad value ${enableval} for --enable-debug) ;;
64         esac], [debug=false])
65
66 if test x$debug = xtrue; then
67         CPPFLAGS="-DDEBUG $CPPFLAGS"
68         CFLAGS="-g $CFLAGS"
69 fi
70
71 if test x$GCC = xyes; then
72         CFLAGS="-Wall $CFLAGS"
73 fi
74
75 AC_OUTPUT(Makefile abook.list)
76