configure.ac 40 KB

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