- cleanup
[oweals/gnunet.git] / configure.ac
index c1d463a26304bffe5fb903e1827288ee97ae82d6..3ab772d6a845efbe40b12483790e37c9d52f8184 100644 (file)
 #
 AC_PREREQ(2.61)
 # Checks for programs.
-AC_INIT([gnunet], [0.9.3],[bug-gnunet@gnu.org])
+AC_INIT([gnunet], [0.9.4],[bug-gnunet@gnu.org])
 
 AC_CANONICAL_TARGET
 AC_CANONICAL_HOST
 AC_CANONICAL_SYSTEM
 
-AM_INIT_AUTOMAKE([gnunet], [0.9.3])
+AM_INIT_AUTOMAKE([gnunet], [0.9.4])
 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
 AC_CONFIG_HEADERS([gnunet_config.h])
 AH_TOP([#define _GNU_SOURCE  1])
@@ -370,6 +370,32 @@ then
 else
        AM_CONDITIONAL(HAVE_LIBCURL, false)
 fi
+
+
+# libidn
+AC_MSG_CHECKING([if Libidn can be used])
+AC_ARG_WITH(libidn, AC_HELP_STRING([--with-libidn=[DIR]],
+                                    [Support IDN (needs GNU Libidn)]),
+libidn=$withval, libidn=yes)
+if test "$libidn" != "no"; then
+  if test "$libidn" != "yes"; then
+     LDFLAGS="${LDFLAGS} -L$libidn/lib"
+     CPPFLAGS="${CPPFLAGS} -I$libidn/include"
+  fi
+  AC_CHECK_HEADER(idna.h,
+  AC_CHECK_LIB(idn, stringprep_check_version,
+    [libidn=yes LIBS="${LIBS} -lidn"], libidn=no),
+     libidn=no)
+fi
+if test "$libidn" != "no" ; then
+  AC_DEFINE(LIBIDN, 1, [Define to 1 if you want IDN support.])
+  else
+  AC_MSG_FAILURE([Libidn not found])
+fi
+AC_MSG_RESULT($libidn)
+
+
+
 # restore LIBS
 LIBS=$SAVE_LIBS
 
@@ -572,10 +598,17 @@ AC_ARG_WITH(mysql,
    fi
   ],
   [AC_MSG_RESULT([--with-mysql not specified])
-   LDFLAGS="-L/usr/lib/mysql $LDFLAGS $ZLIBS"
+   if test -d "/usr/lib64/mysql"; then
+    MYSQL_LIBDIR="/usr/lib64/mysql"
+   elif test -d "/usr/lib/mysql"; then
+    MYSQL_LIBDIR="/usr/lib/mysql"
+   else
+    MYSQL_LIBDIR="/usr/lib"
+   fi
+   LDFLAGS="-L$MYSQL_LIBDIR $LDFLAGS $ZLIBS"
    AC_CHECK_LIB(mysqlclient, mysql_init,
     [AC_CHECK_HEADERS(mysql/mysql.h,
-      MYSQL_LDFLAGS="-L/usr/lib/mysql"
+      MYSQL_LDFLAGS="-L$MYSQL_LIBDIR"
       mysql=true
 
      , [], [$CYGWIN_MYSQL_MAGIC])])
@@ -812,6 +845,42 @@ AC_ARG_WITH(sudo,
 AC_SUBST(SUDO_BINARY)
 AM_CONDITIONAL([HAVE_SUDO], [test "x$SUDO_BINARY" != "x" -o -w /])
 
+
+# test for nssdir
+AC_MSG_CHECKING(with nssdir)
+AC_ARG_WITH(nssdir,
+  [  --with-nssdir=PATH       where to install NSS plugins],
+  [AC_MSG_RESULT("$with_nssdir")
+   case $with_nssdir in
+   no)
+     NSS_DIR=
+     install_nss=0
+     ;;
+   yes)
+     NSS_DIR="/lib"
+     install_nss=1
+     ;;
+   *)
+     NSS_DIR=$with_nssdir
+     install_nss=1
+    ;;
+   esac
+  ],
+  [
+   if test "x$SUDO_BINARY" != "x" -o -w /
+   then
+     NSS_DIR="/lib"
+     install_nss=1
+     AC_MSG_RESULT([yes, to /lib])
+   else
+     NSS_DIR=
+     install_nss=0
+     AC_MSG_RESULT([no])
+   fi
+  ])
+AC_SUBST(NSS_DIR)
+AM_CONDITIONAL([INSTALL_NSS], [test "x$install_nss" != "x0"])
+
 # test for gnunetdns group name
 GNUNETDNS_GROUP=gnunetdns
 AC_MSG_CHECKING(for gnunetdns group name)
@@ -937,6 +1006,15 @@ AC_ARG_ENABLE([experimental],
 AC_MSG_RESULT($enable_experimental)
 AM_CONDITIONAL([HAVE_EXPERIMENTAL], [test "x$enable_experimental" = "xyes"])
 
+# should memory statistics be kept (very expensive CPU-wise!)
+AC_MSG_CHECKING(whether to create expensive statistics on memory use)
+AC_ARG_ENABLE([heapstats],
+   [AS_HELP_STRING([--enable-heapstats], [enable expensive heap statistics])],
+   [enable_heapstats=1],
+   [enable_heapstats=0])
+AC_MSG_RESULT($enable_heapstats)
+AC_DEFINE_UNQUOTED([ENABLE_HEAP_STATISTICS],$enable_heapstats,[enable expensive heap statistics])
+
 # should code be enabled that works around missing OS functionality on Windows?
 # used for test cases
 if test $build_target = "mingw"
@@ -1071,6 +1149,7 @@ src/arm/Makefile
 src/arm/arm.conf
 src/ats/Makefile
 src/ats/ats.conf
+src/ats-tool/Makefile
 src/block/Makefile
 src/chat/Makefile
 src/chat/chat.conf
@@ -1130,25 +1209,37 @@ src/vpn/Makefile
 src/vpn/vpn.conf
 src/integration-tests/Makefile
 pkgconfig/Makefile
+pkgconfig/gnunetats.pc
 pkgconfig/gnunetarm.pc
 pkgconfig/gnunetblock.pc
 pkgconfig/gnunetcore.pc
 pkgconfig/gnunetdatacache.pc
 pkgconfig/gnunetdatastore.pc
 pkgconfig/gnunetdht.pc
-pkgconfig/gnunetdhtlog.pc
+pkgconfig/gnunetdns.pc
+pkgconfig/gnunetdnsparser.pc
 pkgconfig/gnunetdv.pc
 pkgconfig/gnunetfragmentation.pc
 pkgconfig/gnunetfs.pc
+pkgconfig/gnunetgns.pc
 pkgconfig/gnunethello.pc
+pkgconfig/gnunetlockmanager.pc
+pkgconfig/gnunetmesh.pc
+pkgconfig/gnunetmysql.pc
+pkgconfig/gnunetnamestore.pc
 pkgconfig/gnunetnat.pc
 pkgconfig/gnunetnse.pc
 pkgconfig/gnunetpeerinfo.pc
+pkgconfig/gnunetpostgres.pc
 pkgconfig/gnunetregex.pc
 pkgconfig/gnunetstatistics.pc
+pkgconfig/gnunetstream.pc
+pkgconfig/gnunettestbed.pc
 pkgconfig/gnunettesting.pc
 pkgconfig/gnunettransport.pc
+pkgconfig/gnunettun.pc
 pkgconfig/gnunetutil.pc
+pkgconfig/gnunetvpn.pc
 ])
 AC_OUTPUT