configure.ac 56 KB

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