configure.ac 54 KB

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