configure.ac 70 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864
  1. # -*- Autoconf -*-
  2. # Process this file with autoconf to produce a configure script.
  3. AC_PREREQ([2.59])
  4. AC_INIT(bind10, 20140306, bind10-dev@isc.org)
  5. AC_CONFIG_SRCDIR(README)
  6. # serial-tests is not available in automake version before 1.13, so
  7. # we'll check that and conditionally use serial-tests. This check is
  8. # adopted from code by Richard W.M. Jones:
  9. # https://www.redhat.com/archives/libguestfs/2013-February/msg00102.html
  10. m4_define([serial_tests], [
  11. m4_esyscmd([automake --version |
  12. head -1 |
  13. awk '{split ($NF,a,"."); if (a[1] == 1 && a[2] >= 12) { print "serial-tests" }}'
  14. ])
  15. ])
  16. AM_INIT_AUTOMAKE(foreign serial_tests)
  17. m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])dnl be backward compatible
  18. AC_CONFIG_HEADERS([config.h])
  19. AC_CONFIG_MACRO_DIR([m4macros])
  20. # Checks for programs.
  21. AC_PROG_CXX
  22. want_dns=yes
  23. AC_ARG_ENABLE(dns,
  24. [AC_HELP_STRING([--disable-dns],
  25. [disable DNS components])],
  26. [want_dns=$enableval])
  27. AM_CONDITIONAL([WANT_DNS], [test "$want_dns" = "yes"])
  28. if test "$want_dns" = "yes"; then
  29. WANT_DNS=yes
  30. else
  31. WANT_DNS=no
  32. fi
  33. AC_SUBST(WANT_DNS)
  34. want_dhcp=yes
  35. AC_ARG_ENABLE(dhcp,
  36. [AC_HELP_STRING([--disable-dhcp],
  37. [disable DHCP components])],
  38. [want_dhcp=$enableval])
  39. AM_CONDITIONAL([WANT_DHCP], [test "$want_dhcp" = "yes"])
  40. if test "$want_dhcp" = "yes"; then
  41. WANT_DHCP=yes
  42. else
  43. WANT_DHCP=no
  44. fi
  45. AC_SUBST(WANT_DHCP)
  46. want_experimental_resolver=no
  47. AC_ARG_ENABLE(experimental-resolver,
  48. [AC_HELP_STRING([--enable-experimental-resolver],
  49. [enable the experimental resolver [default=no]])],
  50. [want_experimental_resolver=$enableval])
  51. AM_CONDITIONAL([WANT_EXPERIMENTAL_RESOLVER], [test "$want_experimental_resolver" = "yes"])
  52. if test "$want_experimental_resolver" = "yes"; then
  53. WANT_EXPERIMENTAL_RESOLVER=yes
  54. else
  55. WANT_EXPERIMENTAL_RESOLVER=no
  56. fi
  57. AC_SUBST(WANT_EXPERIMENTAL_RESOLVER)
  58. # At least DNS or DHCP components must be enabled
  59. if test "$want_dns" != "yes" -a "$want_dhcp" != "yes"; then
  60. AC_MSG_ERROR([At least one of DNS or DHCP components must be enabled to do a BIND 10 build.])
  61. fi
  62. # Experimental resolver requires DNS components to be enabled
  63. if test "$want_experimental_resolver" = "yes" -a "$want_dns" != "yes"; then
  64. AC_MSG_ERROR([You must also enable DNS components if you want to enable the experimental resolver.])
  65. fi
  66. # Enable low-performing debugging facilities? This option optionally
  67. # enables some debugging aids that perform slowly and hence aren't built
  68. # by default.
  69. AC_ARG_ENABLE([debug],
  70. AS_HELP_STRING([--enable-debug],
  71. [enable debugging (default is no)]),
  72. [case "${enableval}" in
  73. yes) debug_enabled=yes ;;
  74. no) debug_enabled=no ;;
  75. *) AC_MSG_ERROR([bad value ${enableval} for --enable-debug]) ;;
  76. esac],[debug_enabled=no])
  77. AM_CONDITIONAL([DEBUG_ENABLED], [test x$debug_enabled = xyes])
  78. AM_COND_IF([DEBUG_ENABLED], [AC_DEFINE([ENABLE_DEBUG], [1], [Enable low-performing debugging facilities?])])
  79. # Libtool configuration
  80. #
  81. # libtool cannot handle spaces in paths, so exit early if there is one
  82. if [ test `echo $PWD | grep -c ' '` != "0" ]; then
  83. AC_MSG_ERROR([BIND 10 cannot be built in a directory that contains spaces, because of libtool limitations. Please change the directory name, or use a symbolic link that does not contain spaces.])
  84. fi
  85. # On FreeBSD (and probably some others), clang++ does not meet an autoconf
  86. # assumption in identifying libtool configuration regarding shared library:
  87. # the configure script will execute "$CC -shared $CFLAGS/$CXXFLAGS -v" and
  88. # expect the output contains -Lxxx or -Ryyy. This is the case for g++, but
  89. # not for clang++, and, as a result, it will cause various errors in linking
  90. # programs or running them with a shared object (such as some of our python
  91. # scripts).
  92. # To work around this problem we define a temporary variable
  93. # "CXX_LIBTOOL_LDFLAGS". It's expected to be defined as, e.g, "-L/usr/lib"
  94. # to temporarily fake the output so that it will be compatible with that of
  95. # g++.
  96. CFLAGS_SAVED=$CFLAGS
  97. CXXFLAGS_SAVED=$CXXFLAGS
  98. CFLAGS="$CFLAGS $CXX_LIBTOOL_LDFLAGS"
  99. CXXFLAGS="$CXXFLAGS $CXX_LIBTOOL_LDFLAGS"
  100. AC_PROG_LIBTOOL
  101. CFLAGS=$CFLAGS_SAVED
  102. CXXFLAGS=$CXXFLAGS_SAVED
  103. # Use C++ language
  104. AC_LANG([C++])
  105. # Identify the compiler: this check must be after AC_PROG_CXX and AC_LANG.
  106. AM_CONDITIONAL(USE_GXX, test "X${GXX}" = "Xyes")
  107. AC_CHECK_DECL([__SUNPRO_CC], [SUNCXX="yes"], [SUNCXX="no"])
  108. AC_CHECK_DECL([__clang__], [CLANGPP="yes"], [CLANGPP="no"])
  109. AM_CONDITIONAL(USE_CLANGPP, test "X${CLANGPP}" = "Xyes")
  110. dnl Determine if weare using GNU sed
  111. GNU_SED=no
  112. $SED --version 2> /dev/null | grep GNU > /dev/null 2>&1
  113. if test $? -eq 0; then
  114. GNU_SED=yes
  115. fi
  116. # Linker options
  117. # check -R, "-Wl,-R" or -rpath (we share the AX function defined in
  118. # examples/m4)
  119. AX_ISC_RPATH
  120. # Compiler dependent settings: define some mandatory CXXFLAGS here.
  121. # We also use a separate variable B10_CXXFLAGS. This will (and should) be
  122. # used as the default value for each specific AM_CXXFLAGS:
  123. # AM_CXXFLAGS = $(B10_CXXFLAGS)
  124. # AM_CXXFLAGS += ... # add module specific flags
  125. # We need this so that we can disable some specific compiler warnings per
  126. # module basis; since AM_CXXFLAGS are placed before CXXFLAGS, and since
  127. # gcc's -Wno-XXX option must be specified after -Wall or -Wextra, we cannot
  128. # specify the default warning flags in CXXFLAGS and let specific modules
  129. # "override" the default.
  130. # This may be used to try linker flags.
  131. AC_DEFUN([BIND10_CXX_TRY_FLAG], [
  132. AC_MSG_CHECKING([whether $CXX supports $1])
  133. bind10_save_CXXFLAGS="$CXXFLAGS"
  134. CXXFLAGS="$CXXFLAGS $1"
  135. AC_LINK_IFELSE([AC_LANG_SOURCE([int main(void){ return 0;}])],
  136. [bind10_cxx_flag=yes], [bind10_cxx_flag=no])
  137. CXXFLAGS="$bind10_save_CXXFLAGS"
  138. if test "x$bind10_cxx_flag" = "xyes"; then
  139. ifelse([$2], , :, [$2])
  140. else
  141. ifelse([$3], , :, [$3])
  142. fi
  143. AC_MSG_RESULT([$bind10_cxx_flag])
  144. ])
  145. CXX_VERSION="unknown"
  146. # SunStudio compiler requires special compiler options for boost
  147. # (http://blogs.sun.com/sga/entry/boost_mini_howto)
  148. if test "$SUNCXX" = "yes"; then
  149. CXX_VERSION=`$CXX -V 2> /dev/null | head -1`
  150. CXXFLAGS="$CXXFLAGS -library=stlport4 -features=tmplife -features=tmplrefstatic"
  151. MULTITHREADING_FLAG="-mt"
  152. fi
  153. # Newer versions of clang++ promotes "unused driver arguments" warnings to
  154. # a fatal error with -Werror, causing build failure. Since we use multiple
  155. # compilers on multiple systems, this can easily happen due to settings for
  156. # non clang++ environments that could be just ignored otherwise. It can also
  157. # happen if clang++ is used via ccache. So, although probably suboptimal,
  158. # we suppress this particular warning. Note that it doesn't weaken checks
  159. # on the source code.
  160. if test "$CLANGPP" = "yes"; then
  161. CXX_VERSION=`$CXX --version 2> /dev/null | head -1`
  162. B10_CXXFLAGS="$B10_CXXFLAGS -Qunused-arguments"
  163. fi
  164. BIND10_CXX_TRY_FLAG([-Wno-missing-field-initializers],
  165. [WARNING_NO_MISSING_FIELD_INITIALIZERS_CFLAG="-Wno-missing-field-initializers"])
  166. AC_SUBST(WARNING_NO_MISSING_FIELD_INITIALIZERS_CFLAG)
  167. # gcc specific settings:
  168. if test "X$GXX" = "Xyes"; then
  169. CXX_VERSION=`$CXX --version 2> /dev/null | head -1`
  170. B10_CXXFLAGS="$B10_CXXFLAGS -Wall -Wextra -Wnon-virtual-dtor -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare"
  171. case "$host" in
  172. *-solaris*)
  173. MULTITHREADING_FLAG=-pthreads
  174. # In Solaris, IN6ADDR_ANY_INIT and IN6ADDR_LOOPBACK_INIT need -Wno-missing-braces
  175. B10_CXXFLAGS="$B10_CXXFLAGS -Wno-missing-braces"
  176. ;;
  177. *)
  178. MULTITHREADING_FLAG=-pthread
  179. ;;
  180. esac
  181. # Don't use -Werror if configured not to
  182. AC_ARG_WITH(werror,
  183. AC_HELP_STRING([--with-werror], [Compile using -Werror (default=yes)]),
  184. [
  185. case "${withval}" in
  186. yes) with_werror=1 ;;
  187. no) with_werror=0 ;;
  188. *) AC_MSG_ERROR(bad value ${withval} for --with-werror) ;;
  189. esac],
  190. [with_werror=1])
  191. werror_ok=0
  192. # Certain versions of gcc (g++) have a bug that incorrectly warns about
  193. # the use of anonymous name spaces even if they're closed in a single
  194. # translation unit. For these versions we have to disable -Werror.
  195. if test $with_werror = 1; then
  196. CXXFLAGS_SAVED="$CXXFLAGS"
  197. CXXFLAGS="$CXXFLAGS $B10_CXXFLAGS -Werror"
  198. AC_MSG_CHECKING(for in-TU anonymous namespace breakage)
  199. # We use struct, not class, here, because some compilers complain about
  200. # "unused private members", causing a false positive.
  201. AC_TRY_COMPILE([namespace { struct Foo {}; }
  202. namespace isc {struct Bar {Foo foo_;};} ],,
  203. [AC_MSG_RESULT(no)
  204. werror_ok=1
  205. B10_CXXFLAGS="$B10_CXXFLAGS -Werror"],
  206. [AC_MSG_RESULT(yes)])
  207. CXXFLAGS="$CXXFLAGS_SAVED"
  208. fi
  209. fi dnl GXX = yes
  210. # allow building programs with static link. we need to make it selective
  211. # because loadable modules cannot be statically linked.
  212. AC_ARG_ENABLE([static-link],
  213. AC_HELP_STRING([--enable-static-link],
  214. [build programs with static link [[default=no]]]),
  215. [enable_static_link=yes], [enable_static_link=no])
  216. AM_CONDITIONAL(USE_STATIC_LINK, test $enable_static_link = yes)
  217. AM_COND_IF([USE_STATIC_LINK], [AC_DEFINE([USE_STATIC_LINK], [1], [BIND 10 was statically linked?])])
  218. # Check validity about some libtool options
  219. if test $enable_static_link = yes -a $enable_static = no; then
  220. AC_MSG_ERROR([--enable-static-link requires --enable-static])
  221. fi
  222. if test $enable_shared = no; then
  223. AC_MSG_ERROR([BIND 10 requires shared libraries to be built])
  224. fi
  225. # allow configuring without setproctitle.
  226. AC_ARG_ENABLE(setproctitle-check,
  227. AC_HELP_STRING([--disable-setproctitle-check],
  228. [do not check for python setproctitle module (used to give nice names to python processes)]),
  229. setproctitle_check=$enableval, setproctitle_check=yes)
  230. # OS dependent configuration
  231. SET_ENV_LIBRARY_PATH=no
  232. ENV_LIBRARY_PATH=LD_LIBRARY_PATH
  233. bind10_undefined_pthread_behavior=no
  234. case "$host" in
  235. *-solaris*)
  236. # Solaris requires special definitions to get some standard libraries
  237. # (e.g. getopt(3)) available with common used header files.
  238. CPPFLAGS="$CPPFLAGS -D_XPG4_2 -D__EXTENSIONS__"
  239. # "now" binding is necessary to prevent deadlocks in C++ static initialization code
  240. LDFLAGS="$LDFLAGS -z now"
  241. # Destroying locked mutexes, condition variables being waited
  242. # on, etc. are undefined behavior on Solaris, so we set it as
  243. # such here.
  244. bind10_undefined_pthread_behavior=yes
  245. ;;
  246. *-apple-darwin*)
  247. # Starting with OSX 10.7 (Lion) we must choose which IPv6 API to use
  248. # (RFC2292 or RFC3542).
  249. CPPFLAGS="$CPPFLAGS -D__APPLE_USE_RFC_3542"
  250. # In OS X 10.9 (and possibly any future versions?) pthread_cond_destroy
  251. # doesn't work as documented, which makes some of unit tests fail.
  252. # Testing a specific system and version is not a good practice, but
  253. # identifying this behavior would be too heavy (running a program
  254. # with multiple threads), so this is a compromise. In general,
  255. # it should be avoided to rely on 'osx_version' unless there's no
  256. # viable alternative.
  257. osx_version=`/usr/bin/sw_vers -productVersion`
  258. if [ test $osx_version = "10.9" ]; then
  259. bind10_undefined_pthread_behavior=yes
  260. fi
  261. # libtool doesn't work perfectly with Darwin: libtool embeds the
  262. # final install path in dynamic libraries and our loadable python
  263. # modules always refer to that path even if it's loaded within the
  264. # source tree. This prevents pre-install tests from working.
  265. # To work around this problem we explicitly specify paths to dynamic
  266. # libraries when we use them in the source tree.
  267. SET_ENV_LIBRARY_PATH=yes
  268. ENV_LIBRARY_PATH=DYLD_LIBRARY_PATH
  269. ;;
  270. *-freebsd*)
  271. SET_ENV_LIBRARY_PATH=yes
  272. ;;
  273. *-netbsd*)
  274. SET_ENV_LIBRARY_PATH=yes
  275. ;;
  276. *-openbsd*)
  277. SET_ENV_LIBRARY_PATH=yes
  278. ;;
  279. esac
  280. AM_CONDITIONAL(SET_ENV_LIBRARY_PATH, test $SET_ENV_LIBRARY_PATH = yes)
  281. AC_SUBST(SET_ENV_LIBRARY_PATH)
  282. AC_SUBST(ENV_LIBRARY_PATH)
  283. if [ test $bind10_undefined_pthread_behavior = "yes" ]; then
  284. AC_DEFINE([HAS_UNDEFINED_PTHREAD_BEHAVIOR], [1], [Does this platform have some undefined pthreads behavior?])
  285. fi
  286. # Our experiments have shown Solaris 10 has broken support for the
  287. # IPV6_USE_MIN_MTU socket option for getsockopt(); it doesn't return the value
  288. # previously set via setsockopt(). We know it doesn't happen on one instance
  289. # on Solaris 11, but we don't know whether it happens for any Solaris 10
  290. # implementations or for earlier versions of Solaris. In any case, at the
  291. # moment this matters for only one unittest case, so we'll simply disable
  292. # the affected test using the following definition with the specific hardcoding
  293. # of that version of Solaris.
  294. case "$host" in
  295. *-solaris2.10)
  296. AC_DEFINE([HAVE_BROKEN_GET_IPV6_USE_MIN_MTU], [1],
  297. [Define to 1 if getsockopt(IPV6_USE_MIN_MTU) does not work])
  298. ;;
  299. esac
  300. m4_define([_AM_PYTHON_INTERPRETER_LIST], [python python3.3 python3.2 python3.1 python3])
  301. AC_ARG_WITH([pythonpath],
  302. AC_HELP_STRING([--with-pythonpath=PATH],
  303. [specify an absolute path to python executable when automatic version check (incorrectly) fails]),
  304. [python_path="$withval"], [python_path="auto"])
  305. if test "$python_path" = auto; then
  306. AM_PATH_PYTHON([3.1])
  307. else
  308. # Older versions of automake can't handle python3 well. This is an
  309. # in-house workaround for them.
  310. PYTHON=$python_path
  311. AC_SUBST(PYTHON)
  312. PYTHON_PREFIX='${prefix}'
  313. AC_SUBST(PYTHON_PREFIX)
  314. PYTHON_EXEC_PREFIX='$(exec_prefix)'
  315. AC_SUBST(PYTHON_EXEC_PREFIX)
  316. PYTHON_VERSION=[`$PYTHON -c "import sys; sys.stdout.write(sys.version[:3])"`]
  317. if test `echo "$PYTHON_VERSION >= 3.1" | bc` != 1 ; then
  318. AC_MSG_ERROR(["Python version too old: $PYTHON_VERSION, need 3.1 or higher"])
  319. fi
  320. AC_SUBST(PYTHON_VERSION)
  321. PYTHON_PLATFORM=`$PYTHON -c "import sys; print(sys.platform)"`
  322. AC_SUBST(PYTHON_PLATFORM)
  323. pythondir='${prefix}/lib/python'$PYTHON_VERSION'/site-packages'
  324. AC_SUBST(pythondir)
  325. pkgpythondir='${pythondir}/'$PACKAGE
  326. AC_SUBST(pkgpythondir)
  327. pyexecdir='${exec_prefix}/lib/python'$PYTHON_VERSION'/site-packages'
  328. AC_SUBST(pyexecdir)
  329. pkgpyexecdir='${pyexecdir}/'$PACKAGE
  330. AC_SUBST(pkgpyexecdir)
  331. fi
  332. # We need to store the default pyexecdir in a separate variable so that
  333. # we can specify in Makefile.am the install directory of various BIND 10
  334. # python scripts and loadable modules; in Makefile.am we cannot replace
  335. # $(pyexecdir) using itself, e.g, this doesn't work:
  336. # pyexecdir = $(pyexecdir)/isc/some_module
  337. # The separate variable makes this setup possible as follows:
  338. # pyexecdir = $(PYTHON_SITEPKG_DIR)/isc/some_module
  339. PYTHON_SITEPKG_DIR=${pyexecdir}
  340. AC_SUBST(PYTHON_SITEPKG_DIR)
  341. # This will be commonly used in various Makefile.am's that need to generate
  342. # python log messages.
  343. PYTHON_LOGMSGPKG_DIR="\$(top_builddir)/src/lib/python/isc/log_messages"
  344. AC_SUBST(PYTHON_LOGMSGPKG_DIR)
  345. # This is python package paths commonly used in python tests. See
  346. # README of log_messages for why it's included.
  347. # lib/dns/python/.libs is necessary because __init__.py of isc package
  348. # automatically imports isc.datasrc, which then requires the DNS loadable
  349. # module. #2145 should eliminate the need for it.
  350. COMMON_PYTHON_PATH="\$(abs_top_builddir)/src/lib/python/isc/log_messages:\$(abs_top_builddir)/src/lib/python/isc/cc:\$(abs_top_srcdir)/src/lib/python:\$(abs_top_builddir)/src/lib/python:\$(abs_top_builddir)/src/lib/dns/python/.libs"
  351. AC_SUBST(COMMON_PYTHON_PATH)
  352. # Check for python development environments
  353. if test -x ${PYTHON}-config; then
  354. PYTHON_INCLUDES=`${PYTHON}-config --includes`
  355. # Add any '-L..." flags to PYTHON_LDFLAGS. We first make a copy of
  356. # python-config --ldflags, removing any spaces and tabs
  357. # between "-L" and its argument (some instances of python-config
  358. # insert a space, which would confuse the code below).
  359. # Notes: if -L isn't contained at all we can simply skip this process,
  360. # so we only go through the flag if it's contained; also, protecting
  361. # the output with [] seems necessary for environment to avoid getting
  362. # an empty output accidentally.
  363. python_config_ldflags=[`${PYTHON}-config --ldflags | ${SED} -ne 's/\([ \t]*-L\)[ ]*\([^ \t]*[ \t]*\)/\1\2/gp'`]
  364. for flag in $python_config_ldflags; do
  365. flag=`echo $flag | ${SED} -ne 's/^\(\-L.*\)$/\1/p'`
  366. if test "X${flag}" != X; then
  367. PYTHON_LDFLAGS="$PYTHON_LDFLAGS ${flag}"
  368. fi
  369. done
  370. # on some platforms, ${PYTHON}-config --ldflags doesn't provide a -L
  371. # option while having the library under a non trivial directory.
  372. # as a workaround we try the "lib" sub directory under the common
  373. # prefix for this python.
  374. if test -z "${PYTHON_LDFLAGS}"; then
  375. PYTHON_LDFLAGS="-L`${PYTHON}-config --prefix`/lib"
  376. fi
  377. else
  378. if test "X$PYTHON_INCLUDES" = X -o "X$PYTHON_LDFLAGS" = X; then
  379. AC_MSG_WARN([${PYTHON}-config does not exist or is not executable, so we could not detect python development environment. Your system may require an additional package (e.g. "python3-dev"). Alternatively, if you are sure you have python headers and libraries, define PYTHON_INCLUDES and PYTHON_LDFLAGS and run this script.])
  380. fi
  381. fi
  382. # Some OSes including NetBSD don't install libpython.so in a well known path.
  383. # To avoid requiring dynamic library path with our python wrapper loadable
  384. # modules, we embed the path to the modules when possible. We do this even
  385. # when the path is known in the common operational environment (e.g. when
  386. # it's stored in a common "hint" file) for simplicity.
  387. if test "x$ISC_RPATH_FLAG" != "x"; then
  388. python_rpath=
  389. for flag in ${PYTHON_LDFLAGS}; do
  390. python_rpath="${python_rpath} `echo $flag | ${SED} -ne "s/^\(\-L\)/${ISC_RPATH_FLAG}/p"`"
  391. done
  392. PYTHON_LDFLAGS="${PYTHON_LDFLAGS} ${python_rpath}"
  393. fi
  394. AC_SUBST(PYTHON_INCLUDES)
  395. AC_SUBST(PYTHON_LDFLAGS)
  396. CPPFLAGS_SAVED="$CPPFLAGS"
  397. CPPFLAGS="$CPPFLAGS ${PYTHON_INCLUDES}"
  398. AC_CHECK_HEADERS([Python.h],, AC_MSG_ERROR([Missing Python.h]))
  399. CPPFLAGS="$CPPFLAGS_SAVED"
  400. # Check for python library. Needed for Python-wrapper libraries.
  401. LDFLAGS_SAVED="$LDFLAGS"
  402. LDFLAGS="$LDFLAGS $PYTHON_LDFLAGS"
  403. python_bin="python${PYTHON_VERSION}"
  404. AC_CHECK_LIB($python_bin, main, python_lib=$python_bin, python_lib=no)
  405. if test $python_lib != "no"; then
  406. PYTHON_LIB="-l$python_lib"
  407. fi
  408. AC_SUBST(PYTHON_LIB)
  409. LDFLAGS=$LDFLAGS_SAVED
  410. # Python 3.2 changed the return type of internal hash function to
  411. # Py_hash_t and some platforms (such as Solaris) strictly check for long
  412. # vs Py_hash_t. So we detect and use the appropriate return type.
  413. # Remove this test (and associated changes in pydnspp_config.h.in) when
  414. # we require Python 3.2.
  415. have_py_hash_t=0
  416. CPPFLAGS_SAVED="$CPPFLAGS"
  417. CPPFLAGS=${PYTHON_INCLUDES}
  418. AC_MSG_CHECKING(for Py_hash_t)
  419. AC_TRY_COMPILE([#include <Python.h>
  420. Py_hash_t h;],,
  421. [AC_MSG_RESULT(yes)
  422. have_py_hash_t=1],
  423. [AC_MSG_RESULT(no)])
  424. CPPFLAGS="$CPPFLAGS_SAVED"
  425. HAVE_PY_HASH_T=$have_py_hash_t
  426. AC_SUBST(HAVE_PY_HASH_T)
  427. # Check for the setproctitle module
  428. if test "$setproctitle_check" = "yes" ; then
  429. AC_MSG_CHECKING(for setproctitle module)
  430. if "$PYTHON" -c 'import setproctitle' 2>/dev/null ; then
  431. AC_MSG_RESULT(ok)
  432. else
  433. AC_MSG_RESULT(missing)
  434. AC_MSG_WARN([Missing setproctitle python module.
  435. Use --disable-setproctitle-check to skip this check.
  436. In this case we will continue, but naming of python processes will not work.])
  437. fi
  438. fi
  439. # (g++ only check)
  440. # Python 3.2 has an unused parameter in one of its headers. This
  441. # has been reported, but not fixed as of yet, so we check if we need
  442. # to set -Wno-unused-parameter.
  443. if test "X$GXX" = "Xyes" -a "$werror_ok" = 1; then
  444. CPPFLAGS_SAVED="$CPPFLAGS"
  445. CPPFLAGS=${PYTHON_INCLUDES}
  446. CXXFLAGS_SAVED="$CXXFLAGS"
  447. CXXFLAGS="$CXXFLAGS $B10_CXXFLAGS -Werror"
  448. AC_MSG_CHECKING([whether we need -Wno-unused-parameter for python])
  449. AC_TRY_COMPILE(
  450. [#include <Python.h>],
  451. [],
  452. [AC_MSG_RESULT(no)],
  453. [
  454. CXXFLAGS="$CXXFLAGS -Wno-unused-parameter"
  455. AC_TRY_COMPILE([#include <Python.h>],
  456. [],
  457. [AC_MSG_RESULT(yes)
  458. PYTHON_CXXFLAGS="${PYTHON_CXXFLAGS} -Wno-unused-parameter"
  459. AC_SUBST(PYTHON_CXXFLAGS)
  460. ],
  461. [AC_MSG_ERROR([Can't compile against Python.h. If you're using MacOS X and have installed Python with Homebrew, see http://bind10.isc.org/wiki/SystemNotesMacOSX])]
  462. )
  463. ]
  464. )
  465. CXXFLAGS="$CXXFLAGS_SAVED"
  466. CPPFLAGS="$CPPFLAGS_SAVED"
  467. fi
  468. # produce PIC unless we disable shared libraries. need this for python bindings.
  469. if test $enable_shared != "no" -a "X$GXX" = "Xyes"; then
  470. B10_CXXFLAGS="$B10_CXXFLAGS -fPIC"
  471. fi
  472. AC_SUBST(B10_CXXFLAGS)
  473. # Checks for libraries.
  474. AC_SEARCH_LIBS(inet_pton, [nsl])
  475. AC_SEARCH_LIBS(recvfrom, [socket])
  476. AC_SEARCH_LIBS(nanosleep, [rt])
  477. AC_SEARCH_LIBS(dlsym, [dl])
  478. # Checks for header files.
  479. # Checks for typedefs, structures, and compiler characteristics.
  480. AC_HEADER_STDBOOL
  481. AC_TYPE_SIZE_T
  482. # Detect OS type (it may be used to do OS-specific things, e.g.
  483. # interface detection in DHCP)
  484. AC_MSG_CHECKING(OS family)
  485. system=`uname -s`
  486. case $system in
  487. Linux)
  488. OS_TYPE="Linux"
  489. CPPFLAGS="$CPPFLAGS -DOS_LINUX"
  490. ;;
  491. Darwin | FreeBSD | NetBSD | OpenBSD)
  492. OS_TYPE="BSD"
  493. CPPFLAGS="$CPPFLAGS -DOS_BSD"
  494. ;;
  495. SunOS)
  496. OS_TYPE="Solaris"
  497. CPPFLAGS="$CPPFLAGS -DOS_SUN"
  498. ;;
  499. *)
  500. OS_TYPE="Unknown"
  501. AC_MSG_WARN("Unsupported OS: uname returned $system")
  502. ;;
  503. esac
  504. AC_MSG_RESULT($OS_TYPE)
  505. AM_CONDITIONAL(OS_LINUX, test $OS_TYPE = Linux)
  506. AM_COND_IF([OS_LINUX], [AC_DEFINE([OS_LINUX], [1], [Running on Linux?])])
  507. AM_CONDITIONAL(OS_BSD, test $OS_TYPE = BSD)
  508. AM_COND_IF([OS_BSD], [AC_DEFINE([OS_BSD], [1], [Running on BSD?])])
  509. AM_CONDITIONAL(OS_SOLARIS, test $OS_TYPE = Solaris)
  510. AM_COND_IF([OS_SOLARIS], [AC_DEFINE([OS_SOLARIS], [1], [Running on Solaris?])])
  511. # Deal with variants
  512. AM_CONDITIONAL(OS_FREEBSD, test $system = FreeBSD)
  513. AM_COND_IF([OS_FREEBSD], [AC_DEFINE([OS_FREEBSD], [1], [Running on FreeBSD?])])
  514. AM_CONDITIONAL(OS_NETBSD, test $system = NetBSD)
  515. AM_COND_IF([OS_NETBSD], [AC_DEFINE([OS_NETBSD], [1], [Running on NetBSD?])])
  516. AM_CONDITIONAL(OS_OPENBSD, test $system = OpenBSD)
  517. AM_COND_IF([OS_OPENBSD], [AC_DEFINE([OS_OPENBSD], [1], [Running on OpenBSD?])])
  518. AM_CONDITIONAL(OS_OSX, test $system = Darwin)
  519. AM_COND_IF([OS_OSX], [AC_DEFINE([OS_OSX], [1], [Running on OSX?])])
  520. AC_MSG_CHECKING(for sa_len in struct sockaddr)
  521. AC_TRY_COMPILE([
  522. #include <sys/types.h>
  523. #include <sys/socket.h>],
  524. [struct sockaddr sa; sa.sa_len = 0; return (0);],
  525. [AC_MSG_RESULT(yes)
  526. AC_DEFINE(HAVE_SA_LEN, 1, [Define to 1 if sockaddr has a sa_len member, and corresponding sin_len and sun_len])],
  527. AC_MSG_RESULT(no))
  528. AC_ARG_WITH(pycoverage,
  529. [ --with-pycoverage[=PROGRAM] enable python code coverage using the specified coverage], pycoverage="$withval", pycoverage="no")
  530. if test "$pycoverage" = "no" ; then
  531. # just run the tests normally with python
  532. PYCOVERAGE_RUN="${PYTHON}"
  533. USE_PYCOVERAGE="no"
  534. elif test "$pycoverage" = "yes" ; then
  535. PYCOVERAGE="coverage"
  536. PYCOVERAGE_RUN="${PYCOVERAGE} run --branch --append"
  537. USE_PYCOVERAGE="yes"
  538. else
  539. PYCOVERAGE="$pycoverage"
  540. PYCOVERAGE_RUN="${PYCOVERAGE} run --branch --append"
  541. USE_PYCOVERAGE="yes"
  542. fi
  543. AM_CONDITIONAL(ENABLE_PYTHON_COVERAGE, test x$USE_PYCOVERAGE != xno)
  544. AC_SUBST(PYCOVERAGE)
  545. AC_SUBST(PYCOVERAGE_RUN)
  546. AC_SUBST(USE_PYCOVERAGE)
  547. enable_gtest="no"
  548. GTEST_INCLUDES=
  549. AC_ARG_WITH([gtest-source],
  550. [AS_HELP_STRING([--with-gtest-source=PATH],
  551. [location of the Googletest source, defaults to /usr/src/gtest])],
  552. [enable_gtest="yes" ; GTEST_SOURCE="$withval"],
  553. [GTEST_SOURCE="/usr/src/gtest"])
  554. AC_ARG_WITH([gtest],
  555. [AS_HELP_STRING([--with-gtest=PATH],
  556. [specify a path to gtest header files (PATH/include) and library (PATH/lib)])],
  557. [gtest_path="$withval"; enable_gtest="yes"], [gtest_path="no"])
  558. AC_ARG_WITH(lcov,
  559. [ --with-lcov[=PROGRAM] enable gtest and coverage target using the specified lcov], lcov="$withval", lcov="no")
  560. USE_LCOV="no"
  561. if test "$lcov" != "no"; then
  562. # force gtest if not set
  563. if test "$enable_gtest" = "no"; then
  564. # AC_MSG_ERROR("lcov needs gtest for test coverage report")
  565. AC_MSG_NOTICE([gtest support is now enabled, because used by coverage tests])
  566. enable_gtest="yes"
  567. fi
  568. if test "$lcov" != "yes"; then
  569. LCOV=$lcov
  570. else
  571. AC_PATH_PROG([LCOV], [lcov])
  572. fi
  573. if test -x "${LCOV}"; then
  574. USE_LCOV="yes"
  575. else
  576. AC_MSG_ERROR([Cannot find lcov.])
  577. fi
  578. # is genhtml always in the same directory?
  579. GENHTML=`echo "$LCOV" | ${SED} s/lcov$/genhtml/`
  580. if test ! -x $GENHTML; then
  581. AC_MSG_ERROR([genhtml not found, needed for lcov])
  582. fi
  583. # GCC specific?
  584. CXXFLAGS="$CXXFLAGS -fprofile-arcs -ftest-coverage"
  585. LIBS=" $LIBS -lgcov"
  586. AC_SUBST(CPPFLAGS)
  587. AC_SUBST(LIBS)
  588. AC_SUBST(LCOV)
  589. AC_SUBST(GENHTML)
  590. fi
  591. AC_SUBST(USE_LCOV)
  592. # Simplified, non-caching AC_CHECK_PROG
  593. # Searches $PATH for the existence of argument 2,
  594. # and sets the full path to the variable in argument 1.
  595. # if not found, and a third argument is given, the value
  596. # is set to that. If not, the value is untouched.
  597. # Does not take absolute paths into account at this point,
  598. # and also works for single files only (arguments are not
  599. # stripped like in AC_CHECK_PROG)
  600. AC_DEFUN([ACX_CHECK_PROG_NONCACHE], [
  601. RESULT=""
  602. IFS_SAVED="$IFS"
  603. IFS=${PATH_SEPARATOR}
  604. for cur_path in ${PATH} ; do
  605. if test -e "${cur_path}/$2" ; then
  606. RESULT="${cur_path}/$2"
  607. fi
  608. done
  609. if test "$RESULT" = "" ; then
  610. :
  611. m4_ifvaln([$3], [$1=$3])
  612. else
  613. $1=$RESULT
  614. fi
  615. IFS="$IFS_SAVED"
  616. ])
  617. # Botan helper test function
  618. # Tries to compile a botan program, given the output of the given
  619. # config tool
  620. # Arguments:
  621. # - name of tool (checked for path), must support --libs and --cflags
  622. # - fixed argument(s) for tool
  623. # - action if successful
  624. AC_DEFUN([ACX_TRY_BOTAN_TOOL], [
  625. TOOL=$1
  626. TOOL_ARG=$2
  627. BOTAN_TOOL=""
  628. ACX_CHECK_PROG_NONCACHE([BOTAN_TOOL], [${TOOL}])
  629. AC_MSG_CHECKING([usability of ${TOOL} ${TOOL_ARG}])
  630. if test "$BOTAN_TOOL" != "" ; then
  631. if test -x ${BOTAN_TOOL}; then
  632. BOTAN_LIBS=`$BOTAN_TOOL $TOOL_ARG --libs`
  633. LIBS_SAVED=${LIBS}
  634. LIBS="$LIBS $BOTAN_LIBS"
  635. BOTAN_INCLUDES=`$BOTAN_TOOL $TOOL_ARG --cflags`
  636. CPPFLAGS_SAVED=${CPPFLAGS}
  637. CPPFLAGS="$BOTAN_INCLUDES $CPPFLAGS"
  638. #AC_MSG_RESULT([found])
  639. AC_LINK_IFELSE(
  640. [AC_LANG_PROGRAM([#include <botan/botan.h>
  641. #include <botan/hash.h>
  642. ],
  643. [using namespace Botan;
  644. LibraryInitializer::initialize();
  645. HashFunction *h = get_hash("MD5");
  646. ])],
  647. [ AC_MSG_RESULT([ok])
  648. $3
  649. ],
  650. [ AC_MSG_RESULT([not usable]) ]
  651. )
  652. LIBS=${LIBS_SAVED}
  653. CPPFLAGS=${CPPFLAGS_SAVED}
  654. else
  655. AC_MSG_RESULT([not executable])
  656. fi
  657. else
  658. AC_MSG_RESULT([not found])
  659. fi
  660. BOTAN_TOOL=""
  661. AC_SUBST(BOTAN_TOOL)
  662. ]
  663. )
  664. # Check for Botan
  665. #
  666. # Unless --with-botan-config is given, we first try to find these config
  667. # scripts ourselves. Unfortunately, on some systems, these scripts do not
  668. # provide the correct implementation, so for each script found, we try
  669. # a compilation test (ACX_TRY_BOTAN_TOOL). If none are found, or none of
  670. # them work, we see if pkg-config is available. If so, we try the several
  671. # potential pkg-config .pc files. Again, on some systems, these can return
  672. # incorrect information as well, so the try-compile test is repeated for
  673. # each.
  674. #
  675. # If a working config script or pkgconfig file is found, we then munge its
  676. # output for use in our Makefiles, and to make sure it works, another header
  677. # and compilation test is done (this should also check whether we can compile
  678. # against botan should neither -config scripts nor pkgconfig data exist).
  679. #
  680. botan_config="yes"
  681. AC_ARG_WITH([botan-config],
  682. AC_HELP_STRING([--with-botan-config=PATH],
  683. [specify the path to the botan-config script]),
  684. [botan_config="$withval"])
  685. if test "${botan_config}" = "no" ; then
  686. AC_MSG_ERROR([Need botan for libcryptolink])
  687. fi
  688. if test "${botan_config}" != "yes" ; then
  689. if test -x "${botan_config}" ; then
  690. if test -d "${botan_config}" ; then
  691. AC_MSG_ERROR([${botan_config} is a directory])
  692. else
  693. BOTAN_CONFIG="${botan_config}"
  694. fi
  695. else
  696. AC_MSG_ERROR([--with-botan-config should point to a botan-config program and not a directory (${botan_config})])
  697. fi
  698. else
  699. BOTAN_CONFIG=""
  700. # first try several possible names of the config script
  701. # (botan-config-1.8 is there just in case, the official name change
  702. # came later)
  703. BOTAN_CONFIG_VERSIONS="botan-config-1.10 botan-config-1.9 botan-config-1.8 botan-config"
  704. for botan_config in $BOTAN_CONFIG_VERSIONS; do
  705. ACX_TRY_BOTAN_TOOL([$botan_config],,
  706. [ BOTAN_CONFIG="$botan_config" ]
  707. )
  708. if test "$BOTAN_CONFIG" != "" ; then
  709. break
  710. fi
  711. done
  712. if test "$BOTAN_CONFIG" = "" ; then
  713. AC_PATH_PROG([PKG_CONFIG], [pkg-config])
  714. if test "$PKG_CONFIG" != "" ; then
  715. # Ok so no script found, see if pkg-config knows of it.
  716. # Unfortunately, the botan.pc files also have their minor version
  717. # in their name, so we need to try them one by one
  718. BOTAN_VERSIONS="botan-1.10 botan-1.9 botan-1.8"
  719. for version in $BOTAN_VERSIONS; do
  720. ACX_TRY_BOTAN_TOOL([pkg-config], ["$version --silence-errors"],
  721. [ BOTAN_CONFIG="$PKG_CONFIG $version" ]
  722. )
  723. if test "$BOTAN_CONFIG" != "" ; then
  724. break
  725. fi
  726. done
  727. fi
  728. fi
  729. fi
  730. if test "x${BOTAN_CONFIG}" != "x"
  731. then
  732. BOTAN_LIBS=`${BOTAN_CONFIG} --libs`
  733. BOTAN_INCLUDES=`${BOTAN_CONFIG} --cflags`
  734. # We expect botan-config --libs to contain -L<path_to_libbotan>, but
  735. # this is not always the case. As a heuristics workaround we add
  736. # -L`botan-config --prefix/lib` in this case (if not present already).
  737. # Same for BOTAN_INCLUDES (but using include instead of lib) below.
  738. if [ ${BOTAN_CONFIG} --prefix >/dev/null 2>&1 ] ; then
  739. echo ${BOTAN_LIBS} | grep -- -L > /dev/null || \
  740. BOTAN_LIBS="-L`${BOTAN_CONFIG} --prefix`/lib ${BOTAN_LIBS}"
  741. echo ${BOTAN_INCLUDES} | grep -- -I > /dev/null || \
  742. BOTAN_INCLUDES="-I`${BOTAN_CONFIG} --prefix`/include ${BOTAN_INCLUDES}"
  743. fi
  744. fi
  745. dnl Determine the Botan version
  746. AC_MSG_CHECKING([Botan version])
  747. cat > conftest.cpp << EOF
  748. #include <botan/version.h>
  749. AUTOCONF_BOTAN_VERSION=BOTAN_VERSION_MAJOR . BOTAN_VERSION_MINOR . BOTAN_VERSION_PATCH
  750. EOF
  751. BOTAN_VERSION=`$CPP $CPPFLAGS $BOTAN_INCLUDES conftest.cpp | grep '^AUTOCONF_BOTAN_VERSION=' | $SED -e 's/^AUTOCONF_BOTAN_VERSION=//' -e 's/[[ ]]//g' -e 's/"//g' 2> /dev/null`
  752. if test -z "$BOTAN_VERSION"; then
  753. BOTAN_VERSION="unknown"
  754. fi
  755. $RM -f conftest.cpp
  756. AC_MSG_RESULT([$BOTAN_VERSION])
  757. # botan-config script (and the way we call pkg-config) returns -L and -l
  758. # as one string, but we need them in separate values
  759. BOTAN_LDFLAGS=
  760. BOTAN_NEWLIBS=
  761. for flag in ${BOTAN_LIBS}; do
  762. BOTAN_LDFLAGS="${BOTAN_LDFLAGS} `echo $flag | ${SED} -ne '/^\(\-L\)/p'`"
  763. BOTAN_LIBS="${BOTAN_LIBS} `echo $flag | ${SED} -ne '/^\(\-l\)/p'`"
  764. done
  765. # See python_rpath for some info on why we do this
  766. if test "x$ISC_RPATH_FLAG" != "x"; then
  767. BOTAN_RPATH=
  768. for flag in ${BOTAN_LIBS}; do
  769. BOTAN_RPATH="${BOTAN_RPATH} `echo $flag | ${SED} -ne "s/^\(\-L\)/${ISC_RPATH_FLAG}/p"`"
  770. done
  771. AC_SUBST(BOTAN_RPATH)
  772. # According to the libtool manual, it should be sufficient if we
  773. # specify the "-R libdir" in our wrapper library of botan (no other
  774. # programs will need libbotan directly); "libdir" should be added to
  775. # the program's binary image. But we've seen in our build environments
  776. # that (some versions of?) libtool doesn't propagate -R as documented,
  777. # and it caused a linker error at run time. To work around this, we
  778. # also add the rpath to the global LDFLAGS.
  779. LDFLAGS="$BOTAN_RPATH $LDFLAGS"
  780. fi
  781. AC_SUBST(BOTAN_LDFLAGS)
  782. AC_SUBST(BOTAN_LIBS)
  783. AC_SUBST(BOTAN_INCLUDES)
  784. # Even though chances are high we already performed a real compilation check
  785. # in the search for the right (pkg)config data, we try again here, to
  786. # be sure.
  787. CPPFLAGS_SAVED=$CPPFLAGS
  788. CPPFLAGS="$BOTAN_INCLUDES $CPPFLAGS"
  789. LIBS_SAVED="$LIBS"
  790. LIBS="$LIBS $BOTAN_LIBS"
  791. # ac_header_preproc is an autoconf symbol (undocumented but stable) that
  792. # is set if the pre-processor phase passes. Thus by adding a custom
  793. # failure handler we can detect the difference between a header not existing
  794. # (or not even passing the pre-processor phase) and a header file resulting
  795. # in compilation failures.
  796. AC_CHECK_HEADERS([botan/botan.h],,[
  797. if test "x$ac_header_preproc" = "xyes"; then
  798. AC_MSG_ERROR([
  799. botan/botan.h was found but is unusable. The most common cause of this problem
  800. is attempting to use an updated C++ compiler with older C++ libraries, such as
  801. the version of Botan that comes with your distribution. If you have updated
  802. your C++ compiler we highly recommend that you use support libraries such as
  803. Boost and Botan that were compiled with the same compiler version.])
  804. else
  805. AC_MSG_ERROR([Missing required header files.])
  806. fi]
  807. )
  808. AC_LINK_IFELSE(
  809. [AC_LANG_PROGRAM([#include <botan/botan.h>
  810. #include <botan/hash.h>
  811. ],
  812. [using namespace Botan;
  813. LibraryInitializer::initialize();
  814. HashFunction *h = get_hash("MD5");
  815. ])],
  816. [AC_MSG_RESULT([checking for Botan library... yes])],
  817. [AC_MSG_RESULT([checking for Botan library... no])
  818. AC_MSG_ERROR([Needs Botan library 1.8 or higher. On some systems,
  819. the botan package has a few missing dependencies (libbz2 and
  820. libgmp), if libbotan has been installed and you see this error,
  821. try upgrading to a higher version of botan or installing libbz2
  822. and libgmp.])]
  823. )
  824. CPPFLAGS=$CPPFLAGS_SAVED
  825. LIBS=$LIBS_SAVED
  826. # Check for MySql. The path to the mysql_config program is given with
  827. # the --with-mysql-config (default to /usr/bin/mysql-config). By default,
  828. # the software is not built with MySQL support enabled.
  829. mysql_config="no"
  830. AC_ARG_WITH([dhcp-mysql],
  831. AC_HELP_STRING([--with-dhcp-mysql=PATH],
  832. [path to the MySQL 'mysql_config' script (MySQL is used for the DHCP database)]),
  833. [mysql_config="$withval"])
  834. if test "${mysql_config}" = "yes" ; then
  835. MYSQL_CONFIG="/usr/bin/mysql_config"
  836. elif test "${mysql_config}" != "no" ; then
  837. MYSQL_CONFIG="${withval}"
  838. fi
  839. if test "$MYSQL_CONFIG" != "" ; then
  840. if test "$want_dhcp" != "yes"; then
  841. AC_MSG_ERROR([--with-dhcp-mysql should not be used when DHCP components are disabled])
  842. fi
  843. if test -d "$MYSQL_CONFIG" -o ! -x "$MYSQL_CONFIG" ; then
  844. AC_MSG_ERROR([--with-dhcp-mysql should point to a mysql_config program])
  845. fi
  846. MYSQL_CPPFLAGS=`$MYSQL_CONFIG --cflags`
  847. MYSQL_LIBS=`$MYSQL_CONFIG --libs`
  848. MYSQL_VERSION=`$MYSQL_CONFIG --version`
  849. AC_SUBST(MYSQL_CPPFLAGS)
  850. AC_SUBST(MYSQL_LIBS)
  851. # Check that a simple program using MySQL functions can compile and link.
  852. CPPFLAGS_SAVED="$CPPFLAGS"
  853. LIBS_SAVED="$LIBS"
  854. CPPFLAGS="$MYSQL_CPPFLAGS $CPPFLAGS"
  855. LIBS="$MYSQL_LIBS $LIBS"
  856. AC_LINK_IFELSE(
  857. [AC_LANG_PROGRAM([#include <mysql.h>],
  858. [MYSQL mysql_handle;
  859. (void) mysql_init(&mysql_handle);
  860. ])],
  861. [AC_MSG_RESULT([checking for MySQL headers and library... yes])],
  862. [AC_MSG_RESULT([checking for MySQL headers and library... no])
  863. AC_MSG_ERROR([Needs MySQL library])]
  864. )
  865. CPPFLAGS=$CPPFLAGS_SAVED
  866. LIBS=$LIBS_SAVED
  867. # Note that MYSQL is present in the config.h file
  868. AC_DEFINE([HAVE_MYSQL], [1], [MySQL is present])
  869. fi
  870. # Solaris puts FIONREAD in filio.h
  871. AC_CHECK_HEADER(sys/filio.h)
  872. # ... and at the shell level, so Makefile.am can take action depending on this.
  873. AM_CONDITIONAL(HAVE_MYSQL, test "$MYSQL_CONFIG" != "")
  874. pg_config="no"
  875. AC_ARG_WITH([dhcp-pgsql],
  876. AC_HELP_STRING([--with-dhcp-pgsql=PATH],
  877. [path to the PostgreSQL 'pg_config' script]),
  878. [pg_config="$withval"])
  879. if test "${pg_config}" = "yes" ; then
  880. PG_CONFIG="/usr/bin/pg_config"
  881. elif test "${pg_config}" != "no" ; then
  882. PG_CONFIG="${withval}"
  883. fi
  884. if test "$PG_CONFIG" != "" ; then
  885. if test -d "$PG_CONFIG" -o ! -x "$PG_CONFIG" ; then
  886. AC_MSG_ERROR([--with-dhcp-pgsql should point to a pg_config program])
  887. fi
  888. PGSQL_CPPFLAGS=`$PG_CONFIG --cppflags`
  889. PGSQL_INCLUDEDIR=`$PG_CONFIG --includedir`
  890. PGSQL_CPPFLAGS="$PGSQL_CPPFLAGS -I$PGSQL_INCLUDEDIR"
  891. PGSQL_LIBS=`$PG_CONFIG --ldflags`
  892. PGSQL_LIBS="$PGSQL_LIBS -lpq"
  893. PGSQL_VERSION=`$PG_CONFIG --version`
  894. AC_SUBST(PGSQL_CPPFLAGS)
  895. AC_SUBST(PGSQL_LIBS)
  896. # Check that a simple program using PostgreSQL functions can compile and link.
  897. CPPFLAGS_SAVED="$CPPFLAGS"
  898. LIBS_SAVED="$LIBS"
  899. CPPFLAGS="$PGSQL_CPPFLAGS $CPPFLAGS"
  900. LIBS="$PGSQL_LIBS $LIBS"
  901. AC_LINK_IFELSE(
  902. [AC_LANG_PROGRAM([#include <libpq-fe.h>],
  903. [PGconn * c = PQconnectdb("dbname = 'postgres'");
  904. PQfinish(c);])],
  905. [AC_MSG_RESULT([checking for PostgreSQL headers and library... yes])],
  906. [AC_MSG_RESULT([checking for PostgreSQL headers and library... no])
  907. AC_MSG_ERROR([Needs PostgreSQL library])]
  908. )
  909. CPPFLAGS=$CPPFLAGS_SAVED
  910. LIBS=$LIBS_SAVED
  911. # Note that PostgreSQL is present in the config.h file
  912. AC_DEFINE([HAVE_PGSQL], [1], [PostgreSQL is present])
  913. fi
  914. # ... and at the shell level, so Makefile.am can take action depending on this.
  915. AM_CONDITIONAL(HAVE_PGSQL, test "$PG_CONFIG" != "")
  916. # Check for log4cplus
  917. log4cplus_path="yes"
  918. AC_ARG_WITH([log4cplus],
  919. AC_HELP_STRING([--with-log4cplus=PATH],
  920. [specify exact directory of log4cplus library and headers]),
  921. [log4cplus_path="$withval"])
  922. if test "${log4cplus_path}" = "no" ; then
  923. AC_MSG_ERROR([Need log4cplus])
  924. elif test "${log4cplus_path}" != "yes" ; then
  925. LOG4CPLUS_INCLUDES="-I${log4cplus_path}/include"
  926. LOG4CPLUS_LIBS="-L${log4cplus_path}/lib"
  927. else
  928. # If not specified, try some common paths.
  929. log4cplusdirs="/usr/local /usr/pkg /opt /opt/local"
  930. for d in $log4cplusdirs
  931. do
  932. if test -f $d/include/log4cplus/logger.h; then
  933. LOG4CPLUS_INCLUDES="-I$d/include"
  934. LOG4CPLUS_LIBS="-L$d/lib"
  935. break
  936. fi
  937. done
  938. fi
  939. LOG4CPLUS_LIBS="$LOG4CPLUS_LIBS -llog4cplus $MULTITHREADING_FLAG"
  940. AC_SUBST(LOG4CPLUS_LIBS)
  941. AC_SUBST(LOG4CPLUS_INCLUDES)
  942. CPPFLAGS_SAVED=$CPPFLAGS
  943. CPPFLAGS="$LOG4CPLUS_INCLUDES $CPPFLAGS"
  944. LIBS_SAVED="$LIBS"
  945. LIBS="$LOG4CPLUS_LIBS $LIBS"
  946. AC_CHECK_HEADERS([log4cplus/logger.h],,AC_MSG_ERROR([Missing required header files.]))
  947. AC_LINK_IFELSE(
  948. [AC_LANG_PROGRAM([#include <log4cplus/logger.h>
  949. ],
  950. [using namespace log4cplus;
  951. Logger logger = Logger::getInstance("main");
  952. ])],
  953. [AC_MSG_RESULT([checking for log4cplus library... yes])],
  954. [AC_MSG_RESULT([checking for log4cplus library... no])
  955. AC_MSG_ERROR([Needs log4cplus library])]
  956. )
  957. dnl Determine the log4cplus version, used mainly for config.report.
  958. AC_MSG_CHECKING([log4cplus version])
  959. cat > conftest.cpp << EOF
  960. #include <log4cplus/version.h>
  961. AUTOCONF_LOG4CPLUS_VERSION=LOG4CPLUS_VERSION_STR
  962. EOF
  963. LOG4CPLUS_VERSION=`$CPP $CPPFLAGS conftest.cpp | grep '^AUTOCONF_LOG4CPLUS_VERSION=' | $SED -e 's/^AUTOCONF_LOG4CPLUS_VERSION=//' -e 's/[[ ]]//g' -e 's/"//g' 2> /dev/null`
  964. if test -z "$LOG4CPLUS_VERSION"; then
  965. LOG4CPLUS_VERSION="unknown"
  966. fi
  967. $RM -f conftest.cpp
  968. AC_MSG_RESULT([$LOG4CPLUS_VERSION])
  969. CPPFLAGS=$CPPFLAGS_SAVED
  970. LIBS=$LIBS_SAVED
  971. #
  972. # Configure Boost header path
  973. #
  974. AX_BOOST_FOR_BIND10
  975. # Boost offset_ptr is required in one library and not optional right now, so
  976. # we unconditionally fail here if it doesn't work.
  977. if test "$BOOST_OFFSET_PTR_WOULDFAIL" = "yes" -a "$werror_ok" = 1; then
  978. AC_MSG_ERROR([Failed to compile a required header file. Try upgrading Boost to 1.44 or higher (when using clang++) or specifying --without-werror. See the ChangeLog entry for Trac no. 2147 for more details.])
  979. fi
  980. if test "$BOOST_STATIC_ASSERT_WOULDFAIL" = "yes" -a X"$werror_ok" = X1; then
  981. AC_MSG_ERROR([Failed to use Boost static assertions. Try upgrading Boost to 1.54 or higher (when using GCC 4.8) or specifying --without-werror. See trac ticket no. 3039 for more details.])
  982. fi
  983. # There's a known bug in FreeBSD ports for Boost that would trigger a false
  984. # warning in build with g++ and -Werror (we exclude clang++ explicitly to
  985. # avoid unexpected false positives).
  986. if test "$BOOST_NUMERIC_CAST_WOULDFAIL" = "yes" -a X"$werror_ok" = X1 -a $CLANGPP = "no"; then
  987. AC_MSG_ERROR([Failed to compile a required header file. If you are using FreeBSD and Boost installed via ports, retry with specifying --without-werror. See the ChangeLog entry for Trac no. 1991 for more details.])
  988. fi
  989. use_shared_memory=yes
  990. AC_ARG_WITH(shared-memory,
  991. AC_HELP_STRING([--with-shared-memory],
  992. [Build with Boost shared memory support; for large scale authoritative DNS servers]),
  993. [use_shared_memory=$withval])
  994. if test X$use_shared_memory = Xyes -a "$BOOST_MAPPED_FILE_WOULDFAIL" = "yes" -a "$want_dns" = "yes"; then
  995. AC_MSG_ERROR([Boost shared memory does not compile on this system. If you don't need it (most normal users won't) build without it by rerunning this script with --without-shared-memory; using a different compiler or a different version of Boost may also help.])
  996. fi
  997. AM_CONDITIONAL([USE_SHARED_MEMORY], [test x$use_shared_memory = xyes])
  998. if test "x$use_shared_memory" = "xyes"; then
  999. AC_DEFINE(USE_SHARED_MEMORY, 1, [Define to 1 if shared memory support is enabled])
  1000. fi
  1001. AC_SUBST(BOOST_MAPPED_FILE_CXXFLAG)
  1002. if test "$BOOST_OFFSET_PTR_OLD" = "yes" -a "$use_shared_memory" = "yes" -a "$want_dns" = "yes"; then
  1003. AC_MSG_ERROR([You're trying to compile against boost older than 1.48 with
  1004. shared memory. Older versions of boost have a bug which causes segfaults in
  1005. offset_ptr implementation when compiled by GCC with optimisations enabled.
  1006. See ticket no. 3025 for details.
  1007. Either update boost to newer version or use --without-shared-memory.
  1008. Note that most users likely don't need shared memory support.
  1009. ])
  1010. fi
  1011. # Add some default CPP flags needed for Boost, identified by the AX macro.
  1012. CPPFLAGS="$CPPFLAGS $CPPFLAGS_BOOST_THREADCONF"
  1013. # I can't get some of the #include <asio.hpp> right without this
  1014. # TODO: find the real cause of asio/boost wanting pthreads
  1015. # (this currently only occurs for src/lib/cc/session_unittests)
  1016. PTHREAD_LDFLAGS=
  1017. AC_CHECK_LIB(pthread, pthread_create,[ PTHREAD_LDFLAGS=-lpthread ], [])
  1018. AC_SUBST(PTHREAD_LDFLAGS)
  1019. AC_SUBST(MULTITHREADING_FLAG)
  1020. #
  1021. # Check availability of gtest, which will be used for unit tests.
  1022. #
  1023. GTEST_LDFLAGS=
  1024. GTEST_LDADD=
  1025. DISTCHECK_GTEST_CONFIGURE_FLAG=
  1026. GTEST_VERSION="unknown"
  1027. if test "x$enable_gtest" = "xyes" ; then
  1028. DISTCHECK_GTEST_CONFIGURE_FLAG="--with-gtest=$gtest_path"
  1029. if test -n "$with_gtest_source" ; then
  1030. if test "x$GTEST_SOURCE" = "xyes" ; then
  1031. AC_MSG_CHECKING([for gtest source])
  1032. # If not specified, try some common paths.
  1033. GTEST_SOURCE=
  1034. for d in /usr/src/gtest /usr/local /usr/pkg /opt /opt/local ; do
  1035. if test -f $d/src/gtest-all.cc -a $d/src/gtest_main.cc; then
  1036. GTEST_SOURCE=$d
  1037. AC_MSG_RESULT([$GTEST_SOURCE])
  1038. break
  1039. fi
  1040. done
  1041. if test -z $GTEST_SOURCE ; then
  1042. AC_MSG_ERROR([no gtest source but it was selected])
  1043. fi
  1044. else
  1045. AC_CHECK_FILES([$GTEST_SOURCE/src/gtest-all.cc]
  1046. [$GTEST_SOURCE/src/gtest_main.cc],
  1047. [have_gtest_source=yes],
  1048. [AC_MSG_ERROR([no gtest source at $GTEST_SOURCE])])
  1049. fi
  1050. have_gtest_source=yes
  1051. GTEST_LDFLAGS="\$(top_builddir)/libgtest.a"
  1052. DISTCHECK_GTEST_CONFIGURE_FLAG="--with-gtest-source=$GTEST_SOURCE"
  1053. GTEST_INCLUDES="-I$GTEST_SOURCE -I$GTEST_SOURCE/include"
  1054. # See $GTEST_SOURCE/include/gtest/internal/gtest-port.h
  1055. # about GTEST_HAS_PTHREAD.
  1056. case "$host" in
  1057. *-solaris*|*-linux*|*-hpux*)
  1058. GTEST_LDADD="$GTEST_LDADD $PTHREAD_LDFLAGS"
  1059. ;;
  1060. esac
  1061. fi
  1062. if test "$gtest_path" != "no" ; then
  1063. if test "$gtest_path" != "yes"; then
  1064. GTEST_PATHS=$gtest_path
  1065. if test -x "${gtest_path}/bin/gtest-config" ; then
  1066. GTEST_CONFIG="${gtest_path}/bin/gtest-config"
  1067. fi
  1068. else
  1069. AC_PATH_PROG([GTEST_CONFIG], [gtest-config])
  1070. fi
  1071. if test -x "${GTEST_CONFIG}" ; then :
  1072. # using cppflags instead of cxxflags
  1073. GTEST_INCLUDES=`${GTEST_CONFIG} --cppflags`
  1074. GTEST_LDFLAGS=`${GTEST_CONFIG} --ldflags`
  1075. GTEST_LDADD=`${GTEST_CONFIG} --libs`
  1076. GTEST_VERSION=`${GTEST_CONFIG} --version`
  1077. GTEST_FOUND="true"
  1078. else
  1079. AC_MSG_WARN([Unable to locate Google Test gtest-config.])
  1080. if test -z "${GTEST_PATHS}" ; then
  1081. GTEST_PATHS="/usr /usr/local"
  1082. fi
  1083. GTEST_FOUND="false"
  1084. fi
  1085. if test "${GTEST_FOUND}" != "true"; then
  1086. GTEST_FOUND="false"
  1087. for dir in $GTEST_PATHS; do
  1088. if test -f "$dir/include/gtest/gtest.h"; then
  1089. GTEST_INCLUDES="-I$dir/include"
  1090. GTEST_LDFLAGS="-L$dir/lib"
  1091. GTEST_LDADD="-lgtest"
  1092. GTEST_FOUND="true"
  1093. # There is no gtest-config script on this
  1094. # system, which is supposed to inform us
  1095. # whether we need pthreads as well (a
  1096. # gtest compile-time option). So we still
  1097. # need to test that manually.
  1098. CPPFLAGS_SAVED="$CPPFLAGS"
  1099. CPPFLAGS="$CPPFLAGS $GTEST_INCLUDES"
  1100. LDFLAGS_SAVED="$LDFLAGS"
  1101. LDFLAGS="$LDFLAGS $GTEST_LDFLAGS"
  1102. LIBS_SAVED=$LIBS
  1103. LIBS="$LIBS $GTEST_LDADD"
  1104. AC_MSG_CHECKING([Checking whether gtest tests need pthreads])
  1105. # First try to compile without pthreads
  1106. AC_TRY_LINK([
  1107. #include <gtest/gtest.h>
  1108. ],[
  1109. int i = 0;
  1110. char* c = NULL;
  1111. ::testing::InitGoogleTest(&i, &c);
  1112. return (0);
  1113. ],
  1114. [ AC_MSG_RESULT(no) ],
  1115. [
  1116. LIBS="$SAVED_LIBS $GTEST_LDADD $PTHREAD_LDFLAGS"
  1117. # Now try to compile with pthreads
  1118. AC_TRY_LINK([
  1119. #include <gtest/gtest.h>
  1120. ],[
  1121. int i = 0;
  1122. char* c = NULL;
  1123. ::testing::InitGoogleTest(&i, &c);
  1124. return (0);
  1125. ],
  1126. [ AC_MSG_RESULT(yes)
  1127. GTEST_LDADD="$GTEST_LDADD $PTHREAD_LDFLAGS"
  1128. ],
  1129. # Apparently we can't compile it at all
  1130. [ AC_MSG_ERROR(unable to compile with gtest) ])
  1131. ])
  1132. CPPFLAGS=$CPPFLAGS_SAVED
  1133. LDFLAGS=$LDFLAGS_SAVED
  1134. LIBS=$LIBS_SAVED
  1135. break
  1136. fi
  1137. done
  1138. fi
  1139. if test "${GTEST_FOUND}" != "true"; then
  1140. AC_MSG_ERROR([Cannot find gtest in: $GTEST_PATHS])
  1141. fi
  1142. fi
  1143. fi
  1144. AM_CONDITIONAL(HAVE_GTEST, test $enable_gtest != "no")
  1145. AM_CONDITIONAL(HAVE_GTEST_SOURCE, test "X$have_gtest_source" = "Xyes")
  1146. AC_SUBST(DISTCHECK_GTEST_CONFIGURE_FLAG)
  1147. AC_SUBST(GTEST_INCLUDES)
  1148. AC_SUBST(GTEST_LDFLAGS)
  1149. AC_SUBST(GTEST_LDADD)
  1150. AC_SUBST(GTEST_SOURCE)
  1151. dnl check for pkg-config itself
  1152. AC_CHECK_PROG(HAVE_PKG_CONFIG, pkg-config, yes, no)
  1153. if test "x$HAVE_PKG_CONFIG" = "xno" ; then
  1154. AC_MSG_ERROR(Please install pkg-config)
  1155. fi
  1156. AX_SQLITE3_FOR_BIND10
  1157. if test "x$have_sqlite" = "xyes" ; then
  1158. enable_features="$enable_features SQLite3"
  1159. AX_PYTHON_SQLITE3
  1160. fi
  1161. #
  1162. # ASIO: we extensively use it as the C++ event management module.
  1163. #
  1164. # Use local ASIO headers from ext
  1165. #
  1166. CPPFLAGS="$CPPFLAGS -I\$(top_srcdir)/ext/asio"
  1167. #
  1168. # Use our 'coroutine' header from ext
  1169. CPPFLAGS="$CPPFLAGS -I\$(top_srcdir)/ext/coroutine"
  1170. #
  1171. # Disable threads: Currently we don't use them.
  1172. CPPFLAGS="$CPPFLAGS -DASIO_DISABLE_THREADS=1"
  1173. # Check for functions that are not available on all platforms
  1174. AC_CHECK_FUNCS([pselect])
  1175. # /dev/poll issue: ASIO uses /dev/poll by default if it's available (generally
  1176. # the case with Solaris). Unfortunately its /dev/poll specific code would
  1177. # trigger the gcc's "missing-field-initializers" warning, which would
  1178. # subsequently make the build fail with -Werror. Further, older versions of
  1179. # gcc don't provide an option to selectively suppress this warning.
  1180. # So, for the moment, we simply disable the use of /dev/poll. Unless we
  1181. # implement recursive DNS server with randomized ports, we don't need the
  1182. # scalability that /dev/poll can provide, so this decision wouldn't affect
  1183. # run time performance. Hopefully we can find a better solution or the ASIO
  1184. # code will be updated by the time we really need it.
  1185. AC_CHECK_HEADERS(sys/devpoll.h, ac_cv_have_devpoll=yes, ac_cv_have_devpoll=no)
  1186. if test "X$ac_cv_have_devpoll" = "Xyes" -a "X$GXX" = "Xyes"; then
  1187. CPPFLAGS="$CPPFLAGS -DASIO_DISABLE_DEV_POLL=1"
  1188. fi
  1189. #
  1190. # Perl is optional; it is used only by some of the system test scripts.
  1191. #
  1192. AC_PATH_PROGS(PERL, perl5 perl)
  1193. AC_SUBST(PERL)
  1194. AC_PATH_PROGS(AWK, gawk awk)
  1195. AC_SUBST(AWK)
  1196. AC_ARG_ENABLE(generate_docs, [AC_HELP_STRING([--enable-generate-docs],
  1197. [regenerate documentation using Docbook [default=no]])],
  1198. enable_generate_docs=$enableval, enable_generate_docs=no)
  1199. # Check for xsltproc
  1200. if test "x$enable_generate_docs" != xno ; then
  1201. AC_PATH_PROG([XSLTPROC], [xsltproc])
  1202. if test -z "$XSLTPROC"; then
  1203. AC_MSG_ERROR("xsltproc not found; it is required for --enable-generate-docs")
  1204. else
  1205. AC_MSG_CHECKING([if $XSLTPROC works])
  1206. # run xsltproc to see if works
  1207. $XSLTPROC --novalid --xinclude --nonet http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl
  1208. if test $? -ne 0 ; then
  1209. AC_MSG_ERROR("Error with $XSLTPROC using release/xsl/current/manpages/docbook.xsl")
  1210. fi
  1211. $XSLTPROC --novalid --xinclude --nonet http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl
  1212. if test $? -ne 0 ; then
  1213. AC_MSG_ERROR("Error with $XSLTPROC using release/xsl/current/html/docbook.xsl")
  1214. fi
  1215. AC_MSG_RESULT(yes)
  1216. fi
  1217. AC_PATH_PROG([ELINKS], [elinks])
  1218. if test -z "$ELINKS"; then
  1219. AC_MSG_ERROR("elinks not found; it is required for --enable-generate-docs")
  1220. fi
  1221. fi
  1222. AM_CONDITIONAL(GENERATE_DOCS, test x$enable_generate_docs != xno)
  1223. AC_ARG_ENABLE(install-configurations,
  1224. [AC_HELP_STRING([--disable-install-configurations],
  1225. [do not install configuration])], install_configurations=$enableval, install_configurations=yes)
  1226. AM_CONDITIONAL(INSTALL_CONFIGURATIONS, test x$install_configurations = xyes || test x$install_configurations = xtrue)
  1227. AC_ARG_ENABLE(logger-checks, [AC_HELP_STRING([--enable-logger-checks],
  1228. [check logger messages [default=no]])], enable_logger_checks=$enableval, enable_logger_checks=no)
  1229. AM_CONDITIONAL(ENABLE_LOGGER_CHECKS, test x$enable_logger_checks != xno)
  1230. AM_COND_IF([ENABLE_LOGGER_CHECKS], [AC_DEFINE([ENABLE_LOGGER_CHECKS], [1], [Check logger messages?])])
  1231. # Check for asciidoc
  1232. AC_PATH_PROG(ASCIIDOC, asciidoc, no)
  1233. AM_CONDITIONAL(HAVE_ASCIIDOC, test "x$ASCIIDOC" != "xno")
  1234. # Check for plantuml
  1235. AC_PATH_PROG(PLANTUML, plantuml, no)
  1236. AM_CONDITIONAL(HAVE_PLANTUML, test "x$PLANTUML" != "xno")
  1237. # Check for valgrind
  1238. AC_PATH_PROG(VALGRIND, valgrind, no)
  1239. AM_CONDITIONAL(HAVE_VALGRIND, test "x$VALGRIND" != "xno")
  1240. # Also check for valgrind headers
  1241. # We could consider adding them to the source code tree, as this
  1242. # is the encouraged method of using them; they are BSD-licensed.
  1243. # However, until we find that this is a problem, we just use
  1244. # the system-provided ones, if available
  1245. AC_CHECK_HEADERS(valgrind/valgrind.h, [AC_DEFINE([HAVE_VALGRIND_HEADERS], [1], [Check valgrind headers])])
  1246. found_valgrind="not found"
  1247. if test "x$VALGRIND" != "xno"; then
  1248. found_valgrind="found"
  1249. fi
  1250. # Check for optreset in unistd.h. On BSD systems the optreset is
  1251. # used to reset the state of getopt() function. Resetting its state
  1252. # is required if command line arguments are parsed multiple times
  1253. # during a program. On Linux this variable will not exist because
  1254. # getopt() reset is performed by setting optind = 0. On Operating
  1255. # Systems where optreset is defined use optreset = 1 and optind = 1
  1256. # to reset internal state of getopt(). Failing to do so will result
  1257. # in unpredictable output from getopt().
  1258. AC_MSG_CHECKING([whether optreset variable is defined in unistd.h])
  1259. AC_TRY_LINK(
  1260. [#include <unistd.h>],
  1261. [extern int optreset; optreset=1;],
  1262. [ AC_MSG_RESULT(yes)
  1263. var_optreset_exists=yes],
  1264. [ AC_MSG_RESULT(no)
  1265. var_optreset_exists=no]
  1266. )
  1267. AM_CONDITIONAL(HAVE_OPTRESET, test "x$var_optreset_exists" != "xno")
  1268. AM_COND_IF([HAVE_OPTRESET], [AC_DEFINE([HAVE_OPTRESET], [1], [Check for optreset?])])
  1269. AC_CONFIG_FILES([compatcheck/Makefile
  1270. dns++.pc
  1271. doc/design/datasrc/Makefile
  1272. doc/design/Makefile
  1273. doc/guide/Makefile
  1274. doc/Makefile
  1275. doc/version.ent
  1276. ext/asio/asio/Makefile
  1277. ext/asio/Makefile
  1278. ext/Makefile
  1279. m4macros/Makefile
  1280. Makefile
  1281. src/bin/auth/auth.spec.pre
  1282. src/bin/auth/benchmarks/Makefile
  1283. src/bin/auth/gen-statisticsitems.py.pre
  1284. src/bin/auth/Makefile
  1285. src/bin/auth/spec_config.h.pre
  1286. src/bin/auth/tests/Makefile
  1287. src/bin/auth/tests/testdata/example-base.zone
  1288. src/bin/auth/tests/testdata/example-nsec3.zone
  1289. src/bin/auth/tests/testdata/example.zone
  1290. src/bin/auth/tests/testdata/Makefile
  1291. src/bin/bind10/bind10
  1292. src/bin/bind10/init.py
  1293. src/bin/bind10/Makefile
  1294. src/bin/bind10/run_bind10.sh
  1295. src/bin/bind10/tests/init_test.py
  1296. src/bin/bind10/tests/Makefile
  1297. src/bin/bindctl/bindctl_main.py
  1298. src/bin/bindctl/Makefile
  1299. src/bin/bindctl/run_bindctl.sh
  1300. src/bin/bindctl/tests/bindctl_test
  1301. src/bin/bindctl/tests/Makefile
  1302. src/bin/cfgmgr/b10-cfgmgr.py
  1303. src/bin/cfgmgr/local_plugins/Makefile
  1304. src/bin/cfgmgr/Makefile
  1305. src/bin/cfgmgr/plugins/datasrc.spec.pre
  1306. src/bin/cfgmgr/plugins/Makefile
  1307. src/bin/cfgmgr/plugins/tests/Makefile
  1308. src/bin/cfgmgr/tests/b10-cfgmgr_test.py
  1309. src/bin/cfgmgr/tests/Makefile
  1310. src/bin/cmdctl/cmdctl.py
  1311. src/bin/cmdctl/cmdctl.spec.pre
  1312. src/bin/cmdctl/Makefile
  1313. src/bin/cmdctl/run_b10-cmdctl.sh
  1314. src/bin/cmdctl/tests/cmdctl_test
  1315. src/bin/cmdctl/tests/Makefile
  1316. src/bin/d2/Makefile
  1317. src/bin/d2/spec_config.h.pre
  1318. src/bin/d2/tests/Makefile
  1319. src/bin/d2/tests/test_data_files_config.h
  1320. src/bin/dbutil/dbutil.py
  1321. src/bin/dbutil/Makefile
  1322. src/bin/dbutil/run_dbutil.sh
  1323. src/bin/dbutil/tests/dbutil_test.sh
  1324. src/bin/dbutil/tests/Makefile
  1325. src/bin/dbutil/tests/testdata/Makefile
  1326. src/bin/ddns/ddns.py
  1327. src/bin/ddns/Makefile
  1328. src/bin/ddns/tests/Makefile
  1329. src/bin/dhcp4/Makefile
  1330. src/bin/dhcp4/spec_config.h.pre
  1331. src/bin/dhcp4/tests/Makefile
  1332. src/bin/dhcp4/tests/marker_file.h
  1333. src/bin/dhcp4/tests/test_data_files_config.h
  1334. src/bin/dhcp4/tests/test_libraries.h
  1335. src/bin/dhcp6/Makefile
  1336. src/bin/dhcp6/spec_config.h.pre
  1337. src/bin/dhcp6/tests/Makefile
  1338. src/bin/dhcp6/tests/marker_file.h
  1339. src/bin/dhcp6/tests/test_data_files_config.h
  1340. src/bin/dhcp6/tests/test_libraries.h
  1341. src/bin/loadzone/loadzone.py
  1342. src/bin/loadzone/Makefile
  1343. src/bin/loadzone/run_loadzone.sh
  1344. src/bin/loadzone/tests/correct/correct_test.sh
  1345. src/bin/loadzone/tests/correct/Makefile
  1346. src/bin/loadzone/tests/Makefile
  1347. src/bin/Makefile
  1348. src/bin/memmgr/Makefile
  1349. src/bin/memmgr/memmgr.py
  1350. src/bin/memmgr/memmgr.spec.pre
  1351. src/bin/memmgr/tests/Makefile
  1352. src/bin/msgq/Makefile
  1353. src/bin/msgq/msgq.py
  1354. src/bin/msgq/run_msgq.sh
  1355. src/bin/msgq/tests/Makefile
  1356. src/bin/resolver/bench/Makefile
  1357. src/bin/resolver/Makefile
  1358. src/bin/resolver/resolver.spec.pre
  1359. src/bin/resolver/spec_config.h.pre
  1360. src/bin/resolver/tests/Makefile
  1361. src/bin/sockcreator/Makefile
  1362. src/bin/sockcreator/tests/Makefile
  1363. src/bin/stats/Makefile
  1364. src/bin/stats/stats_httpd.py
  1365. src/bin/stats/stats.py
  1366. src/bin/stats/tests/Makefile
  1367. src/bin/stats/tests/testdata/Makefile
  1368. src/bin/sysinfo/Makefile
  1369. src/bin/sysinfo/run_sysinfo.sh
  1370. src/bin/sysinfo/sysinfo.py
  1371. src/bin/tests/Makefile
  1372. src/bin/tests/process_rename_test.py
  1373. src/bin/usermgr/b10-cmdctl-usermgr.py
  1374. src/bin/usermgr/Makefile
  1375. src/bin/usermgr/run_b10-cmdctl-usermgr.sh
  1376. src/bin/usermgr/tests/Makefile
  1377. src/bin/xfrin/Makefile
  1378. src/bin/xfrin/run_b10-xfrin.sh
  1379. src/bin/xfrin/tests/Makefile
  1380. src/bin/xfrin/tests/testdata/Makefile
  1381. src/bin/xfrin/tests/xfrin_test
  1382. src/bin/xfrin/xfrin.py
  1383. src/bin/xfrout/Makefile
  1384. src/bin/xfrout/run_b10-xfrout.sh
  1385. src/bin/xfrout/tests/Makefile
  1386. src/bin/xfrout/tests/xfrout_test
  1387. src/bin/xfrout/tests/xfrout_test.py
  1388. src/bin/xfrout/xfrout.py
  1389. src/bin/xfrout/xfrout.spec.pre
  1390. src/bin/zonemgr/Makefile
  1391. src/bin/zonemgr/run_b10-zonemgr.sh
  1392. src/bin/zonemgr/tests/Makefile
  1393. src/bin/zonemgr/tests/zonemgr_test
  1394. src/bin/zonemgr/zonemgr.py
  1395. src/bin/zonemgr/zonemgr.spec.pre
  1396. src/hooks/dhcp/Makefile
  1397. src/hooks/dhcp/user_chk/Makefile
  1398. src/hooks/dhcp/user_chk/tests/Makefile
  1399. src/hooks/dhcp/user_chk/tests/test_data_files_config.h
  1400. src/hooks/Makefile
  1401. src/lib/acl/Makefile
  1402. src/lib/acl/tests/Makefile
  1403. src/lib/asiodns/Makefile
  1404. src/lib/asiodns/tests/Makefile
  1405. src/lib/asiolink/Makefile
  1406. src/lib/asiolink/tests/Makefile
  1407. src/lib/bench/example/Makefile
  1408. src/lib/bench/Makefile
  1409. src/lib/bench/tests/Makefile
  1410. src/lib/cache/Makefile
  1411. src/lib/cache/tests/Makefile
  1412. src/lib/cc/Makefile
  1413. src/lib/cc/session_config.h.pre
  1414. src/lib/cc/tests/Makefile
  1415. src/lib/cc/tests/session_unittests_config.h
  1416. src/lib/config/Makefile
  1417. src/lib/config/tests/data_def_unittests_config.h
  1418. src/lib/config/tests/Makefile
  1419. src/lib/config/tests/testdata/Makefile
  1420. src/lib/cryptolink/Makefile
  1421. src/lib/cryptolink/tests/Makefile
  1422. src/lib/datasrc/datasrc_config.h.pre
  1423. src/lib/datasrc/Makefile
  1424. src/lib/datasrc/memory/benchmarks/Makefile
  1425. src/lib/datasrc/memory/Makefile
  1426. src/lib/datasrc/tests/Makefile
  1427. src/lib/datasrc/tests/memory/Makefile
  1428. src/lib/datasrc/tests/memory/testdata/Makefile
  1429. src/lib/datasrc/tests/testdata/Makefile
  1430. src/lib/dhcp_ddns/Makefile
  1431. src/lib/dhcp_ddns/tests/Makefile
  1432. src/lib/dhcp/Makefile
  1433. src/lib/dhcpsrv/Makefile
  1434. src/lib/dhcpsrv/tests/Makefile
  1435. src/lib/dhcpsrv/tests/test_libraries.h
  1436. src/lib/dhcp/tests/Makefile
  1437. src/lib/dns/benchmarks/Makefile
  1438. src/lib/dns/gen-rdatacode.py
  1439. src/lib/dns/Makefile
  1440. src/lib/dns/python/Makefile
  1441. src/lib/dns/python/pydnspp_config.h
  1442. src/lib/dns/python/tests/Makefile
  1443. src/lib/dns/tests/Makefile
  1444. src/lib/dns/tests/testdata/Makefile
  1445. src/lib/exceptions/Makefile
  1446. src/lib/exceptions/tests/Makefile
  1447. src/lib/hooks/Makefile
  1448. src/lib/hooks/tests/Makefile
  1449. src/lib/hooks/tests/marker_file.h
  1450. src/lib/hooks/tests/test_libraries.h
  1451. src/lib/log/compiler/Makefile
  1452. src/lib/log/interprocess/Makefile
  1453. src/lib/log/interprocess/tests/Makefile
  1454. src/lib/log/Makefile
  1455. src/lib/log/tests/buffer_logger_test.sh
  1456. src/lib/log/tests/console_test.sh
  1457. src/lib/log/tests/destination_test.sh
  1458. src/lib/log/tests/init_logger_test.sh
  1459. src/lib/log/tests/local_file_test.sh
  1460. src/lib/log/tests/logger_lock_test.sh
  1461. src/lib/log/tests/Makefile
  1462. src/lib/log/tests/severity_test.sh
  1463. src/lib/log/tests/tempdir.h
  1464. src/lib/Makefile
  1465. src/lib/nsas/Makefile
  1466. src/lib/nsas/tests/Makefile
  1467. src/lib/python/bind10_config.py
  1468. src/lib/python/isc/acl/Makefile
  1469. src/lib/python/isc/acl/tests/Makefile
  1470. src/lib/python/isc/bind10/Makefile
  1471. src/lib/python/isc/bind10/tests/Makefile
  1472. src/lib/python/isc/cc/cc_generated/Makefile
  1473. src/lib/python/isc/cc/Makefile
  1474. src/lib/python/isc/cc/tests/cc_test
  1475. src/lib/python/isc/cc/tests/Makefile
  1476. src/lib/python/isc/config/Makefile
  1477. src/lib/python/isc/config/tests/config_test
  1478. src/lib/python/isc/config/tests/Makefile
  1479. src/lib/python/isc/datasrc/Makefile
  1480. src/lib/python/isc/datasrc/tests/Makefile
  1481. src/lib/python/isc/datasrc/tests/testdata/Makefile
  1482. src/lib/python/isc/ddns/Makefile
  1483. src/lib/python/isc/ddns/tests/Makefile
  1484. src/lib/python/isc/dns/Makefile
  1485. src/lib/python/isc/log/Makefile
  1486. src/lib/python/isc/log_messages/Makefile
  1487. src/lib/python/isc/log_messages/work/__init__.py
  1488. src/lib/python/isc/log_messages/work/Makefile
  1489. src/lib/python/isc/log/tests/log_console.py
  1490. src/lib/python/isc/log/tests/Makefile
  1491. src/lib/python/isc/Makefile
  1492. src/lib/python/isc/memmgr/Makefile
  1493. src/lib/python/isc/memmgr/tests/Makefile
  1494. src/lib/python/isc/memmgr/tests/testdata/Makefile
  1495. src/lib/python/isc/net/Makefile
  1496. src/lib/python/isc/net/tests/Makefile
  1497. src/lib/python/isc/notify/Makefile
  1498. src/lib/python/isc/notify/tests/Makefile
  1499. src/lib/python/isc/notify/tests/notify_out_test
  1500. src/lib/python/isc/server_common/Makefile
  1501. src/lib/python/isc/server_common/tests/Makefile
  1502. src/lib/python/isc/statistics/Makefile
  1503. src/lib/python/isc/statistics/tests/Makefile
  1504. src/lib/python/isc/sysinfo/Makefile
  1505. src/lib/python/isc/sysinfo/tests/Makefile
  1506. src/lib/python/isc/testutils/Makefile
  1507. src/lib/python/isc/util/cio/Makefile
  1508. src/lib/python/isc/util/cio/tests/Makefile
  1509. src/lib/python/isc/util/Makefile
  1510. src/lib/python/isc/util/tests/Makefile
  1511. src/lib/python/isc/xfrin/Makefile
  1512. src/lib/python/isc/xfrin/tests/Makefile
  1513. src/lib/python/Makefile
  1514. src/lib/resolve/Makefile
  1515. src/lib/resolve/tests/Makefile
  1516. src/lib/server_common/Makefile
  1517. src/lib/server_common/tests/data_path.h
  1518. src/lib/server_common/tests/Makefile
  1519. src/lib/statistics/Makefile
  1520. src/lib/statistics/tests/Makefile
  1521. src/lib/testutils/Makefile
  1522. src/lib/testutils/testdata/Makefile
  1523. src/lib/util/io/Makefile
  1524. src/lib/util/Makefile
  1525. src/lib/util/python/doxygen2pydoc.py
  1526. src/lib/util/python/gen_wiredata.py
  1527. src/lib/util/python/Makefile
  1528. src/lib/util/python/mkpywrapper.py
  1529. src/lib/util/pyunittests/Makefile
  1530. src/lib/util/tests/Makefile
  1531. src/lib/util/threads/Makefile
  1532. src/lib/util/threads/tests/Makefile
  1533. src/lib/util/unittests/Makefile
  1534. src/lib/xfr/Makefile
  1535. src/lib/xfr/tests/Makefile
  1536. src/Makefile
  1537. tests/lettuce/Makefile
  1538. tests/lettuce/setup_intree_bind10.sh
  1539. tests/Makefile
  1540. tests/tools/badpacket/Makefile
  1541. tests/tools/badpacket/tests/Makefile
  1542. tests/tools/Makefile
  1543. tests/tools/perfdhcp/Makefile
  1544. tests/tools/perfdhcp/tests/Makefile
  1545. tests/tools/perfdhcp/tests/testdata/Makefile
  1546. ])
  1547. AC_CONFIG_COMMANDS([permissions], [
  1548. chmod +x src/bin/bind10/bind10
  1549. chmod +x src/bin/bind10/run_bind10.sh
  1550. chmod +x src/bin/bindctl/run_bindctl.sh
  1551. chmod +x src/bin/bindctl/tests/bindctl_test
  1552. chmod +x src/bin/cmdctl/run_b10-cmdctl.sh
  1553. chmod +x src/bin/cmdctl/tests/cmdctl_test
  1554. chmod +x src/bin/dbutil/run_dbutil.sh
  1555. chmod +x src/bin/dbutil/tests/dbutil_test.sh
  1556. chmod +x src/bin/loadzone/run_loadzone.sh
  1557. chmod +x src/bin/loadzone/tests/correct/correct_test.sh
  1558. chmod +x src/bin/msgq/run_msgq.sh
  1559. chmod +x src/bin/sysinfo/run_sysinfo.sh
  1560. chmod +x src/bin/usermgr/run_b10-cmdctl-usermgr.sh
  1561. chmod +x src/bin/xfrin/run_b10-xfrin.sh
  1562. chmod +x src/bin/xfrin/tests/xfrin_test
  1563. chmod +x src/bin/xfrout/run_b10-xfrout.sh
  1564. chmod +x src/bin/xfrout/tests/xfrout_test
  1565. chmod +x src/bin/zonemgr/run_b10-zonemgr.sh
  1566. chmod +x src/bin/zonemgr/tests/zonemgr_test
  1567. chmod +x src/lib/dns/gen-rdatacode.py
  1568. chmod +x src/lib/log/tests/console_test.sh
  1569. chmod +x src/lib/log/tests/destination_test.sh
  1570. chmod +x src/lib/log/tests/init_logger_test.sh
  1571. chmod +x src/lib/log/tests/local_file_test.sh
  1572. chmod +x src/lib/log/tests/logger_lock_test.sh
  1573. chmod +x src/lib/log/tests/severity_test.sh
  1574. chmod +x src/lib/python/isc/log/tests/log_console.py
  1575. chmod +x src/lib/util/python/doxygen2pydoc.py
  1576. chmod +x src/lib/util/python/gen_wiredata.py
  1577. chmod +x src/lib/util/python/mkpywrapper.py
  1578. ])
  1579. AC_OUTPUT
  1580. dnl Print the results
  1581. dnl
  1582. cat > config.report << END
  1583. BIND 10 source configure results:
  1584. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  1585. Package:
  1586. Name: ${PACKAGE_NAME}
  1587. Version: ${PACKAGE_VERSION}
  1588. OS Family: ${OS_TYPE}
  1589. Using GNU sed: ${GNU_SED}
  1590. C++ Compiler:
  1591. CXX: ${CXX}
  1592. CXX_VERSION: ${CXX_VERSION}
  1593. DEFS: ${DEFS}
  1594. CPPFLAGS: ${CPPFLAGS}
  1595. CXXFLAGS: ${CXXFLAGS}
  1596. LDFLAGS: ${LDFLAGS}
  1597. B10_CXXFLAGS: ${B10_CXXFLAGS}
  1598. Python:
  1599. PYTHON_VERSION: ${PYTHON_VERSION}
  1600. PYTHON_INCLUDES: ${PYTHON_INCLUDES}
  1601. PYTHON_CXXFLAGS: ${PYTHON_CXXFLAGS}
  1602. PYTHON_LDFLAGS: ${PYTHON_LDFLAGS}
  1603. PYTHON_LIB: ${PYTHON_LIB}
  1604. Boost:
  1605. BOOST_VERSION: ${BOOST_VERSION}
  1606. BOOST_INCLUDES: ${BOOST_INCLUDES}
  1607. Botan:
  1608. BOTAN_VERSION: ${BOTAN_VERSION}
  1609. BOTAN_INCLUDES: ${BOTAN_INCLUDES}
  1610. BOTAN_LDFLAGS: ${BOTAN_LDFLAGS}
  1611. BOTAN_LIBS: ${BOTAN_LIBS}
  1612. Log4cplus:
  1613. LOG4CPLUS_VERSION: ${LOG4CPLUS_VERSION}
  1614. LOG4CPLUS_INCLUDES: ${LOG4CPLUS_INCLUDES}
  1615. LOG4CPLUS_LIBS: ${LOG4CPLUS_LIBS}
  1616. SQLite:
  1617. SQLITE_VERSION: ${SQLITE_VERSION}
  1618. SQLITE_CFLAGS: ${SQLITE_CFLAGS}
  1619. SQLITE_LIBS: ${SQLITE_LIBS}
  1620. END
  1621. # Avoid confusion on DNS/DHCP and only mention MySQL if it
  1622. # were specified on the command line.
  1623. if test "$MYSQL_CPPFLAGS" != "" ; then
  1624. cat >> config.report << END
  1625. MySQL:
  1626. MYSQL_VERSION: ${MYSQL_VERSION}
  1627. MYSQL_CPPFLAGS: ${MYSQL_CPPFLAGS}
  1628. MYSQL_LIBS: ${MYSQL_LIBS}
  1629. END
  1630. else
  1631. cat >> config.report << END
  1632. MySQL: no
  1633. END
  1634. fi
  1635. if test "$PGSQL_CPPFLAGS" != "" ; then
  1636. cat >> config.report << END
  1637. PostgreSQL:
  1638. PGSQL_VERSION: ${PGSQL_VERSION}
  1639. PGSQL_CPPFLAGS: ${PGSQL_CPPFLAGS}
  1640. PGSQL_LIBS: ${PGSQL_LIBS}
  1641. END
  1642. else
  1643. cat >> config.report << END
  1644. PostgreSQL: no
  1645. END
  1646. fi
  1647. if test "$enable_gtest" != "no"; then
  1648. cat >> config.report << END
  1649. GTest:
  1650. GTEST_VERSION: ${GTEST_VERSION}
  1651. GTEST_INCLUDES: ${GTEST_INCLUDES}
  1652. GTEST_LDFLAGS: ${GTEST_LDFLAGS}
  1653. GTEST_LDADD: ${GTEST_LDADD}
  1654. GTEST_SOURCE: ${GTEST_SOURCE}
  1655. END
  1656. fi
  1657. cat >> config.report << END
  1658. Components:
  1659. DHCP: $want_dhcp
  1660. DNS: $want_dns
  1661. Experimental resolver: $want_experimental_resolver
  1662. Features:
  1663. $enable_features
  1664. Developer:
  1665. Enable Debugging: $debug_enabled
  1666. Google Tests: $enable_gtest
  1667. Valgrind: $found_valgrind
  1668. C++ Code Coverage: $USE_LCOV
  1669. Python Code Coverage: $USE_PYCOVERAGE
  1670. Logger checks: $enable_logger_checks
  1671. Generate Documentation: $enable_generate_docs
  1672. END
  1673. cat config.report
  1674. cat <<EOF
  1675. Now you can type "make" to build BIND 10. Note that if you intend to
  1676. run "make check", you must run "make" first as some files need to be
  1677. generated by "make" before "make check" can be run.
  1678. When running "make install" do not use any form of parallel or job
  1679. server options (such as GNU make's -j option). Doing so may cause
  1680. errors.
  1681. EOF