aclocal.m4 52 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411
  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. # Configure paths for LIBXML2
  333. # Mike Hommey 2004-06-19
  334. # use CPPFLAGS instead of CFLAGS
  335. # Toshio Kuratomi 2001-04-21
  336. # Adapted from:
  337. # Configure paths for GLIB
  338. # Owen Taylor 97-11-3
  339. dnl AM_PATH_XML2([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
  340. dnl Test for XML, and define XML_CPPFLAGS and XML_LIBS
  341. dnl
  342. AC_DEFUN([AM_PATH_XML2],[
  343. AC_ARG_WITH(xml-prefix,
  344. [ --with-xml-prefix=PFX Prefix where libxml is installed (optional)],
  345. xml_config_prefix="$withval", xml_config_prefix="")
  346. AC_ARG_WITH(xml-exec-prefix,
  347. [ --with-xml-exec-prefix=PFX Exec prefix where libxml is installed (optional)],
  348. xml_config_exec_prefix="$withval", xml_config_exec_prefix="")
  349. AC_ARG_ENABLE(xmltest,
  350. [ --disable-xmltest Do not try to compile and run a test LIBXML program],,
  351. enable_xmltest=yes)
  352. if test x$xml_config_exec_prefix != x ; then
  353. xml_config_args="$xml_config_args"
  354. if test x${XML2_CONFIG+set} != xset ; then
  355. XML2_CONFIG=$xml_config_exec_prefix/bin/xml2-config
  356. fi
  357. fi
  358. if test x$xml_config_prefix != x ; then
  359. xml_config_args="$xml_config_args --prefix=$xml_config_prefix"
  360. if test x${XML2_CONFIG+set} != xset ; then
  361. XML2_CONFIG=$xml_config_prefix/bin/xml2-config
  362. fi
  363. fi
  364. AC_PATH_PROG(XML2_CONFIG, xml2-config, no)
  365. min_xml_version=ifelse([$1], ,2.0.0,[$1])
  366. AC_MSG_CHECKING(for libxml - version >= $min_xml_version)
  367. no_xml=""
  368. if test "$XML2_CONFIG" = "no" ; then
  369. no_xml=yes
  370. else
  371. XML_CPPFLAGS=`$XML2_CONFIG $xml_config_args --cflags`
  372. XML_LIBS=`$XML2_CONFIG $xml_config_args --libs`
  373. xml_config_major_version=`$XML2_CONFIG $xml_config_args --version | \
  374. sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
  375. xml_config_minor_version=`$XML2_CONFIG $xml_config_args --version | \
  376. sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
  377. xml_config_micro_version=`$XML2_CONFIG $xml_config_args --version | \
  378. sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
  379. if test "x$enable_xmltest" = "xyes" ; then
  380. ac_save_CPPFLAGS="$CPPFLAGS"
  381. ac_save_LIBS="$LIBS"
  382. CPPFLAGS="$CPPFLAGS $XML_CPPFLAGS"
  383. LIBS="$XML_LIBS $LIBS"
  384. dnl
  385. dnl Now check if the installed libxml is sufficiently new.
  386. dnl (Also sanity checks the results of xml2-config to some extent)
  387. dnl
  388. rm -f conf.xmltest
  389. AC_TRY_RUN([
  390. #include <stdlib.h>
  391. #include <stdio.h>
  392. #include <string.h>
  393. #include <libxml/xmlversion.h>
  394. int
  395. main()
  396. {
  397. int xml_major_version, xml_minor_version, xml_micro_version;
  398. int major, minor, micro;
  399. char *tmp_version;
  400. system("touch conf.xmltest");
  401. /* Capture xml2-config output via autoconf/configure variables */
  402. /* HP/UX 9 (%@#!) writes to sscanf strings */
  403. tmp_version = (char *)strdup("$min_xml_version");
  404. if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
  405. printf("%s, bad version string from xml2-config\n", "$min_xml_version");
  406. exit(1);
  407. }
  408. free(tmp_version);
  409. /* Capture the version information from the header files */
  410. tmp_version = (char *)strdup(LIBXML_DOTTED_VERSION);
  411. if (sscanf(tmp_version, "%d.%d.%d", &xml_major_version, &xml_minor_version, &xml_micro_version) != 3) {
  412. printf("%s, bad version string from libxml includes\n", "LIBXML_DOTTED_VERSION");
  413. exit(1);
  414. }
  415. free(tmp_version);
  416. /* Compare xml2-config output to the libxml headers */
  417. if ((xml_major_version != $xml_config_major_version) ||
  418. (xml_minor_version != $xml_config_minor_version) ||
  419. (xml_micro_version != $xml_config_micro_version))
  420. {
  421. printf("*** libxml header files (version %d.%d.%d) do not match\n",
  422. xml_major_version, xml_minor_version, xml_micro_version);
  423. printf("*** xml2-config (version %d.%d.%d)\n",
  424. $xml_config_major_version, $xml_config_minor_version, $xml_config_micro_version);
  425. return 1;
  426. }
  427. /* Compare the headers to the library to make sure we match */
  428. /* Less than ideal -- doesn't provide us with return value feedback,
  429. * only exits if there's a serious mismatch between header and library.
  430. */
  431. LIBXML_TEST_VERSION;
  432. /* Test that the library is greater than our minimum version */
  433. if ((xml_major_version > major) ||
  434. ((xml_major_version == major) && (xml_minor_version > minor)) ||
  435. ((xml_major_version == major) && (xml_minor_version == minor) &&
  436. (xml_micro_version >= micro)))
  437. {
  438. return 0;
  439. }
  440. else
  441. {
  442. printf("\n*** An old version of libxml (%d.%d.%d) was found.\n",
  443. xml_major_version, xml_minor_version, xml_micro_version);
  444. printf("*** You need a version of libxml newer than %d.%d.%d. The latest version of\n",
  445. major, minor, micro);
  446. printf("*** libxml is always available from ftp://ftp.xmlsoft.org.\n");
  447. printf("***\n");
  448. printf("*** If you have already installed a sufficiently new version, this error\n");
  449. printf("*** probably means that the wrong copy of the xml2-config shell script is\n");
  450. printf("*** being found. The easiest way to fix this is to remove the old version\n");
  451. printf("*** of LIBXML, but you can also set the XML2_CONFIG environment to point to the\n");
  452. printf("*** correct copy of xml2-config. (In this case, you will have to\n");
  453. printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
  454. printf("*** so that the correct libraries are found at run-time))\n");
  455. }
  456. return 1;
  457. }
  458. ],, no_xml=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
  459. CPPFLAGS="$ac_save_CPPFLAGS"
  460. LIBS="$ac_save_LIBS"
  461. fi
  462. fi
  463. if test "x$no_xml" = x ; then
  464. AC_MSG_RESULT(yes (version $xml_config_major_version.$xml_config_minor_version.$xml_config_micro_version))
  465. ifelse([$2], , :, [$2])
  466. else
  467. AC_MSG_RESULT(no)
  468. if test "$XML2_CONFIG" = "no" ; then
  469. echo "*** The xml2-config script installed by LIBXML could not be found"
  470. echo "*** If libxml was installed in PREFIX, make sure PREFIX/bin is in"
  471. echo "*** your path, or set the XML2_CONFIG environment variable to the"
  472. echo "*** full path to xml2-config."
  473. else
  474. if test -f conf.xmltest ; then
  475. :
  476. else
  477. echo "*** Could not run libxml test program, checking why..."
  478. CPPFLAGS="$CPPFLAGS $XML_CPPFLAGS"
  479. LIBS="$LIBS $XML_LIBS"
  480. AC_TRY_LINK([
  481. #include <libxml/xmlversion.h>
  482. #include <stdio.h>
  483. ], [ LIBXML_TEST_VERSION; return 0;],
  484. [ echo "*** The test program compiled, but did not run. This usually means"
  485. echo "*** that the run-time linker is not finding LIBXML or finding the wrong"
  486. echo "*** version of LIBXML. If it is not finding LIBXML, you'll need to set your"
  487. echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
  488. echo "*** to the installed location Also, make sure you have run ldconfig if that"
  489. echo "*** is required on your system"
  490. echo "***"
  491. echo "*** If you have an old version installed, it is best to remove it, although"
  492. echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ],
  493. [ echo "*** The test program failed to compile or link. See the file config.log for the"
  494. echo "*** exact error that occured. This usually means LIBXML was incorrectly installed"
  495. echo "*** or that you have moved LIBXML since it was installed. In the latter case, you"
  496. echo "*** may want to edit the xml2-config script: $XML2_CONFIG" ])
  497. CPPFLAGS="$ac_save_CPPFLAGS"
  498. LIBS="$ac_save_LIBS"
  499. fi
  500. fi
  501. XML_CPPFLAGS=""
  502. XML_LIBS=""
  503. ifelse([$3], , :, [$3])
  504. fi
  505. AC_SUBST(XML_CPPFLAGS)
  506. AC_SUBST(XML_LIBS)
  507. rm -f conf.xmltest
  508. ])
  509. # Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc.
  510. #
  511. # This file is free software; the Free Software Foundation
  512. # gives unlimited permission to copy and/or distribute it,
  513. # with or without modifications, as long as this notice is preserved.
  514. # AM_AUTOMAKE_VERSION(VERSION)
  515. # ----------------------------
  516. # Automake X.Y traces this macro to ensure aclocal.m4 has been
  517. # generated from the m4 files accompanying Automake X.Y.
  518. AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"])
  519. # AM_SET_CURRENT_AUTOMAKE_VERSION
  520. # -------------------------------
  521. # Call AM_AUTOMAKE_VERSION so it can be traced.
  522. # This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
  523. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
  524. [AM_AUTOMAKE_VERSION([1.9.6])])
  525. # AM_AUX_DIR_EXPAND -*- Autoconf -*-
  526. # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
  527. #
  528. # This file is free software; the Free Software Foundation
  529. # gives unlimited permission to copy and/or distribute it,
  530. # with or without modifications, as long as this notice is preserved.
  531. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
  532. # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
  533. # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
  534. #
  535. # Of course, Automake must honor this variable whenever it calls a
  536. # tool from the auxiliary directory. The problem is that $srcdir (and
  537. # therefore $ac_aux_dir as well) can be either absolute or relative,
  538. # depending on how configure is run. This is pretty annoying, since
  539. # it makes $ac_aux_dir quite unusable in subdirectories: in the top
  540. # source directory, any form will work fine, but in subdirectories a
  541. # relative path needs to be adjusted first.
  542. #
  543. # $ac_aux_dir/missing
  544. # fails when called from a subdirectory if $ac_aux_dir is relative
  545. # $top_srcdir/$ac_aux_dir/missing
  546. # fails if $ac_aux_dir is absolute,
  547. # fails when called from a subdirectory in a VPATH build with
  548. # a relative $ac_aux_dir
  549. #
  550. # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
  551. # are both prefixed by $srcdir. In an in-source build this is usually
  552. # harmless because $srcdir is `.', but things will broke when you
  553. # start a VPATH build or use an absolute $srcdir.
  554. #
  555. # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
  556. # iff we strip the leading $srcdir from $ac_aux_dir. That would be:
  557. # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
  558. # and then we would define $MISSING as
  559. # MISSING="\${SHELL} $am_aux_dir/missing"
  560. # This will work as long as MISSING is not called from configure, because
  561. # unfortunately $(top_srcdir) has no meaning in configure.
  562. # However there are other variables, like CC, which are often used in
  563. # configure, and could therefore not use this "fixed" $ac_aux_dir.
  564. #
  565. # Another solution, used here, is to always expand $ac_aux_dir to an
  566. # absolute PATH. The drawback is that using absolute paths prevent a
  567. # configured tree to be moved without reconfiguration.
  568. AC_DEFUN([AM_AUX_DIR_EXPAND],
  569. [dnl Rely on autoconf to set up CDPATH properly.
  570. AC_PREREQ([2.50])dnl
  571. # expand $ac_aux_dir to an absolute path
  572. am_aux_dir=`cd $ac_aux_dir && pwd`
  573. ])
  574. # AM_CONDITIONAL -*- Autoconf -*-
  575. # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005
  576. # Free Software Foundation, Inc.
  577. #
  578. # This file is free software; the Free Software Foundation
  579. # gives unlimited permission to copy and/or distribute it,
  580. # with or without modifications, as long as this notice is preserved.
  581. # serial 7
  582. # AM_CONDITIONAL(NAME, SHELL-CONDITION)
  583. # -------------------------------------
  584. # Define a conditional.
  585. AC_DEFUN([AM_CONDITIONAL],
  586. [AC_PREREQ(2.52)dnl
  587. ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
  588. [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
  589. AC_SUBST([$1_TRUE])
  590. AC_SUBST([$1_FALSE])
  591. if $2; then
  592. $1_TRUE=
  593. $1_FALSE='#'
  594. else
  595. $1_TRUE='#'
  596. $1_FALSE=
  597. fi
  598. AC_CONFIG_COMMANDS_PRE(
  599. [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
  600. AC_MSG_ERROR([[conditional "$1" was never defined.
  601. Usually this means the macro was only invoked conditionally.]])
  602. fi])])
  603. # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
  604. # Free Software Foundation, Inc.
  605. #
  606. # This file is free software; the Free Software Foundation
  607. # gives unlimited permission to copy and/or distribute it,
  608. # with or without modifications, as long as this notice is preserved.
  609. # serial 8
  610. # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
  611. # written in clear, in which case automake, when reading aclocal.m4,
  612. # will think it sees a *use*, and therefore will trigger all it's
  613. # C support machinery. Also note that it means that autoscan, seeing
  614. # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
  615. # _AM_DEPENDENCIES(NAME)
  616. # ----------------------
  617. # See how the compiler implements dependency checking.
  618. # NAME is "CC", "CXX", "GCJ", or "OBJC".
  619. # We try a few techniques and use that to set a single cache variable.
  620. #
  621. # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
  622. # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
  623. # dependency, and given that the user is not expected to run this macro,
  624. # just rely on AC_PROG_CC.
  625. AC_DEFUN([_AM_DEPENDENCIES],
  626. [AC_REQUIRE([AM_SET_DEPDIR])dnl
  627. AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
  628. AC_REQUIRE([AM_MAKE_INCLUDE])dnl
  629. AC_REQUIRE([AM_DEP_TRACK])dnl
  630. ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
  631. [$1], CXX, [depcc="$CXX" am_compiler_list=],
  632. [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
  633. [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
  634. [depcc="$$1" am_compiler_list=])
  635. AC_CACHE_CHECK([dependency style of $depcc],
  636. [am_cv_$1_dependencies_compiler_type],
  637. [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
  638. # We make a subdir and do the tests there. Otherwise we can end up
  639. # making bogus files that we don't know about and never remove. For
  640. # instance it was reported that on HP-UX the gcc test will end up
  641. # making a dummy file named `D' -- because `-MD' means `put the output
  642. # in D'.
  643. mkdir conftest.dir
  644. # Copy depcomp to subdir because otherwise we won't find it if we're
  645. # using a relative directory.
  646. cp "$am_depcomp" conftest.dir
  647. cd conftest.dir
  648. # We will build objects and dependencies in a subdirectory because
  649. # it helps to detect inapplicable dependency modes. For instance
  650. # both Tru64's cc and ICC support -MD to output dependencies as a
  651. # side effect of compilation, but ICC will put the dependencies in
  652. # the current directory while Tru64 will put them in the object
  653. # directory.
  654. mkdir sub
  655. am_cv_$1_dependencies_compiler_type=none
  656. if test "$am_compiler_list" = ""; then
  657. am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
  658. fi
  659. for depmode in $am_compiler_list; do
  660. # Setup a source with many dependencies, because some compilers
  661. # like to wrap large dependency lists on column 80 (with \), and
  662. # we should not choose a depcomp mode which is confused by this.
  663. #
  664. # We need to recreate these files for each test, as the compiler may
  665. # overwrite some of them when testing with obscure command lines.
  666. # This happens at least with the AIX C compiler.
  667. : > sub/conftest.c
  668. for i in 1 2 3 4 5 6; do
  669. echo '#include "conftst'$i'.h"' >> sub/conftest.c
  670. # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
  671. # Solaris 8's {/usr,}/bin/sh.
  672. touch sub/conftst$i.h
  673. done
  674. echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
  675. case $depmode in
  676. nosideeffect)
  677. # after this tag, mechanisms are not by side-effect, so they'll
  678. # only be used when explicitly requested
  679. if test "x$enable_dependency_tracking" = xyes; then
  680. continue
  681. else
  682. break
  683. fi
  684. ;;
  685. none) break ;;
  686. esac
  687. # We check with `-c' and `-o' for the sake of the "dashmstdout"
  688. # mode. It turns out that the SunPro C++ compiler does not properly
  689. # handle `-M -o', and we need to detect this.
  690. if depmode=$depmode \
  691. source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
  692. depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
  693. $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
  694. >/dev/null 2>conftest.err &&
  695. grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
  696. grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
  697. ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
  698. # icc doesn't choke on unknown options, it will just issue warnings
  699. # or remarks (even with -Werror). So we grep stderr for any message
  700. # that says an option was ignored or not supported.
  701. # When given -MP, icc 7.0 and 7.1 complain thusly:
  702. # icc: Command line warning: ignoring option '-M'; no argument required
  703. # The diagnosis changed in icc 8.0:
  704. # icc: Command line remark: option '-MP' not supported
  705. if (grep 'ignoring option' conftest.err ||
  706. grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
  707. am_cv_$1_dependencies_compiler_type=$depmode
  708. break
  709. fi
  710. fi
  711. done
  712. cd ..
  713. rm -rf conftest.dir
  714. else
  715. am_cv_$1_dependencies_compiler_type=none
  716. fi
  717. ])
  718. AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
  719. AM_CONDITIONAL([am__fastdep$1], [
  720. test "x$enable_dependency_tracking" != xno \
  721. && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
  722. ])
  723. # AM_SET_DEPDIR
  724. # -------------
  725. # Choose a directory name for dependency files.
  726. # This macro is AC_REQUIREd in _AM_DEPENDENCIES
  727. AC_DEFUN([AM_SET_DEPDIR],
  728. [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
  729. AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
  730. ])
  731. # AM_DEP_TRACK
  732. # ------------
  733. AC_DEFUN([AM_DEP_TRACK],
  734. [AC_ARG_ENABLE(dependency-tracking,
  735. [ --disable-dependency-tracking speeds up one-time build
  736. --enable-dependency-tracking do not reject slow dependency extractors])
  737. if test "x$enable_dependency_tracking" != xno; then
  738. am_depcomp="$ac_aux_dir/depcomp"
  739. AMDEPBACKSLASH='\'
  740. fi
  741. AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
  742. AC_SUBST([AMDEPBACKSLASH])
  743. ])
  744. # Generate code to set up dependency tracking. -*- Autoconf -*-
  745. # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
  746. # Free Software Foundation, Inc.
  747. #
  748. # This file is free software; the Free Software Foundation
  749. # gives unlimited permission to copy and/or distribute it,
  750. # with or without modifications, as long as this notice is preserved.
  751. #serial 3
  752. # _AM_OUTPUT_DEPENDENCY_COMMANDS
  753. # ------------------------------
  754. AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
  755. [for mf in $CONFIG_FILES; do
  756. # Strip MF so we end up with the name of the file.
  757. mf=`echo "$mf" | sed -e 's/:.*$//'`
  758. # Check whether this is an Automake generated Makefile or not.
  759. # We used to match only the files named `Makefile.in', but
  760. # some people rename them; so instead we look at the file content.
  761. # Grep'ing the first line is not enough: some people post-process
  762. # each Makefile.in and add a new line on top of each file to say so.
  763. # So let's grep whole file.
  764. if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
  765. dirpart=`AS_DIRNAME("$mf")`
  766. else
  767. continue
  768. fi
  769. # Extract the definition of DEPDIR, am__include, and am__quote
  770. # from the Makefile without running `make'.
  771. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
  772. test -z "$DEPDIR" && continue
  773. am__include=`sed -n 's/^am__include = //p' < "$mf"`
  774. test -z "am__include" && continue
  775. am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
  776. # When using ansi2knr, U may be empty or an underscore; expand it
  777. U=`sed -n 's/^U = //p' < "$mf"`
  778. # Find all dependency output files, they are included files with
  779. # $(DEPDIR) in their names. We invoke sed twice because it is the
  780. # simplest approach to changing $(DEPDIR) to its actual value in the
  781. # expansion.
  782. for file in `sed -n "
  783. s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
  784. sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
  785. # Make sure the directory exists.
  786. test -f "$dirpart/$file" && continue
  787. fdir=`AS_DIRNAME(["$file"])`
  788. AS_MKDIR_P([$dirpart/$fdir])
  789. # echo "creating $dirpart/$file"
  790. echo '# dummy' > "$dirpart/$file"
  791. done
  792. done
  793. ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
  794. # AM_OUTPUT_DEPENDENCY_COMMANDS
  795. # -----------------------------
  796. # This macro should only be invoked once -- use via AC_REQUIRE.
  797. #
  798. # This code is only required when automatic dependency tracking
  799. # is enabled. FIXME. This creates each `.P' file that we will
  800. # need in order to bootstrap the dependency handling code.
  801. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
  802. [AC_CONFIG_COMMANDS([depfiles],
  803. [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
  804. [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
  805. ])
  806. # Do all the work for Automake. -*- Autoconf -*-
  807. # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
  808. # Free Software Foundation, Inc.
  809. #
  810. # This file is free software; the Free Software Foundation
  811. # gives unlimited permission to copy and/or distribute it,
  812. # with or without modifications, as long as this notice is preserved.
  813. # serial 12
  814. # This macro actually does too much. Some checks are only needed if
  815. # your package does certain things. But this isn't really a big deal.
  816. # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
  817. # AM_INIT_AUTOMAKE([OPTIONS])
  818. # -----------------------------------------------
  819. # The call with PACKAGE and VERSION arguments is the old style
  820. # call (pre autoconf-2.50), which is being phased out. PACKAGE
  821. # and VERSION should now be passed to AC_INIT and removed from
  822. # the call to AM_INIT_AUTOMAKE.
  823. # We support both call styles for the transition. After
  824. # the next Automake release, Autoconf can make the AC_INIT
  825. # arguments mandatory, and then we can depend on a new Autoconf
  826. # release and drop the old call support.
  827. AC_DEFUN([AM_INIT_AUTOMAKE],
  828. [AC_PREREQ([2.58])dnl
  829. dnl Autoconf wants to disallow AM_ names. We explicitly allow
  830. dnl the ones we care about.
  831. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
  832. AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
  833. AC_REQUIRE([AC_PROG_INSTALL])dnl
  834. # test to see if srcdir already configured
  835. if test "`cd $srcdir && pwd`" != "`pwd`" &&
  836. test -f $srcdir/config.status; then
  837. AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
  838. fi
  839. # test whether we have cygpath
  840. if test -z "$CYGPATH_W"; then
  841. if (cygpath --version) >/dev/null 2>/dev/null; then
  842. CYGPATH_W='cygpath -w'
  843. else
  844. CYGPATH_W=echo
  845. fi
  846. fi
  847. AC_SUBST([CYGPATH_W])
  848. # Define the identity of the package.
  849. dnl Distinguish between old-style and new-style calls.
  850. m4_ifval([$2],
  851. [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
  852. AC_SUBST([PACKAGE], [$1])dnl
  853. AC_SUBST([VERSION], [$2])],
  854. [_AM_SET_OPTIONS([$1])dnl
  855. AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
  856. AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
  857. _AM_IF_OPTION([no-define],,
  858. [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
  859. AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
  860. # Some tools Automake needs.
  861. AC_REQUIRE([AM_SANITY_CHECK])dnl
  862. AC_REQUIRE([AC_ARG_PROGRAM])dnl
  863. AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
  864. AM_MISSING_PROG(AUTOCONF, autoconf)
  865. AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
  866. AM_MISSING_PROG(AUTOHEADER, autoheader)
  867. AM_MISSING_PROG(MAKEINFO, makeinfo)
  868. AM_PROG_INSTALL_SH
  869. AM_PROG_INSTALL_STRIP
  870. AC_REQUIRE([AM_PROG_MKDIR_P])dnl
  871. # We need awk for the "check" target. The system "awk" is bad on
  872. # some platforms.
  873. AC_REQUIRE([AC_PROG_AWK])dnl
  874. AC_REQUIRE([AC_PROG_MAKE_SET])dnl
  875. AC_REQUIRE([AM_SET_LEADING_DOT])dnl
  876. _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
  877. [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
  878. [_AM_PROG_TAR([v7])])])
  879. _AM_IF_OPTION([no-dependencies],,
  880. [AC_PROVIDE_IFELSE([AC_PROG_CC],
  881. [_AM_DEPENDENCIES(CC)],
  882. [define([AC_PROG_CC],
  883. defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
  884. AC_PROVIDE_IFELSE([AC_PROG_CXX],
  885. [_AM_DEPENDENCIES(CXX)],
  886. [define([AC_PROG_CXX],
  887. defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
  888. ])
  889. ])
  890. # When config.status generates a header, we must update the stamp-h file.
  891. # This file resides in the same directory as the config header
  892. # that is generated. The stamp files are numbered to have different names.
  893. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
  894. # loop where config.status creates the headers, so we can generate
  895. # our stamp files there.
  896. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
  897. [# Compute $1's index in $config_headers.
  898. _am_stamp_count=1
  899. for _am_header in $config_headers :; do
  900. case $_am_header in
  901. $1 | $1:* )
  902. break ;;
  903. * )
  904. _am_stamp_count=`expr $_am_stamp_count + 1` ;;
  905. esac
  906. done
  907. echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
  908. # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
  909. #
  910. # This file is free software; the Free Software Foundation
  911. # gives unlimited permission to copy and/or distribute it,
  912. # with or without modifications, as long as this notice is preserved.
  913. # AM_PROG_INSTALL_SH
  914. # ------------------
  915. # Define $install_sh.
  916. AC_DEFUN([AM_PROG_INSTALL_SH],
  917. [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
  918. install_sh=${install_sh-"$am_aux_dir/install-sh"}
  919. AC_SUBST(install_sh)])
  920. # Copyright (C) 2003, 2005 Free Software Foundation, Inc.
  921. #
  922. # This file is free software; the Free Software Foundation
  923. # gives unlimited permission to copy and/or distribute it,
  924. # with or without modifications, as long as this notice is preserved.
  925. # serial 2
  926. # Check whether the underlying file-system supports filenames
  927. # with a leading dot. For instance MS-DOS doesn't.
  928. AC_DEFUN([AM_SET_LEADING_DOT],
  929. [rm -rf .tst 2>/dev/null
  930. mkdir .tst 2>/dev/null
  931. if test -d .tst; then
  932. am__leading_dot=.
  933. else
  934. am__leading_dot=_
  935. fi
  936. rmdir .tst 2>/dev/null
  937. AC_SUBST([am__leading_dot])])
  938. # Check to see how 'make' treats includes. -*- Autoconf -*-
  939. # Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
  940. #
  941. # This file is free software; the Free Software Foundation
  942. # gives unlimited permission to copy and/or distribute it,
  943. # with or without modifications, as long as this notice is preserved.
  944. # serial 3
  945. # AM_MAKE_INCLUDE()
  946. # -----------------
  947. # Check to see how make treats includes.
  948. AC_DEFUN([AM_MAKE_INCLUDE],
  949. [am_make=${MAKE-make}
  950. cat > confinc << 'END'
  951. am__doit:
  952. @echo done
  953. .PHONY: am__doit
  954. END
  955. # If we don't find an include directive, just comment out the code.
  956. AC_MSG_CHECKING([for style of include used by $am_make])
  957. am__include="#"
  958. am__quote=
  959. _am_result=none
  960. # First try GNU make style include.
  961. echo "include confinc" > confmf
  962. # We grep out `Entering directory' and `Leaving directory'
  963. # messages which can occur if `w' ends up in MAKEFLAGS.
  964. # In particular we don't look at `^make:' because GNU make might
  965. # be invoked under some other name (usually "gmake"), in which
  966. # case it prints its new name instead of `make'.
  967. if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
  968. am__include=include
  969. am__quote=
  970. _am_result=GNU
  971. fi
  972. # Now try BSD make style include.
  973. if test "$am__include" = "#"; then
  974. echo '.include "confinc"' > confmf
  975. if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
  976. am__include=.include
  977. am__quote="\""
  978. _am_result=BSD
  979. fi
  980. fi
  981. AC_SUBST([am__include])
  982. AC_SUBST([am__quote])
  983. AC_MSG_RESULT([$_am_result])
  984. rm -f confinc confmf
  985. ])
  986. # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
  987. # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005
  988. # Free Software Foundation, Inc.
  989. #
  990. # This file is free software; the Free Software Foundation
  991. # gives unlimited permission to copy and/or distribute it,
  992. # with or without modifications, as long as this notice is preserved.
  993. # serial 4
  994. # AM_MISSING_PROG(NAME, PROGRAM)
  995. # ------------------------------
  996. AC_DEFUN([AM_MISSING_PROG],
  997. [AC_REQUIRE([AM_MISSING_HAS_RUN])
  998. $1=${$1-"${am_missing_run}$2"}
  999. AC_SUBST($1)])
  1000. # AM_MISSING_HAS_RUN
  1001. # ------------------
  1002. # Define MISSING if not defined so far and test if it supports --run.
  1003. # If it does, set am_missing_run to use it, otherwise, to nothing.
  1004. AC_DEFUN([AM_MISSING_HAS_RUN],
  1005. [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
  1006. test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
  1007. # Use eval to expand $SHELL
  1008. if eval "$MISSING --run true"; then
  1009. am_missing_run="$MISSING --run "
  1010. else
  1011. am_missing_run=
  1012. AC_MSG_WARN([`missing' script is too old or missing])
  1013. fi
  1014. ])
  1015. # Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
  1016. #
  1017. # This file is free software; the Free Software Foundation
  1018. # gives unlimited permission to copy and/or distribute it,
  1019. # with or without modifications, as long as this notice is preserved.
  1020. # AM_PROG_MKDIR_P
  1021. # ---------------
  1022. # Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
  1023. #
  1024. # Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
  1025. # created by `make install' are always world readable, even if the
  1026. # installer happens to have an overly restrictive umask (e.g. 077).
  1027. # This was a mistake. There are at least two reasons why we must not
  1028. # use `-m 0755':
  1029. # - it causes special bits like SGID to be ignored,
  1030. # - it may be too restrictive (some setups expect 775 directories).
  1031. #
  1032. # Do not use -m 0755 and let people choose whatever they expect by
  1033. # setting umask.
  1034. #
  1035. # We cannot accept any implementation of `mkdir' that recognizes `-p'.
  1036. # Some implementations (such as Solaris 8's) are not thread-safe: if a
  1037. # parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
  1038. # concurrently, both version can detect that a/ is missing, but only
  1039. # one can create it and the other will error out. Consequently we
  1040. # restrict ourselves to GNU make (using the --version option ensures
  1041. # this.)
  1042. AC_DEFUN([AM_PROG_MKDIR_P],
  1043. [if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
  1044. # We used to keeping the `.' as first argument, in order to
  1045. # allow $(mkdir_p) to be used without argument. As in
  1046. # $(mkdir_p) $(somedir)
  1047. # where $(somedir) is conditionally defined. However this is wrong
  1048. # for two reasons:
  1049. # 1. if the package is installed by a user who cannot write `.'
  1050. # make install will fail,
  1051. # 2. the above comment should most certainly read
  1052. # $(mkdir_p) $(DESTDIR)$(somedir)
  1053. # so it does not work when $(somedir) is undefined and
  1054. # $(DESTDIR) is not.
  1055. # To support the latter case, we have to write
  1056. # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
  1057. # so the `.' trick is pointless.
  1058. mkdir_p='mkdir -p --'
  1059. else
  1060. # On NextStep and OpenStep, the `mkdir' command does not
  1061. # recognize any option. It will interpret all options as
  1062. # directories to create, and then abort because `.' already
  1063. # exists.
  1064. for d in ./-p ./--version;
  1065. do
  1066. test -d $d && rmdir $d
  1067. done
  1068. # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
  1069. if test -f "$ac_aux_dir/mkinstalldirs"; then
  1070. mkdir_p='$(mkinstalldirs)'
  1071. else
  1072. mkdir_p='$(install_sh) -d'
  1073. fi
  1074. fi
  1075. AC_SUBST([mkdir_p])])
  1076. # Helper functions for option handling. -*- Autoconf -*-
  1077. # Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
  1078. #
  1079. # This file is free software; the Free Software Foundation
  1080. # gives unlimited permission to copy and/or distribute it,
  1081. # with or without modifications, as long as this notice is preserved.
  1082. # serial 3
  1083. # _AM_MANGLE_OPTION(NAME)
  1084. # -----------------------
  1085. AC_DEFUN([_AM_MANGLE_OPTION],
  1086. [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
  1087. # _AM_SET_OPTION(NAME)
  1088. # ------------------------------
  1089. # Set option NAME. Presently that only means defining a flag for this option.
  1090. AC_DEFUN([_AM_SET_OPTION],
  1091. [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
  1092. # _AM_SET_OPTIONS(OPTIONS)
  1093. # ----------------------------------
  1094. # OPTIONS is a space-separated list of Automake options.
  1095. AC_DEFUN([_AM_SET_OPTIONS],
  1096. [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
  1097. # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
  1098. # -------------------------------------------
  1099. # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
  1100. AC_DEFUN([_AM_IF_OPTION],
  1101. [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
  1102. # Check to make sure that the build environment is sane. -*- Autoconf -*-
  1103. # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
  1104. # Free Software Foundation, Inc.
  1105. #
  1106. # This file is free software; the Free Software Foundation
  1107. # gives unlimited permission to copy and/or distribute it,
  1108. # with or without modifications, as long as this notice is preserved.
  1109. # serial 4
  1110. # AM_SANITY_CHECK
  1111. # ---------------
  1112. AC_DEFUN([AM_SANITY_CHECK],
  1113. [AC_MSG_CHECKING([whether build environment is sane])
  1114. # Just in case
  1115. sleep 1
  1116. echo timestamp > conftest.file
  1117. # Do `set' in a subshell so we don't clobber the current shell's
  1118. # arguments. Must try -L first in case configure is actually a
  1119. # symlink; some systems play weird games with the mod time of symlinks
  1120. # (eg FreeBSD returns the mod time of the symlink's containing
  1121. # directory).
  1122. if (
  1123. set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
  1124. if test "$[*]" = "X"; then
  1125. # -L didn't work.
  1126. set X `ls -t $srcdir/configure conftest.file`
  1127. fi
  1128. rm -f conftest.file
  1129. if test "$[*]" != "X $srcdir/configure conftest.file" \
  1130. && test "$[*]" != "X conftest.file $srcdir/configure"; then
  1131. # If neither matched, then we have a broken ls. This can happen
  1132. # if, for instance, CONFIG_SHELL is bash and it inherits a
  1133. # broken ls alias from the environment. This has actually
  1134. # happened. Such a system could not be considered "sane".
  1135. AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
  1136. alias in your environment])
  1137. fi
  1138. test "$[2]" = conftest.file
  1139. )
  1140. then
  1141. # Ok.
  1142. :
  1143. else
  1144. AC_MSG_ERROR([newly created file is older than distributed files!
  1145. Check your system clock])
  1146. fi
  1147. AC_MSG_RESULT(yes)])
  1148. # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
  1149. #
  1150. # This file is free software; the Free Software Foundation
  1151. # gives unlimited permission to copy and/or distribute it,
  1152. # with or without modifications, as long as this notice is preserved.
  1153. # AM_PROG_INSTALL_STRIP
  1154. # ---------------------
  1155. # One issue with vendor `install' (even GNU) is that you can't
  1156. # specify the program used to strip binaries. This is especially
  1157. # annoying in cross-compiling environments, where the build's strip
  1158. # is unlikely to handle the host's binaries.
  1159. # Fortunately install-sh will honor a STRIPPROG variable, so we
  1160. # always use install-sh in `make install-strip', and initialize
  1161. # STRIPPROG with the value of the STRIP variable (set by the user).
  1162. AC_DEFUN([AM_PROG_INSTALL_STRIP],
  1163. [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
  1164. # Installed binaries are usually stripped using `strip' when the user
  1165. # run `make install-strip'. However `strip' might not be the right
  1166. # tool to use in cross-compilation environments, therefore Automake
  1167. # will honor the `STRIP' environment variable to overrule this program.
  1168. dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
  1169. if test "$cross_compiling" != no; then
  1170. AC_CHECK_TOOL([STRIP], [strip], :)
  1171. fi
  1172. INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
  1173. AC_SUBST([INSTALL_STRIP_PROGRAM])])
  1174. # Check how to create a tarball. -*- Autoconf -*-
  1175. # Copyright (C) 2004, 2005 Free Software Foundation, Inc.
  1176. #
  1177. # This file is free software; the Free Software Foundation
  1178. # gives unlimited permission to copy and/or distribute it,
  1179. # with or without modifications, as long as this notice is preserved.
  1180. # serial 2
  1181. # _AM_PROG_TAR(FORMAT)
  1182. # --------------------
  1183. # Check how to create a tarball in format FORMAT.
  1184. # FORMAT should be one of `v7', `ustar', or `pax'.
  1185. #
  1186. # Substitute a variable $(am__tar) that is a command
  1187. # writing to stdout a FORMAT-tarball containing the directory
  1188. # $tardir.
  1189. # tardir=directory && $(am__tar) > result.tar
  1190. #
  1191. # Substitute a variable $(am__untar) that extract such
  1192. # a tarball read from stdin.
  1193. # $(am__untar) < result.tar
  1194. AC_DEFUN([_AM_PROG_TAR],
  1195. [# Always define AMTAR for backward compatibility.
  1196. AM_MISSING_PROG([AMTAR], [tar])
  1197. m4_if([$1], [v7],
  1198. [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
  1199. [m4_case([$1], [ustar],, [pax],,
  1200. [m4_fatal([Unknown tar format])])
  1201. AC_MSG_CHECKING([how to create a $1 tar archive])
  1202. # Loop over all known methods to create a tar archive until one works.
  1203. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
  1204. _am_tools=${am_cv_prog_tar_$1-$_am_tools}
  1205. # Do not fold the above two line into one, because Tru64 sh and
  1206. # Solaris sh will not grok spaces in the rhs of `-'.
  1207. for _am_tool in $_am_tools
  1208. do
  1209. case $_am_tool in
  1210. gnutar)
  1211. for _am_tar in tar gnutar gtar;
  1212. do
  1213. AM_RUN_LOG([$_am_tar --version]) && break
  1214. done
  1215. am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
  1216. am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
  1217. am__untar="$_am_tar -xf -"
  1218. ;;
  1219. plaintar)
  1220. # Must skip GNU tar: if it does not support --format= it doesn't create
  1221. # ustar tarball either.
  1222. (tar --version) >/dev/null 2>&1 && continue
  1223. am__tar='tar chf - "$$tardir"'
  1224. am__tar_='tar chf - "$tardir"'
  1225. am__untar='tar xf -'
  1226. ;;
  1227. pax)
  1228. am__tar='pax -L -x $1 -w "$$tardir"'
  1229. am__tar_='pax -L -x $1 -w "$tardir"'
  1230. am__untar='pax -r'
  1231. ;;
  1232. cpio)
  1233. am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
  1234. am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
  1235. am__untar='cpio -i -H $1 -d'
  1236. ;;
  1237. none)
  1238. am__tar=false
  1239. am__tar_=false
  1240. am__untar=false
  1241. ;;
  1242. esac
  1243. # If the value was cached, stop now. We just wanted to have am__tar
  1244. # and am__untar set.
  1245. test -n "${am_cv_prog_tar_$1}" && break
  1246. # tar/untar a dummy directory, and stop if the command works
  1247. rm -rf conftest.dir
  1248. mkdir conftest.dir
  1249. echo GrepMe > conftest.dir/file
  1250. AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
  1251. rm -rf conftest.dir
  1252. if test -s conftest.tar; then
  1253. AM_RUN_LOG([$am__untar <conftest.tar])
  1254. grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
  1255. fi
  1256. done
  1257. rm -rf conftest.dir
  1258. AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
  1259. AC_MSG_RESULT([$am_cv_prog_tar_$1])])
  1260. AC_SUBST([am__tar])
  1261. AC_SUBST([am__untar])
  1262. ]) # _AM_PROG_TAR
  1263. m4_include([m4/codeset.m4])
  1264. m4_include([m4/gettext.m4])
  1265. m4_include([m4/glibc21.m4])
  1266. m4_include([m4/iconv.m4])
  1267. m4_include([m4/intdiv0.m4])
  1268. m4_include([m4/inttypes-pri.m4])
  1269. m4_include([m4/inttypes.m4])
  1270. m4_include([m4/inttypes_h.m4])
  1271. m4_include([m4/lcmessage.m4])
  1272. m4_include([m4/lib-ld.m4])
  1273. m4_include([m4/lib-link.m4])
  1274. m4_include([m4/lib-prefix.m4])
  1275. m4_include([m4/libares.m4])
  1276. m4_include([m4/libcares.m4])
  1277. m4_include([m4/nls.m4])
  1278. m4_include([m4/openssl.m4])
  1279. m4_include([m4/po.m4])
  1280. m4_include([m4/progtest.m4])
  1281. m4_include([m4/stdint_h.m4])
  1282. m4_include([m4/uintmax_t.m4])
  1283. m4_include([m4/ulonglong.m4])