configure.ac 47 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655
  1. # This file is part of GNUnet.
  2. # (C) 2001--2014 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 3, 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.10.1], [bug-gnunet@gnu.org])
  26. AC_CANONICAL_TARGET
  27. AC_CANONICAL_HOST
  28. AC_CANONICAL_SYSTEM
  29. AM_INIT_AUTOMAKE
  30. m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
  31. AC_CONFIG_HEADERS([gnunet_config.h])
  32. AH_TOP([#define _GNU_SOURCE 1])
  33. AC_CONFIG_MACRO_DIR([m4])
  34. AC_PROG_AWK
  35. AC_PROG_CC
  36. AC_PROG_CPP
  37. AC_PROG_CXX
  38. AC_PROG_OBJC
  39. AC_PROG_INSTALL
  40. AC_PROG_LN_S
  41. AC_PROG_MAKE_SET
  42. AM_PROG_CC_C_O
  43. LT_INIT([disable-static dlopen win32-dll])
  44. AC_SUBST(MKDIR_P)
  45. # large file support
  46. AC_SYS_LARGEFILE
  47. AC_FUNC_FSEEKO
  48. if test "$enable_shared" = "no"
  49. then
  50. AC_MSG_ERROR([GNUnet only works with shared libraries. Sorry.])
  51. fi
  52. CFLAGS="-Wall $CFLAGS"
  53. # use '-fno-strict-aliasing', but only if the compiler can take it
  54. if gcc -fno-strict-aliasing -S -o /dev/null -xc /dev/null >/dev/null 2>&1;
  55. then
  56. CFLAGS="-fno-strict-aliasing $CFLAGS"
  57. fi
  58. # Use Linux interface name unless the OS has a different preference
  59. DEFAULT_INTERFACE="\"eth0\""
  60. funcstocheck="getnameinfo gethostname gethostbyname gethostbyaddr getaddrinfo"
  61. # Srcdir in a form that native compiler understands (i.e. DOS path on W32)
  62. native_srcdir=$srcdir
  63. # Check system type
  64. case "$host_os" in
  65. *darwin* | *rhapsody* | *macosx*)
  66. AC_DEFINE_UNQUOTED(DARWIN,1,[This is an Apple Darwin system])
  67. CPPFLAGS="-D_APPLE_C_SOURCE $CPPFLAGS"
  68. CFLAGS="-fno-common $CFLAGS"
  69. AC_MSG_WARN([The VPN application cannot be compiled on your OS])
  70. build_target="darwin"
  71. DEFAULT_INTERFACE="\"en0\""
  72. LIBPREFIX=
  73. DLLDIR=lib
  74. UNIXONLY="#"
  75. ;;
  76. linux*)
  77. AC_DEFINE_UNQUOTED(LINUX,1,[This is a Linux kernel])
  78. build_target="linux"
  79. LIBPREFIX=
  80. DLLDIR=lib
  81. UNIXONLY="#"
  82. AC_PATH_XTRA
  83. ;;
  84. *freebsd*)
  85. AC_DEFINE_UNQUOTED(SOMEBSD,1,[This is a BSD system])
  86. AC_DEFINE_UNQUOTED(FREEBSD,1,[This is a FreeBSD system])
  87. CFLAGS="-D_THREAD_SAFE $CFLAGS"
  88. build_target="freebsd"
  89. LIBPREFIX=
  90. DLLDIR=lib
  91. UNIXONLY="#"
  92. ;;
  93. *openbsd*)
  94. AC_DEFINE_UNQUOTED(SOMEBSD,1,[This is a BSD system])
  95. AC_DEFINE_UNQUOTED(OPENBSD,1,[This is an OpenBSD system])
  96. LIBS=`echo $LIBS | sed -e "s/-ldl//"`
  97. build_target="openbsd"
  98. LIBPREFIX=
  99. DLLDIR=lib
  100. UNIXONLY="#"
  101. ;;
  102. *netbsd*)
  103. AC_DEFINE_UNQUOTED(SOMEBSD,1,[This is a BSD system])
  104. AC_DEFINE_UNQUOTED(NETBSD,1,[This is a NetBSD system])
  105. LIBPREFIX=
  106. DLLDIR=lib
  107. UNIXONLY="#"
  108. ;;
  109. *solaris*)
  110. AC_DEFINE_UNQUOTED(SOLARIS,1,[This is a Solaris system])
  111. AC_DEFINE_UNQUOTED(_REENTRANT,1,[Need with solaris or errno doesnt work])
  112. AC_CHECK_LIB(resolv, res_init)
  113. AC_CHECK_LIB(rt, nanosleep)
  114. build_target="solaris"
  115. LIBPREFIX=
  116. DLLDIR=lib
  117. UNIXONLY="#"
  118. ;;
  119. *arm-linux*)
  120. AC_DEFINE_UNQUOTED(LINUX,1,[This is a Linux kernel])
  121. CFLAGS="-D_REENTRANT -fPIC -pipe $CFLAGS"
  122. build_target="linux"
  123. LIBPREFIX=
  124. DLLDIR=lib
  125. UNIXONLY="#"
  126. ;;
  127. *cygwin*)
  128. AC_DEFINE_UNQUOTED(CYGWIN,1,[This is a Cygwin system])
  129. AC_DEFINE_UNQUOTED(WINDOWS,1,[This is a Windows system])
  130. AC_CHECK_LIB(intl, gettext)
  131. CFLAGS="-mms-bitfields $CFLAGS"
  132. build_target="cygwin"
  133. LIBPREFIX=lib
  134. DLLDIR=bin
  135. AC_PROG_CXX
  136. UNIXONLY=""
  137. ;;
  138. *mingw*)
  139. AC_DEFINE_UNQUOTED(MINGW,1,[This is a MinGW system])
  140. AC_DEFINE_UNQUOTED(WINDOWS,1,[This is a Windows system])
  141. AC_DEFINE_UNQUOTED(_WIN32,1,[This is a Windows system])
  142. AC_CHECK_LIB(intl, gettext)
  143. LDFLAGS="$LDFLAGS -Wl,--export-all-symbols"
  144. LIBS="$LIBS -lws2_32 -lplibc -lgnurx -lole32"
  145. CFLAGS="-mms-bitfields $CFLAGS"
  146. CPPFLAGS="-D_WIN32_WINNT=0x0501 -DHAVE_STAT64=1 -D__USE_MINGW_ANSI_STDIO=1 $CPPFLAGS"
  147. build_target="mingw"
  148. AC_PROG_CXX
  149. LIBPREFIX=lib
  150. DLLDIR=bin
  151. UNIXONLY=""
  152. funcstocheck=""
  153. native_srcdir=$(cd $srcdir; pwd -W)
  154. ;;
  155. gnu*)
  156. AC_DEFINE_UNQUOTED(GNU,1,[This is a GNU system])
  157. build_target="gnu"
  158. UNIXONLY="#"
  159. ;;
  160. *)
  161. AC_MSG_RESULT(Unrecognised OS $host_os)
  162. AC_DEFINE_UNQUOTED(OTHEROS,1,[Some strange OS])
  163. UNIXONLY=""
  164. ;;
  165. esac
  166. AC_DEFINE_UNQUOTED([GNUNET_DEFAULT_INTERFACE], $DEFAULT_INTERFACE, [This should be the default choice for the name of the first network interface])
  167. AC_SUBST(DEFAULT_INTERFACE)
  168. # Disable TCP-based IPC on systems that support UNIX domain
  169. # sockets in default configuratin:
  170. AC_SUBST(UNIXONLY)
  171. AC_MSG_CHECKING([for build target])
  172. AM_CONDITIONAL(DARWIN, test "$build_target" = "darwin")
  173. AM_CONDITIONAL(CYGWIN, test "$build_target" = "cygwin")
  174. AM_CONDITIONAL(MINGW, test "$build_target" = "mingw")
  175. AM_CONDITIONAL(SOLARIS, test "$build_target" = "solaris")
  176. AM_CONDITIONAL(XFREEBSD, test "$build_target" = "freebsd")
  177. AM_CONDITIONAL(OPENBSD, test "$build_target" = "openbsd")
  178. AM_CONDITIONAL(LINUX, test "$build_target" = "linux")
  179. AM_CONDITIONAL(GNU, test "$build_target" = "gnu")
  180. AC_MSG_RESULT([$build_target])
  181. AC_SUBST(build_target)
  182. AM_CONDITIONAL([am__fastdepOBJC], false)
  183. AC_UNALIGNED_64_ACCESS
  184. # some other checks for standard libs
  185. AC_SEARCH_LIBS([gethostbyname], [nsl ws2_32])
  186. AC_CHECK_LIB(socket, socket)
  187. AC_CHECK_LIB(m, log)
  188. AC_CHECK_LIB(c, getloadavg, AC_DEFINE(HAVE_GETLOADAVG,1,[getloadavg supported]))
  189. AC_CHECK_MEMBER(struct tm.tm_gmtoff,
  190. [AC_DEFINE(HAVE_TM_GMTOFF, 1,
  191. [Define if struct tm has the tm_gmtoff member.])],
  192. ,
  193. [#include <time.h>])
  194. AC_CHECK_DECLS([_stati64])
  195. # 'save' libs; only those libs found so far will be
  196. # linked against _everywhere_. For the others, we
  197. # will be more selective!
  198. SAVE_LIBS=$LIBS
  199. # libgnurx (regex library for W32)
  200. gnurx=0
  201. AC_CHECK_LIB(gnurx, regexec, gnurx=1)
  202. if test "x$gnurx" = "x0" -a "x$build_target" = "xmingw"
  203. then
  204. AC_MSG_ERROR([on W32 GNUnet needs libgnurx])
  205. fi
  206. # libgcrypt
  207. gcrypt=0
  208. NEED_LIBGCRYPT_API=1
  209. NEED_LIBGCRYPT_VERSION=1.6.0
  210. AM_PATH_LIBGCRYPT("$NEED_LIBGCRYPT_API:$NEED_LIBGCRYPT_VERSION", gcrypt=1)
  211. AC_CHECK_DECLS([gcry_mpi_set_opaque_copy], [], [], [[#include <gcrypt.h>]])
  212. if test $gcrypt = 0
  213. then
  214. AC_MSG_ERROR([[
  215. ***
  216. *** You need libgcrypt to build this program.
  217. ** This library is for example available at
  218. *** ftp://ftp.gnupg.org/gcrypt/libgcrypt/
  219. *** (at least version $NEED_LIBGCRYPT_VERSION (API $NEED_LIBGCRYPT_API)
  220. *** is required.)
  221. ***]])
  222. fi
  223. AC_DEFINE_UNQUOTED([NEED_LIBGCRYPT_VERSION], "$NEED_LIBGCRYPT_VERSION", [required libgcrypt version])
  224. # Adam shostack suggests the following for Windows:
  225. # -D_FORTIFY_SOURCE=2 -fstack-protector-all
  226. AC_ARG_ENABLE(gcc-hardening,
  227. AS_HELP_STRING(--enable-gcc-hardening, enable compiler security checks),
  228. [if test x$enableval = xyes; then
  229. CFLAGS="$CFLAGS -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstack-protector-all"
  230. CFLAGS="$CFLAGS -fwrapv -fPIE -Wstack-protector"
  231. CFLAGS="$CFLAGS --param ssp-buffer-size=1"
  232. LDFLAGS="$LDFLAGS -pie"
  233. fi])
  234. # Linker hardening options
  235. # Currently these options are ELF specific - you can't use this with MacOSX
  236. AC_ARG_ENABLE(linker-hardening,
  237. AS_HELP_STRING(--enable-linker-hardening, enable linker security fixups),
  238. [if test x$enableval = xyes; then
  239. LDFLAGS="$LDFLAGS -z relro -z now"
  240. fi])
  241. extra_logging=GNUNET_NO
  242. AC_ARG_ENABLE([logging],
  243. AS_HELP_STRING([--enable-logging@<:@=value@:>@],[Enable logging calls. Possible values: yes,no,verbose,veryverbose ('yes' is the default)]),
  244. [AS_IF([test "x$enableval" = "xyes"], [],
  245. [test "x$enableval" = "xno"], [AC_DEFINE([GNUNET_CULL_LOGGING],[],[Define to cull all logging calls])],
  246. [test "x$enableval" = "xverbose"], [extra_logging=GNUNET_YES]
  247. [test "x$enableval" = "xveryverbose"], [extra_logging=\(GNUNET_YES+1\)])
  248. ], [])
  249. AC_DEFINE_UNQUOTED([GNUNET_EXTRA_LOGGING],[$extra_logging],[1 if extra logging is enabled, 2 for very verbose extra logging, 0 otherwise])
  250. # should memory poisoning be enabled?
  251. AC_MSG_CHECKING(whether to poison freed memory)
  252. AC_ARG_ENABLE([poisoning],
  253. [AS_HELP_STRING([--enable-poisoning], [enable poisoning of freed memory (good for debugging)])],
  254. [enable_poisoning=${enableval}],
  255. [
  256. if test "x$extra_logging" != "xGNUNET_NO"; then
  257. enable_poisoning="defaults to yes (extra logging is enabled)"
  258. else
  259. enable_poisoning=no
  260. fi
  261. ])
  262. AC_MSG_RESULT($enable_poisoning)
  263. if test ! "x$enable_poisoning" = "xno"; then
  264. enable_poisoning=1
  265. else
  266. enable_poisoning=0
  267. fi
  268. AC_DEFINE_UNQUOTED([ENABLE_POISONING],[$enable_poisoning],[1 if freed memory should be poisoned, 0 otherwise])
  269. if test $build = $target
  270. then
  271. AC_MSG_CHECKING([for working HMAC])
  272. AC_LANG_PUSH(C)
  273. LIBS="$LIBS $LIBGCRYPT_LIBS"
  274. CFLAGS="$CFLAGS $LIBGCRYPT_CFLAGS"
  275. AC_RUN_IFELSE(
  276. [AC_LANG_PROGRAM([#include <gcrypt.h>
  277. #include <stdio.h>], [[
  278. gcry_md_hd_t mac;
  279. unsigned char data[] = { 0xbf, 0x16, 0x6e, 0x46, 0x3a, 0x6c, 0xf3, 0x93, 0xa7, 0x72,
  280. 0x11, 0xa1, 0xdc, 0x0b, 0x07, 0xdb, 0x1a, 0x5e, 0xd9, 0xb9, 0x81, 0xbe,
  281. 0xea, 0xe4, 0x31, 0x5f, 0x24, 0xff, 0xfe, 0x50, 0x8a, 0xde };
  282. unsigned char key[] = { 0xfc, 0x62, 0x76, 0x35 };
  283. unsigned char result[] = {0xa2, 0xb, 0x1, 0xd9, 0xc0, 0x8b, 0x5a, 0x12, 0x80,
  284. 0xd5, 0x50, 0x12, 0x8e, 0xd0, 0x5b, 0xb6, 0x5c, 0x87, 0x24, 0xe2, 0xd0,
  285. 0xd2, 0xaf, 0x63, 0xae, 0xd1, 0xd6, 0x64, 0x14, 0xe3, 0x6e, 0x61, 0x5b,
  286. 0xd, 0xba, 0x17, 0x7d, 0xd3, 0x10, 0xb1, 0x37, 0x41, 0x91, 0x7d, 0xeb,
  287. 0x1, 0x4d, 0x71, 0xe8, 0x59, 0x71, 0x42, 0x8e, 0xd6, 0xf3, 0x29, 0x3b,
  288. 0x90, 0xf2, 0xd1, 0xaf, 0x65, 0x1e, 0xb3};
  289. if (!gcry_check_version (GCRYPT_VERSION))
  290. {
  291. fprintf (stderr, "Version mismatch %s <-> %s \n", gcry_check_version (NULL), GCRYPT_VERSION);
  292. return 1;
  293. }
  294. gcry_control (GCRYCTL_DISABLE_SECMEM, 0);
  295. gcry_control (GCRYCTL_INITIALIZATION_FINISHED, 0);
  296. if (gcry_md_open(&mac, GCRY_MD_SHA512, GCRY_MD_FLAG_HMAC) != GPG_ERR_NO_ERROR)
  297. {
  298. fprintf (stderr, "gcry_md_open error\n");
  299. return 2;
  300. }
  301. gcry_md_setkey (mac, key, sizeof (key));
  302. gcry_md_write (mac, data, sizeof (data));
  303. if (memcmp(gcry_md_read (mac, 0), result, gcry_md_get_algo_dlen (gcry_md_get_algo (mac))) != 0)
  304. {
  305. fprintf (stderr, "memcmp error\n");
  306. return 3;
  307. }
  308. gcry_md_close (mac);
  309. return 0;
  310. ]])],
  311. [AC_MSG_RESULT([yes])],
  312. [
  313. RESULT=$?
  314. if test $RESULT = 3
  315. then
  316. 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.])
  317. fi
  318. if test $RESULT = 2
  319. then
  320. AC_MSG_FAILURE([HMAC test failed])
  321. fi
  322. if test $RESULT = 1
  323. then
  324. AC_MSG_FAILURE([libgcrypt header version does not match library version])
  325. fi
  326. ])
  327. AC_LANG_POP(C)
  328. fi # $build = $target
  329. # check for bluetooth library
  330. bluetooth=0
  331. AC_CHECK_LIB(bluetooth, ba2str,[AC_CHECK_HEADER([bluetooth/bluetooth.h],bluetooth=1)])
  332. if test "$bluetooth" = 1
  333. then
  334. AM_CONDITIONAL(HAVE_LIBBLUETOOTH, true)
  335. AC_DEFINE([HAVE_LIBBLUETOOTH],[1],[Have bluetooth library])
  336. else
  337. AM_CONDITIONAL(HAVE_LIBBLUETOOTH, false)
  338. fi
  339. if test "$build_target" = "mingw"
  340. then
  341. bluetooth=1
  342. fi
  343. # check for libpulse(audio) library
  344. pulse=0
  345. AC_CHECK_LIB(pulse,pa_stream_peek,
  346. [AC_CHECK_HEADER([pulse/simple.h],pulse=1)])
  347. if test "$pulse" = 1
  348. then
  349. AC_DEFINE([HAVE_PULSE],[1],[Have libpulse(audio) library])
  350. fi
  351. if test "$build_target" = "mingw"
  352. then
  353. pulse=0
  354. fi
  355. # check for libopus(audio) library
  356. opus=0
  357. AC_CHECK_LIB(opus,opus_decode_float,
  358. [AC_CHECK_HEADER([opus/opus.h],
  359. [AC_CHECK_DECL([OPUS_SET_GAIN],[opus=1],[],[[#include <opus/opus.h>]]
  360. )]
  361. )]
  362. )
  363. if test "$opus" = 1
  364. then
  365. AC_DEFINE([HAVE_OPUS],[1],[Have libopus library])
  366. fi
  367. # libogg
  368. AC_CHECK_LIB(ogg, ogg_stream_flush_fill,
  369. [AC_CHECK_HEADERS([ogg/ogg.h],
  370. AM_CONDITIONAL(HAVE_OGG, true)
  371. ogg=1
  372. AC_DEFINE(HAVE_OGG,1,[Have ogg]),
  373. AM_CONDITIONAL(HAVE_OGG, false)
  374. ogg=0
  375. AC_DEFINE(HAVE_OGG,0,[lacking ogg]))],
  376. AM_CONDITIONAL(HAVE_OGG, false)
  377. ogg=0)
  378. gst=0
  379. PKG_CHECK_MODULES(
  380. [GST],
  381. [glib-2.0 gobject-2.0 gstreamer-1.0 gstreamer-app-1.0 gstreamer-audio-1.0],
  382. [
  383. gst=1
  384. AC_MSG_RESULT(ok)
  385. ], [
  386. gst=0
  387. AC_MSG_RESULT(not found)
  388. ])
  389. # Pulse Audio
  390. if test "x$pulse" != "x1" -o "x$opus" != "x1" -o "x$ogg" != "x1"
  391. then
  392. if test "x$gst" != "x1"
  393. then
  394. conversation_backend=none
  395. AM_CONDITIONAL(BUILD_PULSE_HELPERS, false)
  396. AM_CONDITIONAL(BUILD_GST_HELPERS, false)
  397. else
  398. conversation_backend=gst
  399. AM_CONDITIONAL(BUILD_PULSE_HELPERS, false)
  400. AM_CONDITIONAL(BUILD_GST_HELPERS, true)
  401. fi
  402. else
  403. conversation_backend=pulse
  404. AM_CONDITIONAL(BUILD_PULSE_HELPERS, true)
  405. AM_CONDITIONAL(BUILD_GST_HELPERS, false)
  406. fi
  407. # libgnurl
  408. LIBGNURL_CHECK_CONFIG(,7.34.0,gnurl=1,gnurl=0)
  409. if test "$gnurl" = 1
  410. then
  411. AM_CONDITIONAL(HAVE_LIBGNURL, true)
  412. AC_DEFINE([HAVE_LIBGNURL],[1],[Have libgnurl])
  413. else
  414. AM_CONDITIONAL(HAVE_LIBGNURL, false)
  415. fi
  416. # libidn
  417. AC_MSG_CHECKING([if Libidn can be used])
  418. AC_ARG_WITH(libidn, AC_HELP_STRING([--with-libidn=[DIR]],
  419. [Support IDN (needs GNU Libidn)]),
  420. libidn=$withval, libidn=yes)
  421. if test "$libidn" != "no"; then
  422. if test "$libidn" != "yes"; then
  423. LDFLAGS="${LDFLAGS} -L$libidn/lib"
  424. CPPFLAGS="${CPPFLAGS} -I$libidn/include"
  425. fi
  426. fi
  427. libidn=no
  428. AC_CHECK_HEADER(idna.h,
  429. AC_CHECK_LIB(idn, stringprep_check_version,
  430. [libidn=yes LIBS="${LIBS} -lidn"], []), [])
  431. if test "$libidn" != "yes"; then
  432. AC_MSG_FAILURE([GNUnet requires libidn.
  433. libidn-1.13 should be sufficient, newer versions work too.])
  434. fi
  435. AC_MSG_RESULT($libidn)
  436. # restore LIBS
  437. LIBS=$SAVE_LIBS
  438. AC_CHECK_HEADERS([glpk.h],[glpk=true],[gplk=false])
  439. # GLPK must support glpk_init_env, version >= 4.43
  440. AC_CHECK_LIB([glpk],[glp_init_env],,[gplk=false])
  441. # GLPK must support atm MLP presolving, version >= 4.32
  442. AC_CHECK_MEMBERS(glp_iocp.presolve,,[gplk=false],[[#include <glpk.h>]])
  443. if test x$gplk = xfalse
  444. then
  445. AM_CONDITIONAL(HAVE_LIBGLPK, false)
  446. AC_MSG_WARN([GNUnet requires GLPK >= 4.32])
  447. else
  448. AM_CONDITIONAL(HAVE_LIBGLPK, true)
  449. AC_DEFINE([HAVE_LIBGLPK],[1],[Have GLPK])
  450. fi
  451. AC_CHECK_HEADERS([nss.h],[nss=true],[nss=false])
  452. if test x$nss = xfalse
  453. then
  454. AM_CONDITIONAL(HAVE_GLIBCNSS, false)
  455. AC_MSG_WARN([No GNU libc nss header, will not build NSS plugin])
  456. else
  457. AM_CONDITIONAL(HAVE_GLIBCNSS, true)
  458. fi
  459. # test for kvm and kstat (for CPU stats under BSD/Solaris)
  460. AC_CHECK_LIB([kvm],[kvm_open])
  461. AC_CHECK_LIB([kstat],[kstat_open])
  462. # test for libextractor
  463. extractor=0
  464. AC_MSG_CHECKING(for libextractor)
  465. AC_ARG_WITH(extractor,
  466. [ --with-extractor=PFX base of libextractor installation],
  467. [AC_MSG_RESULT([$with_extractor])
  468. case $with_extractor in
  469. no)
  470. ;;
  471. yes)
  472. AC_CHECK_HEADERS(extractor.h,
  473. AC_CHECK_LIB([extractor], [EXTRACTOR_plugin_add_defaults],
  474. extractor=1))
  475. ;;
  476. *)
  477. LDFLAGS="-L$with_extractor/lib $LDFLAGS"
  478. CPPFLAGS="-I$with_extractor/include $CPPFLAGS"
  479. AC_CHECK_HEADERS(extractor.h,
  480. AC_CHECK_LIB([extractor], [EXTRACTOR_plugin_add_defaults],
  481. EXT_LIB_PATH="-L$with_extractor/lib $EXT_LIB_PATH"
  482. extractor=1))
  483. ;;
  484. esac
  485. ],
  486. [AC_MSG_RESULT([--with-extractor not specified])
  487. AC_CHECK_HEADERS(extractor.h,
  488. AC_CHECK_LIB([extractor], [EXTRACTOR_plugin_add_defaults],
  489. extractor=1))])
  490. if test "$extractor" != 1
  491. then
  492. AC_MSG_ERROR([GNUnet requires libextractor])
  493. fi
  494. # restore LIBS
  495. LIBS=$SAVE_LIBS
  496. # Check for libltdl header (#2999)
  497. ltdl=0
  498. AC_MSG_CHECKING(for libltdl)
  499. AC_ARG_WITH(ltdl,
  500. [ --with-ltdl=PFX base of libltdl installation],
  501. [AC_MSG_RESULT([$with_ltdl])
  502. case $with_ltdl in
  503. no)
  504. ;;
  505. yes)
  506. AC_CHECK_HEADERS(ltdl.h,
  507. AC_CHECK_LIB([ltdl], [lt_dlopenext],
  508. ltdl=1))
  509. ;;
  510. *)
  511. LDFLAGS="-L$with_ltdl/lib $LDFLAGS"
  512. CPPFLAGS="-I$with_ltdl/include $CPPFLAGS"
  513. AC_CHECK_HEADERS(ltdl.h,
  514. AC_CHECK_LIB([ltdl], [lt_dlopenext],
  515. EXT_LIB_PATH="-L$with_ltdl/lib $EXT_LIB_PATH"
  516. ltdl=1))
  517. ;;
  518. esac
  519. ],
  520. [AC_MSG_RESULT([--with-ltdl not specified])
  521. AC_CHECK_HEADERS(ltdl.h,
  522. AC_CHECK_LIB([ltdl], [lt_dlopenext],
  523. ltdl=1))])
  524. if test x$ltdl = x1
  525. then
  526. AC_MSG_RESULT([libltdl found])
  527. else
  528. AC_MSG_ERROR([GNUnet requires libltdl (from GNU libtool), try installing libltdl-dev])
  529. fi
  530. # restore LIBS
  531. LIBS=$SAVE_LIBS
  532. # test for libunistring
  533. gl_LIBUNISTRING
  534. if test $HAVE_LIBUNISTRING != yes; then
  535. AC_MSG_ERROR([GNUnet requires libunistring])
  536. fi
  537. if test $gl_libunistring_hexversion -le 2305; then
  538. AC_MSG_ERROR([GNUnet requires libunistring >= 0.9.1.1])
  539. fi
  540. # restore LIBS
  541. LIBS=$SAVE_LIBS
  542. # Checks for standard header files.
  543. AC_HEADER_DIRENT
  544. AC_HEADER_STDC
  545. # Check for headers that are ALWAYS required
  546. 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]))
  547. # Checks for headers that are only required on some systems or opional (and where we do NOT abort if they are not there)
  548. AC_CHECK_HEADERS([malloc.h malloc/malloc.h 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 ifaddrs.h mach/mach.h stddef.h sys/timeb.h terminos.h argz.h ucred.h sys/ucred.h endian.h sys/endian.h execinfo.h])
  549. # FreeBSD requires something more funky for netinet/in_systm.h and netinet/ip.h...
  550. AC_CHECK_HEADERS([sys/types.h netinet/in_systm.h netinet/in.h netinet/ip.h],,,
  551. [#ifdef HAVE_SYS_TYPES_H
  552. #include <sys/types.h>
  553. #endif
  554. #ifdef HAVE_NETINET_IN_SYSTM_H
  555. #include <netinet/in_systm.h>
  556. #endif
  557. #ifdef HAVE_NETINET_IN_H
  558. #include <netinet/in.h>
  559. #endif
  560. ])
  561. SAVE_LDFLAGS=$LDFLAGS
  562. SAVE_CPPFLAGS=$CPPFLAGS
  563. # test for sqlite
  564. sqlite=false
  565. AC_MSG_CHECKING(for SQLite)
  566. AC_ARG_WITH(sqlite,
  567. [ --with-sqlite=PFX base of SQLite installation],
  568. [AC_MSG_RESULT("$with_sqlite")
  569. case $with_sqlite in
  570. no)
  571. ;;
  572. yes)
  573. AC_CHECK_HEADERS(sqlite3.h,
  574. sqlite=true)
  575. ;;
  576. *)
  577. LDFLAGS="-L$with_sqlite/lib $LDFLAGS"
  578. CPPFLAGS="-I$with_sqlite/include $CPPFLAGS"
  579. AC_CHECK_HEADERS(sqlite3.h,
  580. EXT_LIB_PATH="-L$with_sqlite/lib $EXT_LIB_PATH"
  581. SQLITE_LDFLAGS="-L$with_sqlite/lib"
  582. SQLITE_CPPFLAGS="-I$with_sqlite/include"
  583. sqlite=true)
  584. LDFLAGS=$SAVE_LDFLAGS
  585. CPPFLAGS=$SAVE_CPPFLAGS
  586. ;;
  587. esac
  588. ],
  589. [AC_MSG_RESULT([--with-sqlite not specified])
  590. AC_CHECK_HEADERS(sqlite3.h, sqlite=true)])
  591. AM_CONDITIONAL(HAVE_SQLITE, test x$sqlite = xtrue)
  592. AC_SUBST(SQLITE_CPPFLAGS)
  593. AC_SUBST(SQLITE_LDFLAGS)
  594. # test for postgres
  595. postgres=false
  596. AX_LIB_POSTGRESQL([])
  597. if test "$found_postgresql" = "yes"; then
  598. postgres=true
  599. fi
  600. AM_CONDITIONAL(HAVE_POSTGRESQL, test x$postgres = xtrue)
  601. # test for zlib
  602. SAVE_LDFLAGS=$LDFLAGS
  603. SAVE_CPPFLAGS=$CPPFLAGS
  604. AC_ARG_WITH(zlib,
  605. [ --with-zlib[[=DIR]] use libz in DIR],
  606. [AS_IF([test "$withval" = "no"],
  607. [AC_MSG_ERROR([GNUnet requires zlib])],
  608. [test "$withval" != "yes"],
  609. [
  610. Z_DIR=$withval
  611. CPPFLAGS="${CPPFLAGS} -I$withval/include"
  612. LDFLAGS="${LDFLAGS} -L$withval/lib"
  613. ])
  614. ])
  615. AC_CHECK_HEADER(zlib.h,
  616. [],
  617. [AC_MSG_ERROR([GNUnet requires zlib])])
  618. AC_CHECK_LIB(z, compress2,
  619. [
  620. AC_DEFINE([HAVE_ZLIB], [], [Have compression library])
  621. if test "x${Z_DIR}" != "x"; then
  622. Z_CFLAGS="-I${Z_DIR}/include"
  623. Z_LIBS="-L${Z_DIR}/lib -lz"
  624. else
  625. Z_LIBS="-lz"
  626. fi],
  627. [AC_MSG_ERROR([GNUnet requires zlib])])
  628. AC_SUBST(Z_CFLAGS)
  629. AC_SUBST(Z_LIBS)
  630. LDFLAGS=$SAVE_LDFLAGS
  631. CPPFLAGS=$SAVE_CPPFLAGS
  632. # mysql & windows
  633. AC_CHECK_TYPES([sigset_t, off_t], [], [], [#include <sys/types.h>])
  634. AC_CHECK_TYPES([size_t], [], [], [#include <stdio.h>])
  635. if test "$build_target" = "mingw"
  636. then
  637. CYGWIN_MYSQL_MAGIC="#include <mysql/my_global.h>"
  638. fi
  639. # test for mysql
  640. mysql=false
  641. mysqlfail=false
  642. SAVE_LDFLAGS=$LDFLAGS
  643. SAVE_CPPFLAGS=$CPPFLAGS
  644. AC_MSG_CHECKING(for mysql)
  645. AC_ARG_WITH(mysql,
  646. [ --with-mysql=PFX base of MySQL installation],
  647. [AC_MSG_RESULT("$with_mysql")
  648. if test "$with_mysql" != "no"
  649. then
  650. if test "$with_mysql" != "yes"
  651. then
  652. LDFLAGS="-L$with_mysql/lib -L$with_mysql/lib/mysql $LDFLAGS $ZLIBS"
  653. CPPFLAGS="-I$with_mysql/include $CPPFLAGS"
  654. fi
  655. AC_CHECK_HEADERS(mysql/mysql.h,
  656. AC_CHECK_LIB(mysqlclient, mysql_init,
  657. MYSQL_LDFLAGS="-L$with_mysql/lib -L$with_mysql/lib/mysql"
  658. MYSQL_CPPFLAGS="-I$with_mysql/include"
  659. mysql=true), [], [$CYGWIN_MYSQL_MAGIC])
  660. fi
  661. ],
  662. [AC_MSG_RESULT([--with-mysql not specified])
  663. if test -d "/usr/lib64/mysql"; then
  664. MYSQL_LIBDIR="/usr/lib64/mysql"
  665. elif test -d "/usr/lib/mysql"; then
  666. MYSQL_LIBDIR="/usr/lib/mysql"
  667. else
  668. MYSQL_LIBDIR="/usr/lib"
  669. fi
  670. LDFLAGS="-L$MYSQL_LIBDIR $LDFLAGS $ZLIBS"
  671. AC_CHECK_LIB(mysqlclient, mysql_init,
  672. [AC_CHECK_HEADERS(mysql/mysql.h,
  673. MYSQL_LDFLAGS="-L$MYSQL_LIBDIR"
  674. mysql=true
  675. , [], [$CYGWIN_MYSQL_MAGIC])])
  676. ])
  677. AC_SUBST(MYSQL_LDFLAGS)
  678. AC_SUBST(MYSQL_CPPFLAGS)
  679. # additional version check for mysql
  680. AC_ARG_ENABLE(mysql-version-check, [ --disable-mysql-version-check do not check MySQL version],, enable_mysql_version_check=yes)
  681. if test "$mysql" = "true" -a "x$enable_mysql_version_check" = "xyes"
  682. then
  683. AC_MSG_CHECKING(mysql version)
  684. AC_RUN_IFELSE([AC_LANG_PROGRAM(
  685. [[$CYGWIN_MYSQL_MAGIC
  686. #include <mysql/mysql.h>]],
  687. [[if (MYSQL_VERSION_ID < 40100)
  688. return(-1);
  689. else
  690. return(0);
  691. ]])
  692. ],mysql=true,mysql=false)
  693. if test "$mysql" = "false"
  694. then
  695. mysqlfail=true
  696. AC_MSG_RESULT([fail, >= 4.1 required])
  697. else
  698. AC_MSG_RESULT(ok)
  699. fi
  700. fi
  701. AM_CONDITIONAL(HAVE_MYSQL, test x$mysql = xtrue)
  702. AM_CONDITIONAL(HAVE_MYSQLE, test "0" = "1")
  703. # restore LIBS
  704. LIBS=$SAVE_LIBS
  705. LDFLAGS=$SAVE_LDFLAGS
  706. CPPFLAGS=$SAVE_CPPFLAGS
  707. if test "$sqlite" = 0 -a "$mysql" = 0
  708. then
  709. AC_MSG_ERROR([GNUnet requires SQLite or MySQL])
  710. fi
  711. # libmicrohttpd
  712. lmhd=0
  713. AC_MSG_CHECKING([for libmicrohttpd])
  714. AC_ARG_WITH(microhttpd,
  715. [ --with-microhttpd=PFX base of libmicrohttpd installation],
  716. [AC_MSG_RESULT([$with_microhttpd])
  717. case $with_microhttpd in
  718. no)
  719. ;;
  720. yes)
  721. AC_CHECK_HEADERS([microhttpd.h],
  722. AC_CHECK_DECL(MHD_OPTION_PER_IP_CONNECTION_LIMIT,
  723. AC_CHECK_LIB([microhttpd], [MHD_start_daemon],
  724. [AC_MSG_CHECKING([for libmicrohttpd >= 0.9.32])
  725. AC_RUN_IFELSE([AC_LANG_SOURCE([
  726. #include "$native_srcdir/src/include/platform.h"
  727. #include <microhttpd.h>
  728. int main () { return MHD_VERSION >= 0x0093200 ? 0 : 1; }
  729. ])], [
  730. AC_MSG_RESULT(ok)
  731. lmhd=1],[AC_MSG_RESULT(failed)],lmhd=1)]),
  732. [],[#include "$native_srcdir/src/include/platform.h"
  733. #include <microhttpd.h>]),,
  734. [#include "$native_srcdir/src/include/platform.h"])
  735. ;;
  736. *)
  737. LDFLAGS="-L$with_microhttpd/lib $LDFLAGS"
  738. CPPFLAGS="-I$with_microhttpd/include $CPPFLAGS"
  739. AC_CHECK_HEADERS(microhttpd.h,
  740. AC_CHECK_DECL(MHD_OPTION_PER_IP_CONNECTION_LIMIT,
  741. AC_CHECK_LIB([microhttpd], [MHD_start_daemon],
  742. EXT_LIB_PATH="-L$with_microhttpd/lib $EXT_LIB_PATH"
  743. [AC_MSG_CHECKING([for libmicrohttpd >= 0.9.32])
  744. AC_RUN_IFELSE([AC_LANG_SOURCE([
  745. #include "$native_srcdir/src/include/platform.h"
  746. #include <microhttpd.h>
  747. int main () { return MHD_VERSION >= 0x0093200 ? 0 : 1; }
  748. ])], [
  749. AC_MSG_RESULT(ok)
  750. lmhd=1],[AC_MSG_RESULT(failed)],lmhd=1)]),
  751. [],[#include "$native_srcdir/src/include/platform.h"
  752. #include <microhttpd.h>]),,
  753. [#include "$native_srcdir/src/include/platform.h"])
  754. ;;
  755. esac
  756. ],
  757. [AC_MSG_RESULT([--with-microhttpd not specified])
  758. AC_CHECK_HEADERS([microhttpd.h],
  759. AC_CHECK_DECL(MHD_OPTION_PER_IP_CONNECTION_LIMIT,
  760. AC_CHECK_LIB([microhttpd], [MHD_start_daemon],
  761. [AC_MSG_CHECKING([for libmicrohttpd >= 0.9.32])
  762. AC_RUN_IFELSE([AC_LANG_SOURCE([
  763. #include "$native_srcdir/src/include/platform.h"
  764. #include <microhttpd.h>
  765. int main () { return MHD_VERSION >= 0x0093200 ? 0 : 1; }
  766. ])], [
  767. AC_MSG_RESULT(ok)
  768. lmhd=1],[AC_MSG_RESULT(failed)],lmhd=1)]),
  769. [],[#include "$native_srcdir/src/include/platform.h"
  770. #include <microhttpd.h>]),,
  771. [#include "$native_srcdir/src/include/platform.h"])])
  772. AM_CONDITIONAL(HAVE_MHD, test x$lmhd = x1)
  773. AC_DEFINE_UNQUOTED([HAVE_MHD], $lmhd, [We have libmicrohttpd])
  774. # restore LIBS
  775. LIBS=$SAVE_LIBS
  776. # check for python & pexpect (used for some testcases only)
  777. AM_PATH_PYTHON([2.6],, [:])
  778. AM_CONDITIONAL([HAVE_PYTHON], [test "$PYTHON" != :])
  779. # check for gettext
  780. AM_GNU_GETTEXT([external])
  781. AM_GNU_GETTEXT_VERSION([0.16.1])
  782. # check for iconv
  783. AM_ICONV
  784. # Checks for standard typedefs, structures, and compiler characteristics.
  785. AC_TYPE_PID_T
  786. AC_TYPE_SIZE_T
  787. AC_TYPE_MODE_T
  788. AC_HEADER_TIME
  789. AC_HEADER_STAT
  790. AC_HEADER_STDBOOL
  791. AC_STRUCT_TM
  792. AC_CHECK_MEMBER([struct sockaddr_in.sin_len],
  793. [ AC_DEFINE(HAVE_SOCKADDR_IN_SIN_LEN, 1, [Do we have sockaddr_in.sin_len?])
  794. ],
  795. [],
  796. [
  797. #include <sys/types.h>
  798. #include <sys/socket.h>
  799. #include <netinet/in.h>
  800. ])
  801. # Checks for library functions.
  802. AC_FUNC_CLOSEDIR_VOID
  803. AC_FUNC_FORK
  804. AC_PROG_GCC_TRADITIONAL
  805. AC_FUNC_MEMCMP
  806. AC_FUNC_SELECT_ARGTYPES
  807. AC_FUNC_CHOWN
  808. AC_TYPE_SIGNAL
  809. AC_FUNC_STAT
  810. AC_FUNC_STRFTIME
  811. AC_FUNC_VPRINTF
  812. AC_HEADER_SYS_WAIT
  813. AC_TYPE_OFF_T
  814. AC_TYPE_UID_T
  815. AC_CHECK_FUNCS([atoll stat64 strnlen mremap getrlimit setrlimit sysconf initgroups strndup gethostbyname2 getpeerucred getpeereid setresuid $funcstocheck getifaddrs freeifaddrs getresgid mallinfo malloc_size malloc_usable_size getrusage random srandom stat statfs statvfs])
  816. # restore LIBS
  817. LIBS=$SAVE_LIBS
  818. GN_INTLINCL=""
  819. GN_LIBINTL="$LTLIBINTL"
  820. AC_ARG_ENABLE(framework, [ --enable-framework enable Mac OS X framework build helpers],enable_framework_build=$enableval)
  821. AM_CONDITIONAL(WANT_FRAMEWORK, test x$enable_framework_build = xyes)
  822. if test x$enable_framework_build = xyes
  823. then
  824. AC_DEFINE([FRAMEWORK_BUILD], 1, [Build a Mac OS X Framework])
  825. GN_INTLINCL='-I$(top_srcdir)/src/intlemu'
  826. GN_LIBINTL='$(top_builddir)/src/intlemu/libintlemu.la -framework CoreFoundation'
  827. AC_LIB_APPENDTOVAR([CPPFLAGS], [$GN_INTLINCL])
  828. fi
  829. GN_LIB_LDFLAGS="-export-dynamic -no-undefined"
  830. GN_PLUGIN_LDFLAGS="-export-dynamic -avoid-version -module -no-undefined"
  831. AC_SUBST(GN_LIB_LDFLAGS)
  832. AC_SUBST(GN_PLUGIN_LDFLAGS)
  833. AC_SUBST(GN_INTLINCL)
  834. AC_SUBST(GN_LIBINTL)
  835. AC_SUBST(CPPFLAGS)
  836. AC_SUBST(LIBS)
  837. AC_SUBST(LDFLAGS)
  838. AC_SUBST(EXT_LIB_PATH)
  839. AC_SUBST(EXT_LIBS)
  840. AC_SUBST(LIBPREFIX)
  841. AC_SUBST(DLLDIR)
  842. AC_SUBST(EXT_LIB_PATH)
  843. # test for sudo
  844. AC_MSG_CHECKING(for sudo)
  845. AC_ARG_WITH(sudo,
  846. [ --with-sudo=PATH path to sudo binary (or just yes)],
  847. [AC_MSG_RESULT("$with_sudo")
  848. case $with_sudo in
  849. no)
  850. SUDO_BINARY=
  851. ;;
  852. yes)
  853. SUDO_BINARY=sudo
  854. ;;
  855. *)
  856. SUDO_BINARY=$with_sudo
  857. ;;
  858. esac
  859. ],
  860. [AC_MSG_RESULT([no])])
  861. AC_SUBST(SUDO_BINARY)
  862. AM_CONDITIONAL([HAVE_SUDO], [test "x$SUDO_BINARY" != "x" -o -w /])
  863. # test for nssdir
  864. AC_MSG_CHECKING(with nssdir)
  865. AC_ARG_WITH(nssdir,
  866. [ --with-nssdir=PATH where to install NSS plugins],
  867. [AC_MSG_RESULT("$with_nssdir")
  868. case $with_nssdir in
  869. no)
  870. NSS_DIR=
  871. install_nss=0
  872. ;;
  873. yes)
  874. NSS_DIR="/lib"
  875. install_nss=1
  876. ;;
  877. *)
  878. NSS_DIR=$with_nssdir
  879. install_nss=1
  880. ;;
  881. esac
  882. ],
  883. [
  884. if test "x$SUDO_BINARY" != "x" -o -w /
  885. then
  886. NSS_DIR="/lib"
  887. install_nss=1
  888. AC_MSG_RESULT([yes, to /lib])
  889. else
  890. NSS_DIR=
  891. install_nss=0
  892. AC_MSG_RESULT([no])
  893. fi
  894. ])
  895. AC_SUBST(NSS_DIR)
  896. AM_CONDITIONAL([INSTALL_NSS], [test "x$install_nss" != "x0"])
  897. # test for gnunetdns group name
  898. GNUNETDNS_GROUP=gnunetdns
  899. AC_MSG_CHECKING(for gnunetdns group name)
  900. AC_ARG_WITH(gnunetdns,
  901. [ --with-gnunetdns=GRPNAME name for gnunetdns group],
  902. [AC_MSG_RESULT("$with_gnunetdns")
  903. case $with_gnunetdns in
  904. no)
  905. GNUNETDNS_GROUP=gnunet
  906. ;;
  907. yes)
  908. GNUNETDNS_GROUP=gnunetdns
  909. ;;
  910. *)
  911. GNUNETDNS_GROUP=$with_gnunetdns
  912. ;;
  913. esac
  914. ],
  915. [AC_MSG_RESULT([gnunetdns])])
  916. AC_SUBST(GNUNETDNS_GROUP)
  917. # gnutls
  918. gnutls=0
  919. gnutls_dane=0
  920. AC_MSG_CHECKING(for gnutls)
  921. AC_ARG_WITH(gnutls,
  922. [ --with-gnutls=PFX base of gnutls installation],
  923. [AC_MSG_RESULT([$with_gnutls])
  924. case $with_gnutls in
  925. no)
  926. ;;
  927. yes)
  928. AC_CHECK_HEADERS([gnutls/abstract.h],
  929. AC_CHECK_LIB([gnutls], [gnutls_priority_set],
  930. gnutls=true))
  931. AC_CHECK_HEADERS([gnutls/dane.h],
  932. AC_CHECK_LIB([gnutls-dane], [dane_verify_crt_raw],
  933. gnutls_dane=1))
  934. ;;
  935. *)
  936. LDFLAGS="-L$with_gnutls/lib $LDFLAGS"
  937. CPPFLAGS="-I$with_gnutls/include $CPPFLAGS"
  938. AC_CHECK_HEADERS([gnutls/abstract.h],
  939. AC_CHECK_LIB([gnutls], [gnutls_priority_set],
  940. EXT_LIB_PATH="-L$with_gnutls/lib $EXT_LIB_PATH"
  941. gnutls=true))
  942. AC_CHECK_HEADERS([gnutls/dane.h],
  943. AC_CHECK_LIB([gnutls-dane], [dane_verify_crt_raw],
  944. gnutls_dane=1))
  945. ;;
  946. esac
  947. ],
  948. [AC_MSG_RESULT([--with-gnutls not specified])
  949. AC_CHECK_HEADERS([gnutls/abstract.h],
  950. AC_CHECK_LIB([gnutls], [gnutls_priority_set],
  951. gnutls=true))
  952. AC_CHECK_HEADERS([gnutls/dane.h],
  953. AC_CHECK_LIB([gnutls-dane], [dane_verify_crt_raw],
  954. gnutls_dane=1))
  955. ])
  956. AM_CONDITIONAL(HAVE_GNUTLS, test x$gnutls = xtrue)
  957. AC_DEFINE_UNQUOTED([HAVE_GNUTLS], $gnutls, [We have GnuTLS])
  958. AM_CONDITIONAL(HAVE_GNUTLS_DANE, test x$gnutls_dane = x1)
  959. AC_DEFINE_UNQUOTED([HAVE_GNUTLS_DANE], $gnutls_dane, [We have GnuTLS with DANE support])
  960. # Test if we are building for superMUC
  961. AC_MSG_CHECKING(if GNUnet is being configured to run on the SuperMUC)
  962. AC_ARG_ENABLE([supermuc],
  963. [AS_HELP_STRING([--enable-supermuc],
  964. [build GNUnet with support to run on the SuperMUC (default is NO)])],
  965. [if test "x$enable_supermuc" = "xno"
  966. then
  967. supermuc=0
  968. else
  969. supermuc=1
  970. fi],
  971. [supermuc=0
  972. enable_supermuc=no])
  973. AC_MSG_RESULT($enable_SUPERMUC)
  974. AM_CONDITIONAL([ENABLE_SUPERMUC], [test "x$supermuc" = "x1"])
  975. AC_DEFINE_UNQUOTED([ENABLE_SUPERMUC], [$supermuc], [Build with support for SuperMUC])
  976. # Check if NSE has to send timestamp information to testbed logger for
  977. # generating histogram of messages received
  978. AC_MSG_CHECKING(if NSE has to send timestamp information to testbed logger)
  979. AC_ARG_ENABLE([nse-histogram],
  980. [AS_HELP_STRING([--enable-nse-histogram],
  981. [have NSE send timestamp information to testbed logger for generating
  982. histogram of received messages. NOT useful for production (default is
  983. NO)])],
  984. [if test "x$enableval" = "xno"
  985. then
  986. nse_histogram=0
  987. else
  988. nse_histogram=1
  989. fi],
  990. [nse_histogram=0
  991. enable_nse_histogram=no])
  992. AC_MSG_RESULT($enable_nse_histogram)
  993. AM_CONDITIONAL([ENABLE_NSE_HISTOGRAM], [test "x$nse_histogram" = "x1"])
  994. AC_DEFINE_UNQUOTED([ENABLE_NSE_HISTOGRAM], [$nse_histogram],
  995. [have NSE send timestamp information to testbed logger])
  996. # should 'make check' run tests?
  997. AC_MSG_CHECKING(whether to run tests)
  998. AC_ARG_ENABLE([testruns],
  999. [AS_HELP_STRING([--disable-testruns], [disable running tests on make check (default is YES)])],
  1000. [enable_tests_run=${enableval}],
  1001. [enable_tests_run=yes])
  1002. AC_MSG_RESULT($enable_test_run)
  1003. AM_CONDITIONAL([ENABLE_TEST_RUN], [test "x$enable_tests_run" = "xyes"])
  1004. # should monkey be used when running (certain) services?
  1005. AC_MSG_CHECKING(whether to run with monkey)
  1006. AC_ARG_ENABLE([monkey],
  1007. [AS_HELP_STRING([--enable-monkey], [enable running with monkey])],
  1008. [enable_monkey=${enableval}],
  1009. [enable_monkey=no])
  1010. AC_MSG_RESULT($enable_monkey)
  1011. AM_CONDITIONAL([ENABLE_MONKEY], [test "x$enable_monkey" = "xyes"])
  1012. if test "x$enable_monkey" = "xyes"
  1013. then
  1014. MONKEYPREFIX="pathologist -d $(eval echo ${datarootdir}/gnunet/gnunet.sqlite) -p 30 --"
  1015. else
  1016. MONKEYPREFIX=""
  1017. fi
  1018. AC_SUBST(MONKEYPREFIX)
  1019. # should expensive tests be run?
  1020. AC_MSG_CHECKING(whether to run expensive tests)
  1021. AC_ARG_ENABLE([expensivetests],
  1022. [AS_HELP_STRING([--enable-expensivetests], [enable running expensive testcases])],
  1023. [enable_expensive=${enableval}],
  1024. [enable_expensive=no])
  1025. AC_MSG_RESULT($enable_expensive)
  1026. AM_CONDITIONAL([HAVE_EXPENSIVE_TESTS], [test "x$enable_expensive" = "xyes"])
  1027. # should ports be open for Java services?
  1028. AC_MSG_CHECKING(whether to enable ports for gnunet-java)
  1029. AC_ARG_ENABLE([javaports],
  1030. [AS_HELP_STRING([--enable-javaports], [use non-zero ports for services with Java bindings (default is NO)])],
  1031. [enable_java_ports=${enableval}],
  1032. [enable_java_ports=no])
  1033. AC_MSG_RESULT($enable_java_ports)
  1034. if test "x$enable_java_ports" = "xyes"
  1035. then
  1036. JAVAPORT=""
  1037. else
  1038. JAVAPORT="$UNIXONLY"
  1039. fi
  1040. AC_SUBST(JAVAPORT)
  1041. # should benchmarks be run?
  1042. AC_MSG_CHECKING(whether to run benchmarks during make check)
  1043. AC_ARG_ENABLE([benchmarks],
  1044. [AS_HELP_STRING([--enable-benchmarks], [enable running benchmarks during make check])],
  1045. [enable_benchmarks=${enableval}],
  1046. [enable_benchmarks=no])
  1047. AC_MSG_RESULT($enable_benchmarks)
  1048. AM_CONDITIONAL([HAVE_BENCHMARKS], [test "x$enable_benchmarks" = "xyes"])
  1049. # should gnunet-testing be compiled
  1050. AC_MSG_CHECKING(wether to compile gnunet-testing)
  1051. AC_ARG_ENABLE([testing],
  1052. [AS_HELP_STRING([--disable-testing], [do not build gnunet-testing])],
  1053. [enable_testing=${enableval}],
  1054. [enable_testing=yes])
  1055. AC_MSG_RESULT($enable_testing)
  1056. AM_CONDITIONAL([HAVE_TESTING], [test "x$enable_testing" = "xyes"])
  1057. # should experimental code be compiled (code that may not yet compile)?
  1058. AC_MSG_CHECKING(whether to compile experimental code)
  1059. AC_ARG_ENABLE([experimental],
  1060. [AS_HELP_STRING([--enable-experimental], [enable compiling experimental code])],
  1061. [enable_experimental=${enableval}],
  1062. [enable_experimental=no])
  1063. AC_MSG_RESULT($enable_experimental)
  1064. AM_CONDITIONAL([HAVE_EXPERIMENTAL], [test "x$enable_experimental" = "xyes"])
  1065. # should malicious code be compiled (should only be used for testing)?
  1066. AC_MSG_CHECKING(whether to compile malicious code)
  1067. AC_ARG_ENABLE([malicious],
  1068. [AS_HELP_STRING([--enable-malicious], [enable compiling malicious code])],
  1069. [if test "x$enableval" = "xno"
  1070. then
  1071. malicious=0
  1072. else
  1073. malicious=1
  1074. fi],
  1075. [malicious=0
  1076. enable_malicious=no])
  1077. AC_MSG_RESULT($enable_malicious)
  1078. AM_CONDITIONAL([ENABLE_MALICIOUS], [$malicious])
  1079. AC_DEFINE_UNQUOTED([ENABLE_MALICIOUS], [$malicious],
  1080. [enable compilation of malicious code])
  1081. # should services be started by default when a peer starts? Some services may
  1082. # choose to never start by default and it is upto the service/module developer to
  1083. # decide it by having "AUTOSTART = NO" instead of "AUTOSTART = @AUTOSTART" in
  1084. # the service/module's conf.in file.
  1085. AUTOSTART="YES"
  1086. AC_MSG_CHECKING(whether to auto-start peer's services by default)
  1087. AC_ARG_ENABLE([autostart],
  1088. [AS_HELP_STRING([--disable-autostart], [do not start peer's services by default])],
  1089. [enable_autostart=${enableval}
  1090. if test "x$enable_autostart" == "xno"
  1091. then
  1092. AUTOSTART="NO"
  1093. fi
  1094. ],
  1095. [enable_autostart=yes])
  1096. AC_MSG_RESULT($enable_autostart)
  1097. #AM_CONDITIONAL([HAVE_AUTOSTART], [test "x$enable_autostart" = "xyes"])
  1098. AC_SUBST(AUTOSTART)
  1099. # should memory statistics be kept (very expensive CPU-wise!)
  1100. AC_MSG_CHECKING(whether to create expensive statistics on memory use)
  1101. AC_ARG_ENABLE([heapstats],
  1102. [AS_HELP_STRING([--enable-heapstats], [enable expensive heap statistics])],
  1103. [enable_heapstats=1],
  1104. [enable_heapstats=0])
  1105. AC_MSG_RESULT($enable_heapstats)
  1106. AC_DEFINE_UNQUOTED([ENABLE_HEAP_STATISTICS],$enable_heapstats,[enable expensive heap statistics])
  1107. # should code be enabled that works around missing OS functionality on Windows?
  1108. # used for test cases
  1109. if test $build_target = "mingw"
  1110. then
  1111. workarounds=1
  1112. AC_LINK_IFELSE(
  1113. [AC_LANG_PROGRAM(
  1114. [#include <ws2tcpip.h>
  1115. ],[
  1116. int s = socket (0, 0, 0);])
  1117. ],[
  1118. AC_DEFINE_UNQUOTED([HAVE_SOCKET],1,[Define this if socket() is available])
  1119. ],[
  1120. AC_DEFINE_UNQUOTED([HAVE_SOCKET],0,[Define this if socket() is available])
  1121. ])
  1122. AC_LINK_IFELSE(
  1123. [AC_LANG_PROGRAM(
  1124. [#include <ws2tcpip.h>
  1125. ],[
  1126. int s = select (0, NULL, NULL, NULL, NULL);])
  1127. ],[
  1128. AC_DEFINE_UNQUOTED([HAVE_SELECT],1,[Define this if select() is available])
  1129. ],[
  1130. AC_DEFINE_UNQUOTED([HAVE_SELECT],0,[Define this if select() is available])
  1131. ])
  1132. AC_LINK_IFELSE(
  1133. [AC_LANG_PROGRAM(
  1134. [#include <ws2tcpip.h>
  1135. ],[
  1136. struct in_addr i;
  1137. char *s = inet_ntoa (i);])
  1138. ],[
  1139. AC_DEFINE_UNQUOTED([HAVE_INET_NTOA],1,[Define this if inet_ntoa() is available])
  1140. ],[
  1141. AC_DEFINE_UNQUOTED([HAVE_INET_NTOA],0,[Define this if inet_ntoa() is available])
  1142. ])
  1143. AC_LINK_IFELSE(
  1144. [AC_LANG_PROGRAM(
  1145. [#include <ws2tcpip.h>
  1146. ],[
  1147. int s = getnameinfo (NULL, 0, NULL, 0, NULL, 0, 0);])
  1148. ],[
  1149. AC_DEFINE_UNQUOTED([HAVE_GETNAMEINFO],1,[Define this if getnameinfo() is available])
  1150. ],[
  1151. AC_DEFINE_UNQUOTED([HAVE_GETNAMEINFO],0,[Define this if getnameinfo() is available])
  1152. ])
  1153. AC_LINK_IFELSE(
  1154. [AC_LANG_PROGRAM(
  1155. [#include <ws2tcpip.h>
  1156. ],[
  1157. int s = gethostname (NULL, 0);])
  1158. ],[
  1159. AC_DEFINE_UNQUOTED([HAVE_GETHOSTNAME],1,[Define this if gethostname() is available])
  1160. ],[
  1161. AC_DEFINE_UNQUOTED([HAVE_GETHOSTNAME],0,[Define this if gethostname() is available])
  1162. ])
  1163. AC_LINK_IFELSE(
  1164. [AC_LANG_PROGRAM(
  1165. [#include <ws2tcpip.h>
  1166. ],[
  1167. void *s = gethostbyname (NULL);])
  1168. ],[
  1169. AC_DEFINE_UNQUOTED([HAVE_GETHOSTBYNAME],1,[Define this if gethostbyname() is available])
  1170. ],[
  1171. AC_DEFINE_UNQUOTED([HAVE_GETHOSTBYNAME],0,[Define this if gethostbyname() is available])
  1172. ])
  1173. AC_LINK_IFELSE(
  1174. [AC_LANG_PROGRAM(
  1175. [#include <ws2tcpip.h>
  1176. ],[
  1177. void *s = gethostbyaddr (NULL, 0, 0);])
  1178. ],[
  1179. AC_DEFINE_UNQUOTED([HAVE_GETHOSTBYADDR],1,[Define this if gethostbyaddr() is available])
  1180. ],[
  1181. AC_DEFINE_UNQUOTED([HAVE_GETHOSTBYADDR],0,[Define this if gethostbyaddr() is available])
  1182. ])
  1183. AC_LINK_IFELSE(
  1184. [AC_LANG_PROGRAM(
  1185. [#include <ws2tcpip.h>
  1186. ],[
  1187. int s = getaddrinfo (NULL, NULL, NULL, NULL);])
  1188. ],[
  1189. AC_DEFINE_UNQUOTED([HAVE_GETADDRINFO],1,[Define this if getaddrinfo() is available])
  1190. ],[
  1191. AC_DEFINE_UNQUOTED([HAVE_GETADDRINFO],1,[Define this if getaddrinfo() is available])
  1192. ])
  1193. else
  1194. AC_MSG_CHECKING(whether to enable windows workarounds)
  1195. AC_ARG_ENABLE([windows_workarounds],
  1196. [AS_HELP_STRING([--enable-windows_workarounds], [enable workarounds used on Windows (only useful for test cases)])],
  1197. [enable_workarounds=${enableval}],
  1198. [enable_workarounds=no])
  1199. AC_MSG_RESULT($enable_workarounds)
  1200. if test x$enable_windows_workarounds = "xyes"
  1201. then
  1202. workarounds=1
  1203. else
  1204. workarounds=0
  1205. fi
  1206. fi
  1207. AC_DEFINE_UNQUOTED([ENABLE_WINDOWS_WORKAROUNDS], $workarounds, [enable workarounds used on Windows (only useful for test cases)])
  1208. # gcov compilation
  1209. AC_MSG_CHECKING(whether to compile with support for code coverage analysis)
  1210. AC_ARG_ENABLE([coverage],
  1211. AS_HELP_STRING([--enable-coverage],
  1212. [compile the library with code coverage support]),
  1213. [use_gcov=${enableval}],
  1214. [use_gcov=no])
  1215. AC_MSG_RESULT($use_gcov)
  1216. AM_CONDITIONAL([USE_COVERAGE], [test "x$use_gcov" = "xyes"])
  1217. # version info
  1218. AC_PATH_PROG(svnversioncommand, svnversion)
  1219. AC_PATH_PROG(gitcommand, git)
  1220. AC_MSG_CHECKING(for source being under a VCS)
  1221. svn_version=
  1222. gitsvn_version=
  1223. AS_IF([test ! "X$svnversioncommand" = "X"],
  1224. [
  1225. svn_version=$(cd $srcdir ; $svnversioncommand -n 2>/dev/null)
  1226. ])
  1227. AS_IF([test ! "X$gitcommand" = "X"],
  1228. [
  1229. gitsvn_version=$(cd $srcdir ; git log -1 2>/dev/null | grep "git-svn-id" | sed -e 's/.*@\([[0-9]]\+\) .*/\1/')
  1230. ])
  1231. AS_IF([test "X$svn_version" = "X" -o "X$svn_version" = "Xexported" -o "X$svn_version" = "XUnversioned directory"],
  1232. [
  1233. AS_IF([test "X$gitsvn_version" = "X"],
  1234. [
  1235. vcs_name="no"
  1236. vcs_version="\"release\""
  1237. ],
  1238. [
  1239. vcs_name="yes, git-svn"
  1240. vcs_version="\"svn-r$gitsvn_version\""
  1241. ])
  1242. ],
  1243. [
  1244. vcs_name="yes, svn"
  1245. vcs_version="\"svn-r$svn_version\""
  1246. ])
  1247. AC_MSG_RESULT($vcs_name)
  1248. AC_MSG_CHECKING(VCS version)
  1249. AC_MSG_RESULT($vcs_version)
  1250. AC_DEFINE_UNQUOTED(VCS_VERSION, [$vcs_version], [VCS revision/hash or tarball version])
  1251. AC_CONFIG_FILES([
  1252. Makefile
  1253. contrib/Makefile
  1254. doc/Makefile
  1255. doc/man/Makefile
  1256. doc/doxygen/Makefile
  1257. m4/Makefile
  1258. po/Makefile.in
  1259. src/Makefile
  1260. src/arm/Makefile
  1261. src/arm/arm.conf
  1262. src/ats/Makefile
  1263. src/ats/ats.conf
  1264. src/ats-tool/Makefile
  1265. src/ats-tests/Makefile
  1266. src/block/Makefile
  1267. src/cadet/Makefile
  1268. src/cadet/cadet.conf
  1269. src/core/Makefile
  1270. src/core/core.conf
  1271. src/consensus/Makefile
  1272. src/consensus/consensus.conf
  1273. src/conversation/Makefile
  1274. src/conversation/conversation.conf
  1275. src/datacache/Makefile
  1276. src/datastore/Makefile
  1277. src/datastore/datastore.conf
  1278. src/dht/Makefile
  1279. src/dht/dht.conf
  1280. src/dns/Makefile
  1281. src/dns/dns.conf
  1282. src/dv/Makefile
  1283. src/dv/dv.conf
  1284. src/env/Makefile
  1285. src/exit/Makefile
  1286. src/experimentation/Makefile
  1287. src/experimentation/experimentation.conf
  1288. src/fragmentation/Makefile
  1289. src/fs/Makefile
  1290. src/fs/fs.conf
  1291. src/gns/Makefile
  1292. src/gns/gns.conf
  1293. src/gns/nss/Makefile
  1294. src/gnsrecord/Makefile
  1295. src/hello/Makefile
  1296. src/identity/Makefile
  1297. src/identity/identity.conf
  1298. src/include/Makefile
  1299. src/integration-tests/Makefile
  1300. src/hostlist/Makefile
  1301. src/multicast/Makefile
  1302. src/multicast/multicast.conf
  1303. src/mysql/Makefile
  1304. src/namecache/Makefile
  1305. src/namecache/namecache.conf
  1306. src/namestore/Makefile
  1307. src/namestore/namestore.conf
  1308. src/nat/Makefile
  1309. src/nse/Makefile
  1310. src/nse/nse.conf
  1311. src/peerinfo/Makefile
  1312. src/peerinfo/peerinfo.conf
  1313. src/peerinfo-tool/Makefile
  1314. src/peerstore/Makefile
  1315. src/peerstore/peerstore.conf
  1316. src/postgres/Makefile
  1317. src/psyc/Makefile
  1318. src/psyc/psyc.conf
  1319. src/psycstore/Makefile
  1320. src/psycstore/psycstore.conf
  1321. src/pt/Makefile
  1322. src/regex/Makefile
  1323. src/regex/regex.conf
  1324. src/revocation/Makefile
  1325. src/revocation/revocation.conf
  1326. src/secretsharing/Makefile
  1327. src/secretsharing/secretsharing.conf
  1328. src/sensor/Makefile
  1329. src/sensor/sensor.conf
  1330. src/sensordashboard/Makefile
  1331. src/sensordashboard/sensordashboard.conf
  1332. src/scalarproduct/Makefile
  1333. src/scalarproduct/scalarproduct.conf
  1334. src/set/Makefile
  1335. src/set/set.conf
  1336. src/social/Makefile
  1337. src/social/social.conf
  1338. src/statistics/Makefile
  1339. src/statistics/statistics.conf
  1340. src/template/Makefile
  1341. src/testbed/Makefile
  1342. src/testbed/testbed.conf
  1343. src/testing/Makefile
  1344. src/topology/Makefile
  1345. src/transport/Makefile
  1346. src/transport/transport.conf
  1347. src/tun/Makefile
  1348. src/util/Makefile
  1349. src/util/resolver.conf
  1350. src/vpn/Makefile
  1351. src/vpn/vpn.conf
  1352. pkgconfig/Makefile
  1353. pkgconfig/gnunetarm.pc
  1354. pkgconfig/gnunetats.pc
  1355. pkgconfig/gnunetblock.pc
  1356. pkgconfig/gnunetcadet.pc
  1357. pkgconfig/gnunetconsensus.pc
  1358. pkgconfig/gnunetconversation.pc
  1359. pkgconfig/gnunetcore.pc
  1360. pkgconfig/gnunetdatacache.pc
  1361. pkgconfig/gnunetdatastore.pc
  1362. pkgconfig/gnunetdht.pc
  1363. pkgconfig/gnunetdns.pc
  1364. pkgconfig/gnunetdnsparser.pc
  1365. pkgconfig/gnunetdnsstub.pc
  1366. pkgconfig/gnunetdv.pc
  1367. pkgconfig/gnunetenv.pc
  1368. pkgconfig/gnunetfragmentation.pc
  1369. pkgconfig/gnunetfs.pc
  1370. pkgconfig/gnunetgns.pc
  1371. pkgconfig/gnunethello.pc
  1372. pkgconfig/gnunetidentity.pc
  1373. pkgconfig/gnunetmicrophone.pc
  1374. pkgconfig/gnunetmulticast.pc
  1375. pkgconfig/gnunetmysql.pc
  1376. pkgconfig/gnunetnamestore.pc
  1377. pkgconfig/gnunetnat.pc
  1378. pkgconfig/gnunetnse.pc
  1379. pkgconfig/gnunetpeerinfo.pc
  1380. pkgconfig/gnunetpostgres.pc
  1381. pkgconfig/gnunetpsyc.pc
  1382. pkgconfig/gnunetpsycstore.pc
  1383. pkgconfig/gnunetregex.pc
  1384. pkgconfig/gnunetrevocation.pc
  1385. pkgconfig/gnunetscalarproduct.pc
  1386. pkgconfig/gnunetset.pc
  1387. pkgconfig/gnunetsocial.pc
  1388. pkgconfig/gnunetspeaker.pc
  1389. pkgconfig/gnunetstatistics.pc
  1390. pkgconfig/gnunettestbed.pc
  1391. pkgconfig/gnunettesting.pc
  1392. pkgconfig/gnunettransport.pc
  1393. pkgconfig/gnunettun.pc
  1394. pkgconfig/gnunetutil.pc
  1395. pkgconfig/gnunetvpn.pc
  1396. ])
  1397. AC_OUTPUT
  1398. # Finally: summary!
  1399. # warn user if mysql found but not used due to version
  1400. if test "$mysqlfail" = "true"
  1401. then
  1402. AC_MSG_NOTICE([NOTICE: MySQL found, but too old. MySQL support will not be compiled.])
  1403. fi
  1404. # sqlite
  1405. if test "x$sqlite" = "x0"
  1406. then
  1407. AC_MSG_ERROR([ERROR: sqlite3 not found, but sqlite3 is required.])
  1408. fi
  1409. # libgnurl
  1410. if test "x$gnurl" = "x0"
  1411. then
  1412. AC_MSG_NOTICE([NOTICE: libgnurl not found. http client support will not be compiled.])
  1413. AC_MSG_WARN([libgnurl not found. hostlist daemon will not be compiled, and you probably WANT hostlist daemon])
  1414. fi
  1415. # bluetooth
  1416. if test "x$bluetooth" = "x0"
  1417. then
  1418. AC_MSG_NOTICE([NOTICE: bluetooth library not found. bluetooth support will not be compiled.])
  1419. fi
  1420. #gnutls
  1421. if test x$gnutls != xtrue
  1422. then
  1423. AC_MSG_NOTICE([NOTICE: GnuTLS not found, gnunet-gns-proxy will not be built])
  1424. else
  1425. if test "x$gnutls_dane" != "x1"
  1426. then
  1427. AC_MSG_NOTICE([NOTICE: GnuTLS has no DANE support, DANE validation will not be possible])
  1428. fi
  1429. fi
  1430. # java ports
  1431. if test "x$enable_java_ports" = "xyes"
  1432. then
  1433. AC_MSG_NOTICE([NOTICE: opening ports for gnunet-java bindings by default.])
  1434. fi
  1435. # MHD
  1436. if test "x$lmhd" != "x1"
  1437. then
  1438. AC_MSG_NOTICE([NOTICE: libmicrohttpd not found, http transport will not be installed.])
  1439. fi
  1440. # conversation
  1441. if test "x$conversation_backend" == "xnone"
  1442. then
  1443. if test "x$pulse" != "x1"
  1444. then
  1445. AC_MSG_NOTICE([NOTICE: libpulse(audio) not found, conversation will not be built.])
  1446. fi
  1447. if test "x$opus" != "x1"
  1448. then
  1449. AC_MSG_NOTICE([NOTICE: libopus not found, conversation will not be built.])
  1450. fi
  1451. if test "x$gst" != "x1"
  1452. then
  1453. AC_MSG_NOTICE([NOTICE: GStreamer not found, conversation will not be built.])
  1454. fi
  1455. fi
  1456. AC_MSG_NOTICE([NOTICE: Database support is set to MySQL: $mysql, SQLite: $sqlite, Postgres: $postgres])
  1457. if test "$enable_framework_build" = "yes"
  1458. then
  1459. AC_MSG_NOTICE([NOTICE: Mac OS X framework build enabled.])
  1460. fi
  1461. if test "x$SUDO_BINARY" = "x" -a ! -w /
  1462. then
  1463. AC_MSG_NOTICE([NOTICE: --with-sudo not specified and not running as 'root', will not install GNS NSS library])
  1464. fi
  1465. AC_MSG_NOTICE([********************************************
  1466. Please make sure NOW that you have created a user and group 'gnunet'
  1467. and additionally a group 'gnunetdns':
  1468. addgroup gnunetdns
  1469. adduser gnunet
  1470. Make sure that '/var/lib/gnunet' is owned (and writable) by user
  1471. 'gnunet'. Then, you can compile GNUnet with
  1472. make
  1473. After that, run (if necessary as 'root')
  1474. make install
  1475. to install everything.
  1476. Each GNUnet user should be added to the 'gnunet' group (may
  1477. require fresh login to come into effect):
  1478. adduser USERNAME gnunet
  1479. (run the above command as root once for each of your users, replacing
  1480. "USERNAME" with the respective login names). If you have a global IP
  1481. address, no further configuration is required.
  1482. Optionally, download and compile gnunet-gtk to get a GUI for
  1483. file-sharing and configuration. This is particularly recommended
  1484. if your network setup is non-trivial, as gnunet-setup can be
  1485. used to test in the GUI if your network configuration is working.
  1486. gnunet-setup should be run as the "gnunet" user under X. As it
  1487. does very little with the network, running it as "root" is likely
  1488. also harmless. You can also run it as a normal user, but then
  1489. you have to copy ~/.gnunet/gnunet.conf" over to the "gnunet" user's
  1490. home directory in the end.
  1491. Once you have configured your peer, run (as the 'gnunet' user)
  1492. gnunet-arm -s
  1493. to start the peer. You can then run the various GNUnet-tools as
  1494. your "normal" user (who should only be in the group 'gnunet').
  1495. ********************************************])