diff options
Diffstat (limited to 'meta/packages/popt/popt-1.7')
-rw-r--r-- | meta/packages/popt/popt-1.7/intl.patch | 15 | ||||
-rw-r--r-- | meta/packages/popt/popt-1.7/m4.patch | 2155 |
2 files changed, 2170 insertions, 0 deletions
diff --git a/meta/packages/popt/popt-1.7/intl.patch b/meta/packages/popt/popt-1.7/intl.patch new file mode 100644 index 0000000000..a7becb1b1a --- /dev/null +++ b/meta/packages/popt/popt-1.7/intl.patch | |||
@@ -0,0 +1,15 @@ | |||
1 | |||
2 | # | ||
3 | # Patch managed by http://www.holgerschurig.de/patcher.html | ||
4 | # | ||
5 | |||
6 | --- popt-1.7/Makefile.am~intl | ||
7 | +++ popt-1.7/Makefile.am | ||
8 | @@ -33,6 +33,7 @@ | ||
9 | |||
10 | include_HEADERS = popt.h | ||
11 | lib_LTLIBRARIES = libpopt.la | ||
12 | +libpopt_la_LIBADD = $(LTLIBINTL) | ||
13 | libpopt_la_SOURCES = popt.c findme.c poptparse.c poptconfig.c popthelp.c | ||
14 | |||
15 | man_MANS = popt.3 | ||
diff --git a/meta/packages/popt/popt-1.7/m4.patch b/meta/packages/popt/popt-1.7/m4.patch new file mode 100644 index 0000000000..2a9b2a64f1 --- /dev/null +++ b/meta/packages/popt/popt-1.7/m4.patch | |||
@@ -0,0 +1,2155 @@ | |||
1 | |||
2 | # | ||
3 | # Patch managed by http://www.mn-logistik.de/unsupported/pxa250/patcher | ||
4 | # | ||
5 | |||
6 | --- /dev/null | ||
7 | +++ e2fsprogs-libs-1.34/m4/codeset.m4 | ||
8 | @@ -0,0 +1,23 @@ | ||
9 | +# codeset.m4 serial AM1 (gettext-0.10.40) | ||
10 | +dnl Copyright (C) 2000-2002 Free Software Foundation, Inc. | ||
11 | +dnl This file is free software, distributed under the terms of the GNU | ||
12 | +dnl General Public License. As a special exception to the GNU General | ||
13 | +dnl Public License, this file may be distributed as part of a program | ||
14 | +dnl that contains a configuration script generated by Autoconf, under | ||
15 | +dnl the same distribution terms as the rest of that program. | ||
16 | + | ||
17 | +dnl From Bruno Haible. | ||
18 | + | ||
19 | +AC_DEFUN([AM_LANGINFO_CODESET], | ||
20 | +[ | ||
21 | + AC_CACHE_CHECK([for nl_langinfo and CODESET], am_cv_langinfo_codeset, | ||
22 | + [AC_TRY_LINK([#include <langinfo.h>], | ||
23 | + [char* cs = nl_langinfo(CODESET);], | ||
24 | + am_cv_langinfo_codeset=yes, | ||
25 | + am_cv_langinfo_codeset=no) | ||
26 | + ]) | ||
27 | + if test $am_cv_langinfo_codeset = yes; then | ||
28 | + AC_DEFINE(HAVE_LANGINFO_CODESET, 1, | ||
29 | + [Define if you have <langinfo.h> and nl_langinfo(CODESET).]) | ||
30 | + fi | ||
31 | +]) | ||
32 | --- /dev/null | ||
33 | +++ e2fsprogs-libs-1.34/m4/gettext.m4 | ||
34 | @@ -0,0 +1,587 @@ | ||
35 | +# gettext.m4 serial 17 (gettext-0.11.5) | ||
36 | +dnl Copyright (C) 1995-2002 Free Software Foundation, Inc. | ||
37 | +dnl This file is free software, distributed under the terms of the GNU | ||
38 | +dnl General Public License. As a special exception to the GNU General | ||
39 | +dnl Public License, this file may be distributed as part of a program | ||
40 | +dnl that contains a configuration script generated by Autoconf, under | ||
41 | +dnl the same distribution terms as the rest of that program. | ||
42 | +dnl | ||
43 | +dnl This file can can be used in projects which are not available under | ||
44 | +dnl the GNU General Public License or the GNU Library General Public | ||
45 | +dnl License but which still want to provide support for the GNU gettext | ||
46 | +dnl functionality. | ||
47 | +dnl Please note that the actual code of the GNU gettext library is covered | ||
48 | +dnl by the GNU Library General Public License, and the rest of the GNU | ||
49 | +dnl gettext package package is covered by the GNU General Public License. | ||
50 | +dnl They are *not* in the public domain. | ||
51 | + | ||
52 | +dnl Authors: | ||
53 | +dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000. | ||
54 | +dnl Bruno Haible <haible@clisp.cons.org>, 2000-2002. | ||
55 | + | ||
56 | +dnl Macro to add for using GNU gettext. | ||
57 | + | ||
58 | +dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]). | ||
59 | +dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The | ||
60 | +dnl default (if it is not specified or empty) is 'no-libtool'. | ||
61 | +dnl INTLSYMBOL should be 'external' for packages with no intl directory, | ||
62 | +dnl and 'no-libtool' or 'use-libtool' for packages with an intl directory. | ||
63 | +dnl If INTLSYMBOL is 'use-libtool', then a libtool library | ||
64 | +dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static, | ||
65 | +dnl depending on --{enable,disable}-{shared,static} and on the presence of | ||
66 | +dnl AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library | ||
67 | +dnl $(top_builddir)/intl/libintl.a will be created. | ||
68 | +dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext | ||
69 | +dnl implementations (in libc or libintl) without the ngettext() function | ||
70 | +dnl will be ignored. If NEEDSYMBOL is specified and is | ||
71 | +dnl 'need-formatstring-macros', then GNU gettext implementations that don't | ||
72 | +dnl support the ISO C 99 <inttypes.h> formatstring macros will be ignored. | ||
73 | +dnl INTLDIR is used to find the intl libraries. If empty, | ||
74 | +dnl the value `$(top_builddir)/intl/' is used. | ||
75 | +dnl | ||
76 | +dnl The result of the configuration is one of three cases: | ||
77 | +dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled | ||
78 | +dnl and used. | ||
79 | +dnl Catalog format: GNU --> install in $(datadir) | ||
80 | +dnl Catalog extension: .mo after installation, .gmo in source tree | ||
81 | +dnl 2) GNU gettext has been found in the system's C library. | ||
82 | +dnl Catalog format: GNU --> install in $(datadir) | ||
83 | +dnl Catalog extension: .mo after installation, .gmo in source tree | ||
84 | +dnl 3) No internationalization, always use English msgid. | ||
85 | +dnl Catalog format: none | ||
86 | +dnl Catalog extension: none | ||
87 | +dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur. | ||
88 | +dnl The use of .gmo is historical (it was needed to avoid overwriting the | ||
89 | +dnl GNU format catalogs when building on a platform with an X/Open gettext), | ||
90 | +dnl but we keep it in order not to force irrelevant filename changes on the | ||
91 | +dnl maintainers. | ||
92 | +dnl | ||
93 | +AC_DEFUN([AM_GNU_GETTEXT], | ||
94 | +[ | ||
95 | + dnl Argument checking. | ||
96 | + ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], , | ||
97 | + [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT | ||
98 | +])])])])]) | ||
99 | + ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], , | ||
100 | + [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT | ||
101 | +])])])]) | ||
102 | + define(gt_included_intl, ifelse([$1], [external], [no], [yes])) | ||
103 | + define(gt_libtool_suffix_prefix, ifelse([$1], [use-libtool], [l], [])) | ||
104 | + | ||
105 | + AC_REQUIRE([AM_PO_SUBDIRS])dnl | ||
106 | + ifelse(gt_included_intl, yes, [ | ||
107 | + AC_REQUIRE([AM_INTL_SUBDIR])dnl | ||
108 | + ]) | ||
109 | + | ||
110 | + dnl Prerequisites of AC_LIB_LINKFLAGS_BODY. | ||
111 | + AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) | ||
112 | + AC_REQUIRE([AC_LIB_RPATH]) | ||
113 | + | ||
114 | + dnl Sometimes libintl requires libiconv, so first search for libiconv. | ||
115 | + dnl Ideally we would do this search only after the | ||
116 | + dnl if test "$USE_NLS" = "yes"; then | ||
117 | + dnl if test "$gt_cv_func_gnugettext_libc" != "yes"; then | ||
118 | + dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT | ||
119 | + dnl the configure script would need to contain the same shell code | ||
120 | + dnl again, outside any 'if'. There are two solutions: | ||
121 | + dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'. | ||
122 | + dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE. | ||
123 | + dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not | ||
124 | + dnl documented, we avoid it. | ||
125 | + ifelse(gt_included_intl, yes, , [ | ||
126 | + AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) | ||
127 | + ]) | ||
128 | + | ||
129 | + AC_MSG_CHECKING([whether NLS is requested]) | ||
130 | + dnl Default is enabled NLS | ||
131 | + AC_ARG_ENABLE(nls, | ||
132 | + [ --disable-nls do not use Native Language Support], | ||
133 | + USE_NLS=$enableval, USE_NLS=yes) | ||
134 | + AC_MSG_RESULT($USE_NLS) | ||
135 | + AC_SUBST(USE_NLS) | ||
136 | + | ||
137 | + ifelse(gt_included_intl, yes, [ | ||
138 | + BUILD_INCLUDED_LIBINTL=no | ||
139 | + USE_INCLUDED_LIBINTL=no | ||
140 | + ]) | ||
141 | + LIBINTL= | ||
142 | + LTLIBINTL= | ||
143 | + POSUB= | ||
144 | + | ||
145 | + dnl If we use NLS figure out what method | ||
146 | + if test "$USE_NLS" = "yes"; then | ||
147 | + gt_use_preinstalled_gnugettext=no | ||
148 | + ifelse(gt_included_intl, yes, [ | ||
149 | + AC_MSG_CHECKING([whether included gettext is requested]) | ||
150 | + AC_ARG_WITH(included-gettext, | ||
151 | + [ --with-included-gettext use the GNU gettext library included here], | ||
152 | + nls_cv_force_use_gnu_gettext=$withval, | ||
153 | + nls_cv_force_use_gnu_gettext=no) | ||
154 | + AC_MSG_RESULT($nls_cv_force_use_gnu_gettext) | ||
155 | + | ||
156 | + nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" | ||
157 | + if test "$nls_cv_force_use_gnu_gettext" != "yes"; then | ||
158 | + ]) | ||
159 | + dnl User does not insist on using GNU NLS library. Figure out what | ||
160 | + dnl to use. If GNU gettext is available we use this. Else we have | ||
161 | + dnl to fall back to GNU NLS library. | ||
162 | + | ||
163 | + dnl Add a version number to the cache macros. | ||
164 | + define([gt_api_version], ifelse([$2], [need-formatstring-macros], 3, ifelse([$2], [need-ngettext], 2, 1))) | ||
165 | + define([gt_cv_func_gnugettext_libc], [gt_cv_func_gnugettext]gt_api_version[_libc]) | ||
166 | + define([gt_cv_func_gnugettext_libintl], [gt_cv_func_gnugettext]gt_api_version[_libintl]) | ||
167 | + | ||
168 | + AC_CACHE_CHECK([for GNU gettext in libc], gt_cv_func_gnugettext_libc, | ||
169 | + [AC_TRY_LINK([#include <libintl.h> | ||
170 | +]ifelse([$2], [need-formatstring-macros], | ||
171 | +[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION | ||
172 | +#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1) | ||
173 | +#endif | ||
174 | +changequote(,)dnl | ||
175 | +typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; | ||
176 | +changequote([,])dnl | ||
177 | +], [])[extern int _nl_msg_cat_cntr; | ||
178 | +extern int *_nl_domain_bindings;], | ||
179 | + [bindtextdomain ("", ""); | ||
180 | +return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_domain_bindings], | ||
181 | + gt_cv_func_gnugettext_libc=yes, | ||
182 | + gt_cv_func_gnugettext_libc=no)]) | ||
183 | + | ||
184 | + if test "$gt_cv_func_gnugettext_libc" != "yes"; then | ||
185 | + dnl Sometimes libintl requires libiconv, so first search for libiconv. | ||
186 | + ifelse(gt_included_intl, yes, , [ | ||
187 | + AM_ICONV_LINK | ||
188 | + ]) | ||
189 | + dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL | ||
190 | + dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv]) | ||
191 | + dnl because that would add "-liconv" to LIBINTL and LTLIBINTL | ||
192 | + dnl even if libiconv doesn't exist. | ||
193 | + AC_LIB_LINKFLAGS_BODY([intl]) | ||
194 | + AC_CACHE_CHECK([for GNU gettext in libintl], | ||
195 | + gt_cv_func_gnugettext_libintl, | ||
196 | + [gt_save_CPPFLAGS="$CPPFLAGS" | ||
197 | + CPPFLAGS="$CPPFLAGS $INCINTL" | ||
198 | + gt_save_LIBS="$LIBS" | ||
199 | + LIBS="$LIBS $LIBINTL" | ||
200 | + dnl Now see whether libintl exists and does not depend on libiconv. | ||
201 | + AC_TRY_LINK([#include <libintl.h> | ||
202 | +]ifelse([$2], [need-formatstring-macros], | ||
203 | +[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION | ||
204 | +#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1) | ||
205 | +#endif | ||
206 | +changequote(,)dnl | ||
207 | +typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; | ||
208 | +changequote([,])dnl | ||
209 | +], [])[extern int _nl_msg_cat_cntr; | ||
210 | +extern | ||
211 | +#ifdef __cplusplus | ||
212 | +"C" | ||
213 | +#endif | ||
214 | +const char *_nl_expand_alias ();], | ||
215 | + [bindtextdomain ("", ""); | ||
216 | +return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias (0)], | ||
217 | + gt_cv_func_gnugettext_libintl=yes, | ||
218 | + gt_cv_func_gnugettext_libintl=no) | ||
219 | + dnl Now see whether libintl exists and depends on libiconv. | ||
220 | + if test "$gt_cv_func_gnugettext_libintl" != yes && test -n "$LIBICONV"; then | ||
221 | + LIBS="$LIBS $LIBICONV" | ||
222 | + AC_TRY_LINK([#include <libintl.h> | ||
223 | +]ifelse([$2], [need-formatstring-macros], | ||
224 | +[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION | ||
225 | +#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1) | ||
226 | +#endif | ||
227 | +changequote(,)dnl | ||
228 | +typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; | ||
229 | +changequote([,])dnl | ||
230 | +], [])[extern int _nl_msg_cat_cntr; | ||
231 | +extern | ||
232 | +#ifdef __cplusplus | ||
233 | +"C" | ||
234 | +#endif | ||
235 | +const char *_nl_expand_alias ();], | ||
236 | + [bindtextdomain ("", ""); | ||
237 | +return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias (0)], | ||
238 | + [LIBINTL="$LIBINTL $LIBICONV" | ||
239 | + LTLIBINTL="$LTLIBINTL $LTLIBICONV" | ||
240 | + gt_cv_func_gnugettext_libintl=yes | ||
241 | + ]) | ||
242 | + fi | ||
243 | + CPPFLAGS="$gt_save_CPPFLAGS" | ||
244 | + LIBS="$gt_save_LIBS"]) | ||
245 | + fi | ||
246 | + | ||
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 test "$gt_cv_func_gnugettext_libc" = "yes" \ | ||
252 | + || { test "$gt_cv_func_gnugettext_libintl" = "yes" \ | ||
253 | + && test "$PACKAGE" != gettext; }; then | ||
254 | + gt_use_preinstalled_gnugettext=yes | ||
255 | + else | ||
256 | + dnl Reset the values set by searching for libintl. | ||
257 | + LIBINTL= | ||
258 | + LTLIBINTL= | ||
259 | + INCINTL= | ||
260 | + fi | ||
261 | + | ||
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 | + | ||
270 | + if test "$nls_cv_use_gnu_gettext" = "yes"; then | ||
271 | + dnl Mark actions used to generate GNU NLS library. | ||
272 | + INTLOBJS="\$(GETTOBJS)" | ||
273 | + BUILD_INCLUDED_LIBINTL=yes | ||
274 | + USE_INCLUDED_LIBINTL=yes | ||
275 | + LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV" | ||
276 | + LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV" | ||
277 | + LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'` | ||
278 | + fi | ||
279 | + | ||
280 | + if test "$gt_use_preinstalled_gnugettext" = "yes" \ | ||
281 | + || test "$nls_cv_use_gnu_gettext" = "yes"; then | ||
282 | + dnl Mark actions to use GNU gettext tools. | ||
283 | + CATOBJEXT=.gmo | ||
284 | + fi | ||
285 | + ]) | ||
286 | + | ||
287 | + if test "$gt_use_preinstalled_gnugettext" = "yes" \ | ||
288 | + || test "$nls_cv_use_gnu_gettext" = "yes"; then | ||
289 | + AC_DEFINE(ENABLE_NLS, 1, | ||
290 | + [Define to 1 if translation of program messages to the user's native language | ||
291 | + is requested.]) | ||
292 | + else | ||
293 | + USE_NLS=no | ||
294 | + fi | ||
295 | + fi | ||
296 | + | ||
297 | + if test "$USE_NLS" = "yes"; then | ||
298 | + | ||
299 | + if test "$gt_use_preinstalled_gnugettext" = "yes"; then | ||
300 | + if test "$gt_cv_func_gnugettext_libintl" = "yes"; then | ||
301 | + AC_MSG_CHECKING([how to link with libintl]) | ||
302 | + AC_MSG_RESULT([$LIBINTL]) | ||
303 | + AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL]) | ||
304 | + fi | ||
305 | + | ||
306 | + dnl For backward compatibility. Some packages may be using this. | ||
307 | + AC_DEFINE(HAVE_GETTEXT, 1, | ||
308 | + [Define if the GNU gettext() function is already present or preinstalled.]) | ||
309 | + AC_DEFINE(HAVE_DCGETTEXT, 1, | ||
310 | + [Define if the GNU dcgettext() function is already present or preinstalled.]) | ||
311 | + fi | ||
312 | + | ||
313 | + dnl We need to process the po/ directory. | ||
314 | + POSUB=po | ||
315 | + fi | ||
316 | + | ||
317 | + ifelse(gt_included_intl, yes, [ | ||
318 | + dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL | ||
319 | + dnl to 'yes' because some of the testsuite requires it. | ||
320 | + if test "$PACKAGE" = gettext; then | ||
321 | + BUILD_INCLUDED_LIBINTL=yes | ||
322 | + fi | ||
323 | + | ||
324 | + dnl Make all variables we use known to autoconf. | ||
325 | + AC_SUBST(BUILD_INCLUDED_LIBINTL) | ||
326 | + AC_SUBST(USE_INCLUDED_LIBINTL) | ||
327 | + AC_SUBST(CATOBJEXT) | ||
328 | + AC_SUBST(INTLOBJS) | ||
329 | + | ||
330 | + dnl For backward compatibility. Some configure.ins may be using this. | ||
331 | + nls_cv_header_intl= | ||
332 | + nls_cv_header_libgt= | ||
333 | + | ||
334 | + dnl For backward compatibility. Some Makefiles may be using this. | ||
335 | + DATADIRNAME=share | ||
336 | + AC_SUBST(DATADIRNAME) | ||
337 | + | ||
338 | + dnl For backward compatibility. Some Makefiles may be using this. | ||
339 | + INSTOBJEXT=.mo | ||
340 | + AC_SUBST(INSTOBJEXT) | ||
341 | + | ||
342 | + dnl For backward compatibility. Some Makefiles may be using this. | ||
343 | + GENCAT=gencat | ||
344 | + AC_SUBST(GENCAT) | ||
345 | + | ||
346 | + dnl Enable libtool support if the surrounding package wishes it. | ||
347 | + INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix | ||
348 | + AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX) | ||
349 | + ]) | ||
350 | + | ||
351 | + dnl For backward compatibility. Some Makefiles may be using this. | ||
352 | + INTLLIBS="$LIBINTL" | ||
353 | + AC_SUBST(INTLLIBS) | ||
354 | + | ||
355 | + dnl Make all documented variables known to autoconf. | ||
356 | + AC_SUBST(LIBINTL) | ||
357 | + AC_SUBST(LTLIBINTL) | ||
358 | + AC_SUBST(POSUB) | ||
359 | +]) | ||
360 | + | ||
361 | + | ||
362 | +dnl Checks for all prerequisites of the po subdirectory, | ||
363 | +dnl except for USE_NLS. | ||
364 | +AC_DEFUN([AM_PO_SUBDIRS], | ||
365 | +[ | ||
366 | + AC_REQUIRE([AC_PROG_MAKE_SET])dnl | ||
367 | + AC_REQUIRE([AC_PROG_INSTALL])dnl | ||
368 | + AC_REQUIRE([AM_MKINSTALLDIRS])dnl | ||
369 | + | ||
370 | + dnl Perform the following tests also if --disable-nls has been given, | ||
371 | + dnl because they are needed for "make dist" to work. | ||
372 | + | ||
373 | + dnl Search for GNU msgfmt in the PATH. | ||
374 | + dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions. | ||
375 | + dnl The second test excludes FreeBSD msgfmt. | ||
376 | + AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, | ||
377 | + [$ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1 && | ||
378 | + (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)], | ||
379 | + :) | ||
380 | + AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) | ||
381 | + | ||
382 | + dnl Search for GNU xgettext 0.11 or newer in the PATH. | ||
383 | + dnl The first test excludes Solaris xgettext and early GNU xgettext versions. | ||
384 | + dnl The second test excludes FreeBSD xgettext. | ||
385 | + AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, | ||
386 | + [$ac_dir/$ac_word --omit-header --copyright-holder= /dev/null >/dev/null 2>&1 && | ||
387 | + (if $ac_dir/$ac_word --omit-header --copyright-holder= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)], | ||
388 | + :) | ||
389 | + dnl Remove leftover from FreeBSD xgettext call. | ||
390 | + rm -f messages.po | ||
391 | + | ||
392 | + dnl Search for GNU msgmerge 0.11 or newer in the PATH. | ||
393 | + AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge, | ||
394 | + [$ac_dir/$ac_word --update -q /dev/null /dev/null >/dev/null 2>&1], :) | ||
395 | + | ||
396 | + dnl This could go away some day; the PATH_PROG_WITH_TEST already does it. | ||
397 | + dnl Test whether we really found GNU msgfmt. | ||
398 | + if test "$GMSGFMT" != ":"; then | ||
399 | + dnl If it is no GNU msgfmt we define it as : so that the | ||
400 | + dnl Makefiles still can work. | ||
401 | + if $GMSGFMT --statistics /dev/null >/dev/null 2>&1 && | ||
402 | + (if $GMSGFMT --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then | ||
403 | + : ; | ||
404 | + else | ||
405 | + GMSGFMT=`echo "$GMSGFMT" | sed -e 's,^.*/,,'` | ||
406 | + AC_MSG_RESULT( | ||
407 | + [found $GMSGFMT program is not GNU msgfmt; ignore it]) | ||
408 | + GMSGFMT=":" | ||
409 | + fi | ||
410 | + fi | ||
411 | + | ||
412 | + dnl This could go away some day; the PATH_PROG_WITH_TEST already does it. | ||
413 | + dnl Test whether we really found GNU xgettext. | ||
414 | + if test "$XGETTEXT" != ":"; then | ||
415 | + dnl If it is no GNU xgettext we define it as : so that the | ||
416 | + dnl Makefiles still can work. | ||
417 | + if $XGETTEXT --omit-header --copyright-holder= /dev/null >/dev/null 2>&1 && | ||
418 | + (if $XGETTEXT --omit-header --copyright-holder= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then | ||
419 | + : ; | ||
420 | + else | ||
421 | + AC_MSG_RESULT( | ||
422 | + [found xgettext program is not GNU xgettext; ignore it]) | ||
423 | + XGETTEXT=":" | ||
424 | + fi | ||
425 | + dnl Remove leftover from FreeBSD xgettext call. | ||
426 | + rm -f messages.po | ||
427 | + fi | ||
428 | + | ||
429 | + AC_OUTPUT_COMMANDS([ | ||
430 | + for ac_file in $CONFIG_FILES; do | ||
431 | + # Support "outfile[:infile[:infile...]]" | ||
432 | + case "$ac_file" in | ||
433 | + *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; | ||
434 | + esac | ||
435 | + # PO directories have a Makefile.in generated from Makefile.in.in. | ||
436 | + case "$ac_file" in */Makefile.in) | ||
437 | + # Adjust a relative srcdir. | ||
438 | + ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` | ||
439 | + ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`" | ||
440 | + ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` | ||
441 | + # In autoconf-2.13 it is called $ac_given_srcdir. | ||
442 | + # In autoconf-2.50 it is called $srcdir. | ||
443 | + test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir" | ||
444 | + case "$ac_given_srcdir" in | ||
445 | + .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;; | ||
446 | + /*) top_srcdir="$ac_given_srcdir" ;; | ||
447 | + *) top_srcdir="$ac_dots$ac_given_srcdir" ;; | ||
448 | + esac | ||
449 | + if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then | ||
450 | + rm -f "$ac_dir/POTFILES" | ||
451 | + test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES" | ||
452 | + cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES" | ||
453 | + # ALL_LINGUAS, POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES depend | ||
454 | + # on $ac_dir but don't depend on user-specified configuration | ||
455 | + # parameters. | ||
456 | + if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then | ||
457 | + # The LINGUAS file contains the set of available languages. | ||
458 | + if test -n "$ALL_LINGUAS"; then | ||
459 | + test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete" | ||
460 | + fi | ||
461 | + ALL_LINGUAS_=`sed -e "/^#/d" "$ac_given_srcdir/$ac_dir/LINGUAS"` | ||
462 | + # Hide the ALL_LINGUAS assigment from automake. | ||
463 | + eval 'ALL_LINGUAS''=$ALL_LINGUAS_' | ||
464 | + fi | ||
465 | + case "$ac_given_srcdir" in | ||
466 | + .) srcdirpre= ;; | ||
467 | + *) srcdirpre='$(srcdir)/' ;; | ||
468 | + esac | ||
469 | + POFILES= | ||
470 | + GMOFILES= | ||
471 | + UPDATEPOFILES= | ||
472 | + DUMMYPOFILES= | ||
473 | + for lang in $ALL_LINGUAS; do | ||
474 | + POFILES="$POFILES $srcdirpre$lang.po" | ||
475 | + GMOFILES="$GMOFILES $srcdirpre$lang.gmo" | ||
476 | + UPDATEPOFILES="$UPDATEPOFILES $lang.po-update" | ||
477 | + DUMMYPOFILES="$DUMMYPOFILES $lang.nop" | ||
478 | + done | ||
479 | + # CATALOGS depends on both $ac_dir and the user's LINGUAS | ||
480 | + # environment variable. | ||
481 | + INST_LINGUAS= | ||
482 | + if test -n "$ALL_LINGUAS"; then | ||
483 | + for presentlang in $ALL_LINGUAS; do | ||
484 | + useit=no | ||
485 | + if test "%UNSET%" != "$LINGUAS"; then | ||
486 | + desiredlanguages="$LINGUAS" | ||
487 | + else | ||
488 | + desiredlanguages="$ALL_LINGUAS" | ||
489 | + fi | ||
490 | + for desiredlang in $desiredlanguages; do | ||
491 | + # Use the presentlang catalog if desiredlang is | ||
492 | + # a. equal to presentlang, or | ||
493 | + # b. a variant of presentlang (because in this case, | ||
494 | + # presentlang can be used as a fallback for messages | ||
495 | + # which are not translated in the desiredlang catalog). | ||
496 | + case "$desiredlang" in | ||
497 | + "$presentlang"*) useit=yes;; | ||
498 | + esac | ||
499 | + done | ||
500 | + if test $useit = yes; then | ||
501 | + INST_LINGUAS="$INST_LINGUAS $presentlang" | ||
502 | + fi | ||
503 | + done | ||
504 | + fi | ||
505 | + CATALOGS= | ||
506 | + if test -n "$INST_LINGUAS"; then | ||
507 | + for lang in $INST_LINGUAS; do | ||
508 | + CATALOGS="$CATALOGS $lang.gmo" | ||
509 | + done | ||
510 | + fi | ||
511 | + test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile" | ||
512 | + sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile" | ||
513 | + for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do | ||
514 | + if test -f "$f"; then | ||
515 | + case "$f" in | ||
516 | + *.orig | *.bak | *~) ;; | ||
517 | + *) cat "$f" >> "$ac_dir/Makefile" ;; | ||
518 | + esac | ||
519 | + fi | ||
520 | + done | ||
521 | + fi | ||
522 | + ;; | ||
523 | + esac | ||
524 | + done], | ||
525 | + [# Capture the value of obsolete ALL_LINGUAS because we need it to compute | ||
526 | + # POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES, CATALOGS. But hide it | ||
527 | + # from automake. | ||
528 | + eval 'ALL_LINGUAS''="$ALL_LINGUAS"' | ||
529 | + # Capture the value of LINGUAS because we need it to compute CATALOGS. | ||
530 | + LINGUAS="${LINGUAS-%UNSET%}" | ||
531 | + ]) | ||
532 | +]) | ||
533 | + | ||
534 | + | ||
535 | +dnl Checks for all prerequisites of the intl subdirectory, | ||
536 | +dnl except for INTL_LIBTOOL_SUFFIX_PREFIX (and possibly LIBTOOL), INTLOBJS, | ||
537 | +dnl USE_INCLUDED_LIBINTL, BUILD_INCLUDED_LIBINTL. | ||
538 | +AC_DEFUN([AM_INTL_SUBDIR], | ||
539 | +[ | ||
540 | + AC_REQUIRE([AC_PROG_INSTALL])dnl | ||
541 | + AC_REQUIRE([AM_MKINSTALLDIRS])dnl | ||
542 | + AC_REQUIRE([AC_PROG_CC])dnl | ||
543 | + AC_REQUIRE([AC_CANONICAL_HOST])dnl | ||
544 | + AC_REQUIRE([AC_PROG_RANLIB])dnl | ||
545 | + AC_REQUIRE([AC_ISC_POSIX])dnl | ||
546 | + AC_REQUIRE([AC_HEADER_STDC])dnl | ||
547 | + AC_REQUIRE([AC_C_CONST])dnl | ||
548 | + AC_REQUIRE([AC_C_INLINE])dnl | ||
549 | + AC_REQUIRE([AC_TYPE_OFF_T])dnl | ||
550 | + AC_REQUIRE([AC_TYPE_SIZE_T])dnl | ||
551 | + AC_REQUIRE([AC_FUNC_ALLOCA])dnl | ||
552 | + AC_REQUIRE([AC_FUNC_MMAP])dnl | ||
553 | + AC_REQUIRE([jm_GLIBC21])dnl | ||
554 | + AC_REQUIRE([gt_INTDIV0])dnl | ||
555 | + AC_REQUIRE([jm_AC_TYPE_UINTMAX_T])dnl | ||
556 | + AC_REQUIRE([gt_HEADER_INTTYPES_H])dnl | ||
557 | + AC_REQUIRE([gt_INTTYPES_PRI])dnl | ||
558 | + | ||
559 | + AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h stddef.h \ | ||
560 | +stdlib.h string.h unistd.h sys/param.h]) | ||
561 | + AC_CHECK_FUNCS([feof_unlocked fgets_unlocked getc_unlocked getcwd getegid \ | ||
562 | +geteuid getgid getuid mempcpy munmap putenv setenv setlocale stpcpy \ | ||
563 | +strcasecmp strdup strtoul tsearch __argz_count __argz_stringify __argz_next]) | ||
564 | + | ||
565 | + AM_ICONV | ||
566 | + AM_LANGINFO_CODESET | ||
567 | + if test $ac_cv_header_locale_h = yes; then | ||
568 | + AM_LC_MESSAGES | ||
569 | + fi | ||
570 | + | ||
571 | + dnl intl/plural.c is generated from intl/plural.y. It requires bison, | ||
572 | + dnl because plural.y uses bison specific features. It requires at least | ||
573 | + dnl bison-1.26 because earlier versions generate a plural.c that doesn't | ||
574 | + dnl compile. | ||
575 | + dnl bison is only needed for the maintainer (who touches plural.y). But in | ||
576 | + dnl order to avoid separate Makefiles or --enable-maintainer-mode, we put | ||
577 | + dnl the rule in general Makefile. Now, some people carelessly touch the | ||
578 | + dnl files or have a broken "make" program, hence the plural.c rule will | ||
579 | + dnl sometimes fire. To avoid an error, defines BISON to ":" if it is not | ||
580 | + dnl present or too old. | ||
581 | + AC_CHECK_PROGS([INTLBISON], [bison]) | ||
582 | + if test -z "$INTLBISON"; then | ||
583 | + ac_verc_fail=yes | ||
584 | + else | ||
585 | + dnl Found it, now check the version. | ||
586 | + AC_MSG_CHECKING([version of bison]) | ||
587 | +changequote(<<,>>)dnl | ||
588 | + ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'` | ||
589 | + case $ac_prog_version in | ||
590 | + '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; | ||
591 | + 1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*) | ||
592 | +changequote([,])dnl | ||
593 | + ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; | ||
594 | + *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; | ||
595 | + esac | ||
596 | + AC_MSG_RESULT([$ac_prog_version]) | ||
597 | + fi | ||
598 | + if test $ac_verc_fail = yes; then | ||
599 | + INTLBISON=: | ||
600 | + fi | ||
601 | +]) | ||
602 | + | ||
603 | + | ||
604 | +AC_DEFUN([AM_MKINSTALLDIRS], | ||
605 | +[ | ||
606 | + dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly | ||
607 | + dnl find the mkinstalldirs script in another subdir but $(top_srcdir). | ||
608 | + dnl Try to locate is. | ||
609 | + MKINSTALLDIRS= | ||
610 | + if test -n "$ac_aux_dir"; then | ||
611 | + MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" | ||
612 | + fi | ||
613 | + if test -z "$MKINSTALLDIRS"; then | ||
614 | + MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs" | ||
615 | + fi | ||
616 | + AC_SUBST(MKINSTALLDIRS) | ||
617 | +]) | ||
618 | + | ||
619 | + | ||
620 | +dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version]) | ||
621 | +AC_DEFUN([AM_GNU_GETTEXT_VERSION], []) | ||
622 | --- /dev/null | ||
623 | +++ e2fsprogs-libs-1.34/m4/glibc21.m4 | ||
624 | @@ -0,0 +1,32 @@ | ||
625 | +# glibc21.m4 serial 2 (fileutils-4.1.3, gettext-0.10.40) | ||
626 | +dnl Copyright (C) 2000-2002 Free Software Foundation, Inc. | ||
627 | +dnl This file is free software, distributed under the terms of the GNU | ||
628 | +dnl General Public License. As a special exception to the GNU General | ||
629 | +dnl Public License, this file may be distributed as part of a program | ||
630 | +dnl that contains a configuration script generated by Autoconf, under | ||
631 | +dnl the same distribution terms as the rest of that program. | ||
632 | + | ||
633 | +# Test for the GNU C Library, version 2.1 or newer. | ||
634 | +# From Bruno Haible. | ||
635 | + | ||
636 | +AC_DEFUN([jm_GLIBC21], | ||
637 | + [ | ||
638 | + AC_CACHE_CHECK(whether we are using the GNU C Library 2.1 or newer, | ||
639 | + ac_cv_gnu_library_2_1, | ||
640 | + [AC_EGREP_CPP([Lucky GNU user], | ||
641 | + [ | ||
642 | +#include <features.h> | ||
643 | +#ifdef __GNU_LIBRARY__ | ||
644 | + #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2) | ||
645 | + Lucky GNU user | ||
646 | + #endif | ||
647 | +#endif | ||
648 | + ], | ||
649 | + ac_cv_gnu_library_2_1=yes, | ||
650 | + ac_cv_gnu_library_2_1=no) | ||
651 | + ] | ||
652 | + ) | ||
653 | + AC_SUBST(GLIBC21) | ||
654 | + GLIBC21="$ac_cv_gnu_library_2_1" | ||
655 | + ] | ||
656 | +) | ||
657 | --- /dev/null | ||
658 | +++ e2fsprogs-libs-1.34/m4/glib.m4 | ||
659 | @@ -0,0 +1,196 @@ | ||
660 | +# Configure paths for GLIB | ||
661 | +# Owen Taylor 97-11-3 | ||
662 | + | ||
663 | +dnl AM_PATH_GLIB([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]]) | ||
664 | +dnl Test for GLIB, and define GLIB_CFLAGS and GLIB_LIBS, if "gmodule" or | ||
665 | +dnl gthread is specified in MODULES, pass to glib-config | ||
666 | +dnl | ||
667 | +AC_DEFUN(AM_PATH_GLIB, | ||
668 | +[dnl | ||
669 | +dnl Get the cflags and libraries from the glib-config script | ||
670 | +dnl | ||
671 | +AC_ARG_WITH(glib-prefix,[ --with-glib-prefix=PFX Prefix where GLIB is installed (optional)], | ||
672 | + glib_config_prefix="$withval", glib_config_prefix="") | ||
673 | +AC_ARG_WITH(glib-exec-prefix,[ --with-glib-exec-prefix=PFX Exec prefix where GLIB is installed (optional)], | ||
674 | + glib_config_exec_prefix="$withval", glib_config_exec_prefix="") | ||
675 | +AC_ARG_ENABLE(glibtest, [ --disable-glibtest Do not try to compile and run a test GLIB program], | ||
676 | + , enable_glibtest=yes) | ||
677 | + | ||
678 | + if test x$glib_config_exec_prefix != x ; then | ||
679 | + glib_config_args="$glib_config_args --exec-prefix=$glib_config_exec_prefix" | ||
680 | + if test x${GLIB_CONFIG+set} != xset ; then | ||
681 | + GLIB_CONFIG=$glib_config_exec_prefix/bin/glib-config | ||
682 | + fi | ||
683 | + fi | ||
684 | + if test x$glib_config_prefix != x ; then | ||
685 | + glib_config_args="$glib_config_args --prefix=$glib_config_prefix" | ||
686 | + if test x${GLIB_CONFIG+set} != xset ; then | ||
687 | + GLIB_CONFIG=$glib_config_prefix/bin/glib-config | ||
688 | + fi | ||
689 | + fi | ||
690 | + | ||
691 | + for module in . $4 | ||
692 | + do | ||
693 | + case "$module" in | ||
694 | + gmodule) | ||
695 | + glib_config_args="$glib_config_args gmodule" | ||
696 | + ;; | ||
697 | + gthread) | ||
698 | + glib_config_args="$glib_config_args gthread" | ||
699 | + ;; | ||
700 | + esac | ||
701 | + done | ||
702 | + | ||
703 | + AC_PATH_PROG(GLIB_CONFIG, glib-config, no) | ||
704 | + min_glib_version=ifelse([$1], ,0.99.7,$1) | ||
705 | + AC_MSG_CHECKING(for GLIB - version >= $min_glib_version) | ||
706 | + no_glib="" | ||
707 | + if test "$GLIB_CONFIG" = "no" ; then | ||
708 | + no_glib=yes | ||
709 | + else | ||
710 | + GLIB_CFLAGS=`$GLIB_CONFIG $glib_config_args --cflags` | ||
711 | + GLIB_LIBS=`$GLIB_CONFIG $glib_config_args --libs` | ||
712 | + glib_config_major_version=`$GLIB_CONFIG $glib_config_args --version | \ | ||
713 | + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` | ||
714 | + glib_config_minor_version=`$GLIB_CONFIG $glib_config_args --version | \ | ||
715 | + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` | ||
716 | + glib_config_micro_version=`$GLIB_CONFIG $glib_config_args --version | \ | ||
717 | + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` | ||
718 | + if test "x$enable_glibtest" = "xyes" ; then | ||
719 | + ac_save_CFLAGS="$CFLAGS" | ||
720 | + ac_save_LIBS="$LIBS" | ||
721 | + CFLAGS="$CFLAGS $GLIB_CFLAGS" | ||
722 | + LIBS="$GLIB_LIBS $LIBS" | ||
723 | +dnl | ||
724 | +dnl Now check if the installed GLIB is sufficiently new. (Also sanity | ||
725 | +dnl checks the results of glib-config to some extent | ||
726 | +dnl | ||
727 | + rm -f conf.glibtest | ||
728 | + AC_TRY_RUN([ | ||
729 | +#include <glib.h> | ||
730 | +#include <stdio.h> | ||
731 | +#include <stdlib.h> | ||
732 | + | ||
733 | +int | ||
734 | +main () | ||
735 | +{ | ||
736 | + int major, minor, micro; | ||
737 | + char *tmp_version; | ||
738 | + | ||
739 | + system ("touch conf.glibtest"); | ||
740 | + | ||
741 | + /* HP/UX 9 (%@#!) writes to sscanf strings */ | ||
742 | + tmp_version = g_strdup("$min_glib_version"); | ||
743 | + if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { | ||
744 | + printf("%s, bad version string\n", "$min_glib_version"); | ||
745 | + exit(1); | ||
746 | + } | ||
747 | + | ||
748 | + if ((glib_major_version != $glib_config_major_version) || | ||
749 | + (glib_minor_version != $glib_config_minor_version) || | ||
750 | + (glib_micro_version != $glib_config_micro_version)) | ||
751 | + { | ||
752 | + printf("\n*** 'glib-config --version' returned %d.%d.%d, but GLIB (%d.%d.%d)\n", | ||
753 | + $glib_config_major_version, $glib_config_minor_version, $glib_config_micro_version, | ||
754 | + glib_major_version, glib_minor_version, glib_micro_version); | ||
755 | + printf ("*** was found! If glib-config was correct, then it is best\n"); | ||
756 | + printf ("*** to remove the old version of GLIB. You may also be able to fix the error\n"); | ||
757 | + printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n"); | ||
758 | + printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n"); | ||
759 | + printf("*** required on your system.\n"); | ||
760 | + printf("*** If glib-config was wrong, set the environment variable GLIB_CONFIG\n"); | ||
761 | + printf("*** to point to the correct copy of glib-config, and remove the file config.cache\n"); | ||
762 | + printf("*** before re-running configure\n"); | ||
763 | + } | ||
764 | + else if ((glib_major_version != GLIB_MAJOR_VERSION) || | ||
765 | + (glib_minor_version != GLIB_MINOR_VERSION) || | ||
766 | + (glib_micro_version != GLIB_MICRO_VERSION)) | ||
767 | + { | ||
768 | + printf("*** GLIB header files (version %d.%d.%d) do not match\n", | ||
769 | + GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION, GLIB_MICRO_VERSION); | ||
770 | + printf("*** library (version %d.%d.%d)\n", | ||
771 | + glib_major_version, glib_minor_version, glib_micro_version); | ||
772 | + } | ||
773 | + else | ||
774 | + { | ||
775 | + if ((glib_major_version > major) || | ||
776 | + ((glib_major_version == major) && (glib_minor_version > minor)) || | ||
777 | + ((glib_major_version == major) && (glib_minor_version == minor) && (glib_micro_version >= micro))) | ||
778 | + { | ||
779 | + return 0; | ||
780 | + } | ||
781 | + else | ||
782 | + { | ||
783 | + printf("\n*** An old version of GLIB (%d.%d.%d) was found.\n", | ||
784 | + glib_major_version, glib_minor_version, glib_micro_version); | ||
785 | + printf("*** You need a version of GLIB newer than %d.%d.%d. The latest version of\n", | ||
786 | + major, minor, micro); | ||
787 | + printf("*** GLIB is always available from ftp://ftp.gtk.org.\n"); | ||
788 | + printf("***\n"); | ||
789 | + printf("*** If you have already installed a sufficiently new version, this error\n"); | ||
790 | + printf("*** probably means that the wrong copy of the glib-config shell script is\n"); | ||
791 | + printf("*** being found. The easiest way to fix this is to remove the old version\n"); | ||
792 | + printf("*** of GLIB, but you can also set the GLIB_CONFIG environment to point to the\n"); | ||
793 | + printf("*** correct copy of glib-config. (In this case, you will have to\n"); | ||
794 | + printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n"); | ||
795 | + printf("*** so that the correct libraries are found at run-time))\n"); | ||
796 | + } | ||
797 | + } | ||
798 | + return 1; | ||
799 | +} | ||
800 | +],, no_glib=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) | ||
801 | + CFLAGS="$ac_save_CFLAGS" | ||
802 | + LIBS="$ac_save_LIBS" | ||
803 | + fi | ||
804 | + fi | ||
805 | + if test "x$no_glib" = x ; then | ||
806 | + AC_MSG_RESULT(yes) | ||
807 | + ifelse([$2], , :, [$2]) | ||
808 | + else | ||
809 | + AC_MSG_RESULT(no) | ||
810 | + if test "$GLIB_CONFIG" = "no" ; then | ||
811 | + echo "*** The glib-config script installed by GLIB could not be found" | ||
812 | + echo "*** If GLIB was installed in PREFIX, make sure PREFIX/bin is in" | ||
813 | + echo "*** your path, or set the GLIB_CONFIG environment variable to the" | ||
814 | + echo "*** full path to glib-config." | ||
815 | + else | ||
816 | + if test -f conf.glibtest ; then | ||
817 | + : | ||
818 | + else | ||
819 | + echo "*** Could not run GLIB test program, checking why..." | ||
820 | + CFLAGS="$CFLAGS $GLIB_CFLAGS" | ||
821 | + LIBS="$LIBS $GLIB_LIBS" | ||
822 | + AC_TRY_LINK([ | ||
823 | +#include <glib.h> | ||
824 | +#include <stdio.h> | ||
825 | +], [ return ((glib_major_version) || (glib_minor_version) || (glib_micro_version)); ], | ||
826 | + [ echo "*** The test program compiled, but did not run. This usually means" | ||
827 | + echo "*** that the run-time linker is not finding GLIB or finding the wrong" | ||
828 | + echo "*** version of GLIB. If it is not finding GLIB, you'll need to set your" | ||
829 | + echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" | ||
830 | + echo "*** to the installed location Also, make sure you have run ldconfig if that" | ||
831 | + echo "*** is required on your system" | ||
832 | + echo "***" | ||
833 | + echo "*** If you have an old version installed, it is best to remove it, although" | ||
834 | + echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" | ||
835 | + echo "***" | ||
836 | + echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that" | ||
837 | + echo "*** came with the system with the command" | ||
838 | + echo "***" | ||
839 | + echo "*** rpm --erase --nodeps gtk gtk-devel" ], | ||
840 | + [ echo "*** The test program failed to compile or link. See the file config.log for the" | ||
841 | + echo "*** exact error that occured. This usually means GLIB was incorrectly installed" | ||
842 | + echo "*** or that you have moved GLIB since it was installed. In the latter case, you" | ||
843 | + echo "*** may want to edit the glib-config script: $GLIB_CONFIG" ]) | ||
844 | + CFLAGS="$ac_save_CFLAGS" | ||
845 | + LIBS="$ac_save_LIBS" | ||
846 | + fi | ||
847 | + fi | ||
848 | + GLIB_CFLAGS="" | ||
849 | + GLIB_LIBS="" | ||
850 | + ifelse([$3], , :, [$3]) | ||
851 | + fi | ||
852 | + AC_SUBST(GLIB_CFLAGS) | ||
853 | + AC_SUBST(GLIB_LIBS) | ||
854 | + rm -f conf.glibtest | ||
855 | +]) | ||
856 | --- /dev/null | ||
857 | +++ e2fsprogs-libs-1.34/m4/iconv.m4 | ||
858 | @@ -0,0 +1,103 @@ | ||
859 | +# iconv.m4 serial AM4 (gettext-0.11.3) | ||
860 | +dnl Copyright (C) 2000-2002 Free Software Foundation, Inc. | ||
861 | +dnl This file is free software, distributed under the terms of the GNU | ||
862 | +dnl General Public License. As a special exception to the GNU General | ||
863 | +dnl Public License, this file may be distributed as part of a program | ||
864 | +dnl that contains a configuration script generated by Autoconf, under | ||
865 | +dnl the same distribution terms as the rest of that program. | ||
866 | + | ||
867 | +dnl From Bruno Haible. | ||
868 | + | ||
869 | +AC_DEFUN([AM_ICONV_LINKFLAGS_BODY], | ||
870 | +[ | ||
871 | + dnl Prerequisites of AC_LIB_LINKFLAGS_BODY. | ||
872 | + AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) | ||
873 | + AC_REQUIRE([AC_LIB_RPATH]) | ||
874 | + | ||
875 | + dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV | ||
876 | + dnl accordingly. | ||
877 | + AC_LIB_LINKFLAGS_BODY([iconv]) | ||
878 | +]) | ||
879 | + | ||
880 | +AC_DEFUN([AM_ICONV_LINK], | ||
881 | +[ | ||
882 | + dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and | ||
883 | + dnl those with the standalone portable GNU libiconv installed). | ||
884 | + | ||
885 | + dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV | ||
886 | + dnl accordingly. | ||
887 | + AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) | ||
888 | + | ||
889 | + dnl Add $INCICONV to CPPFLAGS before performing the following checks, | ||
890 | + dnl because if the user has installed libiconv and not disabled its use | ||
891 | + dnl via --without-libiconv-prefix, he wants to use it. The first | ||
892 | + dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed. | ||
893 | + am_save_CPPFLAGS="$CPPFLAGS" | ||
894 | + AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV]) | ||
895 | + | ||
896 | + AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [ | ||
897 | + am_cv_func_iconv="no, consider installing GNU libiconv" | ||
898 | + am_cv_lib_iconv=no | ||
899 | + AC_TRY_LINK([#include <stdlib.h> | ||
900 | +#include <iconv.h>], | ||
901 | + [iconv_t cd = iconv_open("",""); | ||
902 | + iconv(cd,NULL,NULL,NULL,NULL); | ||
903 | + iconv_close(cd);], | ||
904 | + am_cv_func_iconv=yes) | ||
905 | + if test "$am_cv_func_iconv" != yes; then | ||
906 | + am_save_LIBS="$LIBS" | ||
907 | + LIBS="$LIBS $LIBICONV" | ||
908 | + AC_TRY_LINK([#include <stdlib.h> | ||
909 | +#include <iconv.h>], | ||
910 | + [iconv_t cd = iconv_open("",""); | ||
911 | + iconv(cd,NULL,NULL,NULL,NULL); | ||
912 | + iconv_close(cd);], | ||
913 | + am_cv_lib_iconv=yes | ||
914 | + am_cv_func_iconv=yes) | ||
915 | + LIBS="$am_save_LIBS" | ||
916 | + fi | ||
917 | + ]) | ||
918 | + if test "$am_cv_func_iconv" = yes; then | ||
919 | + AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.]) | ||
920 | + fi | ||
921 | + if test "$am_cv_lib_iconv" = yes; then | ||
922 | + AC_MSG_CHECKING([how to link with libiconv]) | ||
923 | + AC_MSG_RESULT([$LIBICONV]) | ||
924 | + else | ||
925 | + dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV | ||
926 | + dnl either. | ||
927 | + CPPFLAGS="$am_save_CPPFLAGS" | ||
928 | + LIBICONV= | ||
929 | + LTLIBICONV= | ||
930 | + fi | ||
931 | + AC_SUBST(LIBICONV) | ||
932 | + AC_SUBST(LTLIBICONV) | ||
933 | +]) | ||
934 | + | ||
935 | +AC_DEFUN([AM_ICONV], | ||
936 | +[ | ||
937 | + AM_ICONV_LINK | ||
938 | + if test "$am_cv_func_iconv" = yes; then | ||
939 | + AC_MSG_CHECKING([for iconv declaration]) | ||
940 | + AC_CACHE_VAL(am_cv_proto_iconv, [ | ||
941 | + AC_TRY_COMPILE([ | ||
942 | +#include <stdlib.h> | ||
943 | +#include <iconv.h> | ||
944 | +extern | ||
945 | +#ifdef __cplusplus | ||
946 | +"C" | ||
947 | +#endif | ||
948 | +#if defined(__STDC__) || defined(__cplusplus) | ||
949 | +size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); | ||
950 | +#else | ||
951 | +size_t iconv(); | ||
952 | +#endif | ||
953 | +], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const") | ||
954 | + 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);"]) | ||
955 | + am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` | ||
956 | + AC_MSG_RESULT([$]{ac_t:- | ||
957 | + }[$]am_cv_proto_iconv) | ||
958 | + AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1, | ||
959 | + [Define as const if the declaration of iconv() needs const.]) | ||
960 | + fi | ||
961 | +]) | ||
962 | --- /dev/null | ||
963 | +++ e2fsprogs-libs-1.34/m4/intdiv0.m4 | ||
964 | @@ -0,0 +1,72 @@ | ||
965 | +# intdiv0.m4 serial 1 (gettext-0.11.3) | ||
966 | +dnl Copyright (C) 2002 Free Software Foundation, Inc. | ||
967 | +dnl This file is free software, distributed under the terms of the GNU | ||
968 | +dnl General Public License. As a special exception to the GNU General | ||
969 | +dnl Public License, this file may be distributed as part of a program | ||
970 | +dnl that contains a configuration script generated by Autoconf, under | ||
971 | +dnl the same distribution terms as the rest of that program. | ||
972 | + | ||
973 | +dnl From Bruno Haible. | ||
974 | + | ||
975 | +AC_DEFUN([gt_INTDIV0], | ||
976 | +[ | ||
977 | + AC_REQUIRE([AC_PROG_CC])dnl | ||
978 | + AC_REQUIRE([AC_CANONICAL_HOST])dnl | ||
979 | + | ||
980 | + AC_CACHE_CHECK([whether integer division by zero raises SIGFPE], | ||
981 | + gt_cv_int_divbyzero_sigfpe, | ||
982 | + [ | ||
983 | + AC_TRY_RUN([ | ||
984 | +#include <stdlib.h> | ||
985 | +#include <signal.h> | ||
986 | + | ||
987 | +static void | ||
988 | +#ifdef __cplusplus | ||
989 | +sigfpe_handler (int sig) | ||
990 | +#else | ||
991 | +sigfpe_handler (sig) int sig; | ||
992 | +#endif | ||
993 | +{ | ||
994 | + /* Exit with code 0 if SIGFPE, with code 1 if any other signal. */ | ||
995 | + exit (sig != SIGFPE); | ||
996 | +} | ||
997 | + | ||
998 | +int x = 1; | ||
999 | +int y = 0; | ||
1000 | +int z; | ||
1001 | +int nan; | ||
1002 | + | ||
1003 | +int main () | ||
1004 | +{ | ||
1005 | + signal (SIGFPE, sigfpe_handler); | ||
1006 | +/* IRIX and AIX (when "xlc -qcheck" is used) yield signal SIGTRAP. */ | ||
1007 | +#if (defined (__sgi) || defined (_AIX)) && defined (SIGTRAP) | ||
1008 | + signal (SIGTRAP, sigfpe_handler); | ||
1009 | +#endif | ||
1010 | +/* Linux/SPARC yields signal SIGILL. */ | ||
1011 | +#if defined (__sparc__) && defined (__linux__) | ||
1012 | + signal (SIGILL, sigfpe_handler); | ||
1013 | +#endif | ||
1014 | + | ||
1015 | + z = x / y; | ||
1016 | + nan = y / y; | ||
1017 | + exit (1); | ||
1018 | +} | ||
1019 | +], gt_cv_int_divbyzero_sigfpe=yes, gt_cv_int_divbyzero_sigfpe=no, | ||
1020 | + [ | ||
1021 | + # Guess based on the CPU. | ||
1022 | + case "$host_cpu" in | ||
1023 | + alpha* | i[34567]86 | m68k | s390*) | ||
1024 | + gt_cv_int_divbyzero_sigfpe="guessing yes";; | ||
1025 | + *) | ||
1026 | + gt_cv_int_divbyzero_sigfpe="guessing no";; | ||
1027 | + esac | ||
1028 | + ]) | ||
1029 | + ]) | ||
1030 | + case "$gt_cv_int_divbyzero_sigfpe" in | ||
1031 | + *yes) value=1;; | ||
1032 | + *) value=0;; | ||
1033 | + esac | ||
1034 | + AC_DEFINE_UNQUOTED(INTDIV0_RAISES_SIGFPE, $value, | ||
1035 | + [Define if integer division by zero raises signal SIGFPE.]) | ||
1036 | +]) | ||
1037 | --- /dev/null | ||
1038 | +++ e2fsprogs-libs-1.34/m4/inttypes_h.m4 | ||
1039 | @@ -0,0 +1,28 @@ | ||
1040 | +# inttypes_h.m4 serial 4 (gettext-0.11.4) | ||
1041 | +dnl Copyright (C) 1997-2002 Free Software Foundation, Inc. | ||
1042 | +dnl This file is free software, distributed under the terms of the GNU | ||
1043 | +dnl General Public License. As a special exception to the GNU General | ||
1044 | +dnl Public License, this file may be distributed as part of a program | ||
1045 | +dnl that contains a configuration script generated by Autoconf, under | ||
1046 | +dnl the same distribution terms as the rest of that program. | ||
1047 | + | ||
1048 | +dnl From Paul Eggert. | ||
1049 | + | ||
1050 | +# Define HAVE_INTTYPES_H_WITH_UINTMAX if <inttypes.h> exists, | ||
1051 | +# doesn't clash with <sys/types.h>, and declares uintmax_t. | ||
1052 | + | ||
1053 | +AC_DEFUN([jm_AC_HEADER_INTTYPES_H], | ||
1054 | +[ | ||
1055 | + AC_CACHE_CHECK([for inttypes.h], jm_ac_cv_header_inttypes_h, | ||
1056 | + [AC_TRY_COMPILE( | ||
1057 | + [#include <sys/types.h> | ||
1058 | +#include <inttypes.h>], | ||
1059 | + [uintmax_t i = (uintmax_t) -1;], | ||
1060 | + jm_ac_cv_header_inttypes_h=yes, | ||
1061 | + jm_ac_cv_header_inttypes_h=no)]) | ||
1062 | + if test $jm_ac_cv_header_inttypes_h = yes; then | ||
1063 | + AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H_WITH_UINTMAX, 1, | ||
1064 | +[Define if <inttypes.h> exists, doesn't clash with <sys/types.h>, | ||
1065 | + and declares uintmax_t. ]) | ||
1066 | + fi | ||
1067 | +]) | ||
1068 | --- /dev/null | ||
1069 | +++ e2fsprogs-libs-1.34/m4/inttypes.m4 | ||
1070 | @@ -0,0 +1,27 @@ | ||
1071 | +# inttypes.m4 serial 1 (gettext-0.11.4) | ||
1072 | +dnl Copyright (C) 1997-2002 Free Software Foundation, Inc. | ||
1073 | +dnl This file is free software, distributed under the terms of the GNU | ||
1074 | +dnl General Public License. As a special exception to the GNU General | ||
1075 | +dnl Public License, this file may be distributed as part of a program | ||
1076 | +dnl that contains a configuration script generated by Autoconf, under | ||
1077 | +dnl the same distribution terms as the rest of that program. | ||
1078 | + | ||
1079 | +dnl From Paul Eggert. | ||
1080 | + | ||
1081 | +# Define HAVE_INTTYPES_H if <inttypes.h> exists and doesn't clash with | ||
1082 | +# <sys/types.h>. | ||
1083 | + | ||
1084 | +AC_DEFUN([gt_HEADER_INTTYPES_H], | ||
1085 | +[ | ||
1086 | + AC_CACHE_CHECK([for inttypes.h], gt_cv_header_inttypes_h, | ||
1087 | + [ | ||
1088 | + AC_TRY_COMPILE( | ||
1089 | + [#include <sys/types.h> | ||
1090 | +#include <inttypes.h>], | ||
1091 | + [], gt_cv_header_inttypes_h=yes, gt_cv_header_inttypes_h=no) | ||
1092 | + ]) | ||
1093 | + if test $gt_cv_header_inttypes_h = yes; then | ||
1094 | + AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H, 1, | ||
1095 | + [Define if <inttypes.h> exists and doesn't clash with <sys/types.h>.]) | ||
1096 | + fi | ||
1097 | +]) | ||
1098 | --- /dev/null | ||
1099 | +++ e2fsprogs-libs-1.34/m4/inttypes-pri.m4 | ||
1100 | @@ -0,0 +1,32 @@ | ||
1101 | +# inttypes-pri.m4 serial 1 (gettext-0.11.4) | ||
1102 | +dnl Copyright (C) 1997-2002 Free Software Foundation, Inc. | ||
1103 | +dnl This file is free software, distributed under the terms of the GNU | ||
1104 | +dnl General Public License. As a special exception to the GNU General | ||
1105 | +dnl Public License, this file may be distributed as part of a program | ||
1106 | +dnl that contains a configuration script generated by Autoconf, under | ||
1107 | +dnl the same distribution terms as the rest of that program. | ||
1108 | + | ||
1109 | +dnl From Bruno Haible. | ||
1110 | + | ||
1111 | +# Define PRI_MACROS_BROKEN if <inttypes.h> exists and defines the PRI* | ||
1112 | +# macros to non-string values. This is the case on AIX 4.3.3. | ||
1113 | + | ||
1114 | +AC_DEFUN([gt_INTTYPES_PRI], | ||
1115 | +[ | ||
1116 | + AC_REQUIRE([gt_HEADER_INTTYPES_H]) | ||
1117 | + if test $gt_cv_header_inttypes_h = yes; then | ||
1118 | + AC_CACHE_CHECK([whether the inttypes.h PRIxNN macros are broken], | ||
1119 | + gt_cv_inttypes_pri_broken, | ||
1120 | + [ | ||
1121 | + AC_TRY_COMPILE([#include <inttypes.h> | ||
1122 | +#ifdef PRId32 | ||
1123 | +char *p = PRId32; | ||
1124 | +#endif | ||
1125 | +], [], gt_cv_inttypes_pri_broken=no, gt_cv_inttypes_pri_broken=yes) | ||
1126 | + ]) | ||
1127 | + fi | ||
1128 | + if test "$gt_cv_inttypes_pri_broken" = yes; then | ||
1129 | + AC_DEFINE_UNQUOTED(PRI_MACROS_BROKEN, 1, | ||
1130 | + [Define if <inttypes.h> exists and defines unusable PRI* macros.]) | ||
1131 | + fi | ||
1132 | +]) | ||
1133 | --- /dev/null | ||
1134 | +++ e2fsprogs-libs-1.34/m4/isc-posix.m4 | ||
1135 | @@ -0,0 +1,26 @@ | ||
1136 | +# isc-posix.m4 serial 2 (gettext-0.11.2) | ||
1137 | +dnl Copyright (C) 1995-2002 Free Software Foundation, Inc. | ||
1138 | +dnl This file is free software, distributed under the terms of the GNU | ||
1139 | +dnl General Public License. As a special exception to the GNU General | ||
1140 | +dnl Public License, this file may be distributed as part of a program | ||
1141 | +dnl that contains a configuration script generated by Autoconf, under | ||
1142 | +dnl the same distribution terms as the rest of that program. | ||
1143 | + | ||
1144 | +# This file is not needed with autoconf-2.53 and newer. Remove it in 2005. | ||
1145 | + | ||
1146 | +# This test replaces the one in autoconf. | ||
1147 | +# Currently this macro should have the same name as the autoconf macro | ||
1148 | +# because gettext's gettext.m4 (distributed in the automake package) | ||
1149 | +# still uses it. Otherwise, the use in gettext.m4 makes autoheader | ||
1150 | +# give these diagnostics: | ||
1151 | +# configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX | ||
1152 | +# configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX | ||
1153 | + | ||
1154 | +undefine([AC_ISC_POSIX]) | ||
1155 | + | ||
1156 | +AC_DEFUN([AC_ISC_POSIX], | ||
1157 | + [ | ||
1158 | + dnl This test replaces the obsolescent AC_ISC_POSIX kludge. | ||
1159 | + AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"]) | ||
1160 | + ] | ||
1161 | +) | ||
1162 | --- /dev/null | ||
1163 | +++ e2fsprogs-libs-1.34/m4/lcmessage.m4 | ||
1164 | @@ -0,0 +1,32 @@ | ||
1165 | +# lcmessage.m4 serial 3 (gettext-0.11.3) | ||
1166 | +dnl Copyright (C) 1995-2002 Free Software Foundation, Inc. | ||
1167 | +dnl This file is free software, distributed under the terms of the GNU | ||
1168 | +dnl General Public License. As a special exception to the GNU General | ||
1169 | +dnl Public License, this file may be distributed as part of a program | ||
1170 | +dnl that contains a configuration script generated by Autoconf, under | ||
1171 | +dnl the same distribution terms as the rest of that program. | ||
1172 | +dnl | ||
1173 | +dnl This file can can be used in projects which are not available under | ||
1174 | +dnl the GNU General Public License or the GNU Library General Public | ||
1175 | +dnl License but which still want to provide support for the GNU gettext | ||
1176 | +dnl functionality. | ||
1177 | +dnl Please note that the actual code of the GNU gettext library is covered | ||
1178 | +dnl by the GNU Library General Public License, and the rest of the GNU | ||
1179 | +dnl gettext package package is covered by the GNU General Public License. | ||
1180 | +dnl They are *not* in the public domain. | ||
1181 | + | ||
1182 | +dnl Authors: | ||
1183 | +dnl Ulrich Drepper <drepper@cygnus.com>, 1995. | ||
1184 | + | ||
1185 | +# Check whether LC_MESSAGES is available in <locale.h>. | ||
1186 | + | ||
1187 | +AC_DEFUN([AM_LC_MESSAGES], | ||
1188 | +[ | ||
1189 | + AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES, | ||
1190 | + [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES], | ||
1191 | + am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)]) | ||
1192 | + if test $am_cv_val_LC_MESSAGES = yes; then | ||
1193 | + AC_DEFINE(HAVE_LC_MESSAGES, 1, | ||
1194 | + [Define if your <locale.h> file defines LC_MESSAGES.]) | ||
1195 | + fi | ||
1196 | +]) | ||
1197 | --- /dev/null | ||
1198 | +++ e2fsprogs-libs-1.34/m4/lib-ld.m4 | ||
1199 | @@ -0,0 +1,97 @@ | ||
1200 | +# lib-ld.m4 serial 1 (gettext-0.11) | ||
1201 | +dnl Copyright (C) 1996-2002 Free Software Foundation, Inc. | ||
1202 | +dnl This file is free software, distributed under the terms of the GNU | ||
1203 | +dnl General Public License. As a special exception to the GNU General | ||
1204 | +dnl Public License, this file may be distributed as part of a program | ||
1205 | +dnl that contains a configuration script generated by Autoconf, under | ||
1206 | +dnl the same distribution terms as the rest of that program. | ||
1207 | + | ||
1208 | +dnl Subroutines of libtool.m4, | ||
1209 | +dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision | ||
1210 | +dnl with libtool.m4. | ||
1211 | + | ||
1212 | +dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no. | ||
1213 | +AC_DEFUN([AC_LIB_PROG_LD_GNU], | ||
1214 | +[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld, | ||
1215 | +[# I'd rather use --version here, but apparently some GNU ld's only accept -v. | ||
1216 | +if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then | ||
1217 | + acl_cv_prog_gnu_ld=yes | ||
1218 | +else | ||
1219 | + acl_cv_prog_gnu_ld=no | ||
1220 | +fi]) | ||
1221 | +with_gnu_ld=$acl_cv_prog_gnu_ld | ||
1222 | +]) | ||
1223 | + | ||
1224 | +dnl From libtool-1.4. Sets the variable LD. | ||
1225 | +AC_DEFUN([AC_LIB_PROG_LD], | ||
1226 | +[AC_ARG_WITH(gnu-ld, | ||
1227 | +[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]], | ||
1228 | +test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no) | ||
1229 | +AC_REQUIRE([AC_PROG_CC])dnl | ||
1230 | +AC_REQUIRE([AC_CANONICAL_HOST])dnl | ||
1231 | +ac_prog=ld | ||
1232 | +if test "$GCC" = yes; then | ||
1233 | + # Check if gcc -print-prog-name=ld gives a path. | ||
1234 | + AC_MSG_CHECKING([for ld used by GCC]) | ||
1235 | + case $host in | ||
1236 | + *-*-mingw*) | ||
1237 | + # gcc leaves a trailing carriage return which upsets mingw | ||
1238 | + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; | ||
1239 | + *) | ||
1240 | + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; | ||
1241 | + esac | ||
1242 | + case $ac_prog in | ||
1243 | + # Accept absolute paths. | ||
1244 | + [[\\/]* | [A-Za-z]:[\\/]*)] | ||
1245 | + [re_direlt='/[^/][^/]*/\.\./'] | ||
1246 | + # Canonicalize the path of ld | ||
1247 | + ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` | ||
1248 | + while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do | ||
1249 | + ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` | ||
1250 | + done | ||
1251 | + test -z "$LD" && LD="$ac_prog" | ||
1252 | + ;; | ||
1253 | + "") | ||
1254 | + # If it fails, then pretend we aren't using GCC. | ||
1255 | + ac_prog=ld | ||
1256 | + ;; | ||
1257 | + *) | ||
1258 | + # If it is relative, then search for the first ld in PATH. | ||
1259 | + with_gnu_ld=unknown | ||
1260 | + ;; | ||
1261 | + esac | ||
1262 | +elif test "$with_gnu_ld" = yes; then | ||
1263 | + AC_MSG_CHECKING([for GNU ld]) | ||
1264 | +else | ||
1265 | + AC_MSG_CHECKING([for non-GNU ld]) | ||
1266 | +fi | ||
1267 | +AC_CACHE_VAL(acl_cv_path_LD, | ||
1268 | +[if test -z "$LD"; then | ||
1269 | + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" | ||
1270 | + for ac_dir in $PATH; do | ||
1271 | + test -z "$ac_dir" && ac_dir=. | ||
1272 | + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then | ||
1273 | + acl_cv_path_LD="$ac_dir/$ac_prog" | ||
1274 | + # Check to see if the program is GNU ld. I'd rather use --version, | ||
1275 | + # but apparently some GNU ld's only accept -v. | ||
1276 | + # Break only if it was the GNU/non-GNU ld that we prefer. | ||
1277 | + if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then | ||
1278 | + test "$with_gnu_ld" != no && break | ||
1279 | + else | ||
1280 | + test "$with_gnu_ld" != yes && break | ||
1281 | + fi | ||
1282 | + fi | ||
1283 | + done | ||
1284 | + IFS="$ac_save_ifs" | ||
1285 | +else | ||
1286 | + acl_cv_path_LD="$LD" # Let the user override the test with a path. | ||
1287 | +fi]) | ||
1288 | +LD="$acl_cv_path_LD" | ||
1289 | +if test -n "$LD"; then | ||
1290 | + AC_MSG_RESULT($LD) | ||
1291 | +else | ||
1292 | + AC_MSG_RESULT(no) | ||
1293 | +fi | ||
1294 | +test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) | ||
1295 | +AC_LIB_PROG_LD_GNU | ||
1296 | +]) | ||
1297 | --- /dev/null | ||
1298 | +++ e2fsprogs-libs-1.34/m4/lib-link.m4 | ||
1299 | @@ -0,0 +1,554 @@ | ||
1300 | +# lib-link.m4 serial 3 (gettext-0.11.3) | ||
1301 | +dnl Copyright (C) 2001-2002 Free Software Foundation, Inc. | ||
1302 | +dnl This file is free software, distributed under the terms of the GNU | ||
1303 | +dnl General Public License. As a special exception to the GNU General | ||
1304 | +dnl Public License, this file may be distributed as part of a program | ||
1305 | +dnl that contains a configuration script generated by Autoconf, under | ||
1306 | +dnl the same distribution terms as the rest of that program. | ||
1307 | + | ||
1308 | +dnl From Bruno Haible. | ||
1309 | + | ||
1310 | +dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and | ||
1311 | +dnl the libraries corresponding to explicit and implicit dependencies. | ||
1312 | +dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and | ||
1313 | +dnl augments the CPPFLAGS variable. | ||
1314 | +AC_DEFUN([AC_LIB_LINKFLAGS], | ||
1315 | +[ | ||
1316 | + AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) | ||
1317 | + AC_REQUIRE([AC_LIB_RPATH]) | ||
1318 | + define([Name],[translit([$1],[./-], [___])]) | ||
1319 | + define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], | ||
1320 | + [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) | ||
1321 | + AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [ | ||
1322 | + AC_LIB_LINKFLAGS_BODY([$1], [$2]) | ||
1323 | + ac_cv_lib[]Name[]_libs="$LIB[]NAME" | ||
1324 | + ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME" | ||
1325 | + ac_cv_lib[]Name[]_cppflags="$INC[]NAME" | ||
1326 | + ]) | ||
1327 | + LIB[]NAME="$ac_cv_lib[]Name[]_libs" | ||
1328 | + LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs" | ||
1329 | + INC[]NAME="$ac_cv_lib[]Name[]_cppflags" | ||
1330 | + AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) | ||
1331 | + AC_SUBST([LIB]NAME) | ||
1332 | + AC_SUBST([LTLIB]NAME) | ||
1333 | + dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the | ||
1334 | + dnl results of this search when this library appears as a dependency. | ||
1335 | + HAVE_LIB[]NAME=yes | ||
1336 | + undefine([Name]) | ||
1337 | + undefine([NAME]) | ||
1338 | +]) | ||
1339 | + | ||
1340 | +dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode) | ||
1341 | +dnl searches for libname and the libraries corresponding to explicit and | ||
1342 | +dnl implicit dependencies, together with the specified include files and | ||
1343 | +dnl the ability to compile and link the specified testcode. If found, it | ||
1344 | +dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and | ||
1345 | +dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and | ||
1346 | +dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs | ||
1347 | +dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty. | ||
1348 | +AC_DEFUN([AC_LIB_HAVE_LINKFLAGS], | ||
1349 | +[ | ||
1350 | + AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) | ||
1351 | + AC_REQUIRE([AC_LIB_RPATH]) | ||
1352 | + define([Name],[translit([$1],[./-], [___])]) | ||
1353 | + define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], | ||
1354 | + [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) | ||
1355 | + | ||
1356 | + dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME | ||
1357 | + dnl accordingly. | ||
1358 | + AC_LIB_LINKFLAGS_BODY([$1], [$2]) | ||
1359 | + | ||
1360 | + dnl Add $INC[]NAME to CPPFLAGS before performing the following checks, | ||
1361 | + dnl because if the user has installed lib[]Name and not disabled its use | ||
1362 | + dnl via --without-lib[]Name-prefix, he wants to use it. | ||
1363 | + ac_save_CPPFLAGS="$CPPFLAGS" | ||
1364 | + AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) | ||
1365 | + | ||
1366 | + AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [ | ||
1367 | + ac_save_LIBS="$LIBS" | ||
1368 | + LIBS="$LIBS $LIB[]NAME" | ||
1369 | + AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no]) | ||
1370 | + LIBS="$ac_save_LIBS" | ||
1371 | + ]) | ||
1372 | + if test "$ac_cv_lib[]Name" = yes; then | ||
1373 | + HAVE_LIB[]NAME=yes | ||
1374 | + AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.]) | ||
1375 | + AC_MSG_CHECKING([how to link with lib[]$1]) | ||
1376 | + AC_MSG_RESULT([$LIB[]NAME]) | ||
1377 | + else | ||
1378 | + HAVE_LIB[]NAME=no | ||
1379 | + dnl If $LIB[]NAME didn't lead to a usable library, we don't need | ||
1380 | + dnl $INC[]NAME either. | ||
1381 | + CPPFLAGS="$ac_save_CPPFLAGS" | ||
1382 | + LIB[]NAME= | ||
1383 | + LTLIB[]NAME= | ||
1384 | + fi | ||
1385 | + AC_SUBST([HAVE_LIB]NAME) | ||
1386 | + AC_SUBST([LIB]NAME) | ||
1387 | + AC_SUBST([LTLIB]NAME) | ||
1388 | + undefine([Name]) | ||
1389 | + undefine([NAME]) | ||
1390 | +]) | ||
1391 | + | ||
1392 | +dnl Determine the platform dependent parameters needed to use rpath: | ||
1393 | +dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator, | ||
1394 | +dnl hardcode_direct, hardcode_minus_L, | ||
1395 | +dnl sys_lib_search_path_spec, sys_lib_dlsearch_path_spec. | ||
1396 | +AC_DEFUN([AC_LIB_RPATH], | ||
1397 | +[ | ||
1398 | + AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS | ||
1399 | + AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld | ||
1400 | + AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host | ||
1401 | + AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir | ||
1402 | + AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [ | ||
1403 | + CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ | ||
1404 | + ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh | ||
1405 | + . ./conftest.sh | ||
1406 | + rm -f ./conftest.sh | ||
1407 | + acl_cv_rpath=done | ||
1408 | + ]) | ||
1409 | + wl="$acl_cv_wl" | ||
1410 | + libext="$acl_cv_libext" | ||
1411 | + shlibext="$acl_cv_shlibext" | ||
1412 | + hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" | ||
1413 | + hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" | ||
1414 | + hardcode_direct="$acl_cv_hardcode_direct" | ||
1415 | + hardcode_minus_L="$acl_cv_hardcode_minus_L" | ||
1416 | + sys_lib_search_path_spec="$acl_cv_sys_lib_search_path_spec" | ||
1417 | + sys_lib_dlsearch_path_spec="$acl_cv_sys_lib_dlsearch_path_spec" | ||
1418 | + dnl Determine whether the user wants rpath handling at all. | ||
1419 | + AC_ARG_ENABLE(rpath, | ||
1420 | + [ --disable-rpath do not hardcode runtime library paths], | ||
1421 | + :, enable_rpath=yes) | ||
1422 | +]) | ||
1423 | + | ||
1424 | +dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and | ||
1425 | +dnl the libraries corresponding to explicit and implicit dependencies. | ||
1426 | +dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables. | ||
1427 | +AC_DEFUN([AC_LIB_LINKFLAGS_BODY], | ||
1428 | +[ | ||
1429 | + define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], | ||
1430 | + [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) | ||
1431 | + dnl By default, look in $includedir and $libdir. | ||
1432 | + use_additional=yes | ||
1433 | + AC_LIB_WITH_FINAL_PREFIX([ | ||
1434 | + eval additional_includedir=\"$includedir\" | ||
1435 | + eval additional_libdir=\"$libdir\" | ||
1436 | + ]) | ||
1437 | + AC_ARG_WITH([lib$1-prefix], | ||
1438 | +[ --with-lib$1-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib | ||
1439 | + --without-lib$1-prefix don't search for lib$1 in includedir and libdir], | ||
1440 | +[ | ||
1441 | + if test "X$withval" = "Xno"; then | ||
1442 | + use_additional=no | ||
1443 | + else | ||
1444 | + if test "X$withval" = "X"; then | ||
1445 | + AC_LIB_WITH_FINAL_PREFIX([ | ||
1446 | + eval additional_includedir=\"$includedir\" | ||
1447 | + eval additional_libdir=\"$libdir\" | ||
1448 | + ]) | ||
1449 | + else | ||
1450 | + additional_includedir="$withval/include" | ||
1451 | + additional_libdir="$withval/lib" | ||
1452 | + fi | ||
1453 | + fi | ||
1454 | +]) | ||
1455 | + dnl Search the library and its dependencies in $additional_libdir and | ||
1456 | + dnl $LDFLAGS. Using breadth-first-seach. | ||
1457 | + LIB[]NAME= | ||
1458 | + LTLIB[]NAME= | ||
1459 | + INC[]NAME= | ||
1460 | + rpathdirs= | ||
1461 | + ltrpathdirs= | ||
1462 | + names_already_handled= | ||
1463 | + names_next_round='$1 $2' | ||
1464 | + while test -n "$names_next_round"; do | ||
1465 | + names_this_round="$names_next_round" | ||
1466 | + names_next_round= | ||
1467 | + for name in $names_this_round; do | ||
1468 | + already_handled= | ||
1469 | + for n in $names_already_handled; do | ||
1470 | + if test "$n" = "$name"; then | ||
1471 | + already_handled=yes | ||
1472 | + break | ||
1473 | + fi | ||
1474 | + done | ||
1475 | + if test -z "$already_handled"; then | ||
1476 | + names_already_handled="$names_already_handled $name" | ||
1477 | + dnl See if it was already located by an earlier AC_LIB_LINKFLAGS | ||
1478 | + dnl or AC_LIB_HAVE_LINKFLAGS call. | ||
1479 | + uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` | ||
1480 | + eval value=\"\$HAVE_LIB$uppername\" | ||
1481 | + if test -n "$value"; then | ||
1482 | + if test "$value" = yes; then | ||
1483 | + eval value=\"\$LIB$uppername\" | ||
1484 | + test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value" | ||
1485 | + eval value=\"\$LTLIB$uppername\" | ||
1486 | + test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value" | ||
1487 | + else | ||
1488 | + dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined | ||
1489 | + dnl that this library doesn't exist. So just drop it. | ||
1490 | + : | ||
1491 | + fi | ||
1492 | + else | ||
1493 | + dnl Search the library lib$name in $additional_libdir and $LDFLAGS | ||
1494 | + dnl and the already constructed $LIBNAME/$LTLIBNAME. | ||
1495 | + found_dir= | ||
1496 | + found_la= | ||
1497 | + found_so= | ||
1498 | + found_a= | ||
1499 | + if test $use_additional = yes; then | ||
1500 | + if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then | ||
1501 | + found_dir="$additional_libdir" | ||
1502 | + found_so="$additional_libdir/lib$name.$shlibext" | ||
1503 | + if test -f "$additional_libdir/lib$name.la"; then | ||
1504 | + found_la="$additional_libdir/lib$name.la" | ||
1505 | + fi | ||
1506 | + else | ||
1507 | + if test -f "$additional_libdir/lib$name.$libext"; then | ||
1508 | + found_dir="$additional_libdir" | ||
1509 | + found_a="$additional_libdir/lib$name.$libext" | ||
1510 | + if test -f "$additional_libdir/lib$name.la"; then | ||
1511 | + found_la="$additional_libdir/lib$name.la" | ||
1512 | + fi | ||
1513 | + fi | ||
1514 | + fi | ||
1515 | + fi | ||
1516 | + if test "X$found_dir" = "X"; then | ||
1517 | + for x in $LDFLAGS $LTLIB[]NAME; do | ||
1518 | + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) | ||
1519 | + case "$x" in | ||
1520 | + -L*) | ||
1521 | + dir=`echo "X$x" | sed -e 's/^X-L//'` | ||
1522 | + if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then | ||
1523 | + found_dir="$dir" | ||
1524 | + found_so="$dir/lib$name.$shlibext" | ||
1525 | + if test -f "$dir/lib$name.la"; then | ||
1526 | + found_la="$dir/lib$name.la" | ||
1527 | + fi | ||
1528 | + else | ||
1529 | + if test -f "$dir/lib$name.$libext"; then | ||
1530 | + found_dir="$dir" | ||
1531 | + found_a="$dir/lib$name.$libext" | ||
1532 | + if test -f "$dir/lib$name.la"; then | ||
1533 | + found_la="$dir/lib$name.la" | ||
1534 | + fi | ||
1535 | + fi | ||
1536 | + fi | ||
1537 | + ;; | ||
1538 | + esac | ||
1539 | + if test "X$found_dir" != "X"; then | ||
1540 | + break | ||
1541 | + fi | ||
1542 | + done | ||
1543 | + fi | ||
1544 | + if test "X$found_dir" != "X"; then | ||
1545 | + dnl Found the library. | ||
1546 | + LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name" | ||
1547 | + if test "X$found_so" != "X"; then | ||
1548 | + dnl Linking with a shared library. We attempt to hardcode its | ||
1549 | + dnl directory into the executable's runpath, unless it's the | ||
1550 | + dnl standard /usr/lib. | ||
1551 | + if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then | ||
1552 | + dnl No hardcoding is needed. | ||
1553 | + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" | ||
1554 | + else | ||
1555 | + dnl Use an explicit option to hardcode DIR into the resulting | ||
1556 | + dnl binary. | ||
1557 | + dnl Potentially add DIR to ltrpathdirs. | ||
1558 | + dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. | ||
1559 | + haveit= | ||
1560 | + for x in $ltrpathdirs; do | ||
1561 | + if test "X$x" = "X$found_dir"; then | ||
1562 | + haveit=yes | ||
1563 | + break | ||
1564 | + fi | ||
1565 | + done | ||
1566 | + if test -z "$haveit"; then | ||
1567 | + ltrpathdirs="$ltrpathdirs $found_dir" | ||
1568 | + fi | ||
1569 | + dnl The hardcoding into $LIBNAME is system dependent. | ||
1570 | + if test "$hardcode_direct" = yes; then | ||
1571 | + dnl Using DIR/libNAME.so during linking hardcodes DIR into the | ||
1572 | + dnl resulting binary. | ||
1573 | + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" | ||
1574 | + else | ||
1575 | + if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then | ||
1576 | + dnl Use an explicit option to hardcode DIR into the resulting | ||
1577 | + dnl binary. | ||
1578 | + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" | ||
1579 | + dnl Potentially add DIR to rpathdirs. | ||
1580 | + dnl The rpathdirs will be appended to $LIBNAME at the end. | ||
1581 | + haveit= | ||
1582 | + for x in $rpathdirs; do | ||
1583 | + if test "X$x" = "X$found_dir"; then | ||
1584 | + haveit=yes | ||
1585 | + break | ||
1586 | + fi | ||
1587 | + done | ||
1588 | + if test -z "$haveit"; then | ||
1589 | + rpathdirs="$rpathdirs $found_dir" | ||
1590 | + fi | ||
1591 | + else | ||
1592 | + dnl Rely on "-L$found_dir". | ||
1593 | + dnl But don't add it if it's already contained in the LDFLAGS | ||
1594 | + dnl or the already constructed $LIBNAME | ||
1595 | + haveit= | ||
1596 | + for x in $LDFLAGS $LIB[]NAME; do | ||
1597 | + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) | ||
1598 | + if test "X$x" = "X-L$found_dir"; then | ||
1599 | + haveit=yes | ||
1600 | + break | ||
1601 | + fi | ||
1602 | + done | ||
1603 | + if test -z "$haveit"; then | ||
1604 | + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir" | ||
1605 | + fi | ||
1606 | + if test "$hardcode_minus_L" != no; then | ||
1607 | + dnl FIXME: Not sure whether we should use | ||
1608 | + dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" | ||
1609 | + dnl here. | ||
1610 | + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" | ||
1611 | + else | ||
1612 | + dnl We cannot use $hardcode_runpath_var and LD_RUN_PATH | ||
1613 | + dnl here, because this doesn't fit in flags passed to the | ||
1614 | + dnl compiler. So give up. No hardcoding. This affects only | ||
1615 | + dnl very old systems. | ||
1616 | + dnl FIXME: Not sure whether we should use | ||
1617 | + dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" | ||
1618 | + dnl here. | ||
1619 | + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" | ||
1620 | + fi | ||
1621 | + fi | ||
1622 | + fi | ||
1623 | + fi | ||
1624 | + else | ||
1625 | + if test "X$found_a" != "X"; then | ||
1626 | + dnl Linking with a static library. | ||
1627 | + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a" | ||
1628 | + else | ||
1629 | + dnl We shouldn't come here, but anyway it's good to have a | ||
1630 | + dnl fallback. | ||
1631 | + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name" | ||
1632 | + fi | ||
1633 | + fi | ||
1634 | + dnl Assume the include files are nearby. | ||
1635 | + additional_includedir= | ||
1636 | + case "$found_dir" in | ||
1637 | + */lib | */lib/) | ||
1638 | + basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` | ||
1639 | + additional_includedir="$basedir/include" | ||
1640 | + ;; | ||
1641 | + esac | ||
1642 | + if test "X$additional_includedir" != "X"; then | ||
1643 | + dnl Potentially add $additional_includedir to $INCNAME. | ||
1644 | + dnl But don't add it | ||
1645 | + dnl 1. if it's the standard /usr/include, | ||
1646 | + dnl 2. if it's /usr/local/include and we are using GCC on Linux, | ||
1647 | + dnl 3. if it's already present in $CPPFLAGS or the already | ||
1648 | + dnl constructed $INCNAME, | ||
1649 | + dnl 4. if it doesn't exist as a directory. | ||
1650 | + if test "X$additional_includedir" != "X/usr/include"; then | ||
1651 | + haveit= | ||
1652 | + if test "X$additional_includedir" = "X/usr/local/include"; then | ||
1653 | + if test -n "$GCC"; then | ||
1654 | + case $host_os in | ||
1655 | + linux*) haveit=yes;; | ||
1656 | + esac | ||
1657 | + fi | ||
1658 | + fi | ||
1659 | + if test -z "$haveit"; then | ||
1660 | + for x in $CPPFLAGS $INC[]NAME; do | ||
1661 | + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) | ||
1662 | + if test "X$x" = "X-I$additional_includedir"; then | ||
1663 | + haveit=yes | ||
1664 | + break | ||
1665 | + fi | ||
1666 | + done | ||
1667 | + if test -z "$haveit"; then | ||
1668 | + if test -d "$additional_includedir"; then | ||
1669 | + dnl Really add $additional_includedir to $INCNAME. | ||
1670 | + INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir" | ||
1671 | + fi | ||
1672 | + fi | ||
1673 | + fi | ||
1674 | + fi | ||
1675 | + fi | ||
1676 | + dnl Look for dependencies. | ||
1677 | + if test -n "$found_la"; then | ||
1678 | + dnl Read the .la file. It defines the variables | ||
1679 | + dnl dlname, library_names, old_library, dependency_libs, current, | ||
1680 | + dnl age, revision, installed, dlopen, dlpreopen, libdir. | ||
1681 | + save_libdir="$libdir" | ||
1682 | + case "$found_la" in | ||
1683 | + */* | *\\*) . "$found_la" ;; | ||
1684 | + *) . "./$found_la" ;; | ||
1685 | + esac | ||
1686 | + libdir="$save_libdir" | ||
1687 | + dnl We use only dependency_libs. | ||
1688 | + for dep in $dependency_libs; do | ||
1689 | + case "$dep" in | ||
1690 | + -L*) | ||
1691 | + additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` | ||
1692 | + dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME. | ||
1693 | + dnl But don't add it | ||
1694 | + dnl 1. if it's the standard /usr/lib, | ||
1695 | + dnl 2. if it's /usr/local/lib and we are using GCC on Linux, | ||
1696 | + dnl 3. if it's already present in $LDFLAGS or the already | ||
1697 | + dnl constructed $LIBNAME, | ||
1698 | + dnl 4. if it doesn't exist as a directory. | ||
1699 | + if test "X$additional_libdir" != "X/usr/lib"; then | ||
1700 | + haveit= | ||
1701 | + if test "X$additional_libdir" = "X/usr/local/lib"; then | ||
1702 | + if test -n "$GCC"; then | ||
1703 | + case $host_os in | ||
1704 | + linux*) haveit=yes;; | ||
1705 | + esac | ||
1706 | + fi | ||
1707 | + fi | ||
1708 | + if test -z "$haveit"; then | ||
1709 | + haveit= | ||
1710 | + for x in $LDFLAGS $LIB[]NAME; do | ||
1711 | + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) | ||
1712 | + if test "X$x" = "X-L$additional_libdir"; then | ||
1713 | + haveit=yes | ||
1714 | + break | ||
1715 | + fi | ||
1716 | + done | ||
1717 | + if test -z "$haveit"; then | ||
1718 | + if test -d "$additional_libdir"; then | ||
1719 | + dnl Really add $additional_libdir to $LIBNAME. | ||
1720 | + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir" | ||
1721 | + fi | ||
1722 | + fi | ||
1723 | + haveit= | ||
1724 | + for x in $LDFLAGS $LTLIB[]NAME; do | ||
1725 | + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) | ||
1726 | + if test "X$x" = "X-L$additional_libdir"; then | ||
1727 | + haveit=yes | ||
1728 | + break | ||
1729 | + fi | ||
1730 | + done | ||
1731 | + if test -z "$haveit"; then | ||
1732 | + if test -d "$additional_libdir"; then | ||
1733 | + dnl Really add $additional_libdir to $LTLIBNAME. | ||
1734 | + LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir" | ||
1735 | + fi | ||
1736 | + fi | ||
1737 | + fi | ||
1738 | + fi | ||
1739 | + ;; | ||
1740 | + -R*) | ||
1741 | + dir=`echo "X$dep" | sed -e 's/^X-R//'` | ||
1742 | + if test "$enable_rpath" != no; then | ||
1743 | + dnl Potentially add DIR to rpathdirs. | ||
1744 | + dnl The rpathdirs will be appended to $LIBNAME at the end. | ||
1745 | + haveit= | ||
1746 | + for x in $rpathdirs; do | ||
1747 | + if test "X$x" = "X$dir"; then | ||
1748 | + haveit=yes | ||
1749 | + break | ||
1750 | + fi | ||
1751 | + done | ||
1752 | + if test -z "$haveit"; then | ||
1753 | + rpathdirs="$rpathdirs $dir" | ||
1754 | + fi | ||
1755 | + dnl Potentially add DIR to ltrpathdirs. | ||
1756 | + dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. | ||
1757 | + haveit= | ||
1758 | + for x in $ltrpathdirs; do | ||
1759 | + if test "X$x" = "X$dir"; then | ||
1760 | + haveit=yes | ||
1761 | + break | ||
1762 | + fi | ||
1763 | + done | ||
1764 | + if test -z "$haveit"; then | ||
1765 | + ltrpathdirs="$ltrpathdirs $dir" | ||
1766 | + fi | ||
1767 | + fi | ||
1768 | + ;; | ||
1769 | + -l*) | ||
1770 | + dnl Handle this in the next round. | ||
1771 | + names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` | ||
1772 | + ;; | ||
1773 | + *.la) | ||
1774 | + dnl Handle this in the next round. Throw away the .la's | ||
1775 | + dnl directory; it is already contained in a preceding -L | ||
1776 | + dnl option. | ||
1777 | + names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` | ||
1778 | + ;; | ||
1779 | + *) | ||
1780 | + dnl Most likely an immediate library name. | ||
1781 | + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep" | ||
1782 | + LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep" | ||
1783 | + ;; | ||
1784 | + esac | ||
1785 | + done | ||
1786 | + fi | ||
1787 | + else | ||
1788 | + dnl Didn't find the library; assume it is in the system directories | ||
1789 | + dnl known to the linker and runtime loader. (All the system | ||
1790 | + dnl directories known to the linker should also be known to the | ||
1791 | + dnl runtime loader, otherwise the system is severely misconfigured.) | ||
1792 | + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" | ||
1793 | + LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name" | ||
1794 | + fi | ||
1795 | + fi | ||
1796 | + fi | ||
1797 | + done | ||
1798 | + done | ||
1799 | + if test "X$rpathdirs" != "X"; then | ||
1800 | + if test -n "$hardcode_libdir_separator"; then | ||
1801 | + dnl Weird platform: only the last -rpath option counts, the user must | ||
1802 | + dnl pass all path elements in one option. We can arrange that for a | ||
1803 | + dnl single library, but not when more than one $LIBNAMEs are used. | ||
1804 | + alldirs= | ||
1805 | + for found_dir in $rpathdirs; do | ||
1806 | + alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" | ||
1807 | + done | ||
1808 | + dnl Note: hardcode_libdir_flag_spec uses $libdir and $wl. | ||
1809 | + acl_save_libdir="$libdir" | ||
1810 | + libdir="$alldirs" | ||
1811 | + eval flag=\"$hardcode_libdir_flag_spec\" | ||
1812 | + libdir="$acl_save_libdir" | ||
1813 | + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" | ||
1814 | + else | ||
1815 | + dnl The -rpath options are cumulative. | ||
1816 | + for found_dir in $rpathdirs; do | ||
1817 | + acl_save_libdir="$libdir" | ||
1818 | + libdir="$found_dir" | ||
1819 | + eval flag=\"$hardcode_libdir_flag_spec\" | ||
1820 | + libdir="$acl_save_libdir" | ||
1821 | + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" | ||
1822 | + done | ||
1823 | + fi | ||
1824 | + fi | ||
1825 | + if test "X$ltrpathdirs" != "X"; then | ||
1826 | + dnl When using libtool, the option that works for both libraries and | ||
1827 | + dnl executables is -R. The -R options are cumulative. | ||
1828 | + for found_dir in $ltrpathdirs; do | ||
1829 | + LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir" | ||
1830 | + done | ||
1831 | + fi | ||
1832 | +]) | ||
1833 | + | ||
1834 | +dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR, | ||
1835 | +dnl unless already present in VAR. | ||
1836 | +dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes | ||
1837 | +dnl contains two or three consecutive elements that belong together. | ||
1838 | +AC_DEFUN([AC_LIB_APPENDTOVAR], | ||
1839 | +[ | ||
1840 | + for element in [$2]; do | ||
1841 | + haveit= | ||
1842 | + for x in $[$1]; do | ||
1843 | + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) | ||
1844 | + if test "X$x" = "X$element"; then | ||
1845 | + haveit=yes | ||
1846 | + break | ||
1847 | + fi | ||
1848 | + done | ||
1849 | + if test -z "$haveit"; then | ||
1850 | + [$1]="${[$1]}${[$1]:+ }$element" | ||
1851 | + fi | ||
1852 | + done | ||
1853 | +]) | ||
1854 | --- /dev/null | ||
1855 | +++ e2fsprogs-libs-1.34/m4/lib-prefix.m4 | ||
1856 | @@ -0,0 +1,148 @@ | ||
1857 | +# lib-prefix.m4 serial 1 (gettext-0.11) | ||
1858 | +dnl Copyright (C) 2001-2002 Free Software Foundation, Inc. | ||
1859 | +dnl This file is free software, distributed under the terms of the GNU | ||
1860 | +dnl General Public License. As a special exception to the GNU General | ||
1861 | +dnl Public License, this file may be distributed as part of a program | ||
1862 | +dnl that contains a configuration script generated by Autoconf, under | ||
1863 | +dnl the same distribution terms as the rest of that program. | ||
1864 | + | ||
1865 | +dnl From Bruno Haible. | ||
1866 | + | ||
1867 | +dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed | ||
1868 | +dnl to access previously installed libraries. The basic assumption is that | ||
1869 | +dnl a user will want packages to use other packages he previously installed | ||
1870 | +dnl with the same --prefix option. | ||
1871 | +dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate | ||
1872 | +dnl libraries, but is otherwise very convenient. | ||
1873 | +AC_DEFUN([AC_LIB_PREFIX], | ||
1874 | +[ | ||
1875 | + AC_BEFORE([$0], [AC_LIB_LINKFLAGS]) | ||
1876 | + AC_REQUIRE([AC_PROG_CC]) | ||
1877 | + AC_REQUIRE([AC_CANONICAL_HOST]) | ||
1878 | + AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) | ||
1879 | + dnl By default, look in $includedir and $libdir. | ||
1880 | + use_additional=yes | ||
1881 | + AC_LIB_WITH_FINAL_PREFIX([ | ||
1882 | + eval additional_includedir=\"$includedir\" | ||
1883 | + eval additional_libdir=\"$libdir\" | ||
1884 | + ]) | ||
1885 | + AC_ARG_WITH([lib-prefix], | ||
1886 | +[ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib | ||
1887 | + --without-lib-prefix don't search for libraries in includedir and libdir], | ||
1888 | +[ | ||
1889 | + if test "X$withval" = "Xno"; then | ||
1890 | + use_additional=no | ||
1891 | + else | ||
1892 | + if test "X$withval" = "X"; then | ||
1893 | + AC_LIB_WITH_FINAL_PREFIX([ | ||
1894 | + eval additional_includedir=\"$includedir\" | ||
1895 | + eval additional_libdir=\"$libdir\" | ||
1896 | + ]) | ||
1897 | + else | ||
1898 | + additional_includedir="$withval/include" | ||
1899 | + additional_libdir="$withval/lib" | ||
1900 | + fi | ||
1901 | + fi | ||
1902 | +]) | ||
1903 | + if test $use_additional = yes; then | ||
1904 | + dnl Potentially add $additional_includedir to $CPPFLAGS. | ||
1905 | + dnl But don't add it | ||
1906 | + dnl 1. if it's the standard /usr/include, | ||
1907 | + dnl 2. if it's already present in $CPPFLAGS, | ||
1908 | + dnl 3. if it's /usr/local/include and we are using GCC on Linux, | ||
1909 | + dnl 4. if it doesn't exist as a directory. | ||
1910 | + if test "X$additional_includedir" != "X/usr/include"; then | ||
1911 | + haveit= | ||
1912 | + for x in $CPPFLAGS; do | ||
1913 | + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) | ||
1914 | + if test "X$x" = "X-I$additional_includedir"; then | ||
1915 | + haveit=yes | ||
1916 | + break | ||
1917 | + fi | ||
1918 | + done | ||
1919 | + if test -z "$haveit"; then | ||
1920 | + if test "X$additional_includedir" = "X/usr/local/include"; then | ||
1921 | + if test -n "$GCC"; then | ||
1922 | + case $host_os in | ||
1923 | + linux*) haveit=yes;; | ||
1924 | + esac | ||
1925 | + fi | ||
1926 | + fi | ||
1927 | + if test -z "$haveit"; then | ||
1928 | + if test -d "$additional_includedir"; then | ||
1929 | + dnl Really add $additional_includedir to $CPPFLAGS. | ||
1930 | + CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir" | ||
1931 | + fi | ||
1932 | + fi | ||
1933 | + fi | ||
1934 | + fi | ||
1935 | + dnl Potentially add $additional_libdir to $LDFLAGS. | ||
1936 | + dnl But don't add it | ||
1937 | + dnl 1. if it's the standard /usr/lib, | ||
1938 | + dnl 2. if it's already present in $LDFLAGS, | ||
1939 | + dnl 3. if it's /usr/local/lib and we are using GCC on Linux, | ||
1940 | + dnl 4. if it doesn't exist as a directory. | ||
1941 | + if test "X$additional_libdir" != "X/usr/lib"; then | ||
1942 | + haveit= | ||
1943 | + for x in $LDFLAGS; do | ||
1944 | + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) | ||
1945 | + if test "X$x" = "X-L$additional_libdir"; then | ||
1946 | + haveit=yes | ||
1947 | + break | ||
1948 | + fi | ||
1949 | + done | ||
1950 | + if test -z "$haveit"; then | ||
1951 | + if test "X$additional_libdir" = "X/usr/local/lib"; then | ||
1952 | + if test -n "$GCC"; then | ||
1953 | + case $host_os in | ||
1954 | + linux*) haveit=yes;; | ||
1955 | + esac | ||
1956 | + fi | ||
1957 | + fi | ||
1958 | + if test -z "$haveit"; then | ||
1959 | + if test -d "$additional_libdir"; then | ||
1960 | + dnl Really add $additional_libdir to $LDFLAGS. | ||
1961 | + LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir" | ||
1962 | + fi | ||
1963 | + fi | ||
1964 | + fi | ||
1965 | + fi | ||
1966 | + fi | ||
1967 | +]) | ||
1968 | + | ||
1969 | +dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix, | ||
1970 | +dnl acl_final_exec_prefix, containing the values to which $prefix and | ||
1971 | +dnl $exec_prefix will expand at the end of the configure script. | ||
1972 | +AC_DEFUN([AC_LIB_PREPARE_PREFIX], | ||
1973 | +[ | ||
1974 | + dnl Unfortunately, prefix and exec_prefix get only finally determined | ||
1975 | + dnl at the end of configure. | ||
1976 | + if test "X$prefix" = "XNONE"; then | ||
1977 | + acl_final_prefix="$ac_default_prefix" | ||
1978 | + else | ||
1979 | + acl_final_prefix="$prefix" | ||
1980 | + fi | ||
1981 | + if test "X$exec_prefix" = "XNONE"; then | ||
1982 | + acl_final_exec_prefix='${prefix}' | ||
1983 | + else | ||
1984 | + acl_final_exec_prefix="$exec_prefix" | ||
1985 | + fi | ||
1986 | + acl_save_prefix="$prefix" | ||
1987 | + prefix="$acl_final_prefix" | ||
1988 | + eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" | ||
1989 | + prefix="$acl_save_prefix" | ||
1990 | +]) | ||
1991 | + | ||
1992 | +dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the | ||
1993 | +dnl variables prefix and exec_prefix bound to the values they will have | ||
1994 | +dnl at the end of the configure script. | ||
1995 | +AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX], | ||
1996 | +[ | ||
1997 | + acl_save_prefix="$prefix" | ||
1998 | + prefix="$acl_final_prefix" | ||
1999 | + acl_save_exec_prefix="$exec_prefix" | ||
2000 | + exec_prefix="$acl_final_exec_prefix" | ||
2001 | + $1 | ||
2002 | + exec_prefix="$acl_save_exec_prefix" | ||
2003 | + prefix="$acl_save_prefix" | ||
2004 | +]) | ||
2005 | --- /dev/null | ||
2006 | +++ e2fsprogs-libs-1.34/m4/progtest.m4 | ||
2007 | @@ -0,0 +1,59 @@ | ||
2008 | +# progtest.m4 serial 2 (gettext-0.10.40) | ||
2009 | +dnl Copyright (C) 1996-2002 Free Software Foundation, Inc. | ||
2010 | +dnl This file is free software, distributed under the terms of the GNU | ||
2011 | +dnl General Public License. As a special exception to the GNU General | ||
2012 | +dnl Public License, this file may be distributed as part of a program | ||
2013 | +dnl that contains a configuration script generated by Autoconf, under | ||
2014 | +dnl the same distribution terms as the rest of that program. | ||
2015 | +dnl | ||
2016 | +dnl This file can can be used in projects which are not available under | ||
2017 | +dnl the GNU General Public License or the GNU Library General Public | ||
2018 | +dnl License but which still want to provide support for the GNU gettext | ||
2019 | +dnl functionality. | ||
2020 | +dnl Please note that the actual code of the GNU gettext library is covered | ||
2021 | +dnl by the GNU Library General Public License, and the rest of the GNU | ||
2022 | +dnl gettext package package is covered by the GNU General Public License. | ||
2023 | +dnl They are *not* in the public domain. | ||
2024 | + | ||
2025 | +dnl Authors: | ||
2026 | +dnl Ulrich Drepper <drepper@cygnus.com>, 1996. | ||
2027 | + | ||
2028 | +# Search path for a program which passes the given test. | ||
2029 | + | ||
2030 | +dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR, | ||
2031 | +dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]]) | ||
2032 | +AC_DEFUN([AM_PATH_PROG_WITH_TEST], | ||
2033 | +[# Extract the first word of "$2", so it can be a program name with args. | ||
2034 | +set dummy $2; ac_word=[$]2 | ||
2035 | +AC_MSG_CHECKING([for $ac_word]) | ||
2036 | +AC_CACHE_VAL(ac_cv_path_$1, | ||
2037 | +[case "[$]$1" in | ||
2038 | + /*) | ||
2039 | + ac_cv_path_$1="[$]$1" # Let the user override the test with a path. | ||
2040 | + ;; | ||
2041 | + *) | ||
2042 | + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" | ||
2043 | + for ac_dir in ifelse([$5], , $PATH, [$5]); do | ||
2044 | + test -z "$ac_dir" && ac_dir=. | ||
2045 | + if test -f $ac_dir/$ac_word; then | ||
2046 | + if [$3]; then | ||
2047 | + ac_cv_path_$1="$ac_dir/$ac_word" | ||
2048 | + break | ||
2049 | + fi | ||
2050 | + fi | ||
2051 | + done | ||
2052 | + IFS="$ac_save_ifs" | ||
2053 | +dnl If no 4th arg is given, leave the cache variable unset, | ||
2054 | +dnl so AC_PATH_PROGS will keep looking. | ||
2055 | +ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4" | ||
2056 | +])dnl | ||
2057 | + ;; | ||
2058 | +esac])dnl | ||
2059 | +$1="$ac_cv_path_$1" | ||
2060 | +if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then | ||
2061 | + AC_MSG_RESULT([$]$1) | ||
2062 | +else | ||
2063 | + AC_MSG_RESULT(no) | ||
2064 | +fi | ||
2065 | +AC_SUBST($1)dnl | ||
2066 | +]) | ||
2067 | --- /dev/null | ||
2068 | +++ e2fsprogs-libs-1.34/m4/stdint_h.m4 | ||
2069 | @@ -0,0 +1,28 @@ | ||
2070 | +# stdint_h.m4 serial 2 (gettext-0.11.4) | ||
2071 | +dnl Copyright (C) 1997-2002 Free Software Foundation, Inc. | ||
2072 | +dnl This file is free software, distributed under the terms of the GNU | ||
2073 | +dnl General Public License. As a special exception to the GNU General | ||
2074 | +dnl Public License, this file may be distributed as part of a program | ||
2075 | +dnl that contains a configuration script generated by Autoconf, under | ||
2076 | +dnl the same distribution terms as the rest of that program. | ||
2077 | + | ||
2078 | +dnl From Paul Eggert. | ||
2079 | + | ||
2080 | +# Define HAVE_STDINT_H_WITH_UINTMAX if <stdint.h> exists, | ||
2081 | +# doesn't clash with <sys/types.h>, and declares uintmax_t. | ||
2082 | + | ||
2083 | +AC_DEFUN([jm_AC_HEADER_STDINT_H], | ||
2084 | +[ | ||
2085 | + AC_CACHE_CHECK([for stdint.h], jm_ac_cv_header_stdint_h, | ||
2086 | + [AC_TRY_COMPILE( | ||
2087 | + [#include <sys/types.h> | ||
2088 | +#include <stdint.h>], | ||
2089 | + [uintmax_t i = (uintmax_t) -1;], | ||
2090 | + jm_ac_cv_header_stdint_h=yes, | ||
2091 | + jm_ac_cv_header_stdint_h=no)]) | ||
2092 | + if test $jm_ac_cv_header_stdint_h = yes; then | ||
2093 | + AC_DEFINE_UNQUOTED(HAVE_STDINT_H_WITH_UINTMAX, 1, | ||
2094 | +[Define if <stdint.h> exists, doesn't clash with <sys/types.h>, | ||
2095 | + and declares uintmax_t. ]) | ||
2096 | + fi | ||
2097 | +]) | ||
2098 | --- /dev/null | ||
2099 | +++ e2fsprogs-libs-1.34/m4/uintmax_t.m4 | ||
2100 | @@ -0,0 +1,29 @@ | ||
2101 | +# uintmax_t.m4 serial 6 (gettext-0.11) | ||
2102 | +dnl Copyright (C) 1997-2002 Free Software Foundation, Inc. | ||
2103 | +dnl This file is free software, distributed under the terms of the GNU | ||
2104 | +dnl General Public License. As a special exception to the GNU General | ||
2105 | +dnl Public License, this file may be distributed as part of a program | ||
2106 | +dnl that contains a configuration script generated by Autoconf, under | ||
2107 | +dnl the same distribution terms as the rest of that program. | ||
2108 | + | ||
2109 | +dnl From Paul Eggert. | ||
2110 | + | ||
2111 | +AC_PREREQ(2.13) | ||
2112 | + | ||
2113 | +# Define uintmax_t to `unsigned long' or `unsigned long long' | ||
2114 | +# if <inttypes.h> does not exist. | ||
2115 | + | ||
2116 | +AC_DEFUN([jm_AC_TYPE_UINTMAX_T], | ||
2117 | +[ | ||
2118 | + AC_REQUIRE([jm_AC_HEADER_INTTYPES_H]) | ||
2119 | + AC_REQUIRE([jm_AC_HEADER_STDINT_H]) | ||
2120 | + if test $jm_ac_cv_header_inttypes_h = no && test $jm_ac_cv_header_stdint_h = no; then | ||
2121 | + AC_REQUIRE([jm_AC_TYPE_UNSIGNED_LONG_LONG]) | ||
2122 | + test $ac_cv_type_unsigned_long_long = yes \ | ||
2123 | + && ac_type='unsigned long long' \ | ||
2124 | + || ac_type='unsigned long' | ||
2125 | + AC_DEFINE_UNQUOTED(uintmax_t, $ac_type, | ||
2126 | + [Define to unsigned long or unsigned long long | ||
2127 | + if <inttypes.h> and <stdint.h> don't define.]) | ||
2128 | + fi | ||
2129 | +]) | ||
2130 | --- /dev/null | ||
2131 | +++ e2fsprogs-libs-1.34/m4/ulonglong.m4 | ||
2132 | @@ -0,0 +1,23 @@ | ||
2133 | +# ulonglong.m4 serial 2 (fileutils-4.0.32, gettext-0.10.40) | ||
2134 | +dnl Copyright (C) 1999-2002 Free Software Foundation, Inc. | ||
2135 | +dnl This file is free software, distributed under the terms of the GNU | ||
2136 | +dnl General Public License. As a special exception to the GNU General | ||
2137 | +dnl Public License, this file may be distributed as part of a program | ||
2138 | +dnl that contains a configuration script generated by Autoconf, under | ||
2139 | +dnl the same distribution terms as the rest of that program. | ||
2140 | + | ||
2141 | +dnl From Paul Eggert. | ||
2142 | + | ||
2143 | +AC_DEFUN([jm_AC_TYPE_UNSIGNED_LONG_LONG], | ||
2144 | +[ | ||
2145 | + AC_CACHE_CHECK([for unsigned long long], ac_cv_type_unsigned_long_long, | ||
2146 | + [AC_TRY_LINK([unsigned long long ull = 1; int i = 63;], | ||
2147 | + [unsigned long long ullmax = (unsigned long long) -1; | ||
2148 | + return ull << i | ull >> i | ullmax / ull | ullmax % ull;], | ||
2149 | + ac_cv_type_unsigned_long_long=yes, | ||
2150 | + ac_cv_type_unsigned_long_long=no)]) | ||
2151 | + if test $ac_cv_type_unsigned_long_long = yes; then | ||
2152 | + AC_DEFINE(HAVE_UNSIGNED_LONG_LONG, 1, | ||
2153 | + [Define if you have the unsigned long long type.]) | ||
2154 | + fi | ||
2155 | +]) | ||