configure.ac 57 KB

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