2000-12-20 21:41:21 +00:00
|
|
|
AC_INIT(isync.h)
|
2002-04-19 19:43:00 +00:00
|
|
|
AM_INIT_AUTOMAKE(isync,0.9)
|
2000-12-20 21:41:21 +00:00
|
|
|
AM_PROG_CC_STDC
|
2001-01-05 21:20:48 +00:00
|
|
|
AC_ARG_WITH(ssl-dir, [ --with-ssl-dir=DIR location where openssl is insalled],
|
|
|
|
[if test -d $withval/lib; then
|
|
|
|
LIBS="$LIBS -L$withval/lib"
|
|
|
|
CFLAGS="$CFLAGS -I$withval/include"
|
|
|
|
else
|
|
|
|
AC_MSG_ERROR(can't find OpenSSL in $withval)
|
|
|
|
fi])
|
2001-11-19 19:41:14 +00:00
|
|
|
AC_ARG_ENABLE(debug, [ --enable-debug enable memory debugging
|
|
|
|
code],
|
|
|
|
[AC_DEFINE(DEBUG),
|
|
|
|
DEBUGOBJ=debug.o],
|
|
|
|
[DEBUGOBJ=''])
|
|
|
|
AC_SUBST(DEBUGOBJ)
|
|
|
|
AC_CHECK_FUNCS(getopt_long)
|
2000-12-21 06:51:14 +00:00
|
|
|
AC_CHECK_LIB(socket,socket)
|
|
|
|
AC_CHECK_LIB(nsl,inet_ntoa)
|
2000-12-21 06:27:05 +00:00
|
|
|
AC_CHECK_LIB(crypto,ERR_error_string)
|
|
|
|
AC_CHECK_LIB(ssl,SSL_library_init)
|
2002-01-28 19:34:22 +00:00
|
|
|
|
|
|
|
AC_CACHE_CHECK(for dbm_open, ac_cv_dbmopen,
|
|
|
|
[ac_cv_dbmopen=no
|
|
|
|
AC_TRY_LINK([#include <ndbm.h>],
|
|
|
|
[dbm_open(0,0,0);],[ac_cv_dbmopen=yes])])
|
|
|
|
if test $ac_cv_dbmopen = no; then
|
|
|
|
AC_CACHE_CHECK([for dbm_open in -ldb], ac_cv_libdb,
|
|
|
|
[save_LIBS="$LIBS"
|
|
|
|
LIBS="$LIBS -ldb"
|
|
|
|
ac_cv_libdb=no
|
|
|
|
AC_TRY_LINK([#define DB_DBM_HSEARCH 1
|
|
|
|
#include <db.h>],
|
|
|
|
[dbm_open(0,0,0);],
|
|
|
|
[ac_cv_libdb=yes])
|
|
|
|
LIBS="$save_LIBS"])
|
|
|
|
|
|
|
|
if test $ac_cv_libdb = yes; then
|
|
|
|
LIBS="$LIBS -ldb"
|
2002-06-21 00:26:26 +00:00
|
|
|
AC_DEFINE(HAVE_LIBDB)
|
2002-01-28 19:34:22 +00:00
|
|
|
else
|
|
|
|
AC_MSG_ERROR([Could not find dbm_open(), you must install libdb])
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2001-10-31 19:50:01 +00:00
|
|
|
dnl test for gcc. use the prefix so we know that gcc-3.0 is also gcc
|
2001-11-14 17:40:10 +00:00
|
|
|
if test `echo $CC | sed 's/^gcc.*/gcc/'` = gcc; then
|
2001-10-31 19:50:01 +00:00
|
|
|
CFLAGS="$CFLAGS -pipe -W -Wall -Wshadow -Wmissing-prototypes"
|
|
|
|
fi
|
2002-01-16 21:51:06 +00:00
|
|
|
AC_OUTPUT(Makefile debian/Makefile)
|