configure.ac 61 KB

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