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.
57 lines
1.3 KiB
57 lines
1.3 KiB
AC_INIT(src/isync.h) |
|
AM_CONFIG_HEADER(config.h) |
|
AM_INIT_AUTOMAKE(isync, 0.9.2) |
|
|
|
AM_PROG_CC_STDC |
|
if test "$GCC" = yes; then |
|
CFLAGS="$CFLAGS -pipe -W -Wall -Wshadow -Wmissing-prototypes" |
|
fi |
|
|
|
AC_CHECK_FUNCS(getopt_long) |
|
|
|
AC_CHECK_LIB(socket, socket) |
|
AC_CHECK_LIB(nsl, inet_ntoa) |
|
|
|
ssl=false |
|
AC_ARG_WITH(ssl, |
|
[ --with-ssl=DIR yes/no/OpenSSL installation root [detect]], |
|
[ob_cv_with_ssl=$withval]) |
|
if test "x$ob_cv_with_ssl" != xno; then |
|
if test -d "$ob_cv_with_ssl/lib"; then |
|
CPFLAGS="$CPPFLAGS -I$ob_cv_with_ssl/include" |
|
LDFLAGS="$LDFLAGS -L$ob_cv_with_ssl/lib" |
|
fi |
|
AC_CHECK_LIB(crypto, ERR_error_string, [cryptolib=" -lcrypto"]) |
|
AC_CHECK_LIB(ssl, SSL_library_init, [ |
|
LIBS="-lssl$cryptolib $LIBS" |
|
AC_DEFINE(HAVE_LIBSSL, 1, [Define if you want SSL support]) |
|
ssl=true |
|
],[ |
|
if test -n "$ob_cv_with_ssl"; then |
|
AC_MSG_ERROR([can't find OpenSSL]) |
|
fi |
|
]) |
|
fi |
|
|
|
AC_CACHE_CHECK(for db_create in -ldb, ac_cv_db_db_create, |
|
[ac_cv_db_dbcreate=no |
|
AC_TRY_LINK([#include <db.h>], |
|
[db_create();],[ac_cv_db_db_create=yes])]) |
|
if test $ac_cv_db_db_create=yes; then |
|
LIBS="$LIBS -ldb" |
|
else |
|
AC_MSG_ERROR([Berkley DB not found. |
|
You must install libdb including the respective development files/headers.]) |
|
fi |
|
|
|
AC_OUTPUT(Makefile src/Makefile isync.spec) |
|
|
|
if $ssl; then |
|
AC_MSG_RESULT([ |
|
Using SSL |
|
]) |
|
else |
|
AC_MSG_RESULT([ |
|
Not using SSL |
|
]) |
|
fi
|
|
|