configure.ac 55 KB

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