aclocal.m4 41 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143
  1. # generated automatically by aclocal 1.10.1 -*- Autoconf -*-
  2. # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
  3. # 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
  4. # This file is free software; the Free Software Foundation
  5. # gives unlimited permission to copy and/or distribute it,
  6. # with or without modifications, as long as this notice is preserved.
  7. # This program is distributed in the hope that it will be useful,
  8. # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
  9. # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
  10. # PARTICULAR PURPOSE.
  11. m4_ifndef([AC_AUTOCONF_VERSION],
  12. [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
  13. m4_if(AC_AUTOCONF_VERSION, [2.61],,
  14. [m4_warning([this file was generated for autoconf 2.61.
  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. dnl Autoconf macros for libmcrypt
  19. dnl $id$
  20. # This script detects libmcrypt version and defines
  21. # LIBMCRYPT_CFLAGS, LIBMCRYPT_LIBS
  22. # and LIBMCRYPT24 or LIBMCRYPT22 depending on libmcrypt version
  23. # found.
  24. # Modified for LIBMCRYPT -- nmav
  25. # Configure paths for LIBGCRYPT
  26. # Shamelessly stolen from the one of XDELTA by Owen Taylor
  27. # Werner Koch 99-12-09
  28. dnl AM_PATH_LIBMCRYPT([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND ]]])
  29. dnl Test for libmcrypt, and define LIBMCRYPT_CFLAGS and LIBMCRYPT_LIBS
  30. dnl
  31. AC_DEFUN([AM_PATH_LIBMCRYPT],
  32. [dnl
  33. dnl Get the cflags and libraries from the libmcrypt-config script
  34. dnl
  35. AC_ARG_WITH(libmcrypt-prefix,
  36. [ --with-libmcrypt-prefix=PFX Prefix where libmcrypt is installed (optional)],
  37. libmcrypt_config_prefix="$withval", libmcrypt_config_prefix="")
  38. if test x$libmcrypt_config_prefix != x ; then
  39. libmcrypt_config_args="$libmcrypt_config_args --prefix=$libmcrypt_config_prefix"
  40. if test x${LIBMCRYPT_CONFIG+set} != xset ; then
  41. LIBMCRYPT_CONFIG=$libmcrypt_config_prefix/bin/libmcrypt-config
  42. fi
  43. fi
  44. AC_PATH_PROG(LIBMCRYPT_CONFIG, libmcrypt-config, no)
  45. min_libmcrypt_version=ifelse([$1], ,2.4.0,$1)
  46. AC_MSG_CHECKING(for libmcrypt - version >= $min_libmcrypt_version)
  47. no_libmcrypt=""
  48. if test "$LIBMCRYPT_CONFIG" = "no" ; then
  49. dnl libmcrypt-config was not found (pre 2.4.11 versions)
  50. dnl Try to detect libmcrypt version
  51. AC_TRY_RUN([
  52. #include <stdio.h>
  53. #include <stdlib.h>
  54. #include <string.h>
  55. #include <mcrypt.h>
  56. int
  57. main ()
  58. {
  59. #if MCRYPT_API_VERSION <= 19991015
  60. /* version 2.2 */
  61. return 0;
  62. #else
  63. /* version 2.4 */
  64. return 1;
  65. #endif /* 19991015 */
  66. }
  67. ], libmcrypt_config_version="2.2.0"
  68. if test x$libmcrypt_config_prefix != x ; then
  69. TTLIBS="-L${libmcrypt_config_prefix}/libs"
  70. TTINCLUDE="-I${libmcrypt_config_prefix}/include"
  71. fi
  72. LIBMCRYPT_CFLAGS="${TTINCLUDE}"
  73. LIBMCRYPT_LIBS="${TTLIBS} -lmcrypt"
  74. AC_DEFINE(LIBMCRYPT22, 1, [have libmcrypt 2.2])
  75. , libmcrypt_config_version="2.4.0"
  76. if test x$libmcrypt_config_prefix != x ; then
  77. TTLIBS="-L${libmcrypt_config_prefix}/libs"
  78. TTINCLUDE="-I${libmcrypt_config_prefix}/include"
  79. fi
  80. LIBMCRYPT_CFLAGS="${TTINCLUDE}"
  81. LIBMCRYPT_LIBS="${TTLIBS} -lmcrypt -lltdl ${LIBADD_DL}"
  82. AC_DEFINE(LIBMCRYPT24, 1, [have libmcrypt 2.4]))
  83. else
  84. dnl libmcrypt-config was found
  85. LIBMCRYPT_CFLAGS=`$LIBMCRYPT_CONFIG $libmcrypt_config_args --cflags`
  86. LIBMCRYPT_LIBS=`$LIBMCRYPT_CONFIG $libmcrypt_config_args --libs`
  87. libmcrypt_config_version=`$LIBMCRYPT_CONFIG $libmcrypt_config_args --version`
  88. AC_DEFINE(LIBMCRYPT24, 1, [have libmcrypt 2.4])
  89. fi
  90. ac_save_CFLAGS="$CFLAGS"
  91. ac_save_LIBS="$LIBS"
  92. CFLAGS="$CFLAGS $LIBMCRYPT_CFLAGS"
  93. LIBS="$LIBS $LIBMCRYPT_LIBS"
  94. dnl
  95. dnl Now check if the installed libmcrypt is sufficiently new. Also sanity
  96. dnl checks the results of libmcrypt-config to some extent
  97. dnl
  98. rm -f conf.libmcrypttest
  99. AC_TRY_RUN([
  100. #include <stdio.h>
  101. #include <stdlib.h>
  102. #include <string.h>
  103. #include <mcrypt.h>
  104. #define TWO "2.2"
  105. int
  106. main ()
  107. {
  108. #if MCRYPT_API_VERSION <= 20010201
  109. #if MCRYPT_API_VERSION <= 19991015
  110. /* version 2.2 */
  111. int x = mcrypt_get_key_size(MCRYPT_TWOFISH_128);
  112. system ("touch conf.libmcrypttest");
  113. if( strncmp( TWO, "$min_libmcrypt_version", strlen(TWO))) {
  114. printf("\n*** Requested libmcrypt %s, but LIBMCRYPT (%s)\n",
  115. "$min_libmcrypt_version", TWO );
  116. printf("*** was found!\n");
  117. return 1;
  118. }
  119. return 0;
  120. #else
  121. /* version 2.4 before 11 */
  122. MCRYPT td = mcrypt_module_open("twofish", NULL, "cbc", NULL);
  123. system ("touch conf.libmcrypttest");
  124. mcrypt_module_close(td);
  125. return 0;
  126. #endif /* 19991015 */
  127. #else
  128. system ("touch conf.libmcrypttest");
  129. if( strcmp( mcrypt_check_version(NULL), "$libmcrypt_config_version" ) )
  130. {
  131. printf("\n*** 'libmcrypt-config --version' returned %s, but LIBMCRYPT (%s)\n",
  132. "$libmcrypt_config_version", mcrypt_check_version(NULL) );
  133. printf("*** was found! If libmcrypt-config was correct, then it is best\n");
  134. printf("*** to remove the old version of LIBMCRYPT. You may also be able to fix the error\n");
  135. printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
  136. printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
  137. printf("*** required on your system.\n");
  138. printf("*** If libmcrypt-config was wrong, set the environment variable LIBMCRYPT_CONFIG\n");
  139. printf("*** to point to the correct copy of libmcrypt-config, and remove the file config.cache\n");
  140. printf("*** before re-running configure\n");
  141. }
  142. else if ( strcmp(mcrypt_check_version(NULL), LIBMCRYPT_VERSION ) )
  143. {
  144. printf("\n*** LIBMCRYPT header file (version %s) does not match\n", LIBMCRYPT_VERSION);
  145. printf("*** library (version %s)\n", mcrypt_check_version(NULL) );
  146. }
  147. else
  148. {
  149. if ( mcrypt_check_version( "$min_libmcrypt_version" ) )
  150. {
  151. return 0;
  152. }
  153. else
  154. {
  155. printf("no\n*** An old version of LIBMCRYPT (%s) was found.\n",
  156. mcrypt_check_version(NULL) );
  157. printf("*** You need a version of LIBMCRYPT newer than %s. The latest version of\n",
  158. "$min_libmcrypt_version" );
  159. printf("*** LIBMCRYPT is always available from ftp://mcrypt.hellug.gr/pub/mcrypt.\n");
  160. printf("*** \n");
  161. printf("*** If you have already installed a sufficiently new version, this error\n");
  162. printf("*** probably means that the wrong copy of the libmcrypt-config shell script is\n");
  163. printf("*** being found. The easiest way to fix this is to remove the old version\n");
  164. printf("*** of LIBMCRYPT, but you can also set the LIBMCRYPT_CONFIG environment to point to the\n");
  165. printf("*** correct copy of libmcrypt-config. (In this case, you will have to\n");
  166. printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
  167. printf("*** so that the correct libraries are found at run-time))\n");
  168. }
  169. }
  170. return 1;
  171. #endif /* 20010201 */
  172. }
  173. ],, no_libmcrypt=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
  174. CFLAGS="$ac_save_CFLAGS"
  175. LIBS="$ac_save_LIBS"
  176. if test "x$no_libmcrypt" = x ; then
  177. AC_MSG_RESULT(yes)
  178. ifelse([$2], , :, [$2])
  179. else
  180. if test -f conf.libmcrypttest ; then
  181. :
  182. else
  183. AC_MSG_RESULT(no)
  184. fi
  185. if test -f conf.libmcrypttest ; then
  186. :
  187. else
  188. echo "*** Could not run libmcrypt test program, checking why..."
  189. CFLAGS="$CFLAGS $LIBMCRYPT_CFLAGS"
  190. LIBS="$LIBS $LIBMCRYPT_LIBS"
  191. AC_TRY_LINK([
  192. #include <stdio.h>
  193. #include <stdlib.h>
  194. #include <string.h>
  195. #include <mcrypt.h>
  196. ], [
  197. #if MCRYPT_API_VERSION <= 20010201
  198. #if MCRYPT_API_VERSION <= 19991015
  199. /* version 2.2 */
  200. int x = mcrypt_get_key_size(MCRYPT_TWOFISH_128);
  201. return 0;
  202. #else
  203. /* version 2.4 before 11 */
  204. MCRYPT td = mcrypt_module_open("twofish", NULL, "cbc", NULL);
  205. mcrypt_module_close(td);
  206. return 0;
  207. #endif /* 19991015 */
  208. #else
  209. return !!mcrypt_check_version(NULL);
  210. #endif /* 20010201 */
  211. ],
  212. [ echo "*** The test program compiled, but did not run. This usually means"
  213. echo "*** that the run-time linker is not finding LIBMCRYPT or finding the wrong"
  214. echo "*** version of LIBMCRYPT. If it is not finding LIBMCRYPT, you'll need to set your"
  215. echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
  216. echo "*** to the installed location Also, make sure you have run ldconfig if that"
  217. echo "*** is required on your system"
  218. echo "***"
  219. echo "*** If you have an old version installed, it is best to remove it, although"
  220. echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
  221. echo "***" ],
  222. [ echo "*** The test program failed to compile or link. See the file config.log for the"
  223. echo "*** exact error that occured. This usually means LIBMCRYPT was incorrectly installed"
  224. echo "*** or that you have moved LIBMCRYPT since it was installed. In the latter case, you"
  225. echo "*** may want to edit the libmcrypt-config script: $LIBMCRYPT_CONFIG" ])
  226. CFLAGS="$ac_save_CFLAGS"
  227. LIBS="$ac_save_LIBS"
  228. fi
  229. LIBMCRYPT_CFLAGS=""
  230. LIBMCRYPT_LIBS=""
  231. ifelse([$3], , :, [$3])
  232. fi
  233. rm -f conf.libmcrypttest
  234. AC_SUBST(LIBMCRYPT_CFLAGS)
  235. AC_SUBST(LIBMCRYPT_LIBS)
  236. ])
  237. dnl *-*wedit:notab*-* Please keep this as the last line.
  238. # Copyright (C) 2002, 2003, 2005, 2006, 2007 Free Software Foundation, Inc.
  239. #
  240. # This file is free software; the Free Software Foundation
  241. # gives unlimited permission to copy and/or distribute it,
  242. # with or without modifications, as long as this notice is preserved.
  243. # AM_AUTOMAKE_VERSION(VERSION)
  244. # ----------------------------
  245. # Automake X.Y traces this macro to ensure aclocal.m4 has been
  246. # generated from the m4 files accompanying Automake X.Y.
  247. # (This private macro should not be called outside this file.)
  248. AC_DEFUN([AM_AUTOMAKE_VERSION],
  249. [am__api_version='1.10'
  250. dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
  251. dnl require some minimum version. Point them to the right macro.
  252. m4_if([$1], [1.10.1], [],
  253. [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
  254. ])
  255. # _AM_AUTOCONF_VERSION(VERSION)
  256. # -----------------------------
  257. # aclocal traces this macro to find the Autoconf version.
  258. # This is a private macro too. Using m4_define simplifies
  259. # the logic in aclocal, which can simply ignore this definition.
  260. m4_define([_AM_AUTOCONF_VERSION], [])
  261. # AM_SET_CURRENT_AUTOMAKE_VERSION
  262. # -------------------------------
  263. # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
  264. # This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
  265. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
  266. [AM_AUTOMAKE_VERSION([1.10.1])dnl
  267. m4_ifndef([AC_AUTOCONF_VERSION],
  268. [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
  269. _AM_AUTOCONF_VERSION(AC_AUTOCONF_VERSION)])
  270. # AM_AUX_DIR_EXPAND -*- Autoconf -*-
  271. # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
  272. #
  273. # This file is free software; the Free Software Foundation
  274. # gives unlimited permission to copy and/or distribute it,
  275. # with or without modifications, as long as this notice is preserved.
  276. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
  277. # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
  278. # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
  279. #
  280. # Of course, Automake must honor this variable whenever it calls a
  281. # tool from the auxiliary directory. The problem is that $srcdir (and
  282. # therefore $ac_aux_dir as well) can be either absolute or relative,
  283. # depending on how configure is run. This is pretty annoying, since
  284. # it makes $ac_aux_dir quite unusable in subdirectories: in the top
  285. # source directory, any form will work fine, but in subdirectories a
  286. # relative path needs to be adjusted first.
  287. #
  288. # $ac_aux_dir/missing
  289. # fails when called from a subdirectory if $ac_aux_dir is relative
  290. # $top_srcdir/$ac_aux_dir/missing
  291. # fails if $ac_aux_dir is absolute,
  292. # fails when called from a subdirectory in a VPATH build with
  293. # a relative $ac_aux_dir
  294. #
  295. # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
  296. # are both prefixed by $srcdir. In an in-source build this is usually
  297. # harmless because $srcdir is `.', but things will broke when you
  298. # start a VPATH build or use an absolute $srcdir.
  299. #
  300. # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
  301. # iff we strip the leading $srcdir from $ac_aux_dir. That would be:
  302. # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
  303. # and then we would define $MISSING as
  304. # MISSING="\${SHELL} $am_aux_dir/missing"
  305. # This will work as long as MISSING is not called from configure, because
  306. # unfortunately $(top_srcdir) has no meaning in configure.
  307. # However there are other variables, like CC, which are often used in
  308. # configure, and could therefore not use this "fixed" $ac_aux_dir.
  309. #
  310. # Another solution, used here, is to always expand $ac_aux_dir to an
  311. # absolute PATH. The drawback is that using absolute paths prevent a
  312. # configured tree to be moved without reconfiguration.
  313. AC_DEFUN([AM_AUX_DIR_EXPAND],
  314. [dnl Rely on autoconf to set up CDPATH properly.
  315. AC_PREREQ([2.50])dnl
  316. # expand $ac_aux_dir to an absolute path
  317. am_aux_dir=`cd $ac_aux_dir && pwd`
  318. ])
  319. # AM_CONDITIONAL -*- Autoconf -*-
  320. # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006
  321. # Free Software Foundation, Inc.
  322. #
  323. # This file is free software; the Free Software Foundation
  324. # gives unlimited permission to copy and/or distribute it,
  325. # with or without modifications, as long as this notice is preserved.
  326. # serial 8
  327. # AM_CONDITIONAL(NAME, SHELL-CONDITION)
  328. # -------------------------------------
  329. # Define a conditional.
  330. AC_DEFUN([AM_CONDITIONAL],
  331. [AC_PREREQ(2.52)dnl
  332. ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
  333. [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
  334. AC_SUBST([$1_TRUE])dnl
  335. AC_SUBST([$1_FALSE])dnl
  336. _AM_SUBST_NOTMAKE([$1_TRUE])dnl
  337. _AM_SUBST_NOTMAKE([$1_FALSE])dnl
  338. if $2; then
  339. $1_TRUE=
  340. $1_FALSE='#'
  341. else
  342. $1_TRUE='#'
  343. $1_FALSE=
  344. fi
  345. AC_CONFIG_COMMANDS_PRE(
  346. [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
  347. AC_MSG_ERROR([[conditional "$1" was never defined.
  348. Usually this means the macro was only invoked conditionally.]])
  349. fi])])
  350. # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
  351. # Free Software Foundation, Inc.
  352. #
  353. # This file is free software; the Free Software Foundation
  354. # gives unlimited permission to copy and/or distribute it,
  355. # with or without modifications, as long as this notice is preserved.
  356. # serial 9
  357. # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
  358. # written in clear, in which case automake, when reading aclocal.m4,
  359. # will think it sees a *use*, and therefore will trigger all it's
  360. # C support machinery. Also note that it means that autoscan, seeing
  361. # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
  362. # _AM_DEPENDENCIES(NAME)
  363. # ----------------------
  364. # See how the compiler implements dependency checking.
  365. # NAME is "CC", "CXX", "GCJ", or "OBJC".
  366. # We try a few techniques and use that to set a single cache variable.
  367. #
  368. # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
  369. # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
  370. # dependency, and given that the user is not expected to run this macro,
  371. # just rely on AC_PROG_CC.
  372. AC_DEFUN([_AM_DEPENDENCIES],
  373. [AC_REQUIRE([AM_SET_DEPDIR])dnl
  374. AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
  375. AC_REQUIRE([AM_MAKE_INCLUDE])dnl
  376. AC_REQUIRE([AM_DEP_TRACK])dnl
  377. ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
  378. [$1], CXX, [depcc="$CXX" am_compiler_list=],
  379. [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
  380. [$1], UPC, [depcc="$UPC" am_compiler_list=],
  381. [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
  382. [depcc="$$1" am_compiler_list=])
  383. AC_CACHE_CHECK([dependency style of $depcc],
  384. [am_cv_$1_dependencies_compiler_type],
  385. [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
  386. # We make a subdir and do the tests there. Otherwise we can end up
  387. # making bogus files that we don't know about and never remove. For
  388. # instance it was reported that on HP-UX the gcc test will end up
  389. # making a dummy file named `D' -- because `-MD' means `put the output
  390. # in D'.
  391. mkdir conftest.dir
  392. # Copy depcomp to subdir because otherwise we won't find it if we're
  393. # using a relative directory.
  394. cp "$am_depcomp" conftest.dir
  395. cd conftest.dir
  396. # We will build objects and dependencies in a subdirectory because
  397. # it helps to detect inapplicable dependency modes. For instance
  398. # both Tru64's cc and ICC support -MD to output dependencies as a
  399. # side effect of compilation, but ICC will put the dependencies in
  400. # the current directory while Tru64 will put them in the object
  401. # directory.
  402. mkdir sub
  403. am_cv_$1_dependencies_compiler_type=none
  404. if test "$am_compiler_list" = ""; then
  405. am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
  406. fi
  407. for depmode in $am_compiler_list; do
  408. # Setup a source with many dependencies, because some compilers
  409. # like to wrap large dependency lists on column 80 (with \), and
  410. # we should not choose a depcomp mode which is confused by this.
  411. #
  412. # We need to recreate these files for each test, as the compiler may
  413. # overwrite some of them when testing with obscure command lines.
  414. # This happens at least with the AIX C compiler.
  415. : > sub/conftest.c
  416. for i in 1 2 3 4 5 6; do
  417. echo '#include "conftst'$i'.h"' >> sub/conftest.c
  418. # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
  419. # Solaris 8's {/usr,}/bin/sh.
  420. touch sub/conftst$i.h
  421. done
  422. echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
  423. case $depmode in
  424. nosideeffect)
  425. # after this tag, mechanisms are not by side-effect, so they'll
  426. # only be used when explicitly requested
  427. if test "x$enable_dependency_tracking" = xyes; then
  428. continue
  429. else
  430. break
  431. fi
  432. ;;
  433. none) break ;;
  434. esac
  435. # We check with `-c' and `-o' for the sake of the "dashmstdout"
  436. # mode. It turns out that the SunPro C++ compiler does not properly
  437. # handle `-M -o', and we need to detect this.
  438. if depmode=$depmode \
  439. source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
  440. depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
  441. $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
  442. >/dev/null 2>conftest.err &&
  443. grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
  444. grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
  445. grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
  446. ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
  447. # icc doesn't choke on unknown options, it will just issue warnings
  448. # or remarks (even with -Werror). So we grep stderr for any message
  449. # that says an option was ignored or not supported.
  450. # When given -MP, icc 7.0 and 7.1 complain thusly:
  451. # icc: Command line warning: ignoring option '-M'; no argument required
  452. # The diagnosis changed in icc 8.0:
  453. # icc: Command line remark: option '-MP' not supported
  454. if (grep 'ignoring option' conftest.err ||
  455. grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
  456. am_cv_$1_dependencies_compiler_type=$depmode
  457. break
  458. fi
  459. fi
  460. done
  461. cd ..
  462. rm -rf conftest.dir
  463. else
  464. am_cv_$1_dependencies_compiler_type=none
  465. fi
  466. ])
  467. AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
  468. AM_CONDITIONAL([am__fastdep$1], [
  469. test "x$enable_dependency_tracking" != xno \
  470. && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
  471. ])
  472. # AM_SET_DEPDIR
  473. # -------------
  474. # Choose a directory name for dependency files.
  475. # This macro is AC_REQUIREd in _AM_DEPENDENCIES
  476. AC_DEFUN([AM_SET_DEPDIR],
  477. [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
  478. AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
  479. ])
  480. # AM_DEP_TRACK
  481. # ------------
  482. AC_DEFUN([AM_DEP_TRACK],
  483. [AC_ARG_ENABLE(dependency-tracking,
  484. [ --disable-dependency-tracking speeds up one-time build
  485. --enable-dependency-tracking do not reject slow dependency extractors])
  486. if test "x$enable_dependency_tracking" != xno; then
  487. am_depcomp="$ac_aux_dir/depcomp"
  488. AMDEPBACKSLASH='\'
  489. fi
  490. AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
  491. AC_SUBST([AMDEPBACKSLASH])dnl
  492. _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
  493. ])
  494. # Generate code to set up dependency tracking. -*- Autoconf -*-
  495. # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
  496. # Free Software Foundation, Inc.
  497. #
  498. # This file is free software; the Free Software Foundation
  499. # gives unlimited permission to copy and/or distribute it,
  500. # with or without modifications, as long as this notice is preserved.
  501. #serial 3
  502. # _AM_OUTPUT_DEPENDENCY_COMMANDS
  503. # ------------------------------
  504. AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
  505. [for mf in $CONFIG_FILES; do
  506. # Strip MF so we end up with the name of the file.
  507. mf=`echo "$mf" | sed -e 's/:.*$//'`
  508. # Check whether this is an Automake generated Makefile or not.
  509. # We used to match only the files named `Makefile.in', but
  510. # some people rename them; so instead we look at the file content.
  511. # Grep'ing the first line is not enough: some people post-process
  512. # each Makefile.in and add a new line on top of each file to say so.
  513. # Grep'ing the whole file is not good either: AIX grep has a line
  514. # limit of 2048, but all sed's we know have understand at least 4000.
  515. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
  516. dirpart=`AS_DIRNAME("$mf")`
  517. else
  518. continue
  519. fi
  520. # Extract the definition of DEPDIR, am__include, and am__quote
  521. # from the Makefile without running `make'.
  522. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
  523. test -z "$DEPDIR" && continue
  524. am__include=`sed -n 's/^am__include = //p' < "$mf"`
  525. test -z "am__include" && continue
  526. am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
  527. # When using ansi2knr, U may be empty or an underscore; expand it
  528. U=`sed -n 's/^U = //p' < "$mf"`
  529. # Find all dependency output files, they are included files with
  530. # $(DEPDIR) in their names. We invoke sed twice because it is the
  531. # simplest approach to changing $(DEPDIR) to its actual value in the
  532. # expansion.
  533. for file in `sed -n "
  534. s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
  535. sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
  536. # Make sure the directory exists.
  537. test -f "$dirpart/$file" && continue
  538. fdir=`AS_DIRNAME(["$file"])`
  539. AS_MKDIR_P([$dirpart/$fdir])
  540. # echo "creating $dirpart/$file"
  541. echo '# dummy' > "$dirpart/$file"
  542. done
  543. done
  544. ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
  545. # AM_OUTPUT_DEPENDENCY_COMMANDS
  546. # -----------------------------
  547. # This macro should only be invoked once -- use via AC_REQUIRE.
  548. #
  549. # This code is only required when automatic dependency tracking
  550. # is enabled. FIXME. This creates each `.P' file that we will
  551. # need in order to bootstrap the dependency handling code.
  552. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
  553. [AC_CONFIG_COMMANDS([depfiles],
  554. [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
  555. [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
  556. ])
  557. # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
  558. # Free Software Foundation, Inc.
  559. #
  560. # This file is free software; the Free Software Foundation
  561. # gives unlimited permission to copy and/or distribute it,
  562. # with or without modifications, as long as this notice is preserved.
  563. # serial 8
  564. # AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS.
  565. AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
  566. # Do all the work for Automake. -*- Autoconf -*-
  567. # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
  568. # 2005, 2006, 2008 Free Software Foundation, Inc.
  569. #
  570. # This file is free software; the Free Software Foundation
  571. # gives unlimited permission to copy and/or distribute it,
  572. # with or without modifications, as long as this notice is preserved.
  573. # serial 13
  574. # This macro actually does too much. Some checks are only needed if
  575. # your package does certain things. But this isn't really a big deal.
  576. # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
  577. # AM_INIT_AUTOMAKE([OPTIONS])
  578. # -----------------------------------------------
  579. # The call with PACKAGE and VERSION arguments is the old style
  580. # call (pre autoconf-2.50), which is being phased out. PACKAGE
  581. # and VERSION should now be passed to AC_INIT and removed from
  582. # the call to AM_INIT_AUTOMAKE.
  583. # We support both call styles for the transition. After
  584. # the next Automake release, Autoconf can make the AC_INIT
  585. # arguments mandatory, and then we can depend on a new Autoconf
  586. # release and drop the old call support.
  587. AC_DEFUN([AM_INIT_AUTOMAKE],
  588. [AC_PREREQ([2.60])dnl
  589. dnl Autoconf wants to disallow AM_ names. We explicitly allow
  590. dnl the ones we care about.
  591. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
  592. AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
  593. AC_REQUIRE([AC_PROG_INSTALL])dnl
  594. if test "`cd $srcdir && pwd`" != "`pwd`"; then
  595. # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
  596. # is not polluted with repeated "-I."
  597. AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
  598. # test to see if srcdir already configured
  599. if test -f $srcdir/config.status; then
  600. AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
  601. fi
  602. fi
  603. # test whether we have cygpath
  604. if test -z "$CYGPATH_W"; then
  605. if (cygpath --version) >/dev/null 2>/dev/null; then
  606. CYGPATH_W='cygpath -w'
  607. else
  608. CYGPATH_W=echo
  609. fi
  610. fi
  611. AC_SUBST([CYGPATH_W])
  612. # Define the identity of the package.
  613. dnl Distinguish between old-style and new-style calls.
  614. m4_ifval([$2],
  615. [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
  616. AC_SUBST([PACKAGE], [$1])dnl
  617. AC_SUBST([VERSION], [$2])],
  618. [_AM_SET_OPTIONS([$1])dnl
  619. dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
  620. m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
  621. [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
  622. AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
  623. AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
  624. _AM_IF_OPTION([no-define],,
  625. [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
  626. AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
  627. # Some tools Automake needs.
  628. AC_REQUIRE([AM_SANITY_CHECK])dnl
  629. AC_REQUIRE([AC_ARG_PROGRAM])dnl
  630. AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
  631. AM_MISSING_PROG(AUTOCONF, autoconf)
  632. AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
  633. AM_MISSING_PROG(AUTOHEADER, autoheader)
  634. AM_MISSING_PROG(MAKEINFO, makeinfo)
  635. AM_PROG_INSTALL_SH
  636. AM_PROG_INSTALL_STRIP
  637. AC_REQUIRE([AM_PROG_MKDIR_P])dnl
  638. # We need awk for the "check" target. The system "awk" is bad on
  639. # some platforms.
  640. AC_REQUIRE([AC_PROG_AWK])dnl
  641. AC_REQUIRE([AC_PROG_MAKE_SET])dnl
  642. AC_REQUIRE([AM_SET_LEADING_DOT])dnl
  643. _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
  644. [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
  645. [_AM_PROG_TAR([v7])])])
  646. _AM_IF_OPTION([no-dependencies],,
  647. [AC_PROVIDE_IFELSE([AC_PROG_CC],
  648. [_AM_DEPENDENCIES(CC)],
  649. [define([AC_PROG_CC],
  650. defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
  651. AC_PROVIDE_IFELSE([AC_PROG_CXX],
  652. [_AM_DEPENDENCIES(CXX)],
  653. [define([AC_PROG_CXX],
  654. defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
  655. AC_PROVIDE_IFELSE([AC_PROG_OBJC],
  656. [_AM_DEPENDENCIES(OBJC)],
  657. [define([AC_PROG_OBJC],
  658. defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
  659. ])
  660. ])
  661. # When config.status generates a header, we must update the stamp-h file.
  662. # This file resides in the same directory as the config header
  663. # that is generated. The stamp files are numbered to have different names.
  664. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
  665. # loop where config.status creates the headers, so we can generate
  666. # our stamp files there.
  667. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
  668. [# Compute $1's index in $config_headers.
  669. _am_arg=$1
  670. _am_stamp_count=1
  671. for _am_header in $config_headers :; do
  672. case $_am_header in
  673. $_am_arg | $_am_arg:* )
  674. break ;;
  675. * )
  676. _am_stamp_count=`expr $_am_stamp_count + 1` ;;
  677. esac
  678. done
  679. echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
  680. # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
  681. #
  682. # This file is free software; the Free Software Foundation
  683. # gives unlimited permission to copy and/or distribute it,
  684. # with or without modifications, as long as this notice is preserved.
  685. # AM_PROG_INSTALL_SH
  686. # ------------------
  687. # Define $install_sh.
  688. AC_DEFUN([AM_PROG_INSTALL_SH],
  689. [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
  690. install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"}
  691. AC_SUBST(install_sh)])
  692. # Copyright (C) 2003, 2005 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. # serial 2
  698. # Check whether the underlying file-system supports filenames
  699. # with a leading dot. For instance MS-DOS doesn't.
  700. AC_DEFUN([AM_SET_LEADING_DOT],
  701. [rm -rf .tst 2>/dev/null
  702. mkdir .tst 2>/dev/null
  703. if test -d .tst; then
  704. am__leading_dot=.
  705. else
  706. am__leading_dot=_
  707. fi
  708. rmdir .tst 2>/dev/null
  709. AC_SUBST([am__leading_dot])])
  710. # Check to see how 'make' treats includes. -*- Autoconf -*-
  711. # Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
  712. #
  713. # This file is free software; the Free Software Foundation
  714. # gives unlimited permission to copy and/or distribute it,
  715. # with or without modifications, as long as this notice is preserved.
  716. # serial 3
  717. # AM_MAKE_INCLUDE()
  718. # -----------------
  719. # Check to see how make treats includes.
  720. AC_DEFUN([AM_MAKE_INCLUDE],
  721. [am_make=${MAKE-make}
  722. cat > confinc << 'END'
  723. am__doit:
  724. @echo done
  725. .PHONY: am__doit
  726. END
  727. # If we don't find an include directive, just comment out the code.
  728. AC_MSG_CHECKING([for style of include used by $am_make])
  729. am__include="#"
  730. am__quote=
  731. _am_result=none
  732. # First try GNU make style include.
  733. echo "include confinc" > confmf
  734. # We grep out `Entering directory' and `Leaving directory'
  735. # messages which can occur if `w' ends up in MAKEFLAGS.
  736. # In particular we don't look at `^make:' because GNU make might
  737. # be invoked under some other name (usually "gmake"), in which
  738. # case it prints its new name instead of `make'.
  739. if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
  740. am__include=include
  741. am__quote=
  742. _am_result=GNU
  743. fi
  744. # Now try BSD make style include.
  745. if test "$am__include" = "#"; then
  746. echo '.include "confinc"' > confmf
  747. if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
  748. am__include=.include
  749. am__quote="\""
  750. _am_result=BSD
  751. fi
  752. fi
  753. AC_SUBST([am__include])
  754. AC_SUBST([am__quote])
  755. AC_MSG_RESULT([$_am_result])
  756. rm -f confinc confmf
  757. ])
  758. # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
  759. # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005
  760. # Free Software Foundation, Inc.
  761. #
  762. # This file is free software; the Free Software Foundation
  763. # gives unlimited permission to copy and/or distribute it,
  764. # with or without modifications, as long as this notice is preserved.
  765. # serial 5
  766. # AM_MISSING_PROG(NAME, PROGRAM)
  767. # ------------------------------
  768. AC_DEFUN([AM_MISSING_PROG],
  769. [AC_REQUIRE([AM_MISSING_HAS_RUN])
  770. $1=${$1-"${am_missing_run}$2"}
  771. AC_SUBST($1)])
  772. # AM_MISSING_HAS_RUN
  773. # ------------------
  774. # Define MISSING if not defined so far and test if it supports --run.
  775. # If it does, set am_missing_run to use it, otherwise, to nothing.
  776. AC_DEFUN([AM_MISSING_HAS_RUN],
  777. [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
  778. AC_REQUIRE_AUX_FILE([missing])dnl
  779. test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
  780. # Use eval to expand $SHELL
  781. if eval "$MISSING --run true"; then
  782. am_missing_run="$MISSING --run "
  783. else
  784. am_missing_run=
  785. AC_MSG_WARN([`missing' script is too old or missing])
  786. fi
  787. ])
  788. # Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
  789. #
  790. # This file is free software; the Free Software Foundation
  791. # gives unlimited permission to copy and/or distribute it,
  792. # with or without modifications, as long as this notice is preserved.
  793. # AM_PROG_MKDIR_P
  794. # ---------------
  795. # Check for `mkdir -p'.
  796. AC_DEFUN([AM_PROG_MKDIR_P],
  797. [AC_PREREQ([2.60])dnl
  798. AC_REQUIRE([AC_PROG_MKDIR_P])dnl
  799. dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P,
  800. dnl while keeping a definition of mkdir_p for backward compatibility.
  801. dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
  802. dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
  803. dnl Makefile.ins that do not define MKDIR_P, so we do our own
  804. dnl adjustment using top_builddir (which is defined more often than
  805. dnl MKDIR_P).
  806. AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
  807. case $mkdir_p in
  808. [[\\/$]]* | ?:[[\\/]]*) ;;
  809. */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
  810. esac
  811. ])
  812. # Helper functions for option handling. -*- Autoconf -*-
  813. # Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
  814. #
  815. # This file is free software; the Free Software Foundation
  816. # gives unlimited permission to copy and/or distribute it,
  817. # with or without modifications, as long as this notice is preserved.
  818. # serial 3
  819. # _AM_MANGLE_OPTION(NAME)
  820. # -----------------------
  821. AC_DEFUN([_AM_MANGLE_OPTION],
  822. [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
  823. # _AM_SET_OPTION(NAME)
  824. # ------------------------------
  825. # Set option NAME. Presently that only means defining a flag for this option.
  826. AC_DEFUN([_AM_SET_OPTION],
  827. [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
  828. # _AM_SET_OPTIONS(OPTIONS)
  829. # ----------------------------------
  830. # OPTIONS is a space-separated list of Automake options.
  831. AC_DEFUN([_AM_SET_OPTIONS],
  832. [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
  833. # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
  834. # -------------------------------------------
  835. # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
  836. AC_DEFUN([_AM_IF_OPTION],
  837. [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
  838. # Check to make sure that the build environment is sane. -*- Autoconf -*-
  839. # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
  840. # Free Software Foundation, Inc.
  841. #
  842. # This file is free software; the Free Software Foundation
  843. # gives unlimited permission to copy and/or distribute it,
  844. # with or without modifications, as long as this notice is preserved.
  845. # serial 4
  846. # AM_SANITY_CHECK
  847. # ---------------
  848. AC_DEFUN([AM_SANITY_CHECK],
  849. [AC_MSG_CHECKING([whether build environment is sane])
  850. # Just in case
  851. sleep 1
  852. echo timestamp > conftest.file
  853. # Do `set' in a subshell so we don't clobber the current shell's
  854. # arguments. Must try -L first in case configure is actually a
  855. # symlink; some systems play weird games with the mod time of symlinks
  856. # (eg FreeBSD returns the mod time of the symlink's containing
  857. # directory).
  858. if (
  859. set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
  860. if test "$[*]" = "X"; then
  861. # -L didn't work.
  862. set X `ls -t $srcdir/configure conftest.file`
  863. fi
  864. rm -f conftest.file
  865. if test "$[*]" != "X $srcdir/configure conftest.file" \
  866. && test "$[*]" != "X conftest.file $srcdir/configure"; then
  867. # If neither matched, then we have a broken ls. This can happen
  868. # if, for instance, CONFIG_SHELL is bash and it inherits a
  869. # broken ls alias from the environment. This has actually
  870. # happened. Such a system could not be considered "sane".
  871. AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
  872. alias in your environment])
  873. fi
  874. test "$[2]" = conftest.file
  875. )
  876. then
  877. # Ok.
  878. :
  879. else
  880. AC_MSG_ERROR([newly created file is older than distributed files!
  881. Check your system clock])
  882. fi
  883. AC_MSG_RESULT(yes)])
  884. # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
  885. #
  886. # This file is free software; the Free Software Foundation
  887. # gives unlimited permission to copy and/or distribute it,
  888. # with or without modifications, as long as this notice is preserved.
  889. # AM_PROG_INSTALL_STRIP
  890. # ---------------------
  891. # One issue with vendor `install' (even GNU) is that you can't
  892. # specify the program used to strip binaries. This is especially
  893. # annoying in cross-compiling environments, where the build's strip
  894. # is unlikely to handle the host's binaries.
  895. # Fortunately install-sh will honor a STRIPPROG variable, so we
  896. # always use install-sh in `make install-strip', and initialize
  897. # STRIPPROG with the value of the STRIP variable (set by the user).
  898. AC_DEFUN([AM_PROG_INSTALL_STRIP],
  899. [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
  900. # Installed binaries are usually stripped using `strip' when the user
  901. # run `make install-strip'. However `strip' might not be the right
  902. # tool to use in cross-compilation environments, therefore Automake
  903. # will honor the `STRIP' environment variable to overrule this program.
  904. dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
  905. if test "$cross_compiling" != no; then
  906. AC_CHECK_TOOL([STRIP], [strip], :)
  907. fi
  908. INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
  909. AC_SUBST([INSTALL_STRIP_PROGRAM])])
  910. # Copyright (C) 2006 Free Software Foundation, Inc.
  911. #
  912. # This file is free software; the Free Software Foundation
  913. # gives unlimited permission to copy and/or distribute it,
  914. # with or without modifications, as long as this notice is preserved.
  915. # _AM_SUBST_NOTMAKE(VARIABLE)
  916. # ---------------------------
  917. # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
  918. # This macro is traced by Automake.
  919. AC_DEFUN([_AM_SUBST_NOTMAKE])
  920. # Check how to create a tarball. -*- Autoconf -*-
  921. # Copyright (C) 2004, 2005 Free Software Foundation, Inc.
  922. #
  923. # This file is free software; the Free Software Foundation
  924. # gives unlimited permission to copy and/or distribute it,
  925. # with or without modifications, as long as this notice is preserved.
  926. # serial 2
  927. # _AM_PROG_TAR(FORMAT)
  928. # --------------------
  929. # Check how to create a tarball in format FORMAT.
  930. # FORMAT should be one of `v7', `ustar', or `pax'.
  931. #
  932. # Substitute a variable $(am__tar) that is a command
  933. # writing to stdout a FORMAT-tarball containing the directory
  934. # $tardir.
  935. # tardir=directory && $(am__tar) > result.tar
  936. #
  937. # Substitute a variable $(am__untar) that extract such
  938. # a tarball read from stdin.
  939. # $(am__untar) < result.tar
  940. AC_DEFUN([_AM_PROG_TAR],
  941. [# Always define AMTAR for backward compatibility.
  942. AM_MISSING_PROG([AMTAR], [tar])
  943. m4_if([$1], [v7],
  944. [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
  945. [m4_case([$1], [ustar],, [pax],,
  946. [m4_fatal([Unknown tar format])])
  947. AC_MSG_CHECKING([how to create a $1 tar archive])
  948. # Loop over all known methods to create a tar archive until one works.
  949. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
  950. _am_tools=${am_cv_prog_tar_$1-$_am_tools}
  951. # Do not fold the above two line into one, because Tru64 sh and
  952. # Solaris sh will not grok spaces in the rhs of `-'.
  953. for _am_tool in $_am_tools
  954. do
  955. case $_am_tool in
  956. gnutar)
  957. for _am_tar in tar gnutar gtar;
  958. 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. grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
  1001. fi
  1002. done
  1003. rm -rf conftest.dir
  1004. AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
  1005. AC_MSG_RESULT([$am_cv_prog_tar_$1])])
  1006. AC_SUBST([am__tar])
  1007. AC_SUBST([am__untar])
  1008. ]) # _AM_PROG_TAR
  1009. m4_include([m4/gettext.m4])
  1010. m4_include([m4/iconv.m4])
  1011. m4_include([m4/lib-ld.m4])
  1012. m4_include([m4/lib-link.m4])
  1013. m4_include([m4/lib-prefix.m4])
  1014. m4_include([m4/libtool.m4])
  1015. m4_include([m4/ltoptions.m4])
  1016. m4_include([m4/ltsugar.m4])
  1017. m4_include([m4/ltversion.m4])
  1018. m4_include([m4/lt~obsolete.m4])
  1019. m4_include([m4/nls.m4])
  1020. m4_include([m4/po.m4])
  1021. m4_include([m4/progtest.m4])
  1022. m4_include([acinclude.m4])