mirror of https://git.code.sf.net/p/isync/isync
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
46 lines
1.2 KiB
46 lines
1.2 KiB
AC_INIT(src/isync.h) |
|
AM_INIT_AUTOMAKE(isync,0.9) |
|
|
|
AM_PROG_CC_STDC |
|
if test "$GCC" = yes; then |
|
CFLAGS="$CFLAGS -pipe -W -Wall -Wshadow -Wmissing-prototypes" |
|
fi |
|
|
|
AC_ARG_WITH(ssl-dir, [ --with-ssl-dir=DIR location where OpenSSL is installed], |
|
[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]) |
|
|
|
AC_CHECK_FUNCS(getopt_long) |
|
AC_CHECK_LIB(socket,socket) |
|
AC_CHECK_LIB(nsl,inet_ntoa) |
|
AC_CHECK_LIB(crypto,ERR_error_string) |
|
AC_CHECK_LIB(ssl,SSL_library_init) |
|
|
|
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" |
|
AC_DEFINE(HAVE_LIBDB) |
|
else |
|
AC_MSG_ERROR([Could not find dbm_open(), you must install libdb]) |
|
fi |
|
fi |
|
|
|
AC_OUTPUT(Makefile src/Makefile debian/Makefile isync.spec)
|
|
|