move
[oweals/gnunet.git] / configure.ac
index 9d82295d1fa62b7a8f8683fdd5234637f62ec9ee..26c3c62b4305dd64af4520c9b1d368990c16333b 100644 (file)
@@ -29,9 +29,12 @@ AC_CONFIG_HEADERS([gnunet_config.h])
 AH_TOP([#define _GNU_SOURCE  1])
 
 # Checks for programs.
-AC_CANONICAL_HOST
+AC_CANONICAL_TARGET
+AC_CANONICAL_SYSTEM
 AC_PROG_AWK
 AC_PROG_CC
+gl_EARLY
+gl_INIT
 AC_PROG_CPP
 AC_PROG_CXX
 AC_PROG_OBJC
@@ -191,6 +194,8 @@ then
   AC_MSG_ERROR([GNUnet needs libgcrypt])
 fi
 
+if test $build = $target
+then
 AC_MSG_CHECKING([for working HMAC])
 AC_LANG_PUSH(C)
 LIBS="$LIBS $LIBGCRYPT_LIBS"
@@ -245,6 +250,28 @@ LIBCURL_CHECK_CONFIG(,7.20.1,,AC_MSG_ERROR([GNUnet requires libcurl >= 7.20.1]))
 # restore LIBS
 LIBS=$SAVE_LIBS
 
+fi     # $build = $target
+
+# glpk
+#AC_CHECK_HEADERS(glpk.h, glpk=true)
+#AM_CONDITIONAL(HAVE_GLPK, test x$glpk = xtrue)
+#AC_CHECK_LIB([glpk],[glp_create_prob])
+
+glpk=true
+AC_CHECK_HEADERS(glpk.h, ,[gplk=false])
+AC_CHECK_LIB([glpk],[glp_create_prob], , [gplk=false])
+# GLPK must support atm MLP presolving, version >= 4.32
+AC_CHECK_MEMBERS(glp_iocp.presolve, ,[gplk=false],[[#include <glpk.h>]])
+if test $gplk = false
+then
+       AM_CONDITIONAL(HAVE_GLPK, [test x$gplk = xtrue])
+       AM_CONDITIONAL(HAVE_LIBGLPK, [test x$gplk != x$gplk])
+       AC_MSG_WARN([GNUnet requires GLPK  >= 4.32])
+else
+       AM_CONDITIONAL(HAVE_GLPK, [test x$gplk = xtrue])
+       AM_CONDITIONAL(HAVE_LIBGLPK, [test x$gplk = x$gplk])
+fi
+
 # test for kvm and kstat (for CPU stats under BSD/Solaris)
 AC_CHECK_LIB([kvm],[kvm_open])
 AC_CHECK_LIB([kstat],[kstat_open])
@@ -293,7 +320,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 netinet/in_systm.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_systm.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 ucred.h])
 
 SAVE_LDFLAGS=$LDFLAGS
 SAVE_CPPFLAGS=$CPPFLAGS
@@ -620,6 +647,8 @@ AC_DEFINE_UNQUOTED([HAVE_ESMTP], $esmtp, [We have libesmtp])
 # restore LIBS
 LIBS=$SAVE_LIBS
 
+
+
 # check for gettext
 AM_GNU_GETTEXT([external])
 AM_GNU_GETTEXT_VERSION([0.16.1])
@@ -664,7 +693,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])
+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])
 
 # restore LIBS
 LIBS=$SAVE_LIBS
@@ -810,6 +839,7 @@ src/topology/Makefile
 src/transport/Makefile
 src/util/Makefile
 src/vpn/Makefile
+src/chat/Makefile
 pkgconfig/Makefile
 pkgconfig/gnunetarm.pc
 pkgconfig/gnunetblock.pc
@@ -883,8 +913,8 @@ You also need to create an configuration file that should
 specify the path where GNUnet should store data.  For example,
 you could store in "/etc/gnunet.conf" the following lines:
 
-[PATHS]
-SERVICEHOME = /opt/gnunet/
+[[PATHS]]
+SERVICEHOME = /var/lib/gnunet
 DEFAULTCONFIG = /etc/gnunet.conf
 
 Now, in order to start your peer, run as the 'gnunet' user