configure.ac 42 KB

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