configure.ac 63 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668
  1. # -*- Autoconf -*-
  2. # Process this file with autoconf to produce a configure script.
  3. AC_PREREQ([2.59])
  4. AC_INIT(bind10, 20130529, bind10-dev@isc.org)
  5. AC_CONFIG_SRCDIR(README)
  6. # serial-tests is not available in automake version before 1.13. In
  7. # automake 1.13 and higher, AM_PROG_INSTALL is undefined, so we'll check
  8. # that and conditionally use serial-tests.
  9. AM_INIT_AUTOMAKE(
  10. [foreign]
  11. m4_ifndef([AM_PROG_INSTALL], [serial-tests])
  12. )
  13. m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])dnl be backward compatible
  14. AC_CONFIG_HEADERS([config.h])
  15. AC_CONFIG_MACRO_DIR([m4macros])
  16. # Checks for programs.
  17. AC_PROG_CXX
  18. # Enable low-performing debugging facilities? This option optionally
  19. # enables some debugging aids that perform slowly and hence aren't built
  20. # by default.
  21. AC_ARG_ENABLE([debug],
  22. AS_HELP_STRING([--enable-debug],
  23. [enable debugging (default is no)]),
  24. [case "${enableval}" in
  25. yes) debug_enabled=yes ;;
  26. no) debug_enabled=no ;;
  27. *) AC_MSG_ERROR([bad value ${enableval} for --enable-debug]) ;;
  28. esac],[debug_enabled=no])
  29. AM_CONDITIONAL([DEBUG_ENABLED], [test x$debug_enabled = xyes])
  30. AM_COND_IF([DEBUG_ENABLED], [AC_DEFINE([ENABLE_DEBUG], [1], [Enable low-performing debugging facilities?])])
  31. # Libtool configuration
  32. #
  33. # libtool cannot handle spaces in paths, so exit early if there is one
  34. if [ test `echo $PWD | grep -c ' '` != "0" ]; then
  35. 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.])
  36. fi
  37. # On FreeBSD (and probably some others), clang++ does not meet an autoconf
  38. # assumption in identifying libtool configuration regarding shared library:
  39. # the configure script will execute "$CC -shared $CFLAGS/$CXXFLAGS -v" and
  40. # expect the output contains -Lxxx or -Ryyy. This is the case for g++, but
  41. # not for clang++, and, as a result, it will cause various errors in linking
  42. # programs or running them with a shared object (such as some of our python
  43. # scripts).
  44. # To work around this problem we define a temporary variable
  45. # "CXX_LIBTOOL_LDFLAGS". It's expected to be defined as, e.g, "-L/usr/lib"
  46. # to temporarily fake the output so that it will be compatible with that of
  47. # g++.
  48. CFLAGS_SAVED=$CFLAGS
  49. CXXFLAGS_SAVED=$CXXFLAGS
  50. CFLAGS="$CFLAGS $CXX_LIBTOOL_LDFLAGS"
  51. CXXFLAGS="$CXXFLAGS $CXX_LIBTOOL_LDFLAGS"
  52. AC_PROG_LIBTOOL
  53. CFLAGS=$CFLAGS_SAVED
  54. CXXFLAGS=$CXXFLAGS_SAVED
  55. # Use C++ language
  56. AC_LANG([C++])
  57. # Identify the compiler: this check must be after AC_PROG_CXX and AC_LANG.
  58. AM_CONDITIONAL(USE_GXX, test "X${GXX}" = "Xyes")
  59. AC_CHECK_DECL([__SUNPRO_CC], [SUNCXX="yes"], [SUNCXX="no"])
  60. AC_CHECK_DECL([__clang__], [CLANGPP="yes"], [CLANGPP="no"])
  61. AM_CONDITIONAL(USE_CLANGPP, test "X${CLANGPP}" = "Xyes")
  62. CXX_VERSION="unknown"
  63. dnl Determine if weare using GNU sed
  64. GNU_SED=no
  65. $SED --version 2> /dev/null | grep -q GNU
  66. if test $? -eq 0; then
  67. GNU_SED=yes
  68. fi
  69. # Linker options
  70. # check -R, "-Wl,-R" or -rpath (we share the AX function defined in
  71. # examples/m4)
  72. AX_ISC_RPATH
  73. # Compiler dependent settings: define some mandatory CXXFLAGS here.
  74. # We also use a separate variable B10_CXXFLAGS. This will (and should) be
  75. # used as the default value for each specific AM_CXXFLAGS:
  76. # AM_CXXFLAGS = $(B10_CXXFLAGS)
  77. # AM_CXXFLAGS += ... # add module specific flags
  78. # We need this so that we can disable some specific compiler warnings per
  79. # module basis; since AM_CXXFLAGS are placed before CXXFLAGS, and since
  80. # gcc's -Wno-XXX option must be specified after -Wall or -Wextra, we cannot
  81. # specify the default warning flags in CXXFLAGS and let specific modules
  82. # "override" the default.
  83. # This may be used to try linker flags.
  84. AC_DEFUN([BIND10_CXX_TRY_FLAG], [
  85. AC_MSG_CHECKING([whether $CXX supports $1])
  86. bind10_save_CXXFLAGS="$CXXFLAGS"
  87. CXXFLAGS="$CXXFLAGS $1"
  88. AC_LINK_IFELSE([AC_LANG_SOURCE([int main(void){ return 0;}])],
  89. [bind10_cxx_flag=yes], [bind10_cxx_flag=no])
  90. CXXFLAGS="$bind10_save_CXXFLAGS"
  91. if test "x$bind10_cxx_flag" = "xyes"; then
  92. ifelse([$2], , :, [$2])
  93. else
  94. ifelse([$3], , :, [$3])
  95. fi
  96. AC_MSG_RESULT([$bind10_cxx_flag])
  97. ])
  98. # SunStudio compiler requires special compiler options for boost
  99. # (http://blogs.sun.com/sga/entry/boost_mini_howto)
  100. if test "$SUNCXX" = "yes"; then
  101. CXX_VERSION=`$CXX -V 2> /dev/null | head -1`
  102. CXXFLAGS="$CXXFLAGS -library=stlport4 -features=tmplife -features=tmplrefstatic"
  103. MULTITHREADING_FLAG="-mt"
  104. fi
  105. # Newer versions of clang++ promotes "unused driver arguments" warnings to
  106. # a fatal error with -Werror, causing build failure. Since we use multiple
  107. # compilers on multiple systems, this can easily happen due to settings for
  108. # non clang++ environments that could be just ignored otherwise. It can also
  109. # happen if clang++ is used via ccache. So, although probably suboptimal,
  110. # we suppress this particular warning. Note that it doesn't weaken checks
  111. # on the source code.
  112. if test "$CLANGPP" = "yes"; then
  113. CXX_VERSION=`$CXX --version 2> /dev/null | head -1`
  114. B10_CXXFLAGS="$B10_CXXFLAGS -Qunused-arguments"
  115. fi
  116. BIND10_CXX_TRY_FLAG([-Wno-missing-field-initializers],
  117. [WARNING_NO_MISSING_FIELD_INITIALIZERS_CFLAG="-Wno-missing-field-initializers"])
  118. AC_SUBST(WARNING_NO_MISSING_FIELD_INITIALIZERS_CFLAG)
  119. # gcc specific settings:
  120. if test "X$GXX" = "Xyes"; then
  121. CXX_VERSION=`$CXX --version 2> /dev/null | head -1`
  122. B10_CXXFLAGS="$B10_CXXFLAGS -Wall -Wextra -Wnon-virtual-dtor -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare"
  123. case "$host" in
  124. *-solaris*)
  125. MULTITHREADING_FLAG=-pthreads
  126. # In Solaris, IN6ADDR_ANY_INIT and IN6ADDR_LOOPBACK_INIT need -Wno-missing-braces
  127. B10_CXXFLAGS="$B10_CXXFLAGS -Wno-missing-braces"
  128. ;;
  129. *)
  130. MULTITHREADING_FLAG=-pthread
  131. ;;
  132. esac
  133. # Don't use -Werror if configured not to
  134. AC_ARG_WITH(werror,
  135. AC_HELP_STRING([--with-werror], [Compile using -Werror (default=yes)]),
  136. [
  137. case "${withval}" in
  138. yes) with_werror=1 ;;
  139. no) with_werror=0 ;;
  140. *) AC_MSG_ERROR(bad value ${withval} for --with-werror) ;;
  141. esac],
  142. [with_werror=1])
  143. werror_ok=0
  144. # Certain versions of gcc (g++) have a bug that incorrectly warns about
  145. # the use of anonymous name spaces even if they're closed in a single
  146. # translation unit. For these versions we have to disable -Werror.
  147. if test $with_werror = 1; then
  148. CXXFLAGS_SAVED="$CXXFLAGS"
  149. CXXFLAGS="$CXXFLAGS $B10_CXXFLAGS -Werror"
  150. AC_MSG_CHECKING(for in-TU anonymous namespace breakage)
  151. # We use struct, not class, here, because some compilers complain about
  152. # "unused private members", causing a false positive.
  153. AC_TRY_COMPILE([namespace { struct Foo {}; }
  154. namespace isc {struct Bar {Foo foo_;};} ],,
  155. [AC_MSG_RESULT(no)
  156. werror_ok=1
  157. B10_CXXFLAGS="$B10_CXXFLAGS -Werror"],
  158. [AC_MSG_RESULT(yes)])
  159. CXXFLAGS="$CXXFLAGS_SAVED"
  160. fi
  161. fi dnl GXX = yes
  162. # allow building programs with static link. we need to make it selective
  163. # because loadable modules cannot be statically linked.
  164. AC_ARG_ENABLE([static-link],
  165. AC_HELP_STRING([--enable-static-link],
  166. [build programs with static link [[default=no]]]),
  167. [enable_static_link=yes], [enable_static_link=no])
  168. AM_CONDITIONAL(USE_STATIC_LINK, test $enable_static_link = yes)
  169. # Check validity about some libtool options
  170. if test $enable_static_link = yes -a $enable_static = no; then
  171. AC_MSG_ERROR([--enable-static-link requires --enable-static])
  172. fi
  173. if test $enable_shared = no; then
  174. AC_MSG_ERROR([BIND 10 requires shared libraries to be built])
  175. fi
  176. # allow configuring without setproctitle.
  177. AC_ARG_ENABLE(setproctitle-check,
  178. AC_HELP_STRING([--disable-setproctitle-check],
  179. [do not check for python setproctitle module (used to give nice names to python processes)]),
  180. setproctitle_check=$enableval, setproctitle_check=yes)
  181. # OS dependent configuration
  182. SET_ENV_LIBRARY_PATH=no
  183. ENV_LIBRARY_PATH=LD_LIBRARY_PATH
  184. case "$host" in
  185. *-solaris*)
  186. # Solaris requires special definitions to get some standard libraries
  187. # (e.g. getopt(3)) available with common used header files.
  188. CPPFLAGS="$CPPFLAGS -D_XPG4_2 -D__EXTENSIONS__"
  189. # "now" binding is necessary to prevent deadlocks in C++ static initialization code
  190. LDFLAGS="$LDFLAGS -z now"
  191. # Destroying locked mutexes, condition variables being waited
  192. # on, etc. are undefined behavior on Solaris, so we set it as
  193. # such here.
  194. AC_DEFINE([HAS_UNDEFINED_PTHREAD_BEHAVIOR], [1], [Does this platform have some undefined pthreads behavior?])
  195. ;;
  196. *-apple-darwin*)
  197. # Starting with OSX 10.7 (Lion) we must choose which IPv6 API to use
  198. # (RFC2292 or RFC3542).
  199. CPPFLAGS="$CPPFLAGS -D__APPLE_USE_RFC_3542"
  200. # libtool doesn't work perfectly with Darwin: libtool embeds the
  201. # final install path in dynamic libraries and our loadable python
  202. # modules always refer to that path even if it's loaded within the
  203. # source tree. This prevents pre-install tests from working.
  204. # To work around this problem we explicitly specify paths to dynamic
  205. # libraries when we use them in the source tree.
  206. SET_ENV_LIBRARY_PATH=yes
  207. ENV_LIBRARY_PATH=DYLD_LIBRARY_PATH
  208. ;;
  209. *-freebsd*)
  210. SET_ENV_LIBRARY_PATH=yes
  211. ;;
  212. *-netbsd*)
  213. SET_ENV_LIBRARY_PATH=yes
  214. ;;
  215. *-openbsd*)
  216. SET_ENV_LIBRARY_PATH=yes
  217. ;;
  218. esac
  219. AM_CONDITIONAL(SET_ENV_LIBRARY_PATH, test $SET_ENV_LIBRARY_PATH = yes)
  220. AC_SUBST(SET_ENV_LIBRARY_PATH)
  221. AC_SUBST(ENV_LIBRARY_PATH)
  222. # Our experiments have shown Solaris 10 has broken support for the
  223. # IPV6_USE_MIN_MTU socket option for getsockopt(); it doesn't return the value
  224. # previously set via setsockopt(). We know it doesn't happen on one instance
  225. # on Solaris 11, but we don't know whether it happens for any Solaris 10
  226. # implementations or for earlier versions of Solaris. In any case, at the
  227. # moment this matters for only one unittest case, so we'll simply disable
  228. # the affected test using the following definition with the specific hardcoding
  229. # of that version of Solaris.
  230. case "$host" in
  231. *-solaris2.10)
  232. AC_DEFINE([HAVE_BROKEN_GET_IPV6_USE_MIN_MTU], [1],
  233. [Define to 1 if getsockopt(IPV6_USE_MIN_MTU) does not work])
  234. ;;
  235. esac
  236. m4_define([_AM_PYTHON_INTERPRETER_LIST], [python python3.3 python3.2 python3.1 python3])
  237. AC_ARG_WITH([pythonpath],
  238. AC_HELP_STRING([--with-pythonpath=PATH],
  239. [specify an absolute path to python executable when automatic version check (incorrectly) fails]),
  240. [python_path="$withval"], [python_path="auto"])
  241. if test "$python_path" = auto; then
  242. AM_PATH_PYTHON([3.1])
  243. else
  244. # Older versions of automake can't handle python3 well. This is an
  245. # in-house workaround for them.
  246. PYTHON=$python_path
  247. AC_SUBST(PYTHON)
  248. PYTHON_PREFIX='${prefix}'
  249. AC_SUBST(PYTHON_PREFIX)
  250. PYTHON_EXEC_PREFIX='$(exec_prefix)'
  251. AC_SUBST(PYTHON_EXEC_PREFIX)
  252. PYTHON_VERSION=[`$PYTHON -c "import sys; sys.stdout.write(sys.version[:3])"`]
  253. if test `echo "$PYTHON_VERSION >= 3.1" | bc` != 1 ; then
  254. AC_MSG_ERROR(["Python version too old: $PYTHON_VERSION, need 3.1 or higher"])
  255. fi
  256. AC_SUBST(PYTHON_VERSION)
  257. PYTHON_PLATFORM=`$PYTHON -c "import sys; print(sys.platform)"`
  258. AC_SUBST(PYTHON_PLATFORM)
  259. pythondir='${prefix}/lib/python'$PYTHON_VERSION'/site-packages'
  260. AC_SUBST(pythondir)
  261. pkgpythondir='${pythondir}/'$PACKAGE
  262. AC_SUBST(pkgpythondir)
  263. pyexecdir='${exec_prefix}/lib/python'$PYTHON_VERSION'/site-packages'
  264. AC_SUBST(pyexecdir)
  265. pkgpyexecdir='${pyexecdir}/'$PACKAGE
  266. AC_SUBST(pkgpyexecdir)
  267. fi
  268. # We need to store the default pyexecdir in a separate variable so that
  269. # we can specify in Makefile.am the install directory of various BIND 10
  270. # python scripts and loadable modules; in Makefile.am we cannot replace
  271. # $(pyexecdir) using itself, e.g, this doesn't work:
  272. # pyexecdir = $(pyexecdir)/isc/some_module
  273. # The separate variable makes this setup possible as follows:
  274. # pyexecdir = $(PYTHON_SITEPKG_DIR)/isc/some_module
  275. PYTHON_SITEPKG_DIR=${pyexecdir}
  276. AC_SUBST(PYTHON_SITEPKG_DIR)
  277. # This will be commonly used in various Makefile.am's that need to generate
  278. # python log messages.
  279. PYTHON_LOGMSGPKG_DIR="\$(top_builddir)/src/lib/python/isc/log_messages"
  280. AC_SUBST(PYTHON_LOGMSGPKG_DIR)
  281. # This is python package paths commonly used in python tests. See
  282. # README of log_messages for why it's included.
  283. # lib/dns/python/.libs is necessary because __init__.py of isc package
  284. # automatically imports isc.datasrc, which then requires the DNS loadable
  285. # module. #2145 should eliminate the need for it.
  286. COMMON_PYTHON_PATH="\$(abs_top_builddir)/src/lib/python/isc/log_messages:\$(abs_top_builddir)/src/lib/python/isc/cc:\$(abs_top_srcdir)/src/lib/python:\$(abs_top_builddir)/src/lib/python:\$(abs_top_builddir)/src/lib/dns/python/.libs"
  287. AC_SUBST(COMMON_PYTHON_PATH)
  288. # Check for python development environments
  289. if test -x ${PYTHON}-config; then
  290. PYTHON_INCLUDES=`${PYTHON}-config --includes`
  291. # Add any '-L..." flags to PYTHON_LDFLAGS. We first make a copy of
  292. # python-config --ldflags, removing any spaces and tabs
  293. # between "-L" and its argument (some instances of python-config
  294. # insert a space, which would confuse the code below).
  295. # Notes: if -L isn't contained at all we can simply skip this process,
  296. # so we only go through the flag if it's contained; also, protecting
  297. # the output with [] seems necessary for environment to avoid getting
  298. # an empty output accidentally.
  299. python_config_ldflags=[`${PYTHON}-config --ldflags | ${SED} -ne 's/\([ \t]*-L\)[ ]*\([^ \t]*[ \t]*\)/\1\2/gp'`]
  300. for flag in $python_config_ldflags; do
  301. flag=`echo $flag | ${SED} -ne 's/^\(\-L.*\)$/\1/p'`
  302. if test "X${flag}" != X; then
  303. PYTHON_LDFLAGS="$PYTHON_LDFLAGS ${flag}"
  304. fi
  305. done
  306. # on some platforms, ${PYTHON}-config --ldflags doesn't provide a -L
  307. # option while having the library under a non trivial directory.
  308. # as a workaround we try the "lib" sub directory under the common
  309. # prefix for this python.
  310. if test -z "${PYTHON_LDFLAGS}"; then
  311. PYTHON_LDFLAGS="-L`${PYTHON}-config --prefix`/lib"
  312. fi
  313. else
  314. if test "X$PYTHON_INCLUDES" = X -o "X$PYTHON_LDFLAGS" = X; then
  315. 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.])
  316. fi
  317. fi
  318. # Some OSes including NetBSD don't install libpython.so in a well known path.
  319. # To avoid requiring dynamic library path with our python wrapper loadable
  320. # modules, we embed the path to the modules when possible. We do this even
  321. # when the path is known in the common operational environment (e.g. when
  322. # it's stored in a common "hint" file) for simplicity.
  323. if test "x$ISC_RPATH_FLAG" != "x"; then
  324. python_rpath=
  325. for flag in ${PYTHON_LDFLAGS}; do
  326. python_rpath="${python_rpath} `echo $flag | ${SED} -ne "s/^\(\-L\)/${ISC_RPATH_FLAG}/p"`"
  327. done
  328. PYTHON_LDFLAGS="${PYTHON_LDFLAGS} ${python_rpath}"
  329. fi
  330. AC_SUBST(PYTHON_INCLUDES)
  331. AC_SUBST(PYTHON_LDFLAGS)
  332. CPPFLAGS_SAVED="$CPPFLAGS"
  333. CPPFLAGS="$CPPFLAGS ${PYTHON_INCLUDES}"
  334. AC_CHECK_HEADERS([Python.h],, AC_MSG_ERROR([Missing Python.h]))
  335. CPPFLAGS="$CPPFLAGS_SAVED"
  336. # Check for python library. Needed for Python-wrapper libraries.
  337. LDFLAGS_SAVED="$LDFLAGS"
  338. LDFLAGS="$LDFLAGS $PYTHON_LDFLAGS"
  339. python_bin="python${PYTHON_VERSION}"
  340. AC_CHECK_LIB($python_bin, main, python_lib=$python_bin, python_lib=no)
  341. if test $python_lib != "no"; then
  342. PYTHON_LIB="-l$python_lib"
  343. fi
  344. AC_SUBST(PYTHON_LIB)
  345. LDFLAGS=$LDFLAGS_SAVED
  346. # Check for the setproctitle module
  347. if test "$setproctitle_check" = "yes" ; then
  348. AC_MSG_CHECKING(for setproctitle module)
  349. if "$PYTHON" -c 'import setproctitle' 2>/dev/null ; then
  350. AC_MSG_RESULT(ok)
  351. else
  352. AC_MSG_RESULT(missing)
  353. AC_MSG_WARN([Missing setproctitle python module.
  354. Use --disable-setproctitle-check to skip this check.
  355. In this case we will continue, but naming of python processes will not work.])
  356. fi
  357. fi
  358. # (g++ only check)
  359. # Python 3.2 has an unused parameter in one of its headers. This
  360. # has been reported, but not fixed as of yet, so we check if we need
  361. # to set -Wno-unused-parameter.
  362. if test "X$GXX" = "Xyes" -a $werror_ok = 1; then
  363. CPPFLAGS_SAVED="$CPPFLAGS"
  364. CPPFLAGS=${PYTHON_INCLUDES}
  365. CXXFLAGS_SAVED="$CXXFLAGS"
  366. CXXFLAGS="$CXXFLAGS $B10_CXXFLAGS -Werror"
  367. AC_MSG_CHECKING([whether we need -Wno-unused-parameter for python])
  368. AC_TRY_COMPILE(
  369. [#include <Python.h>],
  370. [],
  371. [AC_MSG_RESULT(no)],
  372. [
  373. CXXFLAGS="$CXXFLAGS -Wno-unused-parameter"
  374. AC_TRY_COMPILE([#include <Python.h>],
  375. [],
  376. [AC_MSG_RESULT(yes)
  377. PYTHON_CXXFLAGS="${PYTHON_CXXFLAGS} -Wno-unused-parameter"
  378. AC_SUBST(PYTHON_CXXFLAGS)
  379. ],
  380. [AC_MSG_ERROR([Can't compile against Python.h. If you're using MacOS X and have installed Python with Homebrew, see http://bind10.isc.org/wiki/SystemNotesMacOSX])]
  381. )
  382. ]
  383. )
  384. CXXFLAGS="$CXXFLAGS_SAVED"
  385. CPPFLAGS="$CPPFLAGS_SAVED"
  386. fi
  387. # produce PIC unless we disable shared libraries. need this for python bindings.
  388. if test $enable_shared != "no" -a "X$GXX" = "Xyes"; then
  389. B10_CXXFLAGS="$B10_CXXFLAGS -fPIC"
  390. fi
  391. AC_SUBST(B10_CXXFLAGS)
  392. # Checks for libraries.
  393. AC_SEARCH_LIBS(inet_pton, [nsl])
  394. AC_SEARCH_LIBS(recvfrom, [socket])
  395. AC_SEARCH_LIBS(nanosleep, [rt])
  396. AC_SEARCH_LIBS(dlsym, [dl])
  397. # Checks for header files.
  398. # Checks for typedefs, structures, and compiler characteristics.
  399. AC_HEADER_STDBOOL
  400. AC_TYPE_SIZE_T
  401. # Detect OS type (it may be used to do OS-specific things, e.g.
  402. # interface detection in DHCP)
  403. AC_MSG_CHECKING(OS family)
  404. system=`uname -s`
  405. case $system in
  406. Linux)
  407. OS_TYPE="Linux"
  408. CPPFLAGS="$CPPFLAGS -DOS_LINUX"
  409. ;;
  410. Darwin | FreeBSD | NetBSD | OpenBSD)
  411. OS_TYPE="BSD"
  412. CPPFLAGS="$CPPFLAGS -DOS_BSD"
  413. ;;
  414. SunOS)
  415. OS_TYPE="Solaris"
  416. CPPFLAGS="$CPPFLAGS -DOS_SUN"
  417. ;;
  418. *)
  419. OS_TYPE="Unknown"
  420. AC_MSG_WARN("Unsupported OS: uname returned $system")
  421. ;;
  422. esac
  423. AC_MSG_RESULT($OS_TYPE)
  424. AM_CONDITIONAL(OS_LINUX, test $OS_TYPE = Linux)
  425. AM_COND_IF([OS_LINUX], [AC_DEFINE([OS_LINUX], [1], [Running on Linux?])])
  426. AM_CONDITIONAL(OS_BSD, test $OS_TYPE = BSD)
  427. AM_COND_IF([OS_BSD], [AC_DEFINE([OS_BSD], [1], [Running on BSD?])])
  428. AM_CONDITIONAL(OS_SOLARIS, test $OS_TYPE = Solaris)
  429. AM_COND_IF([OS_SOLARIS], [AC_DEFINE([OS_SOLARIS], [1], [Running on Solaris?])])
  430. # Deal with variants
  431. AM_CONDITIONAL(OS_FREEBSD, test $system = FreeBSD)
  432. AM_COND_IF([OS_FREEBSD], [AC_DEFINE([OS_FREEBSD], [1], [Running on FreeBSD?])])
  433. AM_CONDITIONAL(OS_NETBSD, test $system = NetBSD)
  434. AM_COND_IF([OS_NETBSD], [AC_DEFINE([OS_NETBSD], [1], [Running on NetBSD?])])
  435. AM_CONDITIONAL(OS_OPENBSD, test $system = OpenBSD)
  436. AM_COND_IF([OS_OPENBSD], [AC_DEFINE([OS_OPENBSD], [1], [Running on OpenBSD?])])
  437. AM_CONDITIONAL(OS_OSX, test $system = Darwin)
  438. AM_COND_IF([OS_OSX], [AC_DEFINE([OS_OSX], [1], [Running on OSX?])])
  439. AC_MSG_CHECKING(for sa_len in struct sockaddr)
  440. AC_TRY_COMPILE([
  441. #include <sys/types.h>
  442. #include <sys/socket.h>],
  443. [struct sockaddr sa; sa.sa_len = 0; return (0);],
  444. [AC_MSG_RESULT(yes)
  445. AC_DEFINE(HAVE_SA_LEN, 1, [Define to 1 if sockaddr has a sa_len member, and corresponding sin_len and sun_len])],
  446. AC_MSG_RESULT(no))
  447. AC_ARG_WITH(pycoverage,
  448. [ --with-pycoverage[=PROGRAM] enable python code coverage using the specified coverage], pycoverage="$withval", pycoverage="no")
  449. if test "$pycoverage" = "no" ; then
  450. # just run the tests normally with python
  451. PYCOVERAGE_RUN="${PYTHON}"
  452. USE_PYCOVERAGE="no"
  453. elif test "$pycoverage" = "yes" ; then
  454. PYCOVERAGE="coverage"
  455. PYCOVERAGE_RUN="${PYCOVERAGE} run --branch --append"
  456. USE_PYCOVERAGE="yes"
  457. else
  458. PYCOVERAGE="$pycoverage"
  459. PYCOVERAGE_RUN="${PYCOVERAGE} run --branch --append"
  460. USE_PYCOVERAGE="yes"
  461. fi
  462. AM_CONDITIONAL(ENABLE_PYTHON_COVERAGE, test x$USE_PYCOVERAGE != xno)
  463. AC_SUBST(PYCOVERAGE)
  464. AC_SUBST(PYCOVERAGE_RUN)
  465. AC_SUBST(USE_PYCOVERAGE)
  466. enable_gtest="no"
  467. GTEST_INCLUDES=
  468. AC_ARG_WITH([gtest-source],
  469. [AS_HELP_STRING([--with-gtest-source=PATH],
  470. [location of the Googletest source, defaults to /usr/src/gtest])],
  471. [enable_gtest="yes" ; GTEST_SOURCE="$withval"],
  472. [GTEST_SOURCE="/usr/src/gtest"])
  473. AC_ARG_WITH([gtest],
  474. [AS_HELP_STRING([--with-gtest=PATH],
  475. [specify a path to gtest header files (PATH/include) and library (PATH/lib)])],
  476. [gtest_path="$withval"; enable_gtest="yes"], [gtest_path="no"])
  477. AC_ARG_WITH(lcov,
  478. [ --with-lcov[=PROGRAM] enable gtest and coverage target using the specified lcov], lcov="$withval", lcov="no")
  479. USE_LCOV="no"
  480. if test "$lcov" != "no"; then
  481. # force gtest if not set
  482. if test "$enable_gtest" = "no"; then
  483. # AC_MSG_ERROR("lcov needs gtest for test coverage report")
  484. AC_MSG_NOTICE([gtest support is now enabled, because used by coverage tests])
  485. enable_gtest="yes"
  486. fi
  487. if test "$lcov" != "yes"; then
  488. LCOV=$lcov
  489. else
  490. AC_PATH_PROG([LCOV], [lcov])
  491. fi
  492. if test -x "${LCOV}"; then
  493. USE_LCOV="yes"
  494. else
  495. AC_MSG_ERROR([Cannot find lcov.])
  496. fi
  497. # is genhtml always in the same directory?
  498. GENHTML=`echo "$LCOV" | ${SED} s/lcov$/genhtml/`
  499. if test ! -x $GENHTML; then
  500. AC_MSG_ERROR([genhtml not found, needed for lcov])
  501. fi
  502. # GCC specific?
  503. CXXFLAGS="$CXXFLAGS -fprofile-arcs -ftest-coverage"
  504. LIBS=" $LIBS -lgcov"
  505. AC_SUBST(CPPFLAGS)
  506. AC_SUBST(LIBS)
  507. AC_SUBST(LCOV)
  508. AC_SUBST(GENHTML)
  509. fi
  510. AC_SUBST(USE_LCOV)
  511. # Simplified, non-caching AC_CHECK_PROG
  512. # Searches $PATH for the existence of argument 2,
  513. # and sets the full path to the variable in argument 1.
  514. # if not found, and a third argument is given, the value
  515. # is set to that. If not, the value is untouched.
  516. # Does not take absolute paths into account at this point,
  517. # and also works for single files only (arguments are not
  518. # stripped like in AC_CHECK_PROG)
  519. AC_DEFUN([ACX_CHECK_PROG_NONCACHE], [
  520. RESULT=""
  521. IFS_SAVED="$IFS"
  522. IFS=${PATH_SEPARATOR}
  523. for cur_path in ${PATH} ; do
  524. if test -e "${cur_path}/$2" ; then
  525. RESULT="${cur_path}/$2"
  526. fi
  527. done
  528. if test "$RESULT" = "" ; then
  529. :
  530. m4_ifvaln([$3], [$1=$3])
  531. else
  532. $1=$RESULT
  533. fi
  534. IFS="$IFS_SAVED"
  535. ])
  536. # Botan helper test function
  537. # Tries to compile a botan program, given the output of the given
  538. # config tool
  539. # Arguments:
  540. # - name of tool (checked for path), must support --libs and --cflags
  541. # - fixed argument(s) for tool
  542. # - action if successful
  543. AC_DEFUN([ACX_TRY_BOTAN_TOOL], [
  544. TOOL=$1
  545. TOOL_ARG=$2
  546. BOTAN_TOOL=""
  547. ACX_CHECK_PROG_NONCACHE([BOTAN_TOOL], [${TOOL}])
  548. AC_MSG_CHECKING([usability of ${TOOL} ${TOOL_ARG}])
  549. if test "$BOTAN_TOOL" != "" ; then
  550. if test -x ${BOTAN_TOOL}; then
  551. BOTAN_LIBS=`$BOTAN_TOOL $TOOL_ARG --libs`
  552. LIBS_SAVED=${LIBS}
  553. LIBS="$LIBS $BOTAN_LIBS"
  554. BOTAN_INCLUDES=`$BOTAN_TOOL $TOOL_ARG --cflags`
  555. CPPFLAGS_SAVED=${CPPFLAGS}
  556. CPPFLAGS="$BOTAN_INCLUDES $CPPFLAGS"
  557. #AC_MSG_RESULT([found])
  558. AC_LINK_IFELSE(
  559. [AC_LANG_PROGRAM([#include <botan/botan.h>
  560. #include <botan/hash.h>
  561. ],
  562. [using namespace Botan;
  563. LibraryInitializer::initialize();
  564. HashFunction *h = get_hash("MD5");
  565. ])],
  566. [ AC_MSG_RESULT([ok])
  567. $3
  568. ],
  569. [ AC_MSG_RESULT([not usable]) ]
  570. )
  571. LIBS=${LIBS_SAVED}
  572. CPPFLAGS=${CPPFLAGS_SAVED}
  573. else
  574. AC_MSG_RESULT([not executable])
  575. fi
  576. else
  577. AC_MSG_RESULT([not found])
  578. fi
  579. BOTAN_TOOL=""
  580. AC_SUBST(BOTAN_TOOL)
  581. ]
  582. )
  583. # Check for Botan
  584. #
  585. # Unless --with-botan-config is given, we first try to find these config
  586. # scripts ourselves. Unfortunately, on some systems, these scripts do not
  587. # provide the correct implementation, so for each script found, we try
  588. # a compilation test (ACX_TRY_BOTAN_TOOL). If none are found, or none of
  589. # them work, we see if pkg-config is available. If so, we try the several
  590. # potential pkg-config .pc files. Again, on some systems, these can return
  591. # incorrect information as well, so the try-compile test is repeated for
  592. # each.
  593. #
  594. # If a working config script or pkgconfig file is found, we then munge its
  595. # output for use in our Makefiles, and to make sure it works, another header
  596. # and compilation test is done (this should also check whether we can compile
  597. # against botan should neither -config scripts nor pkgconfig data exist).
  598. #
  599. botan_config="yes"
  600. AC_ARG_WITH([botan-config],
  601. AC_HELP_STRING([--with-botan-config=PATH],
  602. [specify the path to the botan-config script]),
  603. [botan_config="$withval"])
  604. if test "${botan_config}" = "no" ; then
  605. AC_MSG_ERROR([Need botan for libcryptolink])
  606. fi
  607. if test "${botan_config}" != "yes" ; then
  608. if test -x "${botan_config}" ; then
  609. if test -d "${botan_config}" ; then
  610. AC_MSG_ERROR([${botan_config} is a directory])
  611. else
  612. BOTAN_CONFIG="${botan_config}"
  613. fi
  614. else
  615. AC_MSG_ERROR([--with-botan-config should point to a botan-config program and not a directory (${botan_config})])
  616. fi
  617. else
  618. BOTAN_CONFIG=""
  619. # first try several possible names of the config script
  620. # (botan-config-1.8 is there just in case, the official name change
  621. # came later)
  622. BOTAN_CONFIG_VERSIONS="botan-config-1.10 botan-config-1.9 botan-config-1.8 botan-config"
  623. for botan_config in $BOTAN_CONFIG_VERSIONS; do
  624. ACX_TRY_BOTAN_TOOL([$botan_config],,
  625. [ BOTAN_CONFIG="$botan_config" ]
  626. )
  627. if test "$BOTAN_CONFIG" != "" ; then
  628. break
  629. fi
  630. done
  631. if test "$BOTAN_CONFIG" = "" ; then
  632. AC_PATH_PROG([PKG_CONFIG], [pkg-config])
  633. if test "$PKG_CONFIG" != "" ; then
  634. # Ok so no script found, see if pkg-config knows of it.
  635. # Unfortunately, the botan.pc files also have their minor version
  636. # in their name, so we need to try them one by one
  637. BOTAN_VERSIONS="botan-1.10 botan-1.9 botan-1.8"
  638. for version in $BOTAN_VERSIONS; do
  639. ACX_TRY_BOTAN_TOOL([pkg-config], ["$version --silence-errors"],
  640. [ BOTAN_CONFIG="$PKG_CONFIG $version" ]
  641. )
  642. if test "$BOTAN_CONFIG" != "" ; then
  643. break
  644. fi
  645. done
  646. fi
  647. fi
  648. fi
  649. if test "x${BOTAN_CONFIG}" != "x"
  650. then
  651. BOTAN_LIBS=`${BOTAN_CONFIG} --libs`
  652. BOTAN_INCLUDES=`${BOTAN_CONFIG} --cflags`
  653. # We expect botan-config --libs to contain -L<path_to_libbotan>, but
  654. # this is not always the case. As a heuristics workaround we add
  655. # -L`botan-config --prefix/lib` in this case (if not present already).
  656. # Same for BOTAN_INCLUDES (but using include instead of lib) below.
  657. if [ ${BOTAN_CONFIG} --prefix >/dev/null 2>&1 ] ; then
  658. echo ${BOTAN_LIBS} | grep -- -L > /dev/null || \
  659. BOTAN_LIBS="-L`${BOTAN_CONFIG} --prefix`/lib ${BOTAN_LIBS}"
  660. echo ${BOTAN_INCLUDES} | grep -- -I > /dev/null || \
  661. BOTAN_INCLUDES="-I`${BOTAN_CONFIG} --prefix`/include ${BOTAN_INCLUDES}"
  662. fi
  663. fi
  664. dnl Determine the Botan version
  665. AC_MSG_CHECKING([Botan version])
  666. cat > conftest.cpp << EOF
  667. #include <botan/version.h>
  668. AUTOCONF_BOTAN_VERSION=BOTAN_VERSION_MAJOR . BOTAN_VERSION_MINOR . BOTAN_VERSION_PATCH
  669. EOF
  670. BOTAN_VERSION=`$CPP $CPPFLAGS $BOTAN_INCLUDES conftest.cpp | grep '^AUTOCONF_BOTAN_VERSION=' | $SED -e 's/^AUTOCONF_BOTAN_VERSION=//' -e 's/[[ ]]//g' -e 's/"//g' 2> /dev/null`
  671. if test -z "$BOTAN_VERSION"; then
  672. BOTAN_VERSION="unknown"
  673. fi
  674. $RM -f conftest.cpp
  675. AC_MSG_RESULT([$BOTAN_VERSION])
  676. # botan-config script (and the way we call pkg-config) returns -L and -l
  677. # as one string, but we need them in separate values
  678. BOTAN_LDFLAGS=
  679. BOTAN_NEWLIBS=
  680. for flag in ${BOTAN_LIBS}; do
  681. BOTAN_LDFLAGS="${BOTAN_LDFLAGS} `echo $flag | ${SED} -ne '/^\(\-L\)/p'`"
  682. BOTAN_LIBS="${BOTAN_LIBS} `echo $flag | ${SED} -ne '/^\(\-l\)/p'`"
  683. done
  684. # See python_rpath for some info on why we do this
  685. if test "x$ISC_RPATH_FLAG" != "x"; then
  686. BOTAN_RPATH=
  687. for flag in ${BOTAN_LIBS}; do
  688. BOTAN_RPATH="${BOTAN_RPATH} `echo $flag | ${SED} -ne "s/^\(\-L\)/${ISC_RPATH_FLAG}/p"`"
  689. done
  690. AC_SUBST(BOTAN_RPATH)
  691. # According to the libtool manual, it should be sufficient if we
  692. # specify the "-R libdir" in our wrapper library of botan (no other
  693. # programs will need libbotan directly); "libdir" should be added to
  694. # the program's binary image. But we've seen in our build environments
  695. # that (some versions of?) libtool doesn't propagate -R as documented,
  696. # and it caused a linker error at run time. To work around this, we
  697. # also add the rpath to the global LDFLAGS.
  698. LDFLAGS="$BOTAN_RPATH $LDFLAGS"
  699. fi
  700. AC_SUBST(BOTAN_LDFLAGS)
  701. AC_SUBST(BOTAN_LIBS)
  702. AC_SUBST(BOTAN_INCLUDES)
  703. # Even though chances are high we already performed a real compilation check
  704. # in the search for the right (pkg)config data, we try again here, to
  705. # be sure.
  706. CPPFLAGS_SAVED=$CPPFLAGS
  707. CPPFLAGS="$BOTAN_INCLUDES $CPPFLAGS"
  708. LIBS_SAVED="$LIBS"
  709. LIBS="$LIBS $BOTAN_LIBS"
  710. AC_CHECK_HEADERS([botan/botan.h],,AC_MSG_ERROR([Missing required header files.]))
  711. AC_LINK_IFELSE(
  712. [AC_LANG_PROGRAM([#include <botan/botan.h>
  713. #include <botan/hash.h>
  714. ],
  715. [using namespace Botan;
  716. LibraryInitializer::initialize();
  717. HashFunction *h = get_hash("MD5");
  718. ])],
  719. [AC_MSG_RESULT([checking for Botan library... yes])],
  720. [AC_MSG_RESULT([checking for Botan library... no])
  721. AC_MSG_ERROR([Needs Botan library 1.8 or higher. On some systems,
  722. the botan package has a few missing dependencies (libbz2 and
  723. libgmp), if libbotan has been installed and you see this error,
  724. try upgrading to a higher version of botan or installing libbz2
  725. and libgmp.])]
  726. )
  727. CPPFLAGS=$CPPFLAGS_SAVED
  728. LIBS=$LIBS_SAVED
  729. # Check for MySql. The path to the mysql_config program is given with
  730. # the --with-mysql-config (default to /usr/bin/mysql-config). By default,
  731. # the software is not built with MySQL support enabled.
  732. mysql_config="no"
  733. AC_ARG_WITH([dhcp-mysql],
  734. AC_HELP_STRING([--with-dhcp-mysql=PATH],
  735. [path to the MySQL 'mysql_config' script (MySQL is used for the DHCP database)]),
  736. [mysql_config="$withval"])
  737. if test "${mysql_config}" = "yes" ; then
  738. MYSQL_CONFIG="/usr/bin/mysql_config"
  739. elif test "${mysql_config}" != "no" ; then
  740. MYSQL_CONFIG="${withval}"
  741. fi
  742. if test "$MYSQL_CONFIG" != "" ; then
  743. if test -d "$MYSQL_CONFIG" -o ! -x "$MYSQL_CONFIG" ; then
  744. AC_MSG_ERROR([--with-dhcp-mysql should point to a mysql_config program])
  745. fi
  746. MYSQL_CPPFLAGS=`$MYSQL_CONFIG --cflags`
  747. MYSQL_LIBS=`$MYSQL_CONFIG --libs`
  748. MYSQL_VERSION=`$MYSQL_CONFIG --version`
  749. AC_SUBST(MYSQL_CPPFLAGS)
  750. AC_SUBST(MYSQL_LIBS)
  751. # Check that a simple program using MySQL functions can compile and link.
  752. CPPFLAGS_SAVED="$CPPFLAGS"
  753. LIBS_SAVED="$LIBS"
  754. CPPFLAGS="$MYSQL_CPPFLAGS $CPPFLAGS"
  755. LIBS="$MYSQL_LIBS $LIBS"
  756. AC_LINK_IFELSE(
  757. [AC_LANG_PROGRAM([#include <mysql.h>],
  758. [MYSQL mysql_handle;
  759. (void) mysql_init(&mysql_handle);
  760. ])],
  761. [AC_MSG_RESULT([checking for MySQL headers and library... yes])],
  762. [AC_MSG_RESULT([checking for MySQL headers and library... no])
  763. AC_MSG_ERROR([Needs MySQL library])]
  764. )
  765. CPPFLAGS=$CPPFLAGS_SAVED
  766. LIBS=$LIBS_SAVED
  767. # Note that MYSQL is present in the config.h file
  768. AC_DEFINE([HAVE_MYSQL], [1], [MySQL is present])
  769. fi
  770. # ... and at the shell level, so Makefile.am can take action depending on this.
  771. AM_CONDITIONAL(HAVE_MYSQL, test "$MYSQL_CONFIG" != "")
  772. # Check for log4cplus
  773. log4cplus_path="yes"
  774. AC_ARG_WITH([log4cplus],
  775. AC_HELP_STRING([--with-log4cplus=PATH],
  776. [specify exact directory of log4cplus library and headers]),
  777. [log4cplus_path="$withval"])
  778. if test "${log4cplus_path}" = "no" ; then
  779. AC_MSG_ERROR([Need log4cplus])
  780. elif test "${log4cplus_path}" != "yes" ; then
  781. LOG4CPLUS_INCLUDES="-I${log4cplus_path}/include"
  782. LOG4CPLUS_LIBS="-L${log4cplus_path}/lib"
  783. else
  784. # If not specified, try some common paths.
  785. log4cplusdirs="/usr/local /usr/pkg /opt /opt/local"
  786. for d in $log4cplusdirs
  787. do
  788. if test -f $d/include/log4cplus/logger.h; then
  789. LOG4CPLUS_INCLUDES="-I$d/include"
  790. LOG4CPLUS_LIBS="-L$d/lib"
  791. break
  792. fi
  793. done
  794. fi
  795. LOG4CPLUS_LIBS="$LOG4CPLUS_LIBS -llog4cplus $MULTITHREADING_FLAG"
  796. AC_SUBST(LOG4CPLUS_LIBS)
  797. AC_SUBST(LOG4CPLUS_INCLUDES)
  798. CPPFLAGS_SAVED=$CPPFLAGS
  799. CPPFLAGS="$LOG4CPLUS_INCLUDES $CPPFLAGS"
  800. LIBS_SAVED="$LIBS"
  801. LIBS="$LOG4CPLUS_LIBS $LIBS"
  802. AC_CHECK_HEADERS([log4cplus/logger.h],,AC_MSG_ERROR([Missing required header files.]))
  803. AC_LINK_IFELSE(
  804. [AC_LANG_PROGRAM([#include <log4cplus/logger.h>
  805. ],
  806. [using namespace log4cplus;
  807. Logger logger = Logger::getInstance("main");
  808. ])],
  809. [AC_MSG_RESULT([checking for log4cplus library... yes])],
  810. [AC_MSG_RESULT([checking for log4cplus library... no])
  811. AC_MSG_ERROR([Needs log4cplus library])]
  812. )
  813. dnl Determine the log4cplus version, used mainly for config.report.
  814. AC_MSG_CHECKING([log4cplus version])
  815. cat > conftest.cpp << EOF
  816. #include <log4cplus/version.h>
  817. AUTOCONF_LOG4CPLUS_VERSION=LOG4CPLUS_VERSION_STR
  818. EOF
  819. LOG4CPLUS_VERSION=`$CPP $CPPFLAGS conftest.cpp | grep '^AUTOCONF_LOG4CPLUS_VERSION=' | $SED -e 's/^AUTOCONF_LOG4CPLUS_VERSION=//' -e 's/[[ ]]//g' -e 's/"//g' 2> /dev/null`
  820. if test -z "$LOG4CPLUS_VERSION"; then
  821. LOG4CPLUS_VERSION="unknown"
  822. fi
  823. $RM -f conftest.cpp
  824. AC_MSG_RESULT([$LOG4CPLUS_VERSION])
  825. CPPFLAGS=$CPPFLAGS_SAVED
  826. LIBS=$LIBS_SAVED
  827. #
  828. # Configure Boost header path
  829. #
  830. AX_BOOST_FOR_BIND10
  831. # Boost offset_ptr is required in one library and not optional right now, so
  832. # we unconditionally fail here if it doesn't work.
  833. if test "$BOOST_OFFSET_PTR_WOULDFAIL" = "yes" -a "$werror_ok" = 1; then
  834. AC_MSG_ERROR([Failed to compile a required header file. Try upgrading Boost to 1.44 or higher (when using clang++) or specifying --without-werror. See the ChangeLog entry for Trac no. 2147 for more details.])
  835. fi
  836. if test "$BOOST_STATIC_ASSERT_WOULDFAIL" = "yes" -a X"$werror_ok" = X1; then
  837. AC_MSG_ERROR([Failed to use Boost static assertions. Try upgrading Boost to 1.54 or higher (when using GCC 4.8) or specifying --without-werror. See trac ticket no. 3039 for more details.])
  838. fi
  839. # There's a known bug in FreeBSD ports for Boost that would trigger a false
  840. # warning in build with g++ and -Werror (we exclude clang++ explicitly to
  841. # avoid unexpected false positives).
  842. if test "$BOOST_NUMERIC_CAST_WOULDFAIL" = "yes" -a X"$werror_ok" = X1 -a $CLANGPP = "no"; then
  843. AC_MSG_ERROR([Failed to compile a required header file. If you are using FreeBSD and Boost installed via ports, retry with specifying --without-werror. See the ChangeLog entry for Trac no. 1991 for more details.])
  844. fi
  845. build_experimental_resolver=no
  846. AC_ARG_ENABLE(experimental-resolver,
  847. [AC_HELP_STRING([--enable-experimental-resolver],
  848. [enable building of the experimental resolver [default=no]])],
  849. [build_experimental_resolver=$enableval])
  850. AM_CONDITIONAL([BUILD_EXPERIMENTAL_RESOLVER], [test "$build_experimental_resolver" = "yes"])
  851. if test "$build_experimental_resolver" = "yes"; then
  852. BUILD_EXPERIMENTAL_RESOLVER=yes
  853. else
  854. BUILD_EXPERIMENTAL_RESOLVER=no
  855. fi
  856. AC_SUBST(BUILD_EXPERIMENTAL_RESOLVER)
  857. use_shared_memory=yes
  858. AC_ARG_WITH(shared-memory,
  859. AC_HELP_STRING([--with-shared-memory],
  860. [Build with Boost shared memory support; for large scale authoritative DNS servers]),
  861. [use_shared_memory=$withval])
  862. if test X$use_shared_memory = Xyes -a "$BOOST_MAPPED_FILE_WOULDFAIL" = "yes"; then
  863. AC_MSG_ERROR([Boost shared memory does not compile on this system. If you don't need it (most normal users won't) build without it by rerunning this script with --without-shared-memory; using a different compiler or a different version of Boost may also help.])
  864. fi
  865. AM_CONDITIONAL([USE_SHARED_MEMORY], [test x$use_shared_memory = xyes])
  866. if test "x$use_shared_memory" = "xyes"; then
  867. AC_DEFINE(USE_SHARED_MEMORY, 1, [Define to 1 if shared memory support is enabled])
  868. fi
  869. AC_SUBST(BOOST_MAPPED_FILE_CXXFLAG)
  870. if test "$BOOST_OFFSET_PTR_OLD" = "yes" -a "$use_shared_memory" = "yes" ; then
  871. AC_MSG_ERROR([You're trying to compile against boost older than 1.48 with
  872. shared memory. Older versions of boost have a bug which causes segfaults in
  873. offset_ptr implementation when compiled by GCC with optimisations enabled.
  874. See ticket no. 3025 for details.
  875. Either update boost to newer version or use --without-shared-memory.
  876. Note that most users likely don't need shared memory support.
  877. ])
  878. fi
  879. # Add some default CPP flags needed for Boost, identified by the AX macro.
  880. CPPFLAGS="$CPPFLAGS $CPPFLAGS_BOOST_THREADCONF"
  881. # I can't get some of the #include <asio.hpp> right without this
  882. # TODO: find the real cause of asio/boost wanting pthreads
  883. # (this currently only occurs for src/lib/cc/session_unittests)
  884. PTHREAD_LDFLAGS=
  885. AC_CHECK_LIB(pthread, pthread_create,[ PTHREAD_LDFLAGS=-lpthread ], [])
  886. AC_SUBST(PTHREAD_LDFLAGS)
  887. AC_SUBST(MULTITHREADING_FLAG)
  888. #
  889. # Check availability of gtest, which will be used for unit tests.
  890. #
  891. GTEST_LDFLAGS=
  892. GTEST_LDADD=
  893. DISTCHECK_GTEST_CONFIGURE_FLAG=
  894. GTEST_VERSION="unknown"
  895. if test "x$enable_gtest" = "xyes" ; then
  896. DISTCHECK_GTEST_CONFIGURE_FLAG="--with-gtest=$gtest_path"
  897. if test -n "$with_gtest_source" ; then
  898. if test "x$GTEST_SOURCE" = "xyes" ; then
  899. AC_MSG_CHECKING([for gtest source])
  900. # If not specified, try some common paths.
  901. GTEST_SOURCE=
  902. for d in /usr/src/gtest /usr/local /usr/pkg /opt /opt/local ; do
  903. if test -f $d/src/gtest-all.cc -a $d/src/gtest_main.cc; then
  904. GTEST_SOURCE=$d
  905. AC_MSG_RESULT([$GTEST_SOURCE])
  906. break
  907. fi
  908. done
  909. if test -z $GTEST_SOURCE ; then
  910. AC_MSG_ERROR([no gtest source but it was selected])
  911. fi
  912. else
  913. AC_CHECK_FILES([$GTEST_SOURCE/src/gtest-all.cc]
  914. [$GTEST_SOURCE/src/gtest_main.cc],
  915. [have_gtest_source=yes],
  916. [AC_MSG_ERROR([no gtest source at $GTEST_SOURCE])])
  917. fi
  918. have_gtest_source=yes
  919. GTEST_LDFLAGS="\$(top_builddir)/libgtest.a"
  920. DISTCHECK_GTEST_CONFIGURE_FLAG="--with-gtest-source=$GTEST_SOURCE"
  921. GTEST_INCLUDES="-I$GTEST_SOURCE -I$GTEST_SOURCE/include"
  922. # See $GTEST_SOURCE/include/gtest/internal/gtest-port.h
  923. # about GTEST_HAS_PTHREAD.
  924. case "$host" in
  925. *-solaris*|*-linux*|*-hpux*)
  926. GTEST_LDADD="$GTEST_LDADD $PTHREAD_LDFLAGS"
  927. ;;
  928. esac
  929. fi
  930. if test "$gtest_path" != "no" ; then
  931. if test "$gtest_path" != "yes"; then
  932. GTEST_PATHS=$gtest_path
  933. if test -x "${gtest_path}/bin/gtest-config" ; then
  934. GTEST_CONFIG="${gtest_path}/bin/gtest-config"
  935. fi
  936. else
  937. AC_PATH_PROG([GTEST_CONFIG], [gtest-config])
  938. fi
  939. if test -x "${GTEST_CONFIG}" ; then :
  940. # using cppflags instead of cxxflags
  941. GTEST_INCLUDES=`${GTEST_CONFIG} --cppflags`
  942. GTEST_LDFLAGS=`${GTEST_CONFIG} --ldflags`
  943. GTEST_LDADD=`${GTEST_CONFIG} --libs`
  944. GTEST_VERSION=`${GTEST_CONFIG} --version`
  945. GTEST_FOUND="true"
  946. else
  947. AC_MSG_WARN([Unable to locate Google Test gtest-config.])
  948. if test -z "${GTEST_PATHS}" ; then
  949. GTEST_PATHS="/usr /usr/local"
  950. fi
  951. GTEST_FOUND="false"
  952. fi
  953. if test "${GTEST_FOUND}" != "true"; then
  954. GTEST_FOUND="false"
  955. for dir in $GTEST_PATHS; do
  956. if test -f "$dir/include/gtest/gtest.h"; then
  957. GTEST_INCLUDES="-I$dir/include"
  958. GTEST_LDFLAGS="-L$dir/lib"
  959. GTEST_LDADD="-lgtest"
  960. GTEST_FOUND="true"
  961. # There is no gtest-config script on this
  962. # system, which is supposed to inform us
  963. # whether we need pthreads as well (a
  964. # gtest compile-time option). So we still
  965. # need to test that manually.
  966. CPPFLAGS_SAVED="$CPPFLAGS"
  967. CPPFLAGS="$CPPFLAGS $GTEST_INCLUDES"
  968. LDFLAGS_SAVED="$LDFLAGS"
  969. LDFLAGS="$LDFLAGS $GTEST_LDFLAGS"
  970. LIBS_SAVED=$LIBS
  971. LIBS="$LIBS $GTEST_LDADD"
  972. AC_MSG_CHECKING([Checking whether gtest tests need pthreads])
  973. # First try to compile without pthreads
  974. AC_TRY_LINK([
  975. #include <gtest/gtest.h>
  976. ],[
  977. int i = 0;
  978. char* c = NULL;
  979. ::testing::InitGoogleTest(&i, &c);
  980. return (0);
  981. ],
  982. [ AC_MSG_RESULT(no) ],
  983. [
  984. LIBS="$SAVED_LIBS $GTEST_LDADD $PTHREAD_LDFLAGS"
  985. # Now try to compile with pthreads
  986. AC_TRY_LINK([
  987. #include <gtest/gtest.h>
  988. ],[
  989. int i = 0;
  990. char* c = NULL;
  991. ::testing::InitGoogleTest(&i, &c);
  992. return (0);
  993. ],
  994. [ AC_MSG_RESULT(yes)
  995. GTEST_LDADD="$GTEST_LDADD $PTHREAD_LDFLAGS"
  996. ],
  997. # Apparently we can't compile it at all
  998. [ AC_MSG_ERROR(unable to compile with gtest) ])
  999. ])
  1000. CPPFLAGS=$CPPFLAGS_SAVED
  1001. LDFLAGS=$LDFLAGS_SAVED
  1002. LIBS=$LIBS_SAVED
  1003. break
  1004. fi
  1005. done
  1006. fi
  1007. if test "${GTEST_FOUND}" != "true"; then
  1008. AC_MSG_ERROR([Cannot find gtest in: $GTEST_PATHS])
  1009. fi
  1010. fi
  1011. fi
  1012. AM_CONDITIONAL(HAVE_GTEST, test $enable_gtest != "no")
  1013. AM_CONDITIONAL(HAVE_GTEST_SOURCE, test "X$have_gtest_source" = "Xyes")
  1014. AC_SUBST(DISTCHECK_GTEST_CONFIGURE_FLAG)
  1015. AC_SUBST(GTEST_INCLUDES)
  1016. AC_SUBST(GTEST_LDFLAGS)
  1017. AC_SUBST(GTEST_LDADD)
  1018. AC_SUBST(GTEST_SOURCE)
  1019. dnl check for pkg-config itself
  1020. AC_CHECK_PROG(HAVE_PKG_CONFIG, pkg-config, yes, no)
  1021. if test "x$HAVE_PKG_CONFIG" = "xno" ; then
  1022. AC_MSG_ERROR(Please install pkg-config)
  1023. fi
  1024. AX_SQLITE3_FOR_BIND10
  1025. if test "x$have_sqlite" = "xyes" ; then
  1026. enable_features="$enable_features SQLite3"
  1027. fi
  1028. #
  1029. # ASIO: we extensively use it as the C++ event management module.
  1030. #
  1031. # Use local ASIO headers from ext
  1032. #
  1033. CPPFLAGS="$CPPFLAGS -I\$(top_srcdir)/ext/asio"
  1034. #
  1035. # Use our 'coroutine' header from ext
  1036. CPPFLAGS="$CPPFLAGS -I\$(top_srcdir)/ext/coroutine"
  1037. #
  1038. # Disable threads: Currently we don't use them.
  1039. CPPFLAGS="$CPPFLAGS -DASIO_DISABLE_THREADS=1"
  1040. # Check for functions that are not available on all platforms
  1041. AC_CHECK_FUNCS([pselect])
  1042. # /dev/poll issue: ASIO uses /dev/poll by default if it's available (generally
  1043. # the case with Solaris). Unfortunately its /dev/poll specific code would
  1044. # trigger the gcc's "missing-field-initializers" warning, which would
  1045. # subsequently make the build fail with -Werror. Further, older versions of
  1046. # gcc don't provide an option to selectively suppress this warning.
  1047. # So, for the moment, we simply disable the use of /dev/poll. Unless we
  1048. # implement recursive DNS server with randomized ports, we don't need the
  1049. # scalability that /dev/poll can provide, so this decision wouldn't affect
  1050. # run time performance. Hopefully we can find a better solution or the ASIO
  1051. # code will be updated by the time we really need it.
  1052. AC_CHECK_HEADERS(sys/devpoll.h, ac_cv_have_devpoll=yes, ac_cv_have_devpoll=no)
  1053. if test "X$ac_cv_have_devpoll" = "Xyes" -a "X$GXX" = "Xyes"; then
  1054. CPPFLAGS="$CPPFLAGS -DASIO_DISABLE_DEV_POLL=1"
  1055. fi
  1056. #
  1057. # Perl is optional; it is used only by some of the system test scripts.
  1058. #
  1059. AC_PATH_PROGS(PERL, perl5 perl)
  1060. AC_SUBST(PERL)
  1061. AC_PATH_PROGS(AWK, gawk awk)
  1062. AC_SUBST(AWK)
  1063. AC_ARG_ENABLE(generate_docs, [AC_HELP_STRING([--enable-generate-docs],
  1064. [regenerate documentation using Docbook [default=no]])],
  1065. enable_generate_docs=$enableval, enable_generate_docs=no)
  1066. # Check for xsltproc
  1067. if test "x$enable_generate_docs" != xno ; then
  1068. AC_PATH_PROG([XSLTPROC], [xsltproc])
  1069. if test -z "$XSLTPROC"; then
  1070. AC_MSG_ERROR("xsltproc not found; it is required for --enable-generate-docs")
  1071. else
  1072. AC_MSG_CHECKING([if $XSLTPROC works])
  1073. # run xsltproc to see if works
  1074. $XSLTPROC --novalid --xinclude --nonet http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl
  1075. if test $? -ne 0 ; then
  1076. AC_MSG_ERROR("Error with $XSLTPROC using release/xsl/current/manpages/docbook.xsl")
  1077. fi
  1078. $XSLTPROC --novalid --xinclude --nonet http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl
  1079. if test $? -ne 0 ; then
  1080. AC_MSG_ERROR("Error with $XSLTPROC using release/xsl/current/html/docbook.xsl")
  1081. fi
  1082. AC_MSG_RESULT(yes)
  1083. fi
  1084. AC_PATH_PROG([ELINKS], [elinks])
  1085. if test -z "$ELINKS"; then
  1086. AC_MSG_ERROR("elinks not found; it is required for --enable-generate-docs")
  1087. fi
  1088. fi
  1089. AM_CONDITIONAL(GENERATE_DOCS, test x$enable_generate_docs != xno)
  1090. AC_ARG_ENABLE(install-configurations,
  1091. [AC_HELP_STRING([--disable-install-configurations],
  1092. [do not install configuration])], install_configurations=$enableval, install_configurations=yes)
  1093. AM_CONDITIONAL(INSTALL_CONFIGURATIONS, test x$install_configurations = xyes || test x$install_configurations = xtrue)
  1094. AC_ARG_ENABLE(logger-checks, [AC_HELP_STRING([--enable-logger-checks],
  1095. [check logger messages [default=no]])], enable_logger_checks=$enableval, enable_logger_checks=no)
  1096. AM_CONDITIONAL(ENABLE_LOGGER_CHECKS, test x$enable_logger_checks != xno)
  1097. AM_COND_IF([ENABLE_LOGGER_CHECKS], [AC_DEFINE([ENABLE_LOGGER_CHECKS], [1], [Check logger messages?])])
  1098. # Check for asciidoc
  1099. AC_PATH_PROG(ASCIIDOC, asciidoc, no)
  1100. AM_CONDITIONAL(HAVE_ASCIIDOC, test "x$ASCIIDOC" != "xno")
  1101. # Check for plantuml
  1102. AC_PATH_PROG(PLANTUML, plantuml, no)
  1103. AM_CONDITIONAL(HAVE_PLANTUML, test "x$PLANTUML" != "xno")
  1104. # Check for valgrind
  1105. AC_PATH_PROG(VALGRIND, valgrind, no)
  1106. AM_CONDITIONAL(HAVE_VALGRIND, test "x$VALGRIND" != "xno")
  1107. # Also check for valgrind headers
  1108. # We could consider adding them to the source code tree, as this
  1109. # is the encouraged method of using them; they are BSD-licensed.
  1110. # However, until we find that this is a problem, we just use
  1111. # the system-provided ones, if available
  1112. AC_CHECK_HEADERS(valgrind/valgrind.h, [AC_DEFINE([HAVE_VALGRIND_HEADERS], [1], [Check valgrind headers])])
  1113. found_valgrind="not found"
  1114. if test "x$VALGRIND" != "xno"; then
  1115. found_valgrind="found"
  1116. fi
  1117. # Check for optreset in unistd.h. On BSD systems the optreset is
  1118. # used to reset the state of getopt() function. Resetting its state
  1119. # is required if command line arguments are parsed multiple times
  1120. # during a program. On Linux this variable will not exist because
  1121. # getopt() reset is performed by setting optind = 0. On Operating
  1122. # Systems where optreset is defined use optreset = 1 and optind = 1
  1123. # to reset internal state of getopt(). Failing to do so will result
  1124. # in unpredictable output from getopt().
  1125. AC_MSG_CHECKING([whether optreset variable is defined in unistd.h])
  1126. AC_TRY_LINK(
  1127. [#include <unistd.h>],
  1128. [extern int optreset; optreset=1;],
  1129. [ AC_MSG_RESULT(yes)
  1130. var_optreset_exists=yes],
  1131. [ AC_MSG_RESULT(no)
  1132. var_optreset_exists=no]
  1133. )
  1134. AM_CONDITIONAL(HAVE_OPTRESET, test "x$var_optreset_exists" != "xno")
  1135. AM_COND_IF([HAVE_OPTRESET], [AC_DEFINE([HAVE_OPTRESET], [1], [Check for optreset?])])
  1136. AC_CONFIG_FILES([Makefile
  1137. doc/Makefile
  1138. doc/guide/Makefile
  1139. doc/design/Makefile
  1140. doc/design/datasrc/Makefile
  1141. ext/Makefile
  1142. ext/asio/Makefile
  1143. ext/asio/asio/Makefile
  1144. compatcheck/Makefile
  1145. src/Makefile
  1146. src/bin/Makefile
  1147. src/bin/bind10/bind10
  1148. src/bin/bind10/Makefile
  1149. src/bin/bind10/tests/Makefile
  1150. src/bin/cmdctl/Makefile
  1151. src/bin/cmdctl/tests/Makefile
  1152. src/bin/bindctl/Makefile
  1153. src/bin/bindctl/tests/Makefile
  1154. src/bin/cfgmgr/Makefile
  1155. src/bin/cfgmgr/local_plugins/Makefile
  1156. src/bin/cfgmgr/plugins/Makefile
  1157. src/bin/cfgmgr/plugins/tests/Makefile
  1158. src/bin/cfgmgr/tests/Makefile
  1159. src/bin/dbutil/Makefile
  1160. src/bin/dbutil/tests/Makefile
  1161. src/bin/dbutil/tests/testdata/Makefile
  1162. src/bin/loadzone/Makefile
  1163. src/bin/loadzone/tests/Makefile
  1164. src/bin/loadzone/tests/correct/Makefile
  1165. src/bin/memmgr/Makefile
  1166. src/bin/memmgr/tests/Makefile
  1167. src/bin/msgq/Makefile
  1168. src/bin/msgq/tests/Makefile
  1169. src/bin/auth/Makefile
  1170. src/bin/auth/tests/Makefile
  1171. src/bin/auth/tests/testdata/Makefile
  1172. src/bin/auth/benchmarks/Makefile
  1173. src/bin/ddns/Makefile
  1174. src/bin/ddns/tests/Makefile
  1175. src/bin/dhcp6/Makefile
  1176. src/bin/dhcp6/tests/Makefile
  1177. src/bin/dhcp4/Makefile
  1178. src/bin/dhcp4/tests/Makefile
  1179. src/bin/d2/Makefile
  1180. src/bin/d2/tests/Makefile
  1181. src/bin/resolver/Makefile
  1182. src/bin/resolver/tests/Makefile
  1183. src/bin/resolver/bench/Makefile
  1184. src/bin/sysinfo/Makefile
  1185. src/bin/sockcreator/Makefile
  1186. src/bin/sockcreator/tests/Makefile
  1187. src/bin/xfrin/Makefile
  1188. src/bin/xfrin/tests/Makefile
  1189. src/bin/xfrin/tests/testdata/Makefile
  1190. src/bin/xfrout/Makefile
  1191. src/bin/xfrout/tests/Makefile
  1192. src/bin/zonemgr/Makefile
  1193. src/bin/zonemgr/tests/Makefile
  1194. src/bin/stats/Makefile
  1195. src/bin/stats/tests/Makefile
  1196. src/bin/stats/tests/testdata/Makefile
  1197. src/bin/usermgr/Makefile
  1198. src/bin/usermgr/tests/Makefile
  1199. src/bin/tests/Makefile
  1200. src/lib/Makefile
  1201. src/lib/asiolink/Makefile
  1202. src/lib/asiolink/tests/Makefile
  1203. src/lib/asiodns/Makefile
  1204. src/lib/asiodns/tests/Makefile
  1205. src/lib/bench/Makefile
  1206. src/lib/bench/example/Makefile
  1207. src/lib/bench/tests/Makefile
  1208. src/lib/cc/Makefile
  1209. src/lib/cc/tests/Makefile
  1210. src/lib/python/Makefile
  1211. src/lib/python/isc/Makefile
  1212. src/lib/python/isc/acl/Makefile
  1213. src/lib/python/isc/acl/tests/Makefile
  1214. src/lib/python/isc/util/Makefile
  1215. src/lib/python/isc/util/tests/Makefile
  1216. src/lib/python/isc/util/cio/Makefile
  1217. src/lib/python/isc/util/cio/tests/Makefile
  1218. src/lib/python/isc/datasrc/Makefile
  1219. src/lib/python/isc/datasrc/tests/Makefile
  1220. src/lib/python/isc/datasrc/tests/testdata/Makefile
  1221. src/lib/python/isc/dns/Makefile
  1222. src/lib/python/isc/cc/Makefile
  1223. src/lib/python/isc/cc/cc_generated/Makefile
  1224. src/lib/python/isc/cc/tests/Makefile
  1225. src/lib/python/isc/config/Makefile
  1226. src/lib/python/isc/config/tests/Makefile
  1227. src/lib/python/isc/log/Makefile
  1228. src/lib/python/isc/log/tests/Makefile
  1229. src/lib/python/isc/log_messages/Makefile
  1230. src/lib/python/isc/log_messages/work/Makefile
  1231. src/lib/python/isc/net/Makefile
  1232. src/lib/python/isc/net/tests/Makefile
  1233. src/lib/python/isc/notify/Makefile
  1234. src/lib/python/isc/notify/tests/Makefile
  1235. src/lib/python/isc/testutils/Makefile
  1236. src/lib/python/isc/bind10/Makefile
  1237. src/lib/python/isc/bind10/tests/Makefile
  1238. src/lib/python/isc/ddns/Makefile
  1239. src/lib/python/isc/ddns/tests/Makefile
  1240. src/lib/python/isc/memmgr/Makefile
  1241. src/lib/python/isc/memmgr/tests/Makefile
  1242. src/lib/python/isc/memmgr/tests/testdata/Makefile
  1243. src/lib/python/isc/xfrin/Makefile
  1244. src/lib/python/isc/xfrin/tests/Makefile
  1245. src/lib/python/isc/server_common/Makefile
  1246. src/lib/python/isc/server_common/tests/Makefile
  1247. src/lib/python/isc/sysinfo/Makefile
  1248. src/lib/python/isc/sysinfo/tests/Makefile
  1249. src/lib/python/isc/statistics/Makefile
  1250. src/lib/python/isc/statistics/tests/Makefile
  1251. src/lib/config/Makefile
  1252. src/lib/config/tests/Makefile
  1253. src/lib/config/tests/testdata/Makefile
  1254. src/lib/cryptolink/Makefile
  1255. src/lib/cryptolink/tests/Makefile
  1256. src/lib/dns/Makefile
  1257. src/lib/dns/tests/Makefile
  1258. src/lib/dns/tests/testdata/Makefile
  1259. src/lib/dns/python/Makefile
  1260. src/lib/dns/python/tests/Makefile
  1261. src/lib/dns/benchmarks/Makefile
  1262. src/lib/dhcp/Makefile
  1263. src/lib/dhcp/tests/Makefile
  1264. src/lib/dhcp_ddns/Makefile
  1265. src/lib/dhcp_ddns/tests/Makefile
  1266. src/lib/dhcpsrv/Makefile
  1267. src/lib/dhcpsrv/tests/Makefile
  1268. src/lib/exceptions/Makefile
  1269. src/lib/exceptions/tests/Makefile
  1270. src/lib/datasrc/Makefile
  1271. src/lib/datasrc/memory/Makefile
  1272. src/lib/datasrc/memory/benchmarks/Makefile
  1273. src/lib/datasrc/tests/Makefile
  1274. src/lib/datasrc/tests/testdata/Makefile
  1275. src/lib/datasrc/tests/memory/Makefile
  1276. src/lib/datasrc/tests/memory/testdata/Makefile
  1277. src/lib/xfr/Makefile
  1278. src/lib/xfr/tests/Makefile
  1279. src/lib/hooks/Makefile
  1280. src/lib/hooks/tests/Makefile
  1281. src/lib/log/Makefile
  1282. src/lib/log/interprocess/Makefile
  1283. src/lib/log/interprocess/tests/Makefile
  1284. src/lib/log/compiler/Makefile
  1285. src/lib/log/tests/Makefile
  1286. src/lib/resolve/Makefile
  1287. src/lib/resolve/tests/Makefile
  1288. src/lib/testutils/Makefile
  1289. src/lib/testutils/testdata/Makefile
  1290. src/lib/nsas/Makefile
  1291. src/lib/nsas/tests/Makefile
  1292. src/lib/cache/Makefile
  1293. src/lib/cache/tests/Makefile
  1294. src/lib/server_common/Makefile
  1295. src/lib/server_common/tests/Makefile
  1296. src/lib/util/Makefile
  1297. src/lib/util/io/Makefile
  1298. src/lib/util/threads/Makefile
  1299. src/lib/util/threads/tests/Makefile
  1300. src/lib/util/unittests/Makefile
  1301. src/lib/util/python/Makefile
  1302. src/lib/util/pyunittests/Makefile
  1303. src/lib/util/tests/Makefile
  1304. src/lib/acl/Makefile
  1305. src/lib/acl/tests/Makefile
  1306. src/lib/statistics/Makefile
  1307. src/lib/statistics/tests/Makefile
  1308. tests/Makefile
  1309. tests/tools/Makefile
  1310. tests/tools/badpacket/Makefile
  1311. tests/tools/badpacket/tests/Makefile
  1312. tests/tools/perfdhcp/Makefile
  1313. tests/tools/perfdhcp/tests/Makefile
  1314. tests/tools/perfdhcp/tests/testdata/Makefile
  1315. tests/lettuce/Makefile
  1316. m4macros/Makefile
  1317. dns++.pc
  1318. ])
  1319. AC_OUTPUT([doc/version.ent
  1320. src/bin/cfgmgr/b10-cfgmgr.py
  1321. src/bin/cfgmgr/tests/b10-cfgmgr_test.py
  1322. src/bin/cfgmgr/plugins/datasrc.spec.pre
  1323. src/bin/cmdctl/cmdctl.py
  1324. src/bin/cmdctl/run_b10-cmdctl.sh
  1325. src/bin/cmdctl/tests/cmdctl_test
  1326. src/bin/cmdctl/cmdctl.spec.pre
  1327. src/bin/dbutil/dbutil.py
  1328. src/bin/dbutil/run_dbutil.sh
  1329. src/bin/dbutil/tests/dbutil_test.sh
  1330. src/bin/ddns/ddns.py
  1331. src/bin/dhcp4/tests/marker_file.h
  1332. src/bin/dhcp4/tests/test_libraries.h
  1333. src/bin/dhcp6/tests/marker_file.h
  1334. src/bin/dhcp6/tests/test_libraries.h
  1335. src/bin/xfrin/tests/xfrin_test
  1336. src/bin/xfrin/xfrin.py
  1337. src/bin/xfrin/run_b10-xfrin.sh
  1338. src/bin/xfrout/xfrout.py
  1339. src/bin/xfrout/xfrout.spec.pre
  1340. src/bin/xfrout/tests/xfrout_test
  1341. src/bin/xfrout/tests/xfrout_test.py
  1342. src/bin/xfrout/run_b10-xfrout.sh
  1343. src/bin/resolver/resolver.spec.pre
  1344. src/bin/resolver/spec_config.h.pre
  1345. src/bin/zonemgr/zonemgr.py
  1346. src/bin/zonemgr/zonemgr.spec.pre
  1347. src/bin/zonemgr/tests/zonemgr_test
  1348. src/bin/zonemgr/run_b10-zonemgr.sh
  1349. src/bin/sysinfo/sysinfo.py
  1350. src/bin/sysinfo/run_sysinfo.sh
  1351. src/bin/stats/stats.py
  1352. src/bin/stats/stats_httpd.py
  1353. src/bin/bind10/init.py
  1354. src/bin/bind10/run_bind10.sh
  1355. src/bin/bind10/tests/init_test.py
  1356. src/bin/bindctl/run_bindctl.sh
  1357. src/bin/bindctl/bindctl_main.py
  1358. src/bin/bindctl/tests/bindctl_test
  1359. src/bin/loadzone/run_loadzone.sh
  1360. src/bin/loadzone/tests/correct/correct_test.sh
  1361. src/bin/loadzone/loadzone.py
  1362. src/bin/usermgr/run_b10-cmdctl-usermgr.sh
  1363. src/bin/usermgr/b10-cmdctl-usermgr.py
  1364. src/bin/memmgr/memmgr.py
  1365. src/bin/memmgr/memmgr.spec.pre
  1366. src/bin/msgq/msgq.py
  1367. src/bin/msgq/run_msgq.sh
  1368. src/bin/auth/auth.spec.pre
  1369. src/bin/auth/spec_config.h.pre
  1370. src/bin/auth/tests/testdata/example.zone
  1371. src/bin/auth/tests/testdata/example-base.zone
  1372. src/bin/auth/tests/testdata/example-nsec3.zone
  1373. src/bin/auth/gen-statisticsitems.py.pre
  1374. src/bin/dhcp4/spec_config.h.pre
  1375. src/bin/dhcp6/spec_config.h.pre
  1376. src/bin/d2/spec_config.h.pre
  1377. src/bin/d2/tests/test_data_files_config.h
  1378. src/bin/tests/process_rename_test.py
  1379. src/lib/config/tests/data_def_unittests_config.h
  1380. src/lib/dhcpsrv/tests/test_libraries.h
  1381. src/lib/python/isc/config/tests/config_test
  1382. src/lib/python/isc/cc/tests/cc_test
  1383. src/lib/python/isc/notify/tests/notify_out_test
  1384. src/lib/python/isc/log/tests/log_console.py
  1385. src/lib/python/isc/log_messages/work/__init__.py
  1386. src/lib/dns/gen-rdatacode.py
  1387. src/lib/python/bind10_config.py
  1388. src/lib/cc/session_config.h.pre
  1389. src/lib/cc/tests/session_unittests_config.h
  1390. src/lib/datasrc/datasrc_config.h.pre
  1391. src/lib/hooks/tests/marker_file.h
  1392. src/lib/hooks/tests/test_libraries.h
  1393. src/lib/log/tests/console_test.sh
  1394. src/lib/log/tests/destination_test.sh
  1395. src/lib/log/tests/init_logger_test.sh
  1396. src/lib/log/tests/buffer_logger_test.sh
  1397. src/lib/log/tests/local_file_test.sh
  1398. src/lib/log/tests/logger_lock_test.sh
  1399. src/lib/log/tests/severity_test.sh
  1400. src/lib/log/tests/tempdir.h
  1401. src/lib/util/python/doxygen2pydoc.py
  1402. src/lib/util/python/mkpywrapper.py
  1403. src/lib/util/python/gen_wiredata.py
  1404. src/lib/server_common/tests/data_path.h
  1405. tests/lettuce/setup_intree_bind10.sh
  1406. ], [
  1407. chmod +x src/bin/cmdctl/run_b10-cmdctl.sh
  1408. chmod +x src/bin/xfrin/run_b10-xfrin.sh
  1409. chmod +x src/bin/xfrout/run_b10-xfrout.sh
  1410. chmod +x src/bin/zonemgr/run_b10-zonemgr.sh
  1411. chmod +x src/bin/bind10/bind10
  1412. chmod +x src/bin/bind10/run_bind10.sh
  1413. chmod +x src/bin/cmdctl/tests/cmdctl_test
  1414. chmod +x src/bin/dbutil/run_dbutil.sh
  1415. chmod +x src/bin/dbutil/tests/dbutil_test.sh
  1416. chmod +x src/bin/xfrin/tests/xfrin_test
  1417. chmod +x src/bin/xfrout/tests/xfrout_test
  1418. chmod +x src/bin/zonemgr/tests/zonemgr_test
  1419. chmod +x src/bin/bindctl/tests/bindctl_test
  1420. chmod +x src/bin/bindctl/run_bindctl.sh
  1421. chmod +x src/bin/loadzone/run_loadzone.sh
  1422. chmod +x src/bin/loadzone/tests/correct/correct_test.sh
  1423. chmod +x src/bin/sysinfo/run_sysinfo.sh
  1424. chmod +x src/bin/usermgr/run_b10-cmdctl-usermgr.sh
  1425. chmod +x src/bin/msgq/run_msgq.sh
  1426. chmod +x src/lib/dns/gen-rdatacode.py
  1427. chmod +x src/lib/log/tests/console_test.sh
  1428. chmod +x src/lib/log/tests/destination_test.sh
  1429. chmod +x src/lib/log/tests/init_logger_test.sh
  1430. chmod +x src/lib/log/tests/local_file_test.sh
  1431. chmod +x src/lib/log/tests/logger_lock_test.sh
  1432. chmod +x src/lib/log/tests/severity_test.sh
  1433. chmod +x src/lib/util/python/doxygen2pydoc.py
  1434. chmod +x src/lib/util/python/mkpywrapper.py
  1435. chmod +x src/lib/util/python/gen_wiredata.py
  1436. chmod +x src/lib/python/isc/log/tests/log_console.py
  1437. ])
  1438. AC_OUTPUT
  1439. dnl Print the results
  1440. dnl
  1441. cat > config.report << END
  1442. BIND 10 source configure results:
  1443. -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  1444. Package:
  1445. Name: ${PACKAGE_NAME}
  1446. Version: ${PACKAGE_VERSION}
  1447. OS Family: ${OS_TYPE}
  1448. Using GNU sed: ${GNU_SED}
  1449. C++ Compiler:
  1450. CXX: ${CXX}
  1451. CXX_VERSION: ${CXX_VERSION}
  1452. DEFS: ${DEFS}
  1453. CPPFLAGS: ${CPPFLAGS}
  1454. CXXFLAGS: ${CXXFLAGS}
  1455. LDFLAGS: ${LDFLAGS}
  1456. B10_CXXFLAGS: ${B10_CXXFLAGS}
  1457. Python:
  1458. PYTHON_VERSION: ${PYTHON_VERSION}
  1459. PYTHON_INCLUDES: ${PYTHON_INCLUDES}
  1460. PYTHON_CXXFLAGS: ${PYTHON_CXXFLAGS}
  1461. PYTHON_LDFLAGS: ${PYTHON_LDFLAGS}
  1462. PYTHON_LIB: ${PYTHON_LIB}
  1463. Boost:
  1464. BOOST_VERSION: ${BOOST_VERSION}
  1465. BOOST_INCLUDES: ${BOOST_INCLUDES}
  1466. Botan:
  1467. BOTAN_VERSION: ${BOTAN_VERSION}
  1468. BOTAN_INCLUDES: ${BOTAN_INCLUDES}
  1469. BOTAN_LDFLAGS: ${BOTAN_LDFLAGS}
  1470. BOTAN_LIBS: ${BOTAN_LIBS}
  1471. Log4cplus:
  1472. LOG4CPLUS_VERSION: ${LOG4CPLUS_VERSION}
  1473. LOG4CPLUS_INCLUDES: ${LOG4CPLUS_INCLUDES}
  1474. LOG4CPLUS_LIBS: ${LOG4CPLUS_LIBS}
  1475. SQLite:
  1476. SQLITE_VERSION: ${SQLITE_VERSION}
  1477. SQLITE_CFLAGS: ${SQLITE_CFLAGS}
  1478. SQLITE_LIBS: ${SQLITE_LIBS}
  1479. END
  1480. # Avoid confusion on DNS/DHCP and only mention MySQL if it
  1481. # were specified on the command line.
  1482. if test "$MYSQL_CPPFLAGS" != "" ; then
  1483. cat >> config.report << END
  1484. MySQL:
  1485. MYSQL_VERSION: ${MYSQL_VERSION}
  1486. MYSQL_CPPFLAGS: ${MYSQL_CPPFLAGS}
  1487. MYSQL_LIBS: ${MYSQL_LIBS}
  1488. END
  1489. fi
  1490. if test "$enable_gtest" != "no"; then
  1491. cat >> config.report << END
  1492. GTest:
  1493. GTEST_VERSION: ${GTEST_VERSION}
  1494. GTEST_INCLUDES: ${GTEST_INCLUDES}
  1495. GTEST_LDFLAGS: ${GTEST_LDFLAGS}
  1496. GTEST_LDADD: ${GTEST_LDADD}
  1497. GTEST_SOURCE: ${GTEST_SOURCE}
  1498. END
  1499. fi
  1500. cat >> config.report << END
  1501. Features:
  1502. $enable_features
  1503. Developer:
  1504. Enable Debugging: $debug_enabled
  1505. Google Tests: $enable_gtest
  1506. Valgrind: $found_valgrind
  1507. C++ Code Coverage: $USE_LCOV
  1508. Python Code Coverage: $USE_PYCOVERAGE
  1509. Logger checks: $enable_logger_checks
  1510. Generate Documentation: $enable_generate_docs
  1511. END
  1512. cat config.report
  1513. cat <<EOF
  1514. Now you can type "make" to build BIND 10
  1515. EOF