configure.ac 59 KB

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