configure.ac 55 KB

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