configure.ac 40 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102
  1. # -*- Autoconf -*-
  2. # Process this file with autoconf to produce a configure script.
  3. AC_PREREQ([2.59])
  4. AC_INIT(bind10-devel, 20111021, bind10-dev@isc.org)
  5. AC_CONFIG_SRCDIR(README)
  6. AM_INIT_AUTOMAKE
  7. AC_CONFIG_HEADERS([config.h])
  8. # Checks for programs.
  9. AC_PROG_CXX
  10. # Libtool configuration
  11. #
  12. # libtool cannot handle spaces in paths, so exit early if there is one
  13. if [ test `echo $PWD | grep -c ' '` != "0" ]; then
  14. 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.])
  15. fi
  16. # On FreeBSD (and probably some others), clang++ does not meet an autoconf
  17. # assumption in identifying libtool configuration regarding shared library:
  18. # the configure script will execute "$CC -shared $CFLAGS/$CXXFLAGS -v" and
  19. # expect the output contains -Lxxx or -Ryyy. This is the case for g++, but
  20. # not for clang++, and, as a result, it will cause various errors in linking
  21. # programs or running them with a shared object (such as some of our python
  22. # scripts).
  23. # To work around this problem we define a temporary variable
  24. # "CXX_LIBTOOL_LDFLAGS". It's expected to be defined as, e.g, "-L/usr/lib"
  25. # to temporarily fake the output so that it will be compatible with that of
  26. # g++.
  27. CFLAGS_SAVED=$CFLAGS
  28. CXXFLAGS_SAVED=$CXXFLAGS
  29. CFLAGS="$CFLAGS $CXX_LIBTOOL_LDFLAGS"
  30. CXXFLAGS="$CXXFLAGS $CXX_LIBTOOL_LDFLAGS"
  31. AC_PROG_LIBTOOL
  32. CFLAGS=$CFLAGS_SAVED
  33. CXXFLAGS=$CXXFLAGS_SAVED
  34. # Use C++ language
  35. AC_LANG([C++])
  36. # Identify the compiler: this check must be after AC_PROG_CXX and AC_LANG.
  37. AM_CONDITIONAL(USE_GXX, test "X${GXX}" = "Xyes")
  38. AC_CHECK_DECL([__SUNPRO_CC], [SUNCXX="yes"], [SUNCXX="no"])
  39. AC_CHECK_DECL([__clang__], [CLANGPP="yes"], [CLANGPP="no"])
  40. AM_CONDITIONAL(USE_CLANGPP, test "X${CLANGPP}" = "Xyes")
  41. # Linker options
  42. # check -R rather than gcc specific -rpath to be as portable as possible.
  43. AC_MSG_CHECKING([whether -R flag is available in linker])
  44. LDFLAGS_SAVED="$LDFLAGS"
  45. LDFLAGS="$LDFLAGS -R/usr/lib"
  46. AC_TRY_LINK([],[],
  47. [ AC_MSG_RESULT(yes)
  48. rpath_available=yes
  49. ],[ AC_MSG_RESULT(no)
  50. rpath_available=no
  51. ])
  52. LDFLAGS=$LDFLAGS_SAVED
  53. # allow building programs with static link. we need to make it selective
  54. # because loadable modules cannot be statically linked.
  55. AC_ARG_ENABLE([static-link],
  56. AC_HELP_STRING([--enable-static-link],
  57. [build programs with static link [[default=no]]]),
  58. [enable_static_link=yes], [enable_static_link=no])
  59. AM_CONDITIONAL(USE_STATIC_LINK, test $enable_static_link = yes)
  60. # Check validity about some libtool options
  61. if test $enable_static_link = yes -a $enable_static = no; then
  62. AC_MSG_ERROR([--enable-static-link requires --enable-static])
  63. fi
  64. if test $enable_shared = no; then
  65. AC_MSG_ERROR([BIND 10 requires shared libraries to be built])
  66. fi
  67. AC_ARG_ENABLE(boost-threads,
  68. AC_HELP_STRING([--enable-boost-threads],
  69. [use boost threads. Currently this only means using its locks instead of dummy locks, in the cache and NSAS]),
  70. use_boost_threads=$enableval, use_boost_threads=no)
  71. # allow configuring without setproctitle.
  72. AC_ARG_ENABLE(setproctitle-check,
  73. AC_HELP_STRING([--disable-setproctitle-check],
  74. [do not check for python setproctitle module (used to give nice names to python processes)]),
  75. setproctitle_check=$enableval, setproctitle_check=yes)
  76. # OS dependent configuration
  77. SET_ENV_LIBRARY_PATH=no
  78. ENV_LIBRARY_PATH=LD_LIBRARY_PATH
  79. case "$host" in
  80. *-solaris*)
  81. # Solaris requires special definitions to get some standard libraries
  82. # (e.g. getopt(3)) available with common used header files.
  83. CPPFLAGS="$CPPFLAGS -D_XPG4_2 -D__EXTENSIONS__"
  84. ;;
  85. *-apple-darwin*)
  86. # libtool doesn't work perfectly with Darwin: libtool embeds the
  87. # final install path in dynamic libraries and our loadable python
  88. # modules always refer to that path even if it's loaded within the
  89. # source tree. This prevents pre-install tests from working.
  90. # To work around this problem we explicitly specify paths to dynamic
  91. # libraries when we use them in the source tree.
  92. SET_ENV_LIBRARY_PATH=yes
  93. ENV_LIBRARY_PATH=DYLD_LIBRARY_PATH
  94. ;;
  95. *-freebsd*)
  96. SET_ENV_LIBRARY_PATH=yes
  97. ;;
  98. esac
  99. AM_CONDITIONAL(SET_ENV_LIBRARY_PATH, test $SET_ENV_LIBRARY_PATH = yes)
  100. AC_SUBST(SET_ENV_LIBRARY_PATH)
  101. AC_SUBST(ENV_LIBRARY_PATH)
  102. m4_define([_AM_PYTHON_INTERPRETER_LIST], [python python3 python3.1])
  103. AC_ARG_WITH([pythonpath],
  104. AC_HELP_STRING([--with-pythonpath=PATH],
  105. [specify an absolute path to python executable when automatic version check (incorrectly) fails]),
  106. [python_path="$withval"], [python_path="auto"])
  107. if test "$python_path" = auto; then
  108. AM_PATH_PYTHON([3.1])
  109. else
  110. # Older versions of automake can't handle python3 well. This is an
  111. # in-house workaround for them.
  112. PYTHON=$python_path
  113. AC_SUBST(PYTHON)
  114. PYTHON_PREFIX='${prefix}'
  115. AC_SUBST(PYTHON_PREFIX)
  116. PYTHON_EXEC_PREFIX='$(exec_prefix)'
  117. AC_SUBST(PYTHON_EXEC_PREFIX)
  118. PYTHON_VERSION=[`$PYTHON -c "import sys; sys.stdout.write(sys.version[:3])"`]
  119. if test `echo "$PYTHON_VERSION >= 3.1" | bc` != 1 ; then
  120. AC_MSG_ERROR(["Python version too old: $PYTHON_VERSION, need 3.1 or higher"])
  121. fi
  122. AC_SUBST(PYTHON_VERSION)
  123. PYTHON_PLATFORM=`$PYTHON -c "import sys; print(sys.platform)"`
  124. AC_SUBST(PYTHON_PLATFORM)
  125. pythondir='${prefix}/lib/python'$PYTHON_VERSION'/site-packages'
  126. AC_SUBST(pythondir)
  127. pkgpythondir='${pythondir}/'$PACKAGE
  128. AC_SUBST(pkgpythondir)
  129. pyexecdir='${exec_prefix}/lib/python'$PYTHON_VERSION'/site-packages'
  130. AC_SUBST(pyexecdir)
  131. pkgpyexecdir='${pyexecdir}/'$PACKAGE
  132. AC_SUBST(pkgpyexecdir)
  133. fi
  134. # We need to store the default pyexecdir in a separate variable so that
  135. # we can specify in Makefile.am the install directory of various BIND 10
  136. # python scripts and loadable modules; in Makefile.am we cannot replace
  137. # $(pyexecdir) using itself, e.g, this doesn't work:
  138. # pyexecdir = $(pyexecdir)/isc/some_module
  139. # The separate variable makes this setup possible as follows:
  140. # pyexecdir = $(PYTHON_SITEPKG_DIR)/isc/some_module
  141. PYTHON_SITEPKG_DIR=${pyexecdir}
  142. AC_SUBST(PYTHON_SITEPKG_DIR)
  143. # This will be commonly used in various Makefile.am's that need to generate
  144. # python log messages.
  145. PYTHON_LOGMSGPKG_DIR="\$(top_builddir)/src/lib/python/isc/log_messages"
  146. AC_SUBST(PYTHON_LOGMSGPKG_DIR)
  147. # This is python package paths commonly used in python tests. See
  148. # README of log_messages for why it's included.
  149. COMMON_PYTHON_PATH="\$(abs_top_builddir)/src/lib/python/isc/log_messages:\$(abs_top_srcdir)/src/lib/python:\$(abs_top_builddir)/src/lib/python"
  150. AC_SUBST(COMMON_PYTHON_PATH)
  151. # Check for python development environments
  152. if test -x ${PYTHON}-config; then
  153. PYTHON_INCLUDES=`${PYTHON}-config --includes`
  154. for flag in `${PYTHON}-config --ldflags`; do
  155. # add any '-L..." flags to PYTHON_LDFLAGS
  156. flag=`echo $flag | sed -ne 's/^\(\-L.*\)$/\1/p'`
  157. if test "X${flag}" != X; then
  158. PYTHON_LDFLAGS="$PYTHON_LDFLAGS ${flag}"
  159. fi
  160. done
  161. # on some platforms, ${PYTHON}-config --ldflags doesn't provide a -L
  162. # option while having the library under a non trivial directory.
  163. # as a workaround we try the "lib" sub directory under the common
  164. # prefix for this python.
  165. if test -z "${PYTHON_LDFLAGS}"; then
  166. PYTHON_LDFLAGS="-L`${PYTHON}-config --prefix`/lib"
  167. fi
  168. else
  169. if test "X$PYTHON_INCLUDES" = X -o "X$PYTHON_LDFLAGS" = X; then
  170. 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.])
  171. fi
  172. fi
  173. # Some OSes including NetBSD don't install libpython.so in a well known path.
  174. # To avoid requiring dynamic library path with our python wrapper loadable
  175. # modules, we embed the path to the modules when possible. We do this even
  176. # when the path is known in the common operational environment (e.g. when
  177. # it's stored in a common "hint" file) for simplicity.
  178. if test $rpath_available = yes; then
  179. python_rpath=
  180. for flag in ${PYTHON_LDFLAGS}; do
  181. python_rpath="${python_rpath} `echo $flag | sed -ne 's/^\(\-L\)/-R/p'`"
  182. done
  183. PYTHON_LDFLAGS="${PYTHON_LDFLAGS} ${python_rpath}"
  184. fi
  185. AC_SUBST(PYTHON_INCLUDES)
  186. AC_SUBST(PYTHON_LDFLAGS)
  187. CPPFLAGS_SAVED="$CPPFLAGS"
  188. CPPFLAGS="$CPPFLAGS ${PYTHON_INCLUDES}"
  189. AC_CHECK_HEADERS([Python.h],, AC_MSG_ERROR([Missing Python.h]))
  190. CPPFLAGS="$CPPFLAGS_SAVED"
  191. # Check for python library. Needed for Python-wrapper libraries.
  192. LDFLAGS_SAVED="$LDFLAGS"
  193. LDFLAGS="$LDFLAGS $PYTHON_LDFLAGS"
  194. python_bin="python${PYTHON_VERSION}"
  195. AC_CHECK_LIB($python_bin, main, python_lib=$python_bin, python_lib=no)
  196. if test $python_lib != "no"; then
  197. PYTHON_LIB="-l$python_lib"
  198. fi
  199. AC_SUBST(PYTHON_LIB)
  200. LDFLAGS=$LDFLAGS_SAVED
  201. # Check for the setproctitle module
  202. if test "$setproctitle_check" = "yes" ; then
  203. AC_MSG_CHECKING(for setproctitle module)
  204. if "$PYTHON" -c 'import setproctitle' 2>/dev/null ; then
  205. AC_MSG_RESULT(ok)
  206. else
  207. AC_MSG_RESULT(missing)
  208. AC_MSG_WARN([Missing setproctitle python module.
  209. Use --disable-setproctitle-check to skip this check.
  210. In this case we will continue, but naming of python processes will not work.])
  211. fi
  212. fi
  213. # TODO: check for _sqlite3.py module
  214. # Compiler dependent settings: define some mandatory CXXFLAGS here.
  215. # We also use a separate variable B10_CXXFLAGS. This will (and should) be
  216. # used as the default value for each specific AM_CXXFLAGS:
  217. # AM_CXXFLAGS = $(B10_CXXFLAGS)
  218. # AM_CXXFLAGS += ... # add module specific flags
  219. # We need this so that we can disable some specific compiler warnings per
  220. # module basis; since AM_CXXFLAGS are placed before CXXFLAGS, and since
  221. # gcc's -Wno-XXX option must be specified after -Wall or -Wextra, we cannot
  222. # specify the default warning flags in CXXFLAGS and let specific modules
  223. # "override" the default.
  224. # This may be used to try linker flags.
  225. AC_DEFUN([BIND10_CXX_TRY_FLAG], [
  226. AC_MSG_CHECKING([whether $CXX supports $1])
  227. bind10_save_CXXFLAGS="$CXXFLAGS"
  228. CXXFLAGS="$CXXFLAGS $1"
  229. AC_LINK_IFELSE([int main(void){ return 0;} ],
  230. [bind10_cxx_flag=yes], [bind10_cxx_flag=no])
  231. CXXFLAGS="$bind10_save_CXXFLAGS"
  232. if test "x$bind10_cxx_flag" = "xyes"; then
  233. ifelse([$2], , :, [$2])
  234. else
  235. ifelse([$3], , :, [$3])
  236. fi
  237. AC_MSG_RESULT([$bind10_cxx_flag])
  238. ])
  239. werror_ok=0
  240. # SunStudio compiler requires special compiler options for boost
  241. # (http://blogs.sun.com/sga/entry/boost_mini_howto)
  242. if test "$SUNCXX" = "yes"; then
  243. CXXFLAGS="$CXXFLAGS -library=stlport4 -features=tmplife -features=tmplrefstatic"
  244. MULTITHREADING_FLAG="-mt"
  245. fi
  246. BIND10_CXX_TRY_FLAG(-Wno-missing-field-initializers,
  247. [WARNING_NO_MISSING_FIELD_INITIALIZERS_CFLAG="-Wno-missing-field-initializers"])
  248. AC_SUBST(WARNING_NO_MISSING_FIELD_INITIALIZERS_CFLAG)
  249. # gcc specific settings:
  250. if test "X$GXX" = "Xyes"; then
  251. B10_CXXFLAGS="-Wall -Wextra -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare"
  252. case "$host" in
  253. *-solaris*)
  254. MULTITHREADING_FLAG=-pthreads
  255. # In Solaris, IN6ADDR_ANY_INIT and IN6ADDR_LOOPBACK_INIT need -Wno-missing-braces
  256. B10_CXXFLAGS="$B10_CXXFLAGS -Wno-missing-braces"
  257. ;;
  258. *)
  259. MULTITHREADING_FLAG=-pthread
  260. ;;
  261. esac
  262. # Certain versions of gcc (g++) have a bug that incorrectly warns about
  263. # the use of anonymous name spaces even if they're closed in a single
  264. # translation unit. For these versions we have to disable -Werror.
  265. CXXFLAGS_SAVED="$CXXFLAGS"
  266. CXXFLAGS="$CXXFLAGS $B10_CXXFLAGS -Werror"
  267. AC_MSG_CHECKING(for in-TU anonymous namespace breakage)
  268. AC_TRY_COMPILE([namespace { class Foo {}; }
  269. namespace isc {class Bar {Foo foo_;};} ],,
  270. [AC_MSG_RESULT(no)
  271. werror_ok=1
  272. B10_CXXFLAGS="$B10_CXXFLAGS -Werror"],
  273. [AC_MSG_RESULT(yes)])
  274. CXXFLAGS="$CXXFLAGS_SAVED"
  275. # Python 3.2 has an unused parameter in one of its headers. This
  276. # has been reported, but not fixed as of yet, so we check if we need
  277. # to set -Wno-unused-parameter.
  278. if test $werror_ok = 1; then
  279. CPPFLAGS_SAVED="$CPPFLAGS"
  280. CPPFLAGS=${PYTHON_INCLUDES}
  281. CXXFLAGS_SAVED="$CXXFLAGS"
  282. CXXFLAGS="$CXXFLAGS $B10_CXXFLAGS -Werror"
  283. AC_MSG_CHECKING([whether we need -Wno-unused-parameter for python])
  284. AC_TRY_COMPILE(
  285. [#include <Python.h>],
  286. [],
  287. [AC_MSG_RESULT(no)],
  288. [
  289. CXXFLAGS="$CXXFLAGS -Wno-unused-parameter"
  290. AC_TRY_COMPILE([#include <Python.h>],
  291. [],
  292. [AC_MSG_RESULT(yes)
  293. PYTHON_CXXFLAGS="${PYTHON_CXXFLAGS} -Wno-unused-parameter"
  294. AC_SUBST(PYTHON_CXXFLAGS)
  295. ],
  296. [AC_MSG_ERROR([Can't compile against Python.h])]
  297. )
  298. ]
  299. )
  300. CXXFLAGS="$CXXFLAGS_SAVED"
  301. CPPFLAGS="$CPPFLAGS_SAVED"
  302. fi
  303. fi dnl GXX = yes
  304. AM_CONDITIONAL(GCC_WERROR_OK, test $werror_ok = 1)
  305. # produce PIC unless we disable shared libraries. need this for python bindings.
  306. if test $enable_shared != "no" -a "X$GXX" = "Xyes"; then
  307. B10_CXXFLAGS="$B10_CXXFLAGS -fPIC"
  308. fi
  309. AC_SUBST(B10_CXXFLAGS)
  310. # Checks for libraries.
  311. AC_SEARCH_LIBS(inet_pton, [nsl])
  312. AC_SEARCH_LIBS(recvfrom, [socket])
  313. AC_SEARCH_LIBS(nanosleep, [rt])
  314. # Checks for header files.
  315. # Checks for typedefs, structures, and compiler characteristics.
  316. AC_HEADER_STDBOOL
  317. AC_TYPE_SIZE_T
  318. AC_MSG_CHECKING(for sa_len in struct sockaddr)
  319. AC_TRY_COMPILE([
  320. #include <sys/types.h>
  321. #include <sys/socket.h>],
  322. [struct sockaddr sa; sa.sa_len = 0; return (0);],
  323. [AC_MSG_RESULT(yes)
  324. AC_DEFINE(HAVE_SA_LEN, 1, [Define to 1 if sockaddr has a sa_len member, and corresponding sin_len and sun_len])],
  325. AC_MSG_RESULT(no))
  326. AC_ARG_WITH(pycoverage,
  327. [ --with-pycoverage[=PROGRAM] enable python code coverage using the specified coverage], pycoverage="$withval", pycoverage="no")
  328. if test "$pycoverage" = "no" ; then
  329. # just run the tests normally with python
  330. PYCOVERAGE_RUN="${PYTHON}"
  331. USE_PYCOVERAGE="no"
  332. elif test "$pycoverage" = "yes" ; then
  333. PYCOVERAGE="coverage"
  334. PYCOVERAGE_RUN="${PYCOVERAGE} run --branch --append"
  335. USE_PYCOVERAGE="yes"
  336. else
  337. PYCOVERAGE="$pycoverage"
  338. PYCOVERAGE_RUN="${PYCOVERAGE} run --branch --append"
  339. USE_PYCOVERAGE="yes"
  340. fi
  341. AM_CONDITIONAL(ENABLE_PYTHON_COVERAGE, test x$USE_PYCOVERAGE != xno)
  342. AC_SUBST(PYCOVERAGE)
  343. AC_SUBST(PYCOVERAGE_RUN)
  344. AC_SUBST(USE_PYCOVERAGE)
  345. AC_ARG_WITH(lcov,
  346. [ --with-lcov[=PROGRAM] enable gtest and coverage target using the specified lcov], lcov="$withval", lcov="no")
  347. AC_ARG_WITH(gtest,
  348. [ --with-gtest=PATH specify a path to gtest header files (PATH/include) and library (PATH/lib)],
  349. gtest_path="$withval", gtest_path="no")
  350. USE_LCOV="no"
  351. if test "$lcov" != "no"; then
  352. # force gtest if not set
  353. if test "$gtest_path" = "no"; then
  354. # AC_MSG_ERROR("lcov needs gtest for test coverage report")
  355. AC_MSG_NOTICE([gtest support is now enabled, because used by coverage tests])
  356. gtest_path="yes"
  357. fi
  358. if test "$lcov" != "yes"; then
  359. LCOV=$lcov
  360. else
  361. AC_PATH_PROG([LCOV], [lcov])
  362. fi
  363. if test -x "${LCOV}"; then
  364. USE_LCOV="yes"
  365. else
  366. AC_MSG_ERROR([Cannot find lcov.])
  367. fi
  368. # is genhtml always in the same directory?
  369. GENHTML=`echo "$LCOV" | sed s/lcov$/genhtml/`
  370. if test ! -x $GENHTML; then
  371. AC_MSG_ERROR([genhtml not found, needed for lcov])
  372. fi
  373. # GCC specific?
  374. CXXFLAGS="$CXXFLAGS -fprofile-arcs -ftest-coverage"
  375. LIBS=" $LIBS -lgcov"
  376. AC_SUBST(CPPFLAGS)
  377. AC_SUBST(LIBS)
  378. AC_SUBST(LCOV)
  379. AC_SUBST(GENHTML)
  380. fi
  381. AC_SUBST(USE_LCOV)
  382. # Check for Botan
  383. botan_path="yes"
  384. AC_ARG_WITH([botan],
  385. AC_HELP_STRING([--with-botan=PATH],
  386. [specify exact directory of Botan library]),
  387. [botan_path="$withval"])
  388. if test "${botan_path}" = "no" ; then
  389. AC_MSG_ERROR([Need botan for libcryptolink])
  390. fi
  391. if test "${botan_path}" != "yes" ; then
  392. if test -x "${botan_path}/bin/botan-config" ; then
  393. BOTAN_CONFIG="${botan_path}/bin/botan-config"
  394. else
  395. AC_MSG_ERROR([${botan_path}/bin/botan-config not found])
  396. fi
  397. else
  398. # First see if pkg-config knows of it.
  399. # Unfortunately, the botan.pc files have their minor version in them
  400. # too, so we need to try them one by one
  401. BOTAN_CONFIG=""
  402. AC_PATH_PROG([PKG_CONFIG], [pkg-config])
  403. if test "$PKG_CONFIG" != "" ; then
  404. BOTAN_VERSIONS="botan-1.10 botan-1.9 botan-1.8"
  405. for version in $BOTAN_VERSIONS; do
  406. AC_MSG_CHECKING([Checking botan version with pkg-config $version])
  407. if [ $PKG_CONFIG --exists ${version} ]; then
  408. AC_MSG_RESULT([found])
  409. BOTAN_CONFIG="$PKG_CONFIG ${version}"
  410. break
  411. else
  412. AC_MSG_RESULT([not found])
  413. fi
  414. done
  415. fi
  416. # If we had no pkg-config, or it didn't know about botan, use botan-config
  417. if test "$BOTAN_CONFIG" = "" ; then
  418. AC_PATH_PROG([BOTAN_CONFIG], [botan-config])
  419. fi
  420. fi
  421. BOTAN_LDFLAGS=`${BOTAN_CONFIG} --libs`
  422. BOTAN_INCLUDES=`${BOTAN_CONFIG} --cflags`
  423. # We expect botan-config --libs to contain -L<path_to_libbotan>, but
  424. # this is not always the case. As a heuristics workaround we add
  425. # -L`botan-config --prefix/lib` in this case. Same for BOTAN_INCLUDES
  426. # (but using include instead of lib) below.
  427. if [ $BOTAN_CONFIG --prefix >/dev/null 2>&1 ] ; then
  428. echo ${BOTAN_LDFLAGS} | grep -- -L > /dev/null || \
  429. BOTAN_LDFLAGS="-L`${BOTAN_CONFIG} --prefix`/lib ${BOTAN_LDFLAGS}"
  430. echo ${BOTAN_INCLUDES} | grep -- -I > /dev/null || \
  431. BOTAN_INCLUDES="-I`${BOTAN_CONFIG} --prefix`/include ${BOTAN_INCLUDES}"
  432. fi
  433. # See python_rpath for some info on why we do this
  434. if test $rpath_available = yes; then
  435. BOTAN_RPATH=
  436. for flag in ${BOTAN_LDFLAGS}; do
  437. BOTAN_RPATH="${BOTAN_RPATH} `echo $flag | sed -ne 's/^\(\-L\)/-R/p'`"
  438. done
  439. AC_SUBST(BOTAN_RPATH)
  440. # According to the libtool manual, it should be sufficient if we
  441. # specify the "-R libdir" in our wrapper library of botan (no other
  442. # programs will need libbotan directly); "libdir" should be added to
  443. # the program's binary image. But we've seen in our build environments
  444. # that (some versions of?) libtool doesn't propagate -R as documented,
  445. # and it caused a linker error at run time. To work around this, we
  446. # also add the rpath to the global LDFLAGS.
  447. LDFLAGS="$BOTAN_RPATH $LDFLAGS"
  448. fi
  449. AC_SUBST(BOTAN_LDFLAGS)
  450. AC_SUBST(BOTAN_INCLUDES)
  451. CPPFLAGS_SAVED=$CPPFLAGS
  452. CPPFLAGS="$BOTAN_INCLUDES $CPPFLAGS"
  453. LDFLAGS_SAVED="$LDFLAGS"
  454. LDFLAGS="$BOTAN_LDFLAGS $LDFLAGS"
  455. AC_CHECK_HEADERS([botan/botan.h],,AC_MSG_ERROR([Missing required header files.]))
  456. AC_LINK_IFELSE(
  457. [AC_LANG_PROGRAM([#include <botan/botan.h>
  458. #include <botan/hash.h>
  459. ],
  460. [using namespace Botan;
  461. LibraryInitializer::initialize();
  462. HashFunction *h = get_hash("MD5");
  463. ])],
  464. [AC_MSG_RESULT([checking for Botan library... yes])],
  465. [AC_MSG_RESULT([checking for Botan library... no])
  466. AC_MSG_ERROR([Needs Botan library 1.8 or higher])]
  467. )
  468. CPPFLAGS=$CPPFLAGS_SAVED
  469. LDFLAGS=$LDFLAGS_SAVED
  470. # Check for log4cplus
  471. log4cplus_path="yes"
  472. AC_ARG_WITH([log4cplus],
  473. AC_HELP_STRING([--with-log4cplus=PATH],
  474. [specify exact directory of log4cplus library and headers]),
  475. [log4cplus_path="$withval"])
  476. if test "${log4cplus_path}" = "no" ; then
  477. AC_MSG_ERROR([Need log4cplus])
  478. elif test "${log4cplus_path}" != "yes" ; then
  479. LOG4CPLUS_INCLUDES="-I${log4cplus_path}/include"
  480. LOG4CPLUS_LDFLAGS="-L${log4cplus_path}/lib"
  481. else
  482. # If not specified, try some common paths.
  483. log4cplusdirs="/usr/local /usr/pkg /opt /opt/local"
  484. for d in $log4cplusdirs
  485. do
  486. if test -f $d/include/log4cplus/logger.h; then
  487. LOG4CPLUS_INCLUDES="-I$d/include"
  488. LOG4CPLUS_LDFLAGS="-L$d/lib"
  489. break
  490. fi
  491. done
  492. fi
  493. LOG4CPLUS_LDFLAGS="$LOG4CPLUS_LDFLAGS -llog4cplus $MULTITHREADING_FLAG"
  494. AC_SUBST(LOG4CPLUS_LDFLAGS)
  495. AC_SUBST(LOG4CPLUS_INCLUDES)
  496. CPPFLAGS_SAVED=$CPPFLAGS
  497. CPPFLAGS="$LOG4CPLUS_INCLUDES $CPPFLAGS"
  498. LDFLAGS_SAVED="$LDFLAGS"
  499. LDFLAGS="$LOG4CPLUS_LDFLAGS $LDFLAGS"
  500. AC_CHECK_HEADERS([log4cplus/logger.h],,AC_MSG_ERROR([Missing required header files.]))
  501. AC_LINK_IFELSE(
  502. [AC_LANG_PROGRAM([#include <log4cplus/logger.h>
  503. ],
  504. [using namespace log4cplus;
  505. Logger logger = Logger::getInstance("main");
  506. ])],
  507. [AC_MSG_RESULT([checking for log4cplus library... yes])],
  508. [AC_MSG_RESULT([checking for log4cplus library... no])
  509. AC_MSG_ERROR([Needs log4cplus library])]
  510. )
  511. CPPFLAGS=$CPPFLAGS_SAVED
  512. LDFLAGS=$LDFLAGS_SAVED
  513. #
  514. # Configure Boost header path
  515. #
  516. # If explicitly specified, use it.
  517. AC_ARG_WITH([boost-include],
  518. AC_HELP_STRING([--with-boost-include=PATH],
  519. [specify exact directory for Boost headers]),
  520. [boost_include_path="$withval"])
  521. # If not specified, try some common paths.
  522. if test -z "$with_boost_include"; then
  523. boostdirs="/usr/local /usr/pkg /opt /opt/local"
  524. for d in $boostdirs
  525. do
  526. if test -f $d/include/boost/shared_ptr.hpp; then
  527. boost_include_path=$d/include
  528. break
  529. fi
  530. done
  531. fi
  532. CPPFLAGS_SAVES="$CPPFLAGS"
  533. if test "${boost_include_path}" ; then
  534. BOOST_INCLUDES="-I${boost_include_path}"
  535. CPPFLAGS="$CPPFLAGS $BOOST_INCLUDES"
  536. fi
  537. AC_CHECK_HEADERS([boost/shared_ptr.hpp boost/foreach.hpp boost/interprocess/sync/interprocess_upgradable_mutex.hpp boost/date_time/posix_time/posix_time_types.hpp boost/bind.hpp boost/function.hpp],,
  538. AC_MSG_ERROR([Missing required header files.]))
  539. CPPFLAGS="$CPPFLAGS_SAVES"
  540. AC_SUBST(BOOST_INCLUDES)
  541. if test "${use_boost_threads}" = "yes" ; then
  542. AC_DEFINE([USE_BOOST_THREADS], [], [Use boost threads])
  543. # Using boost::mutex can result in requiring libboost_thread with older
  544. # versions of Boost. We'd like to avoid relying on a compiled Boost library
  545. # whenever possible, so we need to check for it step by step.
  546. #
  547. # NOTE: another fix of this problem is to simply require newer versions of
  548. # boost. If we choose that solution we should simplify the following tricky
  549. # checks accordingly and all Makefile.am's that refer to NEED_LIBBOOST_THREAD.
  550. AC_MSG_CHECKING(for boost::mutex)
  551. CPPFLAGS_SAVES="$CPPFLAGS"
  552. LIBS_SAVES="$LIBS"
  553. CPPFLAGS="$BOOST_INCLUDES $CPPFLAGS $MULTITHREADING_FLAG"
  554. need_libboost_thread=0
  555. need_sunpro_workaround=0
  556. AC_TRY_LINK([
  557. #include <boost/thread.hpp>
  558. ],[
  559. boost::mutex m;
  560. ],
  561. [ AC_MSG_RESULT(yes (without libboost_thread)) ],
  562. # there is one specific problem with SunStudio 5.10
  563. # where including boost/thread causes a compilation failure
  564. # There is a workaround in boost but it checks the version not being 5.10
  565. # This will probably be fixed in the future, in which case this
  566. # is only a temporary workaround
  567. [ AC_TRY_LINK([
  568. #if defined(__SUNPRO_CC) && __SUNPRO_CC == 0x5100
  569. #undef __SUNPRO_CC
  570. #define __SUNPRO_CC 0x5090
  571. #endif
  572. #include <boost/thread.hpp>
  573. ],[
  574. boost::mutex m;
  575. ],
  576. [ AC_MSG_RESULT(yes (with SUNOS workaround))
  577. need_sunpro_workaround=1 ],
  578. [ LIBS=" $LIBS -lboost_thread"
  579. AC_TRY_LINK([
  580. #include <boost/thread.hpp>
  581. ],[
  582. boost::mutex m;
  583. ],
  584. [ AC_MSG_RESULT(yes (with libboost_thread))
  585. need_libboost_thread=1 ],
  586. [ AC_MSG_RESULT(no)
  587. AC_MSG_ERROR([boost::mutex cannot be linked in this build environment.
  588. Perhaps you are using an older version of Boost that requires libboost_thread for the mutex support, which does not appear to be available.
  589. You may want to check the availability of the library or to upgrade Boost.])
  590. ])])])
  591. CPPFLAGS="$CPPFLAGS_SAVES"
  592. LIBS="$LIBS_SAVES"
  593. AM_CONDITIONAL(NEED_LIBBOOST_THREAD, test $need_libboost_thread = 1)
  594. if test $need_sunpro_workaround = 1; then
  595. AC_DEFINE([NEED_SUNPRO_WORKAROUND], [], [Need boost sunstudio workaround])
  596. fi
  597. else
  598. AM_CONDITIONAL(NEED_LIBBOOST_THREAD, test "${use_boost_threads}" = "yes")
  599. fi
  600. #
  601. # Check availability of gtest, which will be used for unit tests.
  602. #
  603. if test "$gtest_path" != "no"
  604. then
  605. DISTCHECK_GTEST_CONFIGURE_FLAG="--with-gtest=\"$gtest_path\""
  606. if test "$gtest_path" != "yes"; then
  607. GTEST_PATHS=$gtest_path
  608. if test -x "${gtest_path}/bin/gtest-config" ; then
  609. GTEST_CONFIG="${gtest_path}/bin/gtest-config"
  610. fi
  611. else
  612. AC_PATH_PROG([GTEST_CONFIG], [gtest-config])
  613. fi
  614. if test -x "${GTEST_CONFIG}" ; then :
  615. # using cppflags instead of cxxflags
  616. GTEST_INCLUDES=`${GTEST_CONFIG} --cppflags`
  617. GTEST_LDFLAGS=`${GTEST_CONFIG} --ldflags`
  618. GTEST_LDADD=`${GTEST_CONFIG} --libs`
  619. GTEST_FOUND="true"
  620. else
  621. AC_MSG_WARN([Unable to locate Google Test gtest-config.])
  622. if test -z "${GTEST_PATHS}" ; then
  623. GTEST_PATHS="/usr /usr/local"
  624. fi
  625. GTEST_FOUND="false"
  626. fi
  627. if test "${GTEST_FOUND}" != "true"; then
  628. GTEST_FOUND="false"
  629. for dir in $GTEST_PATHS; do
  630. if test -f "$dir/include/gtest/gtest.h"; then
  631. GTEST_INCLUDES="-I$dir/include"
  632. GTEST_LDFLAGS="-L$dir/lib"
  633. GTEST_LDADD="-lgtest"
  634. GTEST_FOUND="true"
  635. break
  636. fi
  637. done
  638. fi
  639. if test "${GTEST_FOUND}" != "true"; then
  640. AC_MSG_ERROR([Cannot find gtest in: $GTEST_PATHS])
  641. fi
  642. else
  643. GTEST_INCLUDES=
  644. GTEST_LDFLAGS=
  645. GTEST_LDADD=
  646. DISTCHECK_GTEST_CONFIGURE_FLAG=
  647. fi
  648. AM_CONDITIONAL(HAVE_GTEST, test $gtest_path != "no")
  649. AC_SUBST(DISTCHECK_GTEST_CONFIGURE_FLAG)
  650. AC_SUBST(GTEST_INCLUDES)
  651. AC_SUBST(GTEST_LDFLAGS)
  652. AC_SUBST(GTEST_LDADD)
  653. dnl check for pkg-config itself so we don't try the m4 macro without pkg-config
  654. AC_CHECK_PROG(HAVE_PKG_CONFIG, pkg-config, yes, no)
  655. if test "x$HAVE_PKG_CONFIG" = "xno" ; then
  656. AC_MSG_ERROR(Please install pkg-config)
  657. fi
  658. PKG_CHECK_MODULES(SQLITE, sqlite3 >= 3.3.9, enable_features="$enable_features SQLite3")
  659. # I can't get some of the #include <asio.hpp> right without this
  660. # TODO: find the real cause of asio/boost wanting pthreads
  661. # (this currently only occurs for src/lib/cc/session_unittests)
  662. PTHREAD_LDFLAGS=
  663. AC_CHECK_LIB(pthread, pthread_create,[ PTHREAD_LDFLAGS=-lpthread ], [])
  664. AC_SUBST(PTHREAD_LDFLAGS)
  665. AC_SUBST(MULTITHREADING_FLAG)
  666. #
  667. # ASIO: we extensively use it as the C++ event management module.
  668. #
  669. # Use local ASIO headers from ext
  670. #
  671. CPPFLAGS="$CPPFLAGS -I\$(top_srcdir)/ext/asio"
  672. #
  673. # Use our 'coroutine' header from ext
  674. CPPFLAGS="$CPPFLAGS -I\$(top_srcdir)/ext/coroutine"
  675. #
  676. # Disable threads: Currently we don't use them.
  677. CPPFLAGS="$CPPFLAGS -DASIO_DISABLE_THREADS=1"
  678. #
  679. # kqueue portability: ASIO uses kqueue by default if it's available (it's
  680. # generally available in BSD variants). Unfortunately, some public
  681. # implementation of kqueue forces a conversion from a pointer to an integer,
  682. # which is prohibited in C++ unless reinterpret_cast, C++'s most evil beast
  683. # (and ASIO doesn't use it anyway) is used. This will cause build error for
  684. # some of our C++ files including ASIO header files. The following check
  685. # detects such cases and tells ASIO not to use kqueue if so.
  686. AC_CHECK_FUNC(kqueue, ac_cv_have_kqueue=yes, ac_cv_have_kqueue=no)
  687. if test "X$ac_cv_have_kqueue" = "Xyes"; then
  688. AC_MSG_CHECKING([whether kqueue EV_SET compiles in C++])
  689. AC_TRY_COMPILE([
  690. #include <sys/types.h>
  691. #include <sys/param.h>
  692. #include <sys/event.h>],
  693. [char* udata;
  694. EV_SET(NULL, 0, 0, 0, 0, 0, udata);],
  695. [AC_MSG_RESULT(yes)],
  696. [AC_MSG_RESULT([no, disable kqueue for ASIO])
  697. CPPFLAGS="$CPPFLAGS -DASIO_DISABLE_KQUEUE=1"
  698. ])
  699. fi
  700. # /dev/poll issue: ASIO uses /dev/poll by default if it's available (generally
  701. # the case with Solaris). Unfortunately its /dev/poll specific code would
  702. # trigger the gcc's "missing-field-initializers" warning, which would
  703. # subsequently make the build fail with -Werror. Further, older versions of
  704. # gcc don't provide an option to selectively suppress this warning.
  705. # So, for the moment, we simply disable the use of /dev/poll. Unless we
  706. # implement recursive DNS server with randomized ports, we don't need the
  707. # scalability that /dev/poll can provide, so this decision wouldn't affect
  708. # run time performance. Hopefully we can find a better solution or the ASIO
  709. # code will be updated by the time we really need it.
  710. AC_CHECK_HEADERS(sys/devpoll.h, ac_cv_have_devpoll=yes, ac_cv_have_devpoll=no)
  711. if test "X$ac_cv_have_devpoll" = "Xyes" -a "X$GXX" = "Xyes"; then
  712. CPPFLAGS="$CPPFLAGS -DASIO_DISABLE_DEV_POLL=1"
  713. fi
  714. #
  715. # Perl is optional; it is used only by some of the system test scripts.
  716. #
  717. AC_PATH_PROGS(PERL, perl5 perl)
  718. AC_SUBST(PERL)
  719. AC_PATH_PROGS(AWK, gawk awk)
  720. AC_SUBST(AWK)
  721. AC_ARG_ENABLE(man, [AC_HELP_STRING([--enable-man],
  722. [regenerate man pages [default=no]])], enable_man=yes, enable_man=no)
  723. AM_CONDITIONAL(ENABLE_MAN, test x$enable_man != xno)
  724. AC_ARG_ENABLE(install-configurations,
  725. [AC_HELP_STRING([--disable-install-configurations],
  726. [do not install configuration])], install_configurations=$enableval, install_configurations=yes)
  727. AM_CONDITIONAL(INSTALL_CONFIGURATIONS, test x$install_configurations = xyes || test x$install_configurations = xtrue)
  728. AC_CONFIG_FILES([Makefile
  729. doc/Makefile
  730. doc/guide/Makefile
  731. src/Makefile
  732. src/bin/Makefile
  733. src/bin/bind10/Makefile
  734. src/bin/bind10/tests/Makefile
  735. src/bin/cmdctl/Makefile
  736. src/bin/cmdctl/tests/Makefile
  737. src/bin/bindctl/Makefile
  738. src/bin/bindctl/tests/Makefile
  739. src/bin/cfgmgr/Makefile
  740. src/bin/cfgmgr/plugins/Makefile
  741. src/bin/cfgmgr/plugins/tests/Makefile
  742. src/bin/cfgmgr/tests/Makefile
  743. src/bin/host/Makefile
  744. src/bin/loadzone/Makefile
  745. src/bin/loadzone/tests/correct/Makefile
  746. src/bin/loadzone/tests/error/Makefile
  747. src/bin/msgq/Makefile
  748. src/bin/msgq/tests/Makefile
  749. src/bin/auth/Makefile
  750. src/bin/auth/tests/Makefile
  751. src/bin/auth/benchmarks/Makefile
  752. src/bin/dhcp6/Makefile
  753. src/bin/dhcp6/tests/Makefile
  754. src/bin/resolver/Makefile
  755. src/bin/resolver/tests/Makefile
  756. src/bin/sockcreator/Makefile
  757. src/bin/sockcreator/tests/Makefile
  758. src/bin/xfrin/Makefile
  759. src/bin/xfrin/tests/Makefile
  760. src/bin/xfrin/tests/testdata/Makefile
  761. src/bin/xfrout/Makefile
  762. src/bin/xfrout/tests/Makefile
  763. src/bin/zonemgr/Makefile
  764. src/bin/zonemgr/tests/Makefile
  765. src/bin/stats/Makefile
  766. src/bin/stats/tests/Makefile
  767. src/bin/usermgr/Makefile
  768. src/bin/tests/Makefile
  769. src/lib/Makefile
  770. src/lib/asiolink/Makefile
  771. src/lib/asiolink/tests/Makefile
  772. src/lib/asiodns/Makefile
  773. src/lib/asiodns/tests/Makefile
  774. src/lib/bench/Makefile
  775. src/lib/bench/example/Makefile
  776. src/lib/bench/tests/Makefile
  777. src/lib/cc/Makefile
  778. src/lib/cc/tests/Makefile
  779. src/lib/python/Makefile
  780. src/lib/python/isc/Makefile
  781. src/lib/python/isc/acl/Makefile
  782. src/lib/python/isc/acl/tests/Makefile
  783. src/lib/python/isc/util/Makefile
  784. src/lib/python/isc/util/tests/Makefile
  785. src/lib/python/isc/datasrc/Makefile
  786. src/lib/python/isc/datasrc/tests/Makefile
  787. src/lib/python/isc/dns/Makefile
  788. src/lib/python/isc/cc/Makefile
  789. src/lib/python/isc/cc/tests/Makefile
  790. src/lib/python/isc/config/Makefile
  791. src/lib/python/isc/config/tests/Makefile
  792. src/lib/python/isc/log/Makefile
  793. src/lib/python/isc/log/tests/Makefile
  794. src/lib/python/isc/log_messages/Makefile
  795. src/lib/python/isc/log_messages/work/Makefile
  796. src/lib/python/isc/net/Makefile
  797. src/lib/python/isc/net/tests/Makefile
  798. src/lib/python/isc/notify/Makefile
  799. src/lib/python/isc/notify/tests/Makefile
  800. src/lib/python/isc/testutils/Makefile
  801. src/lib/python/isc/bind10/Makefile
  802. src/lib/python/isc/bind10/tests/Makefile
  803. src/lib/python/isc/xfrin/Makefile
  804. src/lib/python/isc/xfrin/tests/Makefile
  805. src/lib/config/Makefile
  806. src/lib/config/tests/Makefile
  807. src/lib/config/tests/testdata/Makefile
  808. src/lib/cryptolink/Makefile
  809. src/lib/cryptolink/tests/Makefile
  810. src/lib/dns/Makefile
  811. src/lib/dns/tests/Makefile
  812. src/lib/dns/tests/testdata/Makefile
  813. src/lib/dns/python/Makefile
  814. src/lib/dns/python/tests/Makefile
  815. src/lib/dns/benchmarks/Makefile
  816. src/lib/dhcp/Makefile
  817. src/lib/dhcp/tests/Makefile
  818. src/lib/exceptions/Makefile
  819. src/lib/exceptions/tests/Makefile
  820. src/lib/datasrc/Makefile
  821. src/lib/datasrc/tests/Makefile
  822. src/lib/datasrc/tests/testdata/Makefile
  823. src/lib/xfr/Makefile
  824. src/lib/log/Makefile
  825. src/lib/log/compiler/Makefile
  826. src/lib/log/tests/Makefile
  827. src/lib/resolve/Makefile
  828. src/lib/resolve/tests/Makefile
  829. src/lib/testutils/Makefile
  830. src/lib/testutils/testdata/Makefile
  831. src/lib/nsas/Makefile
  832. src/lib/nsas/tests/Makefile
  833. src/lib/cache/Makefile
  834. src/lib/cache/tests/Makefile
  835. src/lib/server_common/Makefile
  836. src/lib/server_common/tests/Makefile
  837. src/lib/util/Makefile
  838. src/lib/util/io/Makefile
  839. src/lib/util/unittests/Makefile
  840. src/lib/util/python/Makefile
  841. src/lib/util/pyunittests/Makefile
  842. src/lib/util/tests/Makefile
  843. src/lib/acl/Makefile
  844. src/lib/acl/tests/Makefile
  845. tests/Makefile
  846. tests/system/Makefile
  847. tests/tools/Makefile
  848. tests/tools/badpacket/Makefile
  849. tests/tools/badpacket/tests/Makefile
  850. ])
  851. AC_OUTPUT([doc/version.ent
  852. src/bin/cfgmgr/b10-cfgmgr.py
  853. src/bin/cfgmgr/tests/b10-cfgmgr_test.py
  854. src/bin/cmdctl/cmdctl.py
  855. src/bin/cmdctl/run_b10-cmdctl.sh
  856. src/bin/cmdctl/tests/cmdctl_test
  857. src/bin/cmdctl/cmdctl.spec.pre
  858. src/bin/xfrin/tests/xfrin_test
  859. src/bin/xfrin/xfrin.py
  860. src/bin/xfrin/run_b10-xfrin.sh
  861. src/bin/xfrout/xfrout.py
  862. src/bin/xfrout/xfrout.spec.pre
  863. src/bin/xfrout/tests/xfrout_test
  864. src/bin/xfrout/tests/xfrout_test.py
  865. src/bin/xfrout/run_b10-xfrout.sh
  866. src/bin/resolver/resolver.spec.pre
  867. src/bin/resolver/spec_config.h.pre
  868. src/bin/zonemgr/zonemgr.py
  869. src/bin/zonemgr/zonemgr.spec.pre
  870. src/bin/zonemgr/tests/zonemgr_test
  871. src/bin/zonemgr/run_b10-zonemgr.sh
  872. src/bin/stats/stats.py
  873. src/bin/stats/stats_httpd.py
  874. src/bin/bind10/bind10_src.py
  875. src/bin/bind10/run_bind10.sh
  876. src/bin/bind10/tests/bind10_test.py
  877. src/bin/bindctl/run_bindctl.sh
  878. src/bin/bindctl/bindctl_main.py
  879. src/bin/bindctl/tests/bindctl_test
  880. src/bin/loadzone/run_loadzone.sh
  881. src/bin/loadzone/tests/correct/correct_test.sh
  882. src/bin/loadzone/tests/error/error_test.sh
  883. src/bin/loadzone/b10-loadzone.py
  884. src/bin/usermgr/run_b10-cmdctl-usermgr.sh
  885. src/bin/usermgr/b10-cmdctl-usermgr.py
  886. src/bin/msgq/msgq.py
  887. src/bin/msgq/tests/msgq_test
  888. src/bin/msgq/run_msgq.sh
  889. src/bin/auth/auth.spec.pre
  890. src/bin/auth/spec_config.h.pre
  891. src/bin/dhcp6/spec_config.h.pre
  892. src/bin/tests/process_rename_test.py
  893. src/lib/config/tests/data_def_unittests_config.h
  894. src/lib/python/isc/config/tests/config_test
  895. src/lib/python/isc/cc/tests/cc_test
  896. src/lib/python/isc/notify/tests/notify_out_test
  897. src/lib/python/isc/log/tests/log_console.py
  898. src/lib/python/isc/log_messages/work/__init__.py
  899. src/lib/dns/gen-rdatacode.py
  900. src/lib/python/bind10_config.py
  901. src/lib/cc/session_config.h.pre
  902. src/lib/cc/tests/session_unittests_config.h
  903. src/lib/log/tests/console_test.sh
  904. src/lib/log/tests/destination_test.sh
  905. src/lib/log/tests/init_logger_test.sh
  906. src/lib/log/tests/local_file_test.sh
  907. src/lib/log/tests/severity_test.sh
  908. src/lib/log/tests/tempdir.h
  909. src/lib/util/python/mkpywrapper.py
  910. src/lib/util/python/gen_wiredata.py
  911. src/lib/server_common/tests/data_path.h
  912. tests/lettuce/setup_intree_bind10.sh
  913. tests/system/conf.sh
  914. tests/system/run.sh
  915. tests/system/glue/setup.sh
  916. tests/system/glue/nsx1/b10-config.db
  917. tests/system/bindctl/nsx1/b10-config.db.template
  918. tests/system/ixfr/db.example.n0
  919. tests/system/ixfr/db.example.n2
  920. tests/system/ixfr/db.example.n2.refresh
  921. tests/system/ixfr/db.example.n4
  922. tests/system/ixfr/db.example.n6
  923. tests/system/ixfr/ixfr_init.sh
  924. tests/system/ixfr/b10-config.db
  925. tests/system/ixfr/common_tests.sh
  926. tests/system/ixfr/in-1/setup.sh
  927. tests/system/ixfr/in-2/setup.sh
  928. tests/system/ixfr/in-3/setup.sh
  929. tests/system/ixfr/in-4/setup.sh
  930. ], [
  931. chmod +x src/bin/cmdctl/run_b10-cmdctl.sh
  932. chmod +x src/bin/xfrin/run_b10-xfrin.sh
  933. chmod +x src/bin/xfrout/run_b10-xfrout.sh
  934. chmod +x src/bin/zonemgr/run_b10-zonemgr.sh
  935. chmod +x src/bin/bind10/run_bind10.sh
  936. chmod +x src/bin/cmdctl/tests/cmdctl_test
  937. chmod +x src/bin/xfrin/tests/xfrin_test
  938. chmod +x src/bin/xfrout/tests/xfrout_test
  939. chmod +x src/bin/zonemgr/tests/zonemgr_test
  940. chmod +x src/bin/bindctl/tests/bindctl_test
  941. chmod +x src/bin/bindctl/run_bindctl.sh
  942. chmod +x src/bin/loadzone/run_loadzone.sh
  943. chmod +x src/bin/loadzone/tests/correct/correct_test.sh
  944. chmod +x src/bin/loadzone/tests/error/error_test.sh
  945. chmod +x src/bin/usermgr/run_b10-cmdctl-usermgr.sh
  946. chmod +x src/bin/msgq/run_msgq.sh
  947. chmod +x src/bin/msgq/tests/msgq_test
  948. chmod +x src/lib/dns/gen-rdatacode.py
  949. chmod +x src/lib/log/tests/console_test.sh
  950. chmod +x src/lib/log/tests/destination_test.sh
  951. chmod +x src/lib/log/tests/init_logger_test.sh
  952. chmod +x src/lib/log/tests/local_file_test.sh
  953. chmod +x src/lib/log/tests/severity_test.sh
  954. chmod +x src/lib/util/python/mkpywrapper.py
  955. chmod +x src/lib/util/python/gen_wiredata.py
  956. chmod +x src/lib/python/isc/log/tests/log_console.py
  957. chmod +x tests/system/conf.sh
  958. chmod +x tests/system/run.sh
  959. chmod +x tests/system/ixfr/ixfr_init.sh
  960. chmod +x tests/system/ixfr/common_tests.sh
  961. chmod +x tests/system/ixfr/in-1/setup.sh
  962. chmod +x tests/system/ixfr/in-2/setup.sh
  963. chmod +x tests/system/ixfr/in-3/setup.sh
  964. chmod +x tests/system/ixfr/in-4/setup.sh
  965. ])
  966. AC_OUTPUT
  967. dnl Print the results
  968. dnl
  969. cat > config.report << END
  970. BIND 10 source configure results:
  971. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  972. Package:
  973. Name: $PACKAGE_NAME
  974. Version: $PACKAGE_VERSION
  975. C++ Compiler: $CXX
  976. Flags:
  977. DEFS: $DEFS
  978. CPPFLAGS: $CPPFLAGS
  979. CXXFLAGS: $CXXFLAGS
  980. LDFLAGS: $LDFLAGS
  981. B10_CXXFLAGS: $B10_CXXFLAGS
  982. dnl includes too
  983. Python: ${PYTHON_INCLUDES}
  984. ${PYTHON_CXXFLAGS}
  985. ${PYTHON_LDFLAGS}
  986. ${PYTHON_LIB}
  987. Boost: ${BOOST_INCLUDES}
  988. Botan: ${BOTAN_INCLUDES}
  989. ${BOTAN_LDFLAGS}
  990. Log4cplus: ${LOG4CPLUS_INCLUDES}
  991. ${LOG4CPLUS_LDFLAGS}
  992. SQLite: $SQLITE_CFLAGS
  993. $SQLITE_LIBS
  994. Features:
  995. $enable_features
  996. Developer:
  997. Google Tests: $gtest_path
  998. C++ Code Coverage: $USE_LCOV
  999. Python Code Coverage: $USE_PYCOVERAGE
  1000. Generate Manuals: $enable_man
  1001. END
  1002. cat config.report
  1003. cat <<EOF
  1004. Now you can type "make" to build BIND 10
  1005. EOF