configure.ac 70 KB

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