mod
[oweals/gnunet.git] / configure.ac
1 # This file is part of GNUnet.
2 # (C) 2001--2012 Christian Grothoff (and other contributing authors)
3 #
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.
8 #
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.
13 #
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.
18 #
19 #
20 # Process this file with autoconf to produce a configure script.
21 #
22 #
23 AC_PREREQ(2.61)
24 # Checks for programs.
25 AC_INIT([gnunet], [0.9.3],[bug-gnunet@gnu.org])
26
27 AC_CANONICAL_TARGET
28 AC_CANONICAL_HOST
29 AC_CANONICAL_SYSTEM
30
31 AM_INIT_AUTOMAKE([gnunet], [0.9.3])
32 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
33 AC_CONFIG_HEADERS([gnunet_config.h])
34 AH_TOP([#define _GNU_SOURCE  1])
35
36 AC_PROG_AWK
37 AC_PROG_CC
38 AC_PROG_CPP
39 AC_PROG_CXX
40 AC_PROG_OBJC
41 AC_PROG_INSTALL
42 AC_PROG_LN_S
43 AC_PROG_MAKE_SET
44 AM_PROG_CC_C_O
45 LT_INIT([disable-static dlopen win32-dll])
46 LTDL_INIT
47 AC_SUBST(LTDLINCL)
48 AC_SUBST(LIBLTDL)
49 AC_SUBST(MKDIR_P)
50
51 # large file support
52 AC_SYS_LARGEFILE
53 AC_FUNC_FSEEKO
54
55
56 if test "$enable_shared" = "no"
57 then
58  AC_MSG_ERROR([GNUnet only works with shared libraries. Sorry.])
59 fi
60
61 CFLAGS="-Wall $CFLAGS"
62 # use '-fno-strict-aliasing', but only if the compiler can take it
63 if gcc -fno-strict-aliasing -S -o /dev/null -xc /dev/null >/dev/null 2>&1;
64 then
65  CFLAGS="-fno-strict-aliasing $CFLAGS"
66 fi
67
68 # Use Linux interface name unless the OS has a different preference
69 DEFAULT_INTERFACE="\"eth0\""
70
71 funcstocheck="getnameinfo gethostname gethostbyname gethostbyaddr getaddrinfo"
72
73 # Check system type
74 case "$host_os" in
75 *darwin* | *rhapsody* | *macosx*)
76      AC_DEFINE_UNQUOTED(DARWIN,1,[This is an Apple Darwin system])
77      CPPFLAGS="-D_APPLE_C_SOURCE $CPPFLAGS"
78      CFLAGS="-no-cpp-precomp -fno-common $CFLAGS"
79      AC_MSG_WARN([The VPN application cannot be compiled on your OS])
80      build_target="darwin"
81      DEFAULT_INTERFACE="\"en0\""
82      LIBPREFIX=
83      DLLDIR=lib
84      UNIXONLY="#"
85      ;;
86 linux*)
87      AC_DEFINE_UNQUOTED(LINUX,1,[This is a Linux system])
88      build_target="linux"
89      LIBPREFIX=
90      DLLDIR=lib
91      UNIXONLY="#"
92      AC_PATH_XTRA
93      ;;
94 freebsd*)
95      AC_DEFINE_UNQUOTED(SOMEBSD,1,[This is a BSD system])
96      AC_DEFINE_UNQUOTED(FREEBSD,1,[This is a FreeBSD system])
97      CFLAGS="-D_THREAD_SAFE $CFLAGS"
98      build_target="freebsd"
99      LIBPREFIX=
100      DLLDIR=lib
101      UNIXONLY="#"
102      ;;
103 openbsd*)
104      AC_DEFINE_UNQUOTED(SOMEBSD,1,[This is a BSD system])
105      AC_DEFINE_UNQUOTED(OPENBSD,1,[This is an OpenBSD system])
106      LIBS=`echo $LIBS | sed -e "s/-ldl//"`
107      build_target="openbsd"
108      LIBPREFIX=
109      DLLDIR=lib
110      UNIXONLY="#"
111      ;;
112 netbsd*)
113      AC_DEFINE_UNQUOTED(SOMEBSD,1,[This is a BSD system])
114      AC_DEFINE_UNQUOTED(NETBSD,1,[This is a NetBSD system])
115      LIBPREFIX=
116      DLLDIR=lib
117      UNIXONLY="#"
118      ;;
119 *solaris*)
120      AC_DEFINE_UNQUOTED(SOLARIS,1,[This is a Solaris system])
121      AC_DEFINE_UNQUOTED(_REENTRANT,1,[Need with solaris or errno doesnt work])
122      AC_CHECK_LIB(resolv, res_init)
123      AC_CHECK_LIB(rt, nanosleep)
124      build_target="solaris"
125      LIBPREFIX=
126      DLLDIR=lib
127      UNIXONLY="#"
128      ;;
129 *arm-linux*)
130      AC_DEFINE_UNQUOTED(LINUX,1,[This is a Linux system])
131      CFLAGS="-D_REENTRANT -fPIC -pipe $CFLAGS"
132      build_target="linux"
133      LIBPREFIX=
134      DLLDIR=lib
135      UNIXONLY="#"
136      ;;
137 *cygwin*)
138      AC_DEFINE_UNQUOTED(CYGWIN,1,[This is a Cygwin system])
139      AC_DEFINE_UNQUOTED(WINDOWS,1,[This is a Windows system])
140      AC_CHECK_LIB(intl, gettext)
141      LDFLAGS="$LDFLAGS -no-undefined"
142      CFLAGS="-mms-bitfields $CFLAGS"
143      build_target="cygwin"
144      LIBPREFIX=lib
145      DLLDIR=bin
146      AC_PROG_CXX
147      UNIXONLY=""
148      ;;
149 *mingw*)
150      AC_DEFINE_UNQUOTED(MINGW,1,[This is a MinGW system])
151      AC_DEFINE_UNQUOTED(WINDOWS,1,[This is a Windows system])
152      AC_DEFINE_UNQUOTED(_WIN32,1,[This is a Windows system])
153      AC_CHECK_LIB(intl, gettext)
154      LDFLAGS="$LDFLAGS -Wl,-no-undefined -Wl,--export-all-symbols"
155      LIBS="$LIBS -lws2_32 -lplibc -lgnurx -lole32"
156      CFLAGS="-mms-bitfields $CFLAGS"
157      CPPFLAGS="-D_WIN32_WINNT=0x0501 -DHAVE_STAT64=1 $CPPFLAGS"
158      build_target="mingw"
159      AC_PROG_CXX
160      LIBPREFIX=lib
161      DLLDIR=bin
162      UNIXONLY=""
163      funcstocheck=""
164      ;;
165 gnu*)
166      AC_DEFINE_UNQUOTED(GNU,1,[This is a GNU system])
167      build_target="gnu"
168      UNIXONLY="#"
169      ;;
170 *)
171      AC_MSG_RESULT(Unrecognised OS $host_os)
172      AC_DEFINE_UNQUOTED(OTHEROS,1,[Some strange OS])
173      UNIXONLY=""
174 ;;
175 esac
176 AC_DEFINE_UNQUOTED([GNUNET_DEFAULT_INTERFACE], $DEFAULT_INTERFACE, [This should be the default choice for the name of the first network interface])
177 AC_SUBST(DEFAULT_INTERFACE)
178
179 # Disable TCP-based IPC on systems that support UNIX domain
180 # sockets in default configuratin:
181 AC_SUBST(UNIXONLY)
182
183
184 AC_MSG_CHECKING([for build target])
185 AM_CONDITIONAL(DARWIN,  test "$build_target" = "darwin")
186 AM_CONDITIONAL(CYGWIN,  test "$build_target" = "cygwin")
187 AM_CONDITIONAL(MINGW,   test "$build_target" = "mingw")
188 AM_CONDITIONAL(SOLARIS, test "$build_target" = "solaris")
189 AM_CONDITIONAL(XFREEBSD, test "$build_target" = "freebsd")
190 AM_CONDITIONAL(OPENBSD, test "$build_target" = "openbsd")
191 AM_CONDITIONAL(LINUX, test "$build_target" = "linux")
192 AM_CONDITIONAL(GNU, test "$build_target" = "gnu")
193
194 AC_MSG_RESULT([$build_target])
195 AC_SUBST(build_target)
196 AM_CONDITIONAL([am__fastdepOBJC], false)
197 AC_UNALIGNED_64_ACCESS
198
199 # some other checks for standard libs
200 AC_SEARCH_LIBS([gethostbyname], [nsl ws2_32])
201 AC_CHECK_LIB(socket, socket)
202 AC_CHECK_LIB(m, log)
203 AC_CHECK_LIB(c, getloadavg, AC_DEFINE(HAVE_GETLOADAVG,1,[getloadavg supported]))
204
205 # 'save' libs; only those libs found so far will be
206 # linked against _everywhere_.  For the others, we
207 # will be more selective!
208 SAVE_LIBS=$LIBS
209
210 # libgnurx (regex library for W32)
211 gnurx=0
212 AC_CHECK_LIB(gnurx, regexec, gnurx=1)
213 if test "x$gnurx" = "x0" -a "x$build_target" = "xmingw"
214 then
215   AC_MSG_ERROR([on W32 GNUnet needs libgnurx])
216 fi
217
218 # libgcrypt
219 gcrypt=0
220 AM_PATH_LIBGCRYPT(1.2.0, gcrypt=1)
221 AC_CHECK_DECLS([gcry_mpi_lshift], [], [], [[#include <gcrypt.h>]])
222
223 if test $gcrypt = 0
224 then
225   AC_MSG_ERROR([GNUnet needs libgcrypt])
226 fi
227
228 # Adam shostack suggests the following for Windows:
229 # -D_FORTIFY_SOURCE=2 -fstack-protector-all
230 AC_ARG_ENABLE(gcc-hardening,
231    AS_HELP_STRING(--enable-gcc-hardening, enable compiler security checks),
232 [if test x$enableval = xyes; then
233     CFLAGS="$CFLAGS -D_FORTIFY_SOURCE=2 -fstack-protector-all"
234     CFLAGS="$CFLAGS -fwrapv -fPIE -Wstack-protector"
235     CFLAGS="$CFLAGS --param ssp-buffer-size=1"
236     LDFLAGS="$LDFLAGS -pie"
237 fi])
238
239
240 # Linker hardening options
241 # Currently these options are ELF specific - you can't use this with MacOSX
242 AC_ARG_ENABLE(linker-hardening,
243   AS_HELP_STRING(--enable-linker-hardening, enable linker security fixups),
244 [if test x$enableval = xyes; then
245    LDFLAGS="$LDFLAGS -z relro -z now"
246 fi])
247
248
249 extra_logging=GNUNET_NO
250 AC_ARG_ENABLE([logging],
251    AS_HELP_STRING([--enable-logging@<:@=value@:>@],[Enable logging calls. Possible values: yes,no,verbose,veryverbose ('yes' is the default)]),
252    [AS_IF([test "x$enableval" = "xyes"], [],
253           [test "x$enableval" = "xno"], [AC_DEFINE([GNUNET_CULL_LOGGING],[],[Define to cull all logging calls])],
254           [test "x$enableval" = "xverbose"], [extra_logging=GNUNET_YES]
255           [test "x$enableval" = "xveryverbose"], [extra_logging=\(GNUNET_YES+1\)])
256    ], [])
257 AC_DEFINE_UNQUOTED([GNUNET_EXTRA_LOGGING],[$extra_logging],[1 if extra logging is enabled, 2 for very verbose extra logging, 0 otherwise])
258
259 if test $build = $target
260 then
261 AC_MSG_CHECKING([for working HMAC])
262 AC_LANG_PUSH(C)
263 LIBS="$LIBS $LIBGCRYPT_LIBS"
264 CFLAGS="$CFLAGS $LIBGCRYPT_CFLAGS"
265 AC_RUN_IFELSE(
266   [AC_LANG_PROGRAM([#include <gcrypt.h> 
267         #include <stdio.h>], [[
268         gcry_md_hd_t mac;
269       
270         unsigned char data[] = { 0xbf, 0x16, 0x6e, 0x46, 0x3a, 0x6c, 0xf3, 0x93, 0xa7, 0x72,
271             0x11, 0xa1, 0xdc, 0x0b, 0x07, 0xdb, 0x1a, 0x5e, 0xd9, 0xb9, 0x81, 0xbe,
272             0xea, 0xe4, 0x31, 0x5f, 0x24, 0xff, 0xfe, 0x50, 0x8a, 0xde };
273         unsigned char key[] = { 0xfc, 0x62, 0x76, 0x35 };
274         unsigned char result[] = {0xa2, 0xb, 0x1, 0xd9, 0xc0, 0x8b, 0x5a, 0x12, 0x80,
275             0xd5, 0x50, 0x12, 0x8e, 0xd0, 0x5b, 0xb6, 0x5c, 0x87, 0x24, 0xe2, 0xd0,
276             0xd2, 0xaf, 0x63, 0xae, 0xd1, 0xd6, 0x64, 0x14, 0xe3, 0x6e, 0x61, 0x5b,
277             0xd, 0xba, 0x17, 0x7d, 0xd3, 0x10, 0xb1, 0x37, 0x41, 0x91, 0x7d, 0xeb,
278             0x1, 0x4d, 0x71, 0xe8, 0x59, 0x71, 0x42, 0x8e, 0xd6, 0xf3, 0x29, 0x3b,
279             0x90, 0xf2, 0xd1, 0xaf, 0x65, 0x1e, 0xb3};
280       
281         if (!gcry_check_version (GCRYPT_VERSION))
282         {
283           fprintf (stderr, "Version mismatch %s <-> %s \n", gcry_check_version (NULL), GCRYPT_VERSION);
284           return 1;
285         }
286   
287         gcry_control (GCRYCTL_DISABLE_SECMEM, 0);
288         gcry_control (GCRYCTL_INITIALIZATION_FINISHED, 0);
289   
290         if (gcry_md_open(&mac, GCRY_MD_SHA512, GCRY_MD_FLAG_HMAC) != GPG_ERR_NO_ERROR)
291         {
292           fprintf (stderr, "gcry_md_open error\n");
293           return 2;
294         }
295   
296         gcry_md_setkey (mac, key, sizeof (key));
297         gcry_md_write (mac, data, sizeof (data));
298   
299         if (memcmp(gcry_md_read (mac, 0), result, gcry_md_get_algo_dlen (gcry_md_get_algo (mac))) != 0)
300         {
301           fprintf (stderr, "memcmp error\n");
302           return 3;
303         }
304   
305         gcry_md_close (mac);
306   
307         return 0;
308     ]])],
309   [AC_MSG_RESULT([yes])],
310   [
311    RESULT=$?
312    if test $RESULT = 3
313    then
314      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.])
315    fi
316    if test $RESULT = 2
317    then
318      AC_MSG_FAILURE([HMAC test failed])
319    fi
320    if test $RESULT = 1
321    then
322      AC_MSG_FAILURE([libgcrypt header version does not match library version])
323    fi
324   ])
325 AC_LANG_POP(C)
326 fi      # $build = $target
327
328 # libcurl
329 LIBCURL_CHECK_CONFIG(,7.21.3,curl=1,curl=0)
330 if test "$curl" = 1
331 then
332         AM_CONDITIONAL(HAVE_LIBCURL, true)
333         AC_DEFINE([HAVE_LIBCURL],[1],[Have libcurl])
334 else
335         AM_CONDITIONAL(HAVE_LIBCURL, false)
336 fi
337 # restore LIBS
338 LIBS=$SAVE_LIBS
339
340
341 AC_CHECK_HEADERS([glpk.h],[glpk=true],[gplk=false])
342 AC_CHECK_LIB([glpk],[glp_create_prob],,[gplk=false])
343 # GLPK must support atm MLP presolving, version >= 4.32
344 AC_CHECK_MEMBERS(glp_iocp.presolve,,[gplk=false],[[#include <glpk.h>]])
345 if test x$gplk = xfalse
346 then
347         AM_CONDITIONAL(HAVE_LIBGLPK, false)
348         AC_MSG_WARN([GNUnet requires GLPK  >= 4.32])
349 else
350         AM_CONDITIONAL(HAVE_LIBGLPK, true)
351         AC_DEFINE([HAVE_LIBGLPK],[1],[Have GLPK])
352 fi
353
354
355
356 AC_CHECK_HEADERS([nss.h],[nss=true],[nss=false])
357 if test x$nss = xfalse
358 then
359         AM_CONDITIONAL(HAVE_GLIBCNSS, false)
360         AC_MSG_WARN([No GNU libc nss header, will not build NSS plugin])
361 else
362         AM_CONDITIONAL(HAVE_GLIBCNSS, true)
363 fi
364
365
366
367 # test for kvm and kstat (for CPU stats under BSD/Solaris)
368 AC_CHECK_LIB([kvm],[kvm_open])
369 AC_CHECK_LIB([kstat],[kstat_open])
370
371 # test for libextractor
372 extractor=0
373 AC_MSG_CHECKING(for libextractor)
374 AC_ARG_WITH(extractor,
375    [  --with-extractor=PFX    base of libextractor installation],
376    [AC_MSG_RESULT([$with_extractor])
377     case $with_extractor in
378       no)
379         ;;
380       yes)
381         AC_CHECK_HEADERS(extractor.h,
382           AC_CHECK_LIB([extractor], [EXTRACTOR_plugin_add_defaults],
383             extractor=1))
384         ;;
385       *)
386         LDFLAGS="-L$with_extractor/lib $LDFLAGS"
387         CPPFLAGS="-I$with_extractor/include $CPPFLAGS"
388         AC_CHECK_HEADERS(extractor.h,
389           AC_CHECK_LIB([extractor], [EXTRACTOR_plugin_add_defaults],
390             EXT_LIB_PATH="-L$with_extractor/lib $EXT_LIB_PATH"
391             extractor=1))
392         ;;
393     esac
394    ],
395    [AC_MSG_RESULT([--with-extractor not specified])
396     AC_CHECK_HEADERS(extractor.h,
397      AC_CHECK_LIB([extractor], [EXTRACTOR_plugin_add_defaults],
398       extractor=1))])
399 if test "$extractor" != 1
400 then
401  AC_MSG_ERROR([GNUnet requires libextractor])
402 fi
403 # restore LIBS
404 LIBS=$SAVE_LIBS
405
406 # test for libunistring
407 gl_LIBUNISTRING
408 if test $HAVE_LIBUNISTRING != yes; then
409  AC_MSG_ERROR([GNUnet requires libunistring])
410 fi
411 if test $gl_libunistring_hexversion -le 2305; then
412  AC_MSG_ERROR([GNUnet requires libunistring >= 0.9.1.1])
413 fi
414 # restore LIBS
415 LIBS=$SAVE_LIBS
416
417
418
419 # Checks for standard header files.
420 AC_HEADER_DIRENT
421 AC_HEADER_STDC
422
423 # Check for headers that are ALWAYS required
424 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]))
425
426 # Checks for headers that are only required on some systems or opional (and where we do NOT abort if they are not there)
427 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 endian.h sys/endian.h execinfo.h])
428
429 SAVE_LDFLAGS=$LDFLAGS
430 SAVE_CPPFLAGS=$CPPFLAGS
431
432 # test for sqlite
433 sqlite=false
434 AC_MSG_CHECKING(for SQLite)
435 AC_ARG_WITH(sqlite,
436   [  --with-sqlite=PFX       base of SQLite installation],
437   [AC_MSG_RESULT("$with_sqlite")
438    case $with_sqlite in
439    no)
440      ;;
441    yes)
442     AC_CHECK_HEADERS(sqlite3.h,
443      sqlite=true)
444      ;;
445    *)
446     LDFLAGS="-L$with_sqlite/lib $LDFLAGS"
447     CPPFLAGS="-I$with_sqlite/include $CPPFLAGS"
448     AC_CHECK_HEADERS(sqlite3.h,
449      EXT_LIB_PATH="-L$with_sqlite/lib $EXT_LIB_PATH"
450      SQLITE_LDFLAGS="-L$with_sqlite/lib"
451      SQLITE_CPPFLAGS="-I$with_sqlite/include"
452      sqlite=true)
453     LDFLAGS=$SAVE_LDFLAGS
454     CPPFLAGS=$SAVE_CPPFLAGS
455     ;;
456    esac
457   ],
458   [AC_MSG_RESULT([--with-sqlite not specified])
459     AC_CHECK_HEADERS(sqlite3.h, sqlite=true)])
460 AM_CONDITIONAL(HAVE_SQLITE, test x$sqlite = xtrue)
461 AC_SUBST(SQLITE_CPPFLAGS)
462 AC_SUBST(SQLITE_LDFLAGS)
463
464 # test for postgres
465 postgres=false
466 AC_MSG_CHECKING(for postgres)
467 AC_ARG_WITH(postgres,
468   [  --with-postgres=PFX       base of postgres installation],
469   [AC_MSG_RESULT("$with_postgres")
470    case $with_postgres in
471    no)
472      ;;
473    yes)
474     AC_CHECK_HEADERS(postgresql/libpq-fe.h,
475      postgres=true)
476      ;;
477    *)
478     LDFLAGS="-L$with_postgres/lib $LDFLAGS"
479     CPPFLAGS="-I$with_postgres/include $CPPFLAGS"
480     AC_CHECK_HEADERS(postgresql/libpq-fe.h,
481      EXT_LIB_PATH="-L$with_postgres/lib $EXT_LIB_PATH"
482      POSTGRES_LDFLAGS="-L$with_postgres/lib"
483      POSTGRES_CPPFLAGS="-I$with_postgres/include"
484      postgres=true)
485     LDFLAGS=$SAVE_LDFLAGS
486     CPPFLAGS=$SAVE_CPPFLAGS
487     ;;
488    esac
489   ],
490   [AC_MSG_RESULT([--with-postgres not specified])
491     AC_CHECK_HEADERS(postgresql/libpq-fe.h, postgres=true)])
492 AM_CONDITIONAL(HAVE_POSTGRES, test x$postgres = xtrue)
493 AC_SUBST(POSTGRES_CPPFLAGS)
494 AC_SUBST(POSTGRES_LDFLAGS)
495
496 # test for libz (maybe required for linking mysql)
497 zlib=1
498 AC_CHECK_LIB(z, compress,,zlib=0)
499 AM_CONDITIONAL(HAVE_ZLIB, test x$zlib = x1)
500 if test "$zlib" != 1
501 then
502  AC_MSG_ERROR([GNUnet requires zlib])
503 fi
504
505 # mysql & windows
506 AC_CHECK_TYPES([sigset_t, off_t], [], [], [#include <sys/types.h>])
507 AC_CHECK_TYPES([size_t], [], [], [#include <stdio.h>])
508
509 if test "$build_target" = "mingw"
510 then
511   CYGWIN_MYSQL_MAGIC="#include <mysql/my_global.h>"
512 fi
513
514 # test for mysql
515 mysql=false
516 mysqlfail=false
517 SAVE_LDFLAGS=$LDFLAGS
518 SAVE_CPPFLAGS=$CPPFLAGS
519 AC_MSG_CHECKING(for mysql)
520 AC_ARG_WITH(mysql,
521   [  --with-mysql=PFX        base of MySQL installation],
522   [AC_MSG_RESULT("$with_mysql")
523    if test "$with_mysql" != "no"
524    then
525     if test "$with_mysql" != "yes"
526     then
527       LDFLAGS="-L$with_mysql/lib -L$with_mysql/lib/mysql $LDFLAGS $ZLIBS"
528       CPPFLAGS="-I$with_mysql/include $CPPFLAGS"
529     fi
530     AC_CHECK_HEADERS(mysql/mysql.h,
531      AC_CHECK_LIB(mysqlclient, mysql_init,
532       MYSQL_LDFLAGS="-L$with_mysql/lib -L$with_mysql/lib/mysql"
533       MYSQL_CPPFLAGS="-I$with_mysql/include"
534
535       mysql=true), [], [$CYGWIN_MYSQL_MAGIC])
536    fi
537   ],
538   [AC_MSG_RESULT([--with-mysql not specified])
539    LDFLAGS="-L/usr/lib/mysql $LDFLAGS $ZLIBS"
540    AC_CHECK_LIB(mysqlclient, mysql_init,
541     [AC_CHECK_HEADERS(mysql/mysql.h,
542       MYSQL_LDFLAGS="-L/usr/lib/mysql"
543       mysql=true
544
545      , [], [$CYGWIN_MYSQL_MAGIC])])
546   ])
547
548 AC_SUBST(MYSQL_LDFLAGS)
549 AC_SUBST(MYSQL_CPPFLAGS)
550
551 # additional version check for mysql
552 AC_ARG_ENABLE(mysql-version-check, [  --disable-mysql-version-check  do not check MySQL version],, enable_mysql_version_check=yes)
553 if test "$mysql" = "true" -a "x$enable_mysql_version_check" = "xyes"
554 then
555   AC_MSG_CHECKING(mysql version)
556   AC_RUN_IFELSE([AC_LANG_PROGRAM(
557     [[$CYGWIN_MYSQL_MAGIC
558       #include <mysql/mysql.h>]],
559     [[if (MYSQL_VERSION_ID < 40100)
560         return(-1);
561       else
562         return(0);
563     ]])
564     ],mysql=true,mysql=false)
565   if test "$mysql" = "false"
566   then
567     mysqlfail=true
568     AC_MSG_RESULT([fail, >= 4.1 required])
569   else
570     AC_MSG_RESULT(ok)
571   fi
572 fi
573 AM_CONDITIONAL(HAVE_MYSQL, test x$mysql = xtrue)
574 AM_CONDITIONAL(HAVE_MYSQLE, test "0" = "1")
575 # restore LIBS
576 LIBS=$SAVE_LIBS
577 LDFLAGS=$SAVE_LDFLAGS
578 CPPFLAGS=$SAVE_CPPFLAGS
579
580 if test "$sqlite" = 0 -a "$mysql" = 0
581 then
582  AC_MSG_ERROR([GNUnet requires SQLite or MySQL])
583 fi
584
585 # libmicrohttpd
586 lmhd=0
587 AC_MSG_CHECKING([for libmicrohttpd])
588 AC_ARG_WITH(microhttpd,
589    [  --with-microhttpd=PFX   base of libmicrohttpd installation],
590    [AC_MSG_RESULT([$with_microhttpd])
591     case $with_microhttpd in
592       no)
593         ;;
594       yes)
595         AC_CHECK_HEADERS([microhttpd.h],
596           AC_CHECK_DECL(MHD_OPTION_PER_IP_CONNECTION_LIMIT,
597             AC_CHECK_LIB([microhttpd], [MHD_start_daemon],
598               [AC_MSG_CHECKING([for libmicrohttpd >= 0.9.18])
599               AC_RUN_IFELSE([
600                 #include "$srcdir/src/include/platform.h"
601                 #include <microhttpd.h>
602                 int main () { return MHD_VERSION >= 0x0091200 ? 0 : 1; }
603                ], [
604                AC_MSG_RESULT(ok)
605                lmhd=1],[AC_MSG_RESULT(failed)],lmhd=1)]),
606             [],[#include "$srcdir/src/include/platform.h"
607                 #include <microhttpd.h>]),,
608             [#include "$srcdir/src/include/platform.h"])
609         ;;
610       *)
611         LDFLAGS="-L$with_microhttpd/lib $LDFLAGS"
612         CPPFLAGS="-I$with_microhttpd/include $CPPFLAGS"
613         AC_CHECK_HEADERS(microhttpd.h,
614           AC_CHECK_DECL(MHD_OPTION_PER_IP_CONNECTION_LIMIT,
615             AC_CHECK_LIB([microhttpd], [MHD_start_daemon],
616               EXT_LIB_PATH="-L$with_microhttpd/lib $EXT_LIB_PATH"
617               [AC_MSG_CHECKING([for libmicrohttpd >= 0.9.18])
618                AC_RUN_IFELSE([
619                 #include "$srcdir/src/include/platform.h"
620                 #include <microhttpd.h>
621                 int main () { return MHD_VERSION >= 0x0091200 ? 0 : 1; }
622                ], [
623                AC_MSG_RESULT(ok)
624                lmhd=1],[AC_MSG_RESULT(failed)],lmhd=1)]),
625             [],[#include "$srcdir/src/include/platform.h"
626                 #include <microhttpd.h>]),,
627             [#include "$srcdir/src/include/platform.h"])
628         ;;
629     esac
630    ],
631    [AC_MSG_RESULT([--with-microhttpd not specified])
632     AC_CHECK_HEADERS([microhttpd.h],
633       AC_CHECK_DECL(MHD_OPTION_PER_IP_CONNECTION_LIMIT,
634         AC_CHECK_LIB([microhttpd], [MHD_start_daemon],
635           [AC_MSG_CHECKING([for libmicrohttpd >= 0.9.18])
636               AC_RUN_IFELSE([
637                 #include "$srcdir/src/include/platform.h"
638                 #include <microhttpd.h>
639                 int main () { return MHD_VERSION >= 0x0091200 ? 0 : 1; }
640                ], [
641                AC_MSG_RESULT(ok)
642                lmhd=1],[AC_MSG_RESULT(failed)],lmhd=1)]),
643         [],[#include "$srcdir/src/include/platform.h"
644             #include <microhttpd.h>]),,
645        [#include "$srcdir/src/include/platform.h"])])
646 AM_CONDITIONAL(HAVE_MHD, test x$lmhd = x1)
647 AC_DEFINE_UNQUOTED([HAVE_MHD], $lmhd, [We have libmicrohttpd])
648
649
650 # restore LIBS
651 LIBS=$SAVE_LIBS
652
653 # check for python & pexpect (used for some testcases only)
654 AM_PATH_PYTHON([2.6],, [:])
655 AM_CONDITIONAL([HAVE_PYTHON], [test "$PYTHON" != :])
656
657 # check for gettext
658 AM_GNU_GETTEXT([external])
659 AM_GNU_GETTEXT_VERSION([0.16.1])
660
661 # check for iconv
662 AM_ICONV
663
664 # Checks for standard typedefs, structures, and compiler characteristics.
665 AC_TYPE_PID_T
666 AC_TYPE_SIZE_T
667 AC_TYPE_MODE_T
668 AC_HEADER_TIME
669 AC_HEADER_STAT
670 AC_HEADER_STDBOOL
671 AC_STRUCT_TM
672
673 AC_CHECK_MEMBER([struct sockaddr_in.sin_len],
674    [ AC_DEFINE(HAVE_SOCKADDR_IN_SIN_LEN, 1, [Do we have sockaddr_in.sin_len?])
675    ],
676    [],
677    [
678       #include <sys/types.h>
679       #include <sys/socket.h>
680       #include <netinet/in.h>
681    ])
682
683
684
685 # Checks for library functions.
686 AC_FUNC_CLOSEDIR_VOID
687 AC_FUNC_FORK
688 AC_PROG_GCC_TRADITIONAL
689 AC_FUNC_MEMCMP
690 AC_FUNC_SELECT_ARGTYPES
691 AC_FUNC_CHOWN
692
693 AC_TYPE_SIGNAL
694 AC_FUNC_STAT
695 AC_FUNC_STRFTIME
696 AC_FUNC_VPRINTF
697 AC_HEADER_SYS_WAIT
698 AC_TYPE_OFF_T
699 AC_TYPE_UID_T
700 AC_CHECK_FUNCS([atoll stat64 strnlen mremap setrlimit sysconf initgroups strndup gethostbyname2 getpeerucred getpeereid setresuid $funcstocheck getifaddrs freeifaddrs getresgid mallinfo])
701
702 # restore LIBS
703 LIBS=$SAVE_LIBS
704
705 gn_user_home_dir="~/.gnunet"
706 AC_ARG_WITH(user-home-dir,
707         AC_HELP_STRING(
708                 [--with-user-home-dir=DIR],
709                 [default user home directory (~/.gnunet)]),
710         [gn_user_home_dir=$withval])
711 AC_SUBST(GN_USER_HOME_DIR, $gn_user_home_dir)
712 gn_daemon_home_dir="/var/lib/gnunet"
713 AC_ARG_WITH(daemon-home-dir,
714         AC_HELP_STRING(
715                 [--with-daemon-home-dir=DIR],
716                 [default daemon home directory (/var/lib/gnunet)]),
717         [gn_daemon_home_dir=$withval])
718 AC_SUBST(GN_DAEMON_HOME_DIR, $gn_daemon_home_dir)
719 gn_daemon_config_dir="/etc"
720 AC_ARG_WITH(daemon-config-dir,
721         AC_HELP_STRING(
722                 [--with-daemon-config-dir=DIR],
723                 [default daemon config directory (/etc)]),
724         [gn_daemon_config_dir=$withval])
725 AC_SUBST(GN_DAEMON_CONFIG_DIR, $gn_daemon_config_dir)
726
727 GN_INTLINCL=""
728 GN_LIBINTL="$LTLIBINTL"
729 AC_ARG_ENABLE(framework, [  --enable-framework      enable Mac OS X framework build helpers],enable_framework_build=$enableval)
730 AM_CONDITIONAL(WANT_FRAMEWORK, test x$enable_framework_build = xyes)
731 if test x$enable_framework_build = xyes
732 then
733   AC_DEFINE([FRAMEWORK_BUILD], 1, [Build a Mac OS X Framework])
734   GN_INTLINCL='-I$(top_srcdir)/src/intlemu'
735   GN_LIBINTL='$(top_builddir)/src/intlemu/libintlemu.la -framework CoreFoundation'
736   AC_LIB_APPENDTOVAR([CPPFLAGS], [$GN_INTLINCL]) 
737 fi
738
739 GN_LIB_LDFLAGS="-export-dynamic -no-undefined"
740 GN_PLUGIN_LDFLAGS="-export-dynamic -avoid-version -module -no-undefined"
741
742 AC_SUBST(GN_LIB_LDFLAGS)
743 AC_SUBST(GN_PLUGIN_LDFLAGS)
744 AC_SUBST(GN_INTLINCL)
745 AC_SUBST(GN_LIBINTL)
746
747 AC_SUBST(CPPFLAGS)
748 AC_SUBST(LIBS)
749 AC_SUBST(LDFLAGS)
750 AC_SUBST(EXT_LIB_PATH)
751 AC_SUBST(EXT_LIBS)
752
753 AC_SUBST(LIBPREFIX)
754 AC_SUBST(DLLDIR)
755 AC_SUBST(EXT_LIB_PATH)
756
757
758 # test for sudo
759 AC_MSG_CHECKING(for sudo)
760 AC_ARG_WITH(sudo,
761   [  --with-sudo=PATH       path to sudo binary (or just yes)],
762   [AC_MSG_RESULT("$with_sudo")
763    case $with_sudo in
764    no)
765      SUDO_BINARY=
766      ;;
767    yes)
768      SUDO_BINARY=sudo
769      ;;
770    *)
771      SUDO_BINARY=$with_sudo
772     ;;
773    esac
774   ],
775   [AC_MSG_RESULT([no])])
776 AC_SUBST(SUDO_BINARY)
777 AM_CONDITIONAL([HAVE_SUDO], [test "x$SUDO_BINARY" != "x" -o -w /])
778
779 # test for gnunetdns group name
780 GNUNETDNS_GROUP=gnunetdns
781 AC_MSG_CHECKING(for gnunetdns group name)
782 AC_ARG_WITH(gnunetdns,
783   [  --with-gnunetdns=GRPNAME       name for gnunetdns group],
784   [AC_MSG_RESULT("$with_gnunetdns")
785    case $with_gnunetdns in
786    no)
787      GNUNETDNS_GROUP=gnunet
788      ;;
789    yes)
790      GNUNETDNS_GROUP=gnunetdns
791      ;;
792    *)
793      GNUNETDNS_GROUP=$with_gnunetdns
794     ;;
795    esac
796   ],
797   [AC_MSG_RESULT([gnunetdns])])
798 AC_SUBST(GNUNETDNS_GROUP)
799
800
801
802 # gnutls
803 gnutls=0
804 AC_MSG_CHECKING(for gnutls)
805 AC_ARG_WITH(gnutls,
806    [  --with-gnutls=PFX   base of gnutls installation],
807    [AC_MSG_RESULT([$with_gnutls])
808     case $with_gnutls in
809       no)
810         ;;
811       yes)
812         AC_CHECK_HEADERS([gnutls/abstract.h],
813             AC_CHECK_LIB([gnutls], [gnutls_priority_set],
814              gnutls=true))
815         ;;
816       *)
817         LDFLAGS="-L$with_gnutls/lib $LDFLAGS"
818         CPPFLAGS="-I$with_gnutls/include $CPPFLAGS"
819         AC_CHECK_HEADERS([gnutls/abstract.h],
820             AC_CHECK_LIB([gnutls], [gnutls_priority_set],
821               EXT_LIB_PATH="-L$with_gnutls/lib $EXT_LIB_PATH"
822               gnutls=true))
823         ;;
824     esac
825    ],
826    [AC_MSG_RESULT([--with-gnutls not specified])
827     AC_CHECK_HEADERS([gnutls/abstract.h],
828         AC_CHECK_LIB([gnutls], [gnutls_priority_set],
829           gnutls=true))])
830 AM_CONDITIONAL(HAVE_GNUTLS, test x$gnutls = xtrue)
831 AC_DEFINE_UNQUOTED([HAVE_GNUTLS], $gnutls, [We have gnutls])
832
833
834
835 # should 'make check' run tests?
836 AC_MSG_CHECKING(whether to run tests)
837 AC_ARG_ENABLE([testruns],
838    [AS_HELP_STRING([--disable-testruns], [disable running tests on make check (default is YES)])],
839    [enable_tests_run=${enableval}],
840    [enable_tests_run=yes])
841 AC_MSG_RESULT($enable_test_run)
842 AM_CONDITIONAL([ENABLE_TEST_RUN], [test "x$enable_tests_run" = "xyes"])
843
844
845 # should monkey be used when running (certain) services?
846 AC_MSG_CHECKING(whether to run with monkey)
847 AC_ARG_ENABLE([monkey],
848    [AS_HELP_STRING([--enable-monkey], [enable running with monkey])],
849    [enable_monkey=${enableval}],
850    [enable_monkey=no])
851 AC_MSG_RESULT($enable_monkey)
852 AM_CONDITIONAL([ENABLE_MONKEY], [test "x$enable_monkey" = "xyes"])
853 if test "x$enable_monkey" = "xyes"
854 then
855   MONKEYPREFIX="monkey"
856 else
857   MONKEYPREFIX=""
858 fi
859 AC_SUBST(MONKEYPREFIX)
860
861
862 # should expensive tests be run?
863 AC_MSG_CHECKING(whether to run expensive tests)
864 AC_ARG_ENABLE([expensivetests],
865    [AS_HELP_STRING([--enable-expensivetests], [enable running expensive testcases])],
866    [enable_expensive=${enableval}],
867    [enable_expensive=no])
868 AC_MSG_RESULT($enable_expensive)
869 AM_CONDITIONAL([HAVE_EXPENSIVE_TESTS], [test "x$enable_expensive" = "xyes"])
870
871 # should ports be open for Java services?
872 AC_MSG_CHECKING(whether to enable ports for gnunet-java)
873 AC_ARG_ENABLE([javaports],
874    [AS_HELP_STRING([--enable-javaports], [use non-zero ports for services with Java bindings (default is NO)])],
875    [enable_java_ports=${enableval}],
876    [enable_java_ports=no])
877 AC_MSG_RESULT($enable_java_ports)
878 if test "x$enable_java_ports" = "xyes"
879 then
880   JAVAPORT=""
881 else
882   JAVAPORT="$UNIXONLY"
883 fi
884 AC_SUBST(JAVAPORT)
885
886 # should benchmarks be run?
887 AC_MSG_CHECKING(whether to run benchmarks during make check)
888 AC_ARG_ENABLE([benchmarks],
889    [AS_HELP_STRING([--enable-benchmarks], [enable running benchmarks during make check])],
890    [enable_benchmarks=${enableval}],
891    [enable_benchmarks=no])
892 AC_MSG_RESULT($enable_benchmarks)
893 AM_CONDITIONAL([HAVE_BENCHMARKS], [test "x$enable_benchmarks" = "xyes"])
894
895 # should experimental code be compiled (code that may not yet compile)?
896 AC_MSG_CHECKING(whether to compile experimental code)
897 AC_ARG_ENABLE([experimental],
898    [AS_HELP_STRING([--enable-experimental], [enable compiling experimental code])],
899    [enable_experimental=${enableval}],
900    [enable_experimental=no])
901 AC_MSG_RESULT($enable_experimental)
902 AM_CONDITIONAL([HAVE_EXPERIMENTAL], [test "x$enable_experimental" = "xyes"])
903
904 # should code be enabled that works around missing OS functionality on Windows?
905 # used for test cases
906 if test $build_target = "mingw"
907 then
908         workarounds=1
909
910 AC_LINK_IFELSE(
911  [AC_LANG_PROGRAM(
912   [#include <ws2tcpip.h>
913   ],[
914   int s = socket (0, 0, 0);])
915  ],[
916   AC_DEFINE_UNQUOTED([HAVE_SOCKET],1,[Define this if socket() is available])
917  ],[
918   AC_DEFINE_UNQUOTED([HAVE_SOCKET],0,[Define this if socket() is available])
919  ])
920
921 AC_LINK_IFELSE(
922  [AC_LANG_PROGRAM(
923   [#include <ws2tcpip.h>
924   ],[
925   int s = select (0, NULL, NULL, NULL, NULL);])
926  ],[
927   AC_DEFINE_UNQUOTED([HAVE_SELECT],1,[Define this if select() is available])
928  ],[
929   AC_DEFINE_UNQUOTED([HAVE_SELECT],0,[Define this if select() is available])
930  ])
931
932 AC_LINK_IFELSE(
933  [AC_LANG_PROGRAM(
934   [#include <ws2tcpip.h>
935   ],[
936   struct in_addr i;
937   char *s = inet_ntoa (i);])
938  ],[
939   AC_DEFINE_UNQUOTED([HAVE_INET_NTOA],1,[Define this if inet_ntoa() is available])
940  ],[
941   AC_DEFINE_UNQUOTED([HAVE_INET_NTOA],0,[Define this if inet_ntoa() is available])
942  ])
943
944 AC_LINK_IFELSE(
945  [AC_LANG_PROGRAM(
946   [#include <ws2tcpip.h>
947   ],[
948   int s = getnameinfo (NULL, 0, NULL, 0, NULL, 0, 0);])
949  ],[
950   AC_DEFINE_UNQUOTED([HAVE_GETNAMEINFO],1,[Define this if getnameinfo() is available])
951  ],[
952   AC_DEFINE_UNQUOTED([HAVE_GETNAMEINFO],0,[Define this if getnameinfo() is available])
953  ])
954
955 AC_LINK_IFELSE(
956  [AC_LANG_PROGRAM(
957   [#include <ws2tcpip.h>
958   ],[
959   int s = gethostname (NULL, 0);])
960  ],[
961   AC_DEFINE_UNQUOTED([HAVE_GETHOSTNAME],1,[Define this if gethostname() is available])
962  ],[
963   AC_DEFINE_UNQUOTED([HAVE_GETHOSTNAME],0,[Define this if gethostname() is available])
964  ])
965
966 AC_LINK_IFELSE(
967  [AC_LANG_PROGRAM(
968   [#include <ws2tcpip.h>
969   ],[
970   void *s = gethostbyname (NULL);])
971  ],[
972   AC_DEFINE_UNQUOTED([HAVE_GETHOSTBYNAME],1,[Define this if gethostbyname() is available])
973  ],[
974   AC_DEFINE_UNQUOTED([HAVE_GETHOSTBYNAME],0,[Define this if gethostbyname() is available])
975  ])
976
977 AC_LINK_IFELSE(
978  [AC_LANG_PROGRAM(
979   [#include <ws2tcpip.h>
980   ],[
981   void *s = gethostbyaddr (NULL, 0, 0);])
982  ],[
983   AC_DEFINE_UNQUOTED([HAVE_GETHOSTBYADDR],1,[Define this if gethostbyaddr() is available])
984  ],[
985   AC_DEFINE_UNQUOTED([HAVE_GETHOSTBYADDR],0,[Define this if gethostbyaddr() is available])
986  ])
987
988 AC_LINK_IFELSE(
989  [AC_LANG_PROGRAM(
990   [#include <ws2tcpip.h>
991   ],[
992   int s = getaddrinfo (NULL, NULL, NULL, NULL);])
993  ],[
994   AC_DEFINE_UNQUOTED([HAVE_GETADDRINFO],1,[Define this if getaddrinfo() is available])
995  ],[
996   AC_DEFINE_UNQUOTED([HAVE_GETADDRINFO],1,[Define this if getaddrinfo() is available])
997  ])
998
999 else
1000   AC_MSG_CHECKING(whether to enable windows workarounds)
1001   AC_ARG_ENABLE([windows_workarounds], 
1002      [AS_HELP_STRING([--enable-windows_workarounds], [enable workarounds used on Windows (only useful for test cases)])],
1003      [enable_workarounds=${enableval}],
1004      [enable_workarounds=no])
1005   AC_MSG_RESULT($enable_workarounds)
1006   if test x$enable_windows_workarounds = "xyes"
1007   then
1008      workarounds=1
1009   else
1010      workarounds=0
1011    fi
1012 fi
1013 AC_DEFINE_UNQUOTED([ENABLE_WINDOWS_WORKAROUNDS], $workarounds, [enable workarounds used on Windows (only useful for test cases)])
1014
1015 # gcov compilation
1016 AC_MSG_CHECKING(whether to compile with support for code coverage analysis)
1017 AC_ARG_ENABLE([coverage], 
1018               AS_HELP_STRING([--enable-coverage],
1019                              [compile the library with code coverage support]),
1020               [use_gcov=${enableval}], 
1021               [use_gcov=no])
1022 AC_MSG_RESULT($use_gcov)
1023 AM_CONDITIONAL([USE_COVERAGE], [test "x$use_gcov" = "xyes"])
1024
1025
1026 AC_CONFIG_FILES([ 
1027 Makefile
1028 contrib/Makefile
1029 doc/Makefile
1030 doc/man/Makefile
1031 m4/Makefile
1032 po/Makefile.in 
1033 src/Makefile
1034 src/arm/Makefile
1035 src/arm/arm.conf
1036 src/ats/Makefile
1037 src/ats/ats.conf
1038 src/block/Makefile
1039 src/chat/Makefile
1040 src/chat/chat.conf
1041 src/core/Makefile
1042 src/core/core.conf
1043 src/datacache/Makefile
1044 src/datastore/Makefile
1045 src/datastore/datastore.conf
1046 src/dht/Makefile
1047 src/dht/dht.conf
1048 src/dns/Makefile
1049 src/dns/dns.conf
1050 src/dv/Makefile
1051 src/dv/dv.conf
1052 src/exit/Makefile
1053 src/fragmentation/Makefile
1054 src/fs/Makefile
1055 src/fs/fs.conf
1056 src/gns/Makefile
1057 src/gns/gns.conf
1058 src/gns/nss/Makefile
1059 src/hello/Makefile
1060 src/include/Makefile
1061 src/include/gnunet_directories.h
1062 src/hostlist/Makefile
1063 src/lockmanager/Makefile
1064 src/lockmanager/lockmanager.conf
1065 src/mesh/Makefile
1066 src/mesh/mesh.conf
1067 src/mysql/Makefile
1068 src/namestore/Makefile
1069 src/namestore/namestore.conf
1070 src/nat/Makefile
1071 src/nse/Makefile
1072 src/nse/nse.conf
1073 src/peerinfo/Makefile
1074 src/peerinfo/peerinfo.conf
1075 src/peerinfo-tool/Makefile
1076 src/postgres/Makefile
1077 src/pt/Makefile
1078 src/regex/Makefile
1079 src/statistics/Makefile
1080 src/statistics/statistics.conf
1081 src/stream/Makefile
1082 src/template/Makefile
1083 src/testbed/Makefile
1084 src/testbed/testbed.conf
1085 src/testing/Makefile
1086 src/testing_old/Makefile
1087 src/topology/Makefile
1088 src/transport/Makefile
1089 src/transport/transport.conf
1090 src/tun/Makefile
1091 src/util/Makefile
1092 src/util/resolver.conf
1093 src/vpn/Makefile
1094 src/vpn/vpn.conf
1095 src/integration-tests/Makefile
1096 pkgconfig/Makefile
1097 pkgconfig/gnunetarm.pc
1098 pkgconfig/gnunetblock.pc
1099 pkgconfig/gnunetcore.pc
1100 pkgconfig/gnunetdatacache.pc
1101 pkgconfig/gnunetdatastore.pc
1102 pkgconfig/gnunetdht.pc
1103 pkgconfig/gnunetdhtlog.pc
1104 pkgconfig/gnunetdv.pc
1105 pkgconfig/gnunetfragmentation.pc
1106 pkgconfig/gnunetfs.pc
1107 pkgconfig/gnunethello.pc
1108 pkgconfig/gnunetnat.pc
1109 pkgconfig/gnunetnse.pc
1110 pkgconfig/gnunetpeerinfo.pc
1111 pkgconfig/gnunetregex.pc
1112 pkgconfig/gnunetstatistics.pc
1113 pkgconfig/gnunettesting.pc
1114 pkgconfig/gnunettransport.pc
1115 pkgconfig/gnunetutil.pc
1116 ])
1117 AC_OUTPUT
1118
1119 # Finally: summary!
1120
1121 # warn user if mysql found but not used due to version
1122 if test "$mysqlfail" = "true"
1123 then
1124   AC_MSG_NOTICE([NOTICE: MySQL found, but too old. MySQL support will not be compiled.])
1125 fi
1126
1127 # sqlite
1128 if test "x$sqlite" = "x0"
1129 then
1130   AC_MSG_NOTICE([NOTICE: sqlite not found.  sqLite support will not be compiled.])
1131 fi
1132
1133 # libcurl
1134 if test "x$curl" = "x0"
1135 then
1136   AC_MSG_NOTICE([NOTICE: libcurl not found.  http client support will not be compiled.])
1137 fi
1138
1139 #gnutls
1140 if test x$gnutls != xtrue
1141 then
1142   AC_MSG_NOTICE([NOTICE: gnutls not found, gnunet-gns-proxy will not be built])
1143 fi
1144
1145 # java ports
1146 if test "x$enable_java_ports" = "xyes"
1147 then
1148   AC_MSG_NOTICE([NOTICE: opening ports for gnunet-java bindings by default.])
1149 fi
1150
1151 if test "x$lmhd" != "x1"
1152 then
1153  AC_MSG_NOTICE([NOTICE: libmicrohttpd not found, http transport will not be installed.])
1154 fi
1155
1156 AC_MSG_NOTICE([NOTICE: Database support is set to MySQL: $mysql, SQLite: $sqlite, Postgres: $postgres])
1157
1158 if test "$enable_framework_build" = "yes"
1159 then
1160   AC_MSG_NOTICE([NOTICE: Mac OS X framework build enabled.])
1161 fi
1162
1163 if test "x$SUDO_BINARY" = "x" -a ! -w /
1164 then
1165   AC_MSG_NOTICE([NOTICE: --with-sudo not specified and not running as 'root', will not install GNS NSS library])
1166 fi
1167
1168
1169 AC_MSG_NOTICE([********************************************
1170 You can compile GNUnet with
1171         make
1172 now. After that, run (if necessary as 'root')
1173         make install
1174 to install everything. You may want to create a new user account
1175 to run the GNUnet service:
1176         adduser gnunet
1177 You also need to create an configuration file that should
1178 specify the path where GNUnet should store data.  For example,
1179 you could store in "/etc/gnunet.conf" the following lines:
1180
1181 [[PATHS]]
1182 SERVICEHOME = /var/lib/gnunet
1183 DEFAULTCONFIG = /etc/gnunet.conf
1184
1185 Now, in order to start your peer, run as the 'gnunet' user
1186         gnunet-arm -s
1187
1188 Each GNUnet user should also create an (at least initially) empty
1189 configuration file:
1190         mkdir $HOME/.gnunet/
1191         touch $HOME/.gnunet/gnunet.conf
1192         
1193 Optionally, download and compile:
1194 - gnunet-gtk to get a GUI for file-sharing and configuration.
1195 ********************************************])