configure.ac 44 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219
  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 python3.2])
  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. # Detect OS type (it may be used to do OS-specific things, e.g.
  324. # interface detection in DHCP)
  325. AC_MSG_CHECKING(OS family)
  326. system=`uname -s`
  327. case $system in
  328. Linux)
  329. OS_TYPE="Linux"
  330. CPPFLAGS="$CPPFLAGS -DOS_LINUX"
  331. ;;
  332. Darwin | FreeBSD | NetBSD | OpenBSD)
  333. OS_TYPE="BSD"
  334. CPPFLAGS="$CPPFLAGS -DOS_BSD"
  335. ;;
  336. Solaris)
  337. OS_TYPE="Solaris"
  338. CPPFLAGS="$CPPFLAGS -DOS_SOLARIS"
  339. ;;
  340. *)
  341. OS_TYPE="Unknown"
  342. AC_MSG_WARN("Unsupported OS: uname returned $system")
  343. ;;
  344. esac
  345. AC_MSG_RESULT($OS_TYPE)
  346. AM_CONDITIONAL(OS_LINUX, test $OS_TYPE = Linux)
  347. AM_COND_IF([OS_LINUX], [AC_DEFINE([OS_LINUX], [1], [Running on Linux?])])
  348. AM_CONDITIONAL(OS_BSD, test $OS_TYPE = BSD)
  349. AM_COND_IF([OS_BSD], [AC_DEFINE([OS_BSD], [1], [Running on BSD?])])
  350. AM_CONDITIONAL(OS_SOLARIS, test $OS_TYPE = Solaris)
  351. AM_COND_IF([OS_SOLARIS], [AC_DEFINE([OS_SOLARIS], [1], [Running on Solaris?])])
  352. AC_MSG_CHECKING(for sa_len in struct sockaddr)
  353. AC_TRY_COMPILE([
  354. #include <sys/types.h>
  355. #include <sys/socket.h>],
  356. [struct sockaddr sa; sa.sa_len = 0; return (0);],
  357. [AC_MSG_RESULT(yes)
  358. AC_DEFINE(HAVE_SA_LEN, 1, [Define to 1 if sockaddr has a sa_len member, and corresponding sin_len and sun_len])],
  359. AC_MSG_RESULT(no))
  360. AC_ARG_WITH(pycoverage,
  361. [ --with-pycoverage[=PROGRAM] enable python code coverage using the specified coverage], pycoverage="$withval", pycoverage="no")
  362. if test "$pycoverage" = "no" ; then
  363. # just run the tests normally with python
  364. PYCOVERAGE_RUN="${PYTHON}"
  365. USE_PYCOVERAGE="no"
  366. elif test "$pycoverage" = "yes" ; then
  367. PYCOVERAGE="coverage"
  368. PYCOVERAGE_RUN="${PYCOVERAGE} run --branch --append"
  369. USE_PYCOVERAGE="yes"
  370. else
  371. PYCOVERAGE="$pycoverage"
  372. PYCOVERAGE_RUN="${PYCOVERAGE} run --branch --append"
  373. USE_PYCOVERAGE="yes"
  374. fi
  375. AM_CONDITIONAL(ENABLE_PYTHON_COVERAGE, test x$USE_PYCOVERAGE != xno)
  376. AC_SUBST(PYCOVERAGE)
  377. AC_SUBST(PYCOVERAGE_RUN)
  378. AC_SUBST(USE_PYCOVERAGE)
  379. AC_ARG_WITH(lcov,
  380. [ --with-lcov[=PROGRAM] enable gtest and coverage target using the specified lcov], lcov="$withval", lcov="no")
  381. AC_ARG_WITH(gtest,
  382. [ --with-gtest=PATH specify a path to gtest header files (PATH/include) and library (PATH/lib)],
  383. gtest_path="$withval", gtest_path="no")
  384. USE_LCOV="no"
  385. if test "$lcov" != "no"; then
  386. # force gtest if not set
  387. if test "$gtest_path" = "no"; then
  388. # AC_MSG_ERROR("lcov needs gtest for test coverage report")
  389. AC_MSG_NOTICE([gtest support is now enabled, because used by coverage tests])
  390. gtest_path="yes"
  391. fi
  392. if test "$lcov" != "yes"; then
  393. LCOV=$lcov
  394. else
  395. AC_PATH_PROG([LCOV], [lcov])
  396. fi
  397. if test -x "${LCOV}"; then
  398. USE_LCOV="yes"
  399. else
  400. AC_MSG_ERROR([Cannot find lcov.])
  401. fi
  402. # is genhtml always in the same directory?
  403. GENHTML=`echo "$LCOV" | sed s/lcov$/genhtml/`
  404. if test ! -x $GENHTML; then
  405. AC_MSG_ERROR([genhtml not found, needed for lcov])
  406. fi
  407. # GCC specific?
  408. CXXFLAGS="$CXXFLAGS -fprofile-arcs -ftest-coverage"
  409. LIBS=" $LIBS -lgcov"
  410. AC_SUBST(CPPFLAGS)
  411. AC_SUBST(LIBS)
  412. AC_SUBST(LCOV)
  413. AC_SUBST(GENHTML)
  414. fi
  415. AC_SUBST(USE_LCOV)
  416. # Check for Botan
  417. botan_path="yes"
  418. AC_ARG_WITH([botan],
  419. AC_HELP_STRING([--with-botan=PATH],
  420. [specify the path to botan-config (PATH/bin/botan-config will be used)]),
  421. [botan_path="$withval"])
  422. if test "${botan_path}" = "no" ; then
  423. AC_MSG_ERROR([Need botan for libcryptolink])
  424. fi
  425. if test "${botan_path}" != "yes" ; then
  426. if test -x "${botan_path}/bin/botan-config" ; then
  427. BOTAN_CONFIG="${botan_path}/bin/botan-config"
  428. else
  429. AC_MSG_ERROR([${botan_path}/bin/botan-config not found])
  430. fi
  431. else
  432. # First see if pkg-config knows of it.
  433. # Unfortunately, the botan.pc files have their minor version in them
  434. # too, so we need to try them one by one
  435. BOTAN_CONFIG=""
  436. AC_PATH_PROG([PKG_CONFIG], [pkg-config])
  437. if test "$PKG_CONFIG" != "" ; then
  438. BOTAN_VERSIONS="botan-1.10 botan-1.9 botan-1.8"
  439. for version in $BOTAN_VERSIONS; do
  440. AC_MSG_CHECKING([Checking botan version with pkg-config $version])
  441. if [ $PKG_CONFIG --exists ${version} ]; then
  442. AC_MSG_RESULT([found])
  443. BOTAN_CONFIG="$PKG_CONFIG ${version}"
  444. break
  445. else
  446. AC_MSG_RESULT([not found])
  447. fi
  448. done
  449. fi
  450. # If we had no pkg-config, or it didn't know about botan, use botan-config
  451. if test "$BOTAN_CONFIG" = "" ; then
  452. AC_PATH_PROG([BOTAN_CONFIG], [botan-config])
  453. fi
  454. fi
  455. BOTAN_LIBS=`${BOTAN_CONFIG} --libs`
  456. BOTAN_INCLUDES=`${BOTAN_CONFIG} --cflags`
  457. # We expect botan-config --libs to contain -L<path_to_libbotan>, but
  458. # this is not always the case. As a heuristics workaround we add
  459. # -L`botan-config --prefix/lib` in this case (if not present already).
  460. # Same for BOTAN_INCLUDES (but using include instead of lib) below.
  461. if [ $BOTAN_CONFIG --prefix >/dev/null 2>&1 ] ; then
  462. echo ${BOTAN_LIBS} | grep -- -L > /dev/null || \
  463. BOTAN_LIBS="-L`${BOTAN_CONFIG} --prefix`/lib ${BOTAN_LIBS}"
  464. echo ${BOTAN_INCLUDES} | grep -- -I > /dev/null || \
  465. BOTAN_INCLUDES="-I`${BOTAN_CONFIG} --prefix`/include ${BOTAN_INCLUDES}"
  466. fi
  467. # botan-config script (and the way we call pkg-config) returns -L and -l
  468. # as one string, but we need them in separate values
  469. BOTAN_LDFLAGS=
  470. BOTAN_NEWLIBS=
  471. for flag in ${BOTAN_LIBS}; do
  472. BOTAN_LDFLAGS="${BOTAN_LDFLAGS} `echo $flag | sed -ne '/^\(\-L\)/p'`"
  473. BOTAN_LIBS="${BOTAN_LIBS} `echo $flag | sed -ne '/^\(\-l\)/p'`"
  474. done
  475. # See python_rpath for some info on why we do this
  476. if test $rpath_available = yes; then
  477. BOTAN_RPATH=
  478. for flag in ${BOTAN_LIBS}; do
  479. BOTAN_RPATH="${BOTAN_RPATH} `echo $flag | sed -ne 's/^\(\-L\)/-R/p'`"
  480. done
  481. AC_SUBST(BOTAN_RPATH)
  482. # According to the libtool manual, it should be sufficient if we
  483. # specify the "-R libdir" in our wrapper library of botan (no other
  484. # programs will need libbotan directly); "libdir" should be added to
  485. # the program's binary image. But we've seen in our build environments
  486. # that (some versions of?) libtool doesn't propagate -R as documented,
  487. # and it caused a linker error at run time. To work around this, we
  488. # also add the rpath to the global LDFLAGS.
  489. LDFLAGS="$BOTAN_RPATH $LDFLAGS"
  490. fi
  491. AC_SUBST(BOTAN_LDFLAGS)
  492. AC_SUBST(BOTAN_LIBS)
  493. AC_SUBST(BOTAN_INCLUDES)
  494. CPPFLAGS_SAVED=$CPPFLAGS
  495. CPPFLAGS="$BOTAN_INCLUDES $CPPFLAGS"
  496. LIBS_SAVED="$LIBS"
  497. LIBS="$LIBS $BOTAN_LIBS"
  498. AC_CHECK_HEADERS([botan/botan.h],,AC_MSG_ERROR([Missing required header files.]))
  499. AC_LINK_IFELSE(
  500. [AC_LANG_PROGRAM([#include <botan/botan.h>
  501. #include <botan/hash.h>
  502. ],
  503. [using namespace Botan;
  504. LibraryInitializer::initialize();
  505. HashFunction *h = get_hash("MD5");
  506. ])],
  507. [AC_MSG_RESULT([checking for Botan library... yes])],
  508. [AC_MSG_RESULT([checking for Botan library... no])
  509. AC_MSG_ERROR([Needs Botan library 1.8 or higher])]
  510. )
  511. CPPFLAGS=$CPPFLAGS_SAVED
  512. LIBS=$LIBS_SAVED
  513. # Check for log4cplus
  514. log4cplus_path="yes"
  515. AC_ARG_WITH([log4cplus],
  516. AC_HELP_STRING([--with-log4cplus=PATH],
  517. [specify exact directory of log4cplus library and headers]),
  518. [log4cplus_path="$withval"])
  519. if test "${log4cplus_path}" = "no" ; then
  520. AC_MSG_ERROR([Need log4cplus])
  521. elif test "${log4cplus_path}" != "yes" ; then
  522. LOG4CPLUS_INCLUDES="-I${log4cplus_path}/include"
  523. LOG4CPLUS_LIBS="-L${log4cplus_path}/lib"
  524. else
  525. # If not specified, try some common paths.
  526. log4cplusdirs="/usr/local /usr/pkg /opt /opt/local"
  527. for d in $log4cplusdirs
  528. do
  529. if test -f $d/include/log4cplus/logger.h; then
  530. LOG4CPLUS_INCLUDES="-I$d/include"
  531. LOG4CPLUS_LIBS="-L$d/lib"
  532. break
  533. fi
  534. done
  535. fi
  536. LOG4CPLUS_LIBS="$LOG4CPLUS_LIBS -llog4cplus $MULTITHREADING_FLAG"
  537. AC_SUBST(LOG4CPLUS_LIBS)
  538. AC_SUBST(LOG4CPLUS_INCLUDES)
  539. CPPFLAGS_SAVED=$CPPFLAGS
  540. CPPFLAGS="$LOG4CPLUS_INCLUDES $CPPFLAGS"
  541. LIBS_SAVED="$LIBS"
  542. LIBS="$LOG4CPLUS_LIBS $LIBS"
  543. AC_CHECK_HEADERS([log4cplus/logger.h],,AC_MSG_ERROR([Missing required header files.]))
  544. AC_LINK_IFELSE(
  545. [AC_LANG_PROGRAM([#include <log4cplus/logger.h>
  546. ],
  547. [using namespace log4cplus;
  548. Logger logger = Logger::getInstance("main");
  549. ])],
  550. [AC_MSG_RESULT([checking for log4cplus library... yes])],
  551. [AC_MSG_RESULT([checking for log4cplus library... no])
  552. AC_MSG_ERROR([Needs log4cplus library])]
  553. )
  554. CPPFLAGS=$CPPFLAGS_SAVED
  555. LIBS=$LIBS_SAVED
  556. #
  557. # Configure Boost header path
  558. #
  559. # If explicitly specified, use it.
  560. AC_ARG_WITH([boost-include],
  561. AC_HELP_STRING([--with-boost-include=PATH],
  562. [specify exact directory for Boost headers]),
  563. [boost_include_path="$withval"])
  564. # If not specified, try some common paths.
  565. if test -z "$with_boost_include"; then
  566. boostdirs="/usr/local /usr/pkg /opt /opt/local"
  567. for d in $boostdirs
  568. do
  569. if test -f $d/include/boost/shared_ptr.hpp; then
  570. boost_include_path=$d/include
  571. break
  572. fi
  573. done
  574. fi
  575. CPPFLAGS_SAVES="$CPPFLAGS"
  576. if test "${boost_include_path}" ; then
  577. BOOST_INCLUDES="-I${boost_include_path}"
  578. CPPFLAGS="$CPPFLAGS $BOOST_INCLUDES"
  579. fi
  580. 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],,
  581. AC_MSG_ERROR([Missing required header files.]))
  582. CPPFLAGS="$CPPFLAGS_SAVES"
  583. AC_SUBST(BOOST_INCLUDES)
  584. if test "${use_boost_threads}" = "yes" ; then
  585. AC_DEFINE([USE_BOOST_THREADS], [], [Use boost threads])
  586. # Using boost::mutex can result in requiring libboost_thread with older
  587. # versions of Boost. We'd like to avoid relying on a compiled Boost library
  588. # whenever possible, so we need to check for it step by step.
  589. #
  590. # NOTE: another fix of this problem is to simply require newer versions of
  591. # boost. If we choose that solution we should simplify the following tricky
  592. # checks accordingly and all Makefile.am's that refer to NEED_LIBBOOST_THREAD.
  593. AC_MSG_CHECKING(for boost::mutex)
  594. CPPFLAGS_SAVES="$CPPFLAGS"
  595. LIBS_SAVES="$LIBS"
  596. CPPFLAGS="$BOOST_INCLUDES $CPPFLAGS $MULTITHREADING_FLAG"
  597. need_libboost_thread=0
  598. need_sunpro_workaround=0
  599. AC_TRY_LINK([
  600. #include <boost/thread.hpp>
  601. ],[
  602. boost::mutex m;
  603. ],
  604. [ AC_MSG_RESULT(yes (without libboost_thread)) ],
  605. # there is one specific problem with SunStudio 5.10
  606. # where including boost/thread causes a compilation failure
  607. # There is a workaround in boost but it checks the version not being 5.10
  608. # This will probably be fixed in the future, in which case this
  609. # is only a temporary workaround
  610. [ AC_TRY_LINK([
  611. #if defined(__SUNPRO_CC) && __SUNPRO_CC == 0x5100
  612. #undef __SUNPRO_CC
  613. #define __SUNPRO_CC 0x5090
  614. #endif
  615. #include <boost/thread.hpp>
  616. ],[
  617. boost::mutex m;
  618. ],
  619. [ AC_MSG_RESULT(yes (with SUNOS workaround))
  620. need_sunpro_workaround=1 ],
  621. [ LIBS=" $LIBS -lboost_thread"
  622. AC_TRY_LINK([
  623. #include <boost/thread.hpp>
  624. ],[
  625. boost::mutex m;
  626. ],
  627. [ AC_MSG_RESULT(yes (with libboost_thread))
  628. need_libboost_thread=1 ],
  629. [ AC_MSG_RESULT(no)
  630. AC_MSG_ERROR([boost::mutex cannot be linked in this build environment.
  631. Perhaps you are using an older version of Boost that requires libboost_thread for the mutex support, which does not appear to be available.
  632. You may want to check the availability of the library or to upgrade Boost.])
  633. ])])])
  634. CPPFLAGS="$CPPFLAGS_SAVES"
  635. LIBS="$LIBS_SAVES"
  636. AM_CONDITIONAL(NEED_LIBBOOST_THREAD, test $need_libboost_thread = 1)
  637. if test $need_sunpro_workaround = 1; then
  638. AC_DEFINE([NEED_SUNPRO_WORKAROUND], [], [Need boost sunstudio workaround])
  639. fi
  640. else
  641. AM_CONDITIONAL(NEED_LIBBOOST_THREAD, test "${use_boost_threads}" = "yes")
  642. fi
  643. # I can't get some of the #include <asio.hpp> right without this
  644. # TODO: find the real cause of asio/boost wanting pthreads
  645. # (this currently only occurs for src/lib/cc/session_unittests)
  646. PTHREAD_LDFLAGS=
  647. AC_CHECK_LIB(pthread, pthread_create,[ PTHREAD_LDFLAGS=-lpthread ], [])
  648. AC_SUBST(PTHREAD_LDFLAGS)
  649. AC_SUBST(MULTITHREADING_FLAG)
  650. #
  651. # Check availability of gtest, which will be used for unit tests.
  652. #
  653. if test "$gtest_path" != "no"
  654. then
  655. DISTCHECK_GTEST_CONFIGURE_FLAG="--with-gtest=\"$gtest_path\""
  656. if test "$gtest_path" != "yes"; then
  657. GTEST_PATHS=$gtest_path
  658. if test -x "${gtest_path}/bin/gtest-config" ; then
  659. GTEST_CONFIG="${gtest_path}/bin/gtest-config"
  660. fi
  661. else
  662. AC_PATH_PROG([GTEST_CONFIG], [gtest-config])
  663. fi
  664. if test -x "${GTEST_CONFIG}" ; then :
  665. # using cppflags instead of cxxflags
  666. GTEST_INCLUDES=`${GTEST_CONFIG} --cppflags`
  667. GTEST_LDFLAGS=`${GTEST_CONFIG} --ldflags`
  668. GTEST_LDADD=`${GTEST_CONFIG} --libs`
  669. GTEST_FOUND="true"
  670. else
  671. AC_MSG_WARN([Unable to locate Google Test gtest-config.])
  672. if test -z "${GTEST_PATHS}" ; then
  673. GTEST_PATHS="/usr /usr/local"
  674. fi
  675. GTEST_FOUND="false"
  676. fi
  677. if test "${GTEST_FOUND}" != "true"; then
  678. GTEST_FOUND="false"
  679. for dir in $GTEST_PATHS; do
  680. if test -f "$dir/include/gtest/gtest.h"; then
  681. GTEST_INCLUDES="-I$dir/include"
  682. GTEST_LDFLAGS="-L$dir/lib"
  683. GTEST_LDADD="-lgtest"
  684. GTEST_FOUND="true"
  685. # There is no gtest-config script on this
  686. # system, which is supposed to inform us
  687. # whether we need pthreads as well (a
  688. # gtest compile-time option). So we still
  689. # need to test that manually.
  690. CPPFLAGS_SAVED="$CPPFLAGS"
  691. CPPFLAGS="$CPPFLAGS $GTEST_INCLUDES"
  692. LDFLAGS_SAVED="$LDFLAGS"
  693. LDFLAGS="$LDFLAGS $GTEST_LDFLAGS"
  694. LIBS_SAVED=$LIBS
  695. LIBS="$LIBS $GTEST_LDADD"
  696. AC_MSG_CHECKING([Checking whether gtest tests need pthreads])
  697. # First try to compile without pthreads
  698. AC_TRY_LINK([
  699. #include <gtest/gtest.h>
  700. ],[
  701. int i = 0;
  702. char* c = NULL;
  703. ::testing::InitGoogleTest(&i, &c);
  704. return (0);
  705. ],
  706. [ AC_MSG_RESULT(no) ],
  707. [
  708. LIBS="$SAVED_LIBS $GTEST_LDADD $PTHREAD_LDFLAGS"
  709. # Now try to compile with pthreads
  710. AC_TRY_LINK([
  711. #include <gtest/gtest.h>
  712. ],[
  713. int i = 0;
  714. char* c = NULL;
  715. ::testing::InitGoogleTest(&i, &c);
  716. return (0);
  717. ],
  718. [ AC_MSG_RESULT(yes)
  719. GTEST_LDADD="$GTEST_LDADD $PTHREAD_LDFLAGS"
  720. ],
  721. # Apparently we can't compile it at all
  722. [ AC_MSG_ERROR(unable to compile with gtest) ])
  723. ])
  724. CPPFLAGS=$CPPFLAGS_SAVED
  725. LDFLAGS=$LDFLAGS_SAVED
  726. LIBS=$LIBS_SAVED
  727. break
  728. fi
  729. done
  730. fi
  731. if test "${GTEST_FOUND}" != "true"; then
  732. AC_MSG_ERROR([Cannot find gtest in: $GTEST_PATHS])
  733. fi
  734. else
  735. GTEST_INCLUDES=
  736. GTEST_LDFLAGS=
  737. GTEST_LDADD=
  738. DISTCHECK_GTEST_CONFIGURE_FLAG=
  739. fi
  740. AM_CONDITIONAL(HAVE_GTEST, test $gtest_path != "no")
  741. AC_SUBST(DISTCHECK_GTEST_CONFIGURE_FLAG)
  742. AC_SUBST(GTEST_INCLUDES)
  743. AC_SUBST(GTEST_LDFLAGS)
  744. AC_SUBST(GTEST_LDADD)
  745. dnl check for pkg-config itself so we don't try the m4 macro without pkg-config
  746. AC_CHECK_PROG(HAVE_PKG_CONFIG, pkg-config, yes, no)
  747. if test "x$HAVE_PKG_CONFIG" = "xno" ; then
  748. AC_MSG_ERROR(Please install pkg-config)
  749. fi
  750. PKG_CHECK_MODULES(SQLITE, sqlite3 >= 3.3.9, enable_features="$enable_features SQLite3")
  751. #
  752. # ASIO: we extensively use it as the C++ event management module.
  753. #
  754. # Use local ASIO headers from ext
  755. #
  756. CPPFLAGS="$CPPFLAGS -I\$(top_srcdir)/ext/asio"
  757. #
  758. # Use our 'coroutine' header from ext
  759. CPPFLAGS="$CPPFLAGS -I\$(top_srcdir)/ext/coroutine"
  760. #
  761. # Disable threads: Currently we don't use them.
  762. CPPFLAGS="$CPPFLAGS -DASIO_DISABLE_THREADS=1"
  763. #
  764. # kqueue portability: ASIO uses kqueue by default if it's available (it's
  765. # generally available in BSD variants). Unfortunately, some public
  766. # implementation of kqueue forces a conversion from a pointer to an integer,
  767. # which is prohibited in C++ unless reinterpret_cast, C++'s most evil beast
  768. # (and ASIO doesn't use it anyway) is used. This will cause build error for
  769. # some of our C++ files including ASIO header files. The following check
  770. # detects such cases and tells ASIO not to use kqueue if so.
  771. AC_CHECK_FUNC(kqueue, ac_cv_have_kqueue=yes, ac_cv_have_kqueue=no)
  772. if test "X$ac_cv_have_kqueue" = "Xyes"; then
  773. AC_MSG_CHECKING([whether kqueue EV_SET compiles in C++])
  774. AC_TRY_COMPILE([
  775. #include <sys/types.h>
  776. #include <sys/param.h>
  777. #include <sys/event.h>],
  778. [char* udata;
  779. EV_SET(NULL, 0, 0, 0, 0, 0, udata);],
  780. [AC_MSG_RESULT(yes)],
  781. [AC_MSG_RESULT([no, disable kqueue for ASIO])
  782. CPPFLAGS="$CPPFLAGS -DASIO_DISABLE_KQUEUE=1"
  783. ])
  784. fi
  785. # perfdhcp: If the clock_gettime() function does not exist on the system,
  786. # use an alternative supplied in the code based on gettimeofday().
  787. CLOCK_GETTIME_LDFLAGS=
  788. AC_CHECK_LIB([rt], [clock_gettime], [CLOCK_GETTIME_LDFLAGS=-lrt], [])
  789. AC_SUBST([CLOCK_GETTIME_LDFLAGS])
  790. # perfdhcp: if getifaddrs() does not exist, have the code output a message
  791. # that it can't be run on this version of the operating system. For the
  792. # systems on which BIND 10 is built, this means Solaris 10. (Replacements
  793. # for this function are long and involved, and the function is reported present
  794. # on Solaris 11 and later, either in the libsocket or libnsl libraries.)
  795. AC_SEARCH_LIBS([getifaddrs], [socket nsl],
  796. [AC_DEFINE([HAVE_GETIFADDRS], [1], [getifaddrs() present])])
  797. # /dev/poll issue: ASIO uses /dev/poll by default if it's available (generally
  798. # the case with Solaris). Unfortunately its /dev/poll specific code would
  799. # trigger the gcc's "missing-field-initializers" warning, which would
  800. # subsequently make the build fail with -Werror. Further, older versions of
  801. # gcc don't provide an option to selectively suppress this warning.
  802. # So, for the moment, we simply disable the use of /dev/poll. Unless we
  803. # implement recursive DNS server with randomized ports, we don't need the
  804. # scalability that /dev/poll can provide, so this decision wouldn't affect
  805. # run time performance. Hopefully we can find a better solution or the ASIO
  806. # code will be updated by the time we really need it.
  807. AC_CHECK_HEADERS(sys/devpoll.h, ac_cv_have_devpoll=yes, ac_cv_have_devpoll=no)
  808. if test "X$ac_cv_have_devpoll" = "Xyes" -a "X$GXX" = "Xyes"; then
  809. CPPFLAGS="$CPPFLAGS -DASIO_DISABLE_DEV_POLL=1"
  810. fi
  811. #
  812. # Perl is optional; it is used only by some of the system test scripts.
  813. #
  814. AC_PATH_PROGS(PERL, perl5 perl)
  815. AC_SUBST(PERL)
  816. AC_PATH_PROGS(AWK, gawk awk)
  817. AC_SUBST(AWK)
  818. AC_ARG_ENABLE(man, [AC_HELP_STRING([--enable-man],
  819. [regenerate man pages [default=no]])], enable_man=yes, enable_man=no)
  820. AM_CONDITIONAL(ENABLE_MAN, test x$enable_man != xno)
  821. AC_ARG_ENABLE(install-configurations,
  822. [AC_HELP_STRING([--disable-install-configurations],
  823. [do not install configuration])], install_configurations=$enableval, install_configurations=yes)
  824. AM_CONDITIONAL(INSTALL_CONFIGURATIONS, test x$install_configurations = xyes || test x$install_configurations = xtrue)
  825. AC_CONFIG_FILES([Makefile
  826. doc/Makefile
  827. doc/guide/Makefile
  828. compatcheck/Makefile
  829. src/Makefile
  830. src/bin/Makefile
  831. src/bin/bind10/Makefile
  832. src/bin/bind10/tests/Makefile
  833. src/bin/cmdctl/Makefile
  834. src/bin/cmdctl/tests/Makefile
  835. src/bin/bindctl/Makefile
  836. src/bin/bindctl/tests/Makefile
  837. src/bin/cfgmgr/Makefile
  838. src/bin/cfgmgr/plugins/Makefile
  839. src/bin/cfgmgr/plugins/tests/Makefile
  840. src/bin/cfgmgr/tests/Makefile
  841. src/bin/host/Makefile
  842. src/bin/loadzone/Makefile
  843. src/bin/loadzone/tests/correct/Makefile
  844. src/bin/loadzone/tests/error/Makefile
  845. src/bin/msgq/Makefile
  846. src/bin/msgq/tests/Makefile
  847. src/bin/auth/Makefile
  848. src/bin/auth/tests/Makefile
  849. src/bin/auth/benchmarks/Makefile
  850. src/bin/ddns/Makefile
  851. src/bin/ddns/tests/Makefile
  852. src/bin/dhcp6/Makefile
  853. src/bin/dhcp6/tests/Makefile
  854. src/bin/dhcp4/Makefile
  855. src/bin/dhcp4/tests/Makefile
  856. src/bin/resolver/Makefile
  857. src/bin/resolver/tests/Makefile
  858. src/bin/sockcreator/Makefile
  859. src/bin/sockcreator/tests/Makefile
  860. src/bin/xfrin/Makefile
  861. src/bin/xfrin/tests/Makefile
  862. src/bin/xfrin/tests/testdata/Makefile
  863. src/bin/xfrout/Makefile
  864. src/bin/xfrout/tests/Makefile
  865. src/bin/zonemgr/Makefile
  866. src/bin/zonemgr/tests/Makefile
  867. src/bin/stats/Makefile
  868. src/bin/stats/tests/Makefile
  869. src/bin/usermgr/Makefile
  870. src/bin/tests/Makefile
  871. src/lib/Makefile
  872. src/lib/asiolink/Makefile
  873. src/lib/asiolink/tests/Makefile
  874. src/lib/asiodns/Makefile
  875. src/lib/asiodns/tests/Makefile
  876. src/lib/bench/Makefile
  877. src/lib/bench/example/Makefile
  878. src/lib/bench/tests/Makefile
  879. src/lib/cc/Makefile
  880. src/lib/cc/tests/Makefile
  881. src/lib/python/Makefile
  882. src/lib/python/isc/Makefile
  883. src/lib/python/isc/acl/Makefile
  884. src/lib/python/isc/acl/tests/Makefile
  885. src/lib/python/isc/util/Makefile
  886. src/lib/python/isc/util/tests/Makefile
  887. src/lib/python/isc/util/io/Makefile
  888. src/lib/python/isc/util/io/tests/Makefile
  889. src/lib/python/isc/datasrc/Makefile
  890. src/lib/python/isc/datasrc/tests/Makefile
  891. src/lib/python/isc/dns/Makefile
  892. src/lib/python/isc/cc/Makefile
  893. src/lib/python/isc/cc/tests/Makefile
  894. src/lib/python/isc/config/Makefile
  895. src/lib/python/isc/config/tests/Makefile
  896. src/lib/python/isc/log/Makefile
  897. src/lib/python/isc/log/tests/Makefile
  898. src/lib/python/isc/log_messages/Makefile
  899. src/lib/python/isc/log_messages/work/Makefile
  900. src/lib/python/isc/net/Makefile
  901. src/lib/python/isc/net/tests/Makefile
  902. src/lib/python/isc/notify/Makefile
  903. src/lib/python/isc/notify/tests/Makefile
  904. src/lib/python/isc/testutils/Makefile
  905. src/lib/python/isc/bind10/Makefile
  906. src/lib/python/isc/bind10/tests/Makefile
  907. src/lib/python/isc/xfrin/Makefile
  908. src/lib/python/isc/xfrin/tests/Makefile
  909. src/lib/config/Makefile
  910. src/lib/config/tests/Makefile
  911. src/lib/config/tests/testdata/Makefile
  912. src/lib/cryptolink/Makefile
  913. src/lib/cryptolink/tests/Makefile
  914. src/lib/dns/Makefile
  915. src/lib/dns/tests/Makefile
  916. src/lib/dns/tests/testdata/Makefile
  917. src/lib/dns/python/Makefile
  918. src/lib/dns/python/tests/Makefile
  919. src/lib/dns/benchmarks/Makefile
  920. src/lib/dhcp/Makefile
  921. src/lib/dhcp/tests/Makefile
  922. src/lib/exceptions/Makefile
  923. src/lib/exceptions/tests/Makefile
  924. src/lib/datasrc/Makefile
  925. src/lib/datasrc/tests/Makefile
  926. src/lib/datasrc/tests/testdata/Makefile
  927. src/lib/xfr/Makefile
  928. src/lib/xfr/tests/Makefile
  929. src/lib/log/Makefile
  930. src/lib/log/compiler/Makefile
  931. src/lib/log/tests/Makefile
  932. src/lib/resolve/Makefile
  933. src/lib/resolve/tests/Makefile
  934. src/lib/testutils/Makefile
  935. src/lib/testutils/testdata/Makefile
  936. src/lib/nsas/Makefile
  937. src/lib/nsas/tests/Makefile
  938. src/lib/cache/Makefile
  939. src/lib/cache/tests/Makefile
  940. src/lib/server_common/Makefile
  941. src/lib/server_common/tests/Makefile
  942. src/lib/util/Makefile
  943. src/lib/util/io/Makefile
  944. src/lib/util/unittests/Makefile
  945. src/lib/util/python/Makefile
  946. src/lib/util/pyunittests/Makefile
  947. src/lib/util/tests/Makefile
  948. src/lib/acl/Makefile
  949. src/lib/acl/tests/Makefile
  950. src/lib/statistics/Makefile
  951. src/lib/statistics/tests/Makefile
  952. tests/Makefile
  953. tests/system/Makefile
  954. tests/tools/Makefile
  955. tests/tools/badpacket/Makefile
  956. tests/tools/badpacket/tests/Makefile
  957. tests/tools/perfdhcp/Makefile
  958. ])
  959. AC_OUTPUT([doc/version.ent
  960. compatcheck/sqlite3-difftbl-check.py
  961. src/bin/cfgmgr/b10-cfgmgr.py
  962. src/bin/cfgmgr/tests/b10-cfgmgr_test.py
  963. src/bin/cmdctl/cmdctl.py
  964. src/bin/cmdctl/run_b10-cmdctl.sh
  965. src/bin/cmdctl/tests/cmdctl_test
  966. src/bin/cmdctl/cmdctl.spec.pre
  967. src/bin/ddns/ddns.py
  968. src/bin/xfrin/tests/xfrin_test
  969. src/bin/xfrin/xfrin.py
  970. src/bin/xfrin/run_b10-xfrin.sh
  971. src/bin/xfrout/xfrout.py
  972. src/bin/xfrout/xfrout.spec.pre
  973. src/bin/xfrout/tests/xfrout_test
  974. src/bin/xfrout/tests/xfrout_test.py
  975. src/bin/xfrout/run_b10-xfrout.sh
  976. src/bin/resolver/resolver.spec.pre
  977. src/bin/resolver/spec_config.h.pre
  978. src/bin/zonemgr/zonemgr.py
  979. src/bin/zonemgr/zonemgr.spec.pre
  980. src/bin/zonemgr/tests/zonemgr_test
  981. src/bin/zonemgr/run_b10-zonemgr.sh
  982. src/bin/stats/stats.py
  983. src/bin/stats/stats_httpd.py
  984. src/bin/bind10/bind10_src.py
  985. src/bin/bind10/run_bind10.sh
  986. src/bin/bind10/tests/bind10_test.py
  987. src/bin/bindctl/run_bindctl.sh
  988. src/bin/bindctl/bindctl_main.py
  989. src/bin/bindctl/tests/bindctl_test
  990. src/bin/loadzone/run_loadzone.sh
  991. src/bin/loadzone/tests/correct/correct_test.sh
  992. src/bin/loadzone/tests/error/error_test.sh
  993. src/bin/loadzone/b10-loadzone.py
  994. src/bin/usermgr/run_b10-cmdctl-usermgr.sh
  995. src/bin/usermgr/b10-cmdctl-usermgr.py
  996. src/bin/msgq/msgq.py
  997. src/bin/msgq/tests/msgq_test
  998. src/bin/msgq/run_msgq.sh
  999. src/bin/auth/auth.spec.pre
  1000. src/bin/auth/spec_config.h.pre
  1001. src/bin/dhcp4/spec_config.h.pre
  1002. src/bin/dhcp6/spec_config.h.pre
  1003. src/bin/tests/process_rename_test.py
  1004. src/lib/config/tests/data_def_unittests_config.h
  1005. src/lib/python/isc/config/tests/config_test
  1006. src/lib/python/isc/cc/tests/cc_test
  1007. src/lib/python/isc/notify/tests/notify_out_test
  1008. src/lib/python/isc/log/tests/log_console.py
  1009. src/lib/python/isc/log_messages/work/__init__.py
  1010. src/lib/dns/gen-rdatacode.py
  1011. src/lib/python/bind10_config.py
  1012. src/lib/cc/session_config.h.pre
  1013. src/lib/cc/tests/session_unittests_config.h
  1014. src/lib/datasrc/datasrc_config.h.pre
  1015. src/lib/log/tests/console_test.sh
  1016. src/lib/log/tests/destination_test.sh
  1017. src/lib/log/tests/init_logger_test.sh
  1018. src/lib/log/tests/local_file_test.sh
  1019. src/lib/log/tests/severity_test.sh
  1020. src/lib/log/tests/tempdir.h
  1021. src/lib/util/python/mkpywrapper.py
  1022. src/lib/util/python/gen_wiredata.py
  1023. src/lib/server_common/tests/data_path.h
  1024. tests/lettuce/setup_intree_bind10.sh
  1025. tests/system/conf.sh
  1026. tests/system/run.sh
  1027. tests/system/glue/setup.sh
  1028. tests/system/glue/nsx1/b10-config.db
  1029. tests/system/bindctl/nsx1/b10-config.db.template
  1030. tests/system/ixfr/db.example.n0
  1031. tests/system/ixfr/db.example.n2
  1032. tests/system/ixfr/db.example.n2.refresh
  1033. tests/system/ixfr/db.example.n4
  1034. tests/system/ixfr/db.example.n6
  1035. tests/system/ixfr/ixfr_init.sh
  1036. tests/system/ixfr/b10-config.db
  1037. tests/system/ixfr/common_tests.sh
  1038. tests/system/ixfr/in-1/setup.sh
  1039. tests/system/ixfr/in-2/setup.sh
  1040. tests/system/ixfr/in-3/setup.sh
  1041. tests/system/ixfr/in-4/setup.sh
  1042. ], [
  1043. chmod +x compatcheck/sqlite3-difftbl-check.py
  1044. chmod +x src/bin/cmdctl/run_b10-cmdctl.sh
  1045. chmod +x src/bin/xfrin/run_b10-xfrin.sh
  1046. chmod +x src/bin/xfrout/run_b10-xfrout.sh
  1047. chmod +x src/bin/zonemgr/run_b10-zonemgr.sh
  1048. chmod +x src/bin/bind10/run_bind10.sh
  1049. chmod +x src/bin/cmdctl/tests/cmdctl_test
  1050. chmod +x src/bin/xfrin/tests/xfrin_test
  1051. chmod +x src/bin/xfrout/tests/xfrout_test
  1052. chmod +x src/bin/zonemgr/tests/zonemgr_test
  1053. chmod +x src/bin/bindctl/tests/bindctl_test
  1054. chmod +x src/bin/bindctl/run_bindctl.sh
  1055. chmod +x src/bin/loadzone/run_loadzone.sh
  1056. chmod +x src/bin/loadzone/tests/correct/correct_test.sh
  1057. chmod +x src/bin/loadzone/tests/error/error_test.sh
  1058. chmod +x src/bin/usermgr/run_b10-cmdctl-usermgr.sh
  1059. chmod +x src/bin/msgq/run_msgq.sh
  1060. chmod +x src/bin/msgq/tests/msgq_test
  1061. chmod +x src/lib/dns/gen-rdatacode.py
  1062. chmod +x src/lib/log/tests/console_test.sh
  1063. chmod +x src/lib/log/tests/destination_test.sh
  1064. chmod +x src/lib/log/tests/init_logger_test.sh
  1065. chmod +x src/lib/log/tests/local_file_test.sh
  1066. chmod +x src/lib/log/tests/severity_test.sh
  1067. chmod +x src/lib/util/python/mkpywrapper.py
  1068. chmod +x src/lib/util/python/gen_wiredata.py
  1069. chmod +x src/lib/python/isc/log/tests/log_console.py
  1070. chmod +x tests/system/conf.sh
  1071. chmod +x tests/system/run.sh
  1072. chmod +x tests/system/ixfr/ixfr_init.sh
  1073. chmod +x tests/system/ixfr/common_tests.sh
  1074. chmod +x tests/system/ixfr/in-1/setup.sh
  1075. chmod +x tests/system/ixfr/in-2/setup.sh
  1076. chmod +x tests/system/ixfr/in-3/setup.sh
  1077. chmod +x tests/system/ixfr/in-4/setup.sh
  1078. ])
  1079. AC_OUTPUT
  1080. dnl Print the results
  1081. dnl
  1082. cat > config.report << END
  1083. BIND 10 source configure results:
  1084. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  1085. Package:
  1086. Name: $PACKAGE_NAME
  1087. Version: $PACKAGE_VERSION
  1088. C++ Compiler: $CXX
  1089. Flags:
  1090. DEFS: $DEFS
  1091. CPPFLAGS: $CPPFLAGS
  1092. CXXFLAGS: $CXXFLAGS
  1093. LDFLAGS: $LDFLAGS
  1094. B10_CXXFLAGS: $B10_CXXFLAGS
  1095. OS Family: $OS_TYPE
  1096. dnl includes too
  1097. Python: ${PYTHON_INCLUDES}
  1098. ${PYTHON_CXXFLAGS}
  1099. ${PYTHON_LDFLAGS}
  1100. ${PYTHON_LIB}
  1101. Boost: ${BOOST_INCLUDES}
  1102. Botan: ${BOTAN_INCLUDES}
  1103. ${BOTAN_LDFLAGS}
  1104. ${BOTAN_LIBS}
  1105. Log4cplus: ${LOG4CPLUS_INCLUDES}
  1106. ${LOG4CPLUS_LIBS}
  1107. SQLite: $SQLITE_CFLAGS
  1108. $SQLITE_LIBS
  1109. Features:
  1110. $enable_features
  1111. Developer:
  1112. Google Tests: $gtest_path
  1113. C++ Code Coverage: $USE_LCOV
  1114. Python Code Coverage: $USE_PYCOVERAGE
  1115. Generate Manuals: $enable_man
  1116. END
  1117. cat config.report
  1118. cat <<EOF
  1119. Now you can type "make" to build BIND 10
  1120. EOF