You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

1983 lines
70 KiB

  1. # generated automatically by aclocal 1.13.4 -*- Autoconf -*-
  2. # Copyright (C) 1996-2013 Free Software Foundation, Inc.
  3. # This file is free software; the Free Software Foundation
  4. # gives unlimited permission to copy and/or distribute it,
  5. # with or without modifications, as long as this notice is preserved.
  6. # This program is distributed in the hope that it will be useful,
  7. # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
  8. # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
  9. # PARTICULAR PURPOSE.
  10. m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
  11. m4_ifndef([AC_AUTOCONF_VERSION],
  12. [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
  13. m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],,
  14. [m4_warning([this file was generated for autoconf 2.69.
  15. You have another version of autoconf. It may work, but is not guaranteed to.
  16. If you have problems, you may need to regenerate the build system entirely.
  17. To do so, use the procedure documented by the package, typically 'autoreconf'.])])
  18. # Copyright (C) 2002-2013 Free Software Foundation, Inc.
  19. #
  20. # This file is free software; the Free Software Foundation
  21. # gives unlimited permission to copy and/or distribute it,
  22. # with or without modifications, as long as this notice is preserved.
  23. # AM_AUTOMAKE_VERSION(VERSION)
  24. # ----------------------------
  25. # Automake X.Y traces this macro to ensure aclocal.m4 has been
  26. # generated from the m4 files accompanying Automake X.Y.
  27. # (This private macro should not be called outside this file.)
  28. AC_DEFUN([AM_AUTOMAKE_VERSION],
  29. [am__api_version='1.13'
  30. dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
  31. dnl require some minimum version. Point them to the right macro.
  32. m4_if([$1], [1.13.4], [],
  33. [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
  34. ])
  35. # _AM_AUTOCONF_VERSION(VERSION)
  36. # -----------------------------
  37. # aclocal traces this macro to find the Autoconf version.
  38. # This is a private macro too. Using m4_define simplifies
  39. # the logic in aclocal, which can simply ignore this definition.
  40. m4_define([_AM_AUTOCONF_VERSION], [])
  41. # AM_SET_CURRENT_AUTOMAKE_VERSION
  42. # -------------------------------
  43. # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
  44. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
  45. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
  46. [AM_AUTOMAKE_VERSION([1.13.4])dnl
  47. m4_ifndef([AC_AUTOCONF_VERSION],
  48. [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
  49. _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
  50. # AM_AUX_DIR_EXPAND -*- Autoconf -*-
  51. # Copyright (C) 2001-2013 Free Software Foundation, Inc.
  52. #
  53. # This file is free software; the Free Software Foundation
  54. # gives unlimited permission to copy and/or distribute it,
  55. # with or without modifications, as long as this notice is preserved.
  56. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
  57. # $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to
  58. # '$srcdir', '$srcdir/..', or '$srcdir/../..'.
  59. #
  60. # Of course, Automake must honor this variable whenever it calls a
  61. # tool from the auxiliary directory. The problem is that $srcdir (and
  62. # therefore $ac_aux_dir as well) can be either absolute or relative,
  63. # depending on how configure is run. This is pretty annoying, since
  64. # it makes $ac_aux_dir quite unusable in subdirectories: in the top
  65. # source directory, any form will work fine, but in subdirectories a
  66. # relative path needs to be adjusted first.
  67. #
  68. # $ac_aux_dir/missing
  69. # fails when called from a subdirectory if $ac_aux_dir is relative
  70. # $top_srcdir/$ac_aux_dir/missing
  71. # fails if $ac_aux_dir is absolute,
  72. # fails when called from a subdirectory in a VPATH build with
  73. # a relative $ac_aux_dir
  74. #
  75. # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
  76. # are both prefixed by $srcdir. In an in-source build this is usually
  77. # harmless because $srcdir is '.', but things will broke when you
  78. # start a VPATH build or use an absolute $srcdir.
  79. #
  80. # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
  81. # iff we strip the leading $srcdir from $ac_aux_dir. That would be:
  82. # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
  83. # and then we would define $MISSING as
  84. # MISSING="\${SHELL} $am_aux_dir/missing"
  85. # This will work as long as MISSING is not called from configure, because
  86. # unfortunately $(top_srcdir) has no meaning in configure.
  87. # However there are other variables, like CC, which are often used in
  88. # configure, and could therefore not use this "fixed" $ac_aux_dir.
  89. #
  90. # Another solution, used here, is to always expand $ac_aux_dir to an
  91. # absolute PATH. The drawback is that using absolute paths prevent a
  92. # configured tree to be moved without reconfiguration.
  93. AC_DEFUN([AM_AUX_DIR_EXPAND],
  94. [dnl Rely on autoconf to set up CDPATH properly.
  95. AC_PREREQ([2.50])dnl
  96. # expand $ac_aux_dir to an absolute path
  97. am_aux_dir=`cd $ac_aux_dir && pwd`
  98. ])
  99. # AM_CONDITIONAL -*- Autoconf -*-
  100. # Copyright (C) 1997-2013 Free Software Foundation, Inc.
  101. #
  102. # This file is free software; the Free Software Foundation
  103. # gives unlimited permission to copy and/or distribute it,
  104. # with or without modifications, as long as this notice is preserved.
  105. # AM_CONDITIONAL(NAME, SHELL-CONDITION)
  106. # -------------------------------------
  107. # Define a conditional.
  108. AC_DEFUN([AM_CONDITIONAL],
  109. [AC_PREREQ([2.52])dnl
  110. m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
  111. [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
  112. AC_SUBST([$1_TRUE])dnl
  113. AC_SUBST([$1_FALSE])dnl
  114. _AM_SUBST_NOTMAKE([$1_TRUE])dnl
  115. _AM_SUBST_NOTMAKE([$1_FALSE])dnl
  116. m4_define([_AM_COND_VALUE_$1], [$2])dnl
  117. if $2; then
  118. $1_TRUE=
  119. $1_FALSE='#'
  120. else
  121. $1_TRUE='#'
  122. $1_FALSE=
  123. fi
  124. AC_CONFIG_COMMANDS_PRE(
  125. [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
  126. AC_MSG_ERROR([[conditional "$1" was never defined.
  127. Usually this means the macro was only invoked conditionally.]])
  128. fi])])
  129. # Copyright (C) 1999-2013 Free Software Foundation, Inc.
  130. #
  131. # This file is free software; the Free Software Foundation
  132. # gives unlimited permission to copy and/or distribute it,
  133. # with or without modifications, as long as this notice is preserved.
  134. # There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be
  135. # written in clear, in which case automake, when reading aclocal.m4,
  136. # will think it sees a *use*, and therefore will trigger all it's
  137. # C support machinery. Also note that it means that autoscan, seeing
  138. # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
  139. # _AM_DEPENDENCIES(NAME)
  140. # ----------------------
  141. # See how the compiler implements dependency checking.
  142. # NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC".
  143. # We try a few techniques and use that to set a single cache variable.
  144. #
  145. # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
  146. # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
  147. # dependency, and given that the user is not expected to run this macro,
  148. # just rely on AC_PROG_CC.
  149. AC_DEFUN([_AM_DEPENDENCIES],
  150. [AC_REQUIRE([AM_SET_DEPDIR])dnl
  151. AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
  152. AC_REQUIRE([AM_MAKE_INCLUDE])dnl
  153. AC_REQUIRE([AM_DEP_TRACK])dnl
  154. m4_if([$1], [CC], [depcc="$CC" am_compiler_list=],
  155. [$1], [CXX], [depcc="$CXX" am_compiler_list=],
  156. [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
  157. [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'],
  158. [$1], [UPC], [depcc="$UPC" am_compiler_list=],
  159. [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
  160. [depcc="$$1" am_compiler_list=])
  161. AC_CACHE_CHECK([dependency style of $depcc],
  162. [am_cv_$1_dependencies_compiler_type],
  163. [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
  164. # We make a subdir and do the tests there. Otherwise we can end up
  165. # making bogus files that we don't know about and never remove. For
  166. # instance it was reported that on HP-UX the gcc test will end up
  167. # making a dummy file named 'D' -- because '-MD' means "put the output
  168. # in D".
  169. rm -rf conftest.dir
  170. mkdir conftest.dir
  171. # Copy depcomp to subdir because otherwise we won't find it if we're
  172. # using a relative directory.
  173. cp "$am_depcomp" conftest.dir
  174. cd conftest.dir
  175. # We will build objects and dependencies in a subdirectory because
  176. # it helps to detect inapplicable dependency modes. For instance
  177. # both Tru64's cc and ICC support -MD to output dependencies as a
  178. # side effect of compilation, but ICC will put the dependencies in
  179. # the current directory while Tru64 will put them in the object
  180. # directory.
  181. mkdir sub
  182. am_cv_$1_dependencies_compiler_type=none
  183. if test "$am_compiler_list" = ""; then
  184. am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
  185. fi
  186. am__universal=false
  187. m4_case([$1], [CC],
  188. [case " $depcc " in #(
  189. *\ -arch\ *\ -arch\ *) am__universal=true ;;
  190. esac],
  191. [CXX],
  192. [case " $depcc " in #(
  193. *\ -arch\ *\ -arch\ *) am__universal=true ;;
  194. esac])
  195. for depmode in $am_compiler_list; do
  196. # Setup a source with many dependencies, because some compilers
  197. # like to wrap large dependency lists on column 80 (with \), and
  198. # we should not choose a depcomp mode which is confused by this.
  199. #
  200. # We need to recreate these files for each test, as the compiler may
  201. # overwrite some of them when testing with obscure command lines.
  202. # This happens at least with the AIX C compiler.
  203. : > sub/conftest.c
  204. for i in 1 2 3 4 5 6; do
  205. echo '#include "conftst'$i'.h"' >> sub/conftest.c
  206. # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
  207. # Solaris 10 /bin/sh.
  208. echo '/* dummy */' > sub/conftst$i.h
  209. done
  210. echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
  211. # We check with '-c' and '-o' for the sake of the "dashmstdout"
  212. # mode. It turns out that the SunPro C++ compiler does not properly
  213. # handle '-M -o', and we need to detect this. Also, some Intel
  214. # versions had trouble with output in subdirs.
  215. am__obj=sub/conftest.${OBJEXT-o}
  216. am__minus_obj="-o $am__obj"
  217. case $depmode in
  218. gcc)
  219. # This depmode causes a compiler race in universal mode.
  220. test "$am__universal" = false || continue
  221. ;;
  222. nosideeffect)
  223. # After this tag, mechanisms are not by side-effect, so they'll
  224. # only be used when explicitly requested.
  225. if test "x$enable_dependency_tracking" = xyes; then
  226. continue
  227. else
  228. break
  229. fi
  230. ;;
  231. msvc7 | msvc7msys | msvisualcpp | msvcmsys)
  232. # This compiler won't grok '-c -o', but also, the minuso test has
  233. # not run yet. These depmodes are late enough in the game, and
  234. # so weak that their functioning should not be impacted.
  235. am__obj=conftest.${OBJEXT-o}
  236. am__minus_obj=
  237. ;;
  238. none) break ;;
  239. esac
  240. if depmode=$depmode \
  241. source=sub/conftest.c object=$am__obj \
  242. depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
  243. $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
  244. >/dev/null 2>conftest.err &&
  245. grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
  246. grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
  247. grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
  248. ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
  249. # icc doesn't choke on unknown options, it will just issue warnings
  250. # or remarks (even with -Werror). So we grep stderr for any message
  251. # that says an option was ignored or not supported.
  252. # When given -MP, icc 7.0 and 7.1 complain thusly:
  253. # icc: Command line warning: ignoring option '-M'; no argument required
  254. # The diagnosis changed in icc 8.0:
  255. # icc: Command line remark: option '-MP' not supported
  256. if (grep 'ignoring option' conftest.err ||
  257. grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
  258. am_cv_$1_dependencies_compiler_type=$depmode
  259. break
  260. fi
  261. fi
  262. done
  263. cd ..
  264. rm -rf conftest.dir
  265. else
  266. am_cv_$1_dependencies_compiler_type=none
  267. fi
  268. ])
  269. AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
  270. AM_CONDITIONAL([am__fastdep$1], [
  271. test "x$enable_dependency_tracking" != xno \
  272. && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
  273. ])
  274. # AM_SET_DEPDIR
  275. # -------------
  276. # Choose a directory name for dependency files.
  277. # This macro is AC_REQUIREd in _AM_DEPENDENCIES.
  278. AC_DEFUN([AM_SET_DEPDIR],
  279. [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
  280. AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
  281. ])
  282. # AM_DEP_TRACK
  283. # ------------
  284. AC_DEFUN([AM_DEP_TRACK],
  285. [AC_ARG_ENABLE([dependency-tracking], [dnl
  286. AS_HELP_STRING(
  287. [--enable-dependency-tracking],
  288. [do not reject slow dependency extractors])
  289. AS_HELP_STRING(
  290. [--disable-dependency-tracking],
  291. [speeds up one-time build])])
  292. if test "x$enable_dependency_tracking" != xno; then
  293. am_depcomp="$ac_aux_dir/depcomp"
  294. AMDEPBACKSLASH='\'
  295. am__nodep='_no'
  296. fi
  297. AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
  298. AC_SUBST([AMDEPBACKSLASH])dnl
  299. _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
  300. AC_SUBST([am__nodep])dnl
  301. _AM_SUBST_NOTMAKE([am__nodep])dnl
  302. ])
  303. # Generate code to set up dependency tracking. -*- Autoconf -*-
  304. # Copyright (C) 1999-2013 Free Software Foundation, Inc.
  305. #
  306. # This file is free software; the Free Software Foundation
  307. # gives unlimited permission to copy and/or distribute it,
  308. # with or without modifications, as long as this notice is preserved.
  309. # _AM_OUTPUT_DEPENDENCY_COMMANDS
  310. # ------------------------------
  311. AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
  312. [{
  313. # Older Autoconf quotes --file arguments for eval, but not when files
  314. # are listed without --file. Let's play safe and only enable the eval
  315. # if we detect the quoting.
  316. case $CONFIG_FILES in
  317. *\'*) eval set x "$CONFIG_FILES" ;;
  318. *) set x $CONFIG_FILES ;;
  319. esac
  320. shift
  321. for mf
  322. do
  323. # Strip MF so we end up with the name of the file.
  324. mf=`echo "$mf" | sed -e 's/:.*$//'`
  325. # Check whether this is an Automake generated Makefile or not.
  326. # We used to match only the files named 'Makefile.in', but
  327. # some people rename them; so instead we look at the file content.
  328. # Grep'ing the first line is not enough: some people post-process
  329. # each Makefile.in and add a new line on top of each file to say so.
  330. # Grep'ing the whole file is not good either: AIX grep has a line
  331. # limit of 2048, but all sed's we know have understand at least 4000.
  332. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
  333. dirpart=`AS_DIRNAME("$mf")`
  334. else
  335. continue
  336. fi
  337. # Extract the definition of DEPDIR, am__include, and am__quote
  338. # from the Makefile without running 'make'.
  339. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
  340. test -z "$DEPDIR" && continue
  341. am__include=`sed -n 's/^am__include = //p' < "$mf"`
  342. test -z "$am__include" && continue
  343. am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
  344. # Find all dependency output files, they are included files with
  345. # $(DEPDIR) in their names. We invoke sed twice because it is the
  346. # simplest approach to changing $(DEPDIR) to its actual value in the
  347. # expansion.
  348. for file in `sed -n "
  349. s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
  350. sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
  351. # Make sure the directory exists.
  352. test -f "$dirpart/$file" && continue
  353. fdir=`AS_DIRNAME(["$file"])`
  354. AS_MKDIR_P([$dirpart/$fdir])
  355. # echo "creating $dirpart/$file"
  356. echo '# dummy' > "$dirpart/$file"
  357. done
  358. done
  359. }
  360. ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
  361. # AM_OUTPUT_DEPENDENCY_COMMANDS
  362. # -----------------------------
  363. # This macro should only be invoked once -- use via AC_REQUIRE.
  364. #
  365. # This code is only required when automatic dependency tracking
  366. # is enabled. FIXME. This creates each '.P' file that we will
  367. # need in order to bootstrap the dependency handling code.
  368. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
  369. [AC_CONFIG_COMMANDS([depfiles],
  370. [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
  371. [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
  372. ])
  373. # Do all the work for Automake. -*- Autoconf -*-
  374. # Copyright (C) 1996-2013 Free Software Foundation, Inc.
  375. #
  376. # This file is free software; the Free Software Foundation
  377. # gives unlimited permission to copy and/or distribute it,
  378. # with or without modifications, as long as this notice is preserved.
  379. # This macro actually does too much. Some checks are only needed if
  380. # your package does certain things. But this isn't really a big deal.
  381. # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
  382. # AM_INIT_AUTOMAKE([OPTIONS])
  383. # -----------------------------------------------
  384. # The call with PACKAGE and VERSION arguments is the old style
  385. # call (pre autoconf-2.50), which is being phased out. PACKAGE
  386. # and VERSION should now be passed to AC_INIT and removed from
  387. # the call to AM_INIT_AUTOMAKE.
  388. # We support both call styles for the transition. After
  389. # the next Automake release, Autoconf can make the AC_INIT
  390. # arguments mandatory, and then we can depend on a new Autoconf
  391. # release and drop the old call support.
  392. AC_DEFUN([AM_INIT_AUTOMAKE],
  393. [AC_PREREQ([2.65])dnl
  394. dnl Autoconf wants to disallow AM_ names. We explicitly allow
  395. dnl the ones we care about.
  396. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
  397. AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
  398. AC_REQUIRE([AC_PROG_INSTALL])dnl
  399. if test "`cd $srcdir && pwd`" != "`pwd`"; then
  400. # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
  401. # is not polluted with repeated "-I."
  402. AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
  403. # test to see if srcdir already configured
  404. if test -f $srcdir/config.status; then
  405. AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
  406. fi
  407. fi
  408. # test whether we have cygpath
  409. if test -z "$CYGPATH_W"; then
  410. if (cygpath --version) >/dev/null 2>/dev/null; then
  411. CYGPATH_W='cygpath -w'
  412. else
  413. CYGPATH_W=echo
  414. fi
  415. fi
  416. AC_SUBST([CYGPATH_W])
  417. # Define the identity of the package.
  418. dnl Distinguish between old-style and new-style calls.
  419. m4_ifval([$2],
  420. [AC_DIAGNOSE([obsolete],
  421. [$0: two- and three-arguments forms are deprecated.])
  422. m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
  423. AC_SUBST([PACKAGE], [$1])dnl
  424. AC_SUBST([VERSION], [$2])],
  425. [_AM_SET_OPTIONS([$1])dnl
  426. dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
  427. m4_if(
  428. m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
  429. [ok:ok],,
  430. [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
  431. AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
  432. AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
  433. _AM_IF_OPTION([no-define],,
  434. [AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
  435. AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
  436. # Some tools Automake needs.
  437. AC_REQUIRE([AM_SANITY_CHECK])dnl
  438. AC_REQUIRE([AC_ARG_PROGRAM])dnl
  439. AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
  440. AM_MISSING_PROG([AUTOCONF], [autoconf])
  441. AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
  442. AM_MISSING_PROG([AUTOHEADER], [autoheader])
  443. AM_MISSING_PROG([MAKEINFO], [makeinfo])
  444. AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
  445. AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
  446. AC_REQUIRE([AC_PROG_MKDIR_P])dnl
  447. # For better backward compatibility. To be removed once Automake 1.9.x
  448. # dies out for good. For more background, see:
  449. # <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
  450. # <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
  451. AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
  452. # We need awk for the "check" target. The system "awk" is bad on
  453. # some platforms.
  454. AC_REQUIRE([AC_PROG_AWK])dnl
  455. AC_REQUIRE([AC_PROG_MAKE_SET])dnl
  456. AC_REQUIRE([AM_SET_LEADING_DOT])dnl
  457. _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
  458. [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
  459. [_AM_PROG_TAR([v7])])])
  460. _AM_IF_OPTION([no-dependencies],,
  461. [AC_PROVIDE_IFELSE([AC_PROG_CC],
  462. [_AM_DEPENDENCIES([CC])],
  463. [m4_define([AC_PROG_CC],
  464. m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
  465. AC_PROVIDE_IFELSE([AC_PROG_CXX],
  466. [_AM_DEPENDENCIES([CXX])],
  467. [m4_define([AC_PROG_CXX],
  468. m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
  469. AC_PROVIDE_IFELSE([AC_PROG_OBJC],
  470. [_AM_DEPENDENCIES([OBJC])],
  471. [m4_define([AC_PROG_OBJC],
  472. m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
  473. AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
  474. [_AM_DEPENDENCIES([OBJCXX])],
  475. [m4_define([AC_PROG_OBJCXX],
  476. m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
  477. ])
  478. AC_REQUIRE([AM_SILENT_RULES])dnl
  479. dnl The testsuite driver may need to know about EXEEXT, so add the
  480. dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This
  481. dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
  482. AC_CONFIG_COMMANDS_PRE(dnl
  483. [m4_provide_if([_AM_COMPILER_EXEEXT],
  484. [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
  485. ])
  486. dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
  487. dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
  488. dnl mangled by Autoconf and run in a shell conditional statement.
  489. m4_define([_AC_COMPILER_EXEEXT],
  490. m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
  491. # When config.status generates a header, we must update the stamp-h file.
  492. # This file resides in the same directory as the config header
  493. # that is generated. The stamp files are numbered to have different names.
  494. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
  495. # loop where config.status creates the headers, so we can generate
  496. # our stamp files there.
  497. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
  498. [# Compute $1's index in $config_headers.
  499. _am_arg=$1
  500. _am_stamp_count=1
  501. for _am_header in $config_headers :; do
  502. case $_am_header in
  503. $_am_arg | $_am_arg:* )
  504. break ;;
  505. * )
  506. _am_stamp_count=`expr $_am_stamp_count + 1` ;;
  507. esac
  508. done
  509. echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
  510. # Copyright (C) 2001-2013 Free Software Foundation, Inc.
  511. #
  512. # This file is free software; the Free Software Foundation
  513. # gives unlimited permission to copy and/or distribute it,
  514. # with or without modifications, as long as this notice is preserved.
  515. # AM_PROG_INSTALL_SH
  516. # ------------------
  517. # Define $install_sh.
  518. AC_DEFUN([AM_PROG_INSTALL_SH],
  519. [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
  520. if test x"${install_sh}" != xset; then
  521. case $am_aux_dir in
  522. *\ * | *\ *)
  523. install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
  524. *)
  525. install_sh="\${SHELL} $am_aux_dir/install-sh"
  526. esac
  527. fi
  528. AC_SUBST([install_sh])])
  529. # Copyright (C) 2003-2013 Free Software Foundation, Inc.
  530. #
  531. # This file is free software; the Free Software Foundation
  532. # gives unlimited permission to copy and/or distribute it,
  533. # with or without modifications, as long as this notice is preserved.
  534. # Check whether the underlying file-system supports filenames
  535. # with a leading dot. For instance MS-DOS doesn't.
  536. AC_DEFUN([AM_SET_LEADING_DOT],
  537. [rm -rf .tst 2>/dev/null
  538. mkdir .tst 2>/dev/null
  539. if test -d .tst; then
  540. am__leading_dot=.
  541. else
  542. am__leading_dot=_
  543. fi
  544. rmdir .tst 2>/dev/null
  545. AC_SUBST([am__leading_dot])])
  546. # Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
  547. # From Jim Meyering
  548. # Copyright (C) 1996-2013 Free Software Foundation, Inc.
  549. #
  550. # This file is free software; the Free Software Foundation
  551. # gives unlimited permission to copy and/or distribute it,
  552. # with or without modifications, as long as this notice is preserved.
  553. # AM_MAINTAINER_MODE([DEFAULT-MODE])
  554. # ----------------------------------
  555. # Control maintainer-specific portions of Makefiles.
  556. # Default is to disable them, unless 'enable' is passed literally.
  557. # For symmetry, 'disable' may be passed as well. Anyway, the user
  558. # can override the default with the --enable/--disable switch.
  559. AC_DEFUN([AM_MAINTAINER_MODE],
  560. [m4_case(m4_default([$1], [disable]),
  561. [enable], [m4_define([am_maintainer_other], [disable])],
  562. [disable], [m4_define([am_maintainer_other], [enable])],
  563. [m4_define([am_maintainer_other], [enable])
  564. m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
  565. AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
  566. dnl maintainer-mode's default is 'disable' unless 'enable' is passed
  567. AC_ARG_ENABLE([maintainer-mode],
  568. [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode],
  569. am_maintainer_other[ make rules and dependencies not useful
  570. (and sometimes confusing) to the casual installer])],
  571. [USE_MAINTAINER_MODE=$enableval],
  572. [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
  573. AC_MSG_RESULT([$USE_MAINTAINER_MODE])
  574. AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
  575. MAINT=$MAINTAINER_MODE_TRUE
  576. AC_SUBST([MAINT])dnl
  577. ]
  578. )
  579. # Check to see how 'make' treats includes. -*- Autoconf -*-
  580. # Copyright (C) 2001-2013 Free Software Foundation, Inc.
  581. #
  582. # This file is free software; the Free Software Foundation
  583. # gives unlimited permission to copy and/or distribute it,
  584. # with or without modifications, as long as this notice is preserved.
  585. # AM_MAKE_INCLUDE()
  586. # -----------------
  587. # Check to see how make treats includes.
  588. AC_DEFUN([AM_MAKE_INCLUDE],
  589. [am_make=${MAKE-make}
  590. cat > confinc << 'END'
  591. am__doit:
  592. @echo this is the am__doit target
  593. .PHONY: am__doit
  594. END
  595. # If we don't find an include directive, just comment out the code.
  596. AC_MSG_CHECKING([for style of include used by $am_make])
  597. am__include="#"
  598. am__quote=
  599. _am_result=none
  600. # First try GNU make style include.
  601. echo "include confinc" > confmf
  602. # Ignore all kinds of additional output from 'make'.
  603. case `$am_make -s -f confmf 2> /dev/null` in #(
  604. *the\ am__doit\ target*)
  605. am__include=include
  606. am__quote=
  607. _am_result=GNU
  608. ;;
  609. esac
  610. # Now try BSD make style include.
  611. if test "$am__include" = "#"; then
  612. echo '.include "confinc"' > confmf
  613. case `$am_make -s -f confmf 2> /dev/null` in #(
  614. *the\ am__doit\ target*)
  615. am__include=.include
  616. am__quote="\""
  617. _am_result=BSD
  618. ;;
  619. esac
  620. fi
  621. AC_SUBST([am__include])
  622. AC_SUBST([am__quote])
  623. AC_MSG_RESULT([$_am_result])
  624. rm -f confinc confmf
  625. ])
  626. # Copyright (C) 1999-2013 Free Software Foundation, Inc.
  627. #
  628. # This file is free software; the Free Software Foundation
  629. # gives unlimited permission to copy and/or distribute it,
  630. # with or without modifications, as long as this notice is preserved.
  631. # AM_PROG_CC_C_O
  632. # --------------
  633. # Like AC_PROG_CC_C_O, but changed for automake.
  634. AC_DEFUN([AM_PROG_CC_C_O],
  635. [AC_REQUIRE([AC_PROG_CC_C_O])dnl
  636. AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
  637. AC_REQUIRE_AUX_FILE([compile])dnl
  638. # FIXME: we rely on the cache variable name because
  639. # there is no other way.
  640. set dummy $CC
  641. am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']`
  642. eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
  643. if test "$am_t" != yes; then
  644. # Losing compiler, so override with the script.
  645. # FIXME: It is wrong to rewrite CC.
  646. # But if we don't then we get into trouble of one sort or another.
  647. # A longer-term fix would be to have automake use am__CC in this case,
  648. # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
  649. CC="$am_aux_dir/compile $CC"
  650. fi
  651. dnl Make sure AC_PROG_CC is never called again, or it will override our
  652. dnl setting of CC.
  653. m4_define([AC_PROG_CC],
  654. [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])])
  655. ])
  656. # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
  657. # Copyright (C) 1997-2013 Free Software Foundation, Inc.
  658. #
  659. # This file is free software; the Free Software Foundation
  660. # gives unlimited permission to copy and/or distribute it,
  661. # with or without modifications, as long as this notice is preserved.
  662. # AM_MISSING_PROG(NAME, PROGRAM)
  663. # ------------------------------
  664. AC_DEFUN([AM_MISSING_PROG],
  665. [AC_REQUIRE([AM_MISSING_HAS_RUN])
  666. $1=${$1-"${am_missing_run}$2"}
  667. AC_SUBST($1)])
  668. # AM_MISSING_HAS_RUN
  669. # ------------------
  670. # Define MISSING if not defined so far and test if it is modern enough.
  671. # If it is, set am_missing_run to use it, otherwise, to nothing.
  672. AC_DEFUN([AM_MISSING_HAS_RUN],
  673. [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
  674. AC_REQUIRE_AUX_FILE([missing])dnl
  675. if test x"${MISSING+set}" != xset; then
  676. case $am_aux_dir in
  677. *\ * | *\ *)
  678. MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
  679. *)
  680. MISSING="\${SHELL} $am_aux_dir/missing" ;;
  681. esac
  682. fi
  683. # Use eval to expand $SHELL
  684. if eval "$MISSING --is-lightweight"; then
  685. am_missing_run="$MISSING "
  686. else
  687. am_missing_run=
  688. AC_MSG_WARN(['missing' script is too old or missing])
  689. fi
  690. ])
  691. # Helper functions for option handling. -*- Autoconf -*-
  692. # Copyright (C) 2001-2013 Free Software Foundation, Inc.
  693. #
  694. # This file is free software; the Free Software Foundation
  695. # gives unlimited permission to copy and/or distribute it,
  696. # with or without modifications, as long as this notice is preserved.
  697. # _AM_MANGLE_OPTION(NAME)
  698. # -----------------------
  699. AC_DEFUN([_AM_MANGLE_OPTION],
  700. [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
  701. # _AM_SET_OPTION(NAME)
  702. # --------------------
  703. # Set option NAME. Presently that only means defining a flag for this option.
  704. AC_DEFUN([_AM_SET_OPTION],
  705. [m4_define(_AM_MANGLE_OPTION([$1]), [1])])
  706. # _AM_SET_OPTIONS(OPTIONS)
  707. # ------------------------
  708. # OPTIONS is a space-separated list of Automake options.
  709. AC_DEFUN([_AM_SET_OPTIONS],
  710. [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
  711. # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
  712. # -------------------------------------------
  713. # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
  714. AC_DEFUN([_AM_IF_OPTION],
  715. [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
  716. # Check to make sure that the build environment is sane. -*- Autoconf -*-
  717. # Copyright (C) 1996-2013 Free Software Foundation, Inc.
  718. #
  719. # This file is free software; the Free Software Foundation
  720. # gives unlimited permission to copy and/or distribute it,
  721. # with or without modifications, as long as this notice is preserved.
  722. # AM_SANITY_CHECK
  723. # ---------------
  724. AC_DEFUN([AM_SANITY_CHECK],
  725. [AC_MSG_CHECKING([whether build environment is sane])
  726. # Reject unsafe characters in $srcdir or the absolute working directory
  727. # name. Accept space and tab only in the latter.
  728. am_lf='
  729. '
  730. case `pwd` in
  731. *[[\\\"\#\$\&\'\`$am_lf]]*)
  732. AC_MSG_ERROR([unsafe absolute working directory name]);;
  733. esac
  734. case $srcdir in
  735. *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
  736. AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
  737. esac
  738. # Do 'set' in a subshell so we don't clobber the current shell's
  739. # arguments. Must try -L first in case configure is actually a
  740. # symlink; some systems play weird games with the mod time of symlinks
  741. # (eg FreeBSD returns the mod time of the symlink's containing
  742. # directory).
  743. if (
  744. am_has_slept=no
  745. for am_try in 1 2; do
  746. echo "timestamp, slept: $am_has_slept" > conftest.file
  747. set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
  748. if test "$[*]" = "X"; then
  749. # -L didn't work.
  750. set X `ls -t "$srcdir/configure" conftest.file`
  751. fi
  752. if test "$[*]" != "X $srcdir/configure conftest.file" \
  753. && test "$[*]" != "X conftest.file $srcdir/configure"; then
  754. # If neither matched, then we have a broken ls. This can happen
  755. # if, for instance, CONFIG_SHELL is bash and it inherits a
  756. # broken ls alias from the environment. This has actually
  757. # happened. Such a system could not be considered "sane".
  758. AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
  759. alias in your environment])
  760. fi
  761. if test "$[2]" = conftest.file || test $am_try -eq 2; then
  762. break
  763. fi
  764. # Just in case.
  765. sleep 1
  766. am_has_slept=yes
  767. done
  768. test "$[2]" = conftest.file
  769. )
  770. then
  771. # Ok.
  772. :
  773. else
  774. AC_MSG_ERROR([newly created file is older than distributed files!
  775. Check your system clock])
  776. fi
  777. AC_MSG_RESULT([yes])
  778. # If we didn't sleep, we still need to ensure time stamps of config.status and
  779. # generated files are strictly newer.
  780. am_sleep_pid=
  781. if grep 'slept: no' conftest.file >/dev/null 2>&1; then
  782. ( sleep 1 ) &
  783. am_sleep_pid=$!
  784. fi
  785. AC_CONFIG_COMMANDS_PRE(
  786. [AC_MSG_CHECKING([that generated files are newer than configure])
  787. if test -n "$am_sleep_pid"; then
  788. # Hide warnings about reused PIDs.
  789. wait $am_sleep_pid 2>/dev/null
  790. fi
  791. AC_MSG_RESULT([done])])
  792. rm -f conftest.file
  793. ])
  794. # Copyright (C) 2009-2013 Free Software Foundation, Inc.
  795. #
  796. # This file is free software; the Free Software Foundation
  797. # gives unlimited permission to copy and/or distribute it,
  798. # with or without modifications, as long as this notice is preserved.
  799. # AM_SILENT_RULES([DEFAULT])
  800. # --------------------------
  801. # Enable less verbose build rules; with the default set to DEFAULT
  802. # ("yes" being less verbose, "no" or empty being verbose).
  803. AC_DEFUN([AM_SILENT_RULES],
  804. [AC_ARG_ENABLE([silent-rules], [dnl
  805. AS_HELP_STRING(
  806. [--enable-silent-rules],
  807. [less verbose build output (undo: "make V=1")])
  808. AS_HELP_STRING(
  809. [--disable-silent-rules],
  810. [verbose build output (undo: "make V=0")])dnl
  811. ])
  812. case $enable_silent_rules in @%:@ (((
  813. yes) AM_DEFAULT_VERBOSITY=0;;
  814. no) AM_DEFAULT_VERBOSITY=1;;
  815. *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
  816. esac
  817. dnl
  818. dnl A few 'make' implementations (e.g., NonStop OS and NextStep)
  819. dnl do not support nested variable expansions.
  820. dnl See automake bug#9928 and bug#10237.
  821. am_make=${MAKE-make}
  822. AC_CACHE_CHECK([whether $am_make supports nested variables],
  823. [am_cv_make_support_nested_variables],
  824. [if AS_ECHO([['TRUE=$(BAR$(V))
  825. BAR0=false
  826. BAR1=true
  827. V=1
  828. am__doit:
  829. @$(TRUE)
  830. .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
  831. am_cv_make_support_nested_variables=yes
  832. else
  833. am_cv_make_support_nested_variables=no
  834. fi])
  835. if test $am_cv_make_support_nested_variables = yes; then
  836. dnl Using '$V' instead of '$(V)' breaks IRIX make.
  837. AM_V='$(V)'
  838. AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
  839. else
  840. AM_V=$AM_DEFAULT_VERBOSITY
  841. AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
  842. fi
  843. AC_SUBST([AM_V])dnl
  844. AM_SUBST_NOTMAKE([AM_V])dnl
  845. AC_SUBST([AM_DEFAULT_V])dnl
  846. AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
  847. AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
  848. AM_BACKSLASH='\'
  849. AC_SUBST([AM_BACKSLASH])dnl
  850. _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
  851. ])
  852. # Copyright (C) 2001-2013 Free Software Foundation, Inc.
  853. #
  854. # This file is free software; the Free Software Foundation
  855. # gives unlimited permission to copy and/or distribute it,
  856. # with or without modifications, as long as this notice is preserved.
  857. # AM_PROG_INSTALL_STRIP
  858. # ---------------------
  859. # One issue with vendor 'install' (even GNU) is that you can't
  860. # specify the program used to strip binaries. This is especially
  861. # annoying in cross-compiling environments, where the build's strip
  862. # is unlikely to handle the host's binaries.
  863. # Fortunately install-sh will honor a STRIPPROG variable, so we
  864. # always use install-sh in "make install-strip", and initialize
  865. # STRIPPROG with the value of the STRIP variable (set by the user).
  866. AC_DEFUN([AM_PROG_INSTALL_STRIP],
  867. [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
  868. # Installed binaries are usually stripped using 'strip' when the user
  869. # run "make install-strip". However 'strip' might not be the right
  870. # tool to use in cross-compilation environments, therefore Automake
  871. # will honor the 'STRIP' environment variable to overrule this program.
  872. dnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
  873. if test "$cross_compiling" != no; then
  874. AC_CHECK_TOOL([STRIP], [strip], :)
  875. fi
  876. INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
  877. AC_SUBST([INSTALL_STRIP_PROGRAM])])
  878. # Copyright (C) 2006-2013 Free Software Foundation, Inc.
  879. #
  880. # This file is free software; the Free Software Foundation
  881. # gives unlimited permission to copy and/or distribute it,
  882. # with or without modifications, as long as this notice is preserved.
  883. # _AM_SUBST_NOTMAKE(VARIABLE)
  884. # ---------------------------
  885. # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
  886. # This macro is traced by Automake.
  887. AC_DEFUN([_AM_SUBST_NOTMAKE])
  888. # AM_SUBST_NOTMAKE(VARIABLE)
  889. # --------------------------
  890. # Public sister of _AM_SUBST_NOTMAKE.
  891. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
  892. # Check how to create a tarball. -*- Autoconf -*-
  893. # Copyright (C) 2004-2013 Free Software Foundation, Inc.
  894. #
  895. # This file is free software; the Free Software Foundation
  896. # gives unlimited permission to copy and/or distribute it,
  897. # with or without modifications, as long as this notice is preserved.
  898. # _AM_PROG_TAR(FORMAT)
  899. # --------------------
  900. # Check how to create a tarball in format FORMAT.
  901. # FORMAT should be one of 'v7', 'ustar', or 'pax'.
  902. #
  903. # Substitute a variable $(am__tar) that is a command
  904. # writing to stdout a FORMAT-tarball containing the directory
  905. # $tardir.
  906. # tardir=directory && $(am__tar) > result.tar
  907. #
  908. # Substitute a variable $(am__untar) that extract such
  909. # a tarball read from stdin.
  910. # $(am__untar) < result.tar
  911. #
  912. AC_DEFUN([_AM_PROG_TAR],
  913. [# Always define AMTAR for backward compatibility. Yes, it's still used
  914. # in the wild :-( We should find a proper way to deprecate it ...
  915. AC_SUBST([AMTAR], ['$${TAR-tar}'])
  916. # We'll loop over all known methods to create a tar archive until one works.
  917. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
  918. m4_if([$1], [v7],
  919. [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
  920. [m4_case([$1],
  921. [ustar],
  922. [# The POSIX 1988 'ustar' format is defined with fixed-size fields.
  923. # There is notably a 21 bits limit for the UID and the GID. In fact,
  924. # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
  925. # and bug#13588).
  926. am_max_uid=2097151 # 2^21 - 1
  927. am_max_gid=$am_max_uid
  928. # The $UID and $GID variables are not portable, so we need to resort
  929. # to the POSIX-mandated id(1) utility. Errors in the 'id' calls
  930. # below are definitely unexpected, so allow the users to see them
  931. # (that is, avoid stderr redirection).
  932. am_uid=`id -u || echo unknown`
  933. am_gid=`id -g || echo unknown`
  934. AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
  935. if test $am_uid -le $am_max_uid; then
  936. AC_MSG_RESULT([yes])
  937. else
  938. AC_MSG_RESULT([no])
  939. _am_tools=none
  940. fi
  941. AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
  942. if test $am_gid -le $am_max_gid; then
  943. AC_MSG_RESULT([yes])
  944. else
  945. AC_MSG_RESULT([no])
  946. _am_tools=none
  947. fi],
  948. [pax],
  949. [],
  950. [m4_fatal([Unknown tar format])])
  951. AC_MSG_CHECKING([how to create a $1 tar archive])
  952. # Go ahead even if we have the value already cached. We do so because we
  953. # need to set the values for the 'am__tar' and 'am__untar' variables.
  954. _am_tools=${am_cv_prog_tar_$1-$_am_tools}
  955. for _am_tool in $_am_tools; do
  956. case $_am_tool in
  957. gnutar)
  958. for _am_tar in tar gnutar gtar; do
  959. AM_RUN_LOG([$_am_tar --version]) && break
  960. done
  961. am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
  962. am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
  963. am__untar="$_am_tar -xf -"
  964. ;;
  965. plaintar)
  966. # Must skip GNU tar: if it does not support --format= it doesn't create
  967. # ustar tarball either.
  968. (tar --version) >/dev/null 2>&1 && continue
  969. am__tar='tar chf - "$$tardir"'
  970. am__tar_='tar chf - "$tardir"'
  971. am__untar='tar xf -'
  972. ;;
  973. pax)
  974. am__tar='pax -L -x $1 -w "$$tardir"'
  975. am__tar_='pax -L -x $1 -w "$tardir"'
  976. am__untar='pax -r'
  977. ;;
  978. cpio)
  979. am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
  980. am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
  981. am__untar='cpio -i -H $1 -d'
  982. ;;
  983. none)
  984. am__tar=false
  985. am__tar_=false
  986. am__untar=false
  987. ;;
  988. esac
  989. # If the value was cached, stop now. We just wanted to have am__tar
  990. # and am__untar set.
  991. test -n "${am_cv_prog_tar_$1}" && break
  992. # tar/untar a dummy directory, and stop if the command works.
  993. rm -rf conftest.dir
  994. mkdir conftest.dir
  995. echo GrepMe > conftest.dir/file
  996. AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
  997. rm -rf conftest.dir
  998. if test -s conftest.tar; then
  999. AM_RUN_LOG([$am__untar <conftest.tar])
  1000. AM_RUN_LOG([cat conftest.dir/file])
  1001. grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
  1002. fi
  1003. done
  1004. rm -rf conftest.dir
  1005. AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
  1006. AC_MSG_RESULT([$am_cv_prog_tar_$1])])
  1007. AC_SUBST([am__tar])
  1008. AC_SUBST([am__untar])
  1009. ]) # _AM_PROG_TAR
  1010. dnl Autoconf macros for libgcrypt
  1011. dnl Copyright (C) 2002, 2004 Free Software Foundation, Inc.
  1012. dnl
  1013. dnl This file is free software; as a special exception the author gives
  1014. dnl unlimited permission to copy and/or distribute it, with or without
  1015. dnl modifications, as long as this notice is preserved.
  1016. dnl
  1017. dnl This file is distributed in the hope that it will be useful, but
  1018. dnl WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
  1019. dnl implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  1020. dnl AM_PATH_LIBGCRYPT([MINIMUM-VERSION,
  1021. dnl [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND ]]])
  1022. dnl Test for libgcrypt and define LIBGCRYPT_CFLAGS and LIBGCRYPT_LIBS.
  1023. dnl MINIMUN-VERSION is a string with the version number optionalliy prefixed
  1024. dnl with the API version to also check the API compatibility. Example:
  1025. dnl a MINIMUN-VERSION of 1:1.2.5 won't pass the test unless the installed
  1026. dnl version of libgcrypt is at least 1.2.5 *and* the API number is 1. Using
  1027. dnl this features allows to prevent build against newer versions of libgcrypt
  1028. dnl with a changed API.
  1029. dnl
  1030. AC_DEFUN([AM_PATH_LIBGCRYPT],
  1031. [ AC_ARG_WITH(libgcrypt-prefix,
  1032. AC_HELP_STRING([--with-libgcrypt-prefix=PFX],
  1033. [prefix where LIBGCRYPT is installed (optional)]),
  1034. libgcrypt_config_prefix="$withval", libgcrypt_config_prefix="")
  1035. if test x$libgcrypt_config_prefix != x ; then
  1036. if test x${LIBGCRYPT_CONFIG+set} != xset ; then
  1037. LIBGCRYPT_CONFIG=$libgcrypt_config_prefix/bin/libgcrypt-config
  1038. fi
  1039. fi
  1040. AC_PATH_TOOL(LIBGCRYPT_CONFIG, libgcrypt-config, no)
  1041. tmp=ifelse([$1], ,1:1.2.0,$1)
  1042. if echo "$tmp" | grep ':' >/dev/null 2>/dev/null ; then
  1043. req_libgcrypt_api=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\1/'`
  1044. min_libgcrypt_version=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\2/'`
  1045. else
  1046. req_libgcrypt_api=0
  1047. min_libgcrypt_version="$tmp"
  1048. fi
  1049. AC_MSG_CHECKING(for LIBGCRYPT - version >= $min_libgcrypt_version)
  1050. ok=no
  1051. if test "$LIBGCRYPT_CONFIG" != "no" ; then
  1052. req_major=`echo $min_libgcrypt_version | \
  1053. sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\1/'`
  1054. req_minor=`echo $min_libgcrypt_version | \
  1055. sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\2/'`
  1056. req_micro=`echo $min_libgcrypt_version | \
  1057. sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'`
  1058. libgcrypt_config_version=`$LIBGCRYPT_CONFIG --version`
  1059. major=`echo $libgcrypt_config_version | \
  1060. sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'`
  1061. minor=`echo $libgcrypt_config_version | \
  1062. sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\2/'`
  1063. micro=`echo $libgcrypt_config_version | \
  1064. sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\3/'`
  1065. if test "$major" -gt "$req_major"; then
  1066. ok=yes
  1067. else
  1068. if test "$major" -eq "$req_major"; then
  1069. if test "$minor" -gt "$req_minor"; then
  1070. ok=yes
  1071. else
  1072. if test "$minor" -eq "$req_minor"; then
  1073. if test "$micro" -ge "$req_micro"; then
  1074. ok=yes
  1075. fi
  1076. fi
  1077. fi
  1078. fi
  1079. fi
  1080. fi
  1081. if test $ok = yes; then
  1082. AC_MSG_RESULT([yes ($libgcrypt_config_version)])
  1083. else
  1084. AC_MSG_RESULT(no)
  1085. fi
  1086. if test $ok = yes; then
  1087. # If we have a recent libgcrypt, we should also check that the
  1088. # API is compatible
  1089. if test "$req_libgcrypt_api" -gt 0 ; then
  1090. tmp=`$LIBGCRYPT_CONFIG --api-version 2>/dev/null || echo 0`
  1091. if test "$tmp" -gt 0 ; then
  1092. AC_MSG_CHECKING([LIBGCRYPT API version])
  1093. if test "$req_libgcrypt_api" -eq "$tmp" ; then
  1094. AC_MSG_RESULT([okay])
  1095. else
  1096. ok=no
  1097. AC_MSG_RESULT([does not match. want=$req_libgcrypt_api got=$tmp])
  1098. fi
  1099. fi
  1100. fi
  1101. fi
  1102. if test $ok = yes; then
  1103. LIBGCRYPT_CFLAGS=`$LIBGCRYPT_CONFIG --cflags`
  1104. LIBGCRYPT_LIBS=`$LIBGCRYPT_CONFIG --libs`
  1105. ifelse([$2], , :, [$2])
  1106. if test x"$host" != x ; then
  1107. libgcrypt_config_host=`$LIBGCRYPT_CONFIG --host 2>/dev/null || echo none`
  1108. if test x"$libgcrypt_config_host" != xnone ; then
  1109. if test x"$libgcrypt_config_host" != x"$host" ; then
  1110. AC_MSG_WARN([[
  1111. ***
  1112. *** The config script $LIBGCRYPT_CONFIG was
  1113. *** built for $libgcrypt_config_host and thus may not match the
  1114. *** used host $host.
  1115. *** You may want to use the configure option --with-libgcrypt-prefix
  1116. *** to specify a matching config script.
  1117. ***]])
  1118. fi
  1119. fi
  1120. fi
  1121. else
  1122. LIBGCRYPT_CFLAGS=""
  1123. LIBGCRYPT_LIBS=""
  1124. ifelse([$3], , :, [$3])
  1125. fi
  1126. AC_SUBST(LIBGCRYPT_CFLAGS)
  1127. AC_SUBST(LIBGCRYPT_LIBS)
  1128. ])
  1129. # nls.m4 serial 5 (gettext-0.18)
  1130. dnl Copyright (C) 1995-2003, 2005-2006, 2008-2013 Free Software Foundation,
  1131. dnl Inc.
  1132. dnl This file is free software; the Free Software Foundation
  1133. dnl gives unlimited permission to copy and/or distribute it,
  1134. dnl with or without modifications, as long as this notice is preserved.
  1135. dnl
  1136. dnl This file can can be used in projects which are not available under
  1137. dnl the GNU General Public License or the GNU Library General Public
  1138. dnl License but which still want to provide support for the GNU gettext
  1139. dnl functionality.
  1140. dnl Please note that the actual code of the GNU gettext library is covered
  1141. dnl by the GNU Library General Public License, and the rest of the GNU
  1142. dnl gettext package package is covered by the GNU General Public License.
  1143. dnl They are *not* in the public domain.
  1144. dnl Authors:
  1145. dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
  1146. dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
  1147. AC_PREREQ([2.50])
  1148. AC_DEFUN([AM_NLS],
  1149. [
  1150. AC_MSG_CHECKING([whether NLS is requested])
  1151. dnl Default is enabled NLS
  1152. AC_ARG_ENABLE([nls],
  1153. [ --disable-nls do not use Native Language Support],
  1154. USE_NLS=$enableval, USE_NLS=yes)
  1155. AC_MSG_RESULT([$USE_NLS])
  1156. AC_SUBST([USE_NLS])
  1157. ])
  1158. # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
  1159. # serial 1 (pkg-config-0.24)
  1160. #
  1161. # Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
  1162. #
  1163. # This program is free software; you can redistribute it and/or modify
  1164. # it under the terms of the GNU General Public License as published by
  1165. # the Free Software Foundation; either version 2 of the License, or
  1166. # (at your option) any later version.
  1167. #
  1168. # This program is distributed in the hope that it will be useful, but
  1169. # WITHOUT ANY WARRANTY; without even the implied warranty of
  1170. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  1171. # General Public License for more details.
  1172. #
  1173. # You should have received a copy of the GNU General Public License
  1174. # along with this program; if not, write to the Free Software
  1175. # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  1176. #
  1177. # As a special exception to the GNU General Public License, if you
  1178. # distribute this file as part of a program that contains a
  1179. # configuration script generated by Autoconf, you may include it under
  1180. # the same distribution terms that you use for the rest of that program.
  1181. # PKG_PROG_PKG_CONFIG([MIN-VERSION])
  1182. # ----------------------------------
  1183. AC_DEFUN([PKG_PROG_PKG_CONFIG],
  1184. [m4_pattern_forbid([^_?PKG_[A-Z_]+$])
  1185. m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
  1186. m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
  1187. AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
  1188. AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
  1189. AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
  1190. if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
  1191. AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
  1192. fi
  1193. if test -n "$PKG_CONFIG"; then
  1194. _pkg_min_version=m4_default([$1], [0.9.0])
  1195. AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
  1196. if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
  1197. AC_MSG_RESULT([yes])
  1198. else
  1199. AC_MSG_RESULT([no])
  1200. PKG_CONFIG=""
  1201. fi
  1202. fi[]dnl
  1203. ])# PKG_PROG_PKG_CONFIG
  1204. # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
  1205. #
  1206. # Check to see whether a particular set of modules exists. Similar
  1207. # to PKG_CHECK_MODULES(), but does not set variables or print errors.
  1208. #
  1209. # Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
  1210. # only at the first occurence in configure.ac, so if the first place
  1211. # it's called might be skipped (such as if it is within an "if", you
  1212. # have to call PKG_CHECK_EXISTS manually
  1213. # --------------------------------------------------------------
  1214. AC_DEFUN([PKG_CHECK_EXISTS],
  1215. [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
  1216. if test -n "$PKG_CONFIG" && \
  1217. AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
  1218. m4_default([$2], [:])
  1219. m4_ifvaln([$3], [else
  1220. $3])dnl
  1221. fi])
  1222. # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
  1223. # ---------------------------------------------
  1224. m4_define([_PKG_CONFIG],
  1225. [if test -n "$$1"; then
  1226. pkg_cv_[]$1="$$1"
  1227. elif test -n "$PKG_CONFIG"; then
  1228. PKG_CHECK_EXISTS([$3],
  1229. [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
  1230. test "x$?" != "x0" && pkg_failed=yes ],
  1231. [pkg_failed=yes])
  1232. else
  1233. pkg_failed=untried
  1234. fi[]dnl
  1235. ])# _PKG_CONFIG
  1236. # _PKG_SHORT_ERRORS_SUPPORTED
  1237. # -----------------------------
  1238. AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
  1239. [AC_REQUIRE([PKG_PROG_PKG_CONFIG])
  1240. if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
  1241. _pkg_short_errors_supported=yes
  1242. else
  1243. _pkg_short_errors_supported=no
  1244. fi[]dnl
  1245. ])# _PKG_SHORT_ERRORS_SUPPORTED
  1246. # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
  1247. # [ACTION-IF-NOT-FOUND])
  1248. #
  1249. #
  1250. # Note that if there is a possibility the first call to
  1251. # PKG_CHECK_MODULES might not happen, you should be sure to include an
  1252. # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
  1253. #
  1254. #
  1255. # --------------------------------------------------------------
  1256. AC_DEFUN([PKG_CHECK_MODULES],
  1257. [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
  1258. AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
  1259. AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
  1260. pkg_failed=no
  1261. AC_MSG_CHECKING([for $1])
  1262. _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
  1263. _PKG_CONFIG([$1][_LIBS], [libs], [$2])
  1264. m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
  1265. and $1[]_LIBS to avoid the need to call pkg-config.
  1266. See the pkg-config man page for more details.])
  1267. if test $pkg_failed = yes; then
  1268. AC_MSG_RESULT([no])
  1269. _PKG_SHORT_ERRORS_SUPPORTED
  1270. if test $_pkg_short_errors_supported = yes; then
  1271. $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
  1272. else
  1273. $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
  1274. fi
  1275. # Put the nasty error message in config.log where it belongs
  1276. echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
  1277. m4_default([$4], [AC_MSG_ERROR(
  1278. [Package requirements ($2) were not met:
  1279. $$1_PKG_ERRORS
  1280. Consider adjusting the PKG_CONFIG_PATH environment variable if you
  1281. installed software in a non-standard prefix.
  1282. _PKG_TEXT])[]dnl
  1283. ])
  1284. elif test $pkg_failed = untried; then
  1285. AC_MSG_RESULT([no])
  1286. m4_default([$4], [AC_MSG_FAILURE(
  1287. [The pkg-config script could not be found or is too old. Make sure it
  1288. is in your PATH or set the PKG_CONFIG environment variable to the full
  1289. path to pkg-config.
  1290. _PKG_TEXT
  1291. To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
  1292. ])
  1293. else
  1294. $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
  1295. $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
  1296. AC_MSG_RESULT([yes])
  1297. $3
  1298. fi[]dnl
  1299. ])# PKG_CHECK_MODULES
  1300. # PKG_INSTALLDIR(DIRECTORY)
  1301. # -------------------------
  1302. # Substitutes the variable pkgconfigdir as the location where a module
  1303. # should install pkg-config .pc files. By default the directory is
  1304. # $libdir/pkgconfig, but the default can be changed by passing
  1305. # DIRECTORY. The user can override through the --with-pkgconfigdir
  1306. # parameter.
  1307. AC_DEFUN([PKG_INSTALLDIR],
  1308. [m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
  1309. m4_pushdef([pkg_description],
  1310. [pkg-config installation directory @<:@]pkg_default[@:>@])
  1311. AC_ARG_WITH([pkgconfigdir],
  1312. [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],,
  1313. [with_pkgconfigdir=]pkg_default)
  1314. AC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
  1315. m4_popdef([pkg_default])
  1316. m4_popdef([pkg_description])
  1317. ]) dnl PKG_INSTALLDIR
  1318. # PKG_NOARCH_INSTALLDIR(DIRECTORY)
  1319. # -------------------------
  1320. # Substitutes the variable noarch_pkgconfigdir as the location where a
  1321. # module should install arch-independent pkg-config .pc files. By
  1322. # default the directory is $datadir/pkgconfig, but the default can be
  1323. # changed by passing DIRECTORY. The user can override through the
  1324. # --with-noarch-pkgconfigdir parameter.
  1325. AC_DEFUN([PKG_NOARCH_INSTALLDIR],
  1326. [m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
  1327. m4_pushdef([pkg_description],
  1328. [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@])
  1329. AC_ARG_WITH([noarch-pkgconfigdir],
  1330. [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],,
  1331. [with_noarch_pkgconfigdir=]pkg_default)
  1332. AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir])
  1333. m4_popdef([pkg_default])
  1334. m4_popdef([pkg_description])
  1335. ]) dnl PKG_NOARCH_INSTALLDIR
  1336. # PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
  1337. # [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
  1338. # -------------------------------------------
  1339. # Retrieves the value of the pkg-config variable for the given module.
  1340. AC_DEFUN([PKG_CHECK_VAR],
  1341. [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
  1342. AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl
  1343. _PKG_CONFIG([$1], [variable="][$3]["], [$2])
  1344. AS_VAR_COPY([$1], [pkg_cv_][$1])
  1345. AS_VAR_IF([$1], [""], [$5], [$4])dnl
  1346. ])# PKG_CHECK_VAR
  1347. dnl GNOME_CODE_COVERAGE
  1348. dnl
  1349. dnl Defines CODE_COVERAGE_CFLAGS and CODE_COVERAGE_LDFLAGS which should be
  1350. dnl included in the CFLAGS and LIBS/LDFLAGS variables of every build target
  1351. dnl (program or library) which should be built with code coverage support.
  1352. dnl Also defines GNOME_CODE_COVERAGE_RULES which should be substituted in your
  1353. dnl Makefile; and $enable_code_coverage which can be used in subsequent
  1354. dnl configure output.
  1355. dnl
  1356. dnl Note that all optimisation flags in CFLAGS must be disabled when code
  1357. dnl coverage is enabled.
  1358. dnl
  1359. dnl Derived from Makefile.decl in GLib, originally licenced under LGPLv2.1+.
  1360. dnl This file is licenced under LGPLv2.1+.
  1361. dnl
  1362. dnl Usage example:
  1363. dnl configure.ac:
  1364. dnl GNOME_CODE_COVERAGE
  1365. dnl
  1366. dnl Makefile.am:
  1367. dnl @GNOME_CODE_COVERAGE_RULES@
  1368. dnl my_program_LIBS = … $(CODE_COVERAGE_LDFLAGS) …
  1369. dnl my_program_CFLAGS = … $(CODE_COVERAGE_CFLAGS) …
  1370. dnl
  1371. dnl This results in a “check-code-coverage” rule being added to any Makefile.am
  1372. dnl which includes “@GNOME_CODE_COVERAGE_RULES@” (assuming the module has been
  1373. dnl configured with --enable-code-coverage). Running `make check-code-coverage`
  1374. dnl in that directory will run the module’s test suite (`make check`) and build
  1375. dnl a code coverage report detailing the code which was touched, then print the
  1376. dnl URI for the report.
  1377. AC_DEFUN([GNOME_CODE_COVERAGE],[
  1378. dnl Check for --enable-code-coverage
  1379. AC_MSG_CHECKING([whether to build with code coverage support])
  1380. AC_ARG_ENABLE([code-coverage], AS_HELP_STRING([--enable-code-coverage], [Whether to enable code coverage support]),, enable_code_coverage=no)
  1381. AM_CONDITIONAL([CODE_COVERAGE_ENABLED], [test x$enable_code_coverage = xyes])
  1382. AC_SUBST([CODE_COVERAGE_ENABLED], [$enable_code_coverage])
  1383. AC_MSG_RESULT($enable_code_coverage)
  1384. AS_IF([ test "$enable_code_coverage" = "yes" ], [
  1385. dnl Check if gcc is being used
  1386. AS_IF([ test "$GCC" = "no" ], [
  1387. AC_MSG_ERROR([not compiling with gcc, which is required for gcov code coverage])
  1388. ])
  1389. # List of supported lcov versions.
  1390. lcov_version_list="1.6 1.7 1.8 1.9 1.10"
  1391. AC_CHECK_PROG([LCOV], [lcov], [lcov])
  1392. AC_CHECK_PROG([GENHTML], [genhtml], [genhtml])
  1393. AS_IF([ test "$LCOV" ], [
  1394. AC_CACHE_CHECK([for lcov version], gnome_cv_lcov_version, [
  1395. gnome_cv_lcov_version=invalid
  1396. lcov_version=`$LCOV -v 2>/dev/null | $SED -e 's/^.* //'`
  1397. for lcov_check_version in $lcov_version_list; do
  1398. if test "$lcov_version" = "$lcov_check_version"; then
  1399. gnome_cv_lcov_version="$lcov_check_version (ok)"
  1400. fi
  1401. done
  1402. ])
  1403. ], [
  1404. lcov_msg="To enable code coverage reporting you must have one of the following lcov versions installed: $lcov_version_list"
  1405. AC_MSG_ERROR([$lcov_msg])
  1406. ])
  1407. case $gnome_cv_lcov_version in
  1408. ""|invalid[)]
  1409. lcov_msg="You must have one of the following versions of lcov: $lcov_version_list (found: $lcov_version)."
  1410. AC_MSG_ERROR([$lcov_msg])
  1411. LCOV="exit 0;"
  1412. ;;
  1413. esac
  1414. AS_IF([ test -z "$GENHTML" ], [
  1415. AC_MSG_ERROR([Could not find genhtml from the lcov package])
  1416. ])
  1417. dnl Build the code coverage flags
  1418. CODE_COVERAGE_CFLAGS="-O0 -g -fprofile-arcs -ftest-coverage"
  1419. CODE_COVERAGE_LDFLAGS="-lgcov"
  1420. AC_SUBST([CODE_COVERAGE_CFLAGS])
  1421. AC_SUBST([CODE_COVERAGE_LDFLAGS])
  1422. ])
  1423. GNOME_CODE_COVERAGE_RULES='
  1424. # Code coverage
  1425. #
  1426. # Optional:
  1427. # - CODE_COVERAGE_DIRECTORY: Top-level directory for code coverage reporting.
  1428. # (Default: $(top_builddir))
  1429. # - CODE_COVERAGE_OUTPUT_FILE: Filename and path for the .info file generated
  1430. # by lcov for code coverage. (Default:
  1431. # $(PACKAGE_NAME)-$(PACKAGE_VERSION)-coverage.info)
  1432. # - CODE_COVERAGE_OUTPUT_DIRECTORY: Directory for generated code coverage
  1433. # reports to be created. (Default:
  1434. # $(PACKAGE_NAME)-$(PACKAGE_VERSION)-coverage)
  1435. # - CODE_COVERAGE_LCOV_OPTIONS: Extra options to pass to the lcov instance.
  1436. # (Default: empty)
  1437. # - CODE_COVERAGE_GENHTML_OPTIONS: Extra options to pass to the genhtml
  1438. # instance. (Default: empty)
  1439. # - CODE_COVERAGE_IGNORE_PATTERN: Extra glob pattern of files to ignore
  1440. #
  1441. # The generated report will be titled using the $(PACKAGE_NAME) and
  1442. # $(PACKAGE_VERSION). In order to add the current git hash to the title,
  1443. # use the git-version-gen script, available online.
  1444. # Optional variables
  1445. CODE_COVERAGE_DIRECTORY ?= $(top_builddir)
  1446. CODE_COVERAGE_OUTPUT_FILE ?= $(PACKAGE_NAME)-$(PACKAGE_VERSION)-coverage.info
  1447. CODE_COVERAGE_OUTPUT_DIRECTORY ?= $(PACKAGE_NAME)-$(PACKAGE_VERSION)-coverage
  1448. CODE_COVERAGE_LCOV_OPTIONS ?=
  1449. CODE_COVERAGE_GENHTML_OPTIONS ?=
  1450. CODE_COVERAGE_IGNORE_PATTERN ?=
  1451. code_coverage_quiet = $(code_coverage_quiet_$(V))
  1452. code_coverage_quiet_ = $(code_coverage_quiet_$(AM_DEFAULT_VERBOSITY))
  1453. code_coverage_quiet_0 = --quiet
  1454. # Use recursive makes in order to ignore errors during check
  1455. check-code-coverage:
  1456. ifeq ($(CODE_COVERAGE_ENABLED),yes)
  1457. -$(MAKE) $(AM_MAKEFLAGS) -k check
  1458. $(MAKE) $(AM_MAKEFLAGS) code-coverage-capture
  1459. else
  1460. @echo "Need to reconfigure with --enable-code-coverage"
  1461. endif
  1462. # Capture code coverage data
  1463. code-coverage-capture: code-coverage-capture-hook
  1464. ifeq ($(CODE_COVERAGE_ENABLED),yes)
  1465. $(LCOV) $(code_coverage_quiet) --directory $(CODE_COVERAGE_DIRECTORY) --capture --output-file "$(CODE_COVERAGE_OUTPUT_FILE).tmp" --test-name "$(PACKAGE_NAME)-$(PACKAGE_VERSION)" --no-checksum --compat-libtool $(CODE_COVERAGE_LCOV_OPTIONS)
  1466. $(LCOV) $(code_coverage_quiet) --directory $(CODE_COVERAGE_DIRECTORY) --remove "$(CODE_COVERAGE_OUTPUT_FILE).tmp" "/tmp/*" $(CODE_COVERAGE_IGNORE_PATTERN) --output-file "$(CODE_COVERAGE_OUTPUT_FILE)"
  1467. -@rm -f $(CODE_COVERAGE_OUTPUT_FILE).tmp
  1468. LANG=C $(GENHTML) $(code_coverage_quiet) --prefix $(CODE_COVERAGE_DIRECTORY) --output-directory "$(CODE_COVERAGE_OUTPUT_DIRECTORY)" --title "$(PACKAGE_NAME)-$(PACKAGE_VERSION) Code Coverage" --legend --show-details "$(CODE_COVERAGE_OUTPUT_FILE)" $(CODE_COVERAGE_GENHTML_OPTIONS)
  1469. @echo "file://$(abs_builddir)/$(CODE_COVERAGE_OUTPUT_DIRECTORY)/index.html"
  1470. else
  1471. @echo "Need to reconfigure with --enable-code-coverage"
  1472. endif
  1473. # Hook rule executed before code-coverage-capture, overridable by the user
  1474. code-coverage-capture-hook:
  1475. ifeq ($(CODE_COVERAGE_ENABLED),yes)
  1476. clean: code-coverage-clean
  1477. code-coverage-clean:
  1478. -$(LCOV) --directory $(top_builddir) -z
  1479. -rm -rf $(CODE_COVERAGE_OUTPUT_FILE) $(CODE_COVERAGE_OUTPUT_FILE).tmp $(CODE_COVERAGE_OUTPUT_DIRECTORY)
  1480. -find . -name "*.gcda" -o -name "*.gcov" -delete
  1481. endif
  1482. GITIGNOREFILES ?=
  1483. GITIGNOREFILES += $(CODE_COVERAGE_OUTPUT_FILE) $(CODE_COVERAGE_OUTPUT_DIRECTORY)
  1484. DISTCHECK_CONFIGURE_FLAGS ?=
  1485. DISTCHECK_CONFIGURE_FLAGS += --disable-code-coverage
  1486. .PHONY: check-code-coverage code-coverage-capture code-coverage-capture-hook code-coverage-clean
  1487. '
  1488. AC_SUBST([GNOME_CODE_COVERAGE_RULES])
  1489. m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([GNOME_CODE_COVERAGE_RULES])])
  1490. ])
  1491. # gnome-common.m4
  1492. #
  1493. # serial 3
  1494. #
  1495. dnl GNOME_COMMON_INIT
  1496. AU_DEFUN([GNOME_COMMON_INIT],
  1497. [
  1498. dnl this macro should come after AC_CONFIG_MACRO_DIR
  1499. AC_BEFORE([AC_CONFIG_MACRO_DIR], [$0])
  1500. dnl ensure that when the Automake generated makefile calls aclocal,
  1501. dnl it honours the $ACLOCAL_FLAGS environment variable
  1502. ACLOCAL_AMFLAGS="\${ACLOCAL_FLAGS}"
  1503. if test -n "$ac_macro_dir"; then
  1504. ACLOCAL_AMFLAGS="-I $ac_macro_dir $ACLOCAL_AMFLAGS"
  1505. fi
  1506. AC_SUBST([ACLOCAL_AMFLAGS])
  1507. ],
  1508. [[$0: This macro is deprecated. You should set put "ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}"
  1509. in your top-level Makefile.am, instead, where "m4" is the macro directory set
  1510. with AC_CONFIG_MACRO_DIR() in your configure.ac]])
  1511. AC_DEFUN([GNOME_DEBUG_CHECK],
  1512. [
  1513. AC_ARG_ENABLE([debug],
  1514. AC_HELP_STRING([--enable-debug],
  1515. [turn on debugging]),,
  1516. [enable_debug=no])
  1517. if test x$enable_debug = xyes ; then
  1518. AC_DEFINE(GNOME_ENABLE_DEBUG, 1,
  1519. [Enable additional debugging at the expense of performance and size])
  1520. fi
  1521. ])
  1522. dnl GNOME_MAINTAINER_MODE_DEFINES ()
  1523. dnl define DISABLE_DEPRECATED
  1524. dnl
  1525. AC_DEFUN([GNOME_MAINTAINER_MODE_DEFINES],
  1526. [
  1527. AC_REQUIRE([AM_MAINTAINER_MODE])
  1528. DISABLE_DEPRECATED=""
  1529. if test $USE_MAINTAINER_MODE = yes; then
  1530. DOMAINS="GCONF BONOBO BONOBO_UI GNOME LIBGLADE GNOME_VFS WNCK LIBSOUP"
  1531. for DOMAIN in $DOMAINS; do
  1532. DISABLE_DEPRECATED="$DISABLE_DEPRECATED -D${DOMAIN}_DISABLE_DEPRECATED -D${DOMAIN}_DISABLE_SINGLE_INCLUDES"
  1533. done
  1534. fi
  1535. AC_SUBST(DISABLE_DEPRECATED)
  1536. ])
  1537. # gnome-compiler-flags.m4
  1538. #
  1539. # serial 2
  1540. #
  1541. dnl GNOME_COMPILE_WARNINGS
  1542. dnl Turn on many useful compiler warnings and substitute the result into
  1543. dnl WARN_CFLAGS
  1544. dnl For now, only works on GCC
  1545. dnl Pass the default value of the --enable-compile-warnings configure option as
  1546. dnl the first argument to the macro, defaulting to 'yes'.
  1547. dnl Additional warning/error flags can be passed as an optional second argument.
  1548. dnl
  1549. dnl For example: GNOME_COMPILE_WARNINGS([maximum],[-Werror=some-flag -Wfoobar])
  1550. AC_DEFUN([GNOME_COMPILE_WARNINGS],[
  1551. dnl ******************************
  1552. dnl More compiler warnings
  1553. dnl ******************************
  1554. AC_ARG_ENABLE(compile-warnings,
  1555. AS_HELP_STRING([--enable-compile-warnings=@<:@no/minimum/yes/maximum/error@:>@],
  1556. [Turn on compiler warnings]),,
  1557. [enable_compile_warnings="m4_default([$1],[yes])"])
  1558. if test "x$GCC" != xyes; then
  1559. enable_compile_warnings=no
  1560. fi
  1561. warning_flags=
  1562. realsave_CFLAGS="$CFLAGS"
  1563. dnl These are warning flags that aren't marked as fatal. Can be
  1564. dnl overridden on a per-project basis with -Wno-foo.
  1565. base_warn_flags=" \
  1566. -Wall \
  1567. -Wstrict-prototypes \
  1568. -Wnested-externs \
  1569. "
  1570. dnl These compiler flags typically indicate very broken or suspicious
  1571. dnl code. Some of them such as implicit-function-declaration are
  1572. dnl just not default because gcc compiles a lot of legacy code.
  1573. dnl We choose to make this set into explicit errors.
  1574. base_error_flags=" \
  1575. -Werror=missing-prototypes \
  1576. -Werror=implicit-function-declaration \
  1577. -Werror=pointer-arith \
  1578. -Werror=init-self \
  1579. -Werror=format-security \
  1580. -Werror=format=2 \
  1581. -Werror=missing-include-dirs \
  1582. "
  1583. dnl Additional warning or error flags provided by the module author to
  1584. dnl allow stricter standards to be imposed on a per-module basis.
  1585. dnl The author can pass -W or -Werror flags here as they see fit.
  1586. additional_flags="m4_default([$2],[])"
  1587. case "$enable_compile_warnings" in
  1588. no)
  1589. warning_flags=
  1590. ;;
  1591. minimum)
  1592. warning_flags="-Wall"
  1593. ;;
  1594. yes|maximum|error)
  1595. warning_flags="$base_warn_flags $base_error_flags $additional_flags"
  1596. ;;
  1597. *)
  1598. AC_MSG_ERROR(Unknown argument '$enable_compile_warnings' to --enable-compile-warnings)
  1599. ;;
  1600. esac
  1601. if test "$enable_compile_warnings" = "error" ; then
  1602. warning_flags="$warning_flags -Werror"
  1603. fi
  1604. dnl Check whether GCC supports the warning options
  1605. for option in $warning_flags; do
  1606. save_CFLAGS="$CFLAGS"
  1607. CFLAGS="$CFLAGS $option"
  1608. AC_MSG_CHECKING([whether gcc understands $option])
  1609. AC_TRY_COMPILE([], [],
  1610. has_option=yes,
  1611. has_option=no,)
  1612. CFLAGS="$save_CFLAGS"
  1613. AC_MSG_RESULT([$has_option])
  1614. if test $has_option = yes; then
  1615. tested_warning_flags="$tested_warning_flags $option"
  1616. fi
  1617. unset has_option
  1618. unset save_CFLAGS
  1619. done
  1620. unset option
  1621. CFLAGS="$realsave_CFLAGS"
  1622. AC_MSG_CHECKING(what warning flags to pass to the C compiler)
  1623. AC_MSG_RESULT($tested_warning_flags)
  1624. AC_ARG_ENABLE(iso-c,
  1625. AS_HELP_STRING([--enable-iso-c],
  1626. [Try to warn if code is not ISO C ]),,
  1627. [enable_iso_c=no])
  1628. AC_MSG_CHECKING(what language compliance flags to pass to the C compiler)
  1629. complCFLAGS=
  1630. if test "x$enable_iso_c" != "xno"; then
  1631. if test "x$GCC" = "xyes"; then
  1632. case " $CFLAGS " in
  1633. *[\ \ ]-ansi[\ \ ]*) ;;
  1634. *) complCFLAGS="$complCFLAGS -ansi" ;;
  1635. esac
  1636. case " $CFLAGS " in
  1637. *[\ \ ]-pedantic[\ \ ]*) ;;
  1638. *) complCFLAGS="$complCFLAGS -pedantic" ;;
  1639. esac
  1640. fi
  1641. fi
  1642. AC_MSG_RESULT($complCFLAGS)
  1643. WARN_CFLAGS="$tested_warning_flags $complCFLAGS"
  1644. AC_SUBST(WARN_CFLAGS)
  1645. ])
  1646. dnl For C++, do basically the same thing.
  1647. AC_DEFUN([GNOME_CXX_WARNINGS],[
  1648. AC_ARG_ENABLE(cxx-warnings,
  1649. AS_HELP_STRING([--enable-cxx-warnings=@<:@no/minimum/yes@:>@]
  1650. [Turn on compiler warnings.]),,
  1651. [enable_cxx_warnings="m4_default([$1],[minimum])"])
  1652. AC_MSG_CHECKING(what warning flags to pass to the C++ compiler)
  1653. warnCXXFLAGS=
  1654. if test "x$GXX" != xyes; then
  1655. enable_cxx_warnings=no
  1656. fi
  1657. if test "x$enable_cxx_warnings" != "xno"; then
  1658. if test "x$GXX" = "xyes"; then
  1659. case " $CXXFLAGS " in
  1660. *[\ \ ]-Wall[\ \ ]*) ;;
  1661. *) warnCXXFLAGS="-Wall -Wno-unused" ;;
  1662. esac
  1663. ## -W is not all that useful. And it cannot be controlled
  1664. ## with individual -Wno-xxx flags, unlike -Wall
  1665. if test "x$enable_cxx_warnings" = "xyes"; then
  1666. warnCXXFLAGS="$warnCXXFLAGS -Wshadow -Woverloaded-virtual"
  1667. fi
  1668. fi
  1669. fi
  1670. AC_MSG_RESULT($warnCXXFLAGS)
  1671. AC_ARG_ENABLE(iso-cxx,
  1672. AS_HELP_STRING([--enable-iso-cxx],
  1673. [Try to warn if code is not ISO C++ ]),,
  1674. [enable_iso_cxx=no])
  1675. AC_MSG_CHECKING(what language compliance flags to pass to the C++ compiler)
  1676. complCXXFLAGS=
  1677. if test "x$enable_iso_cxx" != "xno"; then
  1678. if test "x$GXX" = "xyes"; then
  1679. case " $CXXFLAGS " in
  1680. *[\ \ ]-ansi[\ \ ]*) ;;
  1681. *) complCXXFLAGS="$complCXXFLAGS -ansi" ;;
  1682. esac
  1683. case " $CXXFLAGS " in
  1684. *[\ \ ]-pedantic[\ \ ]*) ;;
  1685. *) complCXXFLAGS="$complCXXFLAGS -pedantic" ;;
  1686. esac
  1687. fi
  1688. fi
  1689. AC_MSG_RESULT($complCXXFLAGS)
  1690. WARN_CXXFLAGS="$CXXFLAGS $warnCXXFLAGS $complCXXFLAGS"
  1691. AC_SUBST(WARN_CXXFLAGS)
  1692. ])
  1693. dnl -*- mode: autoconf -*-
  1694. dnl Copyright 2009 Johan Dahlin
  1695. dnl
  1696. dnl This file is free software; the author(s) gives unlimited
  1697. dnl permission to copy and/or distribute it, with or without
  1698. dnl modifications, as long as this notice is preserved.
  1699. dnl
  1700. # serial 1
  1701. m4_define([_GOBJECT_INTROSPECTION_CHECK_INTERNAL],
  1702. [
  1703. AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first
  1704. AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first
  1705. AC_BEFORE([LT_INIT],[$0])dnl setup libtool first
  1706. dnl enable/disable introspection
  1707. m4_if([$2], [require],
  1708. [dnl
  1709. enable_introspection=yes
  1710. ],[dnl
  1711. AC_ARG_ENABLE(introspection,
  1712. AS_HELP_STRING([--enable-introspection[=@<:@no/auto/yes@:>@]],
  1713. [Enable introspection for this build]),,
  1714. [enable_introspection=auto])
  1715. ])dnl
  1716. AC_MSG_CHECKING([for gobject-introspection])
  1717. dnl presence/version checking
  1718. AS_CASE([$enable_introspection],
  1719. [no], [dnl
  1720. found_introspection="no (disabled, use --enable-introspection to enable)"
  1721. ],dnl
  1722. [yes],[dnl
  1723. PKG_CHECK_EXISTS([gobject-introspection-1.0],,
  1724. AC_MSG_ERROR([gobject-introspection-1.0 is not installed]))
  1725. PKG_CHECK_EXISTS([gobject-introspection-1.0 >= $1],
  1726. found_introspection=yes,
  1727. AC_MSG_ERROR([You need to have gobject-introspection >= $1 installed to build AC_PACKAGE_NAME]))
  1728. ],dnl
  1729. [auto],[dnl
  1730. PKG_CHECK_EXISTS([gobject-introspection-1.0 >= $1], found_introspection=yes, found_introspection=no)
  1731. dnl Canonicalize enable_introspection
  1732. enable_introspection=$found_introspection
  1733. ],dnl
  1734. [dnl
  1735. AC_MSG_ERROR([invalid argument passed to --enable-introspection, should be one of @<:@no/auto/yes@:>@])
  1736. ])dnl
  1737. AC_MSG_RESULT([$found_introspection])
  1738. INTROSPECTION_SCANNER=
  1739. INTROSPECTION_COMPILER=
  1740. INTROSPECTION_GENERATE=
  1741. INTROSPECTION_GIRDIR=
  1742. INTROSPECTION_TYPELIBDIR=
  1743. if test "x$found_introspection" = "xyes"; then
  1744. INTROSPECTION_SCANNER=`$PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0`
  1745. INTROSPECTION_COMPILER=`$PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0`
  1746. INTROSPECTION_GENERATE=`$PKG_CONFIG --variable=g_ir_generate gobject-introspection-1.0`
  1747. INTROSPECTION_GIRDIR=`$PKG_CONFIG --variable=girdir gobject-introspection-1.0`
  1748. INTROSPECTION_TYPELIBDIR="$($PKG_CONFIG --variable=typelibdir gobject-introspection-1.0)"
  1749. INTROSPECTION_CFLAGS=`$PKG_CONFIG --cflags gobject-introspection-1.0`
  1750. INTROSPECTION_LIBS=`$PKG_CONFIG --libs gobject-introspection-1.0`
  1751. INTROSPECTION_MAKEFILE=`$PKG_CONFIG --variable=datadir gobject-introspection-1.0`/gobject-introspection-1.0/Makefile.introspection
  1752. fi
  1753. AC_SUBST(INTROSPECTION_SCANNER)
  1754. AC_SUBST(INTROSPECTION_COMPILER)
  1755. AC_SUBST(INTROSPECTION_GENERATE)
  1756. AC_SUBST(INTROSPECTION_GIRDIR)
  1757. AC_SUBST(INTROSPECTION_TYPELIBDIR)
  1758. AC_SUBST(INTROSPECTION_CFLAGS)
  1759. AC_SUBST(INTROSPECTION_LIBS)
  1760. AC_SUBST(INTROSPECTION_MAKEFILE)
  1761. AM_CONDITIONAL(HAVE_INTROSPECTION, test "x$found_introspection" = "xyes")
  1762. ])
  1763. dnl Usage:
  1764. dnl GOBJECT_INTROSPECTION_CHECK([minimum-g-i-version])
  1765. AC_DEFUN([GOBJECT_INTROSPECTION_CHECK],
  1766. [
  1767. _GOBJECT_INTROSPECTION_CHECK_INTERNAL([$1])
  1768. ])
  1769. dnl Usage:
  1770. dnl GOBJECT_INTROSPECTION_REQUIRE([minimum-g-i-version])
  1771. AC_DEFUN([GOBJECT_INTROSPECTION_REQUIRE],
  1772. [
  1773. _GOBJECT_INTROSPECTION_CHECK_INTERNAL([$1], [require])
  1774. ])
  1775. m4_include([m4/gtk-doc.m4])
  1776. m4_include([m4/intltool.m4])
  1777. m4_include([m4/libtool.m4])
  1778. m4_include([m4/ltoptions.m4])
  1779. m4_include([m4/ltsugar.m4])
  1780. m4_include([m4/ltversion.m4])
  1781. m4_include([m4/lt~obsolete.m4])