aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/m4
diff options
context:
space:
mode:
authorDavid M. Syzdek <david@syzdek.net>2009-12-31 12:15:04 -0900
committerDavid M. Syzdek <david@syzdek.net>2009-12-31 12:17:29 -0900
commit4218870f860aa89baaaf4bd9a4302e9ecb8f0d0e (patch)
tree910c11ca477dc3edcb347f2531c6e59a436287ff /m4
parentb429d60c90052a1b2271bc8ff8f732de6db68c9b (diff)
downloaddmstools-4218870f860aa89baaaf4bd9a4302e9ecb8f0d0e.tar.gz
dmstools-4218870f860aa89baaaf4bd9a4302e9ecb8f0d0e.tar.bz2
dmstools-4218870f860aa89baaaf4bd9a4302e9ecb8f0d0e.tar.xz
dmstools-4218870f860aa89baaaf4bd9a4302e9ecb8f0d0e.zip
removing generated files from the repository.
Diffstat (limited to 'm4')
-rw-r--r--m4/.gitignore1
-rw-r--r--m4/gettext.m4381
-rw-r--r--m4/iconv.m4180
-rw-r--r--m4/lib-ld.m4110
-rw-r--r--m4/lib-link.m4709
-rw-r--r--m4/lib-prefix.m4185
-rw-r--r--m4/nls.m431
-rw-r--r--m4/po.m4449
-rw-r--r--m4/progtest.m492
9 files changed, 1 insertions, 2137 deletions
diff --git a/m4/.gitignore b/m4/.gitignore
new file mode 100644
index 0000000..0f4126c
--- /dev/null
+++ b/m4/.gitignore
@@ -0,0 +1 @@
*.m4
diff --git a/m4/gettext.m4 b/m4/gettext.m4
deleted file mode 100644
index c9ae1f7..0000000
--- a/m4/gettext.m4
+++ /dev/null
@@ -1,381 +0,0 @@
1# gettext.m4 serial 60 (gettext-0.17)
2dnl Copyright (C) 1995-2007 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved.
6dnl
7dnl This file can can be used in projects which are not available under
8dnl the GNU General Public License or the GNU Library General Public
9dnl License but which still want to provide support for the GNU gettext
10dnl functionality.
11dnl Please note that the actual code of the GNU gettext library is covered
12dnl by the GNU Library General Public License, and the rest of the GNU
13dnl gettext package package is covered by the GNU General Public License.
14dnl They are *not* in the public domain.
15
16dnl Authors:
17dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
18dnl Bruno Haible <haible@clisp.cons.org>, 2000-2006.
19
20dnl Macro to add for using GNU gettext.
21
22dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]).
23dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The
24dnl default (if it is not specified or empty) is 'no-libtool'.
25dnl INTLSYMBOL should be 'external' for packages with no intl directory,
26dnl and 'no-libtool' or 'use-libtool' for packages with an intl directory.
27dnl If INTLSYMBOL is 'use-libtool', then a libtool library
28dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static,
29dnl depending on --{enable,disable}-{shared,static} and on the presence of
30dnl AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library
31dnl $(top_builddir)/intl/libintl.a will be created.
32dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext
33dnl implementations (in libc or libintl) without the ngettext() function
34dnl will be ignored. If NEEDSYMBOL is specified and is
35dnl 'need-formatstring-macros', then GNU gettext implementations that don't
36dnl support the ISO C 99 <inttypes.h> formatstring macros will be ignored.
37dnl INTLDIR is used to find the intl libraries. If empty,
38dnl the value `$(top_builddir)/intl/' is used.
39dnl
40dnl The result of the configuration is one of three cases:
41dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled
42dnl and used.
43dnl Catalog format: GNU --> install in $(datadir)
44dnl Catalog extension: .mo after installation, .gmo in source tree
45dnl 2) GNU gettext has been found in the system's C library.
46dnl Catalog format: GNU --> install in $(datadir)
47dnl Catalog extension: .mo after installation, .gmo in source tree
48dnl 3) No internationalization, always use English msgid.
49dnl Catalog format: none
50dnl Catalog extension: none
51dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur.
52dnl The use of .gmo is historical (it was needed to avoid overwriting the
53dnl GNU format catalogs when building on a platform with an X/Open gettext),
54dnl but we keep it in order not to force irrelevant filename changes on the
55dnl maintainers.
56dnl
57AC_DEFUN([AM_GNU_GETTEXT],
58[
59 dnl Argument checking.
60 ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], ,
61 [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT
62])])])])])
63 ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], ,
64 [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT
65])])])])
66 define([gt_included_intl],
67 ifelse([$1], [external],
68 ifdef([AM_GNU_GETTEXT_][INTL_SUBDIR], [yes], [no]),
69 [yes]))
70 define([gt_libtool_suffix_prefix], ifelse([$1], [use-libtool], [l], []))
71 gt_NEEDS_INIT
72 AM_GNU_GETTEXT_NEED([$2])
73
74 AC_REQUIRE([AM_PO_SUBDIRS])dnl
75 ifelse(gt_included_intl, yes, [
76 AC_REQUIRE([AM_INTL_SUBDIR])dnl
77 ])
78
79 dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
80 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
81 AC_REQUIRE([AC_LIB_RPATH])
82
83 dnl Sometimes libintl requires libiconv, so first search for libiconv.
84 dnl Ideally we would do this search only after the
85 dnl if test "$USE_NLS" = "yes"; then
86 dnl if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
87 dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT
88 dnl the configure script would need to contain the same shell code
89 dnl again, outside any 'if'. There are two solutions:
90 dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'.
91 dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE.
92 dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not
93 dnl documented, we avoid it.
94 ifelse(gt_included_intl, yes, , [
95 AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
96 ])
97
98 dnl Sometimes, on MacOS X, libintl requires linking with CoreFoundation.
99 gt_INTL_MACOSX
100
101 dnl Set USE_NLS.
102 AC_REQUIRE([AM_NLS])
103
104 ifelse(gt_included_intl, yes, [
105 BUILD_INCLUDED_LIBINTL=no
106 USE_INCLUDED_LIBINTL=no
107 ])
108 LIBINTL=
109 LTLIBINTL=
110 POSUB=
111
112 dnl Add a version number to the cache macros.
113 case " $gt_needs " in
114 *" need-formatstring-macros "*) gt_api_version=3 ;;
115 *" need-ngettext "*) gt_api_version=2 ;;
116 *) gt_api_version=1 ;;
117 esac
118 gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc"
119 gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl"
120
121 dnl If we use NLS figure out what method
122 if test "$USE_NLS" = "yes"; then
123 gt_use_preinstalled_gnugettext=no
124 ifelse(gt_included_intl, yes, [
125 AC_MSG_CHECKING([whether included gettext is requested])
126 AC_ARG_WITH(included-gettext,
127 [ --with-included-gettext use the GNU gettext library included here],
128 nls_cv_force_use_gnu_gettext=$withval,
129 nls_cv_force_use_gnu_gettext=no)
130 AC_MSG_RESULT($nls_cv_force_use_gnu_gettext)
131
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
139 if test $gt_api_version -ge 3; then
140 gt_revision_test_code='
141#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
142#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
143#endif
144changequote(,)dnl
145typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
146changequote([,])dnl
147'
148 else
149 gt_revision_test_code=
150 fi
151 if test $gt_api_version -ge 2; then
152 gt_expression_test_code=' + * ngettext ("", "", 0)'
153 else
154 gt_expression_test_code=
155 fi
156
157 AC_CACHE_CHECK([for GNU gettext in libc], [$gt_func_gnugettext_libc],
158 [AC_TRY_LINK([#include <libintl.h>
159$gt_revision_test_code
160extern int _nl_msg_cat_cntr;
161extern int *_nl_domain_bindings;],
162 [bindtextdomain ("", "");
163return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings],
164 [eval "$gt_func_gnugettext_libc=yes"],
165 [eval "$gt_func_gnugettext_libc=no"])])
166
167 if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
168 dnl Sometimes libintl requires libiconv, so first search for libiconv.
169 ifelse(gt_included_intl, yes, , [
170 AM_ICONV_LINK
171 ])
172 dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL
173 dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv])
174 dnl because that would add "-liconv" to LIBINTL and LTLIBINTL
175 dnl even if libiconv doesn't exist.
176 AC_LIB_LINKFLAGS_BODY([intl])
177 AC_CACHE_CHECK([for GNU gettext in libintl],
178 [$gt_func_gnugettext_libintl],
179 [gt_save_CPPFLAGS="$CPPFLAGS"
180 CPPFLAGS="$CPPFLAGS $INCINTL"
181 gt_save_LIBS="$LIBS"
182 LIBS="$LIBS $LIBINTL"
183 dnl Now see whether libintl exists and does not depend on libiconv.
184 AC_TRY_LINK([#include <libintl.h>
185$gt_revision_test_code
186extern int _nl_msg_cat_cntr;
187extern
188#ifdef __cplusplus
189"C"
190#endif
191const char *_nl_expand_alias (const char *);],
192 [bindtextdomain ("", "");
193return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")],
194 [eval "$gt_func_gnugettext_libintl=yes"],
195 [eval "$gt_func_gnugettext_libintl=no"])
196 dnl Now see whether libintl exists and depends on libiconv.
197 if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then
198 LIBS="$LIBS $LIBICONV"
199 AC_TRY_LINK([#include <libintl.h>
200$gt_revision_test_code
201extern int _nl_msg_cat_cntr;
202extern
203#ifdef __cplusplus
204"C"
205#endif
206const char *_nl_expand_alias (const char *);],
207 [bindtextdomain ("", "");
208return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")],
209 [LIBINTL="$LIBINTL $LIBICONV"
210 LTLIBINTL="$LTLIBINTL $LTLIBICONV"
211 eval "$gt_func_gnugettext_libintl=yes"
212 ])
213 fi
214 CPPFLAGS="$gt_save_CPPFLAGS"
215 LIBS="$gt_save_LIBS"])
216 fi
217
218 dnl If an already present or preinstalled GNU gettext() is found,
219 dnl use it. But if this macro is used in GNU gettext, and GNU
220 dnl gettext is already preinstalled in libintl, we update this
221 dnl libintl. (Cf. the install rule in intl/Makefile.in.)
222 if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \
223 || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \
224 && test "$PACKAGE" != gettext-runtime \
225 && test "$PACKAGE" != gettext-tools; }; then
226 gt_use_preinstalled_gnugettext=yes
227 else
228 dnl Reset the values set by searching for libintl.
229 LIBINTL=
230 LTLIBINTL=
231 INCINTL=
232 fi
233
234 ifelse(gt_included_intl, yes, [
235 if test "$gt_use_preinstalled_gnugettext" != "yes"; then
236 dnl GNU gettext is not found in the C library.
237 dnl Fall back on included GNU gettext library.
238 nls_cv_use_gnu_gettext=yes
239 fi
240 fi
241
242 if test "$nls_cv_use_gnu_gettext" = "yes"; then
243 dnl Mark actions used to generate GNU NLS library.
244 BUILD_INCLUDED_LIBINTL=yes
245 USE_INCLUDED_LIBINTL=yes
246 LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV $LIBTHREAD"
247 LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV $LTLIBTHREAD"
248 LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
249 fi
250
251 CATOBJEXT=
252 if test "$gt_use_preinstalled_gnugettext" = "yes" \
253 || test "$nls_cv_use_gnu_gettext" = "yes"; then
254 dnl Mark actions to use GNU gettext tools.
255 CATOBJEXT=.gmo
256 fi
257 ])
258
259 if test -n "$INTL_MACOSX_LIBS"; then
260 if test "$gt_use_preinstalled_gnugettext" = "yes" \
261 || test "$nls_cv_use_gnu_gettext" = "yes"; then
262 dnl Some extra flags are needed during linking.
263 LIBINTL="$LIBINTL $INTL_MACOSX_LIBS"
264 LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS"
265 fi
266 fi
267
268 if test "$gt_use_preinstalled_gnugettext" = "yes" \
269 || test "$nls_cv_use_gnu_gettext" = "yes"; then
270 AC_DEFINE(ENABLE_NLS, 1,
271 [Define to 1 if translation of program messages to the user's native language
272 is requested.])
273 else
274 USE_NLS=no
275 fi
276 fi
277
278 AC_MSG_CHECKING([whether to use NLS])
279 AC_MSG_RESULT([$USE_NLS])
280 if test "$USE_NLS" = "yes"; then
281 AC_MSG_CHECKING([where the gettext function comes from])
282 if test "$gt_use_preinstalled_gnugettext" = "yes"; then
283 if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
284 gt_source="external libintl"
285 else
286 gt_source="libc"
287 fi
288 else
289 gt_source="included intl directory"
290 fi
291 AC_MSG_RESULT([$gt_source])
292 fi
293
294 if test "$USE_NLS" = "yes"; then
295
296 if test "$gt_use_preinstalled_gnugettext" = "yes"; then
297 if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
298 AC_MSG_CHECKING([how to link with libintl])
299 AC_MSG_RESULT([$LIBINTL])
300 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL])
301 fi
302
303 dnl For backward compatibility. Some packages may be using this.
304 AC_DEFINE(HAVE_GETTEXT, 1,
305 [Define if the GNU gettext() function is already present or preinstalled.])
306 AC_DEFINE(HAVE_DCGETTEXT, 1,
307 [Define if the GNU dcgettext() function is already present or preinstalled.])
308 fi
309
310 dnl We need to process the po/ directory.
311 POSUB=po
312 fi
313
314 ifelse(gt_included_intl, yes, [
315 dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL
316 dnl to 'yes' because some of the testsuite requires it.
317 if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then
318 BUILD_INCLUDED_LIBINTL=yes
319 fi
320
321 dnl Make all variables we use known to autoconf.
322 AC_SUBST(BUILD_INCLUDED_LIBINTL)
323 AC_SUBST(USE_INCLUDED_LIBINTL)
324 AC_SUBST(CATOBJEXT)
325
326 dnl For backward compatibility. Some configure.ins may be using this.
327 nls_cv_header_intl=
328 nls_cv_header_libgt=
329
330 dnl For backward compatibility. Some Makefiles may be using this.
331 DATADIRNAME=share
332 AC_SUBST(DATADIRNAME)
333
334 dnl For backward compatibility. Some Makefiles may be using this.
335 INSTOBJEXT=.mo
336 AC_SUBST(INSTOBJEXT)
337
338 dnl For backward compatibility. Some Makefiles may be using this.
339 GENCAT=gencat
340 AC_SUBST(GENCAT)
341
342 dnl For backward compatibility. Some Makefiles may be using this.
343 INTLOBJS=
344 if test "$USE_INCLUDED_LIBINTL" = yes; then
345 INTLOBJS="\$(GETTOBJS)"
346 fi
347 AC_SUBST(INTLOBJS)
348
349 dnl Enable libtool support if the surrounding package wishes it.
350 INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix
351 AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX)
352 ])
353
354 dnl For backward compatibility. Some Makefiles may be using this.
355 INTLLIBS="$LIBINTL"
356 AC_SUBST(INTLLIBS)
357
358 dnl Make all documented variables known to autoconf.
359 AC_SUBST(LIBINTL)
360 AC_SUBST(LTLIBINTL)
361 AC_SUBST(POSUB)
362])
363
364
365dnl gt_NEEDS_INIT ensures that the gt_needs variable is initialized.
366m4_define([gt_NEEDS_INIT],
367[
368 m4_divert_text([DEFAULTS], [gt_needs=])
369 m4_define([gt_NEEDS_INIT], [])
370])
371
372
373dnl Usage: AM_GNU_GETTEXT_NEED([NEEDSYMBOL])
374AC_DEFUN([AM_GNU_GETTEXT_NEED],
375[
376 m4_divert_text([INIT_PREPARE], [gt_needs="$gt_needs $1"])
377])
378
379
380dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version])
381AC_DEFUN([AM_GNU_GETTEXT_VERSION], [])
diff --git a/m4/iconv.m4 b/m4/iconv.m4
deleted file mode 100644
index 66bc76f..0000000
--- a/m4/iconv.m4
+++ /dev/null
@@ -1,180 +0,0 @@
1# iconv.m4 serial AM6 (gettext-0.17)
2dnl Copyright (C) 2000-2002, 2007 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved.
6
7dnl From Bruno Haible.
8
9AC_DEFUN([AM_ICONV_LINKFLAGS_BODY],
10[
11 dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
12 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
13 AC_REQUIRE([AC_LIB_RPATH])
14
15 dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
16 dnl accordingly.
17 AC_LIB_LINKFLAGS_BODY([iconv])
18])
19
20AC_DEFUN([AM_ICONV_LINK],
21[
22 dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
23 dnl those with the standalone portable GNU libiconv installed).
24 AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
25
26 dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
27 dnl accordingly.
28 AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
29
30 dnl Add $INCICONV to CPPFLAGS before performing the following checks,
31 dnl because if the user has installed libiconv and not disabled its use
32 dnl via --without-libiconv-prefix, he wants to use it. The first
33 dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed.
34 am_save_CPPFLAGS="$CPPFLAGS"
35 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
36
37 AC_CACHE_CHECK([for iconv], am_cv_func_iconv, [
38 am_cv_func_iconv="no, consider installing GNU libiconv"
39 am_cv_lib_iconv=no
40 AC_TRY_LINK([#include <stdlib.h>
41#include <iconv.h>],
42 [iconv_t cd = iconv_open("","");
43 iconv(cd,NULL,NULL,NULL,NULL);
44 iconv_close(cd);],
45 am_cv_func_iconv=yes)
46 if test "$am_cv_func_iconv" != yes; then
47 am_save_LIBS="$LIBS"
48 LIBS="$LIBS $LIBICONV"
49 AC_TRY_LINK([#include <stdlib.h>
50#include <iconv.h>],
51 [iconv_t cd = iconv_open("","");
52 iconv(cd,NULL,NULL,NULL,NULL);
53 iconv_close(cd);],
54 am_cv_lib_iconv=yes
55 am_cv_func_iconv=yes)
56 LIBS="$am_save_LIBS"
57 fi
58 ])
59 if test "$am_cv_func_iconv" = yes; then
60 AC_CACHE_CHECK([for working iconv], am_cv_func_iconv_works, [
61 dnl This tests against bugs in AIX 5.1 and HP-UX 11.11.
62 am_save_LIBS="$LIBS"
63 if test $am_cv_lib_iconv = yes; then
64 LIBS="$LIBS $LIBICONV"
65 fi
66 AC_TRY_RUN([
67#include <iconv.h>
68#include <string.h>
69int main ()
70{
71 /* Test against AIX 5.1 bug: Failures are not distinguishable from successful
72 returns. */
73 {
74 iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
75 if (cd_utf8_to_88591 != (iconv_t)(-1))
76 {
77 static const char input[] = "\342\202\254"; /* EURO SIGN */
78 char buf[10];
79 const char *inptr = input;
80 size_t inbytesleft = strlen (input);
81 char *outptr = buf;
82 size_t outbytesleft = sizeof (buf);
83 size_t res = iconv (cd_utf8_to_88591,
84 (char **) &inptr, &inbytesleft,
85 &outptr, &outbytesleft);
86 if (res == 0)
87 return 1;
88 }
89 }
90#if 0 /* This bug could be worked around by the caller. */
91 /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */
92 {
93 iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
94 if (cd_88591_to_utf8 != (iconv_t)(-1))
95 {
96 static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
97 char buf[50];
98 const char *inptr = input;
99 size_t inbytesleft = strlen (input);
100 char *outptr = buf;
101 size_t outbytesleft = sizeof (buf);
102 size_t res = iconv (cd_88591_to_utf8,
103 (char **) &inptr, &inbytesleft,
104 &outptr, &outbytesleft);
105 if ((int)res > 0)
106 return 1;
107 }
108 }
109#endif
110 /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
111 provided. */
112 if (/* Try standardized names. */
113 iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1)
114 /* Try IRIX, OSF/1 names. */
115 && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1)
116 /* Try AIX names. */
117 && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1)
118 /* Try HP-UX names. */
119 && iconv_open ("utf8", "eucJP") == (iconv_t)(-1))
120 return 1;
121 return 0;
122}], [am_cv_func_iconv_works=yes], [am_cv_func_iconv_works=no],
123 [case "$host_os" in
124 aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
125 *) am_cv_func_iconv_works="guessing yes" ;;
126 esac])
127 LIBS="$am_save_LIBS"
128 ])
129 case "$am_cv_func_iconv_works" in
130 *no) am_func_iconv=no am_cv_lib_iconv=no ;;
131 *) am_func_iconv=yes ;;
132 esac
133 else
134 am_func_iconv=no am_cv_lib_iconv=no
135 fi
136 if test "$am_func_iconv" = yes; then
137 AC_DEFINE(HAVE_ICONV, 1,
138 [Define if you have the iconv() function and it works.])
139 fi
140 if test "$am_cv_lib_iconv" = yes; then
141 AC_MSG_CHECKING([how to link with libiconv])
142 AC_MSG_RESULT([$LIBICONV])
143 else
144 dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV
145 dnl either.
146 CPPFLAGS="$am_save_CPPFLAGS"
147 LIBICONV=
148 LTLIBICONV=
149 fi
150 AC_SUBST(LIBICONV)
151 AC_SUBST(LTLIBICONV)
152])
153
154AC_DEFUN([AM_ICONV],
155[
156 AM_ICONV_LINK
157 if test "$am_cv_func_iconv" = yes; then
158 AC_MSG_CHECKING([for iconv declaration])
159 AC_CACHE_VAL(am_cv_proto_iconv, [
160 AC_TRY_COMPILE([
161#include <stdlib.h>
162#include <iconv.h>
163extern
164#ifdef __cplusplus
165"C"
166#endif
167#if defined(__STDC__) || defined(__cplusplus)
168size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
169#else
170size_t iconv();
171#endif
172], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const")
173 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);"])
174 am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
175 AC_MSG_RESULT([$]{ac_t:-
176 }[$]am_cv_proto_iconv)
177 AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1,
178 [Define as const if the declaration of iconv() needs const.])
179 fi
180])
diff --git a/m4/lib-ld.m4 b/m4/lib-ld.m4
deleted file mode 100644
index 96c4e2c..0000000
--- a/m4/lib-ld.m4
+++ /dev/null
@@ -1,110 +0,0 @@
1# lib-ld.m4 serial 3 (gettext-0.13)
2dnl Copyright (C) 1996-2003 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved.
6
7dnl Subroutines of libtool.m4,
8dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
9dnl with libtool.m4.
10
11dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
12AC_DEFUN([AC_LIB_PROG_LD_GNU],
13[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld,
14[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
15case `$LD -v 2>&1 </dev/null` in
16*GNU* | *'with BFD'*)
17 acl_cv_prog_gnu_ld=yes ;;
18*)
19 acl_cv_prog_gnu_ld=no ;;
20esac])
21with_gnu_ld=$acl_cv_prog_gnu_ld
22])
23
24dnl From libtool-1.4. Sets the variable LD.
25AC_DEFUN([AC_LIB_PROG_LD],
26[AC_ARG_WITH(gnu-ld,
27[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
28test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
29AC_REQUIRE([AC_PROG_CC])dnl
30AC_REQUIRE([AC_CANONICAL_HOST])dnl
31# Prepare PATH_SEPARATOR.
32# The user is always right.
33if test "${PATH_SEPARATOR+set}" != set; then
34 echo "#! /bin/sh" >conf$$.sh
35 echo "exit 0" >>conf$$.sh
36 chmod +x conf$$.sh
37 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
38 PATH_SEPARATOR=';'
39 else
40 PATH_SEPARATOR=:
41 fi
42 rm -f conf$$.sh
43fi
44ac_prog=ld
45if test "$GCC" = yes; then
46 # Check if gcc -print-prog-name=ld gives a path.
47 AC_MSG_CHECKING([for ld used by GCC])
48 case $host in
49 *-*-mingw*)
50 # gcc leaves a trailing carriage return which upsets mingw
51 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
52 *)
53 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
54 esac
55 case $ac_prog in
56 # Accept absolute paths.
57 [[\\/]* | [A-Za-z]:[\\/]*)]
58 [re_direlt='/[^/][^/]*/\.\./']
59 # Canonicalize the path of ld
60 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
61 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
62 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
63 done
64 test -z "$LD" && LD="$ac_prog"
65 ;;
66 "")
67 # If it fails, then pretend we aren't using GCC.
68 ac_prog=ld
69 ;;
70 *)
71 # If it is relative, then search for the first ld in PATH.
72 with_gnu_ld=unknown
73 ;;
74 esac
75elif test "$with_gnu_ld" = yes; then
76 AC_MSG_CHECKING([for GNU ld])
77else
78 AC_MSG_CHECKING([for non-GNU ld])
79fi
80AC_CACHE_VAL(acl_cv_path_LD,
81[if test -z "$LD"; then
82 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
83 for ac_dir in $PATH; do
84 test -z "$ac_dir" && ac_dir=.
85 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
86 acl_cv_path_LD="$ac_dir/$ac_prog"
87 # Check to see if the program is GNU ld. I'd rather use --version,
88 # but apparently some GNU ld's only accept -v.
89 # Break only if it was the GNU/non-GNU ld that we prefer.
90 case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
91 *GNU* | *'with BFD'*)
92 test "$with_gnu_ld" != no && break ;;
93 *)
94 test "$with_gnu_ld" != yes && break ;;
95 esac
96 fi
97 done
98 IFS="$ac_save_ifs"
99else
100 acl_cv_path_LD="$LD" # Let the user override the test with a path.
101fi])
102LD="$acl_cv_path_LD"
103if test -n "$LD"; then
104 AC_MSG_RESULT($LD)
105else
106 AC_MSG_RESULT(no)
107fi
108test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
109AC_LIB_PROG_LD_GNU
110])
diff --git a/m4/lib-link.m4 b/m4/lib-link.m4
deleted file mode 100644
index e3d26fc..0000000
--- a/m4/lib-link.m4
+++ /dev/null
@@ -1,709 +0,0 @@
1# lib-link.m4 serial 13 (gettext-0.17)
2dnl Copyright (C) 2001-2007 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved.
6
7dnl From Bruno Haible.
8
9AC_PREREQ(2.54)
10
11dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
12dnl the libraries corresponding to explicit and implicit dependencies.
13dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
14dnl augments the CPPFLAGS variable.
15dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
16dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
17AC_DEFUN([AC_LIB_LINKFLAGS],
18[
19 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
20 AC_REQUIRE([AC_LIB_RPATH])
21 define([Name],[translit([$1],[./-], [___])])
22 define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
23 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
24 AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
25 AC_LIB_LINKFLAGS_BODY([$1], [$2])
26 ac_cv_lib[]Name[]_libs="$LIB[]NAME"
27 ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
28 ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
29 ac_cv_lib[]Name[]_prefix="$LIB[]NAME[]_PREFIX"
30 ])
31 LIB[]NAME="$ac_cv_lib[]Name[]_libs"
32 LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
33 INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
34 LIB[]NAME[]_PREFIX="$ac_cv_lib[]Name[]_prefix"
35 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
36 AC_SUBST([LIB]NAME)
37 AC_SUBST([LTLIB]NAME)
38 AC_SUBST([LIB]NAME[_PREFIX])
39 dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
40 dnl results of this search when this library appears as a dependency.
41 HAVE_LIB[]NAME=yes
42 undefine([Name])
43 undefine([NAME])
44])
45
46dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode)
47dnl searches for libname and the libraries corresponding to explicit and
48dnl implicit dependencies, together with the specified include files and
49dnl the ability to compile and link the specified testcode. If found, it
50dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and
51dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and
52dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
53dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
54dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
55dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
56AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
57[
58 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
59 AC_REQUIRE([AC_LIB_RPATH])
60 define([Name],[translit([$1],[./-], [___])])
61 define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
62 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
63
64 dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
65 dnl accordingly.
66 AC_LIB_LINKFLAGS_BODY([$1], [$2])
67
68 dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
69 dnl because if the user has installed lib[]Name and not disabled its use
70 dnl via --without-lib[]Name-prefix, he wants to use it.
71 ac_save_CPPFLAGS="$CPPFLAGS"
72 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
73
74 AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
75 ac_save_LIBS="$LIBS"
76 LIBS="$LIBS $LIB[]NAME"
77 AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no])
78 LIBS="$ac_save_LIBS"
79 ])
80 if test "$ac_cv_lib[]Name" = yes; then
81 HAVE_LIB[]NAME=yes
82 AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.])
83 AC_MSG_CHECKING([how to link with lib[]$1])
84 AC_MSG_RESULT([$LIB[]NAME])
85 else
86 HAVE_LIB[]NAME=no
87 dnl If $LIB[]NAME didn't lead to a usable library, we don't need
88 dnl $INC[]NAME either.
89 CPPFLAGS="$ac_save_CPPFLAGS"
90 LIB[]NAME=
91 LTLIB[]NAME=
92 LIB[]NAME[]_PREFIX=
93 fi
94 AC_SUBST([HAVE_LIB]NAME)
95 AC_SUBST([LIB]NAME)
96 AC_SUBST([LTLIB]NAME)
97 AC_SUBST([LIB]NAME[_PREFIX])
98 undefine([Name])
99 undefine([NAME])
100])
101
102dnl Determine the platform dependent parameters needed to use rpath:
103dnl acl_libext,
104dnl acl_shlibext,
105dnl acl_hardcode_libdir_flag_spec,
106dnl acl_hardcode_libdir_separator,
107dnl acl_hardcode_direct,
108dnl acl_hardcode_minus_L.
109AC_DEFUN([AC_LIB_RPATH],
110[
111 dnl Tell automake >= 1.10 to complain if config.rpath is missing.
112 m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])])
113 AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS
114 AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld
115 AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host
116 AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
117 AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [
118 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
119 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
120 . ./conftest.sh
121 rm -f ./conftest.sh
122 acl_cv_rpath=done
123 ])
124 wl="$acl_cv_wl"
125 acl_libext="$acl_cv_libext"
126 acl_shlibext="$acl_cv_shlibext"
127 acl_libname_spec="$acl_cv_libname_spec"
128 acl_library_names_spec="$acl_cv_library_names_spec"
129 acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
130 acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
131 acl_hardcode_direct="$acl_cv_hardcode_direct"
132 acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
133 dnl Determine whether the user wants rpath handling at all.
134 AC_ARG_ENABLE(rpath,
135 [ --disable-rpath do not hardcode runtime library paths],
136 :, enable_rpath=yes)
137])
138
139dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
140dnl the libraries corresponding to explicit and implicit dependencies.
141dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
142dnl Also, sets the LIB${NAME}_PREFIX variable to nonempty if libname was found
143dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
144AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
145[
146 AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
147 define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
148 [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
149 dnl Autoconf >= 2.61 supports dots in --with options.
150 define([N_A_M_E],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[translit([$1],[.],[_])],[$1])])
151 dnl By default, look in $includedir and $libdir.
152 use_additional=yes
153 AC_LIB_WITH_FINAL_PREFIX([
154 eval additional_includedir=\"$includedir\"
155 eval additional_libdir=\"$libdir\"
156 ])
157 AC_LIB_ARG_WITH([lib]N_A_M_E[-prefix],
158[ --with-lib]N_A_M_E[-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib
159 --without-lib]N_A_M_E[-prefix don't search for lib$1 in includedir and libdir],
160[
161 if test "X$withval" = "Xno"; then
162 use_additional=no
163 else
164 if test "X$withval" = "X"; then
165 AC_LIB_WITH_FINAL_PREFIX([
166 eval additional_includedir=\"$includedir\"
167 eval additional_libdir=\"$libdir\"
168 ])
169 else
170 additional_includedir="$withval/include"
171 additional_libdir="$withval/$acl_libdirstem"
172 fi
173 fi
174])
175 dnl Search the library and its dependencies in $additional_libdir and
176 dnl $LDFLAGS. Using breadth-first-seach.
177 LIB[]NAME=
178 LTLIB[]NAME=
179 INC[]NAME=
180 LIB[]NAME[]_PREFIX=
181 rpathdirs=
182 ltrpathdirs=
183 names_already_handled=
184 names_next_round='$1 $2'
185 while test -n "$names_next_round"; do
186 names_this_round="$names_next_round"
187 names_next_round=
188 for name in $names_this_round; do
189 already_handled=
190 for n in $names_already_handled; do
191 if test "$n" = "$name"; then
192 already_handled=yes
193 break
194 fi
195 done
196 if test -z "$already_handled"; then
197 names_already_handled="$names_already_handled $name"
198 dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
199 dnl or AC_LIB_HAVE_LINKFLAGS call.
200 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
201 eval value=\"\$HAVE_LIB$uppername\"
202 if test -n "$value"; then
203 if test "$value" = yes; then
204 eval value=\"\$LIB$uppername\"
205 test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
206 eval value=\"\$LTLIB$uppername\"
207 test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
208 else
209 dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
210 dnl that this library doesn't exist. So just drop it.
211 :
212 fi
213 else
214 dnl Search the library lib$name in $additional_libdir and $LDFLAGS
215 dnl and the already constructed $LIBNAME/$LTLIBNAME.
216 found_dir=
217 found_la=
218 found_so=
219 found_a=
220 eval libname=\"$acl_libname_spec\" # typically: libname=lib$name
221 if test -n "$acl_shlibext"; then
222 shrext=".$acl_shlibext" # typically: shrext=.so
223 else
224 shrext=
225 fi
226 if test $use_additional = yes; then
227 dir="$additional_libdir"
228 dnl The same code as in the loop below:
229 dnl First look for a shared library.
230 if test -n "$acl_shlibext"; then
231 if test -f "$dir/$libname$shrext"; then
232 found_dir="$dir"
233 found_so="$dir/$libname$shrext"
234 else
235 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
236 ver=`(cd "$dir" && \
237 for f in "$libname$shrext".*; do echo "$f"; done \
238 | sed -e "s,^$libname$shrext\\\\.,," \
239 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
240 | sed 1q ) 2>/dev/null`
241 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
242 found_dir="$dir"
243 found_so="$dir/$libname$shrext.$ver"
244 fi
245 else
246 eval library_names=\"$acl_library_names_spec\"
247 for f in $library_names; do
248 if test -f "$dir/$f"; then
249 found_dir="$dir"
250 found_so="$dir/$f"
251 break
252 fi
253 done
254 fi
255 fi
256 fi
257 dnl Then look for a static library.
258 if test "X$found_dir" = "X"; then
259 if test -f "$dir/$libname.$acl_libext"; then
260 found_dir="$dir"
261 found_a="$dir/$libname.$acl_libext"
262 fi
263 fi
264 if test "X$found_dir" != "X"; then
265 if test -f "$dir/$libname.la"; then
266 found_la="$dir/$libname.la"
267 fi
268 fi
269 fi
270 if test "X$found_dir" = "X"; then
271 for x in $LDFLAGS $LTLIB[]NAME; do
272 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
273 case "$x" in
274 -L*)
275 dir=`echo "X$x" | sed -e 's/^X-L//'`
276 dnl First look for a shared library.
277 if test -n "$acl_shlibext"; then
278 if test -f "$dir/$libname$shrext"; then
279 found_dir="$dir"
280 found_so="$dir/$libname$shrext"
281 else
282 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
283 ver=`(cd "$dir" && \
284 for f in "$libname$shrext".*; do echo "$f"; done \
285 | sed -e "s,^$libname$shrext\\\\.,," \
286 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
287 | sed 1q ) 2>/dev/null`
288 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
289 found_dir="$dir"
290 found_so="$dir/$libname$shrext.$ver"
291 fi
292 else
293 eval library_names=\"$acl_library_names_spec\"
294 for f in $library_names; do
295 if test -f "$dir/$f"; then
296 found_dir="$dir"
297 found_so="$dir/$f"
298 break
299 fi
300 done
301 fi
302 fi
303 fi
304 dnl Then look for a static library.
305 if test "X$found_dir" = "X"; then
306 if test -f "$dir/$libname.$acl_libext"; then
307 found_dir="$dir"
308 found_a="$dir/$libname.$acl_libext"
309 fi
310 fi
311 if test "X$found_dir" != "X"; then
312 if test -f "$dir/$libname.la"; then
313 found_la="$dir/$libname.la"
314 fi
315 fi
316 ;;
317 esac
318 if test "X$found_dir" != "X"; then
319 break
320 fi
321 done
322 fi
323 if test "X$found_dir" != "X"; then
324 dnl Found the library.
325 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
326 if test "X$found_so" != "X"; then
327 dnl Linking with a shared library. We attempt to hardcode its
328 dnl directory into the executable's runpath, unless it's the
329 dnl standard /usr/lib.
330 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/$acl_libdirstem"; then
331 dnl No hardcoding is needed.
332 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
333 else
334 dnl Use an explicit option to hardcode DIR into the resulting
335 dnl binary.
336 dnl Potentially add DIR to ltrpathdirs.
337 dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
338 haveit=
339 for x in $ltrpathdirs; do
340 if test "X$x" = "X$found_dir"; then
341 haveit=yes
342 break
343 fi
344 done
345 if test -z "$haveit"; then
346 ltrpathdirs="$ltrpathdirs $found_dir"
347 fi
348 dnl The hardcoding into $LIBNAME is system dependent.
349 if test "$acl_hardcode_direct" = yes; then
350 dnl Using DIR/libNAME.so during linking hardcodes DIR into the
351 dnl resulting binary.
352 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
353 else
354 if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
355 dnl Use an explicit option to hardcode DIR into the resulting
356 dnl binary.
357 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
358 dnl Potentially add DIR to rpathdirs.
359 dnl The rpathdirs will be appended to $LIBNAME at the end.
360 haveit=
361 for x in $rpathdirs; do
362 if test "X$x" = "X$found_dir"; then
363 haveit=yes
364 break
365 fi
366 done
367 if test -z "$haveit"; then
368 rpathdirs="$rpathdirs $found_dir"
369 fi
370 else
371 dnl Rely on "-L$found_dir".
372 dnl But don't add it if it's already contained in the LDFLAGS
373 dnl or the already constructed $LIBNAME
374 haveit=
375 for x in $LDFLAGS $LIB[]NAME; do
376 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
377 if test "X$x" = "X-L$found_dir"; then
378 haveit=yes
379 break
380 fi
381 done
382 if test -z "$haveit"; then
383 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
384 fi
385 if test "$acl_hardcode_minus_L" != no; then
386 dnl FIXME: Not sure whether we should use
387 dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
388 dnl here.
389 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
390 else
391 dnl We cannot use $acl_hardcode_runpath_var and LD_RUN_PATH
392 dnl here, because this doesn't fit in flags passed to the
393 dnl compiler. So give up. No hardcoding. This affects only
394 dnl very old systems.
395 dnl FIXME: Not sure whether we should use
396 dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
397 dnl here.
398 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
399 fi
400 fi
401 fi
402 fi
403 else
404 if test "X$found_a" != "X"; then
405 dnl Linking with a static library.
406 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
407 else
408 dnl We shouldn't come here, but anyway it's good to have a
409 dnl fallback.
410 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
411 fi
412 fi
413 dnl Assume the include files are nearby.
414 additional_includedir=
415 case "$found_dir" in
416 */$acl_libdirstem | */$acl_libdirstem/)
417 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
418 LIB[]NAME[]_PREFIX="$basedir"
419 additional_includedir="$basedir/include"
420 ;;
421 esac
422 if test "X$additional_includedir" != "X"; then
423 dnl Potentially add $additional_includedir to $INCNAME.
424 dnl But don't add it
425 dnl 1. if it's the standard /usr/include,
426 dnl 2. if it's /usr/local/include and we are using GCC on Linux,
427 dnl 3. if it's already present in $CPPFLAGS or the already
428 dnl constructed $INCNAME,
429 dnl 4. if it doesn't exist as a directory.
430 if test "X$additional_includedir" != "X/usr/include"; then
431 haveit=
432 if test "X$additional_includedir" = "X/usr/local/include"; then
433 if test -n "$GCC"; then
434 case $host_os in
435 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
436 esac
437 fi
438 fi
439 if test -z "$haveit"; then
440 for x in $CPPFLAGS $INC[]NAME; do
441 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
442 if test "X$x" = "X-I$additional_includedir"; then
443 haveit=yes
444 break
445 fi
446 done
447 if test -z "$haveit"; then
448 if test -d "$additional_includedir"; then
449 dnl Really add $additional_includedir to $INCNAME.
450 INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
451 fi
452 fi
453 fi
454 fi
455 fi
456 dnl Look for dependencies.
457 if test -n "$found_la"; then
458 dnl Read the .la file. It defines the variables
459 dnl dlname, library_names, old_library, dependency_libs, current,
460 dnl age, revision, installed, dlopen, dlpreopen, libdir.
461 save_libdir="$libdir"
462 case "$found_la" in
463 */* | *\\*) . "$found_la" ;;
464 *) . "./$found_la" ;;
465 esac
466 libdir="$save_libdir"
467 dnl We use only dependency_libs.
468 for dep in $dependency_libs; do
469 case "$dep" in
470 -L*)
471 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
472 dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
473 dnl But don't add it
474 dnl 1. if it's the standard /usr/lib,
475 dnl 2. if it's /usr/local/lib and we are using GCC on Linux,
476 dnl 3. if it's already present in $LDFLAGS or the already
477 dnl constructed $LIBNAME,
478 dnl 4. if it doesn't exist as a directory.
479 if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then
480 haveit=
481 if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then
482 if test -n "$GCC"; then
483 case $host_os in
484 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
485 esac
486 fi
487 fi
488 if test -z "$haveit"; then
489 haveit=
490 for x in $LDFLAGS $LIB[]NAME; do
491 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
492 if test "X$x" = "X-L$additional_libdir"; then
493 haveit=yes
494 break
495 fi
496 done
497 if test -z "$haveit"; then
498 if test -d "$additional_libdir"; then
499 dnl Really add $additional_libdir to $LIBNAME.
500 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
501 fi
502 fi
503 haveit=
504 for x in $LDFLAGS $LTLIB[]NAME; do
505 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
506 if test "X$x" = "X-L$additional_libdir"; then
507 haveit=yes
508 break
509 fi
510 done
511 if test -z "$haveit"; then
512 if test -d "$additional_libdir"; then
513 dnl Really add $additional_libdir to $LTLIBNAME.
514 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
515 fi
516 fi
517 fi
518 fi
519 ;;
520 -R*)
521 dir=`echo "X$dep" | sed -e 's/^X-R//'`
522 if test "$enable_rpath" != no; then
523 dnl Potentially add DIR to rpathdirs.
524 dnl The rpathdirs will be appended to $LIBNAME at the end.
525 haveit=
526 for x in $rpathdirs; do
527 if test "X$x" = "X$dir"; then
528 haveit=yes
529 break
530 fi
531 done
532 if test -z "$haveit"; then
533 rpathdirs="$rpathdirs $dir"
534 fi
535 dnl Potentially add DIR to ltrpathdirs.
536 dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
537 haveit=
538 for x in $ltrpathdirs; do
539 if test "X$x" = "X$dir"; then
540 haveit=yes
541 break
542 fi
543 done
544 if test -z "$haveit"; then
545 ltrpathdirs="$ltrpathdirs $dir"
546 fi
547 fi
548 ;;
549 -l*)
550 dnl Handle this in the next round.
551 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
552 ;;
553 *.la)
554 dnl Handle this in the next round. Throw away the .la's
555 dnl directory; it is already contained in a preceding -L
556 dnl option.
557 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
558 ;;
559 *)
560 dnl Most likely an immediate library name.
561 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
562 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
563 ;;
564 esac
565 done
566 fi
567 else
568 dnl Didn't find the library; assume it is in the system directories
569 dnl known to the linker and runtime loader. (All the system
570 dnl directories known to the linker should also be known to the
571 dnl runtime loader, otherwise the system is severely misconfigured.)
572 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
573 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
574 fi
575 fi
576 fi
577 done
578 done
579 if test "X$rpathdirs" != "X"; then
580 if test -n "$acl_hardcode_libdir_separator"; then
581 dnl Weird platform: only the last -rpath option counts, the user must
582 dnl pass all path elements in one option. We can arrange that for a
583 dnl single library, but not when more than one $LIBNAMEs are used.
584 alldirs=
585 for found_dir in $rpathdirs; do
586 alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
587 done
588 dnl Note: acl_hardcode_libdir_flag_spec uses $libdir and $wl.
589 acl_save_libdir="$libdir"
590 libdir="$alldirs"
591 eval flag=\"$acl_hardcode_libdir_flag_spec\"
592 libdir="$acl_save_libdir"
593 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
594 else
595 dnl The -rpath options are cumulative.
596 for found_dir in $rpathdirs; do
597 acl_save_libdir="$libdir"
598 libdir="$found_dir"
599 eval flag=\"$acl_hardcode_libdir_flag_spec\"
600 libdir="$acl_save_libdir"
601 LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
602 done
603 fi
604 fi
605 if test "X$ltrpathdirs" != "X"; then
606 dnl When using libtool, the option that works for both libraries and
607 dnl executables is -R. The -R options are cumulative.
608 for found_dir in $ltrpathdirs; do
609 LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
610 done
611 fi
612])
613
614dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
615dnl unless already present in VAR.
616dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
617dnl contains two or three consecutive elements that belong together.
618AC_DEFUN([AC_LIB_APPENDTOVAR],
619[
620 for element in [$2]; do
621 haveit=
622 for x in $[$1]; do
623 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
624 if test "X$x" = "X$element"; then
625 haveit=yes
626 break
627 fi
628 done
629 if test -z "$haveit"; then
630 [$1]="${[$1]}${[$1]:+ }$element"
631 fi
632 done
633])
634
635dnl For those cases where a variable contains several -L and -l options
636dnl referring to unknown libraries and directories, this macro determines the
637dnl necessary additional linker options for the runtime path.
638dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL])
639dnl sets LDADDVAR to linker options needed together with LIBSVALUE.
640dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed,
641dnl otherwise linking without libtool is assumed.
642AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS],
643[
644 AC_REQUIRE([AC_LIB_RPATH])
645 AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
646 $1=
647 if test "$enable_rpath" != no; then
648 if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
649 dnl Use an explicit option to hardcode directories into the resulting
650 dnl binary.
651 rpathdirs=
652 next=
653 for opt in $2; do
654 if test -n "$next"; then
655 dir="$next"
656 dnl No need to hardcode the standard /usr/lib.
657 if test "X$dir" != "X/usr/$acl_libdirstem"; then
658 rpathdirs="$rpathdirs $dir"
659 fi
660 next=
661 else
662 case $opt in
663 -L) next=yes ;;
664 -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'`
665 dnl No need to hardcode the standard /usr/lib.
666 if test "X$dir" != "X/usr/$acl_libdirstem"; then
667 rpathdirs="$rpathdirs $dir"
668 fi
669 next= ;;
670 *) next= ;;
671 esac
672 fi
673 done
674 if test "X$rpathdirs" != "X"; then
675 if test -n ""$3""; then
676 dnl libtool is used for linking. Use -R options.
677 for dir in $rpathdirs; do
678 $1="${$1}${$1:+ }-R$dir"
679 done
680 else
681 dnl The linker is used for linking directly.
682 if test -n "$acl_hardcode_libdir_separator"; then
683 dnl Weird platform: only the last -rpath option counts, the user
684 dnl must pass all path elements in one option.
685 alldirs=
686 for dir in $rpathdirs; do
687 alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$dir"
688 done
689 acl_save_libdir="$libdir"
690 libdir="$alldirs"
691 eval flag=\"$acl_hardcode_libdir_flag_spec\"
692 libdir="$acl_save_libdir"
693 $1="$flag"
694 else
695 dnl The -rpath options are cumulative.
696 for dir in $rpathdirs; do
697 acl_save_libdir="$libdir"
698 libdir="$dir"
699 eval flag=\"$acl_hardcode_libdir_flag_spec\"
700 libdir="$acl_save_libdir"
701 $1="${$1}${$1:+ }$flag"
702 done
703 fi
704 fi
705 fi
706 fi
707 fi
708 AC_SUBST([$1])
709])
diff --git a/m4/lib-prefix.m4 b/m4/lib-prefix.m4
deleted file mode 100644
index a8684e1..0000000
--- a/m4/lib-prefix.m4
+++ /dev/null
@@ -1,185 +0,0 @@
1# lib-prefix.m4 serial 5 (gettext-0.15)
2dnl Copyright (C) 2001-2005 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved.
6
7dnl From Bruno Haible.
8
9dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
10dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
11dnl require excessive bracketing.
12ifdef([AC_HELP_STRING],
13[AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
14[AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
15
16dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
17dnl to access previously installed libraries. The basic assumption is that
18dnl a user will want packages to use other packages he previously installed
19dnl with the same --prefix option.
20dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
21dnl libraries, but is otherwise very convenient.
22AC_DEFUN([AC_LIB_PREFIX],
23[
24 AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
25 AC_REQUIRE([AC_PROG_CC])
26 AC_REQUIRE([AC_CANONICAL_HOST])
27 AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
28 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
29 dnl By default, look in $includedir and $libdir.
30 use_additional=yes
31 AC_LIB_WITH_FINAL_PREFIX([
32 eval additional_includedir=\"$includedir\"
33 eval additional_libdir=\"$libdir\"
34 ])
35 AC_LIB_ARG_WITH([lib-prefix],
36[ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
37 --without-lib-prefix don't search for libraries in includedir and libdir],
38[
39 if test "X$withval" = "Xno"; then
40 use_additional=no
41 else
42 if test "X$withval" = "X"; then
43 AC_LIB_WITH_FINAL_PREFIX([
44 eval additional_includedir=\"$includedir\"
45 eval additional_libdir=\"$libdir\"
46 ])
47 else
48 additional_includedir="$withval/include"
49 additional_libdir="$withval/$acl_libdirstem"
50 fi
51 fi
52])
53 if test $use_additional = yes; then
54 dnl Potentially add $additional_includedir to $CPPFLAGS.
55 dnl But don't add it
56 dnl 1. if it's the standard /usr/include,
57 dnl 2. if it's already present in $CPPFLAGS,
58 dnl 3. if it's /usr/local/include and we are using GCC on Linux,
59 dnl 4. if it doesn't exist as a directory.
60 if test "X$additional_includedir" != "X/usr/include"; then
61 haveit=
62 for x in $CPPFLAGS; do
63 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
64 if test "X$x" = "X-I$additional_includedir"; then
65 haveit=yes
66 break
67 fi
68 done
69 if test -z "$haveit"; then
70 if test "X$additional_includedir" = "X/usr/local/include"; then
71 if test -n "$GCC"; then
72 case $host_os in
73 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
74 esac
75 fi
76 fi
77 if test -z "$haveit"; then
78 if test -d "$additional_includedir"; then
79 dnl Really add $additional_includedir to $CPPFLAGS.
80 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
81 fi
82 fi
83 fi
84 fi
85 dnl Potentially add $additional_libdir to $LDFLAGS.
86 dnl But don't add it
87 dnl 1. if it's the standard /usr/lib,
88 dnl 2. if it's already present in $LDFLAGS,
89 dnl 3. if it's /usr/local/lib and we are using GCC on Linux,
90 dnl 4. if it doesn't exist as a directory.
91 if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then
92 haveit=
93 for x in $LDFLAGS; do
94 AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
95 if test "X$x" = "X-L$additional_libdir"; then
96 haveit=yes
97 break
98 fi
99 done
100 if test -z "$haveit"; then
101 if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then
102 if test -n "$GCC"; then
103 case $host_os in
104 linux*) haveit=yes;;
105 esac
106 fi
107 fi
108 if test -z "$haveit"; then
109 if test -d "$additional_libdir"; then
110 dnl Really add $additional_libdir to $LDFLAGS.
111 LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
112 fi
113 fi
114 fi
115 fi
116 fi
117])
118
119dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
120dnl acl_final_exec_prefix, containing the values to which $prefix and
121dnl $exec_prefix will expand at the end of the configure script.
122AC_DEFUN([AC_LIB_PREPARE_PREFIX],
123[
124 dnl Unfortunately, prefix and exec_prefix get only finally determined
125 dnl at the end of configure.
126 if test "X$prefix" = "XNONE"; then
127 acl_final_prefix="$ac_default_prefix"
128 else
129 acl_final_prefix="$prefix"
130 fi
131 if test "X$exec_prefix" = "XNONE"; then
132 acl_final_exec_prefix='${prefix}'
133 else
134 acl_final_exec_prefix="$exec_prefix"
135 fi
136 acl_save_prefix="$prefix"
137 prefix="$acl_final_prefix"
138 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
139 prefix="$acl_save_prefix"
140])
141
142dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
143dnl variables prefix and exec_prefix bound to the values they will have
144dnl at the end of the configure script.
145AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
146[
147 acl_save_prefix="$prefix"
148 prefix="$acl_final_prefix"
149 acl_save_exec_prefix="$exec_prefix"
150 exec_prefix="$acl_final_exec_prefix"
151 $1
152 exec_prefix="$acl_save_exec_prefix"
153 prefix="$acl_save_prefix"
154])
155
156dnl AC_LIB_PREPARE_MULTILIB creates a variable acl_libdirstem, containing
157dnl the basename of the libdir, either "lib" or "lib64".
158AC_DEFUN([AC_LIB_PREPARE_MULTILIB],
159[
160 dnl There is no formal standard regarding lib and lib64. The current
161 dnl practice is that on a system supporting 32-bit and 64-bit instruction
162 dnl sets or ABIs, 64-bit libraries go under $prefix/lib64 and 32-bit
163 dnl libraries go under $prefix/lib. We determine the compiler's default
164 dnl mode by looking at the compiler's library search path. If at least
165 dnl of its elements ends in /lib64 or points to a directory whose absolute
166 dnl pathname ends in /lib64, we assume a 64-bit ABI. Otherwise we use the
167 dnl default, namely "lib".
168 acl_libdirstem=lib
169 searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
170 if test -n "$searchpath"; then
171 acl_save_IFS="${IFS= }"; IFS=":"
172 for searchdir in $searchpath; do
173 if test -d "$searchdir"; then
174 case "$searchdir" in
175 */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
176 *) searchdir=`cd "$searchdir" && pwd`
177 case "$searchdir" in
178 */lib64 ) acl_libdirstem=lib64 ;;
179 esac ;;
180 esac
181 fi
182 done
183 IFS="$acl_save_IFS"
184 fi
185])
diff --git a/m4/nls.m4 b/m4/nls.m4
deleted file mode 100644
index 7967cc2..0000000
--- a/m4/nls.m4
+++ /dev/null
@@ -1,31 +0,0 @@
1# nls.m4 serial 3 (gettext-0.15)
2dnl Copyright (C) 1995-2003, 2005-2006 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved.
6dnl
7dnl This file can can be used in projects which are not available under
8dnl the GNU General Public License or the GNU Library General Public
9dnl License but which still want to provide support for the GNU gettext
10dnl functionality.
11dnl Please note that the actual code of the GNU gettext library is covered
12dnl by the GNU Library General Public License, and the rest of the GNU
13dnl gettext package package is covered by the GNU General Public License.
14dnl They are *not* in the public domain.
15
16dnl Authors:
17dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
18dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
19
20AC_PREREQ(2.50)
21
22AC_DEFUN([AM_NLS],
23[
24 AC_MSG_CHECKING([whether NLS is requested])
25 dnl Default is enabled NLS
26 AC_ARG_ENABLE(nls,
27 [ --disable-nls do not use Native Language Support],
28 USE_NLS=$enableval, USE_NLS=yes)
29 AC_MSG_RESULT($USE_NLS)
30 AC_SUBST(USE_NLS)
31])
diff --git a/m4/po.m4 b/m4/po.m4
deleted file mode 100644
index 0734762..0000000
--- a/m4/po.m4
+++ /dev/null
@@ -1,449 +0,0 @@
1# po.m4 serial 15 (gettext-0.17)
2dnl Copyright (C) 1995-2007 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved.
6dnl
7dnl This file can can be used in projects which are not available under
8dnl the GNU General Public License or the GNU Library General Public
9dnl License but which still want to provide support for the GNU gettext
10dnl functionality.
11dnl Please note that the actual code of the GNU gettext library is covered
12dnl by the GNU Library General Public License, and the rest of the GNU
13dnl gettext package package is covered by the GNU General Public License.
14dnl They are *not* in the public domain.
15
16dnl Authors:
17dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
18dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
19
20AC_PREREQ(2.50)
21
22dnl Checks for all prerequisites of the po subdirectory.
23AC_DEFUN([AM_PO_SUBDIRS],
24[
25 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
26 AC_REQUIRE([AC_PROG_INSTALL])dnl
27 AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake
28 AC_REQUIRE([AM_NLS])dnl
29
30 dnl Release version of the gettext macros. This is used to ensure that
31 dnl the gettext macros and po/Makefile.in.in are in sync.
32 AC_SUBST([GETTEXT_MACRO_VERSION], [0.17])
33
34 dnl Perform the following tests also if --disable-nls has been given,
35 dnl because they are needed for "make dist" to work.
36
37 dnl Search for GNU msgfmt in the PATH.
38 dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions.
39 dnl The second test excludes FreeBSD msgfmt.
40 AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
41 [$ac_dir/$ac_word --statistics /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 &&
42 (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
43 :)
44 AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
45
46 dnl Test whether it is GNU msgfmt >= 0.15.
47changequote(,)dnl
48 case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
49 '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;;
50 *) MSGFMT_015=$MSGFMT ;;
51 esac
52changequote([,])dnl
53 AC_SUBST([MSGFMT_015])
54changequote(,)dnl
55 case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
56 '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;;
57 *) GMSGFMT_015=$GMSGFMT ;;
58 esac
59changequote([,])dnl
60 AC_SUBST([GMSGFMT_015])
61
62 dnl Search for GNU xgettext 0.12 or newer in the PATH.
63 dnl The first test excludes Solaris xgettext and early GNU xgettext versions.
64 dnl The second test excludes FreeBSD xgettext.
65 AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
66 [$ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 &&
67 (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)],
68 :)
69 dnl Remove leftover from FreeBSD xgettext call.
70 rm -f messages.po
71
72 dnl Test whether it is GNU xgettext >= 0.15.
73changequote(,)dnl
74 case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
75 '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;;
76 *) XGETTEXT_015=$XGETTEXT ;;
77 esac
78changequote([,])dnl
79 AC_SUBST([XGETTEXT_015])
80
81 dnl Search for GNU msgmerge 0.11 or newer in the PATH.
82 AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge,
83 [$ac_dir/$ac_word --update -q /dev/null /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1], :)
84
85 dnl Installation directories.
86 dnl Autoconf >= 2.60 defines localedir. For older versions of autoconf, we
87 dnl have to define it here, so that it can be used in po/Makefile.
88 test -n "$localedir" || localedir='${datadir}/locale'
89 AC_SUBST([localedir])
90
91 dnl Support for AM_XGETTEXT_OPTION.
92 test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS=
93 AC_SUBST([XGETTEXT_EXTRA_OPTIONS])
94
95 AC_CONFIG_COMMANDS([po-directories], [[
96 for ac_file in $CONFIG_FILES; do
97 # Support "outfile[:infile[:infile...]]"
98 case "$ac_file" in
99 *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
100 esac
101 # PO directories have a Makefile.in generated from Makefile.in.in.
102 case "$ac_file" in */Makefile.in)
103 # Adjust a relative srcdir.
104 ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
105 ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
106 ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
107 # In autoconf-2.13 it is called $ac_given_srcdir.
108 # In autoconf-2.50 it is called $srcdir.
109 test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
110 case "$ac_given_srcdir" in
111 .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
112 /*) top_srcdir="$ac_given_srcdir" ;;
113 *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
114 esac
115 # Treat a directory as a PO directory if and only if it has a
116 # POTFILES.in file. This allows packages to have multiple PO
117 # directories under different names or in different locations.
118 if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
119 rm -f "$ac_dir/POTFILES"
120 test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
121 cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
122 POMAKEFILEDEPS="POTFILES.in"
123 # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend
124 # on $ac_dir but don't depend on user-specified configuration
125 # parameters.
126 if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
127 # The LINGUAS file contains the set of available languages.
128 if test -n "$OBSOLETE_ALL_LINGUAS"; then
129 test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
130 fi
131 ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
132 # Hide the ALL_LINGUAS assigment from automake < 1.5.
133 eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
134 POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
135 else
136 # The set of available languages was given in configure.in.
137 # Hide the ALL_LINGUAS assigment from automake < 1.5.
138 eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
139 fi
140 # Compute POFILES
141 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
142 # Compute UPDATEPOFILES
143 # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
144 # Compute DUMMYPOFILES
145 # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
146 # Compute GMOFILES
147 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
148 case "$ac_given_srcdir" in
149 .) srcdirpre= ;;
150 *) srcdirpre='$(srcdir)/' ;;
151 esac
152 POFILES=
153 UPDATEPOFILES=
154 DUMMYPOFILES=
155 GMOFILES=
156 for lang in $ALL_LINGUAS; do
157 POFILES="$POFILES $srcdirpre$lang.po"
158 UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
159 DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
160 GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
161 done
162 # CATALOGS depends on both $ac_dir and the user's LINGUAS
163 # environment variable.
164 INST_LINGUAS=
165 if test -n "$ALL_LINGUAS"; then
166 for presentlang in $ALL_LINGUAS; do
167 useit=no
168 if test "%UNSET%" != "$LINGUAS"; then
169 desiredlanguages="$LINGUAS"
170 else
171 desiredlanguages="$ALL_LINGUAS"
172 fi
173 for desiredlang in $desiredlanguages; do
174 # Use the presentlang catalog if desiredlang is
175 # a. equal to presentlang, or
176 # b. a variant of presentlang (because in this case,
177 # presentlang can be used as a fallback for messages
178 # which are not translated in the desiredlang catalog).
179 case "$desiredlang" in
180 "$presentlang"*) useit=yes;;
181 esac
182 done
183 if test $useit = yes; then
184 INST_LINGUAS="$INST_LINGUAS $presentlang"
185 fi
186 done
187 fi
188 CATALOGS=
189 if test -n "$INST_LINGUAS"; then
190 for lang in $INST_LINGUAS; do
191 CATALOGS="$CATALOGS $lang.gmo"
192 done
193 fi
194 test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
195 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"
196 for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
197 if test -f "$f"; then
198 case "$f" in
199 *.orig | *.bak | *~) ;;
200 *) cat "$f" >> "$ac_dir/Makefile" ;;
201 esac
202 fi
203 done
204 fi
205 ;;
206 esac
207 done]],
208 [# Capture the value of obsolete ALL_LINGUAS because we need it to compute
209 # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it
210 # from automake < 1.5.
211 eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
212 # Capture the value of LINGUAS because we need it to compute CATALOGS.
213 LINGUAS="${LINGUAS-%UNSET%}"
214 ])
215])
216
217dnl Postprocesses a Makefile in a directory containing PO files.
218AC_DEFUN([AM_POSTPROCESS_PO_MAKEFILE],
219[
220 # When this code is run, in config.status, two variables have already been
221 # set:
222 # - OBSOLETE_ALL_LINGUAS is the value of LINGUAS set in configure.in,
223 # - LINGUAS is the value of the environment variable LINGUAS at configure
224 # time.
225
226changequote(,)dnl
227 # Adjust a relative srcdir.
228 ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
229 ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
230 ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
231 # In autoconf-2.13 it is called $ac_given_srcdir.
232 # In autoconf-2.50 it is called $srcdir.
233 test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
234 case "$ac_given_srcdir" in
235 .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
236 /*) top_srcdir="$ac_given_srcdir" ;;
237 *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
238 esac
239
240 # Find a way to echo strings without interpreting backslash.
241 if test "X`(echo '\t') 2>/dev/null`" = 'X\t'; then
242 gt_echo='echo'
243 else
244 if test "X`(printf '%s\n' '\t') 2>/dev/null`" = 'X\t'; then
245 gt_echo='printf %s\n'
246 else
247 echo_func () {
248 cat <<EOT
249$*
250EOT
251 }
252 gt_echo='echo_func'
253 fi
254 fi
255
256 # A sed script that extracts the value of VARIABLE from a Makefile.
257 sed_x_variable='
258# Test if the hold space is empty.
259x
260s/P/P/
261x
262ta
263# Yes it was empty. Look if we have the expected variable definition.
264/^[ ]*VARIABLE[ ]*=/{
265 # Seen the first line of the variable definition.
266 s/^[ ]*VARIABLE[ ]*=//
267 ba
268}
269bd
270:a
271# Here we are processing a line from the variable definition.
272# Remove comment, more precisely replace it with a space.
273s/#.*$/ /
274# See if the line ends in a backslash.
275tb
276:b
277s/\\$//
278# Print the line, without the trailing backslash.
279p
280tc
281# There was no trailing backslash. The end of the variable definition is
282# reached. Clear the hold space.
283s/^.*$//
284x
285bd
286:c
287# A trailing backslash means that the variable definition continues in the
288# next line. Put a nonempty string into the hold space to indicate this.
289s/^.*$/P/
290x
291:d
292'
293changequote([,])dnl
294
295 # Set POTFILES to the value of the Makefile variable POTFILES.
296 sed_x_POTFILES=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 's/VARIABLE/POTFILES/g'`
297 POTFILES=`sed -n -e "$sed_x_POTFILES" < "$ac_file"`
298 # Compute POTFILES_DEPS as
299 # $(foreach file, $(POTFILES), $(top_srcdir)/$(file))
300 POTFILES_DEPS=
301 for file in $POTFILES; do
302 POTFILES_DEPS="$POTFILES_DEPS "'$(top_srcdir)/'"$file"
303 done
304 POMAKEFILEDEPS=""
305
306 if test -n "$OBSOLETE_ALL_LINGUAS"; then
307 test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
308 fi
309 if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
310 # The LINGUAS file contains the set of available languages.
311 ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
312 POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
313 else
314 # Set ALL_LINGUAS to the value of the Makefile variable LINGUAS.
315 sed_x_LINGUAS=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 's/VARIABLE/LINGUAS/g'`
316 ALL_LINGUAS_=`sed -n -e "$sed_x_LINGUAS" < "$ac_file"`
317 fi
318 # Hide the ALL_LINGUAS assigment from automake < 1.5.
319 eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
320 # Compute POFILES
321 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
322 # Compute UPDATEPOFILES
323 # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
324 # Compute DUMMYPOFILES
325 # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
326 # Compute GMOFILES
327 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
328 # Compute PROPERTIESFILES
329 # as $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).properties)
330 # Compute CLASSFILES
331 # as $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).class)
332 # Compute QMFILES
333 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).qm)
334 # Compute MSGFILES
335 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang)).msg)
336 # Compute RESOURCESDLLFILES
337 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang))/$(DOMAIN).resources.dll)
338 case "$ac_given_srcdir" in
339 .) srcdirpre= ;;
340 *) srcdirpre='$(srcdir)/' ;;
341 esac
342 POFILES=
343 UPDATEPOFILES=
344 DUMMYPOFILES=
345 GMOFILES=
346 PROPERTIESFILES=
347 CLASSFILES=
348 QMFILES=
349 MSGFILES=
350 RESOURCESDLLFILES=
351 for lang in $ALL_LINGUAS; do
352 POFILES="$POFILES $srcdirpre$lang.po"
353 UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
354 DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
355 GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
356 PROPERTIESFILES="$PROPERTIESFILES \$(top_srcdir)/\$(DOMAIN)_$lang.properties"
357 CLASSFILES="$CLASSFILES \$(top_srcdir)/\$(DOMAIN)_$lang.class"
358 QMFILES="$QMFILES $srcdirpre$lang.qm"
359 frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
360 MSGFILES="$MSGFILES $srcdirpre$frobbedlang.msg"
361 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/'`
362 RESOURCESDLLFILES="$RESOURCESDLLFILES $srcdirpre$frobbedlang/\$(DOMAIN).resources.dll"
363 done
364 # CATALOGS depends on both $ac_dir and the user's LINGUAS
365 # environment variable.
366 INST_LINGUAS=
367 if test -n "$ALL_LINGUAS"; then
368 for presentlang in $ALL_LINGUAS; do
369 useit=no
370 if test "%UNSET%" != "$LINGUAS"; then
371 desiredlanguages="$LINGUAS"
372 else
373 desiredlanguages="$ALL_LINGUAS"
374 fi
375 for desiredlang in $desiredlanguages; do
376 # Use the presentlang catalog if desiredlang is
377 # a. equal to presentlang, or
378 # b. a variant of presentlang (because in this case,
379 # presentlang can be used as a fallback for messages
380 # which are not translated in the desiredlang catalog).
381 case "$desiredlang" in
382 "$presentlang"*) useit=yes;;
383 esac
384 done
385 if test $useit = yes; then
386 INST_LINGUAS="$INST_LINGUAS $presentlang"
387 fi
388 done
389 fi
390 CATALOGS=
391 JAVACATALOGS=
392 QTCATALOGS=
393 TCLCATALOGS=
394 CSHARPCATALOGS=
395 if test -n "$INST_LINGUAS"; then
396 for lang in $INST_LINGUAS; do
397 CATALOGS="$CATALOGS $lang.gmo"
398 JAVACATALOGS="$JAVACATALOGS \$(DOMAIN)_$lang.properties"
399 QTCATALOGS="$QTCATALOGS $lang.qm"
400 frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
401 TCLCATALOGS="$TCLCATALOGS $frobbedlang.msg"
402 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/'`
403 CSHARPCATALOGS="$CSHARPCATALOGS $frobbedlang/\$(DOMAIN).resources.dll"
404 done
405 fi
406
407 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"
408 if grep -l '@TCLCATALOGS@' "$ac_file" > /dev/null; then
409 # Add dependencies that cannot be formulated as a simple suffix rule.
410 for lang in $ALL_LINGUAS; do
411 frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
412 cat >> "$ac_file.tmp" <<EOF
413$frobbedlang.msg: $lang.po
414 @echo "\$(MSGFMT) -c --tcl -d \$(srcdir) -l $lang $srcdirpre$lang.po"; \
415 \$(MSGFMT) -c --tcl -d "\$(srcdir)" -l $lang $srcdirpre$lang.po || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
416EOF
417 done
418 fi
419 if grep -l '@CSHARPCATALOGS@' "$ac_file" > /dev/null; then
420 # Add dependencies that cannot be formulated as a simple suffix rule.
421 for lang in $ALL_LINGUAS; do
422 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/'`
423 cat >> "$ac_file.tmp" <<EOF
424$frobbedlang/\$(DOMAIN).resources.dll: $lang.po
425 @echo "\$(MSGFMT) -c --csharp -d \$(srcdir) -l $lang $srcdirpre$lang.po -r \$(DOMAIN)"; \
426 \$(MSGFMT) -c --csharp -d "\$(srcdir)" -l $lang $srcdirpre$lang.po -r "\$(DOMAIN)" || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
427EOF
428 done
429 fi
430 if test -n "$POMAKEFILEDEPS"; then
431 cat >> "$ac_file.tmp" <<EOF
432Makefile: $POMAKEFILEDEPS
433EOF
434 fi
435 mv "$ac_file.tmp" "$ac_file"
436])
437
438dnl Initializes the accumulator used by AM_XGETTEXT_OPTION.
439AC_DEFUN([AM_XGETTEXT_OPTION_INIT],
440[
441 XGETTEXT_EXTRA_OPTIONS=
442])
443
444dnl Registers an option to be passed to xgettext in the po subdirectory.
445AC_DEFUN([AM_XGETTEXT_OPTION],
446[
447 AC_REQUIRE([AM_XGETTEXT_OPTION_INIT])
448 XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS $1"
449])
diff --git a/m4/progtest.m4 b/m4/progtest.m4
deleted file mode 100644
index a56365c..0000000
--- a/m4/progtest.m4
+++ /dev/null
@@ -1,92 +0,0 @@
1# progtest.m4 serial 4 (gettext-0.14.2)
2dnl Copyright (C) 1996-2003, 2005 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved.
6dnl
7dnl This file can can be used in projects which are not available under
8dnl the GNU General Public License or the GNU Library General Public
9dnl License but which still want to provide support for the GNU gettext
10dnl functionality.
11dnl Please note that the actual code of the GNU gettext library is covered
12dnl by the GNU Library General Public License, and the rest of the GNU
13dnl gettext package package is covered by the GNU General Public License.
14dnl They are *not* in the public domain.
15
16dnl Authors:
17dnl Ulrich Drepper <drepper@cygnus.com>, 1996.
18
19AC_PREREQ(2.50)
20
21# Search path for a program which passes the given test.
22
23dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
24dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
25AC_DEFUN([AM_PATH_PROG_WITH_TEST],
26[
27# Prepare PATH_SEPARATOR.
28# The user is always right.
29if test "${PATH_SEPARATOR+set}" != set; then
30 echo "#! /bin/sh" >conf$$.sh
31 echo "exit 0" >>conf$$.sh
32 chmod +x conf$$.sh
33 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
34 PATH_SEPARATOR=';'
35 else
36 PATH_SEPARATOR=:
37 fi
38 rm -f conf$$.sh
39fi
40
41# Find out how to test for executable files. Don't use a zero-byte file,
42# as systems may use methods other than mode bits to determine executability.
43cat >conf$$.file <<_ASEOF
44#! /bin/sh
45exit 0
46_ASEOF
47chmod +x conf$$.file
48if test -x conf$$.file >/dev/null 2>&1; then
49 ac_executable_p="test -x"
50else
51 ac_executable_p="test -f"
52fi
53rm -f conf$$.file
54
55# Extract the first word of "$2", so it can be a program name with args.
56set dummy $2; ac_word=[$]2
57AC_MSG_CHECKING([for $ac_word])
58AC_CACHE_VAL(ac_cv_path_$1,
59[case "[$]$1" in
60 [[\\/]]* | ?:[[\\/]]*)
61 ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
62 ;;
63 *)
64 ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
65 for ac_dir in ifelse([$5], , $PATH, [$5]); do
66 IFS="$ac_save_IFS"
67 test -z "$ac_dir" && ac_dir=.
68 for ac_exec_ext in '' $ac_executable_extensions; do
69 if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
70 echo "$as_me: trying $ac_dir/$ac_word..." >&AS_MESSAGE_LOG_FD
71 if [$3]; then
72 ac_cv_path_$1="$ac_dir/$ac_word$ac_exec_ext"
73 break 2
74 fi
75 fi
76 done
77 done
78 IFS="$ac_save_IFS"
79dnl If no 4th arg is given, leave the cache variable unset,
80dnl so AC_PATH_PROGS will keep looking.
81ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
82])dnl
83 ;;
84esac])dnl
85$1="$ac_cv_path_$1"
86if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
87 AC_MSG_RESULT([$]$1)
88else
89 AC_MSG_RESULT(no)
90fi
91AC_SUBST($1)dnl
92])