aclocal.m4 44 KB

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