configure.ac 55 KB

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