configure.ac 83 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083
  1. #
  2. # Copyright (C) 2007-2017 Tobias Brunner
  3. # Copyright (C) 2006-2017 Andreas Steffen
  4. # Copyright (C) 2006-2014 Martin Willi
  5. # HSR Hochschule fuer Technik Rapperswil
  6. #
  7. # This program is free software; you can redistribute it and/or modify it
  8. # under the terms of the GNU General Public License as published by the
  9. # Free Software Foundation; either version 2 of the License, or (at your
  10. # option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
  11. #
  12. # This program is distributed in the hope that it will be useful, but
  13. # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
  14. # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
  15. # for more details.
  16. #
  17. # ============================
  18. # initialize & set some vars
  19. # ============================
  20. AC_INIT([strongSwan],[5.8.1])
  21. AM_INIT_AUTOMAKE(m4_esyscmd([
  22. echo tar-ustar
  23. echo subdir-objects
  24. case `automake --version | head -n 1` in
  25. *" 1.9"*);;
  26. *" 1.10"*);;
  27. *" 1.11"*);;
  28. # don't use parallel test harness in 1.12 and up
  29. *) echo serial-tests;;
  30. esac
  31. ]))
  32. m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES])
  33. AC_CONFIG_MACRO_DIR([m4/config])
  34. AC_CONFIG_HEADERS([config.h])
  35. AC_DEFINE([CONFIG_H_INCLUDED], [], [defined if config.h included])
  36. AC_DISABLE_STATIC
  37. PKG_PROG_PKG_CONFIG
  38. m4_include(m4/macros/split-package-version.m4)
  39. SPLIT_PACKAGE_VERSION
  40. # =================================
  41. # check --enable-xxx & --with-xxx
  42. # =================================
  43. m4_include(m4/macros/with.m4)
  44. ARG_WITH_SUBST([random-device], [/dev/random], [set the device to read real random data from])
  45. ARG_WITH_SUBST([urandom-device], [/dev/urandom], [set the device to read pseudo random data from])
  46. ARG_WITH_SUBST([strongswan-conf], [${sysconfdir}/strongswan.conf], [set the strongswan.conf file location])
  47. ARG_WITH_SUBST([resolv-conf], [${sysconfdir}/resolv.conf], [set the file to use in DNS handler plugin])
  48. ARG_WITH_SUBST([piddir], [/var/run], [set path for PID and UNIX socket files])
  49. ARG_WITH_SUBST([ipsecdir], [${libexecdir%/}/ipsec], [set installation path for ipsec tools])
  50. ARG_WITH_SUBST([ipseclibdir], [${libdir%/}/ipsec], [set installation path for ipsec libraries])
  51. ARG_WITH_SUBST([plugindir], [${ipseclibdir%/}/plugins], [set the installation path of plugins])
  52. ARG_WITH_SUBST([imcvdir], [${ipseclibdir%/}/imcvs], [set the installation path of IMC and IMV dynamic librariers])
  53. ARG_WITH_SUBST([nm-ca-dir], [/usr/share/ca-certificates], [directory the NM backend uses to look up trusted root certificates])
  54. ARG_WITH_SUBST([swanctldir], [${sysconfdir}/swanctl], [base directory for swanctl configuration files and credentials])
  55. ARG_WITH_SUBST([linux-headers], [\${top_srcdir}/src/include], [set directory of linux header files to use])
  56. ARG_WITH_SUBST([routing-table], [220], [set routing table to use for IPsec routes])
  57. ARG_WITH_SUBST([routing-table-prio], [220], [set priority for IPsec routing table])
  58. ARG_WITH_SUBST([ipsec-script], [ipsec], [change the name of the ipsec script])
  59. ARG_WITH_SUBST([fips-mode], [0], [set openssl FIPS mode: disabled(0), enabled(1), Suite B enabled(2)])
  60. ARG_WITH_SUBST([libfuzzer], [], [-fsanitize=fuzzer or path to libFuzzer.a, a local driver is used if not specified])
  61. ARG_WITH_SET([capabilities], [no], [set capability dropping library. Currently supported values are "libcap" and "native"])
  62. ARG_WITH_SET([mpz_powm_sec], [yes], [use the more side-channel resistant mpz_powm_sec in libgmp, if available])
  63. ARG_WITH_SET([dev-headers], [no], [install strongSwan development headers to directory.])
  64. ARG_WITH_SET([printf-hooks], [auto], [force the use of a specific printf hook implementation (auto, builtin, glibc, vstr).])
  65. ARG_WITH_SET([rubygemdir], ["gem environment gemdir"], [path to install ruby gems to])
  66. ARG_WITH_SET([pythoneggdir], ["main site-packages directory"], [path to install python eggs to to])
  67. if test -n "$PKG_CONFIG"; then
  68. systemdsystemunitdir_default=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)
  69. fi
  70. ARG_WITH_SET([systemdsystemunitdir], [$systemdsystemunitdir_default], [directory for systemd service files])
  71. AC_SUBST(systemdsystemunitdir)
  72. AC_ARG_WITH(
  73. [user],
  74. AS_HELP_STRING([--with-user=user],[change user of the daemons to "user" after startup (default is "root").]),
  75. [AC_DEFINE_UNQUOTED([IPSEC_USER], "$withval", [username to run daemon with])
  76. AC_SUBST(ipsecuser, "$withval")],
  77. [AC_SUBST(ipsecuser, "root")]
  78. )
  79. AC_ARG_WITH(
  80. [group],
  81. AS_HELP_STRING([--with-group=group],[change group of the daemons to "group" after startup (default is "root").]),
  82. [AC_DEFINE_UNQUOTED(IPSEC_GROUP, "$withval", [groupname to run daemon with])
  83. AC_SUBST(ipsecgroup, "$withval")],
  84. [AC_SUBST(ipsecgroup, "root")]
  85. )
  86. AC_ARG_WITH(
  87. [charon-udp-port],
  88. AS_HELP_STRING([--with-charon-udp-port=port],[UDP port used by charon locally (default 500). Set to 0 to allocate randomly.]),
  89. [AC_DEFINE_UNQUOTED(CHARON_UDP_PORT, [$withval], [UDP port used by charon locally])
  90. AC_SUBST(charon_udp_port, [$withval])],
  91. [AC_SUBST(charon_udp_port, 500)]
  92. )
  93. AC_ARG_WITH(
  94. [charon-natt-port],
  95. AS_HELP_STRING([--with-charon-natt-port=port],[UDP port used by charon locally in case a NAT is detected (must be different from charon-udp-port, default 4500). Set to 0 to allocate randomly.]),
  96. [AC_DEFINE_UNQUOTED(CHARON_NATT_PORT, [$withval], [UDP post used by charon locally in case a NAT is detected])
  97. AC_SUBST(charon_natt_port, [$withval])],
  98. [AC_SUBST(charon_natt_port, 4500)]
  99. )
  100. AC_MSG_CHECKING([configured UDP ports ($charon_udp_port, $charon_natt_port)])
  101. if test x$charon_udp_port != x0 -a x$charon_udp_port = x$charon_natt_port; then
  102. AC_MSG_ERROR(the ports have to be different)
  103. else
  104. AC_MSG_RESULT(ok)
  105. fi
  106. # convert script name to uppercase
  107. AC_SUBST(ipsec_script_upper, [`echo -n "$ipsec_script" | tr a-z A-Z`])
  108. m4_include(m4/macros/enable-disable.m4)
  109. # crypto plugins
  110. ARG_DISBL_SET([aes], [disable AES software implementation plugin.])
  111. ARG_ENABL_SET([af-alg], [enable AF_ALG crypto interface to Linux Crypto API.])
  112. ARG_ENABL_SET([bliss], [enable BLISS software implementation plugin.])
  113. ARG_ENABL_SET([blowfish], [enable Blowfish software implementation plugin.])
  114. ARG_ENABL_SET([botan], [enables the Botan crypto plugin.])
  115. ARG_ENABL_SET([ccm], [enables the CCM AEAD wrapper crypto plugin.])
  116. ARG_ENABL_SET([chapoly], [enables the ChaCha20/Poly1305 AEAD plugin.])
  117. ARG_DISBL_SET([cmac], [disable CMAC crypto implementation plugin.])
  118. ARG_ENABL_SET([ctr], [enables the Counter Mode wrapper crypto plugin.])
  119. ARG_DISBL_SET([des], [disable DES/3DES software implementation plugin.])
  120. ARG_DISBL_SET([fips-prf], [disable FIPS PRF software implementation plugin.])
  121. ARG_ENABL_SET([gcm], [enables the GCM AEAD wrapper crypto plugin.])
  122. ARG_ENABL_SET([gcrypt], [enables the libgcrypt plugin.])
  123. ARG_DISBL_SET([gmp], [disable GNU MP (libgmp) based crypto implementation plugin.])
  124. ARG_DISBL_SET([curve25519], [disable Curve25519 Diffie-Hellman plugin.])
  125. ARG_DISBL_SET([hmac], [disable HMAC crypto implementation plugin.])
  126. ARG_ENABL_SET([md4], [enable MD4 software implementation plugin.])
  127. ARG_DISBL_SET([md5], [disable MD5 software implementation plugin.])
  128. ARG_ENABL_SET([mgf1], [enable the MGF1 software implementation plugin.])
  129. ARG_ENABL_SET([newhope], [enable New Hope crypto plugin.])
  130. ARG_DISBL_SET([nonce], [disable nonce generation plugin.])
  131. ARG_ENABL_SET([ntru], [enables the NTRU crypto plugin.])
  132. ARG_ENABL_SET([openssl], [enables the OpenSSL crypto plugin.])
  133. ARG_ENABL_SET([wolfssl], [enables the wolfSSL crypto plugin.])
  134. ARG_ENABL_SET([padlock], [enables VIA Padlock crypto plugin.])
  135. ARG_DISBL_SET([random], [disable RNG implementation on top of /dev/(u)random.])
  136. ARG_DISBL_SET([rc2], [disable RC2 software implementation plugin.])
  137. ARG_ENABL_SET([rdrand], [enable Intel RDRAND random generator plugin.])
  138. ARG_ENABL_SET([aesni], [enable Intel AES-NI crypto plugin.])
  139. ARG_DISBL_SET([sha1], [disable SHA1 software implementation plugin.])
  140. ARG_DISBL_SET([sha2], [disable SHA256/SHA384/SHA512 software implementation plugin.])
  141. ARG_ENABL_SET([sha3], [enable SHA3_224/SHA3_256/SHA3_384/SHA3_512 software implementation plugin.])
  142. ARG_DISBL_SET([xcbc], [disable xcbc crypto implementation plugin.])
  143. # encoding/decoding plugins
  144. ARG_DISBL_SET([dnskey], [disable DNS RR key decoding plugin.])
  145. ARG_DISBL_SET([pem], [disable PEM decoding plugin.])
  146. ARG_DISBL_SET([pgp], [disable PGP key decoding plugin.])
  147. ARG_DISBL_SET([pkcs1], [disable PKCS1 key decoding plugin.])
  148. ARG_DISBL_SET([pkcs7], [disable PKCS7 container support plugin.])
  149. ARG_DISBL_SET([pkcs8], [disable PKCS8 private key decoding plugin.])
  150. ARG_DISBL_SET([pkcs12], [disable PKCS12 container support plugin.])
  151. ARG_DISBL_SET([pubkey], [disable RAW public key support plugin.])
  152. ARG_DISBL_SET([sshkey], [disable SSH key decoding plugin.])
  153. ARG_DISBL_SET([x509], [disable X509 certificate implementation plugin.])
  154. # fetcher/resolver plugins
  155. ARG_ENABL_SET([curl], [enable CURL fetcher plugin to fetch files via libcurl. Requires libcurl.])
  156. ARG_ENABL_SET([files], [enable simple file:// URI fetcher.])
  157. ARG_ENABL_SET([ldap], [enable LDAP fetching plugin to fetch files via libldap. Requires openLDAP.])
  158. ARG_ENABL_SET([soup], [enable soup fetcher plugin to fetch from HTTP via libsoup. Requires libsoup.])
  159. ARG_ENABL_SET([unbound], [enable UNBOUND resolver plugin to perform DNS queries via libunbound. Requires libldns and libunbound.])
  160. ARG_ENABL_SET([winhttp], [enable WinHTTP based HTTP/HTTPS fetching plugin.])
  161. # database plugins
  162. ARG_ENABL_SET([mysql], [enable MySQL database support. Requires libmysqlclient_r.])
  163. ARG_ENABL_SET([sqlite], [enable SQLite database support. Requires libsqlite3.])
  164. # authentication/credential plugins
  165. ARG_ENABL_SET([addrblock], [enables RFC 3779 address block constraint support.])
  166. ARG_ENABL_SET([acert], [enable X509 attribute certificate checking plugin.])
  167. ARG_ENABL_SET([agent], [enables the ssh-agent signing plugin.])
  168. ARG_DISBL_SET([constraints], [disable advanced X509 constraint checking plugin.])
  169. ARG_ENABL_SET([coupling], [enable IKEv2 plugin to couple peer certificates permanently to authentication.])
  170. ARG_ENABL_SET([dnscert], [enable DNSCERT authentication plugin.])
  171. ARG_ENABL_SET([eap-sim], [enable SIM authentication module for EAP.])
  172. ARG_ENABL_SET([eap-sim-file], [enable EAP-SIM backend based on a triplet file.])
  173. ARG_ENABL_SET([eap-sim-pcsc], [enable EAP-SIM backend based on a smartcard reader. Requires libpcsclite.])
  174. ARG_ENABL_SET([eap-aka], [enable EAP AKA authentication module.])
  175. ARG_ENABL_SET([eap-aka-3gpp], [enable EAP AKA backend implementing 3GPP MILENAGE algorithms in software.])
  176. ARG_ENABL_SET([eap-aka-3gpp2], [enable EAP AKA backend implementing 3GPP2 algorithms in software. Requires libgmp.])
  177. ARG_ENABL_SET([eap-simaka-sql], [enable EAP-SIM/AKA backend based on a triplet/quintuplet SQL database.])
  178. ARG_ENABL_SET([eap-simaka-pseudonym], [enable EAP-SIM/AKA pseudonym storage plugin.])
  179. ARG_ENABL_SET([eap-simaka-reauth], [enable EAP-SIM/AKA reauthentication data storage plugin.])
  180. ARG_ENABL_SET([eap-identity], [enable EAP module providing EAP-Identity helper.])
  181. ARG_ENABL_SET([eap-md5], [enable EAP MD5 (CHAP) authentication module.])
  182. ARG_ENABL_SET([eap-gtc], [enable EAP GTC authentication module.])
  183. ARG_ENABL_SET([eap-mschapv2], [enable EAP MS-CHAPv2 authentication module.])
  184. ARG_ENABL_SET([eap-tls], [enable EAP TLS authentication module.])
  185. ARG_ENABL_SET([eap-ttls], [enable EAP TTLS authentication module.])
  186. ARG_ENABL_SET([eap-peap], [enable EAP PEAP authentication module.])
  187. ARG_ENABL_SET([eap-tnc], [enable EAP TNC trusted network connect module.])
  188. ARG_ENABL_SET([eap-dynamic], [enable dynamic EAP proxy module.])
  189. ARG_ENABL_SET([eap-radius], [enable RADIUS proxy authentication module.])
  190. ARG_ENABL_SET([ext-auth], [enable plugin calling an external authorization script.])
  191. ARG_ENABL_SET([ipseckey], [enable IPSECKEY authentication plugin.])
  192. ARG_ENABL_SET([keychain], [enables OS X Keychain Services credential set.])
  193. ARG_ENABL_SET([pkcs11], [enables the PKCS11 token support plugin.])
  194. ARG_ENABL_SET([tpm], [enables the TPM plugin.])
  195. ARG_DISBL_SET([revocation], [disable X509 CRL/OCSP revocation check plugin.])
  196. ARG_ENABL_SET([whitelist], [enable peer identity whitelisting plugin.])
  197. ARG_DISBL_SET([xauth-generic], [disable generic XAuth backend.])
  198. ARG_ENABL_SET([xauth-eap], [enable XAuth backend using EAP methods to verify passwords.])
  199. ARG_ENABL_SET([xauth-pam], [enable XAuth backend using PAM to verify passwords.])
  200. ARG_ENABL_SET([xauth-noauth], [enable XAuth pseudo-backend that does not actually verify or even request any credentials.])
  201. # kernel interfaces / sockets
  202. ARG_DISBL_SET([kernel-netlink], [disable the netlink kernel interface.])
  203. ARG_ENABL_SET([kernel-pfkey], [enable the PF_KEY kernel interface.])
  204. ARG_ENABL_SET([kernel-pfroute], [enable the PF_ROUTE kernel interface.])
  205. ARG_ENABL_SET([kernel-iph], [enable the Windows IP Helper based networking backend.])
  206. ARG_ENABL_SET([kernel-libipsec],[enable the libipsec kernel interface.])
  207. ARG_ENABL_SET([kernel-wfp], [enable the Windows Filtering Platform IPsec backend.])
  208. ARG_DISBL_SET([socket-default], [disable default socket implementation for charon.])
  209. ARG_ENABL_SET([socket-dynamic], [enable dynamic socket implementation for charon])
  210. ARG_ENABL_SET([socket-win], [enable Winsock2 based socket implementation for charon])
  211. # configuration/control plugins
  212. ARG_DISBL_SET([stroke], [disable charons stroke configuration backend.])
  213. ARG_ENABL_SET([smp], [enable SMP configuration and control interface. Requires libxml.])
  214. ARG_ENABL_SET([sql], [enable SQL database configuration backend.])
  215. ARG_ENABL_SET([uci], [enable OpenWRT UCI configuration plugin.])
  216. ARG_DISBL_SET([vici], [disable strongSwan IKE generic IPC interface plugin.])
  217. # attribute provider/consumer plugins
  218. ARG_ENABL_SET([android-dns], [enable Android specific DNS handler.])
  219. ARG_DISBL_SET([attr], [disable strongswan.conf based configuration attribute plugin.])
  220. ARG_ENABL_SET([attr-sql], [enable SQL based configuration attribute plugin.])
  221. ARG_ENABL_SET([dhcp], [enable DHCP based attribute provider plugin.])
  222. ARG_ENABL_SET([osx-attr], [enable OS X SystemConfiguration attribute handler.])
  223. ARG_ENABL_SET([p-cscf], [enable plugin to request P-CSCF server addresses from an ePDG.])
  224. ARG_DISBL_SET([resolve], [disable resolve DNS handler plugin.])
  225. ARG_ENABL_SET([unity], [enables Cisco Unity extension plugin.])
  226. # TNC modules/plugins
  227. ARG_ENABL_SET([imc-test], [enable IMC test module.])
  228. ARG_ENABL_SET([imv-test], [enable IMV test module.])
  229. ARG_ENABL_SET([imc-scanner], [enable IMC port scanner module.])
  230. ARG_ENABL_SET([imv-scanner], [enable IMV port scanner module.])
  231. ARG_ENABL_SET([imc-os], [enable IMC operating system module.])
  232. ARG_ENABL_SET([imv-os], [enable IMV operating system module.])
  233. ARG_ENABL_SET([imc-attestation],[enable IMC attestation module.])
  234. ARG_ENABL_SET([imv-attestation],[enable IMV attestation module.])
  235. ARG_ENABL_SET([imc-swima], [enable IMC swima module.])
  236. ARG_ENABL_SET([imv-swima], [enable IMV swima module.])
  237. ARG_ENABL_SET([imc-hcd], [enable IMC hcd module.])
  238. ARG_ENABL_SET([imv-hcd], [enable IMV hcd module.])
  239. ARG_ENABL_SET([tnc-ifmap], [enable TNC IF-MAP module. Requires libxml])
  240. ARG_ENABL_SET([tnc-imc], [enable TNC IMC module.])
  241. ARG_ENABL_SET([tnc-imv], [enable TNC IMV module.])
  242. ARG_ENABL_SET([tnc-pdp], [enable TNC policy decision point module.])
  243. ARG_ENABL_SET([tnccs-11], [enable TNCCS 1.1 protocol module. Requires libxml])
  244. ARG_ENABL_SET([tnccs-20], [enable TNCCS 2.0 protocol module.])
  245. ARG_ENABL_SET([tnccs-dynamic], [enable dynamic TNCCS protocol discovery module.])
  246. # misc plugins
  247. ARG_ENABL_SET([android-log], [enable Android specific logger plugin.])
  248. ARG_ENABL_SET([bypass-lan], [enable plugin to install bypass policies for local subnets.])
  249. ARG_ENABL_SET([certexpire], [enable CSV export of expiration dates of used certificates.])
  250. ARG_ENABL_SET([connmark], [enable connmark plugin using conntrack based marks to select return path SA.])
  251. ARG_ENABL_SET([counters], [enable plugin that collects several performance counters.])
  252. ARG_ENABL_SET([forecast], [enable forecast plugin forwarding broadcast/multicast messages.])
  253. ARG_ENABL_SET([duplicheck], [advanced duplicate checking plugin using liveness checks.])
  254. ARG_ENABL_SET([error-notify], [enable error notification plugin.])
  255. ARG_ENABL_SET([farp], [enable ARP faking plugin that responds to ARP requests to peers virtual IP])
  256. ARG_ENABL_SET([ha], [enable high availability cluster plugin.])
  257. ARG_ENABL_SET([led], [enable plugin to control LEDs on IKEv2 activity using the Linux kernel LED subsystem.])
  258. ARG_ENABL_SET([load-tester], [enable load testing plugin for IKEv2 daemon.])
  259. ARG_ENABL_SET([lookip], [enable fast virtual IP lookup and notification plugin.])
  260. ARG_ENABL_SET([radattr], [enable plugin to inject and process custom RADIUS attributes as IKEv2 client.])
  261. ARG_ENABL_SET([save-keys], [enable development/debugging plugin that saves IKE and ESP keys in Wireshark format.])
  262. ARG_ENABL_SET([systime-fix], [enable plugin to handle cert lifetimes with invalid system time gracefully.])
  263. ARG_ENABL_SET([test-vectors], [enable plugin providing crypto test vectors.])
  264. ARG_DISBL_SET([updown], [disable updown firewall script plugin.])
  265. # programs/components
  266. ARG_ENABL_SET([aikgen], [enable AIK generator for TPM 1.2.])
  267. ARG_DISBL_SET([charon], [disable the IKEv1/IKEv2 keying daemon charon.])
  268. ARG_ENABL_SET([cmd], [enable the command line IKE client charon-cmd.])
  269. ARG_ENABL_SET([conftest], [enforce Suite B conformance test framework.])
  270. ARG_ENABL_SET([fast], [enable libfast (FastCGI Application Server w/ templates.])
  271. ARG_ENABL_SET([fuzzing], [enable fuzzing scripts (found in directory fuzz).])
  272. ARG_ENABL_SET([libipsec], [enable user space IPsec implementation.])
  273. ARG_ENABL_SET([manager], [enable web management console (proof of concept).])
  274. ARG_ENABL_SET([medcli], [enable mediation client configuration database plugin.])
  275. ARG_ENABL_SET([medsrv], [enable mediation server web frontend and daemon plugin.])
  276. ARG_ENABL_SET([nm], [enable NetworkManager backend.])
  277. ARG_DISBL_SET([pki], [disable pki certificate utility.])
  278. ARG_DISBL_SET([scepclient], [disable SCEP client tool.])
  279. ARG_DISBL_SET([scripts], [disable additional utilities (found in directory scripts).])
  280. ARG_ENABL_SET([svc], [enable charon Windows service.])
  281. ARG_ENABL_SET([systemd], [enable systemd specific IKE daemon charon-systemd.])
  282. ARG_DISBL_SET([swanctl], [disable swanctl configuration and control tool.])
  283. ARG_ENABL_SET([tkm], [enable Trusted Key Manager support.])
  284. # optional features
  285. ARG_ENABL_SET([bfd-backtraces], [use binutils libbfd to resolve backtraces for memory leaks and segfaults.])
  286. ARG_ENABL_SET([dbghelp-backtraces],[use dbghlp.dll on Windows to create and print backtraces for memory leaks and segfaults.])
  287. ARG_DISBL_SET([ikev1], [disable IKEv1 protocol support in charon.])
  288. ARG_DISBL_SET([ikev2], [disable IKEv2 protocol support in charon.])
  289. ARG_ENABL_SET([integrity-test], [enable integrity testing of libstrongswan and plugins.])
  290. ARG_DISBL_SET([load-warning], [disable the charon plugin load option warning in starter.])
  291. ARG_ENABL_SET([mediation], [enable IKEv2 Mediation Extension.])
  292. ARG_ENABL_SET([unwind-backtraces],[use libunwind to create backtraces for memory leaks and segfaults.])
  293. ARG_ENABL_SET([ruby-gems], [enable build of provided ruby gems.])
  294. ARG_ENABL_SET([ruby-gems-install],[enable installation of provided ruby gems.])
  295. ARG_ENABL_SET([python-eggs], [enable build of provided python eggs.])
  296. ARG_ENABL_SET([python-eggs-install],[enable installation of provided python eggs.])
  297. ARG_ENABL_SET([perl-cpan], [enable build of provided perl CPAN module.])
  298. ARG_ENABL_SET([perl-cpan-install],[enable installation of provided CPAN module.])
  299. ARG_ENABL_SET([tss-trousers], [enable the use of the TrouSerS Trusted Software Stack])
  300. ARG_ENABL_SET([tss-tss2], [enable the use of the TSS 2.0 Trusted Software Stack])
  301. # compile options
  302. ARG_ENABL_SET([coverage], [enable lcov coverage report generation.])
  303. ARG_ENABL_SET([leak-detective], [enable malloc hooks to find memory leaks.])
  304. ARG_ENABL_SET([lock-profiler], [enable lock/mutex profiling code.])
  305. ARG_ENABL_SET([log-thread-ids], [use thread ID, if available, instead of an incremented value starting from 1, to identify threads.])
  306. ARG_ENABL_SET([monolithic], [build monolithic version of libstrongswan that includes all enabled plugins. Similarly, the plugins of charon are assembled in libcharon.])
  307. # ===================================
  308. # option to disable default options
  309. # ===================================
  310. ARG_DISBL_SET([defaults], [disable all default plugins (they can be enabled with their respective --enable options)])
  311. if test x$defaults = xfalse; then
  312. for option in $enabled_by_default; do
  313. eval test x\${${option}_given} = xtrue && continue
  314. eval $option=false
  315. done
  316. fi
  317. # ==============================
  318. # option to enable all options
  319. # ==============================
  320. ARG_ENABL_SET([all], [enable all plugins and features (they can be disabled with their respective --disable options). Mainly for testing.])
  321. if test x$all_given = xtrue; then
  322. for option in $disabled_by_default; do
  323. eval test x\${${option}_given} = xtrue && continue
  324. eval $option=true
  325. done
  326. fi
  327. # ===========================
  328. # set up compiler and flags
  329. # ===========================
  330. if test -z "$CFLAGS"; then
  331. CFLAGS="-g -O2 -Wall -Wno-format -Wno-format-security -Wno-pointer-sign"
  332. fi
  333. AC_SUBST(PLUGIN_CFLAGS)
  334. AC_PROG_CC
  335. AM_PROG_CC_C_O
  336. AC_LIB_PREFIX
  337. AC_C_BIGENDIAN
  338. # =========================
  339. # check required programs
  340. # =========================
  341. LT_INIT
  342. AC_PROG_INSTALL
  343. AC_PROG_EGREP
  344. AC_PROG_AWK
  345. AC_PROG_LEX
  346. AC_PROG_YACC
  347. AM_PATH_PYTHON(,,[:])
  348. AC_PATH_PROG([PERL], [perl], [], [$PATH:/bin:/usr/bin:/usr/local/bin])
  349. AC_PATH_PROG([GPERF], [gperf], [], [$PATH:/bin:/usr/bin:/usr/local/bin])
  350. # because gperf is not needed by end-users we just report it but do not abort on failure
  351. AC_MSG_CHECKING([gperf version >= 3.0.0])
  352. if test -x "$GPERF"; then
  353. if test "`$GPERF --version | $AWK -F' ' '/^GNU gperf/ { print $3 }' | $AWK -F. '{ print $1 }'`" -ge "3"; then
  354. GPERF_OUTPUT="`echo foo | ${GPERF}`"
  355. AC_COMPILE_IFELSE(
  356. [AC_LANG_PROGRAM(
  357. [[#include <string.h>
  358. const char *in_word_set(const char*, size_t); $GPERF_OUTPUT]])],
  359. [GPERF_LEN_TYPE=size_t],
  360. [AC_COMPILE_IFELSE(
  361. [AC_LANG_PROGRAM(
  362. [[#include <string.h>
  363. const char *in_word_set(const char*, unsigned); $GPERF_OUTPUT]])],
  364. [GPERF_LEN_TYPE=unsigned],
  365. [AC_MSG_ERROR([unable to determine gperf len type])]
  366. )]
  367. )
  368. AC_SUBST(GPERF_LEN_TYPE)
  369. AC_MSG_RESULT([yes])
  370. else
  371. AC_MSG_RESULT([no])
  372. fi
  373. else
  374. AC_MSG_RESULT([not found])
  375. fi
  376. # ========================
  377. # dependency calculation
  378. # ========================
  379. if test x$xauth_generic_given = xfalse -a x$ikev1 = xfalse; then
  380. xauth_generic=false;
  381. fi
  382. if test x$kernel_libipsec = xtrue; then
  383. libipsec=true;
  384. fi
  385. if test x$eap_aka_3gpp2 = xtrue; then
  386. gmp=true;
  387. fi
  388. if test x$eap_aka = xtrue; then
  389. fips_prf=true;
  390. simaka=true;
  391. fi
  392. if test x$eap_sim = xtrue; then
  393. fips_prf=true;
  394. simaka=true;
  395. fi
  396. if test x$eap_radius = xtrue -o x$radattr = xtrue -o x$tnc_pdp = xtrue; then
  397. radius=true;
  398. fi
  399. if test x$tnc_imc = xtrue -o x$tnc_imv = xtrue -o x$tnccs_11 = xtrue -o x$tnccs_20 = xtrue -o x$tnccs_dynamic = xtrue -o x$eap_tnc = xtrue; then
  400. tnc_tnccs=true;
  401. fi
  402. if test x$eap_tls = xtrue -o x$eap_ttls = xtrue -o x$eap_peap = xtrue -o x$tnc_tnccs = xtrue; then
  403. tls=true;
  404. fi
  405. if test x$imc_test = xtrue -o x$imv_test = xtrue -o x$imc_scanner = xtrue -o x$imv_scanner = xtrue -o x$imc_os = xtrue -o x$imv_os = xtrue -o x$imc_attestation = xtrue -o x$imv_attestation = xtrue -o x$imc_swima = xtrue -o x$imv_swima = xtrue -o x$imc_hcd = xtrue -o x$imv_hcd = xtrue; then
  406. imcv=true;
  407. fi
  408. if test x$fips_prf = xtrue; then
  409. if test x$openssl = xfalse -a x$wolfssl = xfalse; then
  410. sha1=true;
  411. fi
  412. fi
  413. if test x$swanctl = xtrue; then
  414. vici=true
  415. fi
  416. if test x$smp = xtrue -o x$tnccs_11 = xtrue -o x$tnc_ifmap = xtrue; then
  417. xml=true
  418. fi
  419. if test x$manager = xtrue; then
  420. fast=true
  421. fi
  422. if test x$medsrv = xtrue; then
  423. mediation=true
  424. fast=true
  425. fi
  426. if test x$medcli = xtrue; then
  427. mediation=true
  428. fi
  429. if test x$ruby_gems_install = xtrue; then
  430. ruby_gems=true
  431. fi
  432. if test x$python_eggs_install = xtrue; then
  433. python_eggs=true
  434. fi
  435. if test x$perl_cpan_install = xtrue; then
  436. perl_cpan=true
  437. fi
  438. if test x$aikgen = xtrue; then
  439. tss_trousers=true
  440. fi
  441. if test x$gmp = xtrue -o x$ntru = xtrue -o x$bliss = xtrue; then
  442. mgf1=true
  443. fi
  444. if test x$stroke = xtrue; then
  445. counters=true
  446. fi
  447. # ===========================================
  448. # check required libraries and header files
  449. # ===========================================
  450. AC_HEADER_STDBOOL
  451. AC_FUNC_ALLOCA
  452. AC_FUNC_STRERROR_R
  453. # libraries needed on some platforms but not on others
  454. # ------------------------------------------------------
  455. saved_LIBS=$LIBS
  456. # FreeBSD and Mac OS X have dlopen integrated in libc, Linux needs libdl
  457. LIBS=""
  458. AC_SEARCH_LIBS(dlopen, dl, [DLLIB=$LIBS])
  459. AC_SUBST(DLLIB)
  460. # glibc's backtrace() can be replicated on FreeBSD with libexecinfo
  461. LIBS=""
  462. AC_SEARCH_LIBS(backtrace, execinfo, [BTLIB=$LIBS])
  463. AC_CHECK_FUNCS(backtrace)
  464. AC_SUBST(BTLIB)
  465. # OpenSolaris needs libsocket and libnsl for socket()
  466. LIBS=""
  467. AC_SEARCH_LIBS(socket, socket, [SOCKLIB=$LIBS],
  468. [AC_CHECK_LIB(nsl, socket, [SOCKLIB="-lsocket -lnsl"], [], [-lsocket])]
  469. )
  470. AC_SUBST(SOCKLIB)
  471. # Android has pthread_* functions in bionic (libc), others need libpthread
  472. LIBS=$DLLIB
  473. AC_SEARCH_LIBS(pthread_create, pthread, [PTHREADLIB=$LIBS])
  474. AC_SUBST(PTHREADLIB)
  475. # Some architectures require explicit -latomic for __atomic_* operations
  476. # AC_SEARCH_LIBS() does not work when checking built-ins due to conflicting types
  477. LIBS=""
  478. AC_MSG_CHECKING(for library containing __atomic_and_fetch)
  479. AC_LINK_IFELSE(
  480. [AC_LANG_PROGRAM([[]], [[int x; __atomic_and_fetch(&x, 1, __ATOMIC_RELAXED);]])],
  481. [AC_MSG_RESULT([none required])],
  482. [LIBS="-latomic";
  483. AC_LINK_IFELSE(
  484. [AC_LANG_PROGRAM([[]], [[int x; __atomic_and_fetch(&x, 1, __ATOMIC_RELAXED);]])],
  485. [AC_MSG_RESULT([-latomic]); ATOMICLIB=$LIBS],
  486. [AC_MSG_RESULT([no])])
  487. ]
  488. )
  489. AC_SUBST(ATOMICLIB)
  490. LIBS=$saved_LIBS
  491. # ------------------------------------------------------
  492. AC_MSG_CHECKING(for dladdr)
  493. AC_COMPILE_IFELSE(
  494. [AC_LANG_PROGRAM(
  495. [[#define _GNU_SOURCE
  496. #include <dlfcn.h>]],
  497. [[Dl_info* info = 0;
  498. dladdr(0, info);]])],
  499. [AC_MSG_RESULT([yes]); AC_DEFINE([HAVE_DLADDR], [], [have dladdr()])],
  500. [AC_MSG_RESULT([no])]
  501. )
  502. # check if pthread_condattr_setclock(CLOCK_MONOTONIC) is supported
  503. saved_LIBS=$LIBS
  504. LIBS=$PTHREADLIB
  505. AC_MSG_CHECKING([for pthread_condattr_setclock(CLOCK_MONOTONIC)])
  506. AC_RUN_IFELSE(
  507. [AC_LANG_SOURCE(
  508. [[#include <pthread.h>
  509. int main() { pthread_condattr_t attr;
  510. pthread_condattr_init(&attr);
  511. return pthread_condattr_setclock(&attr, CLOCK_MONOTONIC);}]])],
  512. [AC_MSG_RESULT([yes]);
  513. AC_DEFINE([HAVE_CONDATTR_CLOCK_MONOTONIC], [],
  514. [pthread_condattr_setclock supports CLOCK_MONOTONIC])],
  515. [AC_MSG_RESULT([no])],
  516. # Check existence of pthread_condattr_setclock if cross-compiling
  517. [AC_MSG_RESULT([unknown]);
  518. AC_CHECK_FUNCS(pthread_condattr_setclock,
  519. [AC_DEFINE([HAVE_CONDATTR_CLOCK_MONOTONIC], [],
  520. [have pthread_condattr_setclock()])]
  521. )]
  522. )
  523. # check if we actually are able to configure attributes on cond vars
  524. AC_CHECK_FUNCS(pthread_condattr_init)
  525. # instead of pthread_condattr_setclock Android has this function
  526. AC_CHECK_FUNCS(pthread_cond_timedwait_monotonic)
  527. # check if we can cancel threads
  528. AC_CHECK_FUNCS(pthread_cancel)
  529. # check if native rwlocks are available
  530. AC_CHECK_FUNCS(pthread_rwlock_init)
  531. # check if pthread spinlocks are available
  532. AC_CHECK_FUNCS(pthread_spin_init)
  533. # check if we have POSIX semaphore functions, including timed-wait
  534. AC_CHECK_FUNCS(sem_timedwait)
  535. LIBS=$saved_LIBS
  536. AC_CHECK_FUNC(
  537. [gettid],
  538. [AC_DEFINE([HAVE_GETTID], [], [have gettid()])],
  539. [AC_MSG_CHECKING([for SYS_gettid])
  540. AC_COMPILE_IFELSE(
  541. [AC_LANG_PROGRAM(
  542. [[#define _GNU_SOURCE
  543. #include <unistd.h>
  544. #include <sys/syscall.h>]],
  545. [[int main() {
  546. return syscall(SYS_gettid);}]])],
  547. [AC_MSG_RESULT([yes]);
  548. AC_DEFINE([HAVE_GETTID], [], [have gettid()])
  549. AC_DEFINE([HAVE_SYS_GETTID], [], [have syscall(SYS_gettid)])],
  550. [AC_MSG_RESULT([no])]
  551. )]
  552. )
  553. AC_CHECK_FUNC(
  554. [qsort_r],
  555. [
  556. AC_DEFINE([HAVE_QSORT_R], [], [have qsort_r()])
  557. # set -Werror so that we get an error for "argument ... has
  558. # incompatible pointer type" warnings
  559. save_CFLAGS="$CFLAGS"
  560. CFLAGS="$CFLAGS -Werror -Wno-unused-parameter"
  561. AC_MSG_CHECKING([for GNU-style qsort_r])
  562. AC_COMPILE_IFELSE(
  563. [AC_LANG_PROGRAM(
  564. [[#define _GNU_SOURCE
  565. #include <stdlib.h>
  566. int cmp (const void *a, const void *b, void *x) { return 0; }]],
  567. [[int arr[] = { 0, 1 };
  568. qsort_r(arr, 2, sizeof(int), cmp, arr);]])],
  569. [AC_MSG_RESULT([yes]);
  570. AC_DEFINE([HAVE_QSORT_R_GNU], [], [have GNU-style qsort_r()])],
  571. [
  572. AC_MSG_RESULT([no]);
  573. AC_MSG_CHECKING([for BSD-style qsort_r])
  574. AC_COMPILE_IFELSE(
  575. [AC_LANG_PROGRAM(
  576. [[#include <stdlib.h>
  577. int cmp (void *x, const void *a, const void *b) { return 0; }]],
  578. [[int arr[] = { 0, 1 };
  579. qsort_r(arr, 2, sizeof(int), arr, cmp);]])],
  580. [AC_MSG_RESULT([yes]);
  581. AC_DEFINE([HAVE_QSORT_R_BSD], [], [have BSD-style qsort_r()])],
  582. [AC_MSG_RESULT([no]);
  583. AC_MSG_FAILURE([qsort_r has unknown semantics])])
  584. ])
  585. CFLAGS="$save_CFLAGS"
  586. ]
  587. )
  588. AC_CHECK_FUNCS(prctl mallinfo getpass closefrom getpwnam_r getgrnam_r getpwuid_r)
  589. AC_CHECK_FUNCS(fmemopen funopen mmap memrchr setlinebuf strptime dirfd sigwaitinfo explicit_bzero)
  590. AC_CHECK_FUNC([syslog], [
  591. AC_DEFINE([HAVE_SYSLOG], [], [have syslog(3) and friends])
  592. syslog=true
  593. ])
  594. AM_CONDITIONAL(USE_SYSLOG, [test "x$syslog" = xtrue])
  595. AC_CHECK_HEADERS(sys/sockio.h sys/syscall.h sys/param.h glob.h net/if_tun.h)
  596. AC_CHECK_HEADERS(net/pfkeyv2.h netipsec/ipsec.h netinet6/ipsec.h linux/udp.h)
  597. AC_CHECK_HEADERS([netinet/ip6.h linux/fib_rules.h], [], [],
  598. [
  599. #include <sys/types.h>
  600. #include <netinet/in.h>
  601. ])
  602. AC_CHECK_MEMBERS([struct sockaddr.sa_len], [], [],
  603. [
  604. #include <sys/types.h>
  605. #include <sys/socket.h>
  606. ])
  607. AC_CHECK_MEMBERS([struct sadb_x_policy.sadb_x_policy_priority], [], [],
  608. [
  609. #include <sys/types.h>
  610. #ifdef HAVE_NET_PFKEYV2_H
  611. #include <net/pfkeyv2.h>
  612. #else
  613. #include <stdint.h>
  614. #include <linux/pfkeyv2.h>
  615. #endif
  616. ])
  617. AC_MSG_CHECKING([for in6addr_any])
  618. AC_COMPILE_IFELSE(
  619. [AC_LANG_PROGRAM(
  620. [[#include <sys/types.h>
  621. #include <sys/socket.h>
  622. #include <netinet/in.h>]],
  623. [[struct in6_addr in6 __attribute__((unused));
  624. in6 = in6addr_any;]])],
  625. [AC_MSG_RESULT([yes]);
  626. AC_DEFINE([HAVE_IN6ADDR_ANY], [], [have struct in6_addr in6addr_any])],
  627. [AC_MSG_RESULT([no])]
  628. )
  629. AC_MSG_CHECKING([for in6_pktinfo])
  630. AC_COMPILE_IFELSE(
  631. [AC_LANG_PROGRAM(
  632. [[#define _GNU_SOURCE
  633. #include <sys/types.h>
  634. #include <sys/socket.h>
  635. #include <netinet/in.h>]],
  636. [[struct in6_pktinfo pi;
  637. if (pi.ipi6_ifindex)
  638. {
  639. return 0;
  640. }]])],
  641. [AC_MSG_RESULT([yes]);
  642. AC_DEFINE([HAVE_IN6_PKTINFO], [], [have struct in6_pktinfo.ipi6_ifindex])],
  643. [AC_MSG_RESULT([no])]
  644. )
  645. AC_MSG_CHECKING([for RTM_IFANNOUNCE])
  646. AC_COMPILE_IFELSE(
  647. [AC_LANG_PROGRAM(
  648. [[#include <sys/socket.h>
  649. #include <net/if.h>
  650. #include <net/route.h>]],
  651. [[return RTM_IFANNOUNCE;]])],
  652. [AC_MSG_RESULT([yes]);
  653. AC_DEFINE([HAVE_RTM_IFANNOUNCE], [], [have PF_ROUTE RTM_IFANNOUNCE defined])],
  654. [AC_MSG_RESULT([no])]
  655. )
  656. AC_MSG_CHECKING([for IPSEC_MODE_BEET])
  657. AC_COMPILE_IFELSE(
  658. [AC_LANG_PROGRAM(
  659. [[#include <sys/types.h>
  660. #ifdef HAVE_NETIPSEC_IPSEC_H
  661. #include <netipsec/ipsec.h>
  662. #elif defined(HAVE_NETINET6_IPSEC_H)
  663. #include <netinet6/ipsec.h>
  664. #else
  665. #include <stdint.h>
  666. #include <linux/ipsec.h>
  667. #endif]],
  668. [[int mode = IPSEC_MODE_BEET;
  669. return mode;]])],
  670. [AC_MSG_RESULT([yes]);
  671. AC_DEFINE([HAVE_IPSEC_MODE_BEET], [], [have IPSEC_MODE_BEET defined])],
  672. [AC_MSG_RESULT([no])]
  673. )
  674. AC_MSG_CHECKING([for IPSEC_DIR_FWD])
  675. AC_COMPILE_IFELSE(
  676. [AC_LANG_PROGRAM(
  677. [[#include <sys/types.h>
  678. #ifdef HAVE_NETIPSEC_IPSEC_H
  679. #include <netipsec/ipsec.h>
  680. #elif defined(HAVE_NETINET6_IPSEC_H)
  681. #include <netinet6/ipsec.h>
  682. #else
  683. #include <stdint.h>
  684. #include <linux/ipsec.h>
  685. #endif]],
  686. [[int dir = IPSEC_DIR_FWD;
  687. return dir;]])],
  688. [AC_MSG_RESULT([yes]);
  689. AC_DEFINE([HAVE_IPSEC_DIR_FWD], [], [have IPSEC_DIR_FWD defined])],
  690. [AC_MSG_RESULT([no])]
  691. )
  692. AC_MSG_CHECKING([for RTA_TABLE])
  693. AC_COMPILE_IFELSE(
  694. [AC_LANG_PROGRAM(
  695. [[#include <sys/socket.h>
  696. #include <linux/netlink.h>
  697. #include <linux/rtnetlink.h>]],
  698. [[int rta_type = RTA_TABLE;
  699. return rta_type;]])],
  700. [AC_MSG_RESULT([yes]);
  701. AC_DEFINE([HAVE_RTA_TABLE], [], [have netlink RTA_TABLE defined])],
  702. [AC_MSG_RESULT([no])]
  703. )
  704. AC_MSG_CHECKING([for __int128])
  705. AC_COMPILE_IFELSE(
  706. [AC_LANG_PROGRAM(
  707. [[#include <sys/types.h>]],
  708. [[__int128 x = 0;
  709. return x;]])],
  710. [AC_MSG_RESULT([yes]);
  711. AC_DEFINE([HAVE_INT128], [], [have __int128 type support])],
  712. [AC_MSG_RESULT([no])]
  713. )
  714. AC_MSG_CHECKING([for GCC __sync operations])
  715. AC_RUN_IFELSE([AC_LANG_SOURCE(
  716. [[
  717. int main() {
  718. int ref = 1;
  719. __sync_fetch_and_add (&ref, 1);
  720. __sync_sub_and_fetch (&ref, 1);
  721. __sync_val_compare_and_swap(&ref, 1, 0);
  722. return ref;
  723. }
  724. ]])],
  725. [AC_MSG_RESULT([yes]);
  726. AC_DEFINE([HAVE_GCC_SYNC_OPERATIONS], [],
  727. [have GCC __sync_* operations])],
  728. [AC_MSG_RESULT([no])],
  729. [AC_MSG_RESULT([no])]
  730. )
  731. case "$printf_hooks" in
  732. auto|builtin|glibc|vstr)
  733. ;;
  734. *)
  735. AC_MSG_NOTICE([invalid printf hook implementation, defaulting to 'auto'])
  736. printf_hooks=auto
  737. ;;
  738. esac
  739. if test x$printf_hooks = xauto -o x$printf_hooks = xglibc; then
  740. # check for the new register_printf_specifier function with len argument,
  741. # or the deprecated register_printf_function without
  742. AC_CHECK_FUNC(
  743. [register_printf_specifier],
  744. [AC_DEFINE([HAVE_PRINTF_SPECIFIER], [], [have register_printf_specifier()])],
  745. [AC_CHECK_FUNC(
  746. [register_printf_function],
  747. [AC_DEFINE([HAVE_PRINTF_FUNCTION], [], [have register_printf_function()])],
  748. [
  749. AC_MSG_NOTICE([printf(3) does not support custom format specifiers!])
  750. if test x$printf_hooks = xglibc; then
  751. AC_MSG_ERROR([please select a different printf hook implementation])
  752. else
  753. # fallback to builtin printf hook implementation
  754. printf_hooks=builtin
  755. fi
  756. ]
  757. )]
  758. )
  759. fi
  760. AC_MSG_CHECKING([for Windows target])
  761. AC_COMPILE_IFELSE(
  762. [AC_LANG_PROGRAM(
  763. [[#include <windows.h>]],
  764. [[#ifndef WIN32
  765. # error WIN32 undefined
  766. #endif
  767. ]])],
  768. [
  769. AC_MSG_RESULT([yes])
  770. windows=true
  771. AC_SUBST(PTHREADLIB, "")
  772. # explicitly disable ms-bitfields, as it breaks __attribute__((packed))
  773. case "$CFLAGS" in
  774. *ms-bitfields*) ;;
  775. *) CFLAGS="$CFLAGS -mno-ms-bitfields" ;;
  776. esac
  777. ],
  778. [
  779. AC_MSG_RESULT([no])
  780. # check for clock_gettime() on non-Windows only. Otherwise this
  781. # check might find clock_gettime() in libwinpthread, but we don't want
  782. # to link against it.
  783. saved_LIBS=$LIBS
  784. # FreeBSD has clock_gettime in libc, Linux needs librt
  785. LIBS=""
  786. AC_SEARCH_LIBS(clock_gettime, rt, [RTLIB=$LIBS])
  787. AC_CHECK_FUNCS(clock_gettime)
  788. AC_SUBST(RTLIB)
  789. LIBS=$saved_LIBS
  790. ]
  791. )
  792. AM_CONDITIONAL(USE_WINDOWS, [test "x$windows" = xtrue])
  793. AC_MSG_CHECKING([for working __attribute__((packed))])
  794. AC_COMPILE_IFELSE(
  795. [AC_LANG_PROGRAM([], [[
  796. struct test { char a; short b; } __attribute__((packed));
  797. char x[sizeof(struct test) == sizeof(char) + sizeof(short) ? 1 : -1]
  798. __attribute__((unused));
  799. return 0;
  800. ]])],
  801. [AC_MSG_RESULT([yes])],
  802. [AC_MSG_RESULT([no]); AC_MSG_ERROR([__attribute__((packed)) does not work])]
  803. )
  804. AC_MSG_CHECKING([clang])
  805. AC_COMPILE_IFELSE(
  806. [AC_LANG_PROGRAM(
  807. [], [[
  808. #ifndef __clang__
  809. # error not using LLVM clang
  810. #endif
  811. ]])],
  812. [
  813. AC_MSG_RESULT([yes])
  814. ],
  815. [
  816. AC_MSG_RESULT([no])
  817. # GCC, but not MinGW requires -rdynamic for plugins
  818. if test x$windows != xtrue; then
  819. PLUGIN_CFLAGS="$PLUGIN_CFLAGS -rdynamic"
  820. fi
  821. ]
  822. )
  823. AC_MSG_CHECKING([x86/x64 target])
  824. AC_COMPILE_IFELSE(
  825. [AC_LANG_PROGRAM(
  826. [], [[
  827. #if !defined(__i386__) && !defined(__x86_64__)
  828. # error not on x86/x64
  829. #endif
  830. ]])],
  831. [
  832. x86x64=true
  833. AC_MSG_RESULT([yes])
  834. ],
  835. [AC_MSG_RESULT([no])]
  836. )
  837. AM_CONDITIONAL(USE_X86X64, [test "x$x86x64" = xtrue])
  838. if test x$printf_hooks = xvstr; then
  839. AC_CHECK_LIB([vstr],[vstr_init],[LIBS="$LIBS"],[AC_MSG_ERROR([Vstr string library not found])],[])
  840. AC_DEFINE([USE_VSTR], [], [use Vstr string library for printf hooks])
  841. fi
  842. if test x$printf_hooks = xbuiltin; then
  843. AC_DEFINE([USE_BUILTIN_PRINTF], [], [using builtin printf for printf hooks])
  844. fi
  845. if test x$gmp = xtrue; then
  846. saved_LIBS=$LIBS
  847. AC_CHECK_LIB([gmp],[__gmpz_init],[],[AC_MSG_ERROR([GNU Multi Precision library gmp not found])],[])
  848. AC_MSG_CHECKING([mpz_powm_sec])
  849. if test x$mpz_powm_sec = xyes; then
  850. AC_COMPILE_IFELSE(
  851. [AC_LANG_PROGRAM(
  852. [[#include "gmp.h"]],
  853. [[void *x __attribute__((unused)); x = mpz_powm_sec;]])],
  854. [AC_MSG_RESULT([yes]);
  855. AC_DEFINE([HAVE_MPZ_POWM_SEC], [], [have mpz_powm_sec()])],
  856. [AC_MSG_RESULT([no])]
  857. )
  858. else
  859. AC_MSG_RESULT([disabled])
  860. fi
  861. LIBS=$saved_LIBS
  862. AC_MSG_CHECKING([gmp.h version >= 4.1.4])
  863. AC_COMPILE_IFELSE(
  864. [AC_LANG_PROGRAM(
  865. [[#include "gmp.h"]],
  866. [[
  867. #if (__GNU_MP_VERSION*100 + __GNU_MP_VERSION_MINOR*10 + __GNU_MP_VERSION_PATCHLEVEL) < 414
  868. #error bad gmp
  869. #endif]])],
  870. [AC_MSG_RESULT([yes])],
  871. [AC_MSG_RESULT([no]); AC_MSG_ERROR([No usable gmp.h found!])]
  872. )
  873. fi
  874. if test x$ldap = xtrue; then
  875. AC_CHECK_LIB([ldap],[ldap_init],[LIBS="$LIBS"],[AC_MSG_ERROR([LDAP library ldap not found])],[])
  876. AC_CHECK_LIB([lber],[ber_free],[LIBS="$LIBS"],[AC_MSG_ERROR([LDAP library lber not found])],[])
  877. AC_CHECK_HEADER([ldap.h],,[AC_MSG_ERROR([LDAP header ldap.h not found!])])
  878. fi
  879. if test x$curl = xtrue; then
  880. AC_CHECK_LIB([curl],[curl_global_init],[LIBS="$LIBS"],[AC_MSG_ERROR([CURL library curl not found])],[])
  881. AC_CHECK_HEADER([curl/curl.h],,[AC_MSG_ERROR([CURL header curl/curl.h not found!])])
  882. fi
  883. if test x$unbound = xtrue; then
  884. AC_CHECK_LIB([ldns],[ldns_rr_get_type],[LIBS="$LIBS"],[AC_MSG_ERROR([UNBOUND library ldns not found])],[])
  885. AC_CHECK_HEADER([ldns/ldns.h],,[AC_MSG_ERROR([UNBOUND header ldns/ldns.h not found!])])
  886. AC_CHECK_LIB([unbound],[ub_ctx_create],[LIBS="$LIBS"],[AC_MSG_ERROR([UNBOUND library libunbound not found])],[])
  887. AC_CHECK_HEADER([unbound.h],,[AC_MSG_ERROR([UNBOUND header unbound.h not found!])])
  888. fi
  889. if test x$soup = xtrue; then
  890. PKG_CHECK_MODULES(soup, [libsoup-2.4])
  891. AC_SUBST(soup_CFLAGS)
  892. AC_SUBST(soup_LIBS)
  893. fi
  894. if test x$xml = xtrue; then
  895. PKG_CHECK_MODULES(xml, [libxml-2.0])
  896. AC_SUBST(xml_CFLAGS)
  897. AC_SUBST(xml_LIBS)
  898. fi
  899. if test x$systemd = xtrue; then
  900. AC_MSG_CHECKING([for systemd system unit directory])
  901. if test -n "$systemdsystemunitdir" -a "x$systemdsystemunitdir" != xno; then
  902. AC_MSG_RESULT([$systemdsystemunitdir])
  903. else
  904. AC_MSG_ERROR([not found (try --with-systemdsystemunitdir)])
  905. fi
  906. PKG_CHECK_MODULES(systemd, [libsystemd >= 209],
  907. [AC_SUBST(systemd_CFLAGS)
  908. AC_SUBST(systemd_LIBS)],
  909. [PKG_CHECK_MODULES(systemd_daemon, [libsystemd-daemon])
  910. AC_SUBST(systemd_daemon_CFLAGS)
  911. AC_SUBST(systemd_daemon_LIBS)
  912. PKG_CHECK_MODULES(systemd_journal, [libsystemd-journal])
  913. AC_SUBST(systemd_journal_CFLAGS)
  914. AC_SUBST(systemd_journal_LIBS)]
  915. )
  916. saved_LIBS=$LIBS
  917. LIBS="$systemd_LIBS $systemd_daemon_LIBS"
  918. AC_CHECK_FUNCS(sd_listen_fds_with_names)
  919. LIBS=$saved_LIBS
  920. fi
  921. if test x$tss_trousers = xtrue; then
  922. AC_CHECK_LIB([tspi],[Tspi_Context_Create],[LIBS="$LIBS"],[AC_MSG_ERROR([TrouSerS library libtspi not found])],[])
  923. AC_CHECK_HEADER([trousers/tss.h],,[AC_MSG_ERROR([TrouSerS header trousers/tss.h not found!])])
  924. AC_DEFINE([TSS_TROUSERS], [], [use TrouSerS library libtspi])
  925. fi
  926. if test x$tss_tss2 = xtrue; then
  927. PKG_CHECK_MODULES(tss2_sys, [tss2-sys],
  928. [tss2_sys=true; AC_DEFINE([TSS2_SYS], [], [use TSS2 v2 System API])],
  929. [tss2_sys=false])
  930. PKG_CHECK_MODULES(tss2_esys, [tss2-esys],
  931. [tss2_esys=true; AC_DEFINE([TSS2_ESYS], [], [use TSS2 v2 Extended System API])],
  932. [tss2_esys=false])
  933. PKG_CHECK_MODULES(tss2_tabrmd, [tcti-tabrmd],
  934. [tss2_tabrmd=true; AC_DEFINE([TSS2_TCTI_TABRMD], [], [use TCTI Access Broker and Resource Mamager])],
  935. [tss2_tabrmd=false])
  936. PKG_CHECK_MODULES(tss2_socket, [tcti-socket],
  937. [tss2_socket=true; AC_DEFINE([TSS2_TCTI_SOCKET], [], [use TCTI Sockets])],
  938. [tss2_socket=false])
  939. if test x$tss2_sys = xtrue; then
  940. AC_DEFINE([TSS_TSS2_V2], [], [use TSS 2.0 v2 libraries])
  941. AC_SUBST(tss2_CFLAGS, "$tss2_sys_CFLAGS")
  942. AC_SUBST(tss2_LIBS, "$tss2_sys_LIBS")
  943. elif test x$tss2_tabrmd = xtrue -o x$tss2_socket = xtrue; then
  944. AC_DEFINE([TSS_TSS2_V1], [], [use TSS 2.0 v1 libraries])
  945. AC_SUBST(tss2_CFLAGS, "$tss2_tabrmd_CFLAGS $tss2_socket_CFLAGS")
  946. AC_SUBST(tss2_LIBS, "$tss2_tabrmd_LIBS $tss2_socket_LIBS")
  947. else
  948. AC_MSG_FAILURE([no TSS2 TCTI or SAPI libraries detected])
  949. fi
  950. fi
  951. if test x$imc_swima = xtrue -o $imv_swima = xtrue; then
  952. PKG_CHECK_MODULES(json, [json-c], [],
  953. [PKG_CHECK_MODULES(json, [json])])
  954. AC_SUBST(json_CFLAGS)
  955. AC_SUBST(json_LIBS)
  956. fi
  957. if test x$fast = xtrue; then
  958. AC_CHECK_LIB([neo_utl],[hdf_init],[LIBS="$LIBS"],[AC_MSG_ERROR([ClearSilver library neo_utl not found!])],[])
  959. AC_MSG_CHECKING([for -lneo_cgi and dependencies])
  960. saved_CFLAGS=$CFLAGS
  961. saved_LIBS=$LIBS
  962. LIBS="-lneo_cgi -lneo_cs -lneo_utl"
  963. CFLAGS="-I/usr/include/ClearSilver"
  964. AC_LINK_IFELSE(
  965. [AC_LANG_PROGRAM(
  966. [[#include <cgi/cgi.h>]],
  967. [[NEOERR *err = cgi_display(NULL, NULL);]])],
  968. [AC_MSG_RESULT([yes])],
  969. [LIBS="$LIBS -lz";
  970. AC_LINK_IFELSE(
  971. [AC_LANG_PROGRAM(
  972. [[#include <cgi/cgi.h>]],
  973. [[NEOERR *err = cgi_display(NULL, NULL);]])],
  974. [AC_MSG_RESULT([yes, zlib required])],
  975. [AC_MSG_ERROR([not found])]
  976. )]
  977. )
  978. clearsilver_LIBS="$LIBS"
  979. AC_SUBST(clearsilver_LIBS)
  980. LIBS=$saved_LIBS
  981. CFLAGS=$saved_CFLAGS
  982. AC_CHECK_LIB([fcgi],[FCGX_Init],[LIBS="$LIBS"],[AC_MSG_ERROR([FastCGI library fcgi not found!])],[])
  983. AC_CHECK_HEADER([fcgiapp.h],,[AC_MSG_ERROR([FastCGI header file fcgiapp.h not found!])])
  984. fi
  985. if test x$mysql = xtrue; then
  986. if test "x$windows" = xtrue; then
  987. AC_CHECK_HEADER([mysql.h],,[AC_MSG_ERROR([MySQL header file mysql.h not found!])])
  988. AC_CHECK_LIB([mysql],[mysql_database_init],[LIBS="$LIBS"],[AC_MSG_ERROR([MySQL library not found!])],[])
  989. AC_SUBST(MYSQLLIB, -lmysql)
  990. else
  991. AC_PATH_PROG([MYSQLCONFIG], [mysql_config], [], [$PATH:/bin:/usr/bin:/usr/local/bin])
  992. if test x$MYSQLCONFIG = x; then
  993. AC_MSG_ERROR([mysql_config not found!])
  994. fi
  995. AC_SUBST(MYSQLLIB, `$MYSQLCONFIG --libs_r`)
  996. AC_SUBST(MYSQLCFLAG, `$MYSQLCONFIG --cflags`)
  997. fi
  998. fi
  999. if test x$sqlite = xtrue; then
  1000. AC_CHECK_LIB([sqlite3],[sqlite3_open],[LIBS="$LIBS"],[AC_MSG_ERROR([SQLite library sqlite3 not found])],[])
  1001. AC_CHECK_HEADER([sqlite3.h],,[AC_MSG_ERROR([SQLite header sqlite3.h not found!])])
  1002. AC_MSG_CHECKING([sqlite3_prepare_v2])
  1003. AC_COMPILE_IFELSE(
  1004. [AC_LANG_PROGRAM(
  1005. [[#include <sqlite3.h>]],
  1006. [[void *test = sqlite3_prepare_v2;]])],
  1007. [AC_MSG_RESULT([yes]);
  1008. AC_DEFINE([HAVE_SQLITE3_PREPARE_V2], [], [have sqlite3_prepare_v2()])],
  1009. [AC_MSG_RESULT([no])]
  1010. )
  1011. AC_MSG_CHECKING([sqlite3.h version >= 3.3.1])
  1012. AC_COMPILE_IFELSE(
  1013. [AC_LANG_PROGRAM(
  1014. [[#include <sqlite3.h>]],
  1015. [[
  1016. #if SQLITE_VERSION_NUMBER < 3003001
  1017. #error bad sqlite
  1018. #endif]])],
  1019. [AC_MSG_RESULT([yes])],
  1020. [AC_MSG_RESULT([no]); AC_MSG_ERROR([SQLite version >= 3.3.1 required!])]
  1021. )
  1022. fi
  1023. if test x$openssl = xtrue; then
  1024. if test "x$windows" = xtrue; then
  1025. openssl_lib=eay32
  1026. AC_CHECK_LIB([$openssl_lib],[EVP_CIPHER_CTX_new],[LIBS="$LIBS"],
  1027. [AC_MSG_RESULT([no]);openssl_lib=""],[$DLLIB])
  1028. fi
  1029. if test -z "$openssl_lib"; then
  1030. openssl_lib=crypto
  1031. AC_CHECK_LIB([$openssl_lib],[EVP_CIPHER_CTX_new],[LIBS="$LIBS"],
  1032. [AC_MSG_ERROR([OpenSSL lib$openssl_lib not found])],[$DLLIB])
  1033. fi
  1034. AC_SUBST(OPENSSL_LIB, [-l$openssl_lib])
  1035. AC_CHECK_HEADER([openssl/evp.h],,[AC_MSG_ERROR([OpenSSL header openssl/evp.h not found!])])
  1036. fi
  1037. if test x$wolfssl = xtrue; then
  1038. wolfssl_lib=wolfssl
  1039. AC_CHECK_LIB([$wolfssl_lib],[wolfSSL_Init],[LIBS="$LIBS"],
  1040. [AC_MSG_ERROR([wolfSSL lib$wolfssl_lib not found])],[$DLLIB])
  1041. AC_SUBST(WOLFSSL_LIB, [-l$wolfssl_lib])
  1042. AC_CHECK_HEADER([wolfssl/options.h],,[AC_MSG_ERROR([wolfSSL header wolfssl/options.h not found!])])
  1043. fi
  1044. if test x$gcrypt = xtrue; then
  1045. AC_CHECK_LIB([gcrypt],[gcry_control],[LIBS="$LIBS"],[AC_MSG_ERROR([gcrypt library not found])],[-lgpg-error])
  1046. AC_CHECK_HEADER([gcrypt.h],,[AC_MSG_ERROR([gcrypt header gcrypt.h not found!])])
  1047. AC_MSG_CHECKING([gcrypt CAMELLIA cipher])
  1048. AC_COMPILE_IFELSE(
  1049. [AC_LANG_PROGRAM(
  1050. [[#include <gcrypt.h>]],
  1051. [[enum gcry_cipher_algos alg = GCRY_CIPHER_CAMELLIA128;]])],
  1052. [AC_MSG_RESULT([yes]);
  1053. AC_DEFINE([HAVE_GCRY_CIPHER_CAMELLIA], [], [have GCRY_CIPHER_CAMELLIA128])],
  1054. [AC_MSG_RESULT([no])]
  1055. )
  1056. fi
  1057. if test x$botan = xtrue; then
  1058. PKG_CHECK_MODULES(botan, [botan-2])
  1059. AC_SUBST(botan_CFLAGS)
  1060. AC_SUBST(botan_LIBS)
  1061. fi
  1062. if test x$uci = xtrue; then
  1063. AC_CHECK_LIB([uci],[uci_alloc_context],[LIBS="$LIBS"],[AC_MSG_ERROR([UCI library libuci not found])],[])
  1064. AC_CHECK_HEADER([uci.h],,[AC_MSG_ERROR([UCI header uci.h not found!])])
  1065. fi
  1066. if test x$android_dns = xtrue; then
  1067. AC_CHECK_LIB([cutils],[property_get],[LIBS="$LIBS"],[AC_MSG_ERROR([Android library libcutils not found])],[])
  1068. AC_CHECK_HEADER([cutils/properties.h],,[AC_MSG_ERROR([Android header cutils/properties.h not found!])])
  1069. # we have to force the use of libdl here because the autodetection
  1070. # above does not work correctly when cross-compiling for android.
  1071. DLLIB="-ldl"
  1072. AC_SUBST(DLLIB)
  1073. fi
  1074. if test x$eap_sim_pcsc = xtrue; then
  1075. PKG_CHECK_MODULES(pcsclite, [libpcsclite])
  1076. AC_SUBST(pcsclite_CFLAGS)
  1077. AC_SUBST(pcsclite_LIBS)
  1078. fi
  1079. if test x$nm = xtrue; then
  1080. PKG_CHECK_MODULES(nm, [gthread-2.0 libnm])
  1081. AC_SUBST(nm_CFLAGS)
  1082. AC_SUBST(nm_LIBS)
  1083. fi
  1084. if test x$xauth_pam = xtrue; then
  1085. AC_CHECK_LIB([pam],[pam_start],[LIBS="$LIBS"],[AC_MSG_ERROR([PAM library not found])],[])
  1086. AC_CHECK_HEADER([security/pam_appl.h],,[AC_MSG_ERROR([PAM header security/pam_appl.h not found!])])
  1087. fi
  1088. if test x$connmark = xtrue -o x$forecast = xtrue; then
  1089. PKG_CHECK_MODULES(libiptc, [libiptc])
  1090. AC_SUBST(libiptc_CFLAGS)
  1091. AC_SUBST(libiptc_LIBS)
  1092. fi
  1093. if test x$capabilities = xnative; then
  1094. AC_MSG_NOTICE([Usage of the native Linux capabilities interface is deprecated, use libcap instead])
  1095. # Linux requires the following for capset(), Android does not have it,
  1096. # but defines capset() in unistd.h instead.
  1097. AC_CHECK_HEADERS([sys/capability.h])
  1098. AC_CHECK_FUNC(capset,,[AC_MSG_ERROR([capset() not found!])])
  1099. AC_DEFINE([CAPABILITIES_NATIVE], [], [have native linux capset()])
  1100. fi
  1101. if test x$capabilities = xlibcap; then
  1102. AC_CHECK_LIB([cap],[cap_init],[LIBS="$LIBS"],[AC_MSG_ERROR([libcap library not found])],[])
  1103. AC_CHECK_HEADER([sys/capability.h],
  1104. [AC_DEFINE([HAVE_SYS_CAPABILITY_H], [], [have sys/capability.h])],
  1105. [AC_MSG_ERROR([libcap header sys/capability.h not found!])])
  1106. AC_DEFINE([CAPABILITIES_LIBCAP], [], [have libpcap library])
  1107. fi
  1108. if test x$integrity_test = xtrue; then
  1109. AC_MSG_CHECKING([for dladdr()])
  1110. AC_COMPILE_IFELSE(
  1111. [AC_LANG_PROGRAM(
  1112. [[#define _GNU_SOURCE
  1113. #include <dlfcn.h>]],
  1114. [[Dl_info info; dladdr(main, &info);]])],
  1115. [AC_MSG_RESULT([yes])],
  1116. [AC_MSG_RESULT([no]);
  1117. AC_MSG_ERROR([dladdr() not supported, required by integrity-test!])]
  1118. )
  1119. AC_MSG_CHECKING([for dl_iterate_phdr()])
  1120. AC_COMPILE_IFELSE(
  1121. [AC_LANG_PROGRAM(
  1122. [[#define _GNU_SOURCE
  1123. #include <link.h>]],
  1124. [[dl_iterate_phdr((void*)0, (void*)0);]])],
  1125. [AC_MSG_RESULT([yes])],
  1126. [AC_MSG_RESULT([no]);
  1127. AC_MSG_ERROR([dl_iterate_phdr() not supported, required by integrity-test!])]
  1128. )
  1129. fi
  1130. if test x$bfd_backtraces = xtrue; then
  1131. AC_CHECK_LIB([bfd],[bfd_init],[LIBS="$LIBS"],[AC_MSG_ERROR([binutils libbfd not found!])],[])
  1132. AC_CHECK_HEADER([bfd.h],[AC_DEFINE([HAVE_BFD_H],,[have binutils bfd.h])],
  1133. [AC_MSG_ERROR([binutils bfd.h header not found!])])
  1134. BFDLIB="-lbfd"
  1135. AC_SUBST(BFDLIB)
  1136. fi
  1137. if test x$unwind_backtraces = xtrue; then
  1138. AC_CHECK_LIB([unwind],[unw_backtrace],[LIBS="$LIBS"],[AC_MSG_ERROR([libunwind not found!])],[])
  1139. AC_CHECK_HEADER([libunwind.h],[AC_DEFINE([HAVE_LIBUNWIND_H],,[have libunwind.h])],
  1140. [AC_MSG_ERROR([libunwind.h header not found!])])
  1141. UNWINDLIB="-lunwind"
  1142. AC_SUBST(UNWINDLIB)
  1143. fi
  1144. AM_CONDITIONAL(USE_DEV_HEADERS, [test "x$dev_headers" != xno])
  1145. if test x$dev_headers = xyes; then
  1146. dev_headers="$includedir/strongswan"
  1147. fi
  1148. AC_SUBST(dev_headers)
  1149. CFLAGS="$CFLAGS -include `pwd`/config.h"
  1150. if test x$tkm = xtrue; then
  1151. AC_PATH_PROG([GPRBUILD], [gprbuild], [], [$PATH:/bin:/usr/bin:/usr/local/bin])
  1152. if test x$GPRBUILD = x; then
  1153. AC_MSG_ERROR([gprbuild not found])
  1154. fi
  1155. fi
  1156. if test x$coverage = xtrue; then
  1157. AC_PATH_PROG([LCOV], [lcov], [], [$PATH:/bin:/usr/bin:/usr/local/bin])
  1158. if test x$LCOV = x; then
  1159. AC_MSG_ERROR([lcov not found])
  1160. fi
  1161. AC_PATH_PROG([GENHTML], [genhtml], [], [$PATH:/bin:/usr/bin:/usr/local/bin])
  1162. if test x$GENHTML = x; then
  1163. AC_MSG_ERROR([genhtml not found])
  1164. fi
  1165. COVERAGE_CFLAGS="-fprofile-arcs -ftest-coverage"
  1166. COVERAGE_LDFLAGS="-fprofile-arcs"
  1167. AC_SUBST(COVERAGE_CFLAGS)
  1168. AC_SUBST(COVERAGE_LDFLAGS)
  1169. PLUGIN_CFLAGS="$PLUGIN_CFLAGS $COVERAGE_CFLAGS"
  1170. AC_MSG_NOTICE([coverage enabled, adding "-g -O0" to CFLAGS])
  1171. CFLAGS="${CFLAGS} -g -O0"
  1172. fi
  1173. if test x$fuzzing = xtrue; then
  1174. case "$libfuzzer" in
  1175. "")
  1176. AC_MSG_NOTICE([fuzz targets enabled without libFuzzer, using local driver])
  1177. CFLAGS="${CFLAGS} -fsanitize=address"
  1178. libfuzzer="libFuzzerLocal.a"
  1179. ;;
  1180. "-fsanitize=fuzzer")
  1181. libfuzzer=""
  1182. FUZZING_CFLAGS="-fsanitize=fuzzer"
  1183. AC_SUBST(FUZZING_CFLAGS)
  1184. ;;
  1185. *)
  1186. # required for libFuzzer
  1187. FUZZING_LDFLAGS="-stdlib=libc++ -lstdc++"
  1188. if test "$SANITIZER" = "coverage"; then
  1189. FUZZING_LDFLAGS="$FUZZING_LDFLAGS -lm"
  1190. fi
  1191. AC_SUBST(FUZZING_LDFLAGS)
  1192. ;;
  1193. esac
  1194. fi
  1195. if test x$ruby_gems = xtrue; then
  1196. AC_PATH_PROG([GEM], [gem], [], [$PATH:/bin:/usr/bin:/usr/local/bin])
  1197. if test x$GEM = x; then
  1198. AC_MSG_ERROR(RubyGems package manager not found)
  1199. fi
  1200. if test "x$rubygemdir" = "xgem environment gemdir"; then
  1201. rubygemdir=$($GEM environment gemdir)
  1202. fi
  1203. AC_SUBST(RUBYGEMDIR, "$rubygemdir")
  1204. fi
  1205. AM_CONDITIONAL(RUBY_GEMS_INSTALL, [test "x$ruby_gems_install" = xtrue])
  1206. if test x$python_eggs = xtrue; then
  1207. PYTHON_PACKAGE_VERSION=`echo "$PACKAGE_VERSION" | $SED 's/dr/.dev/'`
  1208. AC_SUBST([PYTHON_PACKAGE_VERSION])
  1209. if test x$python_eggs_install = xtrue; then
  1210. AC_PATH_PROG([EASY_INSTALL], [easy_install], [], [$PATH:/bin:/usr/bin:/usr/local/bin])
  1211. if test x$EASY_INSTALL = x; then
  1212. AC_MSG_ERROR(Python easy_install not found)
  1213. fi
  1214. fi
  1215. if test "x$pythoneggdir" = "xmain site-packages directory"; then
  1216. AC_SUBST(PYTHONEGGINSTALLDIR, "")
  1217. else
  1218. AC_SUBST(PYTHONEGGINSTALLDIR, "--install-dir $pythoneggdir")
  1219. fi
  1220. AC_PATH_PROG([PY_TEST], [py.test], [], [$PATH:/bin:/usr/bin:/usr/local/bin])
  1221. fi
  1222. AM_CONDITIONAL(PYTHON_EGGS_INSTALL, [test "x$python_eggs_install" = xtrue])
  1223. AM_CONDITIONAL(PERL_CPAN_INSTALL, [test "x$perl_cpan_install" = xtrue])
  1224. AC_CACHE_CHECK(
  1225. [if plugin constructors should be resolved statically],
  1226. [ss_cv_static_plugin_constructors],
  1227. [if test x$monolithic = xtrue -a x$enable_static = xyes; then
  1228. ss_cv_static_plugin_constructors=yes
  1229. else
  1230. ss_cv_static_plugin_constructors="no (enabled for static, monolithic builds)"
  1231. fi]
  1232. )
  1233. if test "x$ss_cv_static_plugin_constructors" = xyes; then
  1234. static_plugin_constructors=true
  1235. fi
  1236. # ===============================================
  1237. # collect plugin list for strongSwan components
  1238. # ===============================================
  1239. m4_include(m4/macros/add-plugin.m4)
  1240. # plugin lists for all components
  1241. charon_plugins=
  1242. starter_plugins=
  1243. pool_plugins=
  1244. attest_plugins=
  1245. scepclient_plugins=
  1246. pki_plugins=
  1247. scripts_plugins=
  1248. fuzz_plugins=
  1249. manager_plugins=
  1250. medsrv_plugins=
  1251. nm_plugins=
  1252. cmd_plugins=
  1253. aikgen_plugins=
  1254. # location specific lists for checksumming,
  1255. # for src/libcharon, src/libstrongswan, src/libtnccs and src/libtpmtss
  1256. c_plugins=
  1257. s_plugins=
  1258. t_plugins=
  1259. p_plugins=
  1260. ADD_PLUGIN([test-vectors], [s charon scepclient pki])
  1261. ADD_PLUGIN([unbound], [s charon scripts])
  1262. ADD_PLUGIN([ldap], [s charon scepclient scripts nm cmd])
  1263. ADD_PLUGIN([pkcs11], [s charon pki nm cmd])
  1264. ADD_PLUGIN([tpm], [p charon pki nm cmd])
  1265. ADD_PLUGIN([aesni], [s charon scepclient pki scripts medsrv attest nm cmd aikgen])
  1266. ADD_PLUGIN([aes], [s charon scepclient pki scripts nm cmd])
  1267. ADD_PLUGIN([des], [s charon scepclient pki scripts nm cmd])
  1268. ADD_PLUGIN([blowfish], [s charon scepclient pki scripts nm cmd])
  1269. ADD_PLUGIN([rc2], [s charon scepclient pki scripts nm cmd])
  1270. ADD_PLUGIN([sha2], [s charon scepclient pki scripts medsrv attest nm cmd aikgen fuzz])
  1271. ADD_PLUGIN([sha3], [s charon scepclient pki scripts medsrv attest nm cmd aikgen fuzz])
  1272. ADD_PLUGIN([sha1], [s charon scepclient pki scripts manager medsrv attest nm cmd aikgen fuzz])
  1273. ADD_PLUGIN([md4], [s charon scepclient pki nm cmd])
  1274. ADD_PLUGIN([md5], [s charon scepclient pki scripts attest nm cmd aikgen])
  1275. ADD_PLUGIN([mgf1], [s charon scepclient pki scripts medsrv attest nm cmd aikgen])
  1276. ADD_PLUGIN([rdrand], [s charon scepclient pki scripts medsrv attest nm cmd aikgen])
  1277. ADD_PLUGIN([random], [s charon scepclient pki scripts manager medsrv attest nm cmd aikgen])
  1278. ADD_PLUGIN([nonce], [s charon nm cmd aikgen])
  1279. ADD_PLUGIN([x509], [s charon scepclient pki scripts attest nm cmd aikgen fuzz])
  1280. ADD_PLUGIN([revocation], [s charon pki nm cmd])
  1281. ADD_PLUGIN([constraints], [s charon nm cmd])
  1282. ADD_PLUGIN([acert], [s charon])
  1283. ADD_PLUGIN([pubkey], [s charon pki cmd aikgen])
  1284. ADD_PLUGIN([pkcs1], [s charon scepclient pki scripts manager medsrv attest nm cmd aikgen fuzz])
  1285. ADD_PLUGIN([pkcs7], [s charon scepclient pki scripts nm cmd])
  1286. ADD_PLUGIN([pkcs8], [s charon scepclient pki scripts manager medsrv attest nm cmd])
  1287. ADD_PLUGIN([pkcs12], [s charon scepclient pki scripts cmd])
  1288. ADD_PLUGIN([pgp], [s charon])
  1289. ADD_PLUGIN([dnskey], [s charon pki])
  1290. ADD_PLUGIN([sshkey], [s charon pki nm cmd])
  1291. ADD_PLUGIN([dnscert], [c charon])
  1292. ADD_PLUGIN([ipseckey], [c charon])
  1293. ADD_PLUGIN([pem], [s charon scepclient pki scripts manager medsrv attest nm cmd aikgen fuzz])
  1294. ADD_PLUGIN([padlock], [s charon])
  1295. ADD_PLUGIN([openssl], [s charon scepclient pki scripts manager medsrv attest nm cmd aikgen])
  1296. ADD_PLUGIN([wolfssl], [s charon scepclient pki scripts manager medsrv attest nm cmd aikgen])
  1297. ADD_PLUGIN([gcrypt], [s charon scepclient pki scripts manager medsrv attest nm cmd aikgen])
  1298. ADD_PLUGIN([botan], [s charon scepclient pki scripts manager medsrv attest nm cmd aikgen])
  1299. ADD_PLUGIN([af-alg], [s charon scepclient pki scripts medsrv attest nm cmd aikgen])
  1300. ADD_PLUGIN([fips-prf], [s charon nm cmd])
  1301. ADD_PLUGIN([gmp], [s charon scepclient pki scripts manager medsrv attest nm cmd aikgen fuzz])
  1302. ADD_PLUGIN([curve25519], [s charon pki scripts nm cmd])
  1303. ADD_PLUGIN([agent], [s charon nm cmd])
  1304. ADD_PLUGIN([keychain], [s charon cmd])
  1305. ADD_PLUGIN([chapoly], [s charon scripts nm cmd])
  1306. ADD_PLUGIN([xcbc], [s charon nm cmd])
  1307. ADD_PLUGIN([cmac], [s charon nm cmd])
  1308. ADD_PLUGIN([hmac], [s charon pki scripts nm cmd])
  1309. ADD_PLUGIN([ctr], [s charon scripts nm cmd])
  1310. ADD_PLUGIN([ccm], [s charon scripts nm cmd])
  1311. ADD_PLUGIN([gcm], [s charon scripts nm cmd])
  1312. ADD_PLUGIN([ntru], [s charon scripts nm cmd])
  1313. ADD_PLUGIN([newhope], [s charon scripts nm cmd])
  1314. ADD_PLUGIN([bliss], [s charon pki scripts nm cmd])
  1315. ADD_PLUGIN([curl], [s charon scepclient pki scripts nm cmd])
  1316. ADD_PLUGIN([files], [s charon scepclient pki scripts nm cmd])
  1317. ADD_PLUGIN([winhttp], [s charon pki scripts])
  1318. ADD_PLUGIN([soup], [s charon pki scripts nm cmd])
  1319. ADD_PLUGIN([mysql], [s charon pool manager medsrv attest])
  1320. ADD_PLUGIN([sqlite], [s charon pool manager medsrv attest])
  1321. ADD_PLUGIN([attr], [c charon])
  1322. ADD_PLUGIN([attr-sql], [c charon])
  1323. ADD_PLUGIN([load-tester], [c charon])
  1324. ADD_PLUGIN([kernel-libipsec], [c charon cmd])
  1325. ADD_PLUGIN([kernel-wfp], [c charon])
  1326. ADD_PLUGIN([kernel-iph], [c charon])
  1327. ADD_PLUGIN([kernel-pfkey], [c charon starter nm cmd])
  1328. ADD_PLUGIN([kernel-pfroute], [c charon starter nm cmd])
  1329. ADD_PLUGIN([kernel-netlink], [c charon starter nm cmd])
  1330. ADD_PLUGIN([resolve], [c charon cmd])
  1331. ADD_PLUGIN([save-keys], [c])
  1332. ADD_PLUGIN([socket-default], [c charon nm cmd])
  1333. ADD_PLUGIN([socket-dynamic], [c charon cmd])
  1334. ADD_PLUGIN([socket-win], [c charon])
  1335. ADD_PLUGIN([bypass-lan], [c charon nm cmd])
  1336. ADD_PLUGIN([connmark], [c charon])
  1337. ADD_PLUGIN([forecast], [c charon])
  1338. ADD_PLUGIN([farp], [c charon])
  1339. ADD_PLUGIN([stroke], [c charon])
  1340. ADD_PLUGIN([vici], [c charon])
  1341. ADD_PLUGIN([smp], [c charon])
  1342. ADD_PLUGIN([sql], [c charon])
  1343. ADD_PLUGIN([updown], [c charon])
  1344. ADD_PLUGIN([eap-identity], [c charon nm cmd])
  1345. ADD_PLUGIN([eap-sim], [c charon])
  1346. ADD_PLUGIN([eap-sim-file], [c charon])
  1347. ADD_PLUGIN([eap-sim-pcsc], [c charon])
  1348. ADD_PLUGIN([eap-aka], [c charon])
  1349. ADD_PLUGIN([eap-aka-3gpp], [c charon])
  1350. ADD_PLUGIN([eap-aka-3gpp2], [c charon])
  1351. ADD_PLUGIN([eap-simaka-sql], [c charon])
  1352. ADD_PLUGIN([eap-simaka-pseudonym], [c charon])
  1353. ADD_PLUGIN([eap-simaka-reauth], [c charon])
  1354. ADD_PLUGIN([eap-md5], [c charon nm cmd])
  1355. ADD_PLUGIN([eap-gtc], [c charon nm cmd])
  1356. ADD_PLUGIN([eap-mschapv2], [c charon nm cmd])
  1357. ADD_PLUGIN([eap-dynamic], [c charon])
  1358. ADD_PLUGIN([eap-radius], [c charon])
  1359. ADD_PLUGIN([eap-tls], [c charon nm cmd])
  1360. ADD_PLUGIN([eap-ttls], [c charon nm cmd])
  1361. ADD_PLUGIN([eap-peap], [c charon nm cmd])
  1362. ADD_PLUGIN([eap-tnc], [c charon])
  1363. ADD_PLUGIN([xauth-generic], [c charon cmd])
  1364. ADD_PLUGIN([xauth-eap], [c charon])
  1365. ADD_PLUGIN([xauth-pam], [c charon])
  1366. ADD_PLUGIN([xauth-noauth], [c charon])
  1367. ADD_PLUGIN([tnc-ifmap], [c charon])
  1368. ADD_PLUGIN([tnc-pdp], [c charon])
  1369. ADD_PLUGIN([tnc-imc], [t charon])
  1370. ADD_PLUGIN([tnc-imv], [t charon])
  1371. ADD_PLUGIN([tnc-tnccs], [t charon])
  1372. ADD_PLUGIN([tnccs-20], [t charon])
  1373. ADD_PLUGIN([tnccs-11], [t charon])
  1374. ADD_PLUGIN([tnccs-dynamic], [t charon])
  1375. ADD_PLUGIN([medsrv], [c charon])
  1376. ADD_PLUGIN([medcli], [c charon])
  1377. ADD_PLUGIN([dhcp], [c charon])
  1378. ADD_PLUGIN([osx-attr], [c charon cmd])
  1379. ADD_PLUGIN([p-cscf], [c charon cmd])
  1380. ADD_PLUGIN([android-dns], [c charon])
  1381. ADD_PLUGIN([android-log], [c charon])
  1382. ADD_PLUGIN([ha], [c charon])
  1383. ADD_PLUGIN([whitelist], [c charon])
  1384. ADD_PLUGIN([ext-auth], [c charon])
  1385. ADD_PLUGIN([lookip], [c charon])
  1386. ADD_PLUGIN([error-notify], [c charon])
  1387. ADD_PLUGIN([certexpire], [c charon])
  1388. ADD_PLUGIN([systime-fix], [c charon])
  1389. ADD_PLUGIN([led], [c charon])
  1390. ADD_PLUGIN([duplicheck], [c charon])
  1391. ADD_PLUGIN([coupling], [c charon])
  1392. ADD_PLUGIN([radattr], [c charon])
  1393. ADD_PLUGIN([uci], [c charon])
  1394. ADD_PLUGIN([addrblock], [c charon])
  1395. ADD_PLUGIN([unity], [c charon])
  1396. ADD_PLUGIN([counters], [c charon])
  1397. AC_SUBST(charon_plugins)
  1398. AC_SUBST(starter_plugins)
  1399. AC_SUBST(pool_plugins)
  1400. AC_SUBST(attest_plugins)
  1401. AC_SUBST(scepclient_plugins)
  1402. AC_SUBST(pki_plugins)
  1403. AC_SUBST(scripts_plugins)
  1404. AC_SUBST(fuzz_plugins)
  1405. AC_SUBST(manager_plugins)
  1406. AC_SUBST(medsrv_plugins)
  1407. AC_SUBST(nm_plugins)
  1408. AC_SUBST(cmd_plugins)
  1409. AC_SUBST(aikgen_plugins)
  1410. AC_SUBST(c_plugins)
  1411. AC_SUBST(p_plugins)
  1412. AC_SUBST(s_plugins)
  1413. AC_SUBST(t_plugins)
  1414. # ======================
  1415. # set Makefile.am vars
  1416. # ======================
  1417. # libstrongswan plugins
  1418. # -----------------------
  1419. AM_CONDITIONAL(USE_TEST_VECTORS, test x$test_vectors = xtrue)
  1420. AM_CONDITIONAL(USE_CURL, test x$curl = xtrue)
  1421. AM_CONDITIONAL(USE_FILES, test x$files = xtrue)
  1422. AM_CONDITIONAL(USE_WINHTTP, test x$winhttp = xtrue)
  1423. AM_CONDITIONAL(USE_UNBOUND, test x$unbound = xtrue)
  1424. AM_CONDITIONAL(USE_SOUP, test x$soup = xtrue)
  1425. AM_CONDITIONAL(USE_LDAP, test x$ldap = xtrue)
  1426. AM_CONDITIONAL(USE_AES, test x$aes = xtrue)
  1427. AM_CONDITIONAL(USE_DES, test x$des = xtrue)
  1428. AM_CONDITIONAL(USE_BLOWFISH, test x$blowfish = xtrue)
  1429. AM_CONDITIONAL(USE_RC2, test x$rc2 = xtrue)
  1430. AM_CONDITIONAL(USE_MD4, test x$md4 = xtrue)
  1431. AM_CONDITIONAL(USE_MD5, test x$md5 = xtrue)
  1432. AM_CONDITIONAL(USE_SHA1, test x$sha1 = xtrue)
  1433. AM_CONDITIONAL(USE_SHA2, test x$sha2 = xtrue)
  1434. AM_CONDITIONAL(USE_SHA3, test x$sha3 = xtrue)
  1435. AM_CONDITIONAL(USE_MGF1, test x$mgf1 = xtrue)
  1436. AM_CONDITIONAL(USE_FIPS_PRF, test x$fips_prf = xtrue)
  1437. AM_CONDITIONAL(USE_GMP, test x$gmp = xtrue)
  1438. AM_CONDITIONAL(USE_CURVE25519, test x$curve25519 = xtrue)
  1439. AM_CONDITIONAL(USE_RDRAND, test x$rdrand = xtrue)
  1440. AM_CONDITIONAL(USE_AESNI, test x$aesni = xtrue)
  1441. AM_CONDITIONAL(USE_RANDOM, test x$random = xtrue)
  1442. AM_CONDITIONAL(USE_NONCE, test x$nonce = xtrue)
  1443. AM_CONDITIONAL(USE_X509, test x$x509 = xtrue)
  1444. AM_CONDITIONAL(USE_REVOCATION, test x$revocation = xtrue)
  1445. AM_CONDITIONAL(USE_CONSTRAINTS, test x$constraints = xtrue)
  1446. AM_CONDITIONAL(USE_ACERT, test x$acert = xtrue)
  1447. AM_CONDITIONAL(USE_PUBKEY, test x$pubkey = xtrue)
  1448. AM_CONDITIONAL(USE_PKCS1, test x$pkcs1 = xtrue)
  1449. AM_CONDITIONAL(USE_PKCS7, test x$pkcs7 = xtrue)
  1450. AM_CONDITIONAL(USE_PKCS8, test x$pkcs8 = xtrue)
  1451. AM_CONDITIONAL(USE_PKCS12, test x$pkcs12 = xtrue)
  1452. AM_CONDITIONAL(USE_PGP, test x$pgp = xtrue)
  1453. AM_CONDITIONAL(USE_DNSKEY, test x$dnskey = xtrue)
  1454. AM_CONDITIONAL(USE_SSHKEY, test x$sshkey = xtrue)
  1455. AM_CONDITIONAL(USE_PEM, test x$pem = xtrue)
  1456. AM_CONDITIONAL(USE_HMAC, test x$hmac = xtrue)
  1457. AM_CONDITIONAL(USE_CMAC, test x$cmac = xtrue)
  1458. AM_CONDITIONAL(USE_XCBC, test x$xcbc = xtrue)
  1459. AM_CONDITIONAL(USE_MYSQL, test x$mysql = xtrue)
  1460. AM_CONDITIONAL(USE_SQLITE, test x$sqlite = xtrue)
  1461. AM_CONDITIONAL(USE_PADLOCK, test x$padlock = xtrue)
  1462. AM_CONDITIONAL(USE_OPENSSL, test x$openssl = xtrue)
  1463. AM_CONDITIONAL(USE_WOLFSSL, test x$wolfssl = xtrue)
  1464. AM_CONDITIONAL(USE_GCRYPT, test x$gcrypt = xtrue)
  1465. AM_CONDITIONAL(USE_BOTAN, test x$botan = xtrue)
  1466. AM_CONDITIONAL(USE_AGENT, test x$agent = xtrue)
  1467. AM_CONDITIONAL(USE_KEYCHAIN, test x$keychain = xtrue)
  1468. AM_CONDITIONAL(USE_PKCS11, test x$pkcs11 = xtrue)
  1469. AM_CONDITIONAL(USE_TPM, test x$tpm = xtrue)
  1470. AM_CONDITIONAL(USE_CHAPOLY, test x$chapoly = xtrue)
  1471. AM_CONDITIONAL(USE_CTR, test x$ctr = xtrue)
  1472. AM_CONDITIONAL(USE_CCM, test x$ccm = xtrue)
  1473. AM_CONDITIONAL(USE_GCM, test x$gcm = xtrue)
  1474. AM_CONDITIONAL(USE_AF_ALG, test x$af_alg = xtrue)
  1475. AM_CONDITIONAL(USE_NTRU, test x$ntru = xtrue)
  1476. AM_CONDITIONAL(USE_NEWHOPE, test x$newhope = xtrue)
  1477. AM_CONDITIONAL(USE_BLISS, test x$bliss = xtrue)
  1478. # charon plugins
  1479. # ----------------
  1480. AM_CONDITIONAL(USE_STROKE, test x$stroke = xtrue)
  1481. AM_CONDITIONAL(USE_VICI, test x$vici = xtrue)
  1482. AM_CONDITIONAL(USE_MEDSRV, test x$medsrv = xtrue)
  1483. AM_CONDITIONAL(USE_MEDCLI, test x$medcli = xtrue)
  1484. AM_CONDITIONAL(USE_UCI, test x$uci = xtrue)
  1485. AM_CONDITIONAL(USE_OSX_ATTR, test x$osx_attr = xtrue)
  1486. AM_CONDITIONAL(USE_P_CSCF, test x$p_cscf = xtrue)
  1487. AM_CONDITIONAL(USE_ANDROID_DNS, test x$android_dns = xtrue)
  1488. AM_CONDITIONAL(USE_ANDROID_LOG, test x$android_log = xtrue)
  1489. AM_CONDITIONAL(USE_SMP, test x$smp = xtrue)
  1490. AM_CONDITIONAL(USE_SQL, test x$sql = xtrue)
  1491. AM_CONDITIONAL(USE_DNSCERT, test x$dnscert = xtrue)
  1492. AM_CONDITIONAL(USE_IPSECKEY, test x$ipseckey = xtrue)
  1493. AM_CONDITIONAL(USE_UPDOWN, test x$updown = xtrue)
  1494. AM_CONDITIONAL(USE_DHCP, test x$dhcp = xtrue)
  1495. AM_CONDITIONAL(USE_LOAD_TESTER, test x$load_tester = xtrue)
  1496. AM_CONDITIONAL(USE_HA, test x$ha = xtrue)
  1497. AM_CONDITIONAL(USE_KERNEL_NETLINK, test x$kernel_netlink = xtrue)
  1498. AM_CONDITIONAL(USE_KERNEL_PFKEY, test x$kernel_pfkey = xtrue)
  1499. AM_CONDITIONAL(USE_KERNEL_PFROUTE, test x$kernel_pfroute = xtrue)
  1500. AM_CONDITIONAL(USE_KERNEL_LIBIPSEC, test x$kernel_libipsec = xtrue)
  1501. AM_CONDITIONAL(USE_KERNEL_WFP, test x$kernel_wfp = xtrue)
  1502. AM_CONDITIONAL(USE_KERNEL_IPH, test x$kernel_iph = xtrue)
  1503. AM_CONDITIONAL(USE_WHITELIST, test x$whitelist = xtrue)
  1504. AM_CONDITIONAL(USE_EXT_AUTH, test x$ext_auth = xtrue)
  1505. AM_CONDITIONAL(USE_LOOKIP, test x$lookip = xtrue)
  1506. AM_CONDITIONAL(USE_ERROR_NOTIFY, test x$error_notify = xtrue)
  1507. AM_CONDITIONAL(USE_CERTEXPIRE, test x$certexpire = xtrue)
  1508. AM_CONDITIONAL(USE_SYSTIME_FIX, test x$systime_fix = xtrue)
  1509. AM_CONDITIONAL(USE_LED, test x$led = xtrue)
  1510. AM_CONDITIONAL(USE_DUPLICHECK, test x$duplicheck = xtrue)
  1511. AM_CONDITIONAL(USE_COUPLING, test x$coupling = xtrue)
  1512. AM_CONDITIONAL(USE_RADATTR, test x$radattr = xtrue)
  1513. AM_CONDITIONAL(USE_EAP_SIM, test x$eap_sim = xtrue)
  1514. AM_CONDITIONAL(USE_EAP_SIM_FILE, test x$eap_sim_file = xtrue)
  1515. AM_CONDITIONAL(USE_EAP_SIM_PCSC, test x$eap_sim_pcsc = xtrue)
  1516. AM_CONDITIONAL(USE_EAP_SIMAKA_SQL, test x$eap_simaka_sql = xtrue)
  1517. AM_CONDITIONAL(USE_EAP_SIMAKA_PSEUDONYM, test x$eap_simaka_pseudonym = xtrue)
  1518. AM_CONDITIONAL(USE_EAP_SIMAKA_REAUTH, test x$eap_simaka_reauth = xtrue)
  1519. AM_CONDITIONAL(USE_EAP_IDENTITY, test x$eap_identity = xtrue)
  1520. AM_CONDITIONAL(USE_EAP_MD5, test x$eap_md5 = xtrue)
  1521. AM_CONDITIONAL(USE_EAP_GTC, test x$eap_gtc = xtrue)
  1522. AM_CONDITIONAL(USE_EAP_AKA, test x$eap_aka = xtrue)
  1523. AM_CONDITIONAL(USE_EAP_AKA_3GPP, test x$eap_aka_3gpp = xtrue)
  1524. AM_CONDITIONAL(USE_EAP_AKA_3GPP2, test x$eap_aka_3gpp2 = xtrue)
  1525. AM_CONDITIONAL(USE_EAP_MSCHAPV2, test x$eap_mschapv2 = xtrue)
  1526. AM_CONDITIONAL(USE_EAP_TLS, test x$eap_tls = xtrue)
  1527. AM_CONDITIONAL(USE_EAP_TTLS, test x$eap_ttls = xtrue)
  1528. AM_CONDITIONAL(USE_EAP_PEAP, test x$eap_peap = xtrue)
  1529. AM_CONDITIONAL(USE_EAP_TNC, test x$eap_tnc = xtrue)
  1530. AM_CONDITIONAL(USE_EAP_DYNAMIC, test x$eap_dynamic = xtrue)
  1531. AM_CONDITIONAL(USE_EAP_RADIUS, test x$eap_radius = xtrue)
  1532. AM_CONDITIONAL(USE_XAUTH_GENERIC, test x$xauth_generic = xtrue)
  1533. AM_CONDITIONAL(USE_XAUTH_EAP, test x$xauth_eap = xtrue)
  1534. AM_CONDITIONAL(USE_XAUTH_PAM, test x$xauth_pam = xtrue)
  1535. AM_CONDITIONAL(USE_XAUTH_NOAUTH, test x$xauth_noauth = xtrue)
  1536. AM_CONDITIONAL(USE_TNC_IFMAP, test x$tnc_ifmap = xtrue)
  1537. AM_CONDITIONAL(USE_TNC_PDP, test x$tnc_pdp = xtrue)
  1538. AM_CONDITIONAL(USE_TNC_IMC, test x$tnc_imc = xtrue)
  1539. AM_CONDITIONAL(USE_TNC_IMV, test x$tnc_imv = xtrue)
  1540. AM_CONDITIONAL(USE_TNC_TNCCS, test x$tnc_tnccs = xtrue)
  1541. AM_CONDITIONAL(USE_TNCCS_11, test x$tnccs_11 = xtrue)
  1542. AM_CONDITIONAL(USE_TNCCS_20, test x$tnccs_20 = xtrue)
  1543. AM_CONDITIONAL(USE_TNCCS_DYNAMIC, test x$tnccs_dynamic = xtrue)
  1544. AM_CONDITIONAL(USE_IMC_TEST, test x$imc_test = xtrue)
  1545. AM_CONDITIONAL(USE_IMV_TEST, test x$imv_test = xtrue)
  1546. AM_CONDITIONAL(USE_IMC_SCANNER, test x$imc_scanner = xtrue)
  1547. AM_CONDITIONAL(USE_IMV_SCANNER, test x$imv_scanner = xtrue)
  1548. AM_CONDITIONAL(USE_IMC_OS, test x$imc_os = xtrue)
  1549. AM_CONDITIONAL(USE_IMV_OS, test x$imv_os = xtrue)
  1550. AM_CONDITIONAL(USE_IMC_ATTESTATION, test x$imc_attestation = xtrue)
  1551. AM_CONDITIONAL(USE_IMV_ATTESTATION, test x$imv_attestation = xtrue)
  1552. AM_CONDITIONAL(USE_IMC_SWIMA, test x$imc_swima = xtrue)
  1553. AM_CONDITIONAL(USE_IMV_SWIMA, test x$imv_swima = xtrue)
  1554. AM_CONDITIONAL(USE_IMC_HCD, test x$imc_hcd = xtrue)
  1555. AM_CONDITIONAL(USE_IMV_HCD, test x$imv_hcd = xtrue)
  1556. AM_CONDITIONAL(USE_SAVE_KEYS, test x$save_keys = xtrue)
  1557. AM_CONDITIONAL(USE_SOCKET_DEFAULT, test x$socket_default = xtrue)
  1558. AM_CONDITIONAL(USE_SOCKET_DYNAMIC, test x$socket_dynamic = xtrue)
  1559. AM_CONDITIONAL(USE_SOCKET_WIN, test x$socket_win = xtrue)
  1560. AM_CONDITIONAL(USE_BYPASS_LAN, test x$bypass_lan = xtrue)
  1561. AM_CONDITIONAL(USE_CONNMARK, test x$connmark = xtrue)
  1562. AM_CONDITIONAL(USE_FORECAST, test x$forecast = xtrue)
  1563. AM_CONDITIONAL(USE_FARP, test x$farp = xtrue)
  1564. AM_CONDITIONAL(USE_ADDRBLOCK, test x$addrblock = xtrue)
  1565. AM_CONDITIONAL(USE_UNITY, test x$unity = xtrue)
  1566. AM_CONDITIONAL(USE_RESOLVE, test x$resolve = xtrue)
  1567. AM_CONDITIONAL(USE_ATTR, test x$attr = xtrue)
  1568. AM_CONDITIONAL(USE_ATTR_SQL, test x$attr_sql = xtrue)
  1569. AM_CONDITIONAL(USE_COUNTERS, test x$counters = xtrue)
  1570. # other options
  1571. # ---------------
  1572. AM_CONDITIONAL(USE_LEAK_DETECTIVE, test x$leak_detective = xtrue)
  1573. AM_CONDITIONAL(USE_LOCK_PROFILER, test x$lock_profiler = xtrue)
  1574. AM_CONDITIONAL(USE_FAST, test x$fast = xtrue)
  1575. AM_CONDITIONAL(USE_MANAGER, test x$manager = xtrue)
  1576. AM_CONDITIONAL(USE_ME, test x$mediation = xtrue)
  1577. AM_CONDITIONAL(USE_INTEGRITY_TEST, test x$integrity_test = xtrue)
  1578. AM_CONDITIONAL(USE_LOAD_WARNING, test x$load_warning = xtrue)
  1579. AM_CONDITIONAL(USE_IKEV1, test x$ikev1 = xtrue)
  1580. AM_CONDITIONAL(USE_IKEV2, test x$ikev2 = xtrue)
  1581. AM_CONDITIONAL(USE_THREADS, test x$threads = xtrue)
  1582. AM_CONDITIONAL(USE_ADNS, test x$adns = xtrue)
  1583. AM_CONDITIONAL(USE_CHARON, test x$charon = xtrue)
  1584. AM_CONDITIONAL(USE_NM, test x$nm = xtrue)
  1585. AM_CONDITIONAL(USE_PKI, test x$pki = xtrue)
  1586. AM_CONDITIONAL(USE_SCEPCLIENT, test x$scepclient = xtrue)
  1587. AM_CONDITIONAL(USE_SCRIPTS, test x$scripts = xtrue)
  1588. AM_CONDITIONAL(USE_FUZZING, test x$fuzzing = xtrue)
  1589. AM_CONDITIONAL(USE_CONFTEST, test x$conftest = xtrue)
  1590. AM_CONDITIONAL(USE_LIBSTRONGSWAN, test x$charon = xtrue -o x$pki = xtrue -o x$scepclient = xtrue -o x$conftest = xtrue -o x$fast = xtrue -o x$imcv = xtrue -o x$nm = xtrue -o x$tkm = xtrue -o x$cmd = xtrue -o x$tls = xtrue -o x$tnc_tnccs = xtrue -o x$aikgen = xtrue -o x$svc = xtrue -o x$systemd = xtrue)
  1591. AM_CONDITIONAL(USE_LIBCHARON, test x$charon = xtrue -o x$conftest = xtrue -o x$nm = xtrue -o x$tkm = xtrue -o x$cmd = xtrue -o x$svc = xtrue -o x$systemd = xtrue)
  1592. AM_CONDITIONAL(USE_LIBIPSEC, test x$libipsec = xtrue)
  1593. AM_CONDITIONAL(USE_LIBNTTFFT, test x$bliss = xtrue -o x$newhope = xtrue)
  1594. AM_CONDITIONAL(USE_LIBTNCIF, test x$tnc_tnccs = xtrue -o x$imcv = xtrue)
  1595. AM_CONDITIONAL(USE_LIBTNCCS, test x$tnc_tnccs = xtrue)
  1596. AM_CONDITIONAL(USE_LIBPTTLS, test x$tnc_tnccs = xtrue)
  1597. AM_CONDITIONAL(USE_LIBTPMTSS, test x$tss_trousers = xtrue -o x$tss_tss2 = xtrue -o x$tpm = xtrue -o x$aikgen = xtrue -o x$imcv = xtrue)
  1598. AM_CONDITIONAL(USE_FILE_CONFIG, test x$stroke = xtrue)
  1599. AM_CONDITIONAL(USE_IPSEC_SCRIPT, test x$stroke = xtrue -o x$scepclient = xtrue -o x$conftest = xtrue)
  1600. AM_CONDITIONAL(USE_LIBCAP, test x$capabilities = xlibcap)
  1601. AM_CONDITIONAL(USE_VSTR, test x$printf_hooks = xvstr)
  1602. AM_CONDITIONAL(USE_BUILTIN_PRINTF, test x$printf_hooks = xbuiltin)
  1603. AM_CONDITIONAL(USE_SIMAKA, test x$simaka = xtrue)
  1604. AM_CONDITIONAL(USE_TLS, test x$tls = xtrue)
  1605. AM_CONDITIONAL(USE_RADIUS, test x$radius = xtrue)
  1606. AM_CONDITIONAL(USE_IMCV, test x$imcv = xtrue)
  1607. AM_CONDITIONAL(USE_TROUSERS, test x$tss_trousers = xtrue)
  1608. AM_CONDITIONAL(USE_TSS2, test x$tss_tss2 = xtrue)
  1609. AM_CONDITIONAL(MONOLITHIC, test x$monolithic = xtrue)
  1610. AM_CONDITIONAL(STATIC_PLUGIN_CONSTRUCTORS, test x$static_plugin_constructors = xtrue)
  1611. AM_CONDITIONAL(USE_SILENT_RULES, test x$enable_silent_rules = xyes)
  1612. AM_CONDITIONAL(COVERAGE, test x$coverage = xtrue)
  1613. AM_CONDITIONAL(USE_DBGHELP, test x$dbghelp_backtraces = xtrue)
  1614. AM_CONDITIONAL(USE_TKM, test x$tkm = xtrue)
  1615. AM_CONDITIONAL(USE_CMD, test x$cmd = xtrue)
  1616. AM_CONDITIONAL(USE_AIKGEN, test x$aikgen = xtrue)
  1617. AM_CONDITIONAL(USE_SWANCTL, test x$swanctl = xtrue)
  1618. AM_CONDITIONAL(USE_SVC, test x$svc = xtrue)
  1619. AM_CONDITIONAL(USE_SYSTEMD, test x$systemd = xtrue)
  1620. AM_CONDITIONAL(USE_LEGACY_SYSTEMD, test -n "$systemdsystemunitdir" -a "x$systemdsystemunitdir" != xno)
  1621. AM_CONDITIONAL(USE_RUBY_GEMS, test x$ruby_gems = xtrue)
  1622. AM_CONDITIONAL(USE_PYTHON_EGGS, test x$python_eggs = xtrue)
  1623. AM_CONDITIONAL(USE_PERL_CPAN, test x$perl_cpan = xtrue)
  1624. AM_CONDITIONAL(USE_PY_TEST, test "x$PY_TEST" != x)
  1625. # ========================
  1626. # set global definitions
  1627. # ========================
  1628. if test x$mediation = xtrue; then
  1629. AC_DEFINE([ME], [], [mediation extension support])
  1630. fi
  1631. if test x$capabilities = xlibcap -o x$capabilities = xnative; then
  1632. AC_DEFINE([CAPABILITIES], [], [capability dropping support])
  1633. fi
  1634. if test x$log_thread_ids = xtrue; then
  1635. AC_DEFINE([USE_THREAD_IDS], [], [use thread ID for thread identification, if available])
  1636. fi
  1637. if test x$monolithic = xtrue; then
  1638. AC_DEFINE([MONOLITHIC], [], [monolithic build embedding plugins])
  1639. fi
  1640. if test x$static_plugin_constructors = xtrue; then
  1641. AC_DEFINE([STATIC_PLUGIN_CONSTRUCTORS], [], [static plugin constructors])
  1642. fi
  1643. if test x$ikev1 = xtrue; then
  1644. AC_DEFINE([USE_IKEV1], [], [support for IKEv1 protocol])
  1645. fi
  1646. if test x$ikev2 = xtrue; then
  1647. AC_DEFINE([USE_IKEV2], [], [support for IKEv2 protocol])
  1648. fi
  1649. if test x$fuzzing = xtrue; then
  1650. AC_DEFINE([USE_FUZZING], [], [build code for fuzzing])
  1651. fi
  1652. if test x$imc_swima = xtrue -o x$imv_swima = xtrue; then
  1653. AC_DEFINE([USE_JSON], [], [build code for JSON])
  1654. fi
  1655. # ====================================================
  1656. # options for enabled modules (see conf/Makefile.am)
  1657. # ====================================================
  1658. strongswan_options=
  1659. AM_COND_IF([USE_AIKGEN], [strongswan_options=${strongswan_options}" aikgen"])
  1660. AM_COND_IF([USE_ATTR_SQL], [strongswan_options=${strongswan_options}" pool"])
  1661. AM_COND_IF([USE_CHARON], [strongswan_options=${strongswan_options}" charon charon-logging"])
  1662. AM_COND_IF([USE_FILE_CONFIG], [strongswan_options=${strongswan_options}" starter"])
  1663. AM_COND_IF([USE_IMV_ATTESTATION], [strongswan_options=${strongswan_options}" attest"])
  1664. AM_COND_IF([USE_IMCV], [strongswan_options=${strongswan_options}" imcv"])
  1665. AM_COND_IF([USE_IMV_SWIMA], [strongswan_options=${strongswan_options}" sec-updater"])
  1666. AM_COND_IF([USE_LIBTNCCS], [strongswan_options=${strongswan_options}" tnc"])
  1667. AM_COND_IF([USE_MANAGER], [strongswan_options=${strongswan_options}" manager"])
  1668. AM_COND_IF([USE_MEDSRV], [strongswan_options=${strongswan_options}" medsrv"])
  1669. AM_COND_IF([USE_SCEPCLIENT], [strongswan_options=${strongswan_options}" scepclient"])
  1670. AM_COND_IF([USE_PKI], [strongswan_options=${strongswan_options}" pki"])
  1671. AM_COND_IF([USE_SWANCTL], [strongswan_options=${strongswan_options}" swanctl"])
  1672. AM_COND_IF([USE_SYSTEMD], [strongswan_options=${strongswan_options}" charon-systemd"])
  1673. AC_SUBST(strongswan_options)
  1674. # =================
  1675. # build Makefiles
  1676. # =================
  1677. AC_CONFIG_FILES([
  1678. Makefile
  1679. conf/Makefile
  1680. fuzz/Makefile
  1681. man/Makefile
  1682. init/Makefile
  1683. init/systemd/Makefile
  1684. init/systemd-starter/Makefile
  1685. src/Makefile
  1686. src/include/Makefile
  1687. src/libstrongswan/Makefile
  1688. src/libstrongswan/math/libnttfft/Makefile
  1689. src/libstrongswan/math/libnttfft/tests/Makefile
  1690. src/libstrongswan/plugins/aes/Makefile
  1691. src/libstrongswan/plugins/cmac/Makefile
  1692. src/libstrongswan/plugins/des/Makefile
  1693. src/libstrongswan/plugins/blowfish/Makefile
  1694. src/libstrongswan/plugins/rc2/Makefile
  1695. src/libstrongswan/plugins/md4/Makefile
  1696. src/libstrongswan/plugins/md5/Makefile
  1697. src/libstrongswan/plugins/sha1/Makefile
  1698. src/libstrongswan/plugins/sha2/Makefile
  1699. src/libstrongswan/plugins/sha3/Makefile
  1700. src/libstrongswan/plugins/mgf1/Makefile
  1701. src/libstrongswan/plugins/fips_prf/Makefile
  1702. src/libstrongswan/plugins/gmp/Makefile
  1703. src/libstrongswan/plugins/curve25519/Makefile
  1704. src/libstrongswan/plugins/rdrand/Makefile
  1705. src/libstrongswan/plugins/aesni/Makefile
  1706. src/libstrongswan/plugins/random/Makefile
  1707. src/libstrongswan/plugins/nonce/Makefile
  1708. src/libstrongswan/plugins/hmac/Makefile
  1709. src/libstrongswan/plugins/xcbc/Makefile
  1710. src/libstrongswan/plugins/x509/Makefile
  1711. src/libstrongswan/plugins/revocation/Makefile
  1712. src/libstrongswan/plugins/constraints/Makefile
  1713. src/libstrongswan/plugins/acert/Makefile
  1714. src/libstrongswan/plugins/pubkey/Makefile
  1715. src/libstrongswan/plugins/pkcs1/Makefile
  1716. src/libstrongswan/plugins/pkcs7/Makefile
  1717. src/libstrongswan/plugins/pkcs8/Makefile
  1718. src/libstrongswan/plugins/pkcs12/Makefile
  1719. src/libstrongswan/plugins/pgp/Makefile
  1720. src/libstrongswan/plugins/dnskey/Makefile
  1721. src/libstrongswan/plugins/sshkey/Makefile
  1722. src/libstrongswan/plugins/pem/Makefile
  1723. src/libstrongswan/plugins/curl/Makefile
  1724. src/libstrongswan/plugins/files/Makefile
  1725. src/libstrongswan/plugins/winhttp/Makefile
  1726. src/libstrongswan/plugins/unbound/Makefile
  1727. src/libstrongswan/plugins/soup/Makefile
  1728. src/libstrongswan/plugins/ldap/Makefile
  1729. src/libstrongswan/plugins/mysql/Makefile
  1730. src/libstrongswan/plugins/sqlite/Makefile
  1731. src/libstrongswan/plugins/padlock/Makefile
  1732. src/libstrongswan/plugins/openssl/Makefile
  1733. src/libstrongswan/plugins/wolfssl/Makefile
  1734. src/libstrongswan/plugins/gcrypt/Makefile
  1735. src/libstrongswan/plugins/botan/Makefile
  1736. src/libstrongswan/plugins/agent/Makefile
  1737. src/libstrongswan/plugins/keychain/Makefile
  1738. src/libstrongswan/plugins/pkcs11/Makefile
  1739. src/libstrongswan/plugins/chapoly/Makefile
  1740. src/libstrongswan/plugins/ctr/Makefile
  1741. src/libstrongswan/plugins/ccm/Makefile
  1742. src/libstrongswan/plugins/gcm/Makefile
  1743. src/libstrongswan/plugins/af_alg/Makefile
  1744. src/libstrongswan/plugins/ntru/Makefile
  1745. src/libstrongswan/plugins/bliss/Makefile
  1746. src/libstrongswan/plugins/bliss/tests/Makefile
  1747. src/libstrongswan/plugins/newhope/Makefile
  1748. src/libstrongswan/plugins/newhope/tests/Makefile
  1749. src/libstrongswan/plugins/test_vectors/Makefile
  1750. src/libstrongswan/tests/Makefile
  1751. src/libipsec/Makefile
  1752. src/libipsec/tests/Makefile
  1753. src/libsimaka/Makefile
  1754. src/libtls/Makefile
  1755. src/libtls/tests/Makefile
  1756. src/libradius/Makefile
  1757. src/libtncif/Makefile
  1758. src/libtnccs/Makefile
  1759. src/libtnccs/plugins/tnc_tnccs/Makefile
  1760. src/libtnccs/plugins/tnc_imc/Makefile
  1761. src/libtnccs/plugins/tnc_imv/Makefile
  1762. src/libtnccs/plugins/tnccs_11/Makefile
  1763. src/libtnccs/plugins/tnccs_20/Makefile
  1764. src/libtnccs/plugins/tnccs_dynamic/Makefile
  1765. src/libpttls/Makefile
  1766. src/libimcv/Makefile
  1767. src/libimcv/plugins/imc_test/Makefile
  1768. src/libimcv/plugins/imv_test/Makefile
  1769. src/libimcv/plugins/imc_scanner/Makefile
  1770. src/libimcv/plugins/imv_scanner/Makefile
  1771. src/libimcv/plugins/imc_os/Makefile
  1772. src/libimcv/plugins/imv_os/Makefile
  1773. src/libimcv/plugins/imc_attestation/Makefile
  1774. src/libimcv/plugins/imv_attestation/Makefile
  1775. src/libimcv/plugins/imc_swima/Makefile
  1776. src/libimcv/plugins/imv_swima/Makefile
  1777. src/libimcv/plugins/imc_hcd/Makefile
  1778. src/libimcv/plugins/imv_hcd/Makefile
  1779. src/charon/Makefile
  1780. src/charon-nm/Makefile
  1781. src/charon-tkm/Makefile
  1782. src/charon-cmd/Makefile
  1783. src/charon-svc/Makefile
  1784. src/charon-systemd/Makefile
  1785. src/libcharon/Makefile
  1786. src/libcharon/plugins/eap_aka/Makefile
  1787. src/libcharon/plugins/eap_aka_3gpp/Makefile
  1788. src/libcharon/plugins/eap_aka_3gpp/tests/Makefile
  1789. src/libcharon/plugins/eap_aka_3gpp2/Makefile
  1790. src/libcharon/plugins/eap_dynamic/Makefile
  1791. src/libcharon/plugins/eap_identity/Makefile
  1792. src/libcharon/plugins/eap_md5/Makefile
  1793. src/libcharon/plugins/eap_gtc/Makefile
  1794. src/libcharon/plugins/eap_sim/Makefile
  1795. src/libcharon/plugins/eap_sim_file/Makefile
  1796. src/libcharon/plugins/eap_sim_pcsc/Makefile
  1797. src/libcharon/plugins/eap_simaka_sql/Makefile
  1798. src/libcharon/plugins/eap_simaka_pseudonym/Makefile
  1799. src/libcharon/plugins/eap_simaka_reauth/Makefile
  1800. src/libcharon/plugins/eap_mschapv2/Makefile
  1801. src/libcharon/plugins/eap_tls/Makefile
  1802. src/libcharon/plugins/eap_ttls/Makefile
  1803. src/libcharon/plugins/eap_peap/Makefile
  1804. src/libcharon/plugins/eap_tnc/Makefile
  1805. src/libcharon/plugins/eap_radius/Makefile
  1806. src/libcharon/plugins/xauth_generic/Makefile
  1807. src/libcharon/plugins/xauth_eap/Makefile
  1808. src/libcharon/plugins/xauth_pam/Makefile
  1809. src/libcharon/plugins/xauth_noauth/Makefile
  1810. src/libcharon/plugins/tnc_ifmap/Makefile
  1811. src/libcharon/plugins/tnc_pdp/Makefile
  1812. src/libcharon/plugins/save_keys/Makefile
  1813. src/libcharon/plugins/socket_default/Makefile
  1814. src/libcharon/plugins/socket_dynamic/Makefile
  1815. src/libcharon/plugins/socket_win/Makefile
  1816. src/libcharon/plugins/bypass_lan/Makefile
  1817. src/libcharon/plugins/connmark/Makefile
  1818. src/libcharon/plugins/counters/Makefile
  1819. src/libcharon/plugins/forecast/Makefile
  1820. src/libcharon/plugins/farp/Makefile
  1821. src/libcharon/plugins/smp/Makefile
  1822. src/libcharon/plugins/sql/Makefile
  1823. src/libcharon/plugins/dnscert/Makefile
  1824. src/libcharon/plugins/ipseckey/Makefile
  1825. src/libcharon/plugins/medsrv/Makefile
  1826. src/libcharon/plugins/medcli/Makefile
  1827. src/libcharon/plugins/addrblock/Makefile
  1828. src/libcharon/plugins/unity/Makefile
  1829. src/libcharon/plugins/uci/Makefile
  1830. src/libcharon/plugins/ha/Makefile
  1831. src/libcharon/plugins/kernel_netlink/Makefile
  1832. src/libcharon/plugins/kernel_pfkey/Makefile
  1833. src/libcharon/plugins/kernel_pfroute/Makefile
  1834. src/libcharon/plugins/kernel_libipsec/Makefile
  1835. src/libcharon/plugins/kernel_wfp/Makefile
  1836. src/libcharon/plugins/kernel_iph/Makefile
  1837. src/libcharon/plugins/whitelist/Makefile
  1838. src/libcharon/plugins/ext_auth/Makefile
  1839. src/libcharon/plugins/lookip/Makefile
  1840. src/libcharon/plugins/error_notify/Makefile
  1841. src/libcharon/plugins/certexpire/Makefile
  1842. src/libcharon/plugins/systime_fix/Makefile
  1843. src/libcharon/plugins/led/Makefile
  1844. src/libcharon/plugins/duplicheck/Makefile
  1845. src/libcharon/plugins/coupling/Makefile
  1846. src/libcharon/plugins/radattr/Makefile
  1847. src/libcharon/plugins/osx_attr/Makefile
  1848. src/libcharon/plugins/p_cscf/Makefile
  1849. src/libcharon/plugins/android_dns/Makefile
  1850. src/libcharon/plugins/android_log/Makefile
  1851. src/libcharon/plugins/stroke/Makefile
  1852. src/libcharon/plugins/vici/Makefile
  1853. src/libcharon/plugins/vici/ruby/Makefile
  1854. src/libcharon/plugins/vici/perl/Makefile
  1855. src/libcharon/plugins/vici/python/Makefile
  1856. src/libcharon/plugins/updown/Makefile
  1857. src/libcharon/plugins/dhcp/Makefile
  1858. src/libcharon/plugins/load_tester/Makefile
  1859. src/libcharon/plugins/resolve/Makefile
  1860. src/libcharon/plugins/attr/Makefile
  1861. src/libcharon/plugins/attr_sql/Makefile
  1862. src/libcharon/tests/Makefile
  1863. src/libtpmtss/Makefile
  1864. src/libtpmtss/plugins/tpm/Makefile
  1865. src/stroke/Makefile
  1866. src/ipsec/Makefile
  1867. src/starter/Makefile
  1868. src/starter/tests/Makefile
  1869. src/_updown/Makefile
  1870. src/_copyright/Makefile
  1871. src/scepclient/Makefile
  1872. src/aikgen/Makefile
  1873. src/tpm_extendpcr/Makefile
  1874. src/pki/Makefile
  1875. src/pki/man/Makefile
  1876. src/pool/Makefile
  1877. src/libfast/Makefile
  1878. src/manager/Makefile
  1879. src/medsrv/Makefile
  1880. src/checksum/Makefile
  1881. src/conftest/Makefile
  1882. src/pt-tls-client/Makefile
  1883. src/sw-collector/Makefile
  1884. src/sec-updater/Makefile
  1885. src/swanctl/Makefile
  1886. src/xfrmi/Makefile
  1887. scripts/Makefile
  1888. testing/Makefile
  1889. ])
  1890. # =================
  1891. # build man pages
  1892. # =================
  1893. AC_CONFIG_FILES([
  1894. conf/strongswan.conf.5.head
  1895. conf/strongswan.conf.5.tail
  1896. man/ipsec.conf.5
  1897. man/ipsec.secrets.5
  1898. src/charon-cmd/charon-cmd.8
  1899. src/pki/man/pki.1
  1900. src/pki/man/pki---acert.1
  1901. src/pki/man/pki---dn.1
  1902. src/pki/man/pki---gen.1
  1903. src/pki/man/pki---issue.1
  1904. src/pki/man/pki---keyid.1
  1905. src/pki/man/pki---pkcs12.1
  1906. src/pki/man/pki---pkcs7.1
  1907. src/pki/man/pki---print.1
  1908. src/pki/man/pki---pub.1
  1909. src/pki/man/pki---req.1
  1910. src/pki/man/pki---self.1
  1911. src/pki/man/pki---signcrl.1
  1912. src/pki/man/pki---verify.1
  1913. src/swanctl/swanctl.8
  1914. src/swanctl/swanctl.conf.5.head
  1915. src/swanctl/swanctl.conf.5.tail
  1916. src/pt-tls-client/pt-tls-client.1
  1917. src/sw-collector/sw-collector.8
  1918. src/sec-updater/sec-updater.8
  1919. ])
  1920. AC_OUTPUT
  1921. # ========================
  1922. # report enabled plugins
  1923. # ========================
  1924. AC_MSG_RESULT([])
  1925. AC_MSG_RESULT([ strongSwan will be built with the following plugins])
  1926. AC_MSG_RESULT([-----------------------------------------------------])
  1927. AC_MSG_RESULT([libstrongswan:$s_plugins])
  1928. AC_MSG_RESULT([libcharon: $c_plugins])
  1929. AC_MSG_RESULT([libtnccs: $t_plugins])
  1930. AC_MSG_RESULT([libtpmtss: $p_plugins])
  1931. AC_MSG_RESULT([])