aclocal.m4 95 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467
  1. # generated automatically by aclocal 1.16.1 -*- Autoconf -*-
  2. # Copyright (C) 1996-2018 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. # gettext.m4 serial 68 (gettext-0.19.8)
  12. dnl Copyright (C) 1995-2014, 2016 Free Software Foundation, Inc.
  13. dnl This file is free software; the Free Software Foundation
  14. dnl gives unlimited permission to copy and/or distribute it,
  15. dnl with or without modifications, as long as this notice is preserved.
  16. dnl
  17. dnl This file can be used in projects which are not available under
  18. dnl the GNU General Public License or the GNU Library General Public
  19. dnl License but which still want to provide support for the GNU gettext
  20. dnl functionality.
  21. dnl Please note that the actual code of the GNU gettext library is covered
  22. dnl by the GNU Library General Public License, and the rest of the GNU
  23. dnl gettext package is covered by the GNU General Public License.
  24. dnl They are *not* in the public domain.
  25. dnl Authors:
  26. dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
  27. dnl Bruno Haible <haible@clisp.cons.org>, 2000-2006, 2008-2010.
  28. dnl Macro to add for using GNU gettext.
  29. dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]).
  30. dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The
  31. dnl default (if it is not specified or empty) is 'no-libtool'.
  32. dnl INTLSYMBOL should be 'external' for packages with no intl directory,
  33. dnl and 'no-libtool' or 'use-libtool' for packages with an intl directory.
  34. dnl If INTLSYMBOL is 'use-libtool', then a libtool library
  35. dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static,
  36. dnl depending on --{enable,disable}-{shared,static} and on the presence of
  37. dnl AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library
  38. dnl $(top_builddir)/intl/libintl.a will be created.
  39. dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext
  40. dnl implementations (in libc or libintl) without the ngettext() function
  41. dnl will be ignored. If NEEDSYMBOL is specified and is
  42. dnl 'need-formatstring-macros', then GNU gettext implementations that don't
  43. dnl support the ISO C 99 <inttypes.h> formatstring macros will be ignored.
  44. dnl INTLDIR is used to find the intl libraries. If empty,
  45. dnl the value '$(top_builddir)/intl/' is used.
  46. dnl
  47. dnl The result of the configuration is one of three cases:
  48. dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled
  49. dnl and used.
  50. dnl Catalog format: GNU --> install in $(datadir)
  51. dnl Catalog extension: .mo after installation, .gmo in source tree
  52. dnl 2) GNU gettext has been found in the system's C library.
  53. dnl Catalog format: GNU --> install in $(datadir)
  54. dnl Catalog extension: .mo after installation, .gmo in source tree
  55. dnl 3) No internationalization, always use English msgid.
  56. dnl Catalog format: none
  57. dnl Catalog extension: none
  58. dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur.
  59. dnl The use of .gmo is historical (it was needed to avoid overwriting the
  60. dnl GNU format catalogs when building on a platform with an X/Open gettext),
  61. dnl but we keep it in order not to force irrelevant filename changes on the
  62. dnl maintainers.
  63. dnl
  64. AC_DEFUN([AM_GNU_GETTEXT],
  65. [
  66. dnl Argument checking.
  67. ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], ,
  68. [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT
  69. ])])])])])
  70. ifelse(ifelse([$1], [], [old])[]ifelse([$1], [no-libtool], [old]), [old],
  71. [AC_DIAGNOSE([obsolete], [Use of AM_GNU_GETTEXT without [external] argument is deprecated.])])
  72. ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], ,
  73. [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT
  74. ])])])])
  75. define([gt_included_intl],
  76. ifelse([$1], [external],
  77. ifdef([AM_GNU_GETTEXT_][INTL_SUBDIR], [yes], [no]),
  78. [yes]))
  79. define([gt_libtool_suffix_prefix], ifelse([$1], [use-libtool], [l], []))
  80. gt_NEEDS_INIT
  81. AM_GNU_GETTEXT_NEED([$2])
  82. AC_REQUIRE([AM_PO_SUBDIRS])dnl
  83. ifelse(gt_included_intl, yes, [
  84. AC_REQUIRE([AM_INTL_SUBDIR])dnl
  85. ])
  86. dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
  87. AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
  88. AC_REQUIRE([AC_LIB_RPATH])
  89. dnl Sometimes libintl requires libiconv, so first search for libiconv.
  90. dnl Ideally we would do this search only after the
  91. dnl if test "$USE_NLS" = "yes"; then
  92. dnl if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
  93. dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT
  94. dnl the configure script would need to contain the same shell code
  95. dnl again, outside any 'if'. There are two solutions:
  96. dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'.
  97. dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE.
  98. dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not
  99. dnl documented, we avoid it.
  100. ifelse(gt_included_intl, yes, , [
  101. AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
  102. ])
  103. dnl Sometimes, on Mac OS X, libintl requires linking with CoreFoundation.
  104. gt_INTL_MACOSX
  105. dnl Set USE_NLS.
  106. AC_REQUIRE([AM_NLS])
  107. ifelse(gt_included_intl, yes, [
  108. BUILD_INCLUDED_LIBINTL=no
  109. USE_INCLUDED_LIBINTL=no
  110. ])
  111. LIBINTL=
  112. LTLIBINTL=
  113. POSUB=
  114. dnl Add a version number to the cache macros.
  115. case " $gt_needs " in
  116. *" need-formatstring-macros "*) gt_api_version=3 ;;
  117. *" need-ngettext "*) gt_api_version=2 ;;
  118. *) gt_api_version=1 ;;
  119. esac
  120. gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc"
  121. gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl"
  122. dnl If we use NLS figure out what method
  123. if test "$USE_NLS" = "yes"; then
  124. gt_use_preinstalled_gnugettext=no
  125. ifelse(gt_included_intl, yes, [
  126. AC_MSG_CHECKING([whether included gettext is requested])
  127. AC_ARG_WITH([included-gettext],
  128. [ --with-included-gettext use the GNU gettext library included here],
  129. nls_cv_force_use_gnu_gettext=$withval,
  130. nls_cv_force_use_gnu_gettext=no)
  131. AC_MSG_RESULT([$nls_cv_force_use_gnu_gettext])
  132. nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
  133. if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
  134. ])
  135. dnl User does not insist on using GNU NLS library. Figure out what
  136. dnl to use. If GNU gettext is available we use this. Else we have
  137. dnl to fall back to GNU NLS library.
  138. if test $gt_api_version -ge 3; then
  139. gt_revision_test_code='
  140. #ifndef __GNU_GETTEXT_SUPPORTED_REVISION
  141. #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
  142. #endif
  143. changequote(,)dnl
  144. typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
  145. changequote([,])dnl
  146. '
  147. else
  148. gt_revision_test_code=
  149. fi
  150. if test $gt_api_version -ge 2; then
  151. gt_expression_test_code=' + * ngettext ("", "", 0)'
  152. else
  153. gt_expression_test_code=
  154. fi
  155. AC_CACHE_CHECK([for GNU gettext in libc], [$gt_func_gnugettext_libc],
  156. [AC_LINK_IFELSE(
  157. [AC_LANG_PROGRAM(
  158. [[
  159. #include <libintl.h>
  160. #ifndef __GNU_GETTEXT_SUPPORTED_REVISION
  161. extern int _nl_msg_cat_cntr;
  162. extern int *_nl_domain_bindings;
  163. #define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_domain_bindings)
  164. #else
  165. #define __GNU_GETTEXT_SYMBOL_EXPRESSION 0
  166. #endif
  167. $gt_revision_test_code
  168. ]],
  169. [[
  170. bindtextdomain ("", "");
  171. return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION
  172. ]])],
  173. [eval "$gt_func_gnugettext_libc=yes"],
  174. [eval "$gt_func_gnugettext_libc=no"])])
  175. if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
  176. dnl Sometimes libintl requires libiconv, so first search for libiconv.
  177. ifelse(gt_included_intl, yes, , [
  178. AM_ICONV_LINK
  179. ])
  180. dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL
  181. dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv])
  182. dnl because that would add "-liconv" to LIBINTL and LTLIBINTL
  183. dnl even if libiconv doesn't exist.
  184. AC_LIB_LINKFLAGS_BODY([intl])
  185. AC_CACHE_CHECK([for GNU gettext in libintl],
  186. [$gt_func_gnugettext_libintl],
  187. [gt_save_CPPFLAGS="$CPPFLAGS"
  188. CPPFLAGS="$CPPFLAGS $INCINTL"
  189. gt_save_LIBS="$LIBS"
  190. LIBS="$LIBS $LIBINTL"
  191. dnl Now see whether libintl exists and does not depend on libiconv.
  192. AC_LINK_IFELSE(
  193. [AC_LANG_PROGRAM(
  194. [[
  195. #include <libintl.h>
  196. #ifndef __GNU_GETTEXT_SUPPORTED_REVISION
  197. extern int _nl_msg_cat_cntr;
  198. extern
  199. #ifdef __cplusplus
  200. "C"
  201. #endif
  202. const char *_nl_expand_alias (const char *);
  203. #define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_expand_alias (""))
  204. #else
  205. #define __GNU_GETTEXT_SYMBOL_EXPRESSION 0
  206. #endif
  207. $gt_revision_test_code
  208. ]],
  209. [[
  210. bindtextdomain ("", "");
  211. return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION
  212. ]])],
  213. [eval "$gt_func_gnugettext_libintl=yes"],
  214. [eval "$gt_func_gnugettext_libintl=no"])
  215. dnl Now see whether libintl exists and depends on libiconv.
  216. if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then
  217. LIBS="$LIBS $LIBICONV"
  218. AC_LINK_IFELSE(
  219. [AC_LANG_PROGRAM(
  220. [[
  221. #include <libintl.h>
  222. #ifndef __GNU_GETTEXT_SUPPORTED_REVISION
  223. extern int _nl_msg_cat_cntr;
  224. extern
  225. #ifdef __cplusplus
  226. "C"
  227. #endif
  228. const char *_nl_expand_alias (const char *);
  229. #define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_expand_alias (""))
  230. #else
  231. #define __GNU_GETTEXT_SYMBOL_EXPRESSION 0
  232. #endif
  233. $gt_revision_test_code
  234. ]],
  235. [[
  236. bindtextdomain ("", "");
  237. return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION
  238. ]])],
  239. [LIBINTL="$LIBINTL $LIBICONV"
  240. LTLIBINTL="$LTLIBINTL $LTLIBICONV"
  241. eval "$gt_func_gnugettext_libintl=yes"
  242. ])
  243. fi
  244. CPPFLAGS="$gt_save_CPPFLAGS"
  245. LIBS="$gt_save_LIBS"])
  246. fi
  247. dnl If an already present or preinstalled GNU gettext() is found,
  248. dnl use it. But if this macro is used in GNU gettext, and GNU
  249. dnl gettext is already preinstalled in libintl, we update this
  250. dnl libintl. (Cf. the install rule in intl/Makefile.in.)
  251. if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \
  252. || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \
  253. && test "$PACKAGE" != gettext-runtime \
  254. && test "$PACKAGE" != gettext-tools; }; then
  255. gt_use_preinstalled_gnugettext=yes
  256. else
  257. dnl Reset the values set by searching for libintl.
  258. LIBINTL=
  259. LTLIBINTL=
  260. INCINTL=
  261. fi
  262. ifelse(gt_included_intl, yes, [
  263. if test "$gt_use_preinstalled_gnugettext" != "yes"; then
  264. dnl GNU gettext is not found in the C library.
  265. dnl Fall back on included GNU gettext library.
  266. nls_cv_use_gnu_gettext=yes
  267. fi
  268. fi
  269. if test "$nls_cv_use_gnu_gettext" = "yes"; then
  270. dnl Mark actions used to generate GNU NLS library.
  271. BUILD_INCLUDED_LIBINTL=yes
  272. USE_INCLUDED_LIBINTL=yes
  273. LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV $LIBTHREAD"
  274. LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV $LTLIBTHREAD"
  275. LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
  276. fi
  277. CATOBJEXT=
  278. if test "$gt_use_preinstalled_gnugettext" = "yes" \
  279. || test "$nls_cv_use_gnu_gettext" = "yes"; then
  280. dnl Mark actions to use GNU gettext tools.
  281. CATOBJEXT=.gmo
  282. fi
  283. ])
  284. if test -n "$INTL_MACOSX_LIBS"; then
  285. if test "$gt_use_preinstalled_gnugettext" = "yes" \
  286. || test "$nls_cv_use_gnu_gettext" = "yes"; then
  287. dnl Some extra flags are needed during linking.
  288. LIBINTL="$LIBINTL $INTL_MACOSX_LIBS"
  289. LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS"
  290. fi
  291. fi
  292. if test "$gt_use_preinstalled_gnugettext" = "yes" \
  293. || test "$nls_cv_use_gnu_gettext" = "yes"; then
  294. AC_DEFINE([ENABLE_NLS], [1],
  295. [Define to 1 if translation of program messages to the user's native language
  296. is requested.])
  297. else
  298. USE_NLS=no
  299. fi
  300. fi
  301. AC_MSG_CHECKING([whether to use NLS])
  302. AC_MSG_RESULT([$USE_NLS])
  303. if test "$USE_NLS" = "yes"; then
  304. AC_MSG_CHECKING([where the gettext function comes from])
  305. if test "$gt_use_preinstalled_gnugettext" = "yes"; then
  306. if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
  307. gt_source="external libintl"
  308. else
  309. gt_source="libc"
  310. fi
  311. else
  312. gt_source="included intl directory"
  313. fi
  314. AC_MSG_RESULT([$gt_source])
  315. fi
  316. if test "$USE_NLS" = "yes"; then
  317. if test "$gt_use_preinstalled_gnugettext" = "yes"; then
  318. if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
  319. AC_MSG_CHECKING([how to link with libintl])
  320. AC_MSG_RESULT([$LIBINTL])
  321. AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL])
  322. fi
  323. dnl For backward compatibility. Some packages may be using this.
  324. AC_DEFINE([HAVE_GETTEXT], [1],
  325. [Define if the GNU gettext() function is already present or preinstalled.])
  326. AC_DEFINE([HAVE_DCGETTEXT], [1],
  327. [Define if the GNU dcgettext() function is already present or preinstalled.])
  328. fi
  329. dnl We need to process the po/ directory.
  330. POSUB=po
  331. fi
  332. ifelse(gt_included_intl, yes, [
  333. dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL
  334. dnl to 'yes' because some of the testsuite requires it.
  335. if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then
  336. BUILD_INCLUDED_LIBINTL=yes
  337. fi
  338. dnl Make all variables we use known to autoconf.
  339. AC_SUBST([BUILD_INCLUDED_LIBINTL])
  340. AC_SUBST([USE_INCLUDED_LIBINTL])
  341. AC_SUBST([CATOBJEXT])
  342. dnl For backward compatibility. Some configure.ins may be using this.
  343. nls_cv_header_intl=
  344. nls_cv_header_libgt=
  345. dnl For backward compatibility. Some Makefiles may be using this.
  346. DATADIRNAME=share
  347. AC_SUBST([DATADIRNAME])
  348. dnl For backward compatibility. Some Makefiles may be using this.
  349. INSTOBJEXT=.mo
  350. AC_SUBST([INSTOBJEXT])
  351. dnl For backward compatibility. Some Makefiles may be using this.
  352. GENCAT=gencat
  353. AC_SUBST([GENCAT])
  354. dnl For backward compatibility. Some Makefiles may be using this.
  355. INTLOBJS=
  356. if test "$USE_INCLUDED_LIBINTL" = yes; then
  357. INTLOBJS="\$(GETTOBJS)"
  358. fi
  359. AC_SUBST([INTLOBJS])
  360. dnl Enable libtool support if the surrounding package wishes it.
  361. INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix
  362. AC_SUBST([INTL_LIBTOOL_SUFFIX_PREFIX])
  363. ])
  364. dnl For backward compatibility. Some Makefiles may be using this.
  365. INTLLIBS="$LIBINTL"
  366. AC_SUBST([INTLLIBS])
  367. dnl Make all documented variables known to autoconf.
  368. AC_SUBST([LIBINTL])
  369. AC_SUBST([LTLIBINTL])
  370. AC_SUBST([POSUB])
  371. ])
  372. dnl gt_NEEDS_INIT ensures that the gt_needs variable is initialized.
  373. m4_define([gt_NEEDS_INIT],
  374. [
  375. m4_divert_text([DEFAULTS], [gt_needs=])
  376. m4_define([gt_NEEDS_INIT], [])
  377. ])
  378. dnl Usage: AM_GNU_GETTEXT_NEED([NEEDSYMBOL])
  379. AC_DEFUN([AM_GNU_GETTEXT_NEED],
  380. [
  381. m4_divert_text([INIT_PREPARE], [gt_needs="$gt_needs $1"])
  382. ])
  383. dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version])
  384. AC_DEFUN([AM_GNU_GETTEXT_VERSION], [])
  385. dnl Usage: AM_GNU_GETTEXT_REQUIRE_VERSION([gettext-version])
  386. AC_DEFUN([AM_GNU_GETTEXT_REQUIRE_VERSION], [])
  387. # iconv.m4 serial 19 (gettext-0.18.2)
  388. dnl Copyright (C) 2000-2002, 2007-2014, 2016 Free Software Foundation, Inc.
  389. dnl This file is free software; the Free Software Foundation
  390. dnl gives unlimited permission to copy and/or distribute it,
  391. dnl with or without modifications, as long as this notice is preserved.
  392. dnl From Bruno Haible.
  393. AC_DEFUN([AM_ICONV_LINKFLAGS_BODY],
  394. [
  395. dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
  396. AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
  397. AC_REQUIRE([AC_LIB_RPATH])
  398. dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
  399. dnl accordingly.
  400. AC_LIB_LINKFLAGS_BODY([iconv])
  401. ])
  402. AC_DEFUN([AM_ICONV_LINK],
  403. [
  404. dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
  405. dnl those with the standalone portable GNU libiconv installed).
  406. AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
  407. dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
  408. dnl accordingly.
  409. AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
  410. dnl Add $INCICONV to CPPFLAGS before performing the following checks,
  411. dnl because if the user has installed libiconv and not disabled its use
  412. dnl via --without-libiconv-prefix, he wants to use it. The first
  413. dnl AC_LINK_IFELSE will then fail, the second AC_LINK_IFELSE will succeed.
  414. am_save_CPPFLAGS="$CPPFLAGS"
  415. AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
  416. AC_CACHE_CHECK([for iconv], [am_cv_func_iconv], [
  417. am_cv_func_iconv="no, consider installing GNU libiconv"
  418. am_cv_lib_iconv=no
  419. AC_LINK_IFELSE(
  420. [AC_LANG_PROGRAM(
  421. [[
  422. #include <stdlib.h>
  423. #include <iconv.h>
  424. ]],
  425. [[iconv_t cd = iconv_open("","");
  426. iconv(cd,NULL,NULL,NULL,NULL);
  427. iconv_close(cd);]])],
  428. [am_cv_func_iconv=yes])
  429. if test "$am_cv_func_iconv" != yes; then
  430. am_save_LIBS="$LIBS"
  431. LIBS="$LIBS $LIBICONV"
  432. AC_LINK_IFELSE(
  433. [AC_LANG_PROGRAM(
  434. [[
  435. #include <stdlib.h>
  436. #include <iconv.h>
  437. ]],
  438. [[iconv_t cd = iconv_open("","");
  439. iconv(cd,NULL,NULL,NULL,NULL);
  440. iconv_close(cd);]])],
  441. [am_cv_lib_iconv=yes]
  442. [am_cv_func_iconv=yes])
  443. LIBS="$am_save_LIBS"
  444. fi
  445. ])
  446. if test "$am_cv_func_iconv" = yes; then
  447. AC_CACHE_CHECK([for working iconv], [am_cv_func_iconv_works], [
  448. dnl This tests against bugs in AIX 5.1, AIX 6.1..7.1, HP-UX 11.11,
  449. dnl Solaris 10.
  450. am_save_LIBS="$LIBS"
  451. if test $am_cv_lib_iconv = yes; then
  452. LIBS="$LIBS $LIBICONV"
  453. fi
  454. am_cv_func_iconv_works=no
  455. for ac_iconv_const in '' 'const'; do
  456. AC_RUN_IFELSE(
  457. [AC_LANG_PROGRAM(
  458. [[
  459. #include <iconv.h>
  460. #include <string.h>
  461. #ifndef ICONV_CONST
  462. # define ICONV_CONST $ac_iconv_const
  463. #endif
  464. ]],
  465. [[int result = 0;
  466. /* Test against AIX 5.1 bug: Failures are not distinguishable from successful
  467. returns. */
  468. {
  469. iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
  470. if (cd_utf8_to_88591 != (iconv_t)(-1))
  471. {
  472. static ICONV_CONST char input[] = "\342\202\254"; /* EURO SIGN */
  473. char buf[10];
  474. ICONV_CONST char *inptr = input;
  475. size_t inbytesleft = strlen (input);
  476. char *outptr = buf;
  477. size_t outbytesleft = sizeof (buf);
  478. size_t res = iconv (cd_utf8_to_88591,
  479. &inptr, &inbytesleft,
  480. &outptr, &outbytesleft);
  481. if (res == 0)
  482. result |= 1;
  483. iconv_close (cd_utf8_to_88591);
  484. }
  485. }
  486. /* Test against Solaris 10 bug: Failures are not distinguishable from
  487. successful returns. */
  488. {
  489. iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646");
  490. if (cd_ascii_to_88591 != (iconv_t)(-1))
  491. {
  492. static ICONV_CONST char input[] = "\263";
  493. char buf[10];
  494. ICONV_CONST char *inptr = input;
  495. size_t inbytesleft = strlen (input);
  496. char *outptr = buf;
  497. size_t outbytesleft = sizeof (buf);
  498. size_t res = iconv (cd_ascii_to_88591,
  499. &inptr, &inbytesleft,
  500. &outptr, &outbytesleft);
  501. if (res == 0)
  502. result |= 2;
  503. iconv_close (cd_ascii_to_88591);
  504. }
  505. }
  506. /* Test against AIX 6.1..7.1 bug: Buffer overrun. */
  507. {
  508. iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1");
  509. if (cd_88591_to_utf8 != (iconv_t)(-1))
  510. {
  511. static ICONV_CONST char input[] = "\304";
  512. static char buf[2] = { (char)0xDE, (char)0xAD };
  513. ICONV_CONST char *inptr = input;
  514. size_t inbytesleft = 1;
  515. char *outptr = buf;
  516. size_t outbytesleft = 1;
  517. size_t res = iconv (cd_88591_to_utf8,
  518. &inptr, &inbytesleft,
  519. &outptr, &outbytesleft);
  520. if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD)
  521. result |= 4;
  522. iconv_close (cd_88591_to_utf8);
  523. }
  524. }
  525. #if 0 /* This bug could be worked around by the caller. */
  526. /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */
  527. {
  528. iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
  529. if (cd_88591_to_utf8 != (iconv_t)(-1))
  530. {
  531. static ICONV_CONST char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
  532. char buf[50];
  533. ICONV_CONST char *inptr = input;
  534. size_t inbytesleft = strlen (input);
  535. char *outptr = buf;
  536. size_t outbytesleft = sizeof (buf);
  537. size_t res = iconv (cd_88591_to_utf8,
  538. &inptr, &inbytesleft,
  539. &outptr, &outbytesleft);
  540. if ((int)res > 0)
  541. result |= 8;
  542. iconv_close (cd_88591_to_utf8);
  543. }
  544. }
  545. #endif
  546. /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
  547. provided. */
  548. if (/* Try standardized names. */
  549. iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1)
  550. /* Try IRIX, OSF/1 names. */
  551. && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1)
  552. /* Try AIX names. */
  553. && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1)
  554. /* Try HP-UX names. */
  555. && iconv_open ("utf8", "eucJP") == (iconv_t)(-1))
  556. result |= 16;
  557. return result;
  558. ]])],
  559. [am_cv_func_iconv_works=yes], ,
  560. [case "$host_os" in
  561. aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
  562. *) am_cv_func_iconv_works="guessing yes" ;;
  563. esac])
  564. test "$am_cv_func_iconv_works" = no || break
  565. done
  566. LIBS="$am_save_LIBS"
  567. ])
  568. case "$am_cv_func_iconv_works" in
  569. *no) am_func_iconv=no am_cv_lib_iconv=no ;;
  570. *) am_func_iconv=yes ;;
  571. esac
  572. else
  573. am_func_iconv=no am_cv_lib_iconv=no
  574. fi
  575. if test "$am_func_iconv" = yes; then
  576. AC_DEFINE([HAVE_ICONV], [1],
  577. [Define if you have the iconv() function and it works.])
  578. fi
  579. if test "$am_cv_lib_iconv" = yes; then
  580. AC_MSG_CHECKING([how to link with libiconv])
  581. AC_MSG_RESULT([$LIBICONV])
  582. else
  583. dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV
  584. dnl either.
  585. CPPFLAGS="$am_save_CPPFLAGS"
  586. LIBICONV=
  587. LTLIBICONV=
  588. fi
  589. AC_SUBST([LIBICONV])
  590. AC_SUBST([LTLIBICONV])
  591. ])
  592. dnl Define AM_ICONV using AC_DEFUN_ONCE for Autoconf >= 2.64, in order to
  593. dnl avoid warnings like
  594. dnl "warning: AC_REQUIRE: `AM_ICONV' was expanded before it was required".
  595. dnl This is tricky because of the way 'aclocal' is implemented:
  596. dnl - It requires defining an auxiliary macro whose name ends in AC_DEFUN.
  597. dnl Otherwise aclocal's initial scan pass would miss the macro definition.
  598. dnl - It requires a line break inside the AC_DEFUN_ONCE and AC_DEFUN expansions.
  599. dnl Otherwise aclocal would emit many "Use of uninitialized value $1"
  600. dnl warnings.
  601. m4_define([gl_iconv_AC_DEFUN],
  602. m4_version_prereq([2.64],
  603. [[AC_DEFUN_ONCE(
  604. [$1], [$2])]],
  605. [m4_ifdef([gl_00GNULIB],
  606. [[AC_DEFUN_ONCE(
  607. [$1], [$2])]],
  608. [[AC_DEFUN(
  609. [$1], [$2])]])]))
  610. gl_iconv_AC_DEFUN([AM_ICONV],
  611. [
  612. AM_ICONV_LINK
  613. if test "$am_cv_func_iconv" = yes; then
  614. AC_MSG_CHECKING([for iconv declaration])
  615. AC_CACHE_VAL([am_cv_proto_iconv], [
  616. AC_COMPILE_IFELSE(
  617. [AC_LANG_PROGRAM(
  618. [[
  619. #include <stdlib.h>
  620. #include <iconv.h>
  621. extern
  622. #ifdef __cplusplus
  623. "C"
  624. #endif
  625. #if defined(__STDC__) || defined(_MSC_VER) || defined(__cplusplus)
  626. size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
  627. #else
  628. size_t iconv();
  629. #endif
  630. ]],
  631. [[]])],
  632. [am_cv_proto_iconv_arg1=""],
  633. [am_cv_proto_iconv_arg1="const"])
  634. am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"])
  635. am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
  636. AC_MSG_RESULT([
  637. $am_cv_proto_iconv])
  638. AC_DEFINE_UNQUOTED([ICONV_CONST], [$am_cv_proto_iconv_arg1],
  639. [Define as const if the declaration of iconv() needs const.])
  640. dnl Also substitute ICONV_CONST in the gnulib generated <iconv.h>.
  641. m4_ifdef([gl_ICONV_H_DEFAULTS],
  642. [AC_REQUIRE([gl_ICONV_H_DEFAULTS])
  643. if test -n "$am_cv_proto_iconv_arg1"; then
  644. ICONV_CONST="const"
  645. fi
  646. ])
  647. fi
  648. ])
  649. # intlmacosx.m4 serial 5 (gettext-0.18.2)
  650. dnl Copyright (C) 2004-2014, 2016 Free Software Foundation, Inc.
  651. dnl This file is free software; the Free Software Foundation
  652. dnl gives unlimited permission to copy and/or distribute it,
  653. dnl with or without modifications, as long as this notice is preserved.
  654. dnl
  655. dnl This file can be used in projects which are not available under
  656. dnl the GNU General Public License or the GNU Library General Public
  657. dnl License but which still want to provide support for the GNU gettext
  658. dnl functionality.
  659. dnl Please note that the actual code of the GNU gettext library is covered
  660. dnl by the GNU Library General Public License, and the rest of the GNU
  661. dnl gettext package is covered by the GNU General Public License.
  662. dnl They are *not* in the public domain.
  663. dnl Checks for special options needed on Mac OS X.
  664. dnl Defines INTL_MACOSX_LIBS.
  665. AC_DEFUN([gt_INTL_MACOSX],
  666. [
  667. dnl Check for API introduced in Mac OS X 10.2.
  668. AC_CACHE_CHECK([for CFPreferencesCopyAppValue],
  669. [gt_cv_func_CFPreferencesCopyAppValue],
  670. [gt_save_LIBS="$LIBS"
  671. LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
  672. AC_LINK_IFELSE(
  673. [AC_LANG_PROGRAM(
  674. [[#include <CoreFoundation/CFPreferences.h>]],
  675. [[CFPreferencesCopyAppValue(NULL, NULL)]])],
  676. [gt_cv_func_CFPreferencesCopyAppValue=yes],
  677. [gt_cv_func_CFPreferencesCopyAppValue=no])
  678. LIBS="$gt_save_LIBS"])
  679. if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
  680. AC_DEFINE([HAVE_CFPREFERENCESCOPYAPPVALUE], [1],
  681. [Define to 1 if you have the Mac OS X function CFPreferencesCopyAppValue in the CoreFoundation framework.])
  682. fi
  683. dnl Check for API introduced in Mac OS X 10.3.
  684. AC_CACHE_CHECK([for CFLocaleCopyCurrent], [gt_cv_func_CFLocaleCopyCurrent],
  685. [gt_save_LIBS="$LIBS"
  686. LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
  687. AC_LINK_IFELSE(
  688. [AC_LANG_PROGRAM(
  689. [[#include <CoreFoundation/CFLocale.h>]],
  690. [[CFLocaleCopyCurrent();]])],
  691. [gt_cv_func_CFLocaleCopyCurrent=yes],
  692. [gt_cv_func_CFLocaleCopyCurrent=no])
  693. LIBS="$gt_save_LIBS"])
  694. if test $gt_cv_func_CFLocaleCopyCurrent = yes; then
  695. AC_DEFINE([HAVE_CFLOCALECOPYCURRENT], [1],
  696. [Define to 1 if you have the Mac OS X function CFLocaleCopyCurrent in the CoreFoundation framework.])
  697. fi
  698. INTL_MACOSX_LIBS=
  699. if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then
  700. INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
  701. fi
  702. AC_SUBST([INTL_MACOSX_LIBS])
  703. ])
  704. # lib-ld.m4 serial 6
  705. dnl Copyright (C) 1996-2003, 2009-2016 Free Software Foundation, Inc.
  706. dnl This file is free software; the Free Software Foundation
  707. dnl gives unlimited permission to copy and/or distribute it,
  708. dnl with or without modifications, as long as this notice is preserved.
  709. dnl Subroutines of libtool.m4,
  710. dnl with replacements s/_*LT_PATH/AC_LIB_PROG/ and s/lt_/acl_/ to avoid
  711. dnl collision with libtool.m4.
  712. dnl From libtool-2.4. Sets the variable with_gnu_ld to yes or no.
  713. AC_DEFUN([AC_LIB_PROG_LD_GNU],
  714. [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], [acl_cv_prog_gnu_ld],
  715. [# I'd rather use --version here, but apparently some GNU lds only accept -v.
  716. case `$LD -v 2>&1 </dev/null` in
  717. *GNU* | *'with BFD'*)
  718. acl_cv_prog_gnu_ld=yes
  719. ;;
  720. *)
  721. acl_cv_prog_gnu_ld=no
  722. ;;
  723. esac])
  724. with_gnu_ld=$acl_cv_prog_gnu_ld
  725. ])
  726. dnl From libtool-2.4. Sets the variable LD.
  727. AC_DEFUN([AC_LIB_PROG_LD],
  728. [AC_REQUIRE([AC_PROG_CC])dnl
  729. AC_REQUIRE([AC_CANONICAL_HOST])dnl
  730. AC_ARG_WITH([gnu-ld],
  731. [AS_HELP_STRING([--with-gnu-ld],
  732. [assume the C compiler uses GNU ld [default=no]])],
  733. [test "$withval" = no || with_gnu_ld=yes],
  734. [with_gnu_ld=no])dnl
  735. # Prepare PATH_SEPARATOR.
  736. # The user is always right.
  737. if test "${PATH_SEPARATOR+set}" != set; then
  738. # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
  739. # contains only /bin. Note that ksh looks also at the FPATH variable,
  740. # so we have to set that as well for the test.
  741. PATH_SEPARATOR=:
  742. (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
  743. && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
  744. || PATH_SEPARATOR=';'
  745. }
  746. fi
  747. ac_prog=ld
  748. if test "$GCC" = yes; then
  749. # Check if gcc -print-prog-name=ld gives a path.
  750. AC_MSG_CHECKING([for ld used by $CC])
  751. case $host in
  752. *-*-mingw*)
  753. # gcc leaves a trailing carriage return which upsets mingw
  754. ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
  755. *)
  756. ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
  757. esac
  758. case $ac_prog in
  759. # Accept absolute paths.
  760. [[\\/]]* | ?:[[\\/]]*)
  761. re_direlt='/[[^/]][[^/]]*/\.\./'
  762. # Canonicalize the pathname of ld
  763. ac_prog=`echo "$ac_prog"| sed 's%\\\\%/%g'`
  764. while echo "$ac_prog" | grep "$re_direlt" > /dev/null 2>&1; do
  765. ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
  766. done
  767. test -z "$LD" && LD="$ac_prog"
  768. ;;
  769. "")
  770. # If it fails, then pretend we aren't using GCC.
  771. ac_prog=ld
  772. ;;
  773. *)
  774. # If it is relative, then search for the first ld in PATH.
  775. with_gnu_ld=unknown
  776. ;;
  777. esac
  778. elif test "$with_gnu_ld" = yes; then
  779. AC_MSG_CHECKING([for GNU ld])
  780. else
  781. AC_MSG_CHECKING([for non-GNU ld])
  782. fi
  783. AC_CACHE_VAL([acl_cv_path_LD],
  784. [if test -z "$LD"; then
  785. acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
  786. for ac_dir in $PATH; do
  787. IFS="$acl_save_ifs"
  788. test -z "$ac_dir" && ac_dir=.
  789. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
  790. acl_cv_path_LD="$ac_dir/$ac_prog"
  791. # Check to see if the program is GNU ld. I'd rather use --version,
  792. # but apparently some variants of GNU ld only accept -v.
  793. # Break only if it was the GNU/non-GNU ld that we prefer.
  794. case `"$acl_cv_path_LD" -v 2>&1 </dev/null` in
  795. *GNU* | *'with BFD'*)
  796. test "$with_gnu_ld" != no && break
  797. ;;
  798. *)
  799. test "$with_gnu_ld" != yes && break
  800. ;;
  801. esac
  802. fi
  803. done
  804. IFS="$acl_save_ifs"
  805. else
  806. acl_cv_path_LD="$LD" # Let the user override the test with a path.
  807. fi])
  808. LD="$acl_cv_path_LD"
  809. if test -n "$LD"; then
  810. AC_MSG_RESULT([$LD])
  811. else
  812. AC_MSG_RESULT([no])
  813. fi
  814. test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
  815. AC_LIB_PROG_LD_GNU
  816. ])
  817. # lib-link.m4 serial 26 (gettext-0.18.2)
  818. dnl Copyright (C) 2001-2016 Free Software Foundation, Inc.
  819. dnl This file is free software; the Free Software Foundation
  820. dnl gives unlimited permission to copy and/or distribute it,
  821. dnl with or without modifications, as long as this notice is preserved.
  822. dnl From Bruno Haible.
  823. AC_PREREQ([2.54])
  824. dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
  825. dnl the libraries corresponding to explicit and implicit dependencies.
  826. dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
  827. dnl augments the CPPFLAGS variable.
  828. dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
  829. dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
  830. AC_DEFUN([AC_LIB_LINKFLAGS],
  831. [
  832. AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
  833. AC_REQUIRE([AC_LIB_RPATH])
  834. pushdef([Name],[m4_translit([$1],[./+-], [____])])
  835. pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-],
  836. [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
  837. AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
  838. AC_LIB_LINKFLAGS_BODY([$1], [$2])
  839. ac_cv_lib[]Name[]_libs="$LIB[]NAME"
  840. ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
  841. ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
  842. ac_cv_lib[]Name[]_prefix="$LIB[]NAME[]_PREFIX"
  843. ])
  844. LIB[]NAME="$ac_cv_lib[]Name[]_libs"
  845. LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
  846. INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
  847. LIB[]NAME[]_PREFIX="$ac_cv_lib[]Name[]_prefix"
  848. AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
  849. AC_SUBST([LIB]NAME)
  850. AC_SUBST([LTLIB]NAME)
  851. AC_SUBST([LIB]NAME[_PREFIX])
  852. dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
  853. dnl results of this search when this library appears as a dependency.
  854. HAVE_LIB[]NAME=yes
  855. popdef([NAME])
  856. popdef([Name])
  857. ])
  858. dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode, [missing-message])
  859. dnl searches for libname and the libraries corresponding to explicit and
  860. dnl implicit dependencies, together with the specified include files and
  861. dnl the ability to compile and link the specified testcode. The missing-message
  862. dnl defaults to 'no' and may contain additional hints for the user.
  863. dnl If found, it sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME}
  864. dnl and LTLIB${NAME} variables and augments the CPPFLAGS variable, and
  865. dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
  866. dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
  867. dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
  868. dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
  869. AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
  870. [
  871. AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
  872. AC_REQUIRE([AC_LIB_RPATH])
  873. pushdef([Name],[m4_translit([$1],[./+-], [____])])
  874. pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-],
  875. [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
  876. dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
  877. dnl accordingly.
  878. AC_LIB_LINKFLAGS_BODY([$1], [$2])
  879. dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
  880. dnl because if the user has installed lib[]Name and not disabled its use
  881. dnl via --without-lib[]Name-prefix, he wants to use it.
  882. ac_save_CPPFLAGS="$CPPFLAGS"
  883. AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
  884. AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
  885. ac_save_LIBS="$LIBS"
  886. dnl If $LIB[]NAME contains some -l options, add it to the end of LIBS,
  887. dnl because these -l options might require -L options that are present in
  888. dnl LIBS. -l options benefit only from the -L options listed before it.
  889. dnl Otherwise, add it to the front of LIBS, because it may be a static
  890. dnl library that depends on another static library that is present in LIBS.
  891. dnl Static libraries benefit only from the static libraries listed after
  892. dnl it.
  893. case " $LIB[]NAME" in
  894. *" -l"*) LIBS="$LIBS $LIB[]NAME" ;;
  895. *) LIBS="$LIB[]NAME $LIBS" ;;
  896. esac
  897. AC_LINK_IFELSE(
  898. [AC_LANG_PROGRAM([[$3]], [[$4]])],
  899. [ac_cv_lib[]Name=yes],
  900. [ac_cv_lib[]Name='m4_if([$5], [], [no], [[$5]])'])
  901. LIBS="$ac_save_LIBS"
  902. ])
  903. if test "$ac_cv_lib[]Name" = yes; then
  904. HAVE_LIB[]NAME=yes
  905. AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the lib][$1 library.])
  906. AC_MSG_CHECKING([how to link with lib[]$1])
  907. AC_MSG_RESULT([$LIB[]NAME])
  908. else
  909. HAVE_LIB[]NAME=no
  910. dnl If $LIB[]NAME didn't lead to a usable library, we don't need
  911. dnl $INC[]NAME either.
  912. CPPFLAGS="$ac_save_CPPFLAGS"
  913. LIB[]NAME=
  914. LTLIB[]NAME=
  915. LIB[]NAME[]_PREFIX=
  916. fi
  917. AC_SUBST([HAVE_LIB]NAME)
  918. AC_SUBST([LIB]NAME)
  919. AC_SUBST([LTLIB]NAME)
  920. AC_SUBST([LIB]NAME[_PREFIX])
  921. popdef([NAME])
  922. popdef([Name])
  923. ])
  924. dnl Determine the platform dependent parameters needed to use rpath:
  925. dnl acl_libext,
  926. dnl acl_shlibext,
  927. dnl acl_libname_spec,
  928. dnl acl_library_names_spec,
  929. dnl acl_hardcode_libdir_flag_spec,
  930. dnl acl_hardcode_libdir_separator,
  931. dnl acl_hardcode_direct,
  932. dnl acl_hardcode_minus_L.
  933. AC_DEFUN([AC_LIB_RPATH],
  934. [
  935. dnl Tell automake >= 1.10 to complain if config.rpath is missing.
  936. m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])])
  937. AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS
  938. AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld
  939. AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host
  940. AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
  941. AC_CACHE_CHECK([for shared library run path origin], [acl_cv_rpath], [
  942. CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
  943. ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
  944. . ./conftest.sh
  945. rm -f ./conftest.sh
  946. acl_cv_rpath=done
  947. ])
  948. wl="$acl_cv_wl"
  949. acl_libext="$acl_cv_libext"
  950. acl_shlibext="$acl_cv_shlibext"
  951. acl_libname_spec="$acl_cv_libname_spec"
  952. acl_library_names_spec="$acl_cv_library_names_spec"
  953. acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
  954. acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
  955. acl_hardcode_direct="$acl_cv_hardcode_direct"
  956. acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
  957. dnl Determine whether the user wants rpath handling at all.
  958. AC_ARG_ENABLE([rpath],
  959. [ --disable-rpath do not hardcode runtime library paths],
  960. :, enable_rpath=yes)
  961. ])
  962. dnl AC_LIB_FROMPACKAGE(name, package)
  963. dnl declares that libname comes from the given package. The configure file
  964. dnl will then not have a --with-libname-prefix option but a
  965. dnl --with-package-prefix option. Several libraries can come from the same
  966. dnl package. This declaration must occur before an AC_LIB_LINKFLAGS or similar
  967. dnl macro call that searches for libname.
  968. AC_DEFUN([AC_LIB_FROMPACKAGE],
  969. [
  970. pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-],
  971. [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
  972. define([acl_frompackage_]NAME, [$2])
  973. popdef([NAME])
  974. pushdef([PACK],[$2])
  975. pushdef([PACKUP],[m4_translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-],
  976. [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
  977. define([acl_libsinpackage_]PACKUP,
  978. m4_ifdef([acl_libsinpackage_]PACKUP, [m4_defn([acl_libsinpackage_]PACKUP)[, ]],)[lib$1])
  979. popdef([PACKUP])
  980. popdef([PACK])
  981. ])
  982. dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
  983. dnl the libraries corresponding to explicit and implicit dependencies.
  984. dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
  985. dnl Also, sets the LIB${NAME}_PREFIX variable to nonempty if libname was found
  986. dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
  987. AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
  988. [
  989. AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
  990. pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-],
  991. [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
  992. pushdef([PACK],[m4_ifdef([acl_frompackage_]NAME, [acl_frompackage_]NAME, lib[$1])])
  993. pushdef([PACKUP],[m4_translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-],
  994. [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
  995. pushdef([PACKLIBS],[m4_ifdef([acl_frompackage_]NAME, [acl_libsinpackage_]PACKUP, lib[$1])])
  996. dnl Autoconf >= 2.61 supports dots in --with options.
  997. pushdef([P_A_C_K],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[m4_translit(PACK,[.],[_])],PACK)])
  998. dnl By default, look in $includedir and $libdir.
  999. use_additional=yes
  1000. AC_LIB_WITH_FINAL_PREFIX([
  1001. eval additional_includedir=\"$includedir\"
  1002. eval additional_libdir=\"$libdir\"
  1003. ])
  1004. AC_ARG_WITH(P_A_C_K[-prefix],
  1005. [[ --with-]]P_A_C_K[[-prefix[=DIR] search for ]PACKLIBS[ in DIR/include and DIR/lib
  1006. --without-]]P_A_C_K[[-prefix don't search for ]PACKLIBS[ in includedir and libdir]],
  1007. [
  1008. if test "X$withval" = "Xno"; then
  1009. use_additional=no
  1010. else
  1011. if test "X$withval" = "X"; then
  1012. AC_LIB_WITH_FINAL_PREFIX([
  1013. eval additional_includedir=\"$includedir\"
  1014. eval additional_libdir=\"$libdir\"
  1015. ])
  1016. else
  1017. additional_includedir="$withval/include"
  1018. additional_libdir="$withval/$acl_libdirstem"
  1019. if test "$acl_libdirstem2" != "$acl_libdirstem" \
  1020. && ! test -d "$withval/$acl_libdirstem"; then
  1021. additional_libdir="$withval/$acl_libdirstem2"
  1022. fi
  1023. fi
  1024. fi
  1025. ])
  1026. dnl Search the library and its dependencies in $additional_libdir and
  1027. dnl $LDFLAGS. Using breadth-first-seach.
  1028. LIB[]NAME=
  1029. LTLIB[]NAME=
  1030. INC[]NAME=
  1031. LIB[]NAME[]_PREFIX=
  1032. dnl HAVE_LIB${NAME} is an indicator that LIB${NAME}, LTLIB${NAME} have been
  1033. dnl computed. So it has to be reset here.
  1034. HAVE_LIB[]NAME=
  1035. rpathdirs=
  1036. ltrpathdirs=
  1037. names_already_handled=
  1038. names_next_round='$1 $2'
  1039. while test -n "$names_next_round"; do
  1040. names_this_round="$names_next_round"
  1041. names_next_round=
  1042. for name in $names_this_round; do
  1043. already_handled=
  1044. for n in $names_already_handled; do
  1045. if test "$n" = "$name"; then
  1046. already_handled=yes
  1047. break
  1048. fi
  1049. done
  1050. if test -z "$already_handled"; then
  1051. names_already_handled="$names_already_handled $name"
  1052. dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
  1053. dnl or AC_LIB_HAVE_LINKFLAGS call.
  1054. uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
  1055. eval value=\"\$HAVE_LIB$uppername\"
  1056. if test -n "$value"; then
  1057. if test "$value" = yes; then
  1058. eval value=\"\$LIB$uppername\"
  1059. test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
  1060. eval value=\"\$LTLIB$uppername\"
  1061. test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
  1062. else
  1063. dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
  1064. dnl that this library doesn't exist. So just drop it.
  1065. :
  1066. fi
  1067. else
  1068. dnl Search the library lib$name in $additional_libdir and $LDFLAGS
  1069. dnl and the already constructed $LIBNAME/$LTLIBNAME.
  1070. found_dir=
  1071. found_la=
  1072. found_so=
  1073. found_a=
  1074. eval libname=\"$acl_libname_spec\" # typically: libname=lib$name
  1075. if test -n "$acl_shlibext"; then
  1076. shrext=".$acl_shlibext" # typically: shrext=.so
  1077. else
  1078. shrext=
  1079. fi
  1080. if test $use_additional = yes; then
  1081. dir="$additional_libdir"
  1082. dnl The same code as in the loop below:
  1083. dnl First look for a shared library.
  1084. if test -n "$acl_shlibext"; then
  1085. if test -f "$dir/$libname$shrext"; then
  1086. found_dir="$dir"
  1087. found_so="$dir/$libname$shrext"
  1088. else
  1089. if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
  1090. ver=`(cd "$dir" && \
  1091. for f in "$libname$shrext".*; do echo "$f"; done \
  1092. | sed -e "s,^$libname$shrext\\\\.,," \
  1093. | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
  1094. | sed 1q ) 2>/dev/null`
  1095. if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
  1096. found_dir="$dir"
  1097. found_so="$dir/$libname$shrext.$ver"
  1098. fi
  1099. else
  1100. eval library_names=\"$acl_library_names_spec\"
  1101. for f in $library_names; do
  1102. if test -f "$dir/$f"; then
  1103. found_dir="$dir"
  1104. found_so="$dir/$f"
  1105. break
  1106. fi
  1107. done
  1108. fi
  1109. fi
  1110. fi
  1111. dnl Then look for a static library.
  1112. if test "X$found_dir" = "X"; then
  1113. if test -f "$dir/$libname.$acl_libext"; then
  1114. found_dir="$dir"
  1115. found_a="$dir/$libname.$acl_libext"
  1116. fi
  1117. fi
  1118. if test "X$found_dir" != "X"; then
  1119. if test -f "$dir/$libname.la"; then
  1120. found_la="$dir/$libname.la"
  1121. fi
  1122. fi
  1123. fi
  1124. if test "X$found_dir" = "X"; then
  1125. for x in $LDFLAGS $LTLIB[]NAME; do
  1126. AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
  1127. case "$x" in
  1128. -L*)
  1129. dir=`echo "X$x" | sed -e 's/^X-L//'`
  1130. dnl First look for a shared library.
  1131. if test -n "$acl_shlibext"; then
  1132. if test -f "$dir/$libname$shrext"; then
  1133. found_dir="$dir"
  1134. found_so="$dir/$libname$shrext"
  1135. else
  1136. if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
  1137. ver=`(cd "$dir" && \
  1138. for f in "$libname$shrext".*; do echo "$f"; done \
  1139. | sed -e "s,^$libname$shrext\\\\.,," \
  1140. | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
  1141. | sed 1q ) 2>/dev/null`
  1142. if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
  1143. found_dir="$dir"
  1144. found_so="$dir/$libname$shrext.$ver"
  1145. fi
  1146. else
  1147. eval library_names=\"$acl_library_names_spec\"
  1148. for f in $library_names; do
  1149. if test -f "$dir/$f"; then
  1150. found_dir="$dir"
  1151. found_so="$dir/$f"
  1152. break
  1153. fi
  1154. done
  1155. fi
  1156. fi
  1157. fi
  1158. dnl Then look for a static library.
  1159. if test "X$found_dir" = "X"; then
  1160. if test -f "$dir/$libname.$acl_libext"; then
  1161. found_dir="$dir"
  1162. found_a="$dir/$libname.$acl_libext"
  1163. fi
  1164. fi
  1165. if test "X$found_dir" != "X"; then
  1166. if test -f "$dir/$libname.la"; then
  1167. found_la="$dir/$libname.la"
  1168. fi
  1169. fi
  1170. ;;
  1171. esac
  1172. if test "X$found_dir" != "X"; then
  1173. break
  1174. fi
  1175. done
  1176. fi
  1177. if test "X$found_dir" != "X"; then
  1178. dnl Found the library.
  1179. LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
  1180. if test "X$found_so" != "X"; then
  1181. dnl Linking with a shared library. We attempt to hardcode its
  1182. dnl directory into the executable's runpath, unless it's the
  1183. dnl standard /usr/lib.
  1184. if test "$enable_rpath" = no \
  1185. || test "X$found_dir" = "X/usr/$acl_libdirstem" \
  1186. || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
  1187. dnl No hardcoding is needed.
  1188. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
  1189. else
  1190. dnl Use an explicit option to hardcode DIR into the resulting
  1191. dnl binary.
  1192. dnl Potentially add DIR to ltrpathdirs.
  1193. dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
  1194. haveit=
  1195. for x in $ltrpathdirs; do
  1196. if test "X$x" = "X$found_dir"; then
  1197. haveit=yes
  1198. break
  1199. fi
  1200. done
  1201. if test -z "$haveit"; then
  1202. ltrpathdirs="$ltrpathdirs $found_dir"
  1203. fi
  1204. dnl The hardcoding into $LIBNAME is system dependent.
  1205. if test "$acl_hardcode_direct" = yes; then
  1206. dnl Using DIR/libNAME.so during linking hardcodes DIR into the
  1207. dnl resulting binary.
  1208. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
  1209. else
  1210. if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
  1211. dnl Use an explicit option to hardcode DIR into the resulting
  1212. dnl binary.
  1213. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
  1214. dnl Potentially add DIR to rpathdirs.
  1215. dnl The rpathdirs will be appended to $LIBNAME at the end.
  1216. haveit=
  1217. for x in $rpathdirs; do
  1218. if test "X$x" = "X$found_dir"; then
  1219. haveit=yes
  1220. break
  1221. fi
  1222. done
  1223. if test -z "$haveit"; then
  1224. rpathdirs="$rpathdirs $found_dir"
  1225. fi
  1226. else
  1227. dnl Rely on "-L$found_dir".
  1228. dnl But don't add it if it's already contained in the LDFLAGS
  1229. dnl or the already constructed $LIBNAME
  1230. haveit=
  1231. for x in $LDFLAGS $LIB[]NAME; do
  1232. AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
  1233. if test "X$x" = "X-L$found_dir"; then
  1234. haveit=yes
  1235. break
  1236. fi
  1237. done
  1238. if test -z "$haveit"; then
  1239. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
  1240. fi
  1241. if test "$acl_hardcode_minus_L" != no; then
  1242. dnl FIXME: Not sure whether we should use
  1243. dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
  1244. dnl here.
  1245. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
  1246. else
  1247. dnl We cannot use $acl_hardcode_runpath_var and LD_RUN_PATH
  1248. dnl here, because this doesn't fit in flags passed to the
  1249. dnl compiler. So give up. No hardcoding. This affects only
  1250. dnl very old systems.
  1251. dnl FIXME: Not sure whether we should use
  1252. dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
  1253. dnl here.
  1254. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
  1255. fi
  1256. fi
  1257. fi
  1258. fi
  1259. else
  1260. if test "X$found_a" != "X"; then
  1261. dnl Linking with a static library.
  1262. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
  1263. else
  1264. dnl We shouldn't come here, but anyway it's good to have a
  1265. dnl fallback.
  1266. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
  1267. fi
  1268. fi
  1269. dnl Assume the include files are nearby.
  1270. additional_includedir=
  1271. case "$found_dir" in
  1272. */$acl_libdirstem | */$acl_libdirstem/)
  1273. basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
  1274. if test "$name" = '$1'; then
  1275. LIB[]NAME[]_PREFIX="$basedir"
  1276. fi
  1277. additional_includedir="$basedir/include"
  1278. ;;
  1279. */$acl_libdirstem2 | */$acl_libdirstem2/)
  1280. basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
  1281. if test "$name" = '$1'; then
  1282. LIB[]NAME[]_PREFIX="$basedir"
  1283. fi
  1284. additional_includedir="$basedir/include"
  1285. ;;
  1286. esac
  1287. if test "X$additional_includedir" != "X"; then
  1288. dnl Potentially add $additional_includedir to $INCNAME.
  1289. dnl But don't add it
  1290. dnl 1. if it's the standard /usr/include,
  1291. dnl 2. if it's /usr/local/include and we are using GCC on Linux,
  1292. dnl 3. if it's already present in $CPPFLAGS or the already
  1293. dnl constructed $INCNAME,
  1294. dnl 4. if it doesn't exist as a directory.
  1295. if test "X$additional_includedir" != "X/usr/include"; then
  1296. haveit=
  1297. if test "X$additional_includedir" = "X/usr/local/include"; then
  1298. if test -n "$GCC"; then
  1299. case $host_os in
  1300. linux* | gnu* | k*bsd*-gnu) haveit=yes;;
  1301. esac
  1302. fi
  1303. fi
  1304. if test -z "$haveit"; then
  1305. for x in $CPPFLAGS $INC[]NAME; do
  1306. AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
  1307. if test "X$x" = "X-I$additional_includedir"; then
  1308. haveit=yes
  1309. break
  1310. fi
  1311. done
  1312. if test -z "$haveit"; then
  1313. if test -d "$additional_includedir"; then
  1314. dnl Really add $additional_includedir to $INCNAME.
  1315. INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
  1316. fi
  1317. fi
  1318. fi
  1319. fi
  1320. fi
  1321. dnl Look for dependencies.
  1322. if test -n "$found_la"; then
  1323. dnl Read the .la file. It defines the variables
  1324. dnl dlname, library_names, old_library, dependency_libs, current,
  1325. dnl age, revision, installed, dlopen, dlpreopen, libdir.
  1326. save_libdir="$libdir"
  1327. case "$found_la" in
  1328. */* | *\\*) . "$found_la" ;;
  1329. *) . "./$found_la" ;;
  1330. esac
  1331. libdir="$save_libdir"
  1332. dnl We use only dependency_libs.
  1333. for dep in $dependency_libs; do
  1334. case "$dep" in
  1335. -L*)
  1336. additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
  1337. dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
  1338. dnl But don't add it
  1339. dnl 1. if it's the standard /usr/lib,
  1340. dnl 2. if it's /usr/local/lib and we are using GCC on Linux,
  1341. dnl 3. if it's already present in $LDFLAGS or the already
  1342. dnl constructed $LIBNAME,
  1343. dnl 4. if it doesn't exist as a directory.
  1344. if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
  1345. && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
  1346. haveit=
  1347. if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
  1348. || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
  1349. if test -n "$GCC"; then
  1350. case $host_os in
  1351. linux* | gnu* | k*bsd*-gnu) haveit=yes;;
  1352. esac
  1353. fi
  1354. fi
  1355. if test -z "$haveit"; then
  1356. haveit=
  1357. for x in $LDFLAGS $LIB[]NAME; do
  1358. AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
  1359. if test "X$x" = "X-L$additional_libdir"; then
  1360. haveit=yes
  1361. break
  1362. fi
  1363. done
  1364. if test -z "$haveit"; then
  1365. if test -d "$additional_libdir"; then
  1366. dnl Really add $additional_libdir to $LIBNAME.
  1367. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
  1368. fi
  1369. fi
  1370. haveit=
  1371. for x in $LDFLAGS $LTLIB[]NAME; do
  1372. AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
  1373. if test "X$x" = "X-L$additional_libdir"; then
  1374. haveit=yes
  1375. break
  1376. fi
  1377. done
  1378. if test -z "$haveit"; then
  1379. if test -d "$additional_libdir"; then
  1380. dnl Really add $additional_libdir to $LTLIBNAME.
  1381. LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
  1382. fi
  1383. fi
  1384. fi
  1385. fi
  1386. ;;
  1387. -R*)
  1388. dir=`echo "X$dep" | sed -e 's/^X-R//'`
  1389. if test "$enable_rpath" != no; then
  1390. dnl Potentially add DIR to rpathdirs.
  1391. dnl The rpathdirs will be appended to $LIBNAME at the end.
  1392. haveit=
  1393. for x in $rpathdirs; do
  1394. if test "X$x" = "X$dir"; then
  1395. haveit=yes
  1396. break
  1397. fi
  1398. done
  1399. if test -z "$haveit"; then
  1400. rpathdirs="$rpathdirs $dir"
  1401. fi
  1402. dnl Potentially add DIR to ltrpathdirs.
  1403. dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
  1404. haveit=
  1405. for x in $ltrpathdirs; do
  1406. if test "X$x" = "X$dir"; then
  1407. haveit=yes
  1408. break
  1409. fi
  1410. done
  1411. if test -z "$haveit"; then
  1412. ltrpathdirs="$ltrpathdirs $dir"
  1413. fi
  1414. fi
  1415. ;;
  1416. -l*)
  1417. dnl Handle this in the next round.
  1418. names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
  1419. ;;
  1420. *.la)
  1421. dnl Handle this in the next round. Throw away the .la's
  1422. dnl directory; it is already contained in a preceding -L
  1423. dnl option.
  1424. names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
  1425. ;;
  1426. *)
  1427. dnl Most likely an immediate library name.
  1428. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
  1429. LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
  1430. ;;
  1431. esac
  1432. done
  1433. fi
  1434. else
  1435. dnl Didn't find the library; assume it is in the system directories
  1436. dnl known to the linker and runtime loader. (All the system
  1437. dnl directories known to the linker should also be known to the
  1438. dnl runtime loader, otherwise the system is severely misconfigured.)
  1439. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
  1440. LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
  1441. fi
  1442. fi
  1443. fi
  1444. done
  1445. done
  1446. if test "X$rpathdirs" != "X"; then
  1447. if test -n "$acl_hardcode_libdir_separator"; then
  1448. dnl Weird platform: only the last -rpath option counts, the user must
  1449. dnl pass all path elements in one option. We can arrange that for a
  1450. dnl single library, but not when more than one $LIBNAMEs are used.
  1451. alldirs=
  1452. for found_dir in $rpathdirs; do
  1453. alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
  1454. done
  1455. dnl Note: acl_hardcode_libdir_flag_spec uses $libdir and $wl.
  1456. acl_save_libdir="$libdir"
  1457. libdir="$alldirs"
  1458. eval flag=\"$acl_hardcode_libdir_flag_spec\"
  1459. libdir="$acl_save_libdir"
  1460. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
  1461. else
  1462. dnl The -rpath options are cumulative.
  1463. for found_dir in $rpathdirs; do
  1464. acl_save_libdir="$libdir"
  1465. libdir="$found_dir"
  1466. eval flag=\"$acl_hardcode_libdir_flag_spec\"
  1467. libdir="$acl_save_libdir"
  1468. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
  1469. done
  1470. fi
  1471. fi
  1472. if test "X$ltrpathdirs" != "X"; then
  1473. dnl When using libtool, the option that works for both libraries and
  1474. dnl executables is -R. The -R options are cumulative.
  1475. for found_dir in $ltrpathdirs; do
  1476. LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
  1477. done
  1478. fi
  1479. popdef([P_A_C_K])
  1480. popdef([PACKLIBS])
  1481. popdef([PACKUP])
  1482. popdef([PACK])
  1483. popdef([NAME])
  1484. ])
  1485. dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
  1486. dnl unless already present in VAR.
  1487. dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
  1488. dnl contains two or three consecutive elements that belong together.
  1489. AC_DEFUN([AC_LIB_APPENDTOVAR],
  1490. [
  1491. for element in [$2]; do
  1492. haveit=
  1493. for x in $[$1]; do
  1494. AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
  1495. if test "X$x" = "X$element"; then
  1496. haveit=yes
  1497. break
  1498. fi
  1499. done
  1500. if test -z "$haveit"; then
  1501. [$1]="${[$1]}${[$1]:+ }$element"
  1502. fi
  1503. done
  1504. ])
  1505. dnl For those cases where a variable contains several -L and -l options
  1506. dnl referring to unknown libraries and directories, this macro determines the
  1507. dnl necessary additional linker options for the runtime path.
  1508. dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL])
  1509. dnl sets LDADDVAR to linker options needed together with LIBSVALUE.
  1510. dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed,
  1511. dnl otherwise linking without libtool is assumed.
  1512. AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS],
  1513. [
  1514. AC_REQUIRE([AC_LIB_RPATH])
  1515. AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
  1516. $1=
  1517. if test "$enable_rpath" != no; then
  1518. if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
  1519. dnl Use an explicit option to hardcode directories into the resulting
  1520. dnl binary.
  1521. rpathdirs=
  1522. next=
  1523. for opt in $2; do
  1524. if test -n "$next"; then
  1525. dir="$next"
  1526. dnl No need to hardcode the standard /usr/lib.
  1527. if test "X$dir" != "X/usr/$acl_libdirstem" \
  1528. && test "X$dir" != "X/usr/$acl_libdirstem2"; then
  1529. rpathdirs="$rpathdirs $dir"
  1530. fi
  1531. next=
  1532. else
  1533. case $opt in
  1534. -L) next=yes ;;
  1535. -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'`
  1536. dnl No need to hardcode the standard /usr/lib.
  1537. if test "X$dir" != "X/usr/$acl_libdirstem" \
  1538. && test "X$dir" != "X/usr/$acl_libdirstem2"; then
  1539. rpathdirs="$rpathdirs $dir"
  1540. fi
  1541. next= ;;
  1542. *) next= ;;
  1543. esac
  1544. fi
  1545. done
  1546. if test "X$rpathdirs" != "X"; then
  1547. if test -n ""$3""; then
  1548. dnl libtool is used for linking. Use -R options.
  1549. for dir in $rpathdirs; do
  1550. $1="${$1}${$1:+ }-R$dir"
  1551. done
  1552. else
  1553. dnl The linker is used for linking directly.
  1554. if test -n "$acl_hardcode_libdir_separator"; then
  1555. dnl Weird platform: only the last -rpath option counts, the user
  1556. dnl must pass all path elements in one option.
  1557. alldirs=
  1558. for dir in $rpathdirs; do
  1559. alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$dir"
  1560. done
  1561. acl_save_libdir="$libdir"
  1562. libdir="$alldirs"
  1563. eval flag=\"$acl_hardcode_libdir_flag_spec\"
  1564. libdir="$acl_save_libdir"
  1565. $1="$flag"
  1566. else
  1567. dnl The -rpath options are cumulative.
  1568. for dir in $rpathdirs; do
  1569. acl_save_libdir="$libdir"
  1570. libdir="$dir"
  1571. eval flag=\"$acl_hardcode_libdir_flag_spec\"
  1572. libdir="$acl_save_libdir"
  1573. $1="${$1}${$1:+ }$flag"
  1574. done
  1575. fi
  1576. fi
  1577. fi
  1578. fi
  1579. fi
  1580. AC_SUBST([$1])
  1581. ])
  1582. # lib-prefix.m4 serial 7 (gettext-0.18)
  1583. dnl Copyright (C) 2001-2005, 2008-2016 Free Software Foundation, Inc.
  1584. dnl This file is free software; the Free Software Foundation
  1585. dnl gives unlimited permission to copy and/or distribute it,
  1586. dnl with or without modifications, as long as this notice is preserved.
  1587. dnl From Bruno Haible.
  1588. dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
  1589. dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
  1590. dnl require excessive bracketing.
  1591. ifdef([AC_HELP_STRING],
  1592. [AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
  1593. [AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
  1594. dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
  1595. dnl to access previously installed libraries. The basic assumption is that
  1596. dnl a user will want packages to use other packages he previously installed
  1597. dnl with the same --prefix option.
  1598. dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
  1599. dnl libraries, but is otherwise very convenient.
  1600. AC_DEFUN([AC_LIB_PREFIX],
  1601. [
  1602. AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
  1603. AC_REQUIRE([AC_PROG_CC])
  1604. AC_REQUIRE([AC_CANONICAL_HOST])
  1605. AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
  1606. AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
  1607. dnl By default, look in $includedir and $libdir.
  1608. use_additional=yes
  1609. AC_LIB_WITH_FINAL_PREFIX([
  1610. eval additional_includedir=\"$includedir\"
  1611. eval additional_libdir=\"$libdir\"
  1612. ])
  1613. AC_LIB_ARG_WITH([lib-prefix],
  1614. [ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
  1615. --without-lib-prefix don't search for libraries in includedir and libdir],
  1616. [
  1617. if test "X$withval" = "Xno"; then
  1618. use_additional=no
  1619. else
  1620. if test "X$withval" = "X"; then
  1621. AC_LIB_WITH_FINAL_PREFIX([
  1622. eval additional_includedir=\"$includedir\"
  1623. eval additional_libdir=\"$libdir\"
  1624. ])
  1625. else
  1626. additional_includedir="$withval/include"
  1627. additional_libdir="$withval/$acl_libdirstem"
  1628. fi
  1629. fi
  1630. ])
  1631. if test $use_additional = yes; then
  1632. dnl Potentially add $additional_includedir to $CPPFLAGS.
  1633. dnl But don't add it
  1634. dnl 1. if it's the standard /usr/include,
  1635. dnl 2. if it's already present in $CPPFLAGS,
  1636. dnl 3. if it's /usr/local/include and we are using GCC on Linux,
  1637. dnl 4. if it doesn't exist as a directory.
  1638. if test "X$additional_includedir" != "X/usr/include"; then
  1639. haveit=
  1640. for x in $CPPFLAGS; do
  1641. AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
  1642. if test "X$x" = "X-I$additional_includedir"; then
  1643. haveit=yes
  1644. break
  1645. fi
  1646. done
  1647. if test -z "$haveit"; then
  1648. if test "X$additional_includedir" = "X/usr/local/include"; then
  1649. if test -n "$GCC"; then
  1650. case $host_os in
  1651. linux* | gnu* | k*bsd*-gnu) haveit=yes;;
  1652. esac
  1653. fi
  1654. fi
  1655. if test -z "$haveit"; then
  1656. if test -d "$additional_includedir"; then
  1657. dnl Really add $additional_includedir to $CPPFLAGS.
  1658. CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
  1659. fi
  1660. fi
  1661. fi
  1662. fi
  1663. dnl Potentially add $additional_libdir to $LDFLAGS.
  1664. dnl But don't add it
  1665. dnl 1. if it's the standard /usr/lib,
  1666. dnl 2. if it's already present in $LDFLAGS,
  1667. dnl 3. if it's /usr/local/lib and we are using GCC on Linux,
  1668. dnl 4. if it doesn't exist as a directory.
  1669. if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then
  1670. haveit=
  1671. for x in $LDFLAGS; do
  1672. AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
  1673. if test "X$x" = "X-L$additional_libdir"; then
  1674. haveit=yes
  1675. break
  1676. fi
  1677. done
  1678. if test -z "$haveit"; then
  1679. if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then
  1680. if test -n "$GCC"; then
  1681. case $host_os in
  1682. linux*) haveit=yes;;
  1683. esac
  1684. fi
  1685. fi
  1686. if test -z "$haveit"; then
  1687. if test -d "$additional_libdir"; then
  1688. dnl Really add $additional_libdir to $LDFLAGS.
  1689. LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
  1690. fi
  1691. fi
  1692. fi
  1693. fi
  1694. fi
  1695. ])
  1696. dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
  1697. dnl acl_final_exec_prefix, containing the values to which $prefix and
  1698. dnl $exec_prefix will expand at the end of the configure script.
  1699. AC_DEFUN([AC_LIB_PREPARE_PREFIX],
  1700. [
  1701. dnl Unfortunately, prefix and exec_prefix get only finally determined
  1702. dnl at the end of configure.
  1703. if test "X$prefix" = "XNONE"; then
  1704. acl_final_prefix="$ac_default_prefix"
  1705. else
  1706. acl_final_prefix="$prefix"
  1707. fi
  1708. if test "X$exec_prefix" = "XNONE"; then
  1709. acl_final_exec_prefix='${prefix}'
  1710. else
  1711. acl_final_exec_prefix="$exec_prefix"
  1712. fi
  1713. acl_save_prefix="$prefix"
  1714. prefix="$acl_final_prefix"
  1715. eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
  1716. prefix="$acl_save_prefix"
  1717. ])
  1718. dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
  1719. dnl variables prefix and exec_prefix bound to the values they will have
  1720. dnl at the end of the configure script.
  1721. AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
  1722. [
  1723. acl_save_prefix="$prefix"
  1724. prefix="$acl_final_prefix"
  1725. acl_save_exec_prefix="$exec_prefix"
  1726. exec_prefix="$acl_final_exec_prefix"
  1727. $1
  1728. exec_prefix="$acl_save_exec_prefix"
  1729. prefix="$acl_save_prefix"
  1730. ])
  1731. dnl AC_LIB_PREPARE_MULTILIB creates
  1732. dnl - a variable acl_libdirstem, containing the basename of the libdir, either
  1733. dnl "lib" or "lib64" or "lib/64",
  1734. dnl - a variable acl_libdirstem2, as a secondary possible value for
  1735. dnl acl_libdirstem, either the same as acl_libdirstem or "lib/sparcv9" or
  1736. dnl "lib/amd64".
  1737. AC_DEFUN([AC_LIB_PREPARE_MULTILIB],
  1738. [
  1739. dnl There is no formal standard regarding lib and lib64.
  1740. dnl On glibc systems, the current practice is that on a system supporting
  1741. dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under
  1742. dnl $prefix/lib64 and 32-bit libraries go under $prefix/lib. We determine
  1743. dnl the compiler's default mode by looking at the compiler's library search
  1744. dnl path. If at least one of its elements ends in /lib64 or points to a
  1745. dnl directory whose absolute pathname ends in /lib64, we assume a 64-bit ABI.
  1746. dnl Otherwise we use the default, namely "lib".
  1747. dnl On Solaris systems, the current practice is that on a system supporting
  1748. dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under
  1749. dnl $prefix/lib/64 (which is a symlink to either $prefix/lib/sparcv9 or
  1750. dnl $prefix/lib/amd64) and 32-bit libraries go under $prefix/lib.
  1751. AC_REQUIRE([AC_CANONICAL_HOST])
  1752. acl_libdirstem=lib
  1753. acl_libdirstem2=
  1754. case "$host_os" in
  1755. solaris*)
  1756. dnl See Solaris 10 Software Developer Collection > Solaris 64-bit Developer's Guide > The Development Environment
  1757. dnl <http://docs.sun.com/app/docs/doc/816-5138/dev-env?l=en&a=view>.
  1758. dnl "Portable Makefiles should refer to any library directories using the 64 symbolic link."
  1759. dnl But we want to recognize the sparcv9 or amd64 subdirectory also if the
  1760. dnl symlink is missing, so we set acl_libdirstem2 too.
  1761. AC_CACHE_CHECK([for 64-bit host], [gl_cv_solaris_64bit],
  1762. [AC_EGREP_CPP([sixtyfour bits], [
  1763. #ifdef _LP64
  1764. sixtyfour bits
  1765. #endif
  1766. ], [gl_cv_solaris_64bit=yes], [gl_cv_solaris_64bit=no])
  1767. ])
  1768. if test $gl_cv_solaris_64bit = yes; then
  1769. acl_libdirstem=lib/64
  1770. case "$host_cpu" in
  1771. sparc*) acl_libdirstem2=lib/sparcv9 ;;
  1772. i*86 | x86_64) acl_libdirstem2=lib/amd64 ;;
  1773. esac
  1774. fi
  1775. ;;
  1776. *)
  1777. searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
  1778. if test -n "$searchpath"; then
  1779. acl_save_IFS="${IFS= }"; IFS=":"
  1780. for searchdir in $searchpath; do
  1781. if test -d "$searchdir"; then
  1782. case "$searchdir" in
  1783. */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
  1784. */../ | */.. )
  1785. # Better ignore directories of this form. They are misleading.
  1786. ;;
  1787. *) searchdir=`cd "$searchdir" && pwd`
  1788. case "$searchdir" in
  1789. */lib64 ) acl_libdirstem=lib64 ;;
  1790. esac ;;
  1791. esac
  1792. fi
  1793. done
  1794. IFS="$acl_save_IFS"
  1795. fi
  1796. ;;
  1797. esac
  1798. test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem"
  1799. ])
  1800. # nls.m4 serial 5 (gettext-0.18)
  1801. dnl Copyright (C) 1995-2003, 2005-2006, 2008-2014, 2016 Free Software
  1802. dnl Foundation, Inc.
  1803. dnl This file is free software; the Free Software Foundation
  1804. dnl gives unlimited permission to copy and/or distribute it,
  1805. dnl with or without modifications, as long as this notice is preserved.
  1806. dnl
  1807. dnl This file can be used in projects which are not available under
  1808. dnl the GNU General Public License or the GNU Library General Public
  1809. dnl License but which still want to provide support for the GNU gettext
  1810. dnl functionality.
  1811. dnl Please note that the actual code of the GNU gettext library is covered
  1812. dnl by the GNU Library General Public License, and the rest of the GNU
  1813. dnl gettext package is covered by the GNU General Public License.
  1814. dnl They are *not* in the public domain.
  1815. dnl Authors:
  1816. dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
  1817. dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
  1818. AC_PREREQ([2.50])
  1819. AC_DEFUN([AM_NLS],
  1820. [
  1821. AC_MSG_CHECKING([whether NLS is requested])
  1822. dnl Default is enabled NLS
  1823. AC_ARG_ENABLE([nls],
  1824. [ --disable-nls do not use Native Language Support],
  1825. USE_NLS=$enableval, USE_NLS=yes)
  1826. AC_MSG_RESULT([$USE_NLS])
  1827. AC_SUBST([USE_NLS])
  1828. ])
  1829. # po.m4 serial 24 (gettext-0.19)
  1830. dnl Copyright (C) 1995-2014, 2016 Free Software Foundation, Inc.
  1831. dnl This file is free software; the Free Software Foundation
  1832. dnl gives unlimited permission to copy and/or distribute it,
  1833. dnl with or without modifications, as long as this notice is preserved.
  1834. dnl
  1835. dnl This file can be used in projects which are not available under
  1836. dnl the GNU General Public License or the GNU Library General Public
  1837. dnl License but which still want to provide support for the GNU gettext
  1838. dnl functionality.
  1839. dnl Please note that the actual code of the GNU gettext library is covered
  1840. dnl by the GNU Library General Public License, and the rest of the GNU
  1841. dnl gettext package is covered by the GNU General Public License.
  1842. dnl They are *not* in the public domain.
  1843. dnl Authors:
  1844. dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
  1845. dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
  1846. AC_PREREQ([2.60])
  1847. dnl Checks for all prerequisites of the po subdirectory.
  1848. AC_DEFUN([AM_PO_SUBDIRS],
  1849. [
  1850. AC_REQUIRE([AC_PROG_MAKE_SET])dnl
  1851. AC_REQUIRE([AC_PROG_INSTALL])dnl
  1852. AC_REQUIRE([AC_PROG_MKDIR_P])dnl
  1853. AC_REQUIRE([AC_PROG_SED])dnl
  1854. AC_REQUIRE([AM_NLS])dnl
  1855. dnl Release version of the gettext macros. This is used to ensure that
  1856. dnl the gettext macros and po/Makefile.in.in are in sync.
  1857. AC_SUBST([GETTEXT_MACRO_VERSION], [0.19])
  1858. dnl Perform the following tests also if --disable-nls has been given,
  1859. dnl because they are needed for "make dist" to work.
  1860. dnl Search for GNU msgfmt in the PATH.
  1861. dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions.
  1862. dnl The second test excludes FreeBSD msgfmt.
  1863. AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
  1864. [$ac_dir/$ac_word --statistics /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 &&
  1865. (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
  1866. :)
  1867. AC_PATH_PROG([GMSGFMT], [gmsgfmt], [$MSGFMT])
  1868. dnl Test whether it is GNU msgfmt >= 0.15.
  1869. changequote(,)dnl
  1870. case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
  1871. '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;;
  1872. *) MSGFMT_015=$MSGFMT ;;
  1873. esac
  1874. changequote([,])dnl
  1875. AC_SUBST([MSGFMT_015])
  1876. changequote(,)dnl
  1877. case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
  1878. '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;;
  1879. *) GMSGFMT_015=$GMSGFMT ;;
  1880. esac
  1881. changequote([,])dnl
  1882. AC_SUBST([GMSGFMT_015])
  1883. dnl Search for GNU xgettext 0.12 or newer in the PATH.
  1884. dnl The first test excludes Solaris xgettext and early GNU xgettext versions.
  1885. dnl The second test excludes FreeBSD xgettext.
  1886. AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
  1887. [$ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 &&
  1888. (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
  1889. :)
  1890. dnl Remove leftover from FreeBSD xgettext call.
  1891. rm -f messages.po
  1892. dnl Test whether it is GNU xgettext >= 0.15.
  1893. changequote(,)dnl
  1894. case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
  1895. '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;;
  1896. *) XGETTEXT_015=$XGETTEXT ;;
  1897. esac
  1898. changequote([,])dnl
  1899. AC_SUBST([XGETTEXT_015])
  1900. dnl Search for GNU msgmerge 0.11 or newer in the PATH.
  1901. AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge,
  1902. [$ac_dir/$ac_word --update -q /dev/null /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1], :)
  1903. dnl Installation directories.
  1904. dnl Autoconf >= 2.60 defines localedir. For older versions of autoconf, we
  1905. dnl have to define it here, so that it can be used in po/Makefile.
  1906. test -n "$localedir" || localedir='${datadir}/locale'
  1907. AC_SUBST([localedir])
  1908. dnl Support for AM_XGETTEXT_OPTION.
  1909. test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS=
  1910. AC_SUBST([XGETTEXT_EXTRA_OPTIONS])
  1911. AC_CONFIG_COMMANDS([po-directories], [[
  1912. for ac_file in $CONFIG_FILES; do
  1913. # Support "outfile[:infile[:infile...]]"
  1914. case "$ac_file" in
  1915. *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  1916. esac
  1917. # PO directories have a Makefile.in generated from Makefile.in.in.
  1918. case "$ac_file" in */Makefile.in)
  1919. # Adjust a relative srcdir.
  1920. ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
  1921. ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'`
  1922. ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
  1923. # In autoconf-2.13 it is called $ac_given_srcdir.
  1924. # In autoconf-2.50 it is called $srcdir.
  1925. test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
  1926. case "$ac_given_srcdir" in
  1927. .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
  1928. /*) top_srcdir="$ac_given_srcdir" ;;
  1929. *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
  1930. esac
  1931. # Treat a directory as a PO directory if and only if it has a
  1932. # POTFILES.in file. This allows packages to have multiple PO
  1933. # directories under different names or in different locations.
  1934. if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
  1935. rm -f "$ac_dir/POTFILES"
  1936. test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
  1937. gt_tab=`printf '\t'`
  1938. cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ${gt_tab}]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
  1939. POMAKEFILEDEPS="POTFILES.in"
  1940. # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend
  1941. # on $ac_dir but don't depend on user-specified configuration
  1942. # parameters.
  1943. if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
  1944. # The LINGUAS file contains the set of available languages.
  1945. if test -n "$OBSOLETE_ALL_LINGUAS"; then
  1946. test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
  1947. fi
  1948. ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
  1949. # Hide the ALL_LINGUAS assignment from automake < 1.5.
  1950. eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
  1951. POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
  1952. else
  1953. # The set of available languages was given in configure.in.
  1954. # Hide the ALL_LINGUAS assignment from automake < 1.5.
  1955. eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
  1956. fi
  1957. # Compute POFILES
  1958. # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
  1959. # Compute UPDATEPOFILES
  1960. # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
  1961. # Compute DUMMYPOFILES
  1962. # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
  1963. # Compute GMOFILES
  1964. # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
  1965. case "$ac_given_srcdir" in
  1966. .) srcdirpre= ;;
  1967. *) srcdirpre='$(srcdir)/' ;;
  1968. esac
  1969. POFILES=
  1970. UPDATEPOFILES=
  1971. DUMMYPOFILES=
  1972. GMOFILES=
  1973. for lang in $ALL_LINGUAS; do
  1974. POFILES="$POFILES $srcdirpre$lang.po"
  1975. UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
  1976. DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
  1977. GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
  1978. done
  1979. # CATALOGS depends on both $ac_dir and the user's LINGUAS
  1980. # environment variable.
  1981. INST_LINGUAS=
  1982. if test -n "$ALL_LINGUAS"; then
  1983. for presentlang in $ALL_LINGUAS; do
  1984. useit=no
  1985. if test "%UNSET%" != "$LINGUAS"; then
  1986. desiredlanguages="$LINGUAS"
  1987. else
  1988. desiredlanguages="$ALL_LINGUAS"
  1989. fi
  1990. for desiredlang in $desiredlanguages; do
  1991. # Use the presentlang catalog if desiredlang is
  1992. # a. equal to presentlang, or
  1993. # b. a variant of presentlang (because in this case,
  1994. # presentlang can be used as a fallback for messages
  1995. # which are not translated in the desiredlang catalog).
  1996. case "$desiredlang" in
  1997. "$presentlang"*) useit=yes;;
  1998. esac
  1999. done
  2000. if test $useit = yes; then
  2001. INST_LINGUAS="$INST_LINGUAS $presentlang"
  2002. fi
  2003. done
  2004. fi
  2005. CATALOGS=
  2006. if test -n "$INST_LINGUAS"; then
  2007. for lang in $INST_LINGUAS; do
  2008. CATALOGS="$CATALOGS $lang.gmo"
  2009. done
  2010. fi
  2011. test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
  2012. sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
  2013. for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
  2014. if test -f "$f"; then
  2015. case "$f" in
  2016. *.orig | *.bak | *~) ;;
  2017. *) cat "$f" >> "$ac_dir/Makefile" ;;
  2018. esac
  2019. fi
  2020. done
  2021. fi
  2022. ;;
  2023. esac
  2024. done]],
  2025. [# Capture the value of obsolete ALL_LINGUAS because we need it to compute
  2026. # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it
  2027. # from automake < 1.5.
  2028. eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
  2029. # Capture the value of LINGUAS because we need it to compute CATALOGS.
  2030. LINGUAS="${LINGUAS-%UNSET%}"
  2031. ])
  2032. ])
  2033. dnl Postprocesses a Makefile in a directory containing PO files.
  2034. AC_DEFUN([AM_POSTPROCESS_PO_MAKEFILE],
  2035. [
  2036. # When this code is run, in config.status, two variables have already been
  2037. # set:
  2038. # - OBSOLETE_ALL_LINGUAS is the value of LINGUAS set in configure.in,
  2039. # - LINGUAS is the value of the environment variable LINGUAS at configure
  2040. # time.
  2041. changequote(,)dnl
  2042. # Adjust a relative srcdir.
  2043. ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
  2044. ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'`
  2045. ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
  2046. # In autoconf-2.13 it is called $ac_given_srcdir.
  2047. # In autoconf-2.50 it is called $srcdir.
  2048. test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
  2049. case "$ac_given_srcdir" in
  2050. .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
  2051. /*) top_srcdir="$ac_given_srcdir" ;;
  2052. *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
  2053. esac
  2054. # Find a way to echo strings without interpreting backslash.
  2055. if test "X`(echo '\t') 2>/dev/null`" = 'X\t'; then
  2056. gt_echo='echo'
  2057. else
  2058. if test "X`(printf '%s\n' '\t') 2>/dev/null`" = 'X\t'; then
  2059. gt_echo='printf %s\n'
  2060. else
  2061. echo_func () {
  2062. cat <<EOT
  2063. $*
  2064. EOT
  2065. }
  2066. gt_echo='echo_func'
  2067. fi
  2068. fi
  2069. # A sed script that extracts the value of VARIABLE from a Makefile.
  2070. tab=`printf '\t'`
  2071. sed_x_variable='
  2072. # Test if the hold space is empty.
  2073. x
  2074. s/P/P/
  2075. x
  2076. ta
  2077. # Yes it was empty. Look if we have the expected variable definition.
  2078. /^['"${tab}"' ]*VARIABLE['"${tab}"' ]*=/{
  2079. # Seen the first line of the variable definition.
  2080. s/^['"${tab}"' ]*VARIABLE['"${tab}"' ]*=//
  2081. ba
  2082. }
  2083. bd
  2084. :a
  2085. # Here we are processing a line from the variable definition.
  2086. # Remove comment, more precisely replace it with a space.
  2087. s/#.*$/ /
  2088. # See if the line ends in a backslash.
  2089. tb
  2090. :b
  2091. s/\\$//
  2092. # Print the line, without the trailing backslash.
  2093. p
  2094. tc
  2095. # There was no trailing backslash. The end of the variable definition is
  2096. # reached. Clear the hold space.
  2097. s/^.*$//
  2098. x
  2099. bd
  2100. :c
  2101. # A trailing backslash means that the variable definition continues in the
  2102. # next line. Put a nonempty string into the hold space to indicate this.
  2103. s/^.*$/P/
  2104. x
  2105. :d
  2106. '
  2107. changequote([,])dnl
  2108. # Set POTFILES to the value of the Makefile variable POTFILES.
  2109. sed_x_POTFILES=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 's/VARIABLE/POTFILES/g'`
  2110. POTFILES=`sed -n -e "$sed_x_POTFILES" < "$ac_file"`
  2111. # Compute POTFILES_DEPS as
  2112. # $(foreach file, $(POTFILES), $(top_srcdir)/$(file))
  2113. POTFILES_DEPS=
  2114. for file in $POTFILES; do
  2115. POTFILES_DEPS="$POTFILES_DEPS "'$(top_srcdir)/'"$file"
  2116. done
  2117. POMAKEFILEDEPS=""
  2118. if test -n "$OBSOLETE_ALL_LINGUAS"; then
  2119. test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
  2120. fi
  2121. if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
  2122. # The LINGUAS file contains the set of available languages.
  2123. ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
  2124. POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
  2125. else
  2126. # Set ALL_LINGUAS to the value of the Makefile variable LINGUAS.
  2127. sed_x_LINGUAS=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 's/VARIABLE/LINGUAS/g'`
  2128. ALL_LINGUAS_=`sed -n -e "$sed_x_LINGUAS" < "$ac_file"`
  2129. fi
  2130. # Hide the ALL_LINGUAS assignment from automake < 1.5.
  2131. eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
  2132. # Compute POFILES
  2133. # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
  2134. # Compute UPDATEPOFILES
  2135. # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
  2136. # Compute DUMMYPOFILES
  2137. # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
  2138. # Compute GMOFILES
  2139. # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
  2140. # Compute PROPERTIESFILES
  2141. # as $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).properties)
  2142. # Compute CLASSFILES
  2143. # as $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).class)
  2144. # Compute QMFILES
  2145. # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).qm)
  2146. # Compute MSGFILES
  2147. # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang)).msg)
  2148. # Compute RESOURCESDLLFILES
  2149. # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang))/$(DOMAIN).resources.dll)
  2150. case "$ac_given_srcdir" in
  2151. .) srcdirpre= ;;
  2152. *) srcdirpre='$(srcdir)/' ;;
  2153. esac
  2154. POFILES=
  2155. UPDATEPOFILES=
  2156. DUMMYPOFILES=
  2157. GMOFILES=
  2158. PROPERTIESFILES=
  2159. CLASSFILES=
  2160. QMFILES=
  2161. MSGFILES=
  2162. RESOURCESDLLFILES=
  2163. for lang in $ALL_LINGUAS; do
  2164. POFILES="$POFILES $srcdirpre$lang.po"
  2165. UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
  2166. DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
  2167. GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
  2168. PROPERTIESFILES="$PROPERTIESFILES \$(top_srcdir)/\$(DOMAIN)_$lang.properties"
  2169. CLASSFILES="$CLASSFILES \$(top_srcdir)/\$(DOMAIN)_$lang.class"
  2170. QMFILES="$QMFILES $srcdirpre$lang.qm"
  2171. frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
  2172. MSGFILES="$MSGFILES $srcdirpre$frobbedlang.msg"
  2173. frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'`
  2174. RESOURCESDLLFILES="$RESOURCESDLLFILES $srcdirpre$frobbedlang/\$(DOMAIN).resources.dll"
  2175. done
  2176. # CATALOGS depends on both $ac_dir and the user's LINGUAS
  2177. # environment variable.
  2178. INST_LINGUAS=
  2179. if test -n "$ALL_LINGUAS"; then
  2180. for presentlang in $ALL_LINGUAS; do
  2181. useit=no
  2182. if test "%UNSET%" != "$LINGUAS"; then
  2183. desiredlanguages="$LINGUAS"
  2184. else
  2185. desiredlanguages="$ALL_LINGUAS"
  2186. fi
  2187. for desiredlang in $desiredlanguages; do
  2188. # Use the presentlang catalog if desiredlang is
  2189. # a. equal to presentlang, or
  2190. # b. a variant of presentlang (because in this case,
  2191. # presentlang can be used as a fallback for messages
  2192. # which are not translated in the desiredlang catalog).
  2193. case "$desiredlang" in
  2194. "$presentlang"*) useit=yes;;
  2195. esac
  2196. done
  2197. if test $useit = yes; then
  2198. INST_LINGUAS="$INST_LINGUAS $presentlang"
  2199. fi
  2200. done
  2201. fi
  2202. CATALOGS=
  2203. JAVACATALOGS=
  2204. QTCATALOGS=
  2205. TCLCATALOGS=
  2206. CSHARPCATALOGS=
  2207. if test -n "$INST_LINGUAS"; then
  2208. for lang in $INST_LINGUAS; do
  2209. CATALOGS="$CATALOGS $lang.gmo"
  2210. JAVACATALOGS="$JAVACATALOGS \$(DOMAIN)_$lang.properties"
  2211. QTCATALOGS="$QTCATALOGS $lang.qm"
  2212. frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
  2213. TCLCATALOGS="$TCLCATALOGS $frobbedlang.msg"
  2214. frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'`
  2215. CSHARPCATALOGS="$CSHARPCATALOGS $frobbedlang/\$(DOMAIN).resources.dll"
  2216. done
  2217. fi
  2218. sed -e "s|@POTFILES_DEPS@|$POTFILES_DEPS|g" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@PROPERTIESFILES@|$PROPERTIESFILES|g" -e "s|@CLASSFILES@|$CLASSFILES|g" -e "s|@QMFILES@|$QMFILES|g" -e "s|@MSGFILES@|$MSGFILES|g" -e "s|@RESOURCESDLLFILES@|$RESOURCESDLLFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@JAVACATALOGS@|$JAVACATALOGS|g" -e "s|@QTCATALOGS@|$QTCATALOGS|g" -e "s|@TCLCATALOGS@|$TCLCATALOGS|g" -e "s|@CSHARPCATALOGS@|$CSHARPCATALOGS|g" -e 's,^#distdir:,distdir:,' < "$ac_file" > "$ac_file.tmp"
  2219. tab=`printf '\t'`
  2220. if grep -l '@TCLCATALOGS@' "$ac_file" > /dev/null; then
  2221. # Add dependencies that cannot be formulated as a simple suffix rule.
  2222. for lang in $ALL_LINGUAS; do
  2223. frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
  2224. cat >> "$ac_file.tmp" <<EOF
  2225. $frobbedlang.msg: $lang.po
  2226. ${tab}@echo "\$(MSGFMT) -c --tcl -d \$(srcdir) -l $lang $srcdirpre$lang.po"; \
  2227. ${tab}\$(MSGFMT) -c --tcl -d "\$(srcdir)" -l $lang $srcdirpre$lang.po || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
  2228. EOF
  2229. done
  2230. fi
  2231. if grep -l '@CSHARPCATALOGS@' "$ac_file" > /dev/null; then
  2232. # Add dependencies that cannot be formulated as a simple suffix rule.
  2233. for lang in $ALL_LINGUAS; do
  2234. frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'`
  2235. cat >> "$ac_file.tmp" <<EOF
  2236. $frobbedlang/\$(DOMAIN).resources.dll: $lang.po
  2237. ${tab}@echo "\$(MSGFMT) -c --csharp -d \$(srcdir) -l $lang $srcdirpre$lang.po -r \$(DOMAIN)"; \
  2238. ${tab}\$(MSGFMT) -c --csharp -d "\$(srcdir)" -l $lang $srcdirpre$lang.po -r "\$(DOMAIN)" || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
  2239. EOF
  2240. done
  2241. fi
  2242. if test -n "$POMAKEFILEDEPS"; then
  2243. cat >> "$ac_file.tmp" <<EOF
  2244. Makefile: $POMAKEFILEDEPS
  2245. EOF
  2246. fi
  2247. mv "$ac_file.tmp" "$ac_file"
  2248. ])
  2249. dnl Initializes the accumulator used by AM_XGETTEXT_OPTION.
  2250. AC_DEFUN([AM_XGETTEXT_OPTION_INIT],
  2251. [
  2252. XGETTEXT_EXTRA_OPTIONS=
  2253. ])
  2254. dnl Registers an option to be passed to xgettext in the po subdirectory.
  2255. AC_DEFUN([AM_XGETTEXT_OPTION],
  2256. [
  2257. AC_REQUIRE([AM_XGETTEXT_OPTION_INIT])
  2258. XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS $1"
  2259. ])
  2260. # progtest.m4 serial 7 (gettext-0.18.2)
  2261. dnl Copyright (C) 1996-2003, 2005, 2008-2016 Free Software Foundation, Inc.
  2262. dnl This file is free software; the Free Software Foundation
  2263. dnl gives unlimited permission to copy and/or distribute it,
  2264. dnl with or without modifications, as long as this notice is preserved.
  2265. dnl
  2266. dnl This file can be used in projects which are not available under
  2267. dnl the GNU General Public License or the GNU Library General Public
  2268. dnl License but which still want to provide support for the GNU gettext
  2269. dnl functionality.
  2270. dnl Please note that the actual code of the GNU gettext library is covered
  2271. dnl by the GNU Library General Public License, and the rest of the GNU
  2272. dnl gettext package is covered by the GNU General Public License.
  2273. dnl They are *not* in the public domain.
  2274. dnl Authors:
  2275. dnl Ulrich Drepper <drepper@cygnus.com>, 1996.
  2276. AC_PREREQ([2.50])
  2277. # Search path for a program which passes the given test.
  2278. dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
  2279. dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
  2280. AC_DEFUN([AM_PATH_PROG_WITH_TEST],
  2281. [
  2282. # Prepare PATH_SEPARATOR.
  2283. # The user is always right.
  2284. if test "${PATH_SEPARATOR+set}" != set; then
  2285. # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
  2286. # contains only /bin. Note that ksh looks also at the FPATH variable,
  2287. # so we have to set that as well for the test.
  2288. PATH_SEPARATOR=:
  2289. (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
  2290. && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
  2291. || PATH_SEPARATOR=';'
  2292. }
  2293. fi
  2294. # Find out how to test for executable files. Don't use a zero-byte file,
  2295. # as systems may use methods other than mode bits to determine executability.
  2296. cat >conf$$.file <<_ASEOF
  2297. #! /bin/sh
  2298. exit 0
  2299. _ASEOF
  2300. chmod +x conf$$.file
  2301. if test -x conf$$.file >/dev/null 2>&1; then
  2302. ac_executable_p="test -x"
  2303. else
  2304. ac_executable_p="test -f"
  2305. fi
  2306. rm -f conf$$.file
  2307. # Extract the first word of "$2", so it can be a program name with args.
  2308. set dummy $2; ac_word=[$]2
  2309. AC_MSG_CHECKING([for $ac_word])
  2310. AC_CACHE_VAL([ac_cv_path_$1],
  2311. [case "[$]$1" in
  2312. [[\\/]]* | ?:[[\\/]]*)
  2313. ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
  2314. ;;
  2315. *)
  2316. ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
  2317. for ac_dir in ifelse([$5], , $PATH, [$5]); do
  2318. IFS="$ac_save_IFS"
  2319. test -z "$ac_dir" && ac_dir=.
  2320. for ac_exec_ext in '' $ac_executable_extensions; do
  2321. if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
  2322. echo "$as_me: trying $ac_dir/$ac_word..." >&AS_MESSAGE_LOG_FD
  2323. if [$3]; then
  2324. ac_cv_path_$1="$ac_dir/$ac_word$ac_exec_ext"
  2325. break 2
  2326. fi
  2327. fi
  2328. done
  2329. done
  2330. IFS="$ac_save_IFS"
  2331. dnl If no 4th arg is given, leave the cache variable unset,
  2332. dnl so AC_PATH_PROGS will keep looking.
  2333. ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
  2334. ])dnl
  2335. ;;
  2336. esac])dnl
  2337. $1="$ac_cv_path_$1"
  2338. if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
  2339. AC_MSG_RESULT([$][$1])
  2340. else
  2341. AC_MSG_RESULT([no])
  2342. fi
  2343. AC_SUBST([$1])dnl
  2344. ])