1 # This file is part of GNUnet.
2 # (C) 2001--2010 Christian Grothoff (and other contributing authors)
4 # GNUnet is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published
6 # by the Free Software Foundation; either version 2, or (at your
7 # option) any later version.
9 # GNUnet is distributed in the hope that it will be useful, but
10 # WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 # General Public License for more details.
14 # You should have received a copy of the GNU General Public License
15 # along with GNUnet; see the file COPYING. If not, write to the
16 # Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17 # Boston, MA 02111-1307, USA.
20 # Process this file with autoconf to produce a configure script.
24 AC_INIT([gnunet], [0.9.0pre2],[bug-gnunet@gnu.org])
25 AM_INIT_AUTOMAKE([gnunet], [0.9.0pre2])
26 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
27 AC_CONFIG_HEADERS([gnunet_config.h])
29 AH_TOP([#define _GNU_SOURCE 1])
31 # Checks for programs.
43 LT_INIT([disable-static dlopen win32-dll])
54 if test "$enable_shared" = "no"
56 AC_MSG_ERROR([GNUnet only works with shared libraries. Sorry.])
59 CFLAGS="-Wall $CFLAGS"
60 # use '-fno-strict-aliasing', but only if the compiler can take it
61 if gcc -fno-strict-aliasing -S -o /dev/null -xc /dev/null >/dev/null 2>&1;
63 CFLAGS="-fno-strict-aliasing $CFLAGS"
66 # Use Linux interface name unless the OS has a different preference
67 DEFAULT_INTERFACE="\"eth0\""
71 *darwin* | *rhapsody* | *macosx*)
72 AC_DEFINE_UNQUOTED(DARWIN,1,[This is an Apple Darwin system])
73 CPPFLAGS="-D_APPLE_C_SOURCE $CPPFLAGS"
74 CFLAGS="-no-cpp-precomp -fno-common $CFLAGS"
75 AC_MSG_WARN([The VPN application cannot be compiled on your OS])
77 DEFAULT_INTERFACE="\"en0\""
82 AC_DEFINE_UNQUOTED(LINUX,1,[This is a Linux system])
89 AC_DEFINE_UNQUOTED(SOMEBSD,1,[This is a BSD system])
90 AC_DEFINE_UNQUOTED(FREEBSD,1,[This is a FreeBSD system])
91 CFLAGS="-D_THREAD_SAFE $CFLAGS"
92 build_target="freebsd"
97 AC_DEFINE_UNQUOTED(SOMEBSD,1,[This is a BSD system])
98 AC_DEFINE_UNQUOTED(OPENBSD,1,[This is an OpenBSD system])
99 LIBS=`echo $LIBS | sed -e "s/-ldl//"`
100 build_target="openbsd"
105 AC_DEFINE_UNQUOTED(SOMEBSD,1,[This is a BSD system])
106 AC_DEFINE_UNQUOTED(NETBSD,1,[This is a NetBSD system])
111 AC_DEFINE_UNQUOTED(SOLARIS,1,[This is a Solaris system])
112 AC_DEFINE_UNQUOTED(_REENTRANT,1,[Need with solaris or errno doesnt work])
113 AC_CHECK_LIB(resolv, res_init)
114 AC_CHECK_LIB(rt, nanosleep)
115 build_target="solaris"
120 AC_DEFINE_UNQUOTED(LINUX,1,[This is a Linux system])
121 CFLAGS="-D_REENTRANT -fPIC -pipe $CFLAGS"
127 AC_DEFINE_UNQUOTED(CYGWIN,1,[This is a Cygwin system])
128 AC_DEFINE_UNQUOTED(WINDOWS,1,[This is a Windows system])
129 AC_CHECK_LIB(intl, gettext)
130 LDFLAGS="$LDFLAGS -no-undefined"
131 CFLAGS="-mms-bitfields $CFLAGS"
132 build_target="cygwin"
138 AC_DEFINE_UNQUOTED(MINGW,1,[This is a MinGW system])
139 AC_DEFINE_UNQUOTED(WINDOWS,1,[This is a Windows system])
140 AC_DEFINE_UNQUOTED(_WIN32,1,[This is a Windows system])
141 AC_CHECK_LIB(intl, gettext)
142 LDFLAGS="$LDFLAGS -no-undefined -Wl,--export-all-symbols"
143 LIBS="$LIBS -lws2_32 -lplibc"
144 CFLAGS="-mms-bitfields $CFLAGS"
145 CPPFLAGS="-D_WIN32_WINNT=0x0501 $CPPFLAGS"
152 AC_MSG_RESULT(Unrecognised OS $host_os)
153 AC_DEFINE_UNQUOTED(OTHEROS,1,[Some strange OS])
156 AC_DEFINE_UNQUOTED([GNUNET_DEFAULT_INTERFACE], $DEFAULT_INTERFACE, [This should be the default choice for the name of the first network interface])
157 AC_SUBST(DEFAULT_INTERFACE)
159 AC_MSG_CHECKING([for build target])
160 AM_CONDITIONAL(DARWIN, test "$build_target" = "darwin")
161 AM_CONDITIONAL(CYGWIN, test "$build_target" = "cygwin")
162 AM_CONDITIONAL(MINGW, test "$build_target" = "mingw")
163 AM_CONDITIONAL(SOLARIS, test "$build_target" = "solaris")
164 AM_CONDITIONAL(XFREEBSD, test "$build_target" = "freebsd")
165 AM_CONDITIONAL(OPENBSD, test "$build_target" = "openbsd")
166 AM_CONDITIONAL(LINUX, test "$build_target" = "linux")
168 AC_MSG_RESULT([$build_target])
169 AC_SUBST(build_target)
170 AM_CONDITIONAL([am__fastdepOBJC], false)
171 AC_UNALIGNED_64_ACCESS
173 # some other checks for standard libs
174 AC_SEARCH_LIBS([gethostbyname], [nsl ws2_32])
175 AC_CHECK_LIB(socket, socket)
177 AC_CHECK_LIB(c, getloadavg, AC_DEFINE(HAVE_GETLOADAVG,1,[getloadavg supported]))
179 # 'save' libs; only those libs found so far will be
180 # linked against _everywhere_. For the others, we
181 # will be more selective!
186 AM_PATH_LIBGCRYPT(1.2.0, gcrypt=1)
187 AC_CHECK_DECLS([gcry_mpi_lshift], [], [], [[#include <gcrypt.h>]])
191 AC_MSG_ERROR([GNUnet needs libgcrypt])
194 AC_MSG_CHECKING([for working HMAC])
196 LIBS="$LIBS $LIBGCRYPT_LIBS"
197 CFLAGS="$CFLAGS $LIBGCRYPT_CFLAGS"
199 [AC_LANG_PROGRAM([#include <gcrypt.h>], [[
202 unsigned char data[] = { 0xbf, 0x16, 0x6e, 0x46, 0x3a, 0x6c, 0xf3, 0x93, 0xa7, 0x72,
203 0x11, 0xa1, 0xdc, 0x0b, 0x07, 0xdb, 0x1a, 0x5e, 0xd9, 0xb9, 0x81, 0xbe,
204 0xea, 0xe4, 0x31, 0x5f, 0x24, 0xff, 0xfe, 0x50, 0x8a, 0xde };
205 unsigned char key[] = { 0xfc, 0x62, 0x76, 0x35 };
206 unsigned char result[] = {0xa2, 0xb, 0x1, 0xd9, 0xc0, 0x8b, 0x5a, 0x12, 0x80,
207 0xd5, 0x50, 0x12, 0x8e, 0xd0, 0x5b, 0xb6, 0x5c, 0x87, 0x24, 0xe2, 0xd0,
208 0xd2, 0xaf, 0x63, 0xae, 0xd1, 0xd6, 0x64, 0x14, 0xe3, 0x6e, 0x61, 0x5b,
209 0xd, 0xba, 0x17, 0x7d, 0xd3, 0x10, 0xb1, 0x37, 0x41, 0x91, 0x7d, 0xeb,
210 0x1, 0x4d, 0x71, 0xe8, 0x59, 0x71, 0x42, 0x8e, 0xd6, 0xf3, 0x29, 0x3b,
211 0x90, 0xf2, 0xd1, 0xaf, 0x65, 0x1e, 0xb3};
213 if (!gcry_check_version (GCRYPT_VERSION))
216 gcry_control (GCRYCTL_DISABLE_SECMEM, 0);
217 gcry_control (GCRYCTL_INITIALIZATION_FINISHED, 0);
219 if (gcry_md_open(&mac, GCRY_MD_SHA512, GCRY_MD_FLAG_HMAC) != GPG_ERR_NO_ERROR)
222 gcry_md_setkey (mac, key, sizeof (key));
223 gcry_md_write (mac, data, sizeof (data));
225 if (memcmp(gcry_md_read (mac, 0), result, gcry_md_get_algo_dlen (gcry_md_get_algo (mac))) != 0)
232 [AC_MSG_RESULT([yes])],
236 AC_MSG_FAILURE([HMAC test vector does not match. This is a known problem with libgcrypt 1.2.2 on Windows and fixed in 1.4.6.])
238 AC_MSG_FAILURE([HMAC test failed])
244 LIBCURL_CHECK_CONFIG(,7.20.1,,AC_MSG_ERROR([GNUnet requires libcurl >= 7.20.1]))
248 # test for kvm and kstat (for CPU stats under BSD/Solaris)
249 AC_CHECK_LIB([kvm],[kvm_open])
250 AC_CHECK_LIB([kstat],[kstat_open])
252 # test for libextractor
254 AC_MSG_CHECKING(for libextractor)
255 AC_ARG_WITH(extractor,
256 [ --with-extractor=PFX base of libextractor installation],
257 [AC_MSG_RESULT([$with_extractor])
258 case $with_extractor in
262 AC_CHECK_HEADERS(extractor.h,
263 AC_CHECK_LIB([extractor], [EXTRACTOR_plugin_add_defaults],
267 LDFLAGS="-L$with_extractor/lib $LDFLAGS"
268 CPPFLAGS="-I$with_extractor/include $CPPFLAGS"
269 AC_CHECK_HEADERS(extractor.h,
270 AC_CHECK_LIB([extractor], [EXTRACTOR_plugin_add_defaults],
271 EXT_LIB_PATH="-L$with_extractor/lib $EXT_LIB_PATH"
276 [AC_MSG_RESULT([--with-extractor not specified])
277 AC_CHECK_HEADERS(extractor.h,
278 AC_CHECK_LIB([extractor], [EXTRACTOR_plugin_add_defaults],
280 if test "$extractor" != 1
282 AC_MSG_ERROR([GNUnet requires libextractor])
288 # Checks for standard header files.
292 # Check for headers that are ALWAYS required
293 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]))
295 # Checks for headers that are only required on some systems or opional (and where we do NOT abort if they are not there)
296 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])
298 SAVE_LDFLAGS=$LDFLAGS
299 SAVE_CPPFLAGS=$CPPFLAGS
303 AC_MSG_CHECKING(for SQLite)
305 [ --with-sqlite=PFX base of SQLite installation],
306 [AC_MSG_RESULT("$with_sqlite")
311 AC_CHECK_HEADERS(sqlite3.h,
315 LDFLAGS="-L$with_sqlite/lib $LDFLAGS"
316 CPPFLAGS="-I$with_sqlite/include $CPPFLAGS"
317 AC_CHECK_HEADERS(sqlite3.h,
318 EXT_LIB_PATH="-L$with_sqlite/lib $EXT_LIB_PATH"
319 SQLITE_LDFLAGS="-L$with_sqlite/lib"
320 SQLITE_CPPFLAGS="-I$with_sqlite/include"
322 LDFLAGS=$SAVE_LDFLAGS
323 CPPFLAGS=$SAVE_CPPFLAGS
327 [AC_MSG_RESULT([--with-sqlite not specified])
328 AC_CHECK_HEADERS(sqlite3.h, sqlite=true)])
329 AM_CONDITIONAL(HAVE_SQLITE, test x$sqlite = xtrue)
330 AC_SUBST(SQLITE_CPPFLAGS)
331 AC_SUBST(SQLITE_LDFLAGS)
335 AC_MSG_CHECKING(for postgres)
336 AC_ARG_WITH(postgres,
337 [ --with-postgres=PFX base of postgres installation],
338 [AC_MSG_RESULT("$with_postgres")
339 case $with_postgres in
343 AC_CHECK_HEADERS(postgresql/libpq-fe.h,
347 LDFLAGS="-L$with_postgres/lib $LDFLAGS"
348 CPPFLAGS="-I$with_postgres/include $CPPFLAGS"
349 AC_CHECK_HEADERS(postgresql/libpq-fe.h,
350 EXT_LIB_PATH="-L$with_postgres/lib $EXT_LIB_PATH"
351 POSTGRES_LDFLAGS="-L$with_postgres/lib"
352 POSTGRES_CPPFLAGS="-I$with_postgres/include"
354 LDFLAGS=$SAVE_LDFLAGS
355 CPPFLAGS=$SAVE_CPPFLAGS
359 [AC_MSG_RESULT([--with-postgres not specified])
360 AC_CHECK_HEADERS(postgresql/libpq-fe.h, postgres=true)])
361 AM_CONDITIONAL(HAVE_POSTGRES, test x$postgres = xtrue)
362 AC_SUBST(POSTGRES_CPPFLAGS)
363 AC_SUBST(POSTGRES_LDFLAGS)
367 AC_MSG_CHECKING(for libpcap)
369 [ --with-pcap=PFX base of pcap installation],
370 [AC_MSG_RESULT("$with_pcap")
375 AC_CHECK_HEADERS(pcap.h,
379 LDFLAGS="-L$with_pcap/lib $LDFLAGS"
380 CPPFLAGS="-I$with_pcap/include $CPPFLAGS"
381 AC_CHECK_HEADERS(pcap.h,
382 EXT_LIB_PATH="-L$with_pcap/lib $EXT_LIB_PATH"
383 PCAP_LDFLAGS="-L$with_pcap/lib"
384 PCAP_CPPFLAGS="-I$with_pcap/include"
386 LDFLAGS=$SAVE_LDFLAGS
387 CPPFLAGS=$SAVE_CPPFLAGS
391 [AC_MSG_RESULT([--with-pcap not specified])
392 AC_CHECK_HEADERS(pcap.h, pcap=1)])
393 AM_CONDITIONAL(HAVE_PCAP, test x$pcap = x1)
394 AC_SUBST(PCAP_CPPFLAGS)
395 AC_SUBST(PCAP_LDFLAGS)
398 # test for libz (maybe required for linking mysql)
400 AC_CHECK_LIB(z, compress,,zlib=0)
401 AM_CONDITIONAL(HAVE_ZLIB, test x$zlib = x1)
404 AC_MSG_ERROR([GNUnet requires zlib])
408 AC_CHECK_TYPES([sigset_t, off_t], [], [], [#include <sys/types.h>])
409 AC_CHECK_TYPES([size_t], [], [], [#include <stdio.h>])
411 if test "$build_target" = "mingw"
413 CYGWIN_MYSQL_MAGIC="#include <mysql/my_global.h>"
419 SAVE_LDFLAGS=$LDFLAGS
420 SAVE_CPPFLAGS=$CPPFLAGS
421 AC_MSG_CHECKING(for mysql)
423 [ --with-mysql=PFX base of MySQL installation],
424 [AC_MSG_RESULT("$with_mysql")
425 if test "$with_mysql" != "no"
427 if test "$with_mysql" != "yes"
429 LDFLAGS="-L$with_mysql/lib -L$with_mysql/lib/mysql $LDFLAGS $ZLIBS"
430 CPPFLAGS="-I$with_mysql/include $CPPFLAGS"
432 AC_CHECK_HEADERS(mysql/mysql.h,
433 AC_CHECK_LIB(mysqlclient, mysql_init,
434 MYSQL_LDFLAGS="-L$with_mysql/lib -L$with_mysql/lib/mysql"
435 MYSQL_CPPFLAGS="-I$with_mysql/include"
437 mysql=true), [], [$CYGWIN_MYSQL_MAGIC])
440 [AC_MSG_RESULT([--with-mysql not specified])
441 LDFLAGS="-L/usr/lib/mysql $LDFLAGS $ZLIBS"
442 AC_CHECK_LIB(mysqlclient, mysql_init,
443 [AC_CHECK_HEADERS(mysql/mysql.h,
444 MYSQL_LDFLAGS="-L/usr/lib/mysql"
447 , [], [$CYGWIN_MYSQL_MAGIC])])
450 AC_SUBST(MYSQL_LDFLAGS)
451 AC_SUBST(MYSQL_CPPFLAGS)
453 # additional version check for mysql
454 AC_ARG_ENABLE(mysql-version-check, [ --disable-mysql-version-check do not check MySQL version],, enable_mysql_version_check=yes)
455 if test "$mysql" = "true" -a "x$enable_mysql_version_check" = "xyes"
457 AC_MSG_CHECKING(mysql version)
458 AC_RUN_IFELSE([AC_LANG_PROGRAM(
459 [[$CYGWIN_MYSQL_MAGIC
460 #include <mysql/mysql.h>]],
461 [[if (MYSQL_VERSION_ID < 40100)
466 ],mysql=true,mysql=false)
467 if test "$mysql" = "false"
470 AC_MSG_RESULT([fail, >= 4.1 required])
475 AM_CONDITIONAL(HAVE_MYSQL, test x$mysql = xtrue)
476 AM_CONDITIONAL(HAVE_MYSQLE, test "0" = "1")
479 LDFLAGS=$SAVE_LDFLAGS
480 CPPFLAGS=$SAVE_CPPFLAGS
482 if test "$sqlite" = 0 -a "$mysql" = 0
484 AC_MSG_ERROR([GNUnet requires SQLite or MySQL])
489 AC_MSG_CHECKING([for libmicrohttpd])
490 AC_ARG_WITH(microhttpd,
491 [ --with-microhttpd=PFX base of libmicrohttpd installation],
492 [AC_MSG_RESULT([$with_microhttpd])
493 case $with_microhttpd in
497 AC_CHECK_HEADERS([microhttpd.h],
498 AC_CHECK_DECL(MHD_OPTION_PER_IP_CONNECTION_LIMIT,
499 AC_CHECK_LIB([microhttpd], [MHD_start_daemon],
501 [],[#include "src/include/platform.h"
502 #include <microhttpd.h>]),,
503 [#include "src/include/platform.h"])
506 LDFLAGS="-L$with_microhttpd/lib $LDFLAGS"
507 CPPFLAGS="-I$with_microhttpd/include $CPPFLAGS"
508 AC_CHECK_HEADERS(microhttpd.h,
509 AC_CHECK_DECL(MHD_OPTION_PER_IP_CONNECTION_LIMIT,
510 AC_CHECK_LIB([microhttpd], [MHD_start_daemon],
511 EXT_LIB_PATH="-L$with_microhttpd/lib $EXT_LIB_PATH"
513 [],[#include "src/include/platform.h"
514 #include <microhttpd.h>]),,
515 [#include "src/include/platform.h"])
519 [AC_MSG_RESULT([--with-microhttpd not specified])
520 AC_CHECK_HEADERS([microhttpd.h],
521 AC_CHECK_DECL(MHD_OPTION_PER_IP_CONNECTION_LIMIT,
522 AC_CHECK_LIB([microhttpd], [MHD_start_daemon],
524 [],[#include "src/include/platform.h"
525 #include <microhttpd.h>]),,
526 [#include "src/include/platform.h"])])
527 AM_CONDITIONAL(HAVE_MHD, test x$lmhd = x1)
528 AC_DEFINE_UNQUOTED([HAVE_MHD], $lmhd, [We have libmicrohttpd])
533 AC_MSG_CHECKING([for openssl])
535 [ --with-openssl=PFX base of openssl installation],
536 [AC_MSG_RESULT([$with_openssl])
537 case $with_openssl in
541 AC_CHECK_HEADERS([openssl/ssl.h],
542 AC_CHECK_LIB([ssl], [SSL_new],
546 LDFLAGS="-L$with_openssl/lib $LDFLAGS"
547 CPPFLAGS="-I$with_openssl/include $CPPFLAGS"
548 AC_CHECK_HEADERS([openssl/ssl.h],
549 AC_CHECK_LIB([ssl], [SSL_new],
550 EXT_LIB_PATH="-L$with_openssl/lib $EXT_LIB_PATH"
555 [AC_MSG_RESULT([--with-openssl not specified])
556 AC_CHECK_HEADERS([openssl/ssl.h],
557 AC_CHECK_LIB([ssl], [SSL_new],
559 AM_CONDITIONAL(HAVE_OPENSSL, test x$openssl = x1)
560 AC_DEFINE_UNQUOTED([HAVE_OPENSSL], $openssl, [We have openssl])
570 # check for python & pexpect (used for some testcases only)
571 AM_PATH_PYTHON([2.5],, [:])
572 AM_CONDITIONAL([HAVE_PYTHON], [test "$PYTHON" != :])
574 if test "$PYTHON" != :
576 AC_MSG_CHECKING([for pexpect])
577 $PYTHON -c "import pexpect" > /dev/null 2> /dev/null
579 AM_CONDITIONAL(HAVE_PYTHON_PEXPECT, test $PYEX -eq 0)
584 AC_MSG_RESULT([not found])
587 AM_CONDITIONAL(HAVE_PYTHON_PEXPECT, 0)
592 AC_MSG_CHECKING([for libesmtp])
594 [ --with-esmtp=PFX base of libesmtp installation],
595 [AC_MSG_RESULT([$with_esmtp])
600 AC_CHECK_HEADERS(libesmtp.h,
601 AC_CHECK_LIB([esmtp], [smtp_start_session],
605 LDFLAGS="-L$with_esmtp/lib $LDFLAGS"
606 CPPFLAGS="-I$with_esmtp/include $CPPFLAGS"
607 AC_CHECK_HEADERS(libesmtp.h,
608 AC_CHECK_LIB([esmtp], [smtp_start_session],
609 EXT_LIB_PATH="-L$with_esmtp/lib $EXT_LIB_PATH"
614 [AC_MSG_RESULT([--with-esmtp not specified])
615 AC_CHECK_HEADERS(libesmtp.h,
616 AC_CHECK_LIB([esmtp], [smtp_start_session],
618 AM_CONDITIONAL(HAVE_ESMTP, test x$esmtp = x1)
619 AC_DEFINE_UNQUOTED([HAVE_ESMTP], $esmtp, [We have libesmtp])
624 AM_GNU_GETTEXT([external])
625 AM_GNU_GETTEXT_VERSION([0.16.1])
630 # Checks for standard typedefs, structures, and compiler characteristics.
639 AC_CHECK_MEMBER([struct sockaddr_in.sin_len],
640 [ AC_DEFINE(HAVE_SOCKADDR_IN_SIN_LEN, 1, [Do we have sockaddr_in.sin_len?])
644 #include <sys/types.h>
645 #include <sys/socket.h>
646 #include <netinet/in.h>
651 # Checks for library functions.
652 AC_FUNC_CLOSEDIR_VOID
655 AC_PROG_GCC_TRADITIONAL
657 AC_FUNC_SELECT_ARGTYPES
667 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])
672 gn_user_home_dir="~/.gnunet"
673 AC_ARG_WITH(user-home-dir,
675 [--with-user-home-dir=DIR],
676 [default user home directory (~/.gnunet)]),
677 [gn_user_home_dir=$withval])
678 AC_SUBST(GN_USER_HOME_DIR, $gn_user_home_dir)
679 gn_daemon_home_dir="/var/lib/gnunet"
680 AC_ARG_WITH(daemon-home-dir,
682 [--with-daemon-home-dir=DIR],
683 [default daemon home directory (/var/lib/gnunet)]),
684 [gn_daemon_home_dir=$withval])
685 AC_SUBST(GN_DAEMON_HOME_DIR, $gn_daemon_home_dir)
686 gn_daemon_config_dir="/etc"
687 AC_ARG_WITH(daemon-config-dir,
689 [--with-daemon-config-dir=DIR],
690 [default daemon config directory (/etc)]),
691 [gn_daemon_config_dir=$withval])
692 AC_SUBST(GN_DAEMON_CONFIG_DIR, $gn_daemon_config_dir)
695 GN_LIBINTL="$LTLIBINTL"
696 AC_ARG_ENABLE(framework, [ --enable-framework enable Mac OS X framework build helpers],enable_framework_build=$enableval)
697 AM_CONDITIONAL(WANT_FRAMEWORK, test x$enable_framework_build = xyes)
698 if test x$enable_framework_build = xyes
700 AC_DEFINE([FRAMEWORK_BUILD], 1, [Build a Mac OS X Framework])
701 GN_INTLINCL='-I$(top_srcdir)/src/intlemu'
702 GN_LIBINTL='$(top_builddir)/src/intlemu/libintlemu.la -framework CoreFoundation'
703 AC_LIB_APPENDTOVAR([CPPFLAGS], [$GN_INTLINCL])
706 GN_LIB_LDFLAGS="-export-dynamic -no-undefined"
707 GN_PLUGIN_LDFLAGS="-export-dynamic -avoid-version -module -no-undefined"
709 AC_SUBST(GN_LIB_LDFLAGS)
710 AC_SUBST(GN_PLUGIN_LDFLAGS)
711 AC_SUBST(GN_INTLINCL)
717 AC_SUBST(EXT_LIB_PATH)
722 AC_SUBST(EXT_LIB_PATH)
725 # should 'make check' run tests?
726 AC_MSG_CHECKING(whether to run tests)
727 AC_ARG_ENABLE(testruns,
728 [AS_HELP_STRING([--enable-testruns=yes/no],
729 [disable running tests on make check (default is YES)])],
730 [enable_tests_run=$enableval],
731 [enable_tests_run="yes"])
732 AC_MSG_RESULT($enable_test_run)
733 AM_CONDITIONAL([DISABLE_TEST_RUN], [test "x$enable_tests_run" = "xno"])
735 # should experimental code be compiled (code that may not yet compile)?
736 disable_experimental=yes
737 AC_MSG_CHECKING(whether to compile experimental code)
738 AC_ARG_ENABLE(experimental,
739 [AS_HELP_STRING([--enable-experimental],
740 [enable compiling experimental code])],
741 [enable_experimental=$enableval],
742 [enable_experimental="no"])
743 AC_MSG_RESULT($enable_experimental)
744 AM_CONDITIONAL([HAVE_EXPERIMENTAL], [test "x$enable_experimental" = "xyes"])
746 # should malicious code be compiled (code used for testing with malicious peers)
748 AC_MSG_CHECKING(whether to compile malicious code)
749 AC_ARG_ENABLE(malicious,
750 [AS_HELP_STRING([--enable-malicious],
751 [enable compiling malicious code (only for developers for testing)])],
752 [enable_malicious=1],
753 [enable_malicious=0])
754 AC_MSG_RESULT($enable_malicious)
755 AM_CONDITIONAL([HAVE_MALICIOUS], [test "x$enable_malicious" = "x1"])
756 AC_DEFINE_UNQUOTED([HAVE_MALICIOUS], $enable_malicious, [Compile malicious code])
758 # should code be enabled that works around missing OS functionality on Windows?
759 # used for test cases
760 AC_ARG_ENABLE(windows_workarounds, [AS_HELP_STRING([--enable-windows_workarounds],
761 [enable workarounds used on Windows (only useful for test cases)])])
762 if test $build_target = "mingw"
766 if test x$enable_windows_workarounds = "xyes"
773 AC_DEFINE_UNQUOTED([ENABLE_WINDOWS_WORKAROUNDS], $workarounds, [enable workarounds used on Windows (only useful for test cases)])
777 AC_ARG_ENABLE([coverage], AS_HELP_STRING([--enable-coverage],
778 [Compile the library with code coverage support (default is NO)]),
779 [use_gcov=yes], [use_gcov=no])
780 AM_CONDITIONAL([USE_COVERAGE], [test "x$use_gcov" = "xyes"])
791 src/datacache/Makefile
792 src/datastore/Makefile
795 src/fragmentation/Makefile
799 src/include/gnunet_directories.h
800 src/hostlist/Makefile
804 src/peerinfo/Makefile
805 src/peerinfo-tool/Makefile
806 src/statistics/Makefile
807 src/template/Makefile
809 src/topology/Makefile
810 src/transport/Makefile
815 pkgconfig/gnunetarm.pc
816 pkgconfig/gnunetblock.pc
817 pkgconfig/gnunetcore.pc
818 pkgconfig/gnunetdatacache.pc
819 pkgconfig/gnunetdatastore.pc
820 pkgconfig/gnunetdht.pc
821 pkgconfig/gnunetdhtlog.pc
822 pkgconfig/gnunetdv.pc
823 pkgconfig/gnunetfragmentation.pc
824 pkgconfig/gnunetfs.pc
825 pkgconfig/gnunethello.pc
826 pkgconfig/gnunetpeerinfo.pc
827 pkgconfig/gnunetstatistics.pc
828 pkgconfig/gnunettesting.pc
829 pkgconfig/gnunettransport.pc
830 pkgconfig/gnunetutil.pc
836 # warn user if mysql found but not used due to version
837 if test "$mysqlfail" = "true"
839 AC_MSG_NOTICE([NOTICE: MySQL found, but too old. MySQL support will not be compiled.])
843 if test "x$sqlite" = "x0"
845 AC_MSG_NOTICE([NOTICE: sqlite not found. sqLite support will not be compiled.])
848 if test "x$lmhd" != "x1"
850 AC_MSG_NOTICE([NOTICE: libmicrohttpd not found, http transport will not be installed.])
853 if test "x$esmtp" != "x1"
855 AC_MSG_NOTICE([NOTICE: libesmtp not found, monkey will not be installed.])
858 if test "x$pcap" != "x1"
860 AC_MSG_NOTICE([NOTICE: libpcap not found, WiFi support will not be installed.])
863 if test "x$openssl" != "x1"
865 AC_MSG_NOTICE([NOTICE: OpenSSL not found, monkey will not be installed.])
868 AC_MSG_NOTICE([NOTICE: Database support is set to MySQL: $mysql, SQLite: $sqlite, Postgres: $postgres])
870 if test "$enable_framework_build" = "yes"
872 AC_MSG_NOTICE([NOTICE: Mac OS X framework build enabled.])
875 AC_MSG_NOTICE([********************************************
876 You can compile GNUnet with
878 now. After that, run (if necessary as 'root')
880 to install everything. You may want to create a new user account
881 to run the GNUnet service:
883 You also need to create an configuration file that should
884 specify the path where GNUnet should store data. For example,
885 you could store in "/etc/gnunet.conf" the following lines:
888 SERVICEHOME = /var/lib/gnunet
889 DEFAULTCONFIG = /etc/gnunet.conf
891 Now, in order to start your peer, run as the 'gnunet' user
894 Each GNUnet user should also create an (at least initially) empty
897 touch $HOME/.gnunet/gnunet.conf
899 Optionally, download and compile gnunet-gtk to get a GUI.
900 ********************************************])