configure.ac 53 KB

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