configure.ac 55 KB

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