1 # This file is part of GNUnet.
2 # (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 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.0pre0],[bug-gnunet@gnu.org])
25 AM_INIT_AUTOMAKE([gnunet], [0.9.0pre0])
26 AC_CONFIG_HEADERS([gnunet_config.h])
28 AH_TOP([#define _GNU_SOURCE 1])
30 # Checks for programs.
40 LT_CONFIG_LTDL_DIR([libltdl])
42 LT_INIT([disable-static dlopen win32-dll])
53 if test "$enable_shared" = "no"
55 AC_MSG_ERROR([GNUnet only works with shared libraries. Sorry.])
58 CFLAGS="-Wall $CFLAGS"
59 # use '-fno-strict-aliasing', but only if the compiler can take it
60 if gcc -fno-strict-aliasing -S -o /dev/null -xc /dev/null >/dev/null 2>&1;
62 CFLAGS="-fno-strict-aliasing $CFLAGS"
65 # Use Linux interface name unless the OS has a different preference
66 DEFAULT_INTERFACE="\"eth0\""
70 *darwin* | *rhapsody* | *macosx*)
71 AC_DEFINE_UNQUOTED(OSX,1,[This is an OS X system])
72 CFLAGS="-no-cpp-precomp -fno-common $CFLAGS"
73 AC_MSG_WARN([The VPN application cannot be compiled on your OS])
75 DEFAULT_INTERFACE="\"en0\""
80 AC_DEFINE_UNQUOTED(LINUX,1,[This is a Linux system])
87 AC_DEFINE_UNQUOTED(SOMEBSD,1,[This is a BSD system])
88 AC_DEFINE_UNQUOTED(FREEBSD,1,[This is a FreeBSD system])
89 CFLAGS="-D_THREAD_SAFE $CFLAGS"
90 build_target="freebsd"
95 AC_DEFINE_UNQUOTED(SOMEBSD,1,[This is a BSD system])
96 AC_DEFINE_UNQUOTED(OPENBSD,1,[This is an OpenBSD system])
97 LIBS=`echo $LIBS | sed -e "s/-ldl//"`
98 build_target="openbsd"
103 AC_DEFINE_UNQUOTED(SOMEBSD,1,[This is a BSD system])
104 AC_DEFINE_UNQUOTED(NETBSD,1,[This is a NetBSD system])
109 AC_DEFINE_UNQUOTED(SOLARIS,1,[This is a Solaris system])
110 AC_DEFINE_UNQUOTED(_REENTRANT,1,[Need with solaris or errno doesnt work])
111 AC_CHECK_LIB(resolv, res_init)
112 AC_CHECK_LIB(rt, nanosleep)
113 build_target="solaris"
118 AC_DEFINE_UNQUOTED(LINUX,1,[This is a Linux system])
119 CFLAGS="-D_REENTRANT -fPIC -pipe $CFLAGS"
125 AC_DEFINE_UNQUOTED(CYGWIN,1,[This is a Cygwin system])
126 AC_DEFINE_UNQUOTED(WINDOWS,1,[This is a Windows system])
127 AC_CHECK_LIB(intl, gettext)
128 LDFLAGS="$LDFLAGS -no-undefined"
129 CFLAGS="-mms-bitfields $CFLAGS"
130 build_target="cygwin"
136 AC_DEFINE_UNQUOTED(MINGW,1,[This is a MinGW system])
137 AC_DEFINE_UNQUOTED(WINDOWS,1,[This is a Windows system])
138 AC_DEFINE_UNQUOTED(_WIN32,1,[This is a Windows system])
139 AC_CHECK_LIB(intl, gettext)
140 LDFLAGS="$LDFLAGS -no-undefined -Wl,--export-all-symbols"
141 LIBS="$LIBS -lws2_32 -lplibc"
142 CFLAGS="-mms-bitfields $CFLAGS"
149 AC_MSG_RESULT(Unrecognised OS $host_os)
150 AC_DEFINE_UNQUOTED(OTHEROS,1,[Some strange OS])
153 AC_DEFINE_UNQUOTED([GNUNET_DEFAULT_INTERFACE], $DEFAULT_INTERFACE, [This should be the default choice for the name of the first network interface])
154 AC_SUBST(DEFAULT_INTERFACE)
156 AC_MSG_CHECKING([for build target])
157 AM_CONDITIONAL(MACOSX, test "$build_target" = "macosx")
158 AM_CONDITIONAL(CYGWIN, test "$build_target" = "cygwin")
159 AM_CONDITIONAL(MINGW, test "$build_target" = "mingw")
160 AM_CONDITIONAL(SOLARIS, test "$build_target" = "solaris")
161 AM_CONDITIONAL(XFREEBSD, test "$build_target" = "freebsd")
162 AM_CONDITIONAL(OPENBSD, test "$build_target" = "openbsd")
163 AM_CONDITIONAL(LINUX, test "$build_target" = "linux")
164 AC_MSG_RESULT([$build_target])
165 AC_SUBST(build_target)
166 AM_CONDITIONAL([am__fastdepOBJC], false)
167 AC_UNALIGNED_64_ACCESS
169 # some other checks for standard libs
170 AC_SEARCH_LIBS([gethostbyname], [nsl ws2_32])
171 AC_CHECK_LIB(socket, socket)
173 AC_CHECK_LIB(c, getloadavg, AC_DEFINE(HAVE_GETLOADAVG,1,[getloadavg supported]))
175 # 'save' libs; only those libs found so far will be
176 # linked against _everywhere_. For the others, we
177 # will be more selective!
182 AM_PATH_LIBGCRYPT(1.2.0, gcrypt=1)
186 AC_MSG_ERROR([GNUnet needs libgcrypt])
191 LIBCURL_CHECK_CONFIG(,7.15.4,,AC_MSG_ERROR([GNUnet requires libcurl >= 7.15.4]))
198 # test for kvm and kstat (for CPU stats under BSD/Solaris)
199 AC_CHECK_LIB([kvm],[kvm_open])
200 AC_CHECK_LIB([kstat],[kstat_open])
202 # test for libextractor
204 AC_MSG_CHECKING(for libextractor)
205 AC_ARG_WITH(extractor,
206 [ --with-extractor=PFX base of libextractor installation],
207 [AC_MSG_RESULT([$with_extractor])
208 case $with_extractor in
212 AC_CHECK_HEADERS(extractor.h,
213 AC_CHECK_LIB([extractor], [EXTRACTOR_loadDefaultLibraries],
217 LDFLAGS="-L$with_extractor/lib $LDFLAGS"
218 CPPFLAGS="-I$with_extractor/include $CPPFLAGS"
219 AC_CHECK_HEADERS(extractor.h,
220 AC_CHECK_LIB([extractor], [EXTRACTOR_loadDefaultLibraries],
221 EXT_LIB_PATH="-L$with_extractor/lib $EXT_LIB_PATH"
226 [AC_MSG_RESULT([--with-extractor not specified])
227 AC_CHECK_HEADERS(extractor.h,
228 AC_CHECK_LIB([extractor], [EXTRACTOR_loadDefaultLibraries],
230 if test "$extractor" != 1
232 AC_MSG_ERROR([GNUnet requires libextractor])
238 # Checks for standard header files.
242 # Check for headers that are ALWAYS required
243 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]))
245 # Checks for headers that are only required on some systems or opional (and where we do NOT abort if they are not there)
246 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 iconv.h ifaddrs.h mach/mach.h stddef.h sys/timeb.h terminos.h])
248 # Check for GMP header (and abort if not present)
249 AC_CHECK_HEADERS([gmp.h],,AC_MSG_ERROR([Compiling GNUnet requires gmp.h (from the GNU MP library, libgmp)]))
253 AC_MSG_CHECKING(for libgmp)
255 [ --with-gmp=PFX base of libgmp installation],
256 [AC_MSG_RESULT([$with_gmp])
261 AC_CHECK_HEADERS(gmp.h,
262 AC_CHECK_LIB([gmp], [__gmpz_add],
266 LDFLAGS="-L$with_gmp/lib $LDFLAGS"
267 CPPFLAGS="-I$with_gmp/include $CPPFLAGS"
268 AC_CHECK_HEADERS(gmp.h,
269 AC_CHECK_LIB([gmp], [__gmpz_add],
270 EXT_LIB_PATH="-L$with_gmp/lib $EXT_LIB_PATH"
275 [AC_MSG_RESULT([--with-gmp not specified])
276 AC_CHECK_HEADERS(gmp.h,
277 AC_CHECK_LIB([gmp], [__gmpz_add],
281 AC_MSG_ERROR([GNUnet requires libgmp])
284 SAVE_LDFLAGS=$LDFLAGS
285 SAVE_CPPFLAGS=$CPPFLAGS
289 AC_MSG_CHECKING(for SQLite)
291 [ --with-sqlite=PFX base of SQLite installation],
292 [AC_MSG_RESULT("$with_sqlite")
297 AC_CHECK_HEADERS(sqlite3.h,
301 LDFLAGS="-L$with_sqlite/lib $LDFLAGS"
302 CPPFLAGS="-I$with_sqlite/include $CPPFLAGS"
303 AC_CHECK_HEADERS(sqlite3.h,
304 EXT_LIB_PATH="-L$with_sqlite/lib $EXT_LIB_PATH"
305 SQLITE_LDFLAGS="-L$with_sqlite/lib"
306 SQLITE_CPPFLAGS="-I$with_sqlite/include"
308 LDFLAGS=$SAVE_LDFLAGS
309 CPPFLAGS=$SAVE_CPPFLAGS
313 [AC_MSG_RESULT([--with-sqlite not specified])
314 AC_CHECK_HEADERS(sqlite3.h, sqlite=true)])
315 AM_CONDITIONAL(HAVE_SQLITE, test x$sqlite = xtrue)
316 AC_SUBST(SQLITE_CPPFLAGS)
317 AC_SUBST(SQLITE_LDFLAGS)
321 AC_MSG_CHECKING(for postgres)
322 AC_ARG_WITH(postgres,
323 [ --with-postgres=PFX base of postgres installation],
324 [AC_MSG_RESULT("$with_postgres")
325 case $with_postgres in
329 AC_CHECK_HEADERS(postgresql/libpq-fe.h,
333 LDFLAGS="-L$with_postgres/lib $LDFLAGS"
334 CPPFLAGS="-I$with_postgres/include $CPPFLAGS"
335 AC_CHECK_HEADERS(postgresql/libpq-fe.h,
336 EXT_LIB_PATH="-L$with_postgres/lib $EXT_LIB_PATH"
337 SQLITE_LDFLAGS="-L$with_postgres/lib"
338 SQLITE_CPPFLAGS="-I$with_postgres/include"
340 LDFLAGS=$SAVE_LDFLAGS
341 CPPFLAGS=$SAVE_CPPFLAGS
345 [AC_MSG_RESULT([--with-postgres not specified])
346 AC_CHECK_HEADERS(postgresql/libpq-fe.h, postgres=true)])
347 AM_CONDITIONAL(HAVE_POSTGRES, test x$postgres = xtrue)
348 AC_SUBST(POSTGRES_CPPFLAGS)
349 AC_SUBST(POSTGRES_LDFLAGS)
352 # test for libz (maybe required for linking mysql)
354 AC_CHECK_LIB(z, compress,,zlib=0)
355 AM_CONDITIONAL(HAVE_ZLIB, test x$zlib = x1)
358 AC_MSG_ERROR([GNUnet requires zlib])
362 AC_CHECK_TYPES([sigset_t, off_t], [], [], [#include <sys/types.h>])
363 AC_CHECK_TYPES([size_t], [], [], [#include <stdio.h>])
365 if test "$build_target" = "mingw"
367 CYGWIN_MYSQL_MAGIC="#include <mysql/my_global.h>"
373 SAVE_LDFLAGS=$LDFLAGS
374 SAVE_CPPFLAGS=$CPPFLAGS
375 AC_MSG_CHECKING(for mysql)
377 [ --with-mysql=PFX base of MySQL installation],
378 [AC_MSG_RESULT("$with_mysql")
379 if test "$with_mysql" != "no"
381 if test "$with_mysql" != "yes"
383 LDFLAGS="-L$with_mysql/lib -L$with_mysql/lib/mysql $LDFLAGS $ZLIBS"
384 CPPFLAGS="-I$with_mysql/include $CPPFLAGS"
386 AC_CHECK_HEADERS(mysql/mysql.h,
387 AC_CHECK_LIB(mysqlclient, mysql_init,
388 MYSQL_LDFLAGS="-L$with_mysql/lib -L$with_mysql/lib/mysql"
389 MYSQL_CPPFLAGS="-I$with_mysql/include"
391 mysql=true), [], [$CYGWIN_MYSQL_MAGIC])
394 [AC_MSG_RESULT([--with-mysql not specified])
395 LDFLAGS="-L/usr/lib/mysql $LDFLAGS $ZLIBS"
396 AC_CHECK_LIB(mysqlclient, mysql_init,
397 [AC_CHECK_HEADERS(mysql/mysql.h,
398 MYSQL_LDFLAGS="-L/usr/lib/mysql"
401 , [], [$CYGWIN_MYSQL_MAGIC])])
404 AC_SUBST(MYSQL_LDFLAGS)
405 AC_SUBST(MYSQL_CPPFLAGS)
407 # additional version check for mysql
408 AC_ARG_ENABLE(mysql-version-check, [ --disable-mysql-version-check do not check MySQL version],, enable_mysql_version_check=yes)
409 if test "$mysql" = "true" -a "x$enable_mysql_version_check" = "xyes"
411 AC_MSG_CHECKING(mysql version)
412 AC_RUN_IFELSE([AC_LANG_PROGRAM(
413 [[$CYGWIN_MYSQL_MAGIC
414 #include <mysql/mysql.h>]],
415 [[if (MYSQL_VERSION_ID < 40100)
420 ],mysql=true,mysql=false)
421 if test "$mysql" = "false"
424 AC_MSG_RESULT([fail, >= 4.1 required])
429 AM_CONDITIONAL(HAVE_MYSQL, test x$mysql = xtrue)
430 AM_CONDITIONAL(HAVE_MYSQLE, test "0" = "1")
433 LDFLAGS=$SAVE_LDFLAGS
434 CPPFLAGS=$SAVE_CPPFLAGS
436 if test "$sqlite" = 0 -a "$mysql" = 0
438 AC_MSG_ERROR([GNUnet requires SQLite or MySQL])
444 AC_CHECK_LIB([ncursesw],[wmove])
445 AC_MSG_CHECKING([for dialog 1.0-20051207])
447 [ --with-dialog=PFX base of dialog installation],
448 [AC_MSG_RESULT([$with_dialog])
453 AC_CHECK_HEADERS(dialog.h,
454 AC_CHECK_LIB([dialog], [dlg_menu],
458 LDFLAGS="-L$with_dialog/lib $LDFLAGS"
459 CPPFLAGS="-I$with_dialog/include $CPPFLAGS"
460 AC_CHECK_HEADERS(dialog.h,
461 AC_CHECK_LIB([dialog], [dlg_menu],
462 EXT_LIB_PATH="-L$with_dialog/lib $EXT_LIB_PATH"
467 [AC_MSG_RESULT([--with-dialog not specified])
468 AC_CHECK_HEADERS(dialog.h,
469 AC_CHECK_LIB([dialog], [dlg_menu],
472 AM_CONDITIONAL(HAVE_DIALOG, test x$dialog = x1)
473 AC_DEFINE_UNQUOTED([HAVE_DIALOG], $dialog, [We have dialog])
477 [ --with-cdialog=PFX base of cdialog installation],
478 [AC_MSG_RESULT([$with_cdialog])
479 case $with_cdialog in
483 AC_CHECK_HEADERS(cdialog/dialog.h,
484 AC_CHECK_LIB([cdialog], [dlg_menu],
488 LDFLAGS="-L$with_cdialog/lib $LDFLAGS"
489 CPPFLAGS="-I$with_cdialog/include $CPPFLAGS"
490 AC_CHECK_HEADERS(cdialog/dialog.h,
491 AC_CHECK_LIB([cdialog], [dlg_menu],
492 EXT_LIB_PATH="-L$with_cdialog/lib $EXT_LIB_PATH"
497 [AC_MSG_RESULT([--with-cdialog not specified])
498 AC_CHECK_HEADERS(cdialog/dialog.h,
499 AC_CHECK_LIB([cdialog], [dlg_menu],
502 AM_CONDITIONAL(HAVE_CDIALOG, test x$cdialog = x1)
503 AC_DEFINE_UNQUOTED([HAVE_CDIALOG], $cdialog, [We have cdialog])
509 AC_MSG_CHECKING([for libmicrohttpd])
510 AC_ARG_WITH(microhttpd,
511 [ --with-microhttpd=PFX base of libmicrohttpd installation],
512 [AC_MSG_RESULT([$with_microhttpd])
513 case $with_microhttpd in
517 AC_CHECK_HEADERS([microhttpd.h],
518 AC_CHECK_DECL(MHD_OPTION_PER_IP_CONNECTION_LIMIT,
519 AC_CHECK_LIB([microhttpd], [MHD_start_daemon],
521 [],[#include "src/include/platform.h"
522 #include <microhttpd.h>]),,
523 [#include "src/include/platform.h"])
526 LDFLAGS="-L$with_microhttpd/lib $LDFLAGS"
527 CPPFLAGS="-I$with_microhttpd/include $CPPFLAGS"
528 AC_CHECK_HEADERS(microhttpd.h,
529 AC_CHECK_DECL(MHD_OPTION_PER_IP_CONNECTION_LIMIT,
530 AC_CHECK_LIB([microhttpd], [MHD_start_daemon],
531 EXT_LIB_PATH="-L$with_microhttpd/lib $EXT_LIB_PATH"
533 [],[#include "src/include/platform.h"
534 #include <microhttpd.h>]),,
535 [#include "src/include/platform.h"])
539 [AC_MSG_RESULT([--with-microhttpd not specified])
540 AC_CHECK_HEADERS([microhttpd.h],
541 AC_CHECK_DECL(MHD_OPTION_PER_IP_CONNECTION_LIMIT,
542 AC_CHECK_LIB([microhttpd], [MHD_start_daemon],
544 [],[#include "src/include/platform.h"
545 #include <microhttpd.h>]),,
546 [#include "src/include/platform.h"])])
547 AM_CONDITIONAL(HAVE_MHD, test x$lmhd = x1)
548 AC_DEFINE_UNQUOTED([HAVE_MHD], $lmhd, [We have libmicrohttpd])
554 AC_MSG_CHECKING([for libesmtp])
556 [ --with-esmtp=PFX base of libesmtp installation],
557 [AC_MSG_RESULT([$with_esmtp])
562 AC_CHECK_HEADERS(libesmtp.h,
563 AC_CHECK_LIB([esmtp], [smtp_start_session],
567 LDFLAGS="-L$with_esmtp/lib $LDFLAGS"
568 CPPFLAGS="-I$with_esmtp/include $CPPFLAGS"
569 AC_CHECK_HEADERS(libesmtp.h,
570 AC_CHECK_LIB([esmtp], [smtp_start_session],
571 EXT_LIB_PATH="-L$with_esmtp/lib $EXT_LIB_PATH"
576 [AC_MSG_RESULT([--with-esmtp not specified])
577 AC_CHECK_HEADERS(libesmtp.h,
578 AC_CHECK_LIB([esmtp], [smtp_start_session],
580 AM_CONDITIONAL(HAVE_ESMTP, test x$esmtp = x1)
581 AC_DEFINE_UNQUOTED([HAVE_ESMTP], $esmtp, [We have libesmtp])
586 AM_GNU_GETTEXT_VERSION([0.16.1])
587 AM_GNU_GETTEXT([external])
592 # Checks for standard typedefs, structures, and compiler characteristics.
605 # Checks for library functions.
606 AC_FUNC_CLOSEDIR_VOID
608 AC_PROG_GCC_TRADITIONAL
610 AC_FUNC_SELECT_ARGTYPES
620 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 gethostbyaddr initgroups getifaddrs freeifaddrs getnameinfo getaddrinfo inet_ntoa localtime_r nl_langinfo putenv realpath strndup gethostbyname2 gethostbyname])
629 AC_MSG_CHECKING(for guile 1.8)
631 [ --with-guile=PFX base of guile installation],
632 [AC_MSG_RESULT([$with_guile])
637 AC_CHECK_HEADERS(libguile.h,
638 AC_CHECK_LIB([guile], [scm_c_define_gsubr],
643 LDFLAGS="-L$with_guile/lib $LDFLAGS"
644 CPPFLAGS="-I$with_guile/include $CPPFLAGS"
645 AC_CHECK_HEADERS(libguile.h,
646 AC_CHECK_LIB([guile], [scm_c_define_gsubr],
647 EXT_LIB_PATH="-L$with_guile/lib $EXT_LIB_PATH"
653 [AC_MSG_RESULT([--with-guile not specified])
654 AC_CHECK_HEADERS(libguile.h,
655 AC_CHECK_LIB([guile], [scm_c_define_gsubr],
656 guile=1, [], -lgmp $LIBLTDL))])
660 AC_CHECK_LIB([guile], [scm_init_guile], [],
661 AC_MSG_ERROR([Guile doesn't provide scm_init_guile(). Please report to bug-gnunet@gnu.org]), -lgmp $LIBLTDL)
662 AC_DEFINE_UNQUOTED([HAVE_GUILE], 1, [We have GUILE])
664 AC_DEFINE_UNQUOTED([HAVE_GUILE], 0, [We do NOT have GUILE])
666 AM_CONDITIONAL(HAVE_GUILE, test x$guile = x1)
670 gn_user_home_dir="~/.gnunet"
671 AC_ARG_WITH(user-home-dir,
673 [--with-user-home-dir=DIR],
674 [default user home directory (~/.gnunet)]),
675 [gn_user_home_dir=$withval])
676 AC_SUBST(GN_USER_HOME_DIR, $gn_user_home_dir)
677 gn_daemon_home_dir="/var/lib/gnunet"
678 AC_ARG_WITH(daemon-home-dir,
680 [--with-daemon-home-dir=DIR],
681 [default daemon home directory (/var/lib/gnunet)]),
682 [gn_daemon_home_dir=$withval])
683 AC_SUBST(GN_DAEMON_HOME_DIR, $gn_daemon_home_dir)
684 gn_daemon_config_dir="/etc"
685 AC_ARG_WITH(daemon-config-dir,
687 [--with-daemon-config-dir=DIR],
688 [default daemon config directory (/etc)]),
689 [gn_daemon_config_dir=$withval])
690 AC_SUBST(GN_DAEMON_CONFIG_DIR, $gn_daemon_config_dir)
691 gn_daemon_pidfile="/var/run/gnunetd/pid"
692 AC_ARG_WITH(daemon-pidfile,
694 [--with-daemon-pidfile=FILE],
695 [default daemon pidfile (/var/run/gnunetd/pid)]),
696 [gn_daemon_pidfile=$withval])
697 AC_SUBST(GN_DAEMON_PIDFILE, $gn_daemon_pidfile)
700 GN_LIBINTL="$LTLIBINTL"
701 AC_ARG_ENABLE(framework, [ --enable-framework enable Mac OS X framework build helpers],enable_framework_build=$enableval)
702 AM_CONDITIONAL(WANT_FRAMEWORK, test x$enable_framework_build = xyes)
703 if test x$enable_framework_build = xyes
705 AC_DEFINE([FRAMEWORK_BUILD], 1, [Build a Mac OS X Framework])
706 GN_INTLINCL='-I$(top_srcdir)/src/intlemu'
707 GN_LIBINTL='$(top_builddir)/src/intlemu/libintlemu.la -framework CoreFoundation'
708 AC_LIB_APPENDTOVAR([CPPFLAGS], [$GN_INTLINCL])
711 GN_LIB_LDFLAGS="-export-dynamic -no-undefined"
712 GN_PLUGIN_LDFLAGS="-export-dynamic -avoid-version -module -no-undefined"
713 dnl TODO insert a proper check here
714 AC_CACHE_CHECK([whether -export-symbols-regex works],
715 gn_cv_export_symbols_regex_works,
718 mingw*) gn_cv_export_symbols_regex_works=no;;
719 *) gn_cv_export_symbols_regex_works=yes;;
722 if test "x$gn_cv_export_symbols_regex_works" = "xyes"
724 GN_LIB_LDFLAGS="$GN_LIB_LDFLAGS -export-symbols-regex \"GNUNET_@<:@a-zA-Z0-9_@:>@*\""
725 GN_PLUGIN_LDFLAGS="$GN_PLUGIN_LDFLAGS -export-symbols-regex \"@<:@a-zA-Z0-9_@:>@*\""
727 AC_SUBST(GN_LIB_LDFLAGS)
728 AC_SUBST(GN_PLUGIN_LDFLAGS)
729 AC_SUBST(GN_INTLINCL)
735 AC_SUBST(EXT_LIB_PATH)
740 AC_SUBST(EXT_LIB_PATH)
745 AC_ARG_ENABLE([coverage], AS_HELP_STRING([--enable-coverage],
746 [Compile the library with code coverage support (default is NO)]),
747 [use_gcov=yes], [use_gcov=no])
748 AM_CONDITIONAL([USE_COVERAGE], [test "x$use_gcov" = "xyes"])
752 AC_CONFIG_FILES([ po/Makefile.in m4/Makefile
759 src/include/gnunet_directories.h
761 src/fragmentation/Makefile
763 src/peerinfo/Makefile
764 src/resolver/Makefile
765 src/statistics/Makefile
766 src/template/Makefile
767 src/transport/Makefile
773 # warn user if mysql found but not used due to version
774 if test "$mysqlfail" = "true"
776 AC_MSG_NOTICE([NOTICE: MySQL found, but too old. MySQL support will not be compiled.])
780 if test "x$sqlite" = "x0"
782 AC_MSG_NOTICE([NOTICE: sqlite not found. sqLite support will not be compiled.])
785 if test "x$dialog" != "x1" -a "x$cdialog" != "x1"
787 AC_MSG_NOTICE([NOTICE: curses based gnunet-setup frontends will not be installed.])
790 if test "x$lmhd" != "x1"
792 AC_MSG_NOTICE([NOTICE: libmicrohttpd not found, http transport will not be installed.])
795 AC_MSG_NOTICE([NOTICE: Database support is set to MySQL: $mysql, SQLite: $sqlite])
798 if test "x$guile" = "x0"
800 AC_MSG_NOTICE([WARNING: Guile not found, gnunet-setup will not be installed.])
803 if test "$enable_framework_build" = "yes"
805 AC_MSG_NOTICE([NOTICE: Mac OS X framework build enabled.])
808 AC_MSG_NOTICE([********************************************
809 You can build GNUnet with
811 now. After that, install gnunet-gtk or gnunet-qt and run
812 gnunet-setup -d wizard-gtk
813 (on graphical systems with GTK) or
814 gnunet-setup -d wizard-qt
815 (on graphical systems with QT) or
816 gnunet-setup -d wizard-curses
817 (on text-based systems with curses) in order to make important configuration
818 settings. If neither works for you, you can find a template configuration
819 file in the contrib/ subdirectory. Copy it to /etc/gnunetd.conf and modify it
820 using your favourite text editor.
821 ********************************************])