aclocal.m4 77 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110
  1. # generated automatically by aclocal 1.15 -*- Autoconf -*-
  2. # Copyright (C) 1996-2014 Free Software Foundation, Inc.
  3. # This file is free software; the Free Software Foundation
  4. # gives unlimited permission to copy and/or distribute it,
  5. # with or without modifications, as long as this notice is preserved.
  6. # This program is distributed in the hope that it will be useful,
  7. # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
  8. # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
  9. # PARTICULAR PURPOSE.
  10. m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
  11. m4_ifndef([AC_AUTOCONF_VERSION],
  12. [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
  13. m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],,
  14. [m4_warning([this file was generated for autoconf 2.69.
  15. You have another version of autoconf. It may work, but is not guaranteed to.
  16. If you have problems, you may need to regenerate the build system entirely.
  17. To do so, use the procedure documented by the package, typically 'autoreconf'.])])
  18. # Copyright (C) 1995-2002 Free Software Foundation, Inc.
  19. # Copyright (C) 2001-2003,2004 Red Hat, Inc.
  20. #
  21. # This file is free software, distributed under the terms of the GNU
  22. # General Public License. As a special exception to the GNU General
  23. # Public License, this file may be distributed as part of a program
  24. # that contains a configuration script generated by Autoconf, under
  25. # the same distribution terms as the rest of that program.
  26. #
  27. # This file can be copied and used freely without restrictions. It can
  28. # be used in projects which are not available under the GNU Public License
  29. # but which still want to provide support for the GNU gettext functionality.
  30. #
  31. # Macro to add for using GNU gettext.
  32. # Ulrich Drepper <drepper@cygnus.com>, 1995, 1996
  33. #
  34. # Modified to never use included libintl.
  35. # Owen Taylor <otaylor@redhat.com>, 12/15/1998
  36. #
  37. # Major rework to remove unused code
  38. # Owen Taylor <otaylor@redhat.com>, 12/11/2002
  39. #
  40. # Added better handling of ALL_LINGUAS from GNU gettext version
  41. # written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002
  42. #
  43. # Modified to require ngettext
  44. # Matthias Clasen <mclasen@redhat.com> 08/06/2004
  45. #
  46. # We need this here as well, since someone might use autoconf-2.5x
  47. # to configure GLib then an older version to configure a package
  48. # using AM_GLIB_GNU_GETTEXT
  49. AC_PREREQ(2.53)
  50. dnl
  51. dnl We go to great lengths to make sure that aclocal won't
  52. dnl try to pull in the installed version of these macros
  53. dnl when running aclocal in the glib directory.
  54. dnl
  55. m4_copy([AC_DEFUN],[glib_DEFUN])
  56. m4_copy([AC_REQUIRE],[glib_REQUIRE])
  57. dnl
  58. dnl At the end, if we're not within glib, we'll define the public
  59. dnl definitions in terms of our private definitions.
  60. dnl
  61. # GLIB_LC_MESSAGES
  62. #--------------------
  63. glib_DEFUN([GLIB_LC_MESSAGES],
  64. [AC_CHECK_HEADERS([locale.h])
  65. if test $ac_cv_header_locale_h = yes; then
  66. AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
  67. [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
  68. am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
  69. if test $am_cv_val_LC_MESSAGES = yes; then
  70. AC_DEFINE(HAVE_LC_MESSAGES, 1,
  71. [Define if your <locale.h> file defines LC_MESSAGES.])
  72. fi
  73. fi])
  74. # GLIB_PATH_PROG_WITH_TEST
  75. #----------------------------
  76. dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
  77. dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
  78. glib_DEFUN([GLIB_PATH_PROG_WITH_TEST],
  79. [# Extract the first word of "$2", so it can be a program name with args.
  80. set dummy $2; ac_word=[$]2
  81. AC_MSG_CHECKING([for $ac_word])
  82. AC_CACHE_VAL(ac_cv_path_$1,
  83. [case "[$]$1" in
  84. /*)
  85. ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
  86. ;;
  87. *)
  88. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  89. for ac_dir in ifelse([$5], , $PATH, [$5]); do
  90. test -z "$ac_dir" && ac_dir=.
  91. if test -f $ac_dir/$ac_word; then
  92. if [$3]; then
  93. ac_cv_path_$1="$ac_dir/$ac_word"
  94. break
  95. fi
  96. fi
  97. done
  98. IFS="$ac_save_ifs"
  99. dnl If no 4th arg is given, leave the cache variable unset,
  100. dnl so AC_PATH_PROGS will keep looking.
  101. ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
  102. ])dnl
  103. ;;
  104. esac])dnl
  105. $1="$ac_cv_path_$1"
  106. if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
  107. AC_MSG_RESULT([$]$1)
  108. else
  109. AC_MSG_RESULT(no)
  110. fi
  111. AC_SUBST($1)dnl
  112. ])
  113. # GLIB_WITH_NLS
  114. #-----------------
  115. glib_DEFUN([GLIB_WITH_NLS],
  116. dnl NLS is obligatory
  117. [USE_NLS=yes
  118. AC_SUBST(USE_NLS)
  119. gt_cv_have_gettext=no
  120. CATOBJEXT=NONE
  121. XGETTEXT=:
  122. INTLLIBS=
  123. AC_CHECK_HEADER(libintl.h,
  124. [gt_cv_func_dgettext_libintl="no"
  125. libintl_extra_libs=""
  126. #
  127. # First check in libc
  128. #
  129. AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc,
  130. [AC_TRY_LINK([
  131. #include <libintl.h>
  132. ],
  133. [return !ngettext ("","", 1)],
  134. gt_cv_func_ngettext_libc=yes,
  135. gt_cv_func_ngettext_libc=no)
  136. ])
  137. if test "$gt_cv_func_ngettext_libc" = "yes" ; then
  138. AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
  139. [AC_TRY_LINK([
  140. #include <libintl.h>
  141. ],
  142. [return !dgettext ("","")],
  143. gt_cv_func_dgettext_libc=yes,
  144. gt_cv_func_dgettext_libc=no)
  145. ])
  146. fi
  147. if test "$gt_cv_func_ngettext_libc" = "yes" ; then
  148. AC_CHECK_FUNCS(bind_textdomain_codeset)
  149. fi
  150. #
  151. # If we don't have everything we want, check in libintl
  152. #
  153. if test "$gt_cv_func_dgettext_libc" != "yes" \
  154. || test "$gt_cv_func_ngettext_libc" != "yes" \
  155. || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
  156. AC_CHECK_LIB(intl, bindtextdomain,
  157. [AC_CHECK_LIB(intl, ngettext,
  158. [AC_CHECK_LIB(intl, dgettext,
  159. gt_cv_func_dgettext_libintl=yes)])])
  160. if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
  161. AC_MSG_CHECKING([if -liconv is needed to use gettext])
  162. AC_MSG_RESULT([])
  163. AC_CHECK_LIB(intl, ngettext,
  164. [AC_CHECK_LIB(intl, dcgettext,
  165. [gt_cv_func_dgettext_libintl=yes
  166. libintl_extra_libs=-liconv],
  167. :,-liconv)],
  168. :,-liconv)
  169. fi
  170. #
  171. # If we found libintl, then check in it for bind_textdomain_codeset();
  172. # we'll prefer libc if neither have bind_textdomain_codeset(),
  173. # and both have dgettext and ngettext
  174. #
  175. if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
  176. glib_save_LIBS="$LIBS"
  177. LIBS="$LIBS -lintl $libintl_extra_libs"
  178. unset ac_cv_func_bind_textdomain_codeset
  179. AC_CHECK_FUNCS(bind_textdomain_codeset)
  180. LIBS="$glib_save_LIBS"
  181. if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
  182. gt_cv_func_dgettext_libc=no
  183. else
  184. if test "$gt_cv_func_dgettext_libc" = "yes" \
  185. && test "$gt_cv_func_ngettext_libc" = "yes"; then
  186. gt_cv_func_dgettext_libintl=no
  187. fi
  188. fi
  189. fi
  190. fi
  191. if test "$gt_cv_func_dgettext_libc" = "yes" \
  192. || test "$gt_cv_func_dgettext_libintl" = "yes"; then
  193. gt_cv_have_gettext=yes
  194. fi
  195. if test "$gt_cv_func_dgettext_libintl" = "yes"; then
  196. INTLLIBS="-lintl $libintl_extra_libs"
  197. fi
  198. if test "$gt_cv_have_gettext" = "yes"; then
  199. AC_DEFINE(HAVE_GETTEXT,1,
  200. [Define if the GNU gettext() function is already present or preinstalled.])
  201. GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
  202. [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
  203. if test "$MSGFMT" != "no"; then
  204. glib_save_LIBS="$LIBS"
  205. LIBS="$LIBS $INTLLIBS"
  206. AC_CHECK_FUNCS(dcgettext)
  207. MSGFMT_OPTS=
  208. AC_MSG_CHECKING([if msgfmt accepts -c])
  209. GLIB_RUN_PROG([$MSGFMT -c -o /dev/null],[
  210. msgid ""
  211. msgstr ""
  212. "Content-Type: text/plain; charset=UTF-8\n"
  213. "Project-Id-Version: test 1.0\n"
  214. "PO-Revision-Date: 2007-02-15 12:01+0100\n"
  215. "Last-Translator: test <foo@bar.xx>\n"
  216. "Language-Team: C <LL@li.org>\n"
  217. "MIME-Version: 1.0\n"
  218. "Content-Transfer-Encoding: 8bit\n"
  219. ], [MSGFMT_OPTS=-c; AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])])
  220. AC_SUBST(MSGFMT_OPTS)
  221. AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
  222. GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
  223. [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
  224. AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
  225. return _nl_msg_cat_cntr],
  226. [CATOBJEXT=.gmo
  227. DATADIRNAME=share],
  228. [case $host in
  229. *-*-solaris*)
  230. dnl On Solaris, if bind_textdomain_codeset is in libc,
  231. dnl GNU format message catalog is always supported,
  232. dnl since both are added to the libc all together.
  233. dnl Hence, we'd like to go with DATADIRNAME=share and
  234. dnl and CATOBJEXT=.gmo in this case.
  235. AC_CHECK_FUNC(bind_textdomain_codeset,
  236. [CATOBJEXT=.gmo
  237. DATADIRNAME=share],
  238. [CATOBJEXT=.mo
  239. DATADIRNAME=lib])
  240. ;;
  241. *-*-openbsd*)
  242. CATOBJEXT=.mo
  243. DATADIRNAME=share
  244. ;;
  245. *)
  246. CATOBJEXT=.mo
  247. DATADIRNAME=lib
  248. ;;
  249. esac])
  250. LIBS="$glib_save_LIBS"
  251. INSTOBJEXT=.mo
  252. else
  253. gt_cv_have_gettext=no
  254. fi
  255. fi
  256. ])
  257. if test "$gt_cv_have_gettext" = "yes" ; then
  258. AC_DEFINE(ENABLE_NLS, 1,
  259. [always defined to indicate that i18n is enabled])
  260. fi
  261. dnl Test whether we really found GNU xgettext.
  262. if test "$XGETTEXT" != ":"; then
  263. dnl If it is not GNU xgettext we define it as : so that the
  264. dnl Makefiles still can work.
  265. if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
  266. : ;
  267. else
  268. AC_MSG_RESULT(
  269. [found xgettext program is not GNU xgettext; ignore it])
  270. XGETTEXT=":"
  271. fi
  272. fi
  273. # We need to process the po/ directory.
  274. POSUB=po
  275. AC_OUTPUT_COMMANDS(
  276. [case "$CONFIG_FILES" in *po/Makefile.in*)
  277. sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
  278. esac])
  279. dnl These rules are solely for the distribution goal. While doing this
  280. dnl we only have to keep exactly one list of the available catalogs
  281. dnl in configure.ac.
  282. for lang in $ALL_LINGUAS; do
  283. GMOFILES="$GMOFILES $lang.gmo"
  284. POFILES="$POFILES $lang.po"
  285. done
  286. dnl Make all variables we use known to autoconf.
  287. AC_SUBST(CATALOGS)
  288. AC_SUBST(CATOBJEXT)
  289. AC_SUBST(DATADIRNAME)
  290. AC_SUBST(GMOFILES)
  291. AC_SUBST(INSTOBJEXT)
  292. AC_SUBST(INTLLIBS)
  293. AC_SUBST(PO_IN_DATADIR_TRUE)
  294. AC_SUBST(PO_IN_DATADIR_FALSE)
  295. AC_SUBST(POFILES)
  296. AC_SUBST(POSUB)
  297. ])
  298. # AM_GLIB_GNU_GETTEXT
  299. # -------------------
  300. # Do checks necessary for use of gettext. If a suitable implementation
  301. # of gettext is found in either in libintl or in the C library,
  302. # it will set INTLLIBS to the libraries needed for use of gettext
  303. # and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable
  304. # gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST()
  305. # on various variables needed by the Makefile.in.in installed by
  306. # glib-gettextize.
  307. dnl
  308. glib_DEFUN([GLIB_GNU_GETTEXT],
  309. [AC_REQUIRE([AC_PROG_CC])dnl
  310. GLIB_LC_MESSAGES
  311. GLIB_WITH_NLS
  312. if test "$gt_cv_have_gettext" = "yes"; then
  313. if test "x$ALL_LINGUAS" = "x"; then
  314. LINGUAS=
  315. else
  316. AC_MSG_CHECKING(for catalogs to be installed)
  317. NEW_LINGUAS=
  318. for presentlang in $ALL_LINGUAS; do
  319. useit=no
  320. if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
  321. desiredlanguages="$LINGUAS"
  322. else
  323. desiredlanguages="$ALL_LINGUAS"
  324. fi
  325. for desiredlang in $desiredlanguages; do
  326. # Use the presentlang catalog if desiredlang is
  327. # a. equal to presentlang, or
  328. # b. a variant of presentlang (because in this case,
  329. # presentlang can be used as a fallback for messages
  330. # which are not translated in the desiredlang catalog).
  331. case "$desiredlang" in
  332. "$presentlang"*) useit=yes;;
  333. esac
  334. done
  335. if test $useit = yes; then
  336. NEW_LINGUAS="$NEW_LINGUAS $presentlang"
  337. fi
  338. done
  339. LINGUAS=$NEW_LINGUAS
  340. AC_MSG_RESULT($LINGUAS)
  341. fi
  342. dnl Construct list of names of catalog files to be constructed.
  343. if test -n "$LINGUAS"; then
  344. for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
  345. fi
  346. fi
  347. dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
  348. dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
  349. dnl Try to locate is.
  350. MKINSTALLDIRS=
  351. if test -n "$ac_aux_dir"; then
  352. MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
  353. fi
  354. if test -z "$MKINSTALLDIRS"; then
  355. MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
  356. fi
  357. AC_SUBST(MKINSTALLDIRS)
  358. dnl Generate list of files to be processed by xgettext which will
  359. dnl be included in po/Makefile.
  360. test -d po || mkdir po
  361. if test "x$srcdir" != "x."; then
  362. if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
  363. posrcprefix="$srcdir/"
  364. else
  365. posrcprefix="../$srcdir/"
  366. fi
  367. else
  368. posrcprefix="../"
  369. fi
  370. rm -f po/POTFILES
  371. sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
  372. < $srcdir/po/POTFILES.in > po/POTFILES
  373. ])
  374. # AM_GLIB_DEFINE_LOCALEDIR(VARIABLE)
  375. # -------------------------------
  376. # Define VARIABLE to the location where catalog files will
  377. # be installed by po/Makefile.
  378. glib_DEFUN([GLIB_DEFINE_LOCALEDIR],
  379. [glib_REQUIRE([GLIB_GNU_GETTEXT])dnl
  380. glib_save_prefix="$prefix"
  381. glib_save_exec_prefix="$exec_prefix"
  382. glib_save_datarootdir="$datarootdir"
  383. test "x$prefix" = xNONE && prefix=$ac_default_prefix
  384. test "x$exec_prefix" = xNONE && exec_prefix=$prefix
  385. datarootdir=`eval echo "${datarootdir}"`
  386. if test "x$CATOBJEXT" = "x.mo" ; then
  387. localedir=`eval echo "${libdir}/locale"`
  388. else
  389. localedir=`eval echo "${datadir}/locale"`
  390. fi
  391. prefix="$glib_save_prefix"
  392. exec_prefix="$glib_save_exec_prefix"
  393. datarootdir="$glib_save_datarootdir"
  394. AC_DEFINE_UNQUOTED($1, "$localedir",
  395. [Define the location where the catalogs will be installed])
  396. ])
  397. dnl
  398. dnl Now the definitions that aclocal will find
  399. dnl
  400. ifdef(glib_configure_ac,[],[
  401. AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)])
  402. AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)])
  403. ])dnl
  404. # GLIB_RUN_PROG(PROGRAM, TEST-FILE, [ACTION-IF-PASS], [ACTION-IF-FAIL])
  405. #
  406. # Create a temporary file with TEST-FILE as its contents and pass the
  407. # file name to PROGRAM. Perform ACTION-IF-PASS if PROGRAM exits with
  408. # 0 and perform ACTION-IF-FAIL for any other exit status.
  409. AC_DEFUN([GLIB_RUN_PROG],
  410. [cat >conftest.foo <<_ACEOF
  411. $2
  412. _ACEOF
  413. if AC_RUN_LOG([$1 conftest.foo]); then
  414. m4_ifval([$3], [$3], [:])
  415. m4_ifvaln([$4], [else $4])dnl
  416. echo "$as_me: failed input was:" >&AS_MESSAGE_LOG_FD
  417. sed 's/^/| /' conftest.foo >&AS_MESSAGE_LOG_FD
  418. fi])
  419. dnl GLIB_GSETTINGS
  420. dnl Defines GSETTINGS_SCHEMAS_INSTALL which controls whether
  421. dnl the schema should be compiled
  422. dnl
  423. AC_DEFUN([GLIB_GSETTINGS],
  424. [
  425. m4_pattern_allow([AM_V_GEN])
  426. AC_ARG_ENABLE(schemas-compile,
  427. AS_HELP_STRING([--disable-schemas-compile],
  428. [Disable regeneration of gschemas.compiled on install]),
  429. [case ${enableval} in
  430. yes) GSETTINGS_DISABLE_SCHEMAS_COMPILE="" ;;
  431. no) GSETTINGS_DISABLE_SCHEMAS_COMPILE="1" ;;
  432. *) AC_MSG_ERROR([bad value ${enableval} for --enable-schemas-compile]) ;;
  433. esac])
  434. AC_SUBST([GSETTINGS_DISABLE_SCHEMAS_COMPILE])
  435. PKG_PROG_PKG_CONFIG([0.16])
  436. AC_SUBST(gsettingsschemadir, [${datadir}/glib-2.0/schemas])
  437. if test x$cross_compiling != xyes; then
  438. GLIB_COMPILE_SCHEMAS=`$PKG_CONFIG --variable glib_compile_schemas gio-2.0`
  439. else
  440. AC_PATH_PROG(GLIB_COMPILE_SCHEMAS, glib-compile-schemas)
  441. fi
  442. AC_SUBST(GLIB_COMPILE_SCHEMAS)
  443. if test "x$GLIB_COMPILE_SCHEMAS" = "x"; then
  444. ifelse([$2],,[AC_MSG_ERROR([glib-compile-schemas not found.])],[$2])
  445. else
  446. ifelse([$1],,[:],[$1])
  447. fi
  448. GSETTINGS_RULES='
  449. .PHONY : uninstall-gsettings-schemas install-gsettings-schemas clean-gsettings-schemas
  450. mostlyclean-am: clean-gsettings-schemas
  451. gsettings__enum_file = $(addsuffix .enums.xml,$(gsettings_ENUM_NAMESPACE))
  452. %.gschema.valid: %.gschema.xml $(gsettings__enum_file)
  453. $(AM_V_GEN) $(GLIB_COMPILE_SCHEMAS) --strict --dry-run $(addprefix --schema-file=,$(gsettings__enum_file)) --schema-file=$< && mkdir -p [$](@D) && touch [$]@
  454. all-am: $(gsettings_SCHEMAS:.xml=.valid)
  455. uninstall-am: uninstall-gsettings-schemas
  456. install-data-am: install-gsettings-schemas
  457. .SECONDARY: $(gsettings_SCHEMAS)
  458. install-gsettings-schemas: $(gsettings_SCHEMAS) $(gsettings__enum_file)
  459. @$(NORMAL_INSTALL)
  460. if test -n "$^"; then \
  461. test -z "$(gsettingsschemadir)" || $(MKDIR_P) "$(DESTDIR)$(gsettingsschemadir)"; \
  462. $(INSTALL_DATA) $^ "$(DESTDIR)$(gsettingsschemadir)"; \
  463. test -n "$(GSETTINGS_DISABLE_SCHEMAS_COMPILE)$(DESTDIR)" || $(GLIB_COMPILE_SCHEMAS) $(gsettingsschemadir); \
  464. fi
  465. uninstall-gsettings-schemas:
  466. @$(NORMAL_UNINSTALL)
  467. @list='\''$(gsettings_SCHEMAS) $(gsettings__enum_file)'\''; test -n "$(gsettingsschemadir)" || list=; \
  468. files=`for p in $$list; do echo $$p; done | sed -e '\''s|^.*/||'\''`; \
  469. test -n "$$files" || exit 0; \
  470. echo " ( cd '\''$(DESTDIR)$(gsettingsschemadir)'\'' && rm -f" $$files ")"; \
  471. cd "$(DESTDIR)$(gsettingsschemadir)" && rm -f $$files
  472. test -n "$(GSETTINGS_DISABLE_SCHEMAS_COMPILE)$(DESTDIR)" || $(GLIB_COMPILE_SCHEMAS) $(gsettingsschemadir)
  473. clean-gsettings-schemas:
  474. rm -f $(gsettings_SCHEMAS:.xml=.valid) $(gsettings__enum_file)
  475. ifdef gsettings_ENUM_NAMESPACE
  476. $(gsettings__enum_file): $(gsettings_ENUM_FILES)
  477. $(AM_V_GEN) glib-mkenums --comments '\''<!-- @comment@ -->'\'' --fhead "<schemalist>" --vhead " <@type@ id='\''$(gsettings_ENUM_NAMESPACE).@EnumName@'\''>" --vprod " <value nick='\''@valuenick@'\'' value='\''@valuenum@'\''/>" --vtail " </@type@>" --ftail "</schemalist>" [$]^ > [$]@.tmp && mv [$]@.tmp [$]@
  478. endif
  479. '
  480. _GSETTINGS_SUBST(GSETTINGS_RULES)
  481. ])
  482. dnl _GSETTINGS_SUBST(VARIABLE)
  483. dnl Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST
  484. AC_DEFUN([_GSETTINGS_SUBST],
  485. [
  486. AC_SUBST([$1])
  487. m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])])
  488. ]
  489. )
  490. dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml])
  491. # serial 42 IT_PROG_INTLTOOL
  492. AC_DEFUN([IT_PROG_INTLTOOL], [
  493. AC_PREREQ([2.50])dnl
  494. AC_REQUIRE([AM_NLS])dnl
  495. case "$am__api_version" in
  496. 1.[01234])
  497. AC_MSG_ERROR([Automake 1.5 or newer is required to use intltool])
  498. ;;
  499. *)
  500. ;;
  501. esac
  502. INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
  503. INTLTOOL_APPLIED_VERSION=`intltool-update --version | head -1 | cut -d" " -f3`
  504. INTLTOOL_APPLIED_VERSION_AS_INT=`echo $INTLTOOL_APPLIED_VERSION | awk -F. '{ print $ 1 * 1000 + $ 2 * 100 + $ 3; }'`
  505. if test -n "$1"; then
  506. AC_MSG_CHECKING([for intltool >= $1])
  507. AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found])
  508. test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT" ||
  509. AC_MSG_ERROR([Your intltool is too old. You need intltool $1 or later.])
  510. fi
  511. AC_PATH_PROG(INTLTOOL_UPDATE, [intltool-update])
  512. AC_PATH_PROG(INTLTOOL_MERGE, [intltool-merge])
  513. AC_PATH_PROG(INTLTOOL_EXTRACT, [intltool-extract])
  514. if test -z "$INTLTOOL_UPDATE" -o -z "$INTLTOOL_MERGE" -o -z "$INTLTOOL_EXTRACT"; then
  515. AC_MSG_ERROR([The intltool scripts were not found. Please install intltool.])
  516. fi
  517. if test -z "$AM_DEFAULT_VERBOSITY"; then
  518. AM_DEFAULT_VERBOSITY=1
  519. fi
  520. AC_SUBST([AM_DEFAULT_VERBOSITY])
  521. INTLTOOL_V_MERGE='$(INTLTOOL__v_MERGE_$(V))'
  522. INTLTOOL__v_MERGE_='$(INTLTOOL__v_MERGE_$(AM_DEFAULT_VERBOSITY))'
  523. INTLTOOL__v_MERGE_0='@echo " ITMRG " [$]@;'
  524. AC_SUBST(INTLTOOL_V_MERGE)
  525. AC_SUBST(INTLTOOL__v_MERGE_)
  526. AC_SUBST(INTLTOOL__v_MERGE_0)
  527. INTLTOOL_V_MERGE_OPTIONS='$(intltool__v_merge_options_$(V))'
  528. intltool__v_merge_options_='$(intltool__v_merge_options_$(AM_DEFAULT_VERBOSITY))'
  529. intltool__v_merge_options_0='-q'
  530. AC_SUBST(INTLTOOL_V_MERGE_OPTIONS)
  531. AC_SUBST(intltool__v_merge_options_)
  532. AC_SUBST(intltool__v_merge_options_0)
  533. INTLTOOL_DESKTOP_RULE='%.desktop: %.desktop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
  534. INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
  535. INTLTOOL_KEYS_RULE='%.keys: %.keys.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
  536. INTLTOOL_PROP_RULE='%.prop: %.prop.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
  537. INTLTOOL_OAF_RULE='%.oaf: %.oaf.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -o -p $(top_srcdir)/po $< [$]@'
  538. INTLTOOL_PONG_RULE='%.pong: %.pong.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
  539. INTLTOOL_SERVER_RULE='%.server: %.server.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
  540. INTLTOOL_SHEET_RULE='%.sheet: %.sheet.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
  541. INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
  542. INTLTOOL_UI_RULE='%.ui: %.ui.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
  543. INTLTOOL_XML_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
  544. if test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge 5000; then
  545. INTLTOOL_XML_NOMERGE_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u --no-translations $< [$]@'
  546. else
  547. INTLTOOL_XML_NOMERGE_RULE='%.xml: %.xml.in $(INTLTOOL_MERGE) ; $(INTLTOOL_V_MERGE)_it_tmp_dir=tmp.intltool.[$][$]RANDOM && mkdir [$][$]_it_tmp_dir && LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u [$][$]_it_tmp_dir $< [$]@ && rmdir [$][$]_it_tmp_dir'
  548. fi
  549. INTLTOOL_XAM_RULE='%.xam: %.xml.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
  550. INTLTOOL_KBD_RULE='%.kbd: %.kbd.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
  551. INTLTOOL_CAVES_RULE='%.caves: %.caves.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
  552. INTLTOOL_SCHEMAS_RULE='%.schemas: %.schemas.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
  553. INTLTOOL_THEME_RULE='%.theme: %.theme.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
  554. INTLTOOL_SERVICE_RULE='%.service: %.service.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
  555. INTLTOOL_POLICY_RULE='%.policy: %.policy.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(INTLTOOL_V_MERGE)LC_ALL=C $(INTLTOOL_MERGE) $(INTLTOOL_V_MERGE_OPTIONS) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
  556. _IT_SUBST(INTLTOOL_DESKTOP_RULE)
  557. _IT_SUBST(INTLTOOL_DIRECTORY_RULE)
  558. _IT_SUBST(INTLTOOL_KEYS_RULE)
  559. _IT_SUBST(INTLTOOL_PROP_RULE)
  560. _IT_SUBST(INTLTOOL_OAF_RULE)
  561. _IT_SUBST(INTLTOOL_PONG_RULE)
  562. _IT_SUBST(INTLTOOL_SERVER_RULE)
  563. _IT_SUBST(INTLTOOL_SHEET_RULE)
  564. _IT_SUBST(INTLTOOL_SOUNDLIST_RULE)
  565. _IT_SUBST(INTLTOOL_UI_RULE)
  566. _IT_SUBST(INTLTOOL_XAM_RULE)
  567. _IT_SUBST(INTLTOOL_KBD_RULE)
  568. _IT_SUBST(INTLTOOL_XML_RULE)
  569. _IT_SUBST(INTLTOOL_XML_NOMERGE_RULE)
  570. _IT_SUBST(INTLTOOL_CAVES_RULE)
  571. _IT_SUBST(INTLTOOL_SCHEMAS_RULE)
  572. _IT_SUBST(INTLTOOL_THEME_RULE)
  573. _IT_SUBST(INTLTOOL_SERVICE_RULE)
  574. _IT_SUBST(INTLTOOL_POLICY_RULE)
  575. # Check the gettext tools to make sure they are GNU
  576. AC_PATH_PROG(XGETTEXT, xgettext)
  577. AC_PATH_PROG(MSGMERGE, msgmerge)
  578. AC_PATH_PROG(MSGFMT, msgfmt)
  579. AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
  580. if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then
  581. AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
  582. fi
  583. xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`"
  584. mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`"
  585. mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`"
  586. if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then
  587. AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
  588. fi
  589. AC_PATH_PROG(INTLTOOL_PERL, perl)
  590. if test -z "$INTLTOOL_PERL"; then
  591. AC_MSG_ERROR([perl not found])
  592. fi
  593. AC_MSG_CHECKING([for perl >= 5.8.1])
  594. $INTLTOOL_PERL -e "use 5.8.1;" > /dev/null 2>&1
  595. if test $? -ne 0; then
  596. AC_MSG_ERROR([perl 5.8.1 is required for intltool])
  597. else
  598. IT_PERL_VERSION=`$INTLTOOL_PERL -e "printf '%vd', $^V"`
  599. AC_MSG_RESULT([$IT_PERL_VERSION])
  600. fi
  601. if test "x$2" != "xno-xml"; then
  602. AC_MSG_CHECKING([for XML::Parser])
  603. if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then
  604. AC_MSG_RESULT([ok])
  605. else
  606. AC_MSG_ERROR([XML::Parser perl module is required for intltool])
  607. fi
  608. fi
  609. # Substitute ALL_LINGUAS so we can use it in po/Makefile
  610. AC_SUBST(ALL_LINGUAS)
  611. IT_PO_SUBDIR([po])
  612. ])
  613. # IT_PO_SUBDIR(DIRNAME)
  614. # ---------------------
  615. # All po subdirs have to be declared with this macro; the subdir "po" is
  616. # declared by IT_PROG_INTLTOOL.
  617. #
  618. AC_DEFUN([IT_PO_SUBDIR],
  619. [AC_PREREQ([2.53])dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS.
  620. dnl
  621. dnl The following CONFIG_COMMANDS should be executed at the very end
  622. dnl of config.status.
  623. AC_CONFIG_COMMANDS_PRE([
  624. AC_CONFIG_COMMANDS([$1/stamp-it], [
  625. if [ ! grep "^# INTLTOOL_MAKEFILE$" "$1/Makefile.in" > /dev/null ]; then
  626. AC_MSG_ERROR([$1/Makefile.in.in was not created by intltoolize.])
  627. fi
  628. rm -f "$1/stamp-it" "$1/stamp-it.tmp" "$1/POTFILES" "$1/Makefile.tmp"
  629. >"$1/stamp-it.tmp"
  630. [sed '/^#/d
  631. s/^[[].*] *//
  632. /^[ ]*$/d
  633. '"s|^| $ac_top_srcdir/|" \
  634. "$srcdir/$1/POTFILES.in" | sed '$!s/$/ \\/' >"$1/POTFILES"
  635. ]
  636. [sed '/^POTFILES =/,/[^\\]$/ {
  637. /^POTFILES =/!d
  638. r $1/POTFILES
  639. }
  640. ' "$1/Makefile.in" >"$1/Makefile"]
  641. rm -f "$1/Makefile.tmp"
  642. mv "$1/stamp-it.tmp" "$1/stamp-it"
  643. ])
  644. ])dnl
  645. ])
  646. # _IT_SUBST(VARIABLE)
  647. # -------------------
  648. # Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST
  649. #
  650. AC_DEFUN([_IT_SUBST],
  651. [
  652. AC_SUBST([$1])
  653. m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])])
  654. ]
  655. )
  656. # deprecated macros
  657. AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL])
  658. # A hint is needed for aclocal from Automake <= 1.9.4:
  659. # AC_DEFUN([AC_PROG_INTLTOOL], ...)
  660. # nls.m4 serial 5 (gettext-0.18)
  661. dnl Copyright (C) 1995-2003, 2005-2006, 2008-2014 Free Software Foundation,
  662. dnl Inc.
  663. dnl This file is free software; the Free Software Foundation
  664. dnl gives unlimited permission to copy and/or distribute it,
  665. dnl with or without modifications, as long as this notice is preserved.
  666. dnl
  667. dnl This file can can be used in projects which are not available under
  668. dnl the GNU General Public License or the GNU Library General Public
  669. dnl License but which still want to provide support for the GNU gettext
  670. dnl functionality.
  671. dnl Please note that the actual code of the GNU gettext library is covered
  672. dnl by the GNU Library General Public License, and the rest of the GNU
  673. dnl gettext package package is covered by the GNU General Public License.
  674. dnl They are *not* in the public domain.
  675. dnl Authors:
  676. dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
  677. dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
  678. AC_PREREQ([2.50])
  679. AC_DEFUN([AM_NLS],
  680. [
  681. AC_MSG_CHECKING([whether NLS is requested])
  682. dnl Default is enabled NLS
  683. AC_ARG_ENABLE([nls],
  684. [ --disable-nls do not use Native Language Support],
  685. USE_NLS=$enableval, USE_NLS=yes)
  686. AC_MSG_RESULT([$USE_NLS])
  687. AC_SUBST([USE_NLS])
  688. ])
  689. # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
  690. # serial 1 (pkg-config-0.24)
  691. #
  692. # Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
  693. #
  694. # This program is free software; you can redistribute it and/or modify
  695. # it under the terms of the GNU General Public License as published by
  696. # the Free Software Foundation; either version 2 of the License, or
  697. # (at your option) any later version.
  698. #
  699. # This program is distributed in the hope that it will be useful, but
  700. # WITHOUT ANY WARRANTY; without even the implied warranty of
  701. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  702. # General Public License for more details.
  703. #
  704. # You should have received a copy of the GNU General Public License
  705. # along with this program; if not, write to the Free Software
  706. # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  707. #
  708. # As a special exception to the GNU General Public License, if you
  709. # distribute this file as part of a program that contains a
  710. # configuration script generated by Autoconf, you may include it under
  711. # the same distribution terms that you use for the rest of that program.
  712. # PKG_PROG_PKG_CONFIG([MIN-VERSION])
  713. # ----------------------------------
  714. AC_DEFUN([PKG_PROG_PKG_CONFIG],
  715. [m4_pattern_forbid([^_?PKG_[A-Z_]+$])
  716. m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
  717. m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
  718. AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
  719. AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
  720. AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
  721. if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
  722. AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
  723. fi
  724. if test -n "$PKG_CONFIG"; then
  725. _pkg_min_version=m4_default([$1], [0.9.0])
  726. AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
  727. if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
  728. AC_MSG_RESULT([yes])
  729. else
  730. AC_MSG_RESULT([no])
  731. PKG_CONFIG=""
  732. fi
  733. fi[]dnl
  734. ])# PKG_PROG_PKG_CONFIG
  735. # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
  736. #
  737. # Check to see whether a particular set of modules exists. Similar
  738. # to PKG_CHECK_MODULES(), but does not set variables or print errors.
  739. #
  740. # Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
  741. # only at the first occurence in configure.ac, so if the first place
  742. # it's called might be skipped (such as if it is within an "if", you
  743. # have to call PKG_CHECK_EXISTS manually
  744. # --------------------------------------------------------------
  745. AC_DEFUN([PKG_CHECK_EXISTS],
  746. [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
  747. if test -n "$PKG_CONFIG" && \
  748. AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
  749. m4_default([$2], [:])
  750. m4_ifvaln([$3], [else
  751. $3])dnl
  752. fi])
  753. # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
  754. # ---------------------------------------------
  755. m4_define([_PKG_CONFIG],
  756. [if test -n "$$1"; then
  757. pkg_cv_[]$1="$$1"
  758. elif test -n "$PKG_CONFIG"; then
  759. PKG_CHECK_EXISTS([$3],
  760. [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
  761. test "x$?" != "x0" && pkg_failed=yes ],
  762. [pkg_failed=yes])
  763. else
  764. pkg_failed=untried
  765. fi[]dnl
  766. ])# _PKG_CONFIG
  767. # _PKG_SHORT_ERRORS_SUPPORTED
  768. # -----------------------------
  769. AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
  770. [AC_REQUIRE([PKG_PROG_PKG_CONFIG])
  771. if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
  772. _pkg_short_errors_supported=yes
  773. else
  774. _pkg_short_errors_supported=no
  775. fi[]dnl
  776. ])# _PKG_SHORT_ERRORS_SUPPORTED
  777. # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
  778. # [ACTION-IF-NOT-FOUND])
  779. #
  780. #
  781. # Note that if there is a possibility the first call to
  782. # PKG_CHECK_MODULES might not happen, you should be sure to include an
  783. # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
  784. #
  785. #
  786. # --------------------------------------------------------------
  787. AC_DEFUN([PKG_CHECK_MODULES],
  788. [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
  789. AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
  790. AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
  791. pkg_failed=no
  792. AC_MSG_CHECKING([for $1])
  793. _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
  794. _PKG_CONFIG([$1][_LIBS], [libs], [$2])
  795. m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
  796. and $1[]_LIBS to avoid the need to call pkg-config.
  797. See the pkg-config man page for more details.])
  798. if test $pkg_failed = yes; then
  799. AC_MSG_RESULT([no])
  800. _PKG_SHORT_ERRORS_SUPPORTED
  801. if test $_pkg_short_errors_supported = yes; then
  802. $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
  803. else
  804. $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
  805. fi
  806. # Put the nasty error message in config.log where it belongs
  807. echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
  808. m4_default([$4], [AC_MSG_ERROR(
  809. [Package requirements ($2) were not met:
  810. $$1_PKG_ERRORS
  811. Consider adjusting the PKG_CONFIG_PATH environment variable if you
  812. installed software in a non-standard prefix.
  813. _PKG_TEXT])[]dnl
  814. ])
  815. elif test $pkg_failed = untried; then
  816. AC_MSG_RESULT([no])
  817. m4_default([$4], [AC_MSG_FAILURE(
  818. [The pkg-config script could not be found or is too old. Make sure it
  819. is in your PATH or set the PKG_CONFIG environment variable to the full
  820. path to pkg-config.
  821. _PKG_TEXT
  822. To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
  823. ])
  824. else
  825. $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
  826. $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
  827. AC_MSG_RESULT([yes])
  828. $3
  829. fi[]dnl
  830. ])# PKG_CHECK_MODULES
  831. # PKG_INSTALLDIR(DIRECTORY)
  832. # -------------------------
  833. # Substitutes the variable pkgconfigdir as the location where a module
  834. # should install pkg-config .pc files. By default the directory is
  835. # $libdir/pkgconfig, but the default can be changed by passing
  836. # DIRECTORY. The user can override through the --with-pkgconfigdir
  837. # parameter.
  838. AC_DEFUN([PKG_INSTALLDIR],
  839. [m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
  840. m4_pushdef([pkg_description],
  841. [pkg-config installation directory @<:@]pkg_default[@:>@])
  842. AC_ARG_WITH([pkgconfigdir],
  843. [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],,
  844. [with_pkgconfigdir=]pkg_default)
  845. AC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
  846. m4_popdef([pkg_default])
  847. m4_popdef([pkg_description])
  848. ]) dnl PKG_INSTALLDIR
  849. # PKG_NOARCH_INSTALLDIR(DIRECTORY)
  850. # -------------------------
  851. # Substitutes the variable noarch_pkgconfigdir as the location where a
  852. # module should install arch-independent pkg-config .pc files. By
  853. # default the directory is $datadir/pkgconfig, but the default can be
  854. # changed by passing DIRECTORY. The user can override through the
  855. # --with-noarch-pkgconfigdir parameter.
  856. AC_DEFUN([PKG_NOARCH_INSTALLDIR],
  857. [m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
  858. m4_pushdef([pkg_description],
  859. [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@])
  860. AC_ARG_WITH([noarch-pkgconfigdir],
  861. [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],,
  862. [with_noarch_pkgconfigdir=]pkg_default)
  863. AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir])
  864. m4_popdef([pkg_default])
  865. m4_popdef([pkg_description])
  866. ]) dnl PKG_NOARCH_INSTALLDIR
  867. # PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
  868. # [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
  869. # -------------------------------------------
  870. # Retrieves the value of the pkg-config variable for the given module.
  871. AC_DEFUN([PKG_CHECK_VAR],
  872. [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
  873. AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl
  874. _PKG_CONFIG([$1], [variable="][$3]["], [$2])
  875. AS_VAR_COPY([$1], [pkg_cv_][$1])
  876. AS_VAR_IF([$1], [""], [$5], [$4])dnl
  877. ])# PKG_CHECK_VAR
  878. # Copyright (C) 2002-2014 Free Software Foundation, Inc.
  879. #
  880. # This file is free software; the Free Software Foundation
  881. # gives unlimited permission to copy and/or distribute it,
  882. # with or without modifications, as long as this notice is preserved.
  883. # AM_AUTOMAKE_VERSION(VERSION)
  884. # ----------------------------
  885. # Automake X.Y traces this macro to ensure aclocal.m4 has been
  886. # generated from the m4 files accompanying Automake X.Y.
  887. # (This private macro should not be called outside this file.)
  888. AC_DEFUN([AM_AUTOMAKE_VERSION],
  889. [am__api_version='1.15'
  890. dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
  891. dnl require some minimum version. Point them to the right macro.
  892. m4_if([$1], [1.15], [],
  893. [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
  894. ])
  895. # _AM_AUTOCONF_VERSION(VERSION)
  896. # -----------------------------
  897. # aclocal traces this macro to find the Autoconf version.
  898. # This is a private macro too. Using m4_define simplifies
  899. # the logic in aclocal, which can simply ignore this definition.
  900. m4_define([_AM_AUTOCONF_VERSION], [])
  901. # AM_SET_CURRENT_AUTOMAKE_VERSION
  902. # -------------------------------
  903. # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
  904. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
  905. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
  906. [AM_AUTOMAKE_VERSION([1.15])dnl
  907. m4_ifndef([AC_AUTOCONF_VERSION],
  908. [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
  909. _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
  910. # AM_AUX_DIR_EXPAND -*- Autoconf -*-
  911. # Copyright (C) 2001-2014 Free Software Foundation, Inc.
  912. #
  913. # This file is free software; the Free Software Foundation
  914. # gives unlimited permission to copy and/or distribute it,
  915. # with or without modifications, as long as this notice is preserved.
  916. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
  917. # $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to
  918. # '$srcdir', '$srcdir/..', or '$srcdir/../..'.
  919. #
  920. # Of course, Automake must honor this variable whenever it calls a
  921. # tool from the auxiliary directory. The problem is that $srcdir (and
  922. # therefore $ac_aux_dir as well) can be either absolute or relative,
  923. # depending on how configure is run. This is pretty annoying, since
  924. # it makes $ac_aux_dir quite unusable in subdirectories: in the top
  925. # source directory, any form will work fine, but in subdirectories a
  926. # relative path needs to be adjusted first.
  927. #
  928. # $ac_aux_dir/missing
  929. # fails when called from a subdirectory if $ac_aux_dir is relative
  930. # $top_srcdir/$ac_aux_dir/missing
  931. # fails if $ac_aux_dir is absolute,
  932. # fails when called from a subdirectory in a VPATH build with
  933. # a relative $ac_aux_dir
  934. #
  935. # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
  936. # are both prefixed by $srcdir. In an in-source build this is usually
  937. # harmless because $srcdir is '.', but things will broke when you
  938. # start a VPATH build or use an absolute $srcdir.
  939. #
  940. # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
  941. # iff we strip the leading $srcdir from $ac_aux_dir. That would be:
  942. # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
  943. # and then we would define $MISSING as
  944. # MISSING="\${SHELL} $am_aux_dir/missing"
  945. # This will work as long as MISSING is not called from configure, because
  946. # unfortunately $(top_srcdir) has no meaning in configure.
  947. # However there are other variables, like CC, which are often used in
  948. # configure, and could therefore not use this "fixed" $ac_aux_dir.
  949. #
  950. # Another solution, used here, is to always expand $ac_aux_dir to an
  951. # absolute PATH. The drawback is that using absolute paths prevent a
  952. # configured tree to be moved without reconfiguration.
  953. AC_DEFUN([AM_AUX_DIR_EXPAND],
  954. [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
  955. # Expand $ac_aux_dir to an absolute path.
  956. am_aux_dir=`cd "$ac_aux_dir" && pwd`
  957. ])
  958. # AM_CONDITIONAL -*- Autoconf -*-
  959. # Copyright (C) 1997-2014 Free Software Foundation, Inc.
  960. #
  961. # This file is free software; the Free Software Foundation
  962. # gives unlimited permission to copy and/or distribute it,
  963. # with or without modifications, as long as this notice is preserved.
  964. # AM_CONDITIONAL(NAME, SHELL-CONDITION)
  965. # -------------------------------------
  966. # Define a conditional.
  967. AC_DEFUN([AM_CONDITIONAL],
  968. [AC_PREREQ([2.52])dnl
  969. m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
  970. [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
  971. AC_SUBST([$1_TRUE])dnl
  972. AC_SUBST([$1_FALSE])dnl
  973. _AM_SUBST_NOTMAKE([$1_TRUE])dnl
  974. _AM_SUBST_NOTMAKE([$1_FALSE])dnl
  975. m4_define([_AM_COND_VALUE_$1], [$2])dnl
  976. if $2; then
  977. $1_TRUE=
  978. $1_FALSE='#'
  979. else
  980. $1_TRUE='#'
  981. $1_FALSE=
  982. fi
  983. AC_CONFIG_COMMANDS_PRE(
  984. [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
  985. AC_MSG_ERROR([[conditional "$1" was never defined.
  986. Usually this means the macro was only invoked conditionally.]])
  987. fi])])
  988. # Copyright (C) 1999-2014 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. # There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be
  994. # written in clear, in which case automake, when reading aclocal.m4,
  995. # will think it sees a *use*, and therefore will trigger all it's
  996. # C support machinery. Also note that it means that autoscan, seeing
  997. # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
  998. # _AM_DEPENDENCIES(NAME)
  999. # ----------------------
  1000. # See how the compiler implements dependency checking.
  1001. # NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC".
  1002. # We try a few techniques and use that to set a single cache variable.
  1003. #
  1004. # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
  1005. # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
  1006. # dependency, and given that the user is not expected to run this macro,
  1007. # just rely on AC_PROG_CC.
  1008. AC_DEFUN([_AM_DEPENDENCIES],
  1009. [AC_REQUIRE([AM_SET_DEPDIR])dnl
  1010. AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
  1011. AC_REQUIRE([AM_MAKE_INCLUDE])dnl
  1012. AC_REQUIRE([AM_DEP_TRACK])dnl
  1013. m4_if([$1], [CC], [depcc="$CC" am_compiler_list=],
  1014. [$1], [CXX], [depcc="$CXX" am_compiler_list=],
  1015. [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
  1016. [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'],
  1017. [$1], [UPC], [depcc="$UPC" am_compiler_list=],
  1018. [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
  1019. [depcc="$$1" am_compiler_list=])
  1020. AC_CACHE_CHECK([dependency style of $depcc],
  1021. [am_cv_$1_dependencies_compiler_type],
  1022. [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
  1023. # We make a subdir and do the tests there. Otherwise we can end up
  1024. # making bogus files that we don't know about and never remove. For
  1025. # instance it was reported that on HP-UX the gcc test will end up
  1026. # making a dummy file named 'D' -- because '-MD' means "put the output
  1027. # in D".
  1028. rm -rf conftest.dir
  1029. mkdir conftest.dir
  1030. # Copy depcomp to subdir because otherwise we won't find it if we're
  1031. # using a relative directory.
  1032. cp "$am_depcomp" conftest.dir
  1033. cd conftest.dir
  1034. # We will build objects and dependencies in a subdirectory because
  1035. # it helps to detect inapplicable dependency modes. For instance
  1036. # both Tru64's cc and ICC support -MD to output dependencies as a
  1037. # side effect of compilation, but ICC will put the dependencies in
  1038. # the current directory while Tru64 will put them in the object
  1039. # directory.
  1040. mkdir sub
  1041. am_cv_$1_dependencies_compiler_type=none
  1042. if test "$am_compiler_list" = ""; then
  1043. am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
  1044. fi
  1045. am__universal=false
  1046. m4_case([$1], [CC],
  1047. [case " $depcc " in #(
  1048. *\ -arch\ *\ -arch\ *) am__universal=true ;;
  1049. esac],
  1050. [CXX],
  1051. [case " $depcc " in #(
  1052. *\ -arch\ *\ -arch\ *) am__universal=true ;;
  1053. esac])
  1054. for depmode in $am_compiler_list; do
  1055. # Setup a source with many dependencies, because some compilers
  1056. # like to wrap large dependency lists on column 80 (with \), and
  1057. # we should not choose a depcomp mode which is confused by this.
  1058. #
  1059. # We need to recreate these files for each test, as the compiler may
  1060. # overwrite some of them when testing with obscure command lines.
  1061. # This happens at least with the AIX C compiler.
  1062. : > sub/conftest.c
  1063. for i in 1 2 3 4 5 6; do
  1064. echo '#include "conftst'$i'.h"' >> sub/conftest.c
  1065. # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
  1066. # Solaris 10 /bin/sh.
  1067. echo '/* dummy */' > sub/conftst$i.h
  1068. done
  1069. echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
  1070. # We check with '-c' and '-o' for the sake of the "dashmstdout"
  1071. # mode. It turns out that the SunPro C++ compiler does not properly
  1072. # handle '-M -o', and we need to detect this. Also, some Intel
  1073. # versions had trouble with output in subdirs.
  1074. am__obj=sub/conftest.${OBJEXT-o}
  1075. am__minus_obj="-o $am__obj"
  1076. case $depmode in
  1077. gcc)
  1078. # This depmode causes a compiler race in universal mode.
  1079. test "$am__universal" = false || continue
  1080. ;;
  1081. nosideeffect)
  1082. # After this tag, mechanisms are not by side-effect, so they'll
  1083. # only be used when explicitly requested.
  1084. if test "x$enable_dependency_tracking" = xyes; then
  1085. continue
  1086. else
  1087. break
  1088. fi
  1089. ;;
  1090. msvc7 | msvc7msys | msvisualcpp | msvcmsys)
  1091. # This compiler won't grok '-c -o', but also, the minuso test has
  1092. # not run yet. These depmodes are late enough in the game, and
  1093. # so weak that their functioning should not be impacted.
  1094. am__obj=conftest.${OBJEXT-o}
  1095. am__minus_obj=
  1096. ;;
  1097. none) break ;;
  1098. esac
  1099. if depmode=$depmode \
  1100. source=sub/conftest.c object=$am__obj \
  1101. depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
  1102. $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
  1103. >/dev/null 2>conftest.err &&
  1104. grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
  1105. grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
  1106. grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
  1107. ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
  1108. # icc doesn't choke on unknown options, it will just issue warnings
  1109. # or remarks (even with -Werror). So we grep stderr for any message
  1110. # that says an option was ignored or not supported.
  1111. # When given -MP, icc 7.0 and 7.1 complain thusly:
  1112. # icc: Command line warning: ignoring option '-M'; no argument required
  1113. # The diagnosis changed in icc 8.0:
  1114. # icc: Command line remark: option '-MP' not supported
  1115. if (grep 'ignoring option' conftest.err ||
  1116. grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
  1117. am_cv_$1_dependencies_compiler_type=$depmode
  1118. break
  1119. fi
  1120. fi
  1121. done
  1122. cd ..
  1123. rm -rf conftest.dir
  1124. else
  1125. am_cv_$1_dependencies_compiler_type=none
  1126. fi
  1127. ])
  1128. AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
  1129. AM_CONDITIONAL([am__fastdep$1], [
  1130. test "x$enable_dependency_tracking" != xno \
  1131. && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
  1132. ])
  1133. # AM_SET_DEPDIR
  1134. # -------------
  1135. # Choose a directory name for dependency files.
  1136. # This macro is AC_REQUIREd in _AM_DEPENDENCIES.
  1137. AC_DEFUN([AM_SET_DEPDIR],
  1138. [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
  1139. AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
  1140. ])
  1141. # AM_DEP_TRACK
  1142. # ------------
  1143. AC_DEFUN([AM_DEP_TRACK],
  1144. [AC_ARG_ENABLE([dependency-tracking], [dnl
  1145. AS_HELP_STRING(
  1146. [--enable-dependency-tracking],
  1147. [do not reject slow dependency extractors])
  1148. AS_HELP_STRING(
  1149. [--disable-dependency-tracking],
  1150. [speeds up one-time build])])
  1151. if test "x$enable_dependency_tracking" != xno; then
  1152. am_depcomp="$ac_aux_dir/depcomp"
  1153. AMDEPBACKSLASH='\'
  1154. am__nodep='_no'
  1155. fi
  1156. AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
  1157. AC_SUBST([AMDEPBACKSLASH])dnl
  1158. _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
  1159. AC_SUBST([am__nodep])dnl
  1160. _AM_SUBST_NOTMAKE([am__nodep])dnl
  1161. ])
  1162. # Generate code to set up dependency tracking. -*- Autoconf -*-
  1163. # Copyright (C) 1999-2014 Free Software Foundation, Inc.
  1164. #
  1165. # This file is free software; the Free Software Foundation
  1166. # gives unlimited permission to copy and/or distribute it,
  1167. # with or without modifications, as long as this notice is preserved.
  1168. # _AM_OUTPUT_DEPENDENCY_COMMANDS
  1169. # ------------------------------
  1170. AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
  1171. [{
  1172. # Older Autoconf quotes --file arguments for eval, but not when files
  1173. # are listed without --file. Let's play safe and only enable the eval
  1174. # if we detect the quoting.
  1175. case $CONFIG_FILES in
  1176. *\'*) eval set x "$CONFIG_FILES" ;;
  1177. *) set x $CONFIG_FILES ;;
  1178. esac
  1179. shift
  1180. for mf
  1181. do
  1182. # Strip MF so we end up with the name of the file.
  1183. mf=`echo "$mf" | sed -e 's/:.*$//'`
  1184. # Check whether this is an Automake generated Makefile or not.
  1185. # We used to match only the files named 'Makefile.in', but
  1186. # some people rename them; so instead we look at the file content.
  1187. # Grep'ing the first line is not enough: some people post-process
  1188. # each Makefile.in and add a new line on top of each file to say so.
  1189. # Grep'ing the whole file is not good either: AIX grep has a line
  1190. # limit of 2048, but all sed's we know have understand at least 4000.
  1191. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
  1192. dirpart=`AS_DIRNAME("$mf")`
  1193. else
  1194. continue
  1195. fi
  1196. # Extract the definition of DEPDIR, am__include, and am__quote
  1197. # from the Makefile without running 'make'.
  1198. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
  1199. test -z "$DEPDIR" && continue
  1200. am__include=`sed -n 's/^am__include = //p' < "$mf"`
  1201. test -z "$am__include" && continue
  1202. am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
  1203. # Find all dependency output files, they are included files with
  1204. # $(DEPDIR) in their names. We invoke sed twice because it is the
  1205. # simplest approach to changing $(DEPDIR) to its actual value in the
  1206. # expansion.
  1207. for file in `sed -n "
  1208. s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
  1209. sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
  1210. # Make sure the directory exists.
  1211. test -f "$dirpart/$file" && continue
  1212. fdir=`AS_DIRNAME(["$file"])`
  1213. AS_MKDIR_P([$dirpart/$fdir])
  1214. # echo "creating $dirpart/$file"
  1215. echo '# dummy' > "$dirpart/$file"
  1216. done
  1217. done
  1218. }
  1219. ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
  1220. # AM_OUTPUT_DEPENDENCY_COMMANDS
  1221. # -----------------------------
  1222. # This macro should only be invoked once -- use via AC_REQUIRE.
  1223. #
  1224. # This code is only required when automatic dependency tracking
  1225. # is enabled. FIXME. This creates each '.P' file that we will
  1226. # need in order to bootstrap the dependency handling code.
  1227. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
  1228. [AC_CONFIG_COMMANDS([depfiles],
  1229. [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
  1230. [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
  1231. ])
  1232. # Do all the work for Automake. -*- Autoconf -*-
  1233. # Copyright (C) 1996-2014 Free Software Foundation, Inc.
  1234. #
  1235. # This file is free software; the Free Software Foundation
  1236. # gives unlimited permission to copy and/or distribute it,
  1237. # with or without modifications, as long as this notice is preserved.
  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. dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O.
  1241. m4_define([AC_PROG_CC],
  1242. m4_defn([AC_PROG_CC])
  1243. [_AM_PROG_CC_C_O
  1244. ])
  1245. # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
  1246. # AM_INIT_AUTOMAKE([OPTIONS])
  1247. # -----------------------------------------------
  1248. # The call with PACKAGE and VERSION arguments is the old style
  1249. # call (pre autoconf-2.50), which is being phased out. PACKAGE
  1250. # and VERSION should now be passed to AC_INIT and removed from
  1251. # the call to AM_INIT_AUTOMAKE.
  1252. # We support both call styles for the transition. After
  1253. # the next Automake release, Autoconf can make the AC_INIT
  1254. # arguments mandatory, and then we can depend on a new Autoconf
  1255. # release and drop the old call support.
  1256. AC_DEFUN([AM_INIT_AUTOMAKE],
  1257. [AC_PREREQ([2.65])dnl
  1258. dnl Autoconf wants to disallow AM_ names. We explicitly allow
  1259. dnl the ones we care about.
  1260. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
  1261. AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
  1262. AC_REQUIRE([AC_PROG_INSTALL])dnl
  1263. if test "`cd $srcdir && pwd`" != "`pwd`"; then
  1264. # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
  1265. # is not polluted with repeated "-I."
  1266. AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
  1267. # test to see if srcdir already configured
  1268. if test -f $srcdir/config.status; then
  1269. AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
  1270. fi
  1271. fi
  1272. # test whether we have cygpath
  1273. if test -z "$CYGPATH_W"; then
  1274. if (cygpath --version) >/dev/null 2>/dev/null; then
  1275. CYGPATH_W='cygpath -w'
  1276. else
  1277. CYGPATH_W=echo
  1278. fi
  1279. fi
  1280. AC_SUBST([CYGPATH_W])
  1281. # Define the identity of the package.
  1282. dnl Distinguish between old-style and new-style calls.
  1283. m4_ifval([$2],
  1284. [AC_DIAGNOSE([obsolete],
  1285. [$0: two- and three-arguments forms are deprecated.])
  1286. m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
  1287. AC_SUBST([PACKAGE], [$1])dnl
  1288. AC_SUBST([VERSION], [$2])],
  1289. [_AM_SET_OPTIONS([$1])dnl
  1290. dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
  1291. m4_if(
  1292. m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
  1293. [ok:ok],,
  1294. [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
  1295. AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
  1296. AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
  1297. _AM_IF_OPTION([no-define],,
  1298. [AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
  1299. AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
  1300. # Some tools Automake needs.
  1301. AC_REQUIRE([AM_SANITY_CHECK])dnl
  1302. AC_REQUIRE([AC_ARG_PROGRAM])dnl
  1303. AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
  1304. AM_MISSING_PROG([AUTOCONF], [autoconf])
  1305. AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
  1306. AM_MISSING_PROG([AUTOHEADER], [autoheader])
  1307. AM_MISSING_PROG([MAKEINFO], [makeinfo])
  1308. AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
  1309. AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
  1310. AC_REQUIRE([AC_PROG_MKDIR_P])dnl
  1311. # For better backward compatibility. To be removed once Automake 1.9.x
  1312. # dies out for good. For more background, see:
  1313. # <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
  1314. # <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
  1315. AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
  1316. # We need awk for the "check" target (and possibly the TAP driver). The
  1317. # system "awk" is bad on some platforms.
  1318. AC_REQUIRE([AC_PROG_AWK])dnl
  1319. AC_REQUIRE([AC_PROG_MAKE_SET])dnl
  1320. AC_REQUIRE([AM_SET_LEADING_DOT])dnl
  1321. _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
  1322. [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
  1323. [_AM_PROG_TAR([v7])])])
  1324. _AM_IF_OPTION([no-dependencies],,
  1325. [AC_PROVIDE_IFELSE([AC_PROG_CC],
  1326. [_AM_DEPENDENCIES([CC])],
  1327. [m4_define([AC_PROG_CC],
  1328. m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
  1329. AC_PROVIDE_IFELSE([AC_PROG_CXX],
  1330. [_AM_DEPENDENCIES([CXX])],
  1331. [m4_define([AC_PROG_CXX],
  1332. m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
  1333. AC_PROVIDE_IFELSE([AC_PROG_OBJC],
  1334. [_AM_DEPENDENCIES([OBJC])],
  1335. [m4_define([AC_PROG_OBJC],
  1336. m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
  1337. AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
  1338. [_AM_DEPENDENCIES([OBJCXX])],
  1339. [m4_define([AC_PROG_OBJCXX],
  1340. m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
  1341. ])
  1342. AC_REQUIRE([AM_SILENT_RULES])dnl
  1343. dnl The testsuite driver may need to know about EXEEXT, so add the
  1344. dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This
  1345. dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
  1346. AC_CONFIG_COMMANDS_PRE(dnl
  1347. [m4_provide_if([_AM_COMPILER_EXEEXT],
  1348. [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
  1349. # POSIX will say in a future version that running "rm -f" with no argument
  1350. # is OK; and we want to be able to make that assumption in our Makefile
  1351. # recipes. So use an aggressive probe to check that the usage we want is
  1352. # actually supported "in the wild" to an acceptable degree.
  1353. # See automake bug#10828.
  1354. # To make any issue more visible, cause the running configure to be aborted
  1355. # by default if the 'rm' program in use doesn't match our expectations; the
  1356. # user can still override this though.
  1357. if rm -f && rm -fr && rm -rf; then : OK; else
  1358. cat >&2 <<'END'
  1359. Oops!
  1360. Your 'rm' program seems unable to run without file operands specified
  1361. on the command line, even when the '-f' option is present. This is contrary
  1362. to the behaviour of most rm programs out there, and not conforming with
  1363. the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
  1364. Please tell bug-automake@gnu.org about your system, including the value
  1365. of your $PATH and any error possibly output before this message. This
  1366. can help us improve future automake versions.
  1367. END
  1368. if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
  1369. echo 'Configuration will proceed anyway, since you have set the' >&2
  1370. echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
  1371. echo >&2
  1372. else
  1373. cat >&2 <<'END'
  1374. Aborting the configuration process, to ensure you take notice of the issue.
  1375. You can download and install GNU coreutils to get an 'rm' implementation
  1376. that behaves properly: <http://www.gnu.org/software/coreutils/>.
  1377. If you want to complete the configuration process using your problematic
  1378. 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
  1379. to "yes", and re-run configure.
  1380. END
  1381. AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
  1382. fi
  1383. fi
  1384. dnl The trailing newline in this macro's definition is deliberate, for
  1385. dnl backward compatibility and to allow trailing 'dnl'-style comments
  1386. dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841.
  1387. ])
  1388. dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
  1389. dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
  1390. dnl mangled by Autoconf and run in a shell conditional statement.
  1391. m4_define([_AC_COMPILER_EXEEXT],
  1392. m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
  1393. # When config.status generates a header, we must update the stamp-h file.
  1394. # This file resides in the same directory as the config header
  1395. # that is generated. The stamp files are numbered to have different names.
  1396. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
  1397. # loop where config.status creates the headers, so we can generate
  1398. # our stamp files there.
  1399. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
  1400. [# Compute $1's index in $config_headers.
  1401. _am_arg=$1
  1402. _am_stamp_count=1
  1403. for _am_header in $config_headers :; do
  1404. case $_am_header in
  1405. $_am_arg | $_am_arg:* )
  1406. break ;;
  1407. * )
  1408. _am_stamp_count=`expr $_am_stamp_count + 1` ;;
  1409. esac
  1410. done
  1411. echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
  1412. # Copyright (C) 2001-2014 Free Software Foundation, Inc.
  1413. #
  1414. # This file is free software; the Free Software Foundation
  1415. # gives unlimited permission to copy and/or distribute it,
  1416. # with or without modifications, as long as this notice is preserved.
  1417. # AM_PROG_INSTALL_SH
  1418. # ------------------
  1419. # Define $install_sh.
  1420. AC_DEFUN([AM_PROG_INSTALL_SH],
  1421. [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
  1422. if test x"${install_sh+set}" != xset; then
  1423. case $am_aux_dir in
  1424. *\ * | *\ *)
  1425. install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
  1426. *)
  1427. install_sh="\${SHELL} $am_aux_dir/install-sh"
  1428. esac
  1429. fi
  1430. AC_SUBST([install_sh])])
  1431. # Copyright (C) 2003-2014 Free Software Foundation, Inc.
  1432. #
  1433. # This file is free software; the Free Software Foundation
  1434. # gives unlimited permission to copy and/or distribute it,
  1435. # with or without modifications, as long as this notice is preserved.
  1436. # Check whether the underlying file-system supports filenames
  1437. # with a leading dot. For instance MS-DOS doesn't.
  1438. AC_DEFUN([AM_SET_LEADING_DOT],
  1439. [rm -rf .tst 2>/dev/null
  1440. mkdir .tst 2>/dev/null
  1441. if test -d .tst; then
  1442. am__leading_dot=.
  1443. else
  1444. am__leading_dot=_
  1445. fi
  1446. rmdir .tst 2>/dev/null
  1447. AC_SUBST([am__leading_dot])])
  1448. # Check to see how 'make' treats includes. -*- Autoconf -*-
  1449. # Copyright (C) 2001-2014 Free Software Foundation, Inc.
  1450. #
  1451. # This file is free software; the Free Software Foundation
  1452. # gives unlimited permission to copy and/or distribute it,
  1453. # with or without modifications, as long as this notice is preserved.
  1454. # AM_MAKE_INCLUDE()
  1455. # -----------------
  1456. # Check to see how make treats includes.
  1457. AC_DEFUN([AM_MAKE_INCLUDE],
  1458. [am_make=${MAKE-make}
  1459. cat > confinc << 'END'
  1460. am__doit:
  1461. @echo this is the am__doit target
  1462. .PHONY: am__doit
  1463. END
  1464. # If we don't find an include directive, just comment out the code.
  1465. AC_MSG_CHECKING([for style of include used by $am_make])
  1466. am__include="#"
  1467. am__quote=
  1468. _am_result=none
  1469. # First try GNU make style include.
  1470. echo "include confinc" > confmf
  1471. # Ignore all kinds of additional output from 'make'.
  1472. case `$am_make -s -f confmf 2> /dev/null` in #(
  1473. *the\ am__doit\ target*)
  1474. am__include=include
  1475. am__quote=
  1476. _am_result=GNU
  1477. ;;
  1478. esac
  1479. # Now try BSD make style include.
  1480. if test "$am__include" = "#"; then
  1481. echo '.include "confinc"' > confmf
  1482. case `$am_make -s -f confmf 2> /dev/null` in #(
  1483. *the\ am__doit\ target*)
  1484. am__include=.include
  1485. am__quote="\""
  1486. _am_result=BSD
  1487. ;;
  1488. esac
  1489. fi
  1490. AC_SUBST([am__include])
  1491. AC_SUBST([am__quote])
  1492. AC_MSG_RESULT([$_am_result])
  1493. rm -f confinc confmf
  1494. ])
  1495. # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
  1496. # Copyright (C) 1997-2014 Free Software Foundation, Inc.
  1497. #
  1498. # This file is free software; the Free Software Foundation
  1499. # gives unlimited permission to copy and/or distribute it,
  1500. # with or without modifications, as long as this notice is preserved.
  1501. # AM_MISSING_PROG(NAME, PROGRAM)
  1502. # ------------------------------
  1503. AC_DEFUN([AM_MISSING_PROG],
  1504. [AC_REQUIRE([AM_MISSING_HAS_RUN])
  1505. $1=${$1-"${am_missing_run}$2"}
  1506. AC_SUBST($1)])
  1507. # AM_MISSING_HAS_RUN
  1508. # ------------------
  1509. # Define MISSING if not defined so far and test if it is modern enough.
  1510. # If it is, set am_missing_run to use it, otherwise, to nothing.
  1511. AC_DEFUN([AM_MISSING_HAS_RUN],
  1512. [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
  1513. AC_REQUIRE_AUX_FILE([missing])dnl
  1514. if test x"${MISSING+set}" != xset; then
  1515. case $am_aux_dir in
  1516. *\ * | *\ *)
  1517. MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
  1518. *)
  1519. MISSING="\${SHELL} $am_aux_dir/missing" ;;
  1520. esac
  1521. fi
  1522. # Use eval to expand $SHELL
  1523. if eval "$MISSING --is-lightweight"; then
  1524. am_missing_run="$MISSING "
  1525. else
  1526. am_missing_run=
  1527. AC_MSG_WARN(['missing' script is too old or missing])
  1528. fi
  1529. ])
  1530. # Helper functions for option handling. -*- Autoconf -*-
  1531. # Copyright (C) 2001-2014 Free Software Foundation, Inc.
  1532. #
  1533. # This file is free software; the Free Software Foundation
  1534. # gives unlimited permission to copy and/or distribute it,
  1535. # with or without modifications, as long as this notice is preserved.
  1536. # _AM_MANGLE_OPTION(NAME)
  1537. # -----------------------
  1538. AC_DEFUN([_AM_MANGLE_OPTION],
  1539. [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
  1540. # _AM_SET_OPTION(NAME)
  1541. # --------------------
  1542. # Set option NAME. Presently that only means defining a flag for this option.
  1543. AC_DEFUN([_AM_SET_OPTION],
  1544. [m4_define(_AM_MANGLE_OPTION([$1]), [1])])
  1545. # _AM_SET_OPTIONS(OPTIONS)
  1546. # ------------------------
  1547. # OPTIONS is a space-separated list of Automake options.
  1548. AC_DEFUN([_AM_SET_OPTIONS],
  1549. [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
  1550. # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
  1551. # -------------------------------------------
  1552. # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
  1553. AC_DEFUN([_AM_IF_OPTION],
  1554. [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
  1555. # Copyright (C) 1999-2014 Free Software Foundation, Inc.
  1556. #
  1557. # This file is free software; the Free Software Foundation
  1558. # gives unlimited permission to copy and/or distribute it,
  1559. # with or without modifications, as long as this notice is preserved.
  1560. # _AM_PROG_CC_C_O
  1561. # ---------------
  1562. # Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC
  1563. # to automatically call this.
  1564. AC_DEFUN([_AM_PROG_CC_C_O],
  1565. [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
  1566. AC_REQUIRE_AUX_FILE([compile])dnl
  1567. AC_LANG_PUSH([C])dnl
  1568. AC_CACHE_CHECK(
  1569. [whether $CC understands -c and -o together],
  1570. [am_cv_prog_cc_c_o],
  1571. [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])])
  1572. # Make sure it works both with $CC and with simple cc.
  1573. # Following AC_PROG_CC_C_O, we do the test twice because some
  1574. # compilers refuse to overwrite an existing .o file with -o,
  1575. # though they will create one.
  1576. am_cv_prog_cc_c_o=yes
  1577. for am_i in 1 2; do
  1578. if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \
  1579. && test -f conftest2.$ac_objext; then
  1580. : OK
  1581. else
  1582. am_cv_prog_cc_c_o=no
  1583. break
  1584. fi
  1585. done
  1586. rm -f core conftest*
  1587. unset am_i])
  1588. if test "$am_cv_prog_cc_c_o" != yes; then
  1589. # Losing compiler, so override with the script.
  1590. # FIXME: It is wrong to rewrite CC.
  1591. # But if we don't then we get into trouble of one sort or another.
  1592. # A longer-term fix would be to have automake use am__CC in this case,
  1593. # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
  1594. CC="$am_aux_dir/compile $CC"
  1595. fi
  1596. AC_LANG_POP([C])])
  1597. # For backward compatibility.
  1598. AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
  1599. # Copyright (C) 2001-2014 Free Software Foundation, Inc.
  1600. #
  1601. # This file is free software; the Free Software Foundation
  1602. # gives unlimited permission to copy and/or distribute it,
  1603. # with or without modifications, as long as this notice is preserved.
  1604. # AM_RUN_LOG(COMMAND)
  1605. # -------------------
  1606. # Run COMMAND, save the exit status in ac_status, and log it.
  1607. # (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
  1608. AC_DEFUN([AM_RUN_LOG],
  1609. [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
  1610. ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
  1611. ac_status=$?
  1612. echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
  1613. (exit $ac_status); }])
  1614. # Check to make sure that the build environment is sane. -*- Autoconf -*-
  1615. # Copyright (C) 1996-2014 Free Software Foundation, Inc.
  1616. #
  1617. # This file is free software; the Free Software Foundation
  1618. # gives unlimited permission to copy and/or distribute it,
  1619. # with or without modifications, as long as this notice is preserved.
  1620. # AM_SANITY_CHECK
  1621. # ---------------
  1622. AC_DEFUN([AM_SANITY_CHECK],
  1623. [AC_MSG_CHECKING([whether build environment is sane])
  1624. # Reject unsafe characters in $srcdir or the absolute working directory
  1625. # name. Accept space and tab only in the latter.
  1626. am_lf='
  1627. '
  1628. case `pwd` in
  1629. *[[\\\"\#\$\&\'\`$am_lf]]*)
  1630. AC_MSG_ERROR([unsafe absolute working directory name]);;
  1631. esac
  1632. case $srcdir in
  1633. *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
  1634. AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
  1635. esac
  1636. # Do 'set' in a subshell so we don't clobber the current shell's
  1637. # arguments. Must try -L first in case configure is actually a
  1638. # symlink; some systems play weird games with the mod time of symlinks
  1639. # (eg FreeBSD returns the mod time of the symlink's containing
  1640. # directory).
  1641. if (
  1642. am_has_slept=no
  1643. for am_try in 1 2; do
  1644. echo "timestamp, slept: $am_has_slept" > conftest.file
  1645. set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
  1646. if test "$[*]" = "X"; then
  1647. # -L didn't work.
  1648. set X `ls -t "$srcdir/configure" conftest.file`
  1649. fi
  1650. if test "$[*]" != "X $srcdir/configure conftest.file" \
  1651. && test "$[*]" != "X conftest.file $srcdir/configure"; then
  1652. # If neither matched, then we have a broken ls. This can happen
  1653. # if, for instance, CONFIG_SHELL is bash and it inherits a
  1654. # broken ls alias from the environment. This has actually
  1655. # happened. Such a system could not be considered "sane".
  1656. AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
  1657. alias in your environment])
  1658. fi
  1659. if test "$[2]" = conftest.file || test $am_try -eq 2; then
  1660. break
  1661. fi
  1662. # Just in case.
  1663. sleep 1
  1664. am_has_slept=yes
  1665. done
  1666. test "$[2]" = conftest.file
  1667. )
  1668. then
  1669. # Ok.
  1670. :
  1671. else
  1672. AC_MSG_ERROR([newly created file is older than distributed files!
  1673. Check your system clock])
  1674. fi
  1675. AC_MSG_RESULT([yes])
  1676. # If we didn't sleep, we still need to ensure time stamps of config.status and
  1677. # generated files are strictly newer.
  1678. am_sleep_pid=
  1679. if grep 'slept: no' conftest.file >/dev/null 2>&1; then
  1680. ( sleep 1 ) &
  1681. am_sleep_pid=$!
  1682. fi
  1683. AC_CONFIG_COMMANDS_PRE(
  1684. [AC_MSG_CHECKING([that generated files are newer than configure])
  1685. if test -n "$am_sleep_pid"; then
  1686. # Hide warnings about reused PIDs.
  1687. wait $am_sleep_pid 2>/dev/null
  1688. fi
  1689. AC_MSG_RESULT([done])])
  1690. rm -f conftest.file
  1691. ])
  1692. # Copyright (C) 2009-2014 Free Software Foundation, Inc.
  1693. #
  1694. # This file is free software; the Free Software Foundation
  1695. # gives unlimited permission to copy and/or distribute it,
  1696. # with or without modifications, as long as this notice is preserved.
  1697. # AM_SILENT_RULES([DEFAULT])
  1698. # --------------------------
  1699. # Enable less verbose build rules; with the default set to DEFAULT
  1700. # ("yes" being less verbose, "no" or empty being verbose).
  1701. AC_DEFUN([AM_SILENT_RULES],
  1702. [AC_ARG_ENABLE([silent-rules], [dnl
  1703. AS_HELP_STRING(
  1704. [--enable-silent-rules],
  1705. [less verbose build output (undo: "make V=1")])
  1706. AS_HELP_STRING(
  1707. [--disable-silent-rules],
  1708. [verbose build output (undo: "make V=0")])dnl
  1709. ])
  1710. case $enable_silent_rules in @%:@ (((
  1711. yes) AM_DEFAULT_VERBOSITY=0;;
  1712. no) AM_DEFAULT_VERBOSITY=1;;
  1713. *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
  1714. esac
  1715. dnl
  1716. dnl A few 'make' implementations (e.g., NonStop OS and NextStep)
  1717. dnl do not support nested variable expansions.
  1718. dnl See automake bug#9928 and bug#10237.
  1719. am_make=${MAKE-make}
  1720. AC_CACHE_CHECK([whether $am_make supports nested variables],
  1721. [am_cv_make_support_nested_variables],
  1722. [if AS_ECHO([['TRUE=$(BAR$(V))
  1723. BAR0=false
  1724. BAR1=true
  1725. V=1
  1726. am__doit:
  1727. @$(TRUE)
  1728. .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
  1729. am_cv_make_support_nested_variables=yes
  1730. else
  1731. am_cv_make_support_nested_variables=no
  1732. fi])
  1733. if test $am_cv_make_support_nested_variables = yes; then
  1734. dnl Using '$V' instead of '$(V)' breaks IRIX make.
  1735. AM_V='$(V)'
  1736. AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
  1737. else
  1738. AM_V=$AM_DEFAULT_VERBOSITY
  1739. AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
  1740. fi
  1741. AC_SUBST([AM_V])dnl
  1742. AM_SUBST_NOTMAKE([AM_V])dnl
  1743. AC_SUBST([AM_DEFAULT_V])dnl
  1744. AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
  1745. AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
  1746. AM_BACKSLASH='\'
  1747. AC_SUBST([AM_BACKSLASH])dnl
  1748. _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
  1749. ])
  1750. # Copyright (C) 2001-2014 Free Software Foundation, Inc.
  1751. #
  1752. # This file is free software; the Free Software Foundation
  1753. # gives unlimited permission to copy and/or distribute it,
  1754. # with or without modifications, as long as this notice is preserved.
  1755. # AM_PROG_INSTALL_STRIP
  1756. # ---------------------
  1757. # One issue with vendor 'install' (even GNU) is that you can't
  1758. # specify the program used to strip binaries. This is especially
  1759. # annoying in cross-compiling environments, where the build's strip
  1760. # is unlikely to handle the host's binaries.
  1761. # Fortunately install-sh will honor a STRIPPROG variable, so we
  1762. # always use install-sh in "make install-strip", and initialize
  1763. # STRIPPROG with the value of the STRIP variable (set by the user).
  1764. AC_DEFUN([AM_PROG_INSTALL_STRIP],
  1765. [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
  1766. # Installed binaries are usually stripped using 'strip' when the user
  1767. # run "make install-strip". However 'strip' might not be the right
  1768. # tool to use in cross-compilation environments, therefore Automake
  1769. # will honor the 'STRIP' environment variable to overrule this program.
  1770. dnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
  1771. if test "$cross_compiling" != no; then
  1772. AC_CHECK_TOOL([STRIP], [strip], :)
  1773. fi
  1774. INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
  1775. AC_SUBST([INSTALL_STRIP_PROGRAM])])
  1776. # Copyright (C) 2006-2014 Free Software Foundation, Inc.
  1777. #
  1778. # This file is free software; the Free Software Foundation
  1779. # gives unlimited permission to copy and/or distribute it,
  1780. # with or without modifications, as long as this notice is preserved.
  1781. # _AM_SUBST_NOTMAKE(VARIABLE)
  1782. # ---------------------------
  1783. # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
  1784. # This macro is traced by Automake.
  1785. AC_DEFUN([_AM_SUBST_NOTMAKE])
  1786. # AM_SUBST_NOTMAKE(VARIABLE)
  1787. # --------------------------
  1788. # Public sister of _AM_SUBST_NOTMAKE.
  1789. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
  1790. # Check how to create a tarball. -*- Autoconf -*-
  1791. # Copyright (C) 2004-2014 Free Software Foundation, Inc.
  1792. #
  1793. # This file is free software; the Free Software Foundation
  1794. # gives unlimited permission to copy and/or distribute it,
  1795. # with or without modifications, as long as this notice is preserved.
  1796. # _AM_PROG_TAR(FORMAT)
  1797. # --------------------
  1798. # Check how to create a tarball in format FORMAT.
  1799. # FORMAT should be one of 'v7', 'ustar', or 'pax'.
  1800. #
  1801. # Substitute a variable $(am__tar) that is a command
  1802. # writing to stdout a FORMAT-tarball containing the directory
  1803. # $tardir.
  1804. # tardir=directory && $(am__tar) > result.tar
  1805. #
  1806. # Substitute a variable $(am__untar) that extract such
  1807. # a tarball read from stdin.
  1808. # $(am__untar) < result.tar
  1809. #
  1810. AC_DEFUN([_AM_PROG_TAR],
  1811. [# Always define AMTAR for backward compatibility. Yes, it's still used
  1812. # in the wild :-( We should find a proper way to deprecate it ...
  1813. AC_SUBST([AMTAR], ['$${TAR-tar}'])
  1814. # We'll loop over all known methods to create a tar archive until one works.
  1815. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
  1816. m4_if([$1], [v7],
  1817. [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
  1818. [m4_case([$1],
  1819. [ustar],
  1820. [# The POSIX 1988 'ustar' format is defined with fixed-size fields.
  1821. # There is notably a 21 bits limit for the UID and the GID. In fact,
  1822. # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
  1823. # and bug#13588).
  1824. am_max_uid=2097151 # 2^21 - 1
  1825. am_max_gid=$am_max_uid
  1826. # The $UID and $GID variables are not portable, so we need to resort
  1827. # to the POSIX-mandated id(1) utility. Errors in the 'id' calls
  1828. # below are definitely unexpected, so allow the users to see them
  1829. # (that is, avoid stderr redirection).
  1830. am_uid=`id -u || echo unknown`
  1831. am_gid=`id -g || echo unknown`
  1832. AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
  1833. if test $am_uid -le $am_max_uid; then
  1834. AC_MSG_RESULT([yes])
  1835. else
  1836. AC_MSG_RESULT([no])
  1837. _am_tools=none
  1838. fi
  1839. AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
  1840. if test $am_gid -le $am_max_gid; then
  1841. AC_MSG_RESULT([yes])
  1842. else
  1843. AC_MSG_RESULT([no])
  1844. _am_tools=none
  1845. fi],
  1846. [pax],
  1847. [],
  1848. [m4_fatal([Unknown tar format])])
  1849. AC_MSG_CHECKING([how to create a $1 tar archive])
  1850. # Go ahead even if we have the value already cached. We do so because we
  1851. # need to set the values for the 'am__tar' and 'am__untar' variables.
  1852. _am_tools=${am_cv_prog_tar_$1-$_am_tools}
  1853. for _am_tool in $_am_tools; do
  1854. case $_am_tool in
  1855. gnutar)
  1856. for _am_tar in tar gnutar gtar; do
  1857. AM_RUN_LOG([$_am_tar --version]) && break
  1858. done
  1859. am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
  1860. am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
  1861. am__untar="$_am_tar -xf -"
  1862. ;;
  1863. plaintar)
  1864. # Must skip GNU tar: if it does not support --format= it doesn't create
  1865. # ustar tarball either.
  1866. (tar --version) >/dev/null 2>&1 && continue
  1867. am__tar='tar chf - "$$tardir"'
  1868. am__tar_='tar chf - "$tardir"'
  1869. am__untar='tar xf -'
  1870. ;;
  1871. pax)
  1872. am__tar='pax -L -x $1 -w "$$tardir"'
  1873. am__tar_='pax -L -x $1 -w "$tardir"'
  1874. am__untar='pax -r'
  1875. ;;
  1876. cpio)
  1877. am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
  1878. am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
  1879. am__untar='cpio -i -H $1 -d'
  1880. ;;
  1881. none)
  1882. am__tar=false
  1883. am__tar_=false
  1884. am__untar=false
  1885. ;;
  1886. esac
  1887. # If the value was cached, stop now. We just wanted to have am__tar
  1888. # and am__untar set.
  1889. test -n "${am_cv_prog_tar_$1}" && break
  1890. # tar/untar a dummy directory, and stop if the command works.
  1891. rm -rf conftest.dir
  1892. mkdir conftest.dir
  1893. echo GrepMe > conftest.dir/file
  1894. AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
  1895. rm -rf conftest.dir
  1896. if test -s conftest.tar; then
  1897. AM_RUN_LOG([$am__untar <conftest.tar])
  1898. AM_RUN_LOG([cat conftest.dir/file])
  1899. grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
  1900. fi
  1901. done
  1902. rm -rf conftest.dir
  1903. AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
  1904. AC_MSG_RESULT([$am_cv_prog_tar_$1])])
  1905. AC_SUBST([am__tar])
  1906. AC_SUBST([am__untar])
  1907. ]) # _AM_PROG_TAR