configure.ac 55 KB

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