]> git.deb.at Git - pkg/abook.git/blobdiff - configure.in
initial custom field support
[pkg/abook.git] / configure.in
index a03bbe75cbe11a250c41e4b89f8d4dabd357e003..c5284a635712e56a2e2434fbe02baf6c3c4277e1 100644 (file)
@@ -1,9 +1,14 @@
 dnl abook configure.in
 
 AC_INIT(abook.c)
-AM_INIT_AUTOMAKE(abook, 2002xxxx)
+AM_INIT_AUTOMAKE(abook, 0.5.2pre)
 AM_CONFIG_HEADER(config.h)
 
+AC_DEFINE(HAVE_SNPRINTF, 0, [Define if snprintf is available.])
+AC_DEFINE(HAVE_VSNPRINTF, 0, [Define if vsnprintf is available.])
+AC_DEFINE(HAVE_STDARG_H, 0, [Define if you have the <stdarg.h> header file.])
+AC_DEFINE(HAVE_NCURSES, 0, [Define if you have the <ncurses.h> header file.])
+
 AC_CANONICAL_HOST
 
 AC_PROG_CC
@@ -46,12 +51,30 @@ dnl --------------------------
 dnl end of (n)curses detection
 dnl --------------------------
 
+dnl ------------------
+dnl readline detection
+dnl ------------------
+
+abook_cv_readline=/usr
+AC_ARG_WITH(readline, [  --with-readline=DIR     Where readline is installed ],
+       [if test $withval != yes; then
+               abook_cv_readline=$withval
+       fi
+       if test x$abook_cv_readline != x/usr; then
+               LDFLAGS="-L${abook_cv_readline}/lib $LDFLAGS"
+               CPPFLAGS="$CPPFLAGS -I${abook_cv_readline}/include"
+       fi])
+
 AC_LIB_READLINE
 
 if test x$ac_cv_lib_readline = xno -o x$ac_cv_lib_readline_history = xno; then
        AC_MSG_ERROR([*** readline library not found or it doesn't support history ***])
 fi
 
+dnl -------------------------
+dnl end of readline detection
+dnl -------------------------
+
 AC_CHECK_FUNCS(resizeterm)
 
 AC_CHECK_FUNC(snprintf, [AC_DEFINE(HAVE_SNPRINTF)],)