patch-aclocal_m4 74 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880
  1. $OpenBSD: patch-aclocal_m4,v 1.1 2010/03/24 22:32:16 jasper Exp $
  2. Swith to gtk+2.
  3. From Debian's corewars_0.9.13+ds-1.diff.
  4. --- aclocal.m4.orig Wed Oct 23 14:52:20 2002
  5. +++ aclocal.m4 Wed Mar 24 23:14:23 2010
  6. @@ -1,7 +1,7 @@
  7. -# generated automatically by aclocal 1.7.1 -*- Autoconf -*-
  8. +# generated automatically by aclocal 1.9.6 -*- Autoconf -*-
  9. -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002
  10. -# Free Software Foundation, Inc.
  11. +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
  12. +# 2005 Free Software Foundation, Inc.
  13. # This file is free software; the Free Software Foundation
  14. # gives unlimited permission to copy and/or distribute it,
  15. # with or without modifications, as long as this notice is preserved.
  16. @@ -12,62 +12,79 @@
  17. # PARTICULAR PURPOSE.
  18. # Configure paths for GLIB
  19. -# Owen Taylor 97-11-3
  20. +# Owen Taylor 1997-2001
  21. -dnl AM_PATH_GLIB([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
  22. -dnl Test for GLIB, and define GLIB_CFLAGS and GLIB_LIBS, if "gmodule" or
  23. -dnl gthread is specified in MODULES, pass to glib-config
  24. +dnl AM_PATH_GLIB_2_0([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
  25. +dnl Test for GLIB, and define GLIB_CFLAGS and GLIB_LIBS, if gmodule, gobject,
  26. +dnl gthread, or gio is specified in MODULES, pass to pkg-config
  27. dnl
  28. -AC_DEFUN(AM_PATH_GLIB,
  29. +AC_DEFUN([AM_PATH_GLIB_2_0],
  30. [dnl
  31. -dnl Get the cflags and libraries from the glib-config script
  32. +dnl Get the cflags and libraries from pkg-config
  33. dnl
  34. -AC_ARG_WITH(glib-prefix,[ --with-glib-prefix=PFX Prefix where GLIB is installed (optional)],
  35. - glib_config_prefix="$withval", glib_config_prefix="")
  36. -AC_ARG_WITH(glib-exec-prefix,[ --with-glib-exec-prefix=PFX Exec prefix where GLIB is installed (optional)],
  37. - glib_config_exec_prefix="$withval", glib_config_exec_prefix="")
  38. -AC_ARG_ENABLE(glibtest, [ --disable-glibtest Do not try to compile and run a test GLIB program],
  39. +AC_ARG_ENABLE(glibtest, [ --disable-glibtest do not try to compile and run a test GLIB program],
  40. , enable_glibtest=yes)
  41. - if test x$glib_config_exec_prefix != x ; then
  42. - glib_config_args="$glib_config_args --exec-prefix=$glib_config_exec_prefix"
  43. - if test x${GLIB_CONFIG+set} != xset ; then
  44. - GLIB_CONFIG=$glib_config_exec_prefix/bin/glib-config
  45. - fi
  46. - fi
  47. - if test x$glib_config_prefix != x ; then
  48. - glib_config_args="$glib_config_args --prefix=$glib_config_prefix"
  49. - if test x${GLIB_CONFIG+set} != xset ; then
  50. - GLIB_CONFIG=$glib_config_prefix/bin/glib-config
  51. - fi
  52. - fi
  53. -
  54. + pkg_config_args=glib-2.0
  55. for module in . $4
  56. do
  57. case "$module" in
  58. gmodule)
  59. - glib_config_args="$glib_config_args gmodule"
  60. + pkg_config_args="$pkg_config_args gmodule-2.0"
  61. ;;
  62. + gmodule-no-export)
  63. + pkg_config_args="$pkg_config_args gmodule-no-export-2.0"
  64. + ;;
  65. + gobject)
  66. + pkg_config_args="$pkg_config_args gobject-2.0"
  67. + ;;
  68. gthread)
  69. - glib_config_args="$glib_config_args gthread"
  70. + pkg_config_args="$pkg_config_args gthread-2.0"
  71. ;;
  72. + gio*)
  73. + pkg_config_args="$pkg_config_args $module-2.0"
  74. + ;;
  75. esac
  76. done
  77. - AC_PATH_PROG(GLIB_CONFIG, glib-config, no)
  78. - min_glib_version=ifelse([$1], ,0.99.7,$1)
  79. - AC_MSG_CHECKING(for GLIB - version >= $min_glib_version)
  80. + PKG_PROG_PKG_CONFIG([0.16])
  81. +
  82. no_glib=""
  83. - if test "$GLIB_CONFIG" = "no" ; then
  84. +
  85. + if test "x$PKG_CONFIG" = x ; then
  86. no_glib=yes
  87. - else
  88. - GLIB_CFLAGS=`$GLIB_CONFIG $glib_config_args --cflags`
  89. - GLIB_LIBS=`$GLIB_CONFIG $glib_config_args --libs`
  90. - glib_config_major_version=`$GLIB_CONFIG $glib_config_args --version | \
  91. + PKG_CONFIG=no
  92. + fi
  93. +
  94. + min_glib_version=ifelse([$1], ,2.0.0,$1)
  95. + AC_MSG_CHECKING(for GLIB - version >= $min_glib_version)
  96. +
  97. + if test x$PKG_CONFIG != xno ; then
  98. + ## don't try to run the test against uninstalled libtool libs
  99. + if $PKG_CONFIG --uninstalled $pkg_config_args; then
  100. + echo "Will use uninstalled version of GLib found in PKG_CONFIG_PATH"
  101. + enable_glibtest=no
  102. + fi
  103. +
  104. + if $PKG_CONFIG --atleast-version $min_glib_version $pkg_config_args; then
  105. + :
  106. + else
  107. + no_glib=yes
  108. + fi
  109. + fi
  110. +
  111. + if test x"$no_glib" = x ; then
  112. + GLIB_GENMARSHAL=`$PKG_CONFIG --variable=glib_genmarshal glib-2.0`
  113. + GOBJECT_QUERY=`$PKG_CONFIG --variable=gobject_query glib-2.0`
  114. + GLIB_MKENUMS=`$PKG_CONFIG --variable=glib_mkenums glib-2.0`
  115. +
  116. + GLIB_CFLAGS=`$PKG_CONFIG --cflags $pkg_config_args`
  117. + GLIB_LIBS=`$PKG_CONFIG --libs $pkg_config_args`
  118. + glib_config_major_version=`$PKG_CONFIG --modversion glib-2.0 | \
  119. sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
  120. - glib_config_minor_version=`$GLIB_CONFIG $glib_config_args --version | \
  121. + glib_config_minor_version=`$PKG_CONFIG --modversion glib-2.0 | \
  122. sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
  123. - glib_config_micro_version=`$GLIB_CONFIG $glib_config_args --version | \
  124. + glib_config_micro_version=`$PKG_CONFIG --modversion glib-2.0 | \
  125. sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
  126. if test "x$enable_glibtest" = "xyes" ; then
  127. ac_save_CFLAGS="$CFLAGS"
  128. @@ -76,7 +93,7 @@ AC_ARG_ENABLE(glibtest, [ --disable-glibtest Do
  129. LIBS="$GLIB_LIBS $LIBS"
  130. dnl
  131. dnl Now check if the installed GLIB is sufficiently new. (Also sanity
  132. -dnl checks the results of glib-config to some extent
  133. +dnl checks the results of pkg-config to some extent)
  134. dnl
  135. rm -f conf.glibtest
  136. AC_TRY_RUN([
  137. @@ -103,17 +120,16 @@ main ()
  138. (glib_minor_version != $glib_config_minor_version) ||
  139. (glib_micro_version != $glib_config_micro_version))
  140. {
  141. - printf("\n*** 'glib-config --version' returned %d.%d.%d, but GLIB (%d.%d.%d)\n",
  142. + printf("\n*** 'pkg-config --modversion glib-2.0' returned %d.%d.%d, but GLIB (%d.%d.%d)\n",
  143. $glib_config_major_version, $glib_config_minor_version, $glib_config_micro_version,
  144. glib_major_version, glib_minor_version, glib_micro_version);
  145. - printf ("*** was found! If glib-config was correct, then it is best\n");
  146. - printf ("*** to remove the old version of GLIB. You may also be able to fix the error\n");
  147. + printf ("*** was found! If pkg-config was correct, then it is best\n");
  148. + printf ("*** to remove the old version of GLib. You may also be able to fix the error\n");
  149. printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
  150. printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
  151. printf("*** required on your system.\n");
  152. - printf("*** If glib-config was wrong, set the environment variable GLIB_CONFIG\n");
  153. - printf("*** to point to the correct copy of glib-config, and remove the file config.cache\n");
  154. - printf("*** before re-running configure\n");
  155. + printf("*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH\n");
  156. + printf("*** to point to the correct configuration files\n");
  157. }
  158. else if ((glib_major_version != GLIB_MAJOR_VERSION) ||
  159. (glib_minor_version != GLIB_MINOR_VERSION) ||
  160. @@ -141,10 +157,10 @@ main ()
  161. printf("*** GLIB is always available from ftp://ftp.gtk.org.\n");
  162. printf("***\n");
  163. printf("*** If you have already installed a sufficiently new version, this error\n");
  164. - printf("*** probably means that the wrong copy of the glib-config shell script is\n");
  165. + printf("*** probably means that the wrong copy of the pkg-config shell script is\n");
  166. printf("*** being found. The easiest way to fix this is to remove the old version\n");
  167. - printf("*** of GLIB, but you can also set the GLIB_CONFIG environment to point to the\n");
  168. - printf("*** correct copy of glib-config. (In this case, you will have to\n");
  169. + printf("*** of GLIB, but you can also set the PKG_CONFIG environment to point to the\n");
  170. + printf("*** correct copy of pkg-config. (In this case, you will have to\n");
  171. printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
  172. printf("*** so that the correct libraries are found at run-time))\n");
  173. }
  174. @@ -157,20 +173,20 @@ main ()
  175. fi
  176. fi
  177. if test "x$no_glib" = x ; then
  178. - AC_MSG_RESULT(yes)
  179. + AC_MSG_RESULT(yes (version $glib_config_major_version.$glib_config_minor_version.$glib_config_micro_version))
  180. ifelse([$2], , :, [$2])
  181. else
  182. AC_MSG_RESULT(no)
  183. - if test "$GLIB_CONFIG" = "no" ; then
  184. - echo "*** The glib-config script installed by GLIB could not be found"
  185. - echo "*** If GLIB was installed in PREFIX, make sure PREFIX/bin is in"
  186. - echo "*** your path, or set the GLIB_CONFIG environment variable to the"
  187. - echo "*** full path to glib-config."
  188. + if test "$PKG_CONFIG" = "no" ; then
  189. + echo "*** A new enough version of pkg-config was not found."
  190. + echo "*** See http://www.freedesktop.org/software/pkgconfig/"
  191. else
  192. if test -f conf.glibtest ; then
  193. :
  194. else
  195. echo "*** Could not run GLIB test program, checking why..."
  196. + ac_save_CFLAGS="$CFLAGS"
  197. + ac_save_LIBS="$LIBS"
  198. CFLAGS="$CFLAGS $GLIB_CFLAGS"
  199. LIBS="$LIBS $GLIB_LIBS"
  200. AC_TRY_LINK([
  201. @@ -185,82 +201,93 @@ main ()
  202. echo "*** is required on your system"
  203. echo "***"
  204. echo "*** If you have an old version installed, it is best to remove it, although"
  205. - echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
  206. - echo "***"
  207. - echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that"
  208. - echo "*** came with the system with the command"
  209. - echo "***"
  210. - echo "*** rpm --erase --nodeps gtk gtk-devel" ],
  211. + echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ],
  212. [ echo "*** The test program failed to compile or link. See the file config.log for the"
  213. - echo "*** exact error that occured. This usually means GLIB was incorrectly installed"
  214. - echo "*** or that you have moved GLIB since it was installed. In the latter case, you"
  215. - echo "*** may want to edit the glib-config script: $GLIB_CONFIG" ])
  216. + echo "*** exact error that occured. This usually means GLIB is incorrectly installed."])
  217. CFLAGS="$ac_save_CFLAGS"
  218. LIBS="$ac_save_LIBS"
  219. fi
  220. fi
  221. GLIB_CFLAGS=""
  222. GLIB_LIBS=""
  223. + GLIB_GENMARSHAL=""
  224. + GOBJECT_QUERY=""
  225. + GLIB_MKENUMS=""
  226. ifelse([$3], , :, [$3])
  227. fi
  228. AC_SUBST(GLIB_CFLAGS)
  229. AC_SUBST(GLIB_LIBS)
  230. + AC_SUBST(GLIB_GENMARSHAL)
  231. + AC_SUBST(GOBJECT_QUERY)
  232. + AC_SUBST(GLIB_MKENUMS)
  233. rm -f conf.glibtest
  234. ])
  235. # Configure paths for GTK+
  236. -# Owen Taylor 97-11-3
  237. +# Owen Taylor 1997-2001
  238. -dnl AM_PATH_GTK([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
  239. -dnl Test for GTK, and define GTK_CFLAGS and GTK_LIBS
  240. +dnl AM_PATH_GTK_2_0([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
  241. +dnl Test for GTK+, and define GTK_CFLAGS and GTK_LIBS, if gthread is specified in MODULES,
  242. +dnl pass to pkg-config
  243. dnl
  244. -AC_DEFUN(AM_PATH_GTK,
  245. +AC_DEFUN([AM_PATH_GTK_2_0],
  246. [dnl
  247. -dnl Get the cflags and libraries from the gtk-config script
  248. +dnl Get the cflags and libraries from pkg-config
  249. dnl
  250. -AC_ARG_WITH(gtk-prefix,[ --with-gtk-prefix=PFX Prefix where GTK is installed (optional)],
  251. - gtk_config_prefix="$withval", gtk_config_prefix="")
  252. -AC_ARG_WITH(gtk-exec-prefix,[ --with-gtk-exec-prefix=PFX Exec prefix where GTK is installed (optional)],
  253. - gtk_config_exec_prefix="$withval", gtk_config_exec_prefix="")
  254. -AC_ARG_ENABLE(gtktest, [ --disable-gtktest Do not try to compile and run a test GTK program],
  255. +AC_ARG_ENABLE(gtktest, [ --disable-gtktest do not try to compile and run a test GTK+ program],
  256. , enable_gtktest=yes)
  257. + pkg_config_args=gtk+-2.0
  258. for module in . $4
  259. do
  260. case "$module" in
  261. gthread)
  262. - gtk_config_args="$gtk_config_args gthread"
  263. + pkg_config_args="$pkg_config_args gthread-2.0"
  264. ;;
  265. esac
  266. done
  267. - if test x$gtk_config_exec_prefix != x ; then
  268. - gtk_config_args="$gtk_config_args --exec-prefix=$gtk_config_exec_prefix"
  269. - if test x${GTK_CONFIG+set} != xset ; then
  270. - GTK_CONFIG=$gtk_config_exec_prefix/bin/gtk-config
  271. - fi
  272. + no_gtk=""
  273. +
  274. + AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
  275. +
  276. + if test x$PKG_CONFIG != xno ; then
  277. + if pkg-config --atleast-pkgconfig-version 0.7 ; then
  278. + :
  279. + else
  280. + echo "*** pkg-config too old; version 0.7 or better required."
  281. + no_gtk=yes
  282. + PKG_CONFIG=no
  283. + fi
  284. + else
  285. + no_gtk=yes
  286. fi
  287. - if test x$gtk_config_prefix != x ; then
  288. - gtk_config_args="$gtk_config_args --prefix=$gtk_config_prefix"
  289. - if test x${GTK_CONFIG+set} != xset ; then
  290. - GTK_CONFIG=$gtk_config_prefix/bin/gtk-config
  291. - fi
  292. +
  293. + min_gtk_version=ifelse([$1], ,2.0.0,$1)
  294. + AC_MSG_CHECKING(for GTK+ - version >= $min_gtk_version)
  295. +
  296. + if test x$PKG_CONFIG != xno ; then
  297. + ## don't try to run the test against uninstalled libtool libs
  298. + if $PKG_CONFIG --uninstalled $pkg_config_args; then
  299. + echo "Will use uninstalled version of GTK+ found in PKG_CONFIG_PATH"
  300. + enable_gtktest=no
  301. + fi
  302. +
  303. + if $PKG_CONFIG --atleast-version $min_gtk_version $pkg_config_args; then
  304. + :
  305. + else
  306. + no_gtk=yes
  307. + fi
  308. fi
  309. - AC_PATH_PROG(GTK_CONFIG, gtk-config, no)
  310. - min_gtk_version=ifelse([$1], ,0.99.7,$1)
  311. - AC_MSG_CHECKING(for GTK - version >= $min_gtk_version)
  312. - no_gtk=""
  313. - if test "$GTK_CONFIG" = "no" ; then
  314. - no_gtk=yes
  315. - else
  316. - GTK_CFLAGS=`$GTK_CONFIG $gtk_config_args --cflags`
  317. - GTK_LIBS=`$GTK_CONFIG $gtk_config_args --libs`
  318. - gtk_config_major_version=`$GTK_CONFIG $gtk_config_args --version | \
  319. + if test x"$no_gtk" = x ; then
  320. + GTK_CFLAGS=`$PKG_CONFIG $pkg_config_args --cflags`
  321. + GTK_LIBS=`$PKG_CONFIG $pkg_config_args --libs`
  322. + gtk_config_major_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
  323. sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
  324. - gtk_config_minor_version=`$GTK_CONFIG $gtk_config_args --version | \
  325. + gtk_config_minor_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
  326. sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
  327. - gtk_config_micro_version=`$GTK_CONFIG $gtk_config_args --version | \
  328. + gtk_config_micro_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
  329. sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
  330. if test "x$enable_gtktest" = "xyes" ; then
  331. ac_save_CFLAGS="$CFLAGS"
  332. @@ -268,8 +295,8 @@ AC_ARG_ENABLE(gtktest, [ --disable-gtktest Do n
  333. CFLAGS="$CFLAGS $GTK_CFLAGS"
  334. LIBS="$GTK_LIBS $LIBS"
  335. dnl
  336. -dnl Now check if the installed GTK is sufficiently new. (Also sanity
  337. -dnl checks the results of gtk-config to some extent
  338. +dnl Now check if the installed GTK+ is sufficiently new. (Also sanity
  339. +dnl checks the results of pkg-config to some extent)
  340. dnl
  341. rm -f conf.gtktest
  342. AC_TRY_RUN([
  343. @@ -296,19 +323,17 @@ main ()
  344. (gtk_minor_version != $gtk_config_minor_version) ||
  345. (gtk_micro_version != $gtk_config_micro_version))
  346. {
  347. - printf("\n*** 'gtk-config --version' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n",
  348. + printf("\n*** 'pkg-config --modversion gtk+-2.0' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n",
  349. $gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version,
  350. gtk_major_version, gtk_minor_version, gtk_micro_version);
  351. - printf ("*** was found! If gtk-config was correct, then it is best\n");
  352. + printf ("*** was found! If pkg-config was correct, then it is best\n");
  353. printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n");
  354. printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
  355. printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
  356. printf("*** required on your system.\n");
  357. - printf("*** If gtk-config was wrong, set the environment variable GTK_CONFIG\n");
  358. - printf("*** to point to the correct copy of gtk-config, and remove the file config.cache\n");
  359. - printf("*** before re-running configure\n");
  360. + printf("*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH\n");
  361. + printf("*** to point to the correct configuration files\n");
  362. }
  363. -#if defined (GTK_MAJOR_VERSION) && defined (GTK_MINOR_VERSION) && defined (GTK_MICRO_VERSION)
  364. else if ((gtk_major_version != GTK_MAJOR_VERSION) ||
  365. (gtk_minor_version != GTK_MINOR_VERSION) ||
  366. (gtk_micro_version != GTK_MICRO_VERSION))
  367. @@ -318,7 +343,6 @@ main ()
  368. printf("*** library (version %d.%d.%d)\n",
  369. gtk_major_version, gtk_minor_version, gtk_micro_version);
  370. }
  371. -#endif /* defined (GTK_MAJOR_VERSION) ... */
  372. else
  373. {
  374. if ((gtk_major_version > major) ||
  375. @@ -336,10 +360,10 @@ main ()
  376. printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n");
  377. printf("***\n");
  378. printf("*** If you have already installed a sufficiently new version, this error\n");
  379. - printf("*** probably means that the wrong copy of the gtk-config shell script is\n");
  380. + printf("*** probably means that the wrong copy of the pkg-config shell script is\n");
  381. printf("*** being found. The easiest way to fix this is to remove the old version\n");
  382. - printf("*** of GTK+, but you can also set the GTK_CONFIG environment to point to the\n");
  383. - printf("*** correct copy of gtk-config. (In this case, you will have to\n");
  384. + printf("*** of GTK+, but you can also set the PKG_CONFIG environment to point to the\n");
  385. + printf("*** correct copy of pkg-config. (In this case, you will have to\n");
  386. printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
  387. printf("*** so that the correct libraries are found at run-time))\n");
  388. }
  389. @@ -352,20 +376,20 @@ main ()
  390. fi
  391. fi
  392. if test "x$no_gtk" = x ; then
  393. - AC_MSG_RESULT(yes)
  394. + AC_MSG_RESULT(yes (version $gtk_config_major_version.$gtk_config_minor_version.$gtk_config_micro_version))
  395. ifelse([$2], , :, [$2])
  396. else
  397. AC_MSG_RESULT(no)
  398. - if test "$GTK_CONFIG" = "no" ; then
  399. - echo "*** The gtk-config script installed by GTK could not be found"
  400. - echo "*** If GTK was installed in PREFIX, make sure PREFIX/bin is in"
  401. - echo "*** your path, or set the GTK_CONFIG environment variable to the"
  402. - echo "*** full path to gtk-config."
  403. + if test "$PKG_CONFIG" = "no" ; then
  404. + echo "*** A new enough version of pkg-config was not found."
  405. + echo "*** See http://pkgconfig.sourceforge.net"
  406. else
  407. if test -f conf.gtktest ; then
  408. :
  409. else
  410. - echo "*** Could not run GTK test program, checking why..."
  411. + echo "*** Could not run GTK+ test program, checking why..."
  412. + ac_save_CFLAGS="$CFLAGS"
  413. + ac_save_LIBS="$LIBS"
  414. CFLAGS="$CFLAGS $GTK_CFLAGS"
  415. LIBS="$LIBS $GTK_LIBS"
  416. AC_TRY_LINK([
  417. @@ -373,23 +397,16 @@ main ()
  418. #include <stdio.h>
  419. ], [ return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); ],
  420. [ echo "*** The test program compiled, but did not run. This usually means"
  421. - echo "*** that the run-time linker is not finding GTK or finding the wrong"
  422. - echo "*** version of GTK. If it is not finding GTK, you'll need to set your"
  423. + echo "*** that the run-time linker is not finding GTK+ or finding the wrong"
  424. + echo "*** version of GTK+. If it is not finding GTK+, you'll need to set your"
  425. echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
  426. echo "*** to the installed location Also, make sure you have run ldconfig if that"
  427. echo "*** is required on your system"
  428. echo "***"
  429. echo "*** If you have an old version installed, it is best to remove it, although"
  430. - echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
  431. - echo "***"
  432. - echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that"
  433. - echo "*** came with the system with the command"
  434. - echo "***"
  435. - echo "*** rpm --erase --nodeps gtk gtk-devel" ],
  436. + echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ],
  437. [ echo "*** The test program failed to compile or link. See the file config.log for the"
  438. - echo "*** exact error that occured. This usually means GTK was incorrectly installed"
  439. - echo "*** or that you have moved GTK since it was installed. In the latter case, you"
  440. - echo "*** may want to edit the gtk-config script: $GTK_CONFIG" ])
  441. + echo "*** exact error that occured. This usually means GTK+ is incorrectly installed."])
  442. CFLAGS="$ac_save_CFLAGS"
  443. LIBS="$ac_save_LIBS"
  444. fi
  445. @@ -403,330 +420,191 @@ main ()
  446. rm -f conf.gtktest
  447. ])
  448. -# Do all the work for Automake. -*- Autoconf -*-
  449. -
  450. -# This macro actually does too much some checks are only needed if
  451. -# your package does certain things. But this isn't really a big deal.
  452. -
  453. -# Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002
  454. -# Free Software Foundation, Inc.
  455. -
  456. +# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
  457. +#
  458. +# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
  459. +#
  460. # This program is free software; you can redistribute it and/or modify
  461. # it under the terms of the GNU General Public License as published by
  462. -# the Free Software Foundation; either version 2, or (at your option)
  463. -# any later version.
  464. -
  465. -# This program is distributed in the hope that it will be useful,
  466. -# but WITHOUT ANY WARRANTY; without even the implied warranty of
  467. -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  468. -# GNU General Public License for more details.
  469. -
  470. +# the Free Software Foundation; either version 2 of the License, or
  471. +# (at your option) any later version.
  472. +#
  473. +# This program is distributed in the hope that it will be useful, but
  474. +# WITHOUT ANY WARRANTY; without even the implied warranty of
  475. +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  476. +# General Public License for more details.
  477. +#
  478. # You should have received a copy of the GNU General Public License
  479. # along with this program; if not, write to the Free Software
  480. -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
  481. -# 02111-1307, USA.
  482. +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  483. +#
  484. +# As a special exception to the GNU General Public License, if you
  485. +# distribute this file as part of a program that contains a
  486. +# configuration script generated by Autoconf, you may include it under
  487. +# the same distribution terms that you use for the rest of that program.
  488. -# serial 8
  489. +# PKG_PROG_PKG_CONFIG([MIN-VERSION])
  490. +# ----------------------------------
  491. +AC_DEFUN([PKG_PROG_PKG_CONFIG],
  492. +[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
  493. +m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
  494. +AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
  495. +if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
  496. + AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
  497. +fi
  498. +if test -n "$PKG_CONFIG"; then
  499. + _pkg_min_version=m4_default([$1], [0.9.0])
  500. + AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
  501. + if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
  502. + AC_MSG_RESULT([yes])
  503. + else
  504. + AC_MSG_RESULT([no])
  505. + PKG_CONFIG=""
  506. + fi
  507. +
  508. +fi[]dnl
  509. +])# PKG_PROG_PKG_CONFIG
  510. -# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
  511. -# written in clear, in which case automake, when reading aclocal.m4,
  512. -# will think it sees a *use*, and therefore will trigger all it's
  513. -# C support machinery. Also note that it means that autoscan, seeing
  514. -# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
  515. +# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
  516. +#
  517. +# Check to see whether a particular set of modules exists. Similar
  518. +# to PKG_CHECK_MODULES(), but does not set variables or print errors.
  519. +#
  520. +#
  521. +# Similar to PKG_CHECK_MODULES, make sure that the first instance of
  522. +# this or PKG_CHECK_MODULES is called, or make sure to call
  523. +# PKG_CHECK_EXISTS manually
  524. +# --------------------------------------------------------------
  525. +AC_DEFUN([PKG_CHECK_EXISTS],
  526. +[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
  527. +if test -n "$PKG_CONFIG" && \
  528. + AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
  529. + m4_ifval([$2], [$2], [:])
  530. +m4_ifvaln([$3], [else
  531. + $3])dnl
  532. +fi])
  533. -AC_PREREQ([2.54])
  534. +# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
  535. +# ---------------------------------------------
  536. +m4_define([_PKG_CONFIG],
  537. +[if test -n "$PKG_CONFIG"; then
  538. + if test -n "$$1"; then
  539. + pkg_cv_[]$1="$$1"
  540. + else
  541. + PKG_CHECK_EXISTS([$3],
  542. + [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
  543. + [pkg_failed=yes])
  544. + fi
  545. +else
  546. + pkg_failed=untried
  547. +fi[]dnl
  548. +])# _PKG_CONFIG
  549. -# Autoconf 2.50 wants to disallow AM_ names. We explicitly allow
  550. -# the ones we care about.
  551. -m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
  552. +# _PKG_SHORT_ERRORS_SUPPORTED
  553. +# -----------------------------
  554. +AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
  555. +[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
  556. +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
  557. + _pkg_short_errors_supported=yes
  558. +else
  559. + _pkg_short_errors_supported=no
  560. +fi[]dnl
  561. +])# _PKG_SHORT_ERRORS_SUPPORTED
  562. -# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
  563. -# AM_INIT_AUTOMAKE([OPTIONS])
  564. -# -----------------------------------------------
  565. -# The call with PACKAGE and VERSION arguments is the old style
  566. -# call (pre autoconf-2.50), which is being phased out. PACKAGE
  567. -# and VERSION should now be passed to AC_INIT and removed from
  568. -# the call to AM_INIT_AUTOMAKE.
  569. -# We support both call styles for the transition. After
  570. -# the next Automake release, Autoconf can make the AC_INIT
  571. -# arguments mandatory, and then we can depend on a new Autoconf
  572. -# release and drop the old call support.
  573. -AC_DEFUN([AM_INIT_AUTOMAKE],
  574. -[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
  575. - AC_REQUIRE([AC_PROG_INSTALL])dnl
  576. -# test to see if srcdir already configured
  577. -if test "`cd $srcdir && pwd`" != "`pwd`" &&
  578. - test -f $srcdir/config.status; then
  579. - AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
  580. -fi
  581. -# test whether we have cygpath
  582. -if test -z "$CYGPATH_W"; then
  583. - if (cygpath --version) >/dev/null 2>/dev/null; then
  584. - CYGPATH_W='cygpath -w'
  585. - else
  586. - CYGPATH_W=echo
  587. - fi
  588. -fi
  589. -AC_SUBST([CYGPATH_W])
  590. +# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
  591. +# [ACTION-IF-NOT-FOUND])
  592. +#
  593. +#
  594. +# Note that if there is a possibility the first call to
  595. +# PKG_CHECK_MODULES might not happen, you should be sure to include an
  596. +# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
  597. +#
  598. +#
  599. +# --------------------------------------------------------------
  600. +AC_DEFUN([PKG_CHECK_MODULES],
  601. +[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
  602. +AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
  603. +AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
  604. -# Define the identity of the package.
  605. -dnl Distinguish between old-style and new-style calls.
  606. -m4_ifval([$2],
  607. -[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
  608. - AC_SUBST([PACKAGE], [$1])dnl
  609. - AC_SUBST([VERSION], [$2])],
  610. -[_AM_SET_OPTIONS([$1])dnl
  611. - AC_SUBST([PACKAGE], [AC_PACKAGE_TARNAME])dnl
  612. - AC_SUBST([VERSION], [AC_PACKAGE_VERSION])])dnl
  613. +pkg_failed=no
  614. +AC_MSG_CHECKING([for $1])
  615. -_AM_IF_OPTION([no-define],,
  616. -[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
  617. - AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
  618. +_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
  619. +_PKG_CONFIG([$1][_LIBS], [libs], [$2])
  620. -# Some tools Automake needs.
  621. -AC_REQUIRE([AM_SANITY_CHECK])dnl
  622. -AC_REQUIRE([AC_ARG_PROGRAM])dnl
  623. -AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
  624. -AM_MISSING_PROG(AUTOCONF, autoconf)
  625. -AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
  626. -AM_MISSING_PROG(AUTOHEADER, autoheader)
  627. -AM_MISSING_PROG(MAKEINFO, makeinfo)
  628. -AM_MISSING_PROG(AMTAR, tar)
  629. -AM_PROG_INSTALL_SH
  630. -AM_PROG_INSTALL_STRIP
  631. -# We need awk for the "check" target. The system "awk" is bad on
  632. -# some platforms.
  633. -AC_REQUIRE([AC_PROG_AWK])dnl
  634. -AC_REQUIRE([AC_PROG_MAKE_SET])dnl
  635. +m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
  636. +and $1[]_LIBS to avoid the need to call pkg-config.
  637. +See the pkg-config man page for more details.])
  638. -_AM_IF_OPTION([no-dependencies],,
  639. -[AC_PROVIDE_IFELSE([AC_PROG_CC],
  640. - [_AM_DEPENDENCIES(CC)],
  641. - [define([AC_PROG_CC],
  642. - defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
  643. -AC_PROVIDE_IFELSE([AC_PROG_CXX],
  644. - [_AM_DEPENDENCIES(CXX)],
  645. - [define([AC_PROG_CXX],
  646. - defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
  647. -])
  648. -])
  649. +if test $pkg_failed = yes; then
  650. + _PKG_SHORT_ERRORS_SUPPORTED
  651. + if test $_pkg_short_errors_supported = yes; then
  652. + $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"`
  653. + else
  654. + $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
  655. + fi
  656. + # Put the nasty error message in config.log where it belongs
  657. + echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
  658. + ifelse([$4], , [AC_MSG_ERROR(dnl
  659. +[Package requirements ($2) were not met:
  660. -# When config.status generates a header, we must update the stamp-h file.
  661. -# This file resides in the same directory as the config header
  662. -# that is generated. The stamp files are numbered to have different names.
  663. +$$1_PKG_ERRORS
  664. -# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
  665. -# loop where config.status creates the headers, so we can generate
  666. -# our stamp files there.
  667. -AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
  668. -[_am_stamp_count=`expr ${_am_stamp_count-0} + 1`
  669. -echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
  670. +Consider adjusting the PKG_CONFIG_PATH environment variable if you
  671. +installed software in a non-standard prefix.
  672. -# Copyright 2002 Free Software Foundation, Inc.
  673. +_PKG_TEXT
  674. +])],
  675. + [AC_MSG_RESULT([no])
  676. + $4])
  677. +elif test $pkg_failed = untried; then
  678. + ifelse([$4], , [AC_MSG_FAILURE(dnl
  679. +[The pkg-config script could not be found or is too old. Make sure it
  680. +is in your PATH or set the PKG_CONFIG environment variable to the full
  681. +path to pkg-config.
  682. -# This program is free software; you can redistribute it and/or modify
  683. -# it under the terms of the GNU General Public License as published by
  684. -# the Free Software Foundation; either version 2, or (at your option)
  685. -# any later version.
  686. +_PKG_TEXT
  687. -# This program is distributed in the hope that it will be useful,
  688. -# but WITHOUT ANY WARRANTY; without even the implied warranty of
  689. -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  690. -# GNU General Public License for more details.
  691. +To get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
  692. + [$4])
  693. +else
  694. + $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
  695. + $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
  696. + AC_MSG_RESULT([yes])
  697. + ifelse([$3], , :, [$3])
  698. +fi[]dnl
  699. +])# PKG_CHECK_MODULES
  700. -# You should have received a copy of the GNU General Public License
  701. -# along with this program; if not, write to the Free Software
  702. -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
  703. +# Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc.
  704. +#
  705. +# This file is free software; the Free Software Foundation
  706. +# gives unlimited permission to copy and/or distribute it,
  707. +# with or without modifications, as long as this notice is preserved.
  708. # AM_AUTOMAKE_VERSION(VERSION)
  709. # ----------------------------
  710. # Automake X.Y traces this macro to ensure aclocal.m4 has been
  711. # generated from the m4 files accompanying Automake X.Y.
  712. -AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.7"])
  713. +AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"])
  714. # AM_SET_CURRENT_AUTOMAKE_VERSION
  715. # -------------------------------
  716. # Call AM_AUTOMAKE_VERSION so it can be traced.
  717. # This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
  718. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
  719. - [AM_AUTOMAKE_VERSION([1.7.1])])
  720. + [AM_AUTOMAKE_VERSION([1.9.6])])
  721. -# Helper functions for option handling. -*- Autoconf -*-
  722. +# AM_AUX_DIR_EXPAND -*- Autoconf -*-
  723. -# Copyright 2001, 2002 Free Software Foundation, Inc.
  724. -
  725. -# This program is free software; you can redistribute it and/or modify
  726. -# it under the terms of the GNU General Public License as published by
  727. -# the Free Software Foundation; either version 2, or (at your option)
  728. -# any later version.
  729. -
  730. -# This program is distributed in the hope that it will be useful,
  731. -# but WITHOUT ANY WARRANTY; without even the implied warranty of
  732. -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  733. -# GNU General Public License for more details.
  734. -
  735. -# You should have received a copy of the GNU General Public License
  736. -# along with this program; if not, write to the Free Software
  737. -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
  738. -# 02111-1307, USA.
  739. -
  740. -# serial 2
  741. -
  742. -# _AM_MANGLE_OPTION(NAME)
  743. -# -----------------------
  744. -AC_DEFUN([_AM_MANGLE_OPTION],
  745. -[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
  746. -
  747. -# _AM_SET_OPTION(NAME)
  748. -# ------------------------------
  749. -# Set option NAME. Presently that only means defining a flag for this option.
  750. -AC_DEFUN([_AM_SET_OPTION],
  751. -[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
  752. -
  753. -# _AM_SET_OPTIONS(OPTIONS)
  754. -# ----------------------------------
  755. -# OPTIONS is a space-separated list of Automake options.
  756. -AC_DEFUN([_AM_SET_OPTIONS],
  757. -[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
  758. -
  759. -# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
  760. -# -------------------------------------------
  761. -# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
  762. -AC_DEFUN([_AM_IF_OPTION],
  763. -[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
  764. -
  765. +# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
  766. #
  767. -# Check to make sure that the build environment is sane.
  768. -#
  769. +# This file is free software; the Free Software Foundation
  770. +# gives unlimited permission to copy and/or distribute it,
  771. +# with or without modifications, as long as this notice is preserved.
  772. -# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
  773. -
  774. -# This program is free software; you can redistribute it and/or modify
  775. -# it under the terms of the GNU General Public License as published by
  776. -# the Free Software Foundation; either version 2, or (at your option)
  777. -# any later version.
  778. -
  779. -# This program is distributed in the hope that it will be useful,
  780. -# but WITHOUT ANY WARRANTY; without even the implied warranty of
  781. -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  782. -# GNU General Public License for more details.
  783. -
  784. -# You should have received a copy of the GNU General Public License
  785. -# along with this program; if not, write to the Free Software
  786. -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
  787. -# 02111-1307, USA.
  788. -
  789. -# serial 3
  790. -
  791. -# AM_SANITY_CHECK
  792. -# ---------------
  793. -AC_DEFUN([AM_SANITY_CHECK],
  794. -[AC_MSG_CHECKING([whether build environment is sane])
  795. -# Just in case
  796. -sleep 1
  797. -echo timestamp > conftest.file
  798. -# Do `set' in a subshell so we don't clobber the current shell's
  799. -# arguments. Must try -L first in case configure is actually a
  800. -# symlink; some systems play weird games with the mod time of symlinks
  801. -# (eg FreeBSD returns the mod time of the symlink's containing
  802. -# directory).
  803. -if (
  804. - set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
  805. - if test "$[*]" = "X"; then
  806. - # -L didn't work.
  807. - set X `ls -t $srcdir/configure conftest.file`
  808. - fi
  809. - rm -f conftest.file
  810. - if test "$[*]" != "X $srcdir/configure conftest.file" \
  811. - && test "$[*]" != "X conftest.file $srcdir/configure"; then
  812. -
  813. - # If neither matched, then we have a broken ls. This can happen
  814. - # if, for instance, CONFIG_SHELL is bash and it inherits a
  815. - # broken ls alias from the environment. This has actually
  816. - # happened. Such a system could not be considered "sane".
  817. - AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
  818. -alias in your environment])
  819. - fi
  820. -
  821. - test "$[2]" = conftest.file
  822. - )
  823. -then
  824. - # Ok.
  825. - :
  826. -else
  827. - AC_MSG_ERROR([newly created file is older than distributed files!
  828. -Check your system clock])
  829. -fi
  830. -AC_MSG_RESULT(yes)])
  831. -
  832. -# -*- Autoconf -*-
  833. -
  834. -
  835. -# Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
  836. -
  837. -# This program is free software; you can redistribute it and/or modify
  838. -# it under the terms of the GNU General Public License as published by
  839. -# the Free Software Foundation; either version 2, or (at your option)
  840. -# any later version.
  841. -
  842. -# This program is distributed in the hope that it will be useful,
  843. -# but WITHOUT ANY WARRANTY; without even the implied warranty of
  844. -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  845. -# GNU General Public License for more details.
  846. -
  847. -# You should have received a copy of the GNU General Public License
  848. -# along with this program; if not, write to the Free Software
  849. -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
  850. -# 02111-1307, USA.
  851. -
  852. -# serial 3
  853. -
  854. -# AM_MISSING_PROG(NAME, PROGRAM)
  855. -# ------------------------------
  856. -AC_DEFUN([AM_MISSING_PROG],
  857. -[AC_REQUIRE([AM_MISSING_HAS_RUN])
  858. -$1=${$1-"${am_missing_run}$2"}
  859. -AC_SUBST($1)])
  860. -
  861. -
  862. -# AM_MISSING_HAS_RUN
  863. -# ------------------
  864. -# Define MISSING if not defined so far and test if it supports --run.
  865. -# If it does, set am_missing_run to use it, otherwise, to nothing.
  866. -AC_DEFUN([AM_MISSING_HAS_RUN],
  867. -[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
  868. -test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
  869. -# Use eval to expand $SHELL
  870. -if eval "$MISSING --run true"; then
  871. - am_missing_run="$MISSING --run "
  872. -else
  873. - am_missing_run=
  874. - AC_MSG_WARN([`missing' script is too old or missing])
  875. -fi
  876. -])
  877. -
  878. -# AM_AUX_DIR_EXPAND
  879. -
  880. -# Copyright 2001 Free Software Foundation, Inc.
  881. -
  882. -# This program is free software; you can redistribute it and/or modify
  883. -# it under the terms of the GNU General Public License as published by
  884. -# the Free Software Foundation; either version 2, or (at your option)
  885. -# any later version.
  886. -
  887. -# This program is distributed in the hope that it will be useful,
  888. -# but WITHOUT ANY WARRANTY; without even the implied warranty of
  889. -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  890. -# GNU General Public License for more details.
  891. -
  892. -# You should have received a copy of the GNU General Public License
  893. -# along with this program; if not, write to the Free Software
  894. -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
  895. -# 02111-1307, USA.
  896. -
  897. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
  898. # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
  899. # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
  900. @@ -765,99 +643,56 @@ fi
  901. # absolute PATH. The drawback is that using absolute paths prevent a
  902. # configured tree to be moved without reconfiguration.
  903. -# Rely on autoconf to set up CDPATH properly.
  904. -AC_PREREQ([2.50])
  905. -
  906. -AC_DEFUN([AM_AUX_DIR_EXPAND], [
  907. +AC_DEFUN([AM_AUX_DIR_EXPAND],
  908. +[dnl Rely on autoconf to set up CDPATH properly.
  909. +AC_PREREQ([2.50])dnl
  910. # expand $ac_aux_dir to an absolute path
  911. am_aux_dir=`cd $ac_aux_dir && pwd`
  912. ])
  913. -# AM_PROG_INSTALL_SH
  914. -# ------------------
  915. -# Define $install_sh.
  916. +# AM_CONDITIONAL -*- Autoconf -*-
  917. -# Copyright 2001 Free Software Foundation, Inc.
  918. +# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005
  919. +# Free Software Foundation, Inc.
  920. +#
  921. +# This file is free software; the Free Software Foundation
  922. +# gives unlimited permission to copy and/or distribute it,
  923. +# with or without modifications, as long as this notice is preserved.
  924. -# This program is free software; you can redistribute it and/or modify
  925. -# it under the terms of the GNU General Public License as published by
  926. -# the Free Software Foundation; either version 2, or (at your option)
  927. -# any later version.
  928. +# serial 7
  929. -# This program is distributed in the hope that it will be useful,
  930. -# but WITHOUT ANY WARRANTY; without even the implied warranty of
  931. -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  932. -# GNU General Public License for more details.
  933. -
  934. -# You should have received a copy of the GNU General Public License
  935. -# along with this program; if not, write to the Free Software
  936. -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
  937. -# 02111-1307, USA.
  938. -
  939. -AC_DEFUN([AM_PROG_INSTALL_SH],
  940. -[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
  941. -install_sh=${install_sh-"$am_aux_dir/install-sh"}
  942. -AC_SUBST(install_sh)])
  943. -
  944. -# AM_PROG_INSTALL_STRIP
  945. -
  946. -# Copyright 2001 Free Software Foundation, Inc.
  947. -
  948. -# This program is free software; you can redistribute it and/or modify
  949. -# it under the terms of the GNU General Public License as published by
  950. -# the Free Software Foundation; either version 2, or (at your option)
  951. -# any later version.
  952. -
  953. -# This program is distributed in the hope that it will be useful,
  954. -# but WITHOUT ANY WARRANTY; without even the implied warranty of
  955. -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  956. -# GNU General Public License for more details.
  957. -
  958. -# You should have received a copy of the GNU General Public License
  959. -# along with this program; if not, write to the Free Software
  960. -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
  961. -# 02111-1307, USA.
  962. -
  963. -# One issue with vendor `install' (even GNU) is that you can't
  964. -# specify the program used to strip binaries. This is especially
  965. -# annoying in cross-compiling environments, where the build's strip
  966. -# is unlikely to handle the host's binaries.
  967. -# Fortunately install-sh will honor a STRIPPROG variable, so we
  968. -# always use install-sh in `make install-strip', and initialize
  969. -# STRIPPROG with the value of the STRIP variable (set by the user).
  970. -AC_DEFUN([AM_PROG_INSTALL_STRIP],
  971. -[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
  972. -# Installed binaries are usually stripped using `strip' when the user
  973. -# run `make install-strip'. However `strip' might not be the right
  974. -# tool to use in cross-compilation environments, therefore Automake
  975. -# will honor the `STRIP' environment variable to overrule this program.
  976. -dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
  977. -if test "$cross_compiling" != no; then
  978. - AC_CHECK_TOOL([STRIP], [strip], :)
  979. +# AM_CONDITIONAL(NAME, SHELL-CONDITION)
  980. +# -------------------------------------
  981. +# Define a conditional.
  982. +AC_DEFUN([AM_CONDITIONAL],
  983. +[AC_PREREQ(2.52)dnl
  984. + ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
  985. + [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
  986. +AC_SUBST([$1_TRUE])
  987. +AC_SUBST([$1_FALSE])
  988. +if $2; then
  989. + $1_TRUE=
  990. + $1_FALSE='#'
  991. +else
  992. + $1_TRUE='#'
  993. + $1_FALSE=
  994. fi
  995. -INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
  996. -AC_SUBST([INSTALL_STRIP_PROGRAM])])
  997. +AC_CONFIG_COMMANDS_PRE(
  998. +[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
  999. + AC_MSG_ERROR([[conditional "$1" was never defined.
  1000. +Usually this means the macro was only invoked conditionally.]])
  1001. +fi])])
  1002. -# serial 4 -*- Autoconf -*-
  1003. -# Copyright 1999, 2000, 2001 Free Software Foundation, Inc.
  1004. +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
  1005. +# Free Software Foundation, Inc.
  1006. +#
  1007. +# This file is free software; the Free Software Foundation
  1008. +# gives unlimited permission to copy and/or distribute it,
  1009. +# with or without modifications, as long as this notice is preserved.
  1010. -# This program is free software; you can redistribute it and/or modify
  1011. -# it under the terms of the GNU General Public License as published by
  1012. -# the Free Software Foundation; either version 2, or (at your option)
  1013. -# any later version.
  1014. +# serial 8
  1015. -# This program is distributed in the hope that it will be useful,
  1016. -# but WITHOUT ANY WARRANTY; without even the implied warranty of
  1017. -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  1018. -# GNU General Public License for more details.
  1019. -
  1020. -# You should have received a copy of the GNU General Public License
  1021. -# along with this program; if not, write to the Free Software
  1022. -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
  1023. -# 02111-1307, USA.
  1024. -
  1025. -
  1026. # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
  1027. # written in clear, in which case automake, when reading aclocal.m4,
  1028. # will think it sees a *use*, and therefore will trigger all it's
  1029. @@ -865,7 +700,6 @@ AC_SUBST([INSTALL_STRIP_PROGRAM])])
  1030. # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
  1031. -
  1032. # _AM_DEPENDENCIES(NAME)
  1033. # ----------------------
  1034. # See how the compiler implements dependency checking.
  1035. @@ -901,18 +735,34 @@ AC_CACHE_CHECK([dependency style of $depcc],
  1036. # using a relative directory.
  1037. cp "$am_depcomp" conftest.dir
  1038. cd conftest.dir
  1039. + # We will build objects and dependencies in a subdirectory because
  1040. + # it helps to detect inapplicable dependency modes. For instance
  1041. + # both Tru64's cc and ICC support -MD to output dependencies as a
  1042. + # side effect of compilation, but ICC will put the dependencies in
  1043. + # the current directory while Tru64 will put them in the object
  1044. + # directory.
  1045. + mkdir sub
  1046. am_cv_$1_dependencies_compiler_type=none
  1047. if test "$am_compiler_list" = ""; then
  1048. am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
  1049. fi
  1050. for depmode in $am_compiler_list; do
  1051. + # Setup a source with many dependencies, because some compilers
  1052. + # like to wrap large dependency lists on column 80 (with \), and
  1053. + # we should not choose a depcomp mode which is confused by this.
  1054. + #
  1055. # We need to recreate these files for each test, as the compiler may
  1056. # overwrite some of them when testing with obscure command lines.
  1057. # This happens at least with the AIX C compiler.
  1058. - echo '#include "conftest.h"' > conftest.c
  1059. - echo 'int i;' > conftest.h
  1060. - echo "${am__include} ${am__quote}conftest.Po${am__quote}" > confmf
  1061. + : > sub/conftest.c
  1062. + for i in 1 2 3 4 5 6; do
  1063. + echo '#include "conftst'$i'.h"' >> sub/conftest.c
  1064. + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
  1065. + # Solaris 8's {/usr,}/bin/sh.
  1066. + touch sub/conftst$i.h
  1067. + done
  1068. + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
  1069. case $depmode in
  1070. nosideeffect)
  1071. @@ -930,13 +780,25 @@ AC_CACHE_CHECK([dependency style of $depcc],
  1072. # mode. It turns out that the SunPro C++ compiler does not properly
  1073. # handle `-M -o', and we need to detect this.
  1074. if depmode=$depmode \
  1075. - source=conftest.c object=conftest.o \
  1076. - depfile=conftest.Po tmpdepfile=conftest.TPo \
  1077. - $SHELL ./depcomp $depcc -c -o conftest.o conftest.c >/dev/null 2>&1 &&
  1078. - grep conftest.h conftest.Po > /dev/null 2>&1 &&
  1079. + source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
  1080. + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
  1081. + $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
  1082. + >/dev/null 2>conftest.err &&
  1083. + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
  1084. + grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
  1085. ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
  1086. - am_cv_$1_dependencies_compiler_type=$depmode
  1087. - break
  1088. + # icc doesn't choke on unknown options, it will just issue warnings
  1089. + # or remarks (even with -Werror). So we grep stderr for any message
  1090. + # that says an option was ignored or not supported.
  1091. + # When given -MP, icc 7.0 and 7.1 complain thusly:
  1092. + # icc: Command line warning: ignoring option '-M'; no argument required
  1093. + # The diagnosis changed in icc 8.0:
  1094. + # icc: Command line remark: option '-MP' not supported
  1095. + if (grep 'ignoring option' conftest.err ||
  1096. + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
  1097. + am_cv_$1_dependencies_compiler_type=$depmode
  1098. + break
  1099. + fi
  1100. fi
  1101. done
  1102. @@ -958,16 +820,8 @@ AM_CONDITIONAL([am__fastdep$1], [
  1103. # Choose a directory name for dependency files.
  1104. # This macro is AC_REQUIREd in _AM_DEPENDENCIES
  1105. AC_DEFUN([AM_SET_DEPDIR],
  1106. -[rm -f .deps 2>/dev/null
  1107. -mkdir .deps 2>/dev/null
  1108. -if test -d .deps; then
  1109. - DEPDIR=.deps
  1110. -else
  1111. - # MS-DOS does not allow filenames that begin with a dot.
  1112. - DEPDIR=_deps
  1113. -fi
  1114. -rmdir .deps 2>/dev/null
  1115. -AC_SUBST([DEPDIR])
  1116. +[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
  1117. +AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
  1118. ])
  1119. @@ -975,8 +829,8 @@ AC_SUBST([DEPDIR])
  1120. # ------------
  1121. AC_DEFUN([AM_DEP_TRACK],
  1122. [AC_ARG_ENABLE(dependency-tracking,
  1123. -[ --disable-dependency-tracking Speeds up one-time builds
  1124. - --enable-dependency-tracking Do not reject slow dependency extractors])
  1125. +[ --disable-dependency-tracking speeds up one-time build
  1126. + --enable-dependency-tracking do not reject slow dependency extractors])
  1127. if test "x$enable_dependency_tracking" != xno; then
  1128. am_depcomp="$ac_aux_dir/depcomp"
  1129. AMDEPBACKSLASH='\'
  1130. @@ -985,27 +839,17 @@ AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tra
  1131. AC_SUBST([AMDEPBACKSLASH])
  1132. ])
  1133. -# Generate code to set up dependency tracking. -*- Autoconf -*-
  1134. +# Generate code to set up dependency tracking. -*- Autoconf -*-
  1135. -# Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
  1136. +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
  1137. +# Free Software Foundation, Inc.
  1138. +#
  1139. +# This file is free software; the Free Software Foundation
  1140. +# gives unlimited permission to copy and/or distribute it,
  1141. +# with or without modifications, as long as this notice is preserved.
  1142. -# This program is free software; you can redistribute it and/or modify
  1143. -# it under the terms of the GNU General Public License as published by
  1144. -# the Free Software Foundation; either version 2, or (at your option)
  1145. -# any later version.
  1146. +#serial 3
  1147. -# This program is distributed in the hope that it will be useful,
  1148. -# but WITHOUT ANY WARRANTY; without even the implied warranty of
  1149. -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  1150. -# GNU General Public License for more details.
  1151. -
  1152. -# You should have received a copy of the GNU General Public License
  1153. -# along with this program; if not, write to the Free Software
  1154. -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
  1155. -# 02111-1307, USA.
  1156. -
  1157. -#serial 2
  1158. -
  1159. # _AM_OUTPUT_DEPENDENCY_COMMANDS
  1160. # ------------------------------
  1161. AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
  1162. @@ -1023,27 +867,21 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
  1163. else
  1164. continue
  1165. fi
  1166. - grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue
  1167. - # Extract the definition of DEP_FILES from the Makefile without
  1168. - # running `make'.
  1169. - DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
  1170. + # Extract the definition of DEPDIR, am__include, and am__quote
  1171. + # from the Makefile without running `make'.
  1172. + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
  1173. test -z "$DEPDIR" && continue
  1174. + am__include=`sed -n 's/^am__include = //p' < "$mf"`
  1175. + test -z "am__include" && continue
  1176. + am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
  1177. # When using ansi2knr, U may be empty or an underscore; expand it
  1178. - U=`sed -n -e '/^U = / s///p' < "$mf"`
  1179. - test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
  1180. - # We invoke sed twice because it is the simplest approach to
  1181. - # changing $(DEPDIR) to its actual value in the expansion.
  1182. - for file in `sed -n -e '
  1183. - /^DEP_FILES = .*\\\\$/ {
  1184. - s/^DEP_FILES = //
  1185. - :loop
  1186. - s/\\\\$//
  1187. - p
  1188. - n
  1189. - /\\\\$/ b loop
  1190. - p
  1191. - }
  1192. - /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
  1193. + U=`sed -n 's/^U = //p' < "$mf"`
  1194. + # Find all dependency output files, they are included files with
  1195. + # $(DEPDIR) in their names. We invoke sed twice because it is the
  1196. + # simplest approach to changing $(DEPDIR) to its actual value in the
  1197. + # expansion.
  1198. + for file in `sed -n "
  1199. + s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
  1200. sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
  1201. # Make sure the directory exists.
  1202. test -f "$dirpart/$file" && continue
  1203. @@ -1069,35 +907,207 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
  1204. [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
  1205. ])
  1206. -# Check to see how 'make' treats includes. -*- Autoconf -*-
  1207. +# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
  1208. +# Free Software Foundation, Inc.
  1209. +#
  1210. +# This file is free software; the Free Software Foundation
  1211. +# gives unlimited permission to copy and/or distribute it,
  1212. +# with or without modifications, as long as this notice is preserved.
  1213. -# Copyright (C) 2001, 2002 Free Software Foundation, Inc.
  1214. +# serial 8
  1215. -# This program is free software; you can redistribute it and/or modify
  1216. -# it under the terms of the GNU General Public License as published by
  1217. -# the Free Software Foundation; either version 2, or (at your option)
  1218. -# any later version.
  1219. +# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS.
  1220. +AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
  1221. -# This program is distributed in the hope that it will be useful,
  1222. -# but WITHOUT ANY WARRANTY; without even the implied warranty of
  1223. -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  1224. -# GNU General Public License for more details.
  1225. +# Do all the work for Automake. -*- Autoconf -*-
  1226. -# You should have received a copy of the GNU General Public License
  1227. -# along with this program; if not, write to the Free Software
  1228. -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
  1229. -# 02111-1307, USA.
  1230. +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
  1231. +# Free Software Foundation, Inc.
  1232. +#
  1233. +# This file is free software; the Free Software Foundation
  1234. +# gives unlimited permission to copy and/or distribute it,
  1235. +# with or without modifications, as long as this notice is preserved.
  1236. +# serial 12
  1237. +
  1238. +# This macro actually does too much. Some checks are only needed if
  1239. +# your package does certain things. But this isn't really a big deal.
  1240. +
  1241. +# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
  1242. +# AM_INIT_AUTOMAKE([OPTIONS])
  1243. +# -----------------------------------------------
  1244. +# The call with PACKAGE and VERSION arguments is the old style
  1245. +# call (pre autoconf-2.50), which is being phased out. PACKAGE
  1246. +# and VERSION should now be passed to AC_INIT and removed from
  1247. +# the call to AM_INIT_AUTOMAKE.
  1248. +# We support both call styles for the transition. After
  1249. +# the next Automake release, Autoconf can make the AC_INIT
  1250. +# arguments mandatory, and then we can depend on a new Autoconf
  1251. +# release and drop the old call support.
  1252. +AC_DEFUN([AM_INIT_AUTOMAKE],
  1253. +[AC_PREREQ([2.58])dnl
  1254. +dnl Autoconf wants to disallow AM_ names. We explicitly allow
  1255. +dnl the ones we care about.
  1256. +m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
  1257. +AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
  1258. +AC_REQUIRE([AC_PROG_INSTALL])dnl
  1259. +# test to see if srcdir already configured
  1260. +if test "`cd $srcdir && pwd`" != "`pwd`" &&
  1261. + test -f $srcdir/config.status; then
  1262. + AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
  1263. +fi
  1264. +
  1265. +# test whether we have cygpath
  1266. +if test -z "$CYGPATH_W"; then
  1267. + if (cygpath --version) >/dev/null 2>/dev/null; then
  1268. + CYGPATH_W='cygpath -w'
  1269. + else
  1270. + CYGPATH_W=echo
  1271. + fi
  1272. +fi
  1273. +AC_SUBST([CYGPATH_W])
  1274. +
  1275. +# Define the identity of the package.
  1276. +dnl Distinguish between old-style and new-style calls.
  1277. +m4_ifval([$2],
  1278. +[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
  1279. + AC_SUBST([PACKAGE], [$1])dnl
  1280. + AC_SUBST([VERSION], [$2])],
  1281. +[_AM_SET_OPTIONS([$1])dnl
  1282. + AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
  1283. + AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
  1284. +
  1285. +_AM_IF_OPTION([no-define],,
  1286. +[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
  1287. + AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
  1288. +
  1289. +# Some tools Automake needs.
  1290. +AC_REQUIRE([AM_SANITY_CHECK])dnl
  1291. +AC_REQUIRE([AC_ARG_PROGRAM])dnl
  1292. +AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
  1293. +AM_MISSING_PROG(AUTOCONF, autoconf)
  1294. +AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
  1295. +AM_MISSING_PROG(AUTOHEADER, autoheader)
  1296. +AM_MISSING_PROG(MAKEINFO, makeinfo)
  1297. +AM_PROG_INSTALL_SH
  1298. +AM_PROG_INSTALL_STRIP
  1299. +AC_REQUIRE([AM_PROG_MKDIR_P])dnl
  1300. +# We need awk for the "check" target. The system "awk" is bad on
  1301. +# some platforms.
  1302. +AC_REQUIRE([AC_PROG_AWK])dnl
  1303. +AC_REQUIRE([AC_PROG_MAKE_SET])dnl
  1304. +AC_REQUIRE([AM_SET_LEADING_DOT])dnl
  1305. +_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
  1306. + [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
  1307. + [_AM_PROG_TAR([v7])])])
  1308. +_AM_IF_OPTION([no-dependencies],,
  1309. +[AC_PROVIDE_IFELSE([AC_PROG_CC],
  1310. + [_AM_DEPENDENCIES(CC)],
  1311. + [define([AC_PROG_CC],
  1312. + defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
  1313. +AC_PROVIDE_IFELSE([AC_PROG_CXX],
  1314. + [_AM_DEPENDENCIES(CXX)],
  1315. + [define([AC_PROG_CXX],
  1316. + defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
  1317. +])
  1318. +])
  1319. +
  1320. +
  1321. +# When config.status generates a header, we must update the stamp-h file.
  1322. +# This file resides in the same directory as the config header
  1323. +# that is generated. The stamp files are numbered to have different names.
  1324. +
  1325. +# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
  1326. +# loop where config.status creates the headers, so we can generate
  1327. +# our stamp files there.
  1328. +AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
  1329. +[# Compute $1's index in $config_headers.
  1330. +_am_stamp_count=1
  1331. +for _am_header in $config_headers :; do
  1332. + case $_am_header in
  1333. + $1 | $1:* )
  1334. + break ;;
  1335. + * )
  1336. + _am_stamp_count=`expr $_am_stamp_count + 1` ;;
  1337. + esac
  1338. +done
  1339. +echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
  1340. +
  1341. +# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
  1342. +#
  1343. +# This file is free software; the Free Software Foundation
  1344. +# gives unlimited permission to copy and/or distribute it,
  1345. +# with or without modifications, as long as this notice is preserved.
  1346. +
  1347. +# AM_PROG_INSTALL_SH
  1348. +# ------------------
  1349. +# Define $install_sh.
  1350. +AC_DEFUN([AM_PROG_INSTALL_SH],
  1351. +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
  1352. +install_sh=${install_sh-"$am_aux_dir/install-sh"}
  1353. +AC_SUBST(install_sh)])
  1354. +
  1355. +# Copyright (C) 2003, 2005 Free Software Foundation, Inc.
  1356. +#
  1357. +# This file is free software; the Free Software Foundation
  1358. +# gives unlimited permission to copy and/or distribute it,
  1359. +# with or without modifications, as long as this notice is preserved.
  1360. +
  1361. # serial 2
  1362. +# Check whether the underlying file-system supports filenames
  1363. +# with a leading dot. For instance MS-DOS doesn't.
  1364. +AC_DEFUN([AM_SET_LEADING_DOT],
  1365. +[rm -rf .tst 2>/dev/null
  1366. +mkdir .tst 2>/dev/null
  1367. +if test -d .tst; then
  1368. + am__leading_dot=.
  1369. +else
  1370. + am__leading_dot=_
  1371. +fi
  1372. +rmdir .tst 2>/dev/null
  1373. +AC_SUBST([am__leading_dot])])
  1374. +
  1375. +# Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2005
  1376. +# Free Software Foundation, Inc.
  1377. +#
  1378. +# This file is free software; the Free Software Foundation
  1379. +# gives unlimited permission to copy and/or distribute it,
  1380. +# with or without modifications, as long as this notice is preserved.
  1381. +
  1382. +# serial 5
  1383. +
  1384. +# AM_PROG_LEX
  1385. +# -----------
  1386. +# Autoconf leaves LEX=: if lex or flex can't be found. Change that to a
  1387. +# "missing" invocation, for better error output.
  1388. +AC_DEFUN([AM_PROG_LEX],
  1389. +[AC_PREREQ(2.50)dnl
  1390. +AC_REQUIRE([AM_MISSING_HAS_RUN])dnl
  1391. +AC_REQUIRE([AC_PROG_LEX])dnl
  1392. +if test "$LEX" = :; then
  1393. + LEX=${am_missing_run}flex
  1394. +fi])
  1395. +
  1396. +# Check to see how 'make' treats includes. -*- Autoconf -*-
  1397. +
  1398. +# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
  1399. +#
  1400. +# This file is free software; the Free Software Foundation
  1401. +# gives unlimited permission to copy and/or distribute it,
  1402. +# with or without modifications, as long as this notice is preserved.
  1403. +
  1404. +# serial 3
  1405. +
  1406. # AM_MAKE_INCLUDE()
  1407. # -----------------
  1408. # Check to see how make treats includes.
  1409. AC_DEFUN([AM_MAKE_INCLUDE],
  1410. [am_make=${MAKE-make}
  1411. cat > confinc << 'END'
  1412. -doit:
  1413. +am__doit:
  1414. @echo done
  1415. +.PHONY: am__doit
  1416. END
  1417. # If we don't find an include directive, just comment out the code.
  1418. AC_MSG_CHECKING([for style of include used by $am_make])
  1419. @@ -1125,112 +1135,317 @@ if test "$am__include" = "#"; then
  1420. _am_result=BSD
  1421. fi
  1422. fi
  1423. -AC_SUBST(am__include)
  1424. -AC_SUBST(am__quote)
  1425. -AC_MSG_RESULT($_am_result)
  1426. +AC_SUBST([am__include])
  1427. +AC_SUBST([am__quote])
  1428. +AC_MSG_RESULT([$_am_result])
  1429. rm -f confinc confmf
  1430. ])
  1431. -# AM_CONDITIONAL -*- Autoconf -*-
  1432. +# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
  1433. -# Copyright 1997, 2000, 2001 Free Software Foundation, Inc.
  1434. +# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005
  1435. +# Free Software Foundation, Inc.
  1436. +#
  1437. +# This file is free software; the Free Software Foundation
  1438. +# gives unlimited permission to copy and/or distribute it,
  1439. +# with or without modifications, as long as this notice is preserved.
  1440. -# This program is free software; you can redistribute it and/or modify
  1441. -# it under the terms of the GNU General Public License as published by
  1442. -# the Free Software Foundation; either version 2, or (at your option)
  1443. -# any later version.
  1444. +# serial 4
  1445. -# This program is distributed in the hope that it will be useful,
  1446. -# but WITHOUT ANY WARRANTY; without even the implied warranty of
  1447. -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  1448. -# GNU General Public License for more details.
  1449. +# AM_MISSING_PROG(NAME, PROGRAM)
  1450. +# ------------------------------
  1451. +AC_DEFUN([AM_MISSING_PROG],
  1452. +[AC_REQUIRE([AM_MISSING_HAS_RUN])
  1453. +$1=${$1-"${am_missing_run}$2"}
  1454. +AC_SUBST($1)])
  1455. -# You should have received a copy of the GNU General Public License
  1456. -# along with this program; if not, write to the Free Software
  1457. -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
  1458. -# 02111-1307, USA.
  1459. -# serial 5
  1460. +# AM_MISSING_HAS_RUN
  1461. +# ------------------
  1462. +# Define MISSING if not defined so far and test if it supports --run.
  1463. +# If it does, set am_missing_run to use it, otherwise, to nothing.
  1464. +AC_DEFUN([AM_MISSING_HAS_RUN],
  1465. +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
  1466. +test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
  1467. +# Use eval to expand $SHELL
  1468. +if eval "$MISSING --run true"; then
  1469. + am_missing_run="$MISSING --run "
  1470. +else
  1471. + am_missing_run=
  1472. + AC_MSG_WARN([`missing' script is too old or missing])
  1473. +fi
  1474. +])
  1475. -AC_PREREQ(2.52)
  1476. +# Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
  1477. +#
  1478. +# This file is free software; the Free Software Foundation
  1479. +# gives unlimited permission to copy and/or distribute it,
  1480. +# with or without modifications, as long as this notice is preserved.
  1481. -# AM_CONDITIONAL(NAME, SHELL-CONDITION)
  1482. -# -------------------------------------
  1483. -# Define a conditional.
  1484. -AC_DEFUN([AM_CONDITIONAL],
  1485. -[ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
  1486. - [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
  1487. -AC_SUBST([$1_TRUE])
  1488. -AC_SUBST([$1_FALSE])
  1489. -if $2; then
  1490. - $1_TRUE=
  1491. - $1_FALSE='#'
  1492. +# AM_PROG_MKDIR_P
  1493. +# ---------------
  1494. +# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
  1495. +#
  1496. +# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
  1497. +# created by `make install' are always world readable, even if the
  1498. +# installer happens to have an overly restrictive umask (e.g. 077).
  1499. +# This was a mistake. There are at least two reasons why we must not
  1500. +# use `-m 0755':
  1501. +# - it causes special bits like SGID to be ignored,
  1502. +# - it may be too restrictive (some setups expect 775 directories).
  1503. +#
  1504. +# Do not use -m 0755 and let people choose whatever they expect by
  1505. +# setting umask.
  1506. +#
  1507. +# We cannot accept any implementation of `mkdir' that recognizes `-p'.
  1508. +# Some implementations (such as Solaris 8's) are not thread-safe: if a
  1509. +# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
  1510. +# concurrently, both version can detect that a/ is missing, but only
  1511. +# one can create it and the other will error out. Consequently we
  1512. +# restrict ourselves to GNU make (using the --version option ensures
  1513. +# this.)
  1514. +AC_DEFUN([AM_PROG_MKDIR_P],
  1515. +[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
  1516. + # We used to keeping the `.' as first argument, in order to
  1517. + # allow $(mkdir_p) to be used without argument. As in
  1518. + # $(mkdir_p) $(somedir)
  1519. + # where $(somedir) is conditionally defined. However this is wrong
  1520. + # for two reasons:
  1521. + # 1. if the package is installed by a user who cannot write `.'
  1522. + # make install will fail,
  1523. + # 2. the above comment should most certainly read
  1524. + # $(mkdir_p) $(DESTDIR)$(somedir)
  1525. + # so it does not work when $(somedir) is undefined and
  1526. + # $(DESTDIR) is not.
  1527. + # To support the latter case, we have to write
  1528. + # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
  1529. + # so the `.' trick is pointless.
  1530. + mkdir_p='mkdir -p --'
  1531. else
  1532. - $1_TRUE='#'
  1533. - $1_FALSE=
  1534. + # On NextStep and OpenStep, the `mkdir' command does not
  1535. + # recognize any option. It will interpret all options as
  1536. + # directories to create, and then abort because `.' already
  1537. + # exists.
  1538. + for d in ./-p ./--version;
  1539. + do
  1540. + test -d $d && rmdir $d
  1541. + done
  1542. + # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
  1543. + if test -f "$ac_aux_dir/mkinstalldirs"; then
  1544. + mkdir_p='$(mkinstalldirs)'
  1545. + else
  1546. + mkdir_p='$(install_sh) -d'
  1547. + fi
  1548. fi
  1549. -AC_CONFIG_COMMANDS_PRE(
  1550. -[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
  1551. - AC_MSG_ERROR([conditional "$1" was never defined.
  1552. -Usually this means the macro was only invoked conditionally.])
  1553. -fi])])
  1554. +AC_SUBST([mkdir_p])])
  1555. -# Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*-
  1556. +# Helper functions for option handling. -*- Autoconf -*-
  1557. -# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
  1558. +# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
  1559. +#
  1560. +# This file is free software; the Free Software Foundation
  1561. +# gives unlimited permission to copy and/or distribute it,
  1562. +# with or without modifications, as long as this notice is preserved.
  1563. -# This program is free software; you can redistribute it and/or modify
  1564. -# it under the terms of the GNU General Public License as published by
  1565. -# the Free Software Foundation; either version 2, or (at your option)
  1566. -# any later version.
  1567. +# serial 3
  1568. -# This program is distributed in the hope that it will be useful,
  1569. -# but WITHOUT ANY WARRANTY; without even the implied warranty of
  1570. -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  1571. -# GNU General Public License for more details.
  1572. +# _AM_MANGLE_OPTION(NAME)
  1573. +# -----------------------
  1574. +AC_DEFUN([_AM_MANGLE_OPTION],
  1575. +[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
  1576. -# You should have received a copy of the GNU General Public License
  1577. -# along with this program; if not, write to the Free Software
  1578. -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
  1579. -# 02111-1307, USA.
  1580. +# _AM_SET_OPTION(NAME)
  1581. +# ------------------------------
  1582. +# Set option NAME. Presently that only means defining a flag for this option.
  1583. +AC_DEFUN([_AM_SET_OPTION],
  1584. +[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
  1585. -AC_PREREQ([2.52])
  1586. +# _AM_SET_OPTIONS(OPTIONS)
  1587. +# ----------------------------------
  1588. +# OPTIONS is a space-separated list of Automake options.
  1589. +AC_DEFUN([_AM_SET_OPTIONS],
  1590. +[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
  1591. -# serial 6
  1592. +# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
  1593. +# -------------------------------------------
  1594. +# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
  1595. +AC_DEFUN([_AM_IF_OPTION],
  1596. +[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
  1597. -# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS.
  1598. -AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
  1599. +# Check to make sure that the build environment is sane. -*- Autoconf -*-
  1600. +# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
  1601. +# Free Software Foundation, Inc.
  1602. +#
  1603. +# This file is free software; the Free Software Foundation
  1604. +# gives unlimited permission to copy and/or distribute it,
  1605. +# with or without modifications, as long as this notice is preserved.
  1606. -# Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
  1607. +# serial 4
  1608. -# This program is free software; you can redistribute it and/or modify
  1609. -# it under the terms of the GNU General Public License as published by
  1610. -# the Free Software Foundation; either version 2, or (at your option)
  1611. -# any later version.
  1612. +# AM_SANITY_CHECK
  1613. +# ---------------
  1614. +AC_DEFUN([AM_SANITY_CHECK],
  1615. +[AC_MSG_CHECKING([whether build environment is sane])
  1616. +# Just in case
  1617. +sleep 1
  1618. +echo timestamp > conftest.file
  1619. +# Do `set' in a subshell so we don't clobber the current shell's
  1620. +# arguments. Must try -L first in case configure is actually a
  1621. +# symlink; some systems play weird games with the mod time of symlinks
  1622. +# (eg FreeBSD returns the mod time of the symlink's containing
  1623. +# directory).
  1624. +if (
  1625. + set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
  1626. + if test "$[*]" = "X"; then
  1627. + # -L didn't work.
  1628. + set X `ls -t $srcdir/configure conftest.file`
  1629. + fi
  1630. + rm -f conftest.file
  1631. + if test "$[*]" != "X $srcdir/configure conftest.file" \
  1632. + && test "$[*]" != "X conftest.file $srcdir/configure"; then
  1633. -# This program is distributed in the hope that it will be useful,
  1634. -# but WITHOUT ANY WARRANTY; without even the implied warranty of
  1635. -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  1636. -# GNU General Public License for more details.
  1637. + # If neither matched, then we have a broken ls. This can happen
  1638. + # if, for instance, CONFIG_SHELL is bash and it inherits a
  1639. + # broken ls alias from the environment. This has actually
  1640. + # happened. Such a system could not be considered "sane".
  1641. + AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
  1642. +alias in your environment])
  1643. + fi
  1644. -# You should have received a copy of the GNU General Public License
  1645. -# along with this program; if not, write to the Free Software
  1646. -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
  1647. -# 02111-1307, USA.
  1648. + test "$[2]" = conftest.file
  1649. + )
  1650. +then
  1651. + # Ok.
  1652. + :
  1653. +else
  1654. + AC_MSG_ERROR([newly created file is older than distributed files!
  1655. +Check your system clock])
  1656. +fi
  1657. +AC_MSG_RESULT(yes)])
  1658. -# serial 3
  1659. +# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
  1660. +#
  1661. +# This file is free software; the Free Software Foundation
  1662. +# gives unlimited permission to copy and/or distribute it,
  1663. +# with or without modifications, as long as this notice is preserved.
  1664. -AC_PREREQ(2.50)
  1665. +# AM_PROG_INSTALL_STRIP
  1666. +# ---------------------
  1667. +# One issue with vendor `install' (even GNU) is that you can't
  1668. +# specify the program used to strip binaries. This is especially
  1669. +# annoying in cross-compiling environments, where the build's strip
  1670. +# is unlikely to handle the host's binaries.
  1671. +# Fortunately install-sh will honor a STRIPPROG variable, so we
  1672. +# always use install-sh in `make install-strip', and initialize
  1673. +# STRIPPROG with the value of the STRIP variable (set by the user).
  1674. +AC_DEFUN([AM_PROG_INSTALL_STRIP],
  1675. +[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
  1676. +# Installed binaries are usually stripped using `strip' when the user
  1677. +# run `make install-strip'. However `strip' might not be the right
  1678. +# tool to use in cross-compilation environments, therefore Automake
  1679. +# will honor the `STRIP' environment variable to overrule this program.
  1680. +dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
  1681. +if test "$cross_compiling" != no; then
  1682. + AC_CHECK_TOOL([STRIP], [strip], :)
  1683. +fi
  1684. +INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
  1685. +AC_SUBST([INSTALL_STRIP_PROGRAM])])
  1686. -# AM_PROG_LEX
  1687. -# -----------
  1688. -# Autoconf leaves LEX=: if lex or flex can't be found. Change that to a
  1689. -# "missing" invocation, for better error output.
  1690. -AC_DEFUN([AM_PROG_LEX],
  1691. -[AC_REQUIRE([AM_MISSING_HAS_RUN])dnl
  1692. -AC_REQUIRE([AC_PROG_LEX])dnl
  1693. -if test "$LEX" = :; then
  1694. - LEX=${am_missing_run}flex
  1695. -fi])
  1696. +# Check how to create a tarball. -*- Autoconf -*-
  1697. +# Copyright (C) 2004, 2005 Free Software Foundation, Inc.
  1698. +#
  1699. +# This file is free software; the Free Software Foundation
  1700. +# gives unlimited permission to copy and/or distribute it,
  1701. +# with or without modifications, as long as this notice is preserved.
  1702. +
  1703. +# serial 2
  1704. +
  1705. +# _AM_PROG_TAR(FORMAT)
  1706. +# --------------------
  1707. +# Check how to create a tarball in format FORMAT.
  1708. +# FORMAT should be one of `v7', `ustar', or `pax'.
  1709. +#
  1710. +# Substitute a variable $(am__tar) that is a command
  1711. +# writing to stdout a FORMAT-tarball containing the directory
  1712. +# $tardir.
  1713. +# tardir=directory && $(am__tar) > result.tar
  1714. +#
  1715. +# Substitute a variable $(am__untar) that extract such
  1716. +# a tarball read from stdin.
  1717. +# $(am__untar) < result.tar
  1718. +AC_DEFUN([_AM_PROG_TAR],
  1719. +[# Always define AMTAR for backward compatibility.
  1720. +AM_MISSING_PROG([AMTAR], [tar])
  1721. +m4_if([$1], [v7],
  1722. + [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
  1723. + [m4_case([$1], [ustar],, [pax],,
  1724. + [m4_fatal([Unknown tar format])])
  1725. +AC_MSG_CHECKING([how to create a $1 tar archive])
  1726. +# Loop over all known methods to create a tar archive until one works.
  1727. +_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
  1728. +_am_tools=${am_cv_prog_tar_$1-$_am_tools}
  1729. +# Do not fold the above two line into one, because Tru64 sh and
  1730. +# Solaris sh will not grok spaces in the rhs of `-'.
  1731. +for _am_tool in $_am_tools
  1732. +do
  1733. + case $_am_tool in
  1734. + gnutar)
  1735. + for _am_tar in tar gnutar gtar;
  1736. + do
  1737. + AM_RUN_LOG([$_am_tar --version]) && break
  1738. + done
  1739. + am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
  1740. + am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
  1741. + am__untar="$_am_tar -xf -"
  1742. + ;;
  1743. + plaintar)
  1744. + # Must skip GNU tar: if it does not support --format= it doesn't create
  1745. + # ustar tarball either.
  1746. + (tar --version) >/dev/null 2>&1 && continue
  1747. + am__tar='tar chf - "$$tardir"'
  1748. + am__tar_='tar chf - "$tardir"'
  1749. + am__untar='tar xf -'
  1750. + ;;
  1751. + pax)
  1752. + am__tar='pax -L -x $1 -w "$$tardir"'
  1753. + am__tar_='pax -L -x $1 -w "$tardir"'
  1754. + am__untar='pax -r'
  1755. + ;;
  1756. + cpio)
  1757. + am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
  1758. + am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
  1759. + am__untar='cpio -i -H $1 -d'
  1760. + ;;
  1761. + none)
  1762. + am__tar=false
  1763. + am__tar_=false
  1764. + am__untar=false
  1765. + ;;
  1766. + esac
  1767. +
  1768. + # If the value was cached, stop now. We just wanted to have am__tar
  1769. + # and am__untar set.
  1770. + test -n "${am_cv_prog_tar_$1}" && break
  1771. +
  1772. + # tar/untar a dummy directory, and stop if the command works
  1773. + rm -rf conftest.dir
  1774. + mkdir conftest.dir
  1775. + echo GrepMe > conftest.dir/file
  1776. + AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
  1777. + rm -rf conftest.dir
  1778. + if test -s conftest.tar; then
  1779. + AM_RUN_LOG([$am__untar <conftest.tar])
  1780. + grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
  1781. + fi
  1782. +done
  1783. +rm -rf conftest.dir
  1784. +
  1785. +AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
  1786. +AC_MSG_RESULT([$am_cv_prog_tar_$1])])
  1787. +AC_SUBST([am__tar])
  1788. +AC_SUBST([am__untar])
  1789. +]) # _AM_PROG_TAR
  1790. +
  1791. +m4_include([acinclude.m4])