configure.ac 42 KB

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