-some code cleanup
[oweals/gnunet.git] / configure.ac
index e596766eb194cf6f01dde545905a6036098000b4..d2a6939b33b34d4bf40eb6176d1db0fe76dc9c8e 100644 (file)
 #
 AC_PREREQ(2.61)
 # Checks for programs.
-AC_INIT([gnunet], [0.9.0pre4],[bug-gnunet@gnu.org])
+AC_INIT([gnunet], [0.9.1],[bug-gnunet@gnu.org])
 
 AC_CANONICAL_TARGET
 AC_CANONICAL_HOST
 AC_CANONICAL_SYSTEM
 
-AM_INIT_AUTOMAKE([gnunet], [0.9.0pre4])
+AM_INIT_AUTOMAKE([gnunet], [0.9.1])
 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
 AC_CONFIG_HEADERS([gnunet_config.h])
 AH_TOP([#define _GNU_SOURCE  1])
@@ -142,7 +142,7 @@ netbsd*)
      AC_DEFINE_UNQUOTED(_WIN32,1,[This is a Windows system])
      AC_CHECK_LIB(intl, gettext)
      LDFLAGS="$LDFLAGS -Wl,-no-undefined -Wl,--export-all-symbols"
-     LIBS="$LIBS -lws2_32 -lplibc -lgnurx"
+     LIBS="$LIBS -lws2_32 -lplibc -lgnurx -lole32"
      CFLAGS="-mms-bitfields $CFLAGS"
      CPPFLAGS="-D_WIN32_WINNT=0x0501 $CPPFLAGS"
      build_target="mingw"
@@ -201,6 +201,27 @@ then
   AC_MSG_ERROR([GNUnet needs libgcrypt])
 fi
 
+# Adam shostack suggests the following for Windows:
+# -D_FORTIFY_SOURCE=2 -fstack-protector-all
+AC_ARG_ENABLE(gcc-hardening,
+   AS_HELP_STRING(--enable-gcc-hardening, enable compiler security checks),
+[if test x$enableval = xyes; then
+    CFLAGS="$CFLAGS -D_FORTIFY_SOURCE=2 -fstack-protector-all"
+    CFLAGS="$CFLAGS -fwrapv -fPIE -Wstack-protector"
+    CFLAGS="$CFLAGS --param ssp-buffer-size=1"
+    LDFLAGS="$LDFLAGS -pie"
+fi])
+
+
+# Linker hardening options
+# Currently these options are ELF specific - you can't use this with MacOSX
+AC_ARG_ENABLE(linker-hardening,
+  AS_HELP_STRING(--enable-linker-hardening, enable linker security fixups),
+[if test x$enableval = xyes; then
+   LDFLAGS="$LDFLAGS -z relro -z now"
+fi])
+
+
 extra_logging=GNUNET_NO
 AC_ARG_ENABLE([logging],
    AS_HELP_STRING([--enable-logging@<:@=value@:>@],[Enable logging calls. Possible values: yes,no,verbose,veryverbose ('yes' is the default)]),
@@ -347,6 +368,18 @@ fi
 # restore LIBS
 LIBS=$SAVE_LIBS
 
+# test for libunistring
+gl_LIBUNISTRING
+if test $HAVE_LIBUNISTRING != yes; then
+ AC_MSG_ERROR([GNUnet requires libunistring])
+fi
+if test $gl_libunistring_hexversion -le 2305; then
+ AC_MSG_ERROR([GNUnet requires libunistring >= 0.9.1.1])
+fi
+# restore LIBS
+LIBS=$SAVE_LIBS
+
+
 
 # Checks for standard header files.
 AC_HEADER_DIRENT
@@ -562,7 +595,7 @@ AC_DEFINE_UNQUOTED([HAVE_MHD], $lmhd, [We have libmicrohttpd])
 LIBS=$SAVE_LIBS
 
 # check for python & pexpect (used for some testcases only)
-AM_PATH_PYTHON([2.5],, [:])
+AM_PATH_PYTHON([2.6],, [:])
 AM_CONDITIONAL([HAVE_PYTHON], [test "$PYTHON" != :])
 
 if test "$PYTHON" != :
@@ -613,7 +646,6 @@ AC_CHECK_MEMBER([struct sockaddr_in.sin_len],
 # Checks for library functions.
 AC_FUNC_CLOSEDIR_VOID
 AC_FUNC_FORK
-AC_FUNC_VFORK
 AC_PROG_GCC_TRADITIONAL
 AC_FUNC_MEMCMP
 AC_FUNC_SELECT_ARGTYPES
@@ -626,7 +658,7 @@ AC_FUNC_VPRINTF
 AC_HEADER_SYS_WAIT
 AC_TYPE_OFF_T
 AC_TYPE_UID_T
-AC_CHECK_FUNCS([floor gethostname memmove rmdir strncasecmp strrchr strtol atoll dup2 fdatasync ftruncate gettimeofday memset mkdir mkfifo select socket strcasecmp strchr strdup strerror strstr clock_gettime getrusage rand uname setlocale getcwd mktime gmtime_r gmtime strlcpy strlcat ftruncate stat64 sbrk mmap mremap setrlimit sysconf gethostbyaddr initgroups getifaddrs freeifaddrs getnameinfo getaddrinfo inet_ntoa localtime_r nl_langinfo putenv realpath strndup gethostbyname2 gethostbyname getpeerucred getpeereid])
+AC_CHECK_FUNCS([floor gethostname memmove rmdir strncasecmp strrchr strtol atoll dup2 fdatasync ftruncate gettimeofday memset mkdir mkfifo select socket strcasecmp strchr strdup strerror strstr clock_gettime getrusage rand uname setlocale getcwd mktime gmtime_r gmtime strlcpy strlcat ftruncate stat64 sbrk mmap mremap setrlimit sysconf gethostbyaddr initgroups getifaddrs freeifaddrs getnameinfo getaddrinfo inet_ntoa localtime_r nl_langinfo putenv realpath strndup gethostbyname2 gethostbyname getpeerucred getpeereid setresuid])
 
 # restore LIBS
 LIBS=$SAVE_LIBS
@@ -788,6 +820,7 @@ src/core/Makefile
 src/datacache/Makefile
 src/datastore/Makefile
 src/dht/Makefile
+src/dns/Makefile
 src/dv/Makefile
 src/fragmentation/Makefile
 src/fs/Makefile
@@ -808,6 +841,7 @@ src/transport/Makefile
 src/util/Makefile
 src/vpn/Makefile
 src/chat/Makefile
+src/integration-tests/Makefile
 pkgconfig/Makefile
 pkgconfig/gnunetarm.pc
 pkgconfig/gnunetblock.pc