fixing 1592
[oweals/gnunet.git] / configure.ac
index f484f92953b4fdfdd75c4426605dbb5396452efd..ba9261aa7bb1132c3aa99f95785efe05bb2417d8 100644 (file)
@@ -21,8 +21,8 @@
 #
 #
 AC_PREREQ(2.61)
-AC_INIT([gnunet], [0.9.0pre0],[bug-gnunet@gnu.org])
-AM_INIT_AUTOMAKE([gnunet], [0.9.0pre0])
+AC_INIT([gnunet], [0.9.0pre1],[bug-gnunet@gnu.org])
+AM_INIT_AUTOMAKE([gnunet], [0.9.0pre1])
 AC_CONFIG_HEADERS([gnunet_config.h])
 
 AH_TOP([#define _GNU_SOURCE  1])
@@ -189,7 +189,7 @@ fi
 
 
 # libcurl
-LIBCURL_CHECK_CONFIG(,7.15.4,,AC_MSG_ERROR([GNUnet requires libcurl >= 7.15.4]))
+LIBCURL_CHECK_CONFIG(,7.18.0,,AC_MSG_ERROR([GNUnet requires libcurl >= 7.18.0]))
 # restore LIBS
 LIBS=$SAVE_LIBS
 
@@ -244,7 +244,7 @@ AC_HEADER_STDC
 AC_CHECK_HEADERS([fcntl.h math.h errno.h ctype.h limits.h stdio.h stdlib.h string.h unistd.h stdarg.h signal.h locale.h sys/stat.h sys/types.h],,AC_MSG_ERROR([Compiling GNUnet requires standard UNIX headers files]))
 
 # Checks for headers that are only required on some systems or opional (and where we do NOT abort if they are not there)
-AC_CHECK_HEADERS([langinfo.h sys/param.h sys/mount.h sys/statvfs.h sys/select.h sockLib.h sys/mman.h sys/msg.h sys/vfs.h arpa/inet.h fcntl.h libintl.h netdb.h netinet/in.h sys/ioctl.h sys/socket.h sys/time.h unistd.h kstat.h sys/sysinfo.h kvm.h sys/file.h sys/resource.h ifaddrs.h mach/mach.h stddef.h sys/timeb.h terminos.h argz.h])
+AC_CHECK_HEADERS([langinfo.h sys/param.h sys/mount.h sys/statvfs.h sys/select.h sockLib.h sys/mman.h sys/msg.h sys/vfs.h arpa/inet.h fcntl.h libintl.h netdb.h netinet/in.h netinet/in_sysm.h sys/ioctl.h sys/socket.h sys/time.h unistd.h kstat.h sys/sysinfo.h kvm.h sys/file.h sys/resource.h ifaddrs.h mach/mach.h stddef.h sys/timeb.h terminos.h argz.h])
 
 # test for libgmp
 gmp=0
@@ -346,6 +346,38 @@ AM_CONDITIONAL(HAVE_POSTGRES, test x$postgres = xtrue)
 AC_SUBST(POSTGRES_CPPFLAGS)
 AC_SUBST(POSTGRES_LDFLAGS)
 
+# test for pcap
+pcap=false
+AC_MSG_CHECKING(for libpcap)
+AC_ARG_WITH(pcap,
+  [  --with-pcap=PFX       base of pcap installation],
+  [AC_MSG_RESULT("$with_pcap")
+   case $with_pcap in
+   no)
+     ;;
+   yes)
+    AC_CHECK_HEADERS(pcap.h,
+     pcap=true)
+     ;;
+   *)
+    LDFLAGS="-L$with_pcap/lib $LDFLAGS"
+    CPPFLAGS="-I$with_pcap/include $CPPFLAGS"
+    AC_CHECK_HEADERS(pcap.h,
+     EXT_LIB_PATH="-L$with_pcap/lib $EXT_LIB_PATH"
+     PCAP_LDFLAGS="-L$with_pcap/lib"
+     PCAP_CPPFLAGS="-I$with_pcap/include"
+     pcap=true)
+    LDFLAGS=$SAVE_LDFLAGS
+    CPPFLAGS=$SAVE_CPPFLAGS
+    ;;
+   esac
+  ],
+  [AC_MSG_RESULT([--with-pcap not specified])
+    AC_CHECK_HEADERS(pcap.h, pcap=true)])
+AM_CONDITIONAL(HAVE_PCAP, test x$pcap = xtrue)
+AC_SUBST(PCAP_CPPFLAGS)
+AC_SUBST(PCAP_LDFLAGS)
+
 
 # test for libz (maybe required for linking mysql)
 zlib=1
@@ -478,6 +510,44 @@ AC_ARG_WITH(microhttpd,
        [#include "src/include/platform.h"])])
 AM_CONDITIONAL(HAVE_MHD, test x$lmhd = x1)
 AC_DEFINE_UNQUOTED([HAVE_MHD], $lmhd, [We have libmicrohttpd])
+
+
+# openssl
+openssl=0
+AC_MSG_CHECKING([for openssl])
+AC_ARG_WITH(openssl,
+   [  --with-openssl=PFX   base of openssl installation],
+   [AC_MSG_RESULT([$with_openssl])
+    case $with_openssl in
+      no)
+        ;;
+      yes)
+        AC_CHECK_HEADERS([openssl/ssl.h],
+            AC_CHECK_LIB([ssl], [SSL_new],
+            openssl=1))
+        ;;
+      *)
+        LDFLAGS="-L$with_openssl/lib $LDFLAGS"
+        CPPFLAGS="-I$with_openssl/include $CPPFLAGS"
+        AC_CHECK_HEADERS([openssl/ssl.h],
+            AC_CHECK_LIB([ssl], [SSL_new],
+              EXT_LIB_PATH="-L$with_openssl/lib $EXT_LIB_PATH"
+              openssl=1))
+        ;;
+    esac
+   ],
+   [AC_MSG_RESULT([--with-openssl not specified])
+    AC_CHECK_HEADERS([openssl/ssl.h],
+        AC_CHECK_LIB([ssl], [SSL_new],
+          openssl=1))])
+AM_CONDITIONAL(HAVE_OPENSSL, test x$openssl = x1)
+AC_DEFINE_UNQUOTED([HAVE_OPENSSL], $openssl, [We have openssl])
+
+
+
+
+
+
 # restore LIBS
 LIBS=$SAVE_LIBS
 
@@ -636,6 +706,27 @@ AC_SUBST(DLLDIR)
 AC_SUBST(EXT_LIB_PATH)
 
 
+# should 'make check' run tests?
+AC_MSG_CHECKING(whether to disable running tests)
+AC_ARG_ENABLE(testruns,
+   [AS_HELP_STRING([--enable-test-suppression],
+               [disable running tests on make check])],
+   [disable_tests_run=$enableval],
+   [disable_tests_run="no"])
+AC_MSG_RESULT($disable_test_run)
+AM_CONDITIONAL([DISABLE_TEST_RUN], [test "x$disable_tests_run" = "xyes"])
+
+# should experimental code be compiled (code that may not yet compile)?
+disable_experimental=yes
+AC_MSG_CHECKING(whether to compile experimental code)
+AC_ARG_ENABLE(experimental,
+   [AS_HELP_STRING([--enable-experimental],
+               [enable compiling experimental code])],
+   [enable_experimental=$enableval],
+   [enable_experimental="no"])
+AC_MSG_RESULT($enable_experimental)
+AM_CONDITIONAL([HAVE_EXPERIMENTAL], [test "x$enable_experimental" = "xyes"])
+
 # gcov compilation
 use_gcov=no
 AC_ARG_ENABLE([coverage], AS_HELP_STRING([--enable-coverage],
@@ -662,6 +753,7 @@ src/hello/Makefile
 src/include/Makefile
 src/include/gnunet_directories.h
 src/hostlist/Makefile
+src/monkey/Makefile
 src/nat/Makefile
 src/nat/libnatpmp/Makefile
 src/nat/miniupnp/Makefile
@@ -673,6 +765,7 @@ src/testing/Makefile
 src/topology/Makefile
 src/transport/Makefile
 src/util/Makefile
+src/vpn/Makefile
 ])
 AC_OUTPUT
 
@@ -695,7 +788,22 @@ then
  AC_MSG_NOTICE([NOTICE: libmicrohttpd not found, http transport will not be installed.])
 fi
 
-AC_MSG_NOTICE([NOTICE: Database support is set to MySQL: $mysql, SQLite: $sqlite])
+if test "x$esmtp" != "x1"
+then
+ AC_MSG_NOTICE([NOTICE: libesmtp not found, monkey will not be installed.])
+fi
+
+if test "x$pcap" != "x1"
+then
+ AC_MSG_NOTICE([NOTICE: libpcap not found, WiFi support will not be installed.])
+fi
+
+if test "x$openssl" != "x1"
+then
+ AC_MSG_NOTICE([NOTICE: OpenSSL not found, monkey will not be installed.])
+fi
+
+AC_MSG_NOTICE([NOTICE: Database support is set to MySQL: $mysql, SQLite: $sqlite, Postgres: $postgres])
 
 if test "$enable_framework_build" = "yes"
 then