comparison src/popt-2-gnulib.patch @ 684:6ab8ff5ab4f6

use the autotools for package popt
author Volker Grabsch <vog@notjusthosting.com>
date Fri, 05 Feb 2010 03:06:08 +0100
parents
children 29f1ba4559ae
comparison
equal deleted inserted replaced
683:9a35ed88357b 684:6ab8ff5ab4f6
1 This file is part of mingw-cross-env.
2 See doc/index.html or doc/README for further information.
3
4 diff -urN popt-1.15-mod/lib/dummy.c popt-1.15-mod2/lib/dummy.c
5 --- popt-1.15-mod/lib/dummy.c 1970-01-01 01:00:00.000000000 +0100
6 +++ popt-1.15-mod2/lib/dummy.c 2009-06-16 15:18:05.000000000 +0200
7 @@ -0,0 +1,42 @@
8 +/* A dummy file, to prevent empty libraries from breaking builds.
9 + Copyright (C) 2004, 2007 Free Software Foundation, Inc.
10 +
11 + This program is free software: you can redistribute it and/or modify
12 + it under the terms of the GNU General Public License as published by
13 + the Free Software Foundation; either version 3 of the License, or
14 + (at your option) any later version.
15 +
16 + This program is distributed in the hope that it will be useful,
17 + but WITHOUT ANY WARRANTY; without even the implied warranty of
18 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 + GNU General Public License for more details.
20 +
21 + You should have received a copy of the GNU General Public License
22 + along with this program. If not, see <http://www.gnu.org/licenses/>. */
23 +
24 +/* Some systems, reportedly OpenBSD and Mac OS X, refuse to create
25 + libraries without any object files. You might get an error like:
26 +
27 + > ar cru .libs/libgl.a
28 + > ar: no archive members specified
29 +
30 + Compiling this file, and adding its object file to the library, will
31 + prevent the library from being empty. */
32 +
33 +/* Some systems, such as Solaris with cc 5.0, refuse to work with libraries
34 + that don't export any symbol. You might get an error like:
35 +
36 + > cc ... libgnu.a
37 + > ild: (bad file) garbled symbol table in archive ../gllib/libgnu.a
38 +
39 + Compiling this file, and adding its object file to the library, will
40 + prevent the library from exporting no symbols. */
41 +
42 +#ifdef __sun
43 +/* This declaration ensures that the library will export at least 1 symbol. */
44 +int gl_dummy_symbol;
45 +#else
46 +/* This declaration is solely to ensure that after preprocessing
47 + this file is never empty. */
48 +typedef int dummy;
49 +#endif
50 diff -urN popt-1.15-mod/lib/Makefile.am popt-1.15-mod2/lib/Makefile.am
51 --- popt-1.15-mod/lib/Makefile.am 1970-01-01 01:00:00.000000000 +0100
52 +++ popt-1.15-mod2/lib/Makefile.am 2009-06-16 15:18:05.000000000 +0200
53 @@ -0,0 +1,53 @@
54 +## DO NOT EDIT! GENERATED AUTOMATICALLY!
55 +## Process this file with automake to produce Makefile.in.
56 +# Copyright (C) 2002-2009 Free Software Foundation, Inc.
57 +#
58 +# This file is free software, distributed under the terms of the GNU
59 +# General Public License. As a special exception to the GNU General
60 +# Public License, this file may be distributed as part of a program
61 +# that contains a configuration script generated by Autoconf, under
62 +# the same distribution terms as the rest of that program.
63 +#
64 +# Generated by gnulib-tool.
65 +# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=. --libtool --macro-prefix=gl
66 +
67 +AUTOMAKE_OPTIONS = 1.5 gnits
68 +
69 +SUBDIRS =
70 +noinst_HEADERS =
71 +noinst_LIBRARIES =
72 +noinst_LTLIBRARIES =
73 +EXTRA_DIST =
74 +BUILT_SOURCES =
75 +SUFFIXES =
76 +MOSTLYCLEANFILES = core *.stackdump
77 +MOSTLYCLEANDIRS =
78 +CLEANFILES =
79 +DISTCLEANFILES =
80 +MAINTAINERCLEANFILES =
81 +
82 +AM_CPPFLAGS =
83 +AM_CFLAGS =
84 +
85 +noinst_LTLIBRARIES += libgnu.la
86 +
87 +libgnu_la_SOURCES =
88 +libgnu_la_LIBADD = $(gl_LTLIBOBJS)
89 +libgnu_la_DEPENDENCIES = $(gl_LTLIBOBJS)
90 +EXTRA_libgnu_la_SOURCES =
91 +libgnu_la_LDFLAGS = $(AM_LDFLAGS)
92 +
93 +## begin gnulib module dummy
94 +
95 +libgnu_la_SOURCES += dummy.c
96 +
97 +## end gnulib module dummy
98 +
99 +
100 +mostlyclean-local: mostlyclean-generic
101 + @for dir in '' $(MOSTLYCLEANDIRS); do \
102 + if test -n "$$dir" && test -d $$dir; then \
103 + echo "rmdir $$dir"; rmdir $$dir; \
104 + fi; \
105 + done; \
106 + :
107 diff -urN popt-1.15-mod/m4/00gnulib.m4 popt-1.15-mod2/m4/00gnulib.m4
108 --- popt-1.15-mod/m4/00gnulib.m4 1970-01-01 01:00:00.000000000 +0100
109 +++ popt-1.15-mod2/m4/00gnulib.m4 2009-06-16 15:18:05.000000000 +0200
110 @@ -0,0 +1,30 @@
111 +# 00gnulib.m4 serial 2
112 +dnl Copyright (C) 2009 Free Software Foundation, Inc.
113 +dnl This file is free software; the Free Software Foundation
114 +dnl gives unlimited permission to copy and/or distribute it,
115 +dnl with or without modifications, as long as this notice is preserved.
116 +
117 +dnl This file must be named something that sorts before all other
118 +dnl gnulib-provided .m4 files. It is needed until such time as we can
119 +dnl assume Autoconf 2.64, with its improved AC_DEFUN_ONCE semantics.
120 +
121 +# AC_DEFUN_ONCE([NAME], VALUE)
122 +# ----------------------------
123 +# Define NAME to expand to VALUE on the first use (whether by direct
124 +# expansion, or by AC_REQUIRE), and to nothing on all subsequent uses.
125 +# Avoid bugs in AC_REQUIRE in Autoconf 2.63 and earlier. This
126 +# definition is slower than the version in Autoconf 2.64, because it
127 +# can only use interfaces that existed since 2.59; but it achieves the
128 +# same effect. Quoting is necessary to avoid confusing Automake.
129 +m4_version_prereq([2.63.263], [],
130 +[m4_define([AC][_DEFUN_ONCE],
131 + [AC][_DEFUN([$1],
132 + [AC_REQUIRE([_gl_DEFUN_ONCE([$1])],
133 + [m4_indir([_gl_DEFUN_ONCE([$1])])])])]dnl
134 +[AC][_DEFUN([_gl_DEFUN_ONCE([$1])], [$2])])])
135 +
136 +# gl_00GNULIB
137 +# -----------
138 +# Witness macro that this file has been included. Needed to force
139 +# Automake to include this file prior to all other gnulib .m4 files.
140 +AC_DEFUN([gl_00GNULIB])
141 diff -urN popt-1.15-mod/m4/gnulib-cache.m4 popt-1.15-mod2/m4/gnulib-cache.m4
142 --- popt-1.15-mod/m4/gnulib-cache.m4 1970-01-01 01:00:00.000000000 +0100
143 +++ popt-1.15-mod2/m4/gnulib-cache.m4 2009-06-16 15:18:05.000000000 +0200
144 @@ -0,0 +1,35 @@
145 +# Copyright (C) 2002-2009 Free Software Foundation, Inc.
146 +#
147 +# This file is free software, distributed under the terms of the GNU
148 +# General Public License. As a special exception to the GNU General
149 +# Public License, this file may be distributed as part of a program
150 +# that contains a configuration script generated by Autoconf, under
151 +# the same distribution terms as the rest of that program.
152 +#
153 +# Generated by gnulib-tool.
154 +#
155 +# This file represents the specification of how gnulib-tool is used.
156 +# It acts as a cache: It is written and read by gnulib-tool.
157 +# In projects using CVS, this file is meant to be stored in CVS,
158 +# like the configure.ac and various Makefile.am files.
159 +
160 +
161 +# Specification in the form of a command-line invocation:
162 +# gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=. --libtool --macro-prefix=gl
163 +
164 +# Specification in the form of a few gnulib-tool.m4 macro invocations:
165 +gl_LOCAL_DIR([])
166 +gl_MODULES([
167 +
168 +])
169 +gl_AVOID([])
170 +gl_SOURCE_BASE([lib])
171 +gl_M4_BASE([m4])
172 +gl_PO_BASE([])
173 +gl_DOC_BASE([doc])
174 +gl_TESTS_BASE([tests])
175 +gl_LIB([libgnu])
176 +gl_MAKEFILE_NAME([])
177 +gl_LIBTOOL
178 +gl_MACRO_PREFIX([gl])
179 +gl_PO_DOMAIN([])
180 diff -urN popt-1.15-mod/m4/gnulib-common.m4 popt-1.15-mod2/m4/gnulib-common.m4
181 --- popt-1.15-mod/m4/gnulib-common.m4 1970-01-01 01:00:00.000000000 +0100
182 +++ popt-1.15-mod2/m4/gnulib-common.m4 2009-06-16 15:18:05.000000000 +0200
183 @@ -0,0 +1,124 @@
184 +# gnulib-common.m4 serial 11
185 +dnl Copyright (C) 2007-2009 Free Software Foundation, Inc.
186 +dnl This file is free software; the Free Software Foundation
187 +dnl gives unlimited permission to copy and/or distribute it,
188 +dnl with or without modifications, as long as this notice is preserved.
189 +
190 +# gl_COMMON
191 +# is expanded unconditionally through gnulib-tool magic.
192 +AC_DEFUN([gl_COMMON], [
193 + dnl Use AC_REQUIRE here, so that the code is expanded once only.
194 + AC_REQUIRE([gl_00GNULIB])
195 + AC_REQUIRE([gl_COMMON_BODY])
196 +])
197 +AC_DEFUN([gl_COMMON_BODY], [
198 + AH_VERBATIM([isoc99_inline],
199 +[/* Work around a bug in Apple GCC 4.0.1 build 5465: In C99 mode, it supports
200 + the ISO C 99 semantics of 'extern inline' (unlike the GNU C semantics of
201 + earlier versions), but does not display it by setting __GNUC_STDC_INLINE__.
202 + __APPLE__ && __MACH__ test for MacOS X.
203 + __APPLE_CC__ tests for the Apple compiler and its version.
204 + __STDC_VERSION__ tests for the C99 mode. */
205 +#if defined __APPLE__ && defined __MACH__ && __APPLE_CC__ >= 5465 && !defined __cplusplus && __STDC_VERSION__ >= 199901L && !defined __GNUC_STDC_INLINE__
206 +# define __GNUC_STDC_INLINE__ 1
207 +#endif])
208 + AH_VERBATIM([unused_parameter],
209 +[/* Define as a marker that can be attached to function parameter declarations
210 + for parameters that are not used. This helps to reduce warnings, such as
211 + from GCC -Wunused-parameter. */
212 +#if __GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)
213 +# define _UNUSED_PARAMETER_ __attribute__ ((__unused__))
214 +#else
215 +# define _UNUSED_PARAMETER_
216 +#endif
217 +])
218 +])
219 +
220 +# gl_MODULE_INDICATOR([modulename])
221 +# defines a C macro indicating the presence of the given module.
222 +AC_DEFUN([gl_MODULE_INDICATOR],
223 +[
224 + AC_DEFINE([GNULIB_]translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___]), [1],
225 + [Define to 1 when using the gnulib module ]$1[.])
226 +])
227 +
228 +# m4_foreach_w
229 +# is a backport of autoconf-2.59c's m4_foreach_w.
230 +# Remove this macro when we can assume autoconf >= 2.60.
231 +m4_ifndef([m4_foreach_w],
232 + [m4_define([m4_foreach_w],
233 + [m4_foreach([$1], m4_split(m4_normalize([$2]), [ ]), [$3])])])
234 +
235 +# AC_PROG_MKDIR_P
236 +# is a backport of autoconf-2.60's AC_PROG_MKDIR_P.
237 +# Remove this macro when we can assume autoconf >= 2.60.
238 +m4_ifdef([AC_PROG_MKDIR_P], [], [
239 + AC_DEFUN_ONCE([AC_PROG_MKDIR_P],
240 + [AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake
241 + MKDIR_P='$(mkdir_p)'
242 + AC_SUBST([MKDIR_P])])])
243 +
244 +# AC_C_RESTRICT
245 +# This definition overrides the AC_C_RESTRICT macro from autoconf 2.60..2.61,
246 +# so that mixed use of GNU C and GNU C++ and mixed use of Sun C and Sun C++
247 +# works.
248 +# This definition can be removed once autoconf >= 2.62 can be assumed.
249 +AC_DEFUN([AC_C_RESTRICT],
250 +[AC_CACHE_CHECK([for C/C++ restrict keyword], [ac_cv_c_restrict],
251 + [ac_cv_c_restrict=no
252 + # The order here caters to the fact that C++ does not require restrict.
253 + for ac_kw in __restrict __restrict__ _Restrict restrict; do
254 + AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
255 + [[typedef int * int_ptr;
256 + int foo (int_ptr $ac_kw ip) {
257 + return ip[0];
258 + }]],
259 + [[int s[1];
260 + int * $ac_kw t = s;
261 + t[0] = 0;
262 + return foo(t)]])],
263 + [ac_cv_c_restrict=$ac_kw])
264 + test "$ac_cv_c_restrict" != no && break
265 + done
266 + ])
267 + AH_VERBATIM([restrict],
268 +[/* Define to the equivalent of the C99 'restrict' keyword, or to
269 + nothing if this is not supported. Do not define if restrict is
270 + supported directly. */
271 +#undef restrict
272 +/* Work around a bug in Sun C++: it does not support _Restrict, even
273 + though the corresponding Sun C compiler does, which causes
274 + "#define restrict _Restrict" in the previous line. Perhaps some future
275 + version of Sun C++ will work with _Restrict; if so, it'll probably
276 + define __RESTRICT, just as Sun C does. */
277 +#if defined __SUNPRO_CC && !defined __RESTRICT
278 +# define _Restrict
279 +#endif])
280 + case $ac_cv_c_restrict in
281 + restrict) ;;
282 + no) AC_DEFINE([restrict], []) ;;
283 + *) AC_DEFINE_UNQUOTED([restrict], [$ac_cv_c_restrict]) ;;
284 + esac
285 +])
286 +
287 +# gl_BIGENDIAN
288 +# is like AC_C_BIGENDIAN, except that it can be AC_REQUIREd.
289 +# Note that AC_REQUIRE([AC_C_BIGENDIAN]) does not work reliably because some
290 +# macros invoke AC_C_BIGENDIAN with arguments.
291 +AC_DEFUN([gl_BIGENDIAN],
292 +[
293 + AC_C_BIGENDIAN
294 +])
295 +
296 +# gl_CACHE_VAL_SILENT(cache-id, command-to-set-it)
297 +# is like AC_CACHE_VAL(cache-id, command-to-set-it), except that it does not
298 +# output a spurious "(cached)" mark in the midst of other configure output.
299 +# This macro should be used instead of AC_CACHE_VAL when it is not surrounded
300 +# by an AC_MSG_CHECKING/AC_MSG_RESULT pair.
301 +AC_DEFUN([gl_CACHE_VAL_SILENT],
302 +[
303 + saved_as_echo_n="$as_echo_n"
304 + as_echo_n=':'
305 + AC_CACHE_VAL([$1], [$2])
306 + as_echo_n="$saved_as_echo_n"
307 +])
308 diff -urN popt-1.15-mod/m4/gnulib-comp.m4 popt-1.15-mod2/m4/gnulib-comp.m4
309 --- popt-1.15-mod/m4/gnulib-comp.m4 1970-01-01 01:00:00.000000000 +0100
310 +++ popt-1.15-mod2/m4/gnulib-comp.m4 2009-06-16 15:18:05.000000000 +0200
311 @@ -0,0 +1,175 @@
312 +# DO NOT EDIT! GENERATED AUTOMATICALLY!
313 +# Copyright (C) 2002-2009 Free Software Foundation, Inc.
314 +#
315 +# This file is free software, distributed under the terms of the GNU
316 +# General Public License. As a special exception to the GNU General
317 +# Public License, this file may be distributed as part of a program
318 +# that contains a configuration script generated by Autoconf, under
319 +# the same distribution terms as the rest of that program.
320 +#
321 +# Generated by gnulib-tool.
322 +#
323 +# This file represents the compiled summary of the specification in
324 +# gnulib-cache.m4. It lists the computed macro invocations that need
325 +# to be invoked from configure.ac.
326 +# In projects using CVS, this file can be treated like other built files.
327 +
328 +
329 +# This macro should be invoked from ./configure.ac, in the section
330 +# "Checks for programs", right after AC_PROG_CC, and certainly before
331 +# any checks for libraries, header files, types and library functions.
332 +AC_DEFUN([gl_EARLY],
333 +[
334 + m4_pattern_forbid([^gl_[A-Z]])dnl the gnulib macro namespace
335 + m4_pattern_allow([^gl_ES$])dnl a valid locale name
336 + m4_pattern_allow([^gl_LIBOBJS$])dnl a variable
337 + m4_pattern_allow([^gl_LTLIBOBJS$])dnl a variable
338 + AC_REQUIRE([AC_PROG_RANLIB])
339 +])
340 +
341 +# This macro should be invoked from ./configure.ac, in the section
342 +# "Check for header files, types and library functions".
343 +AC_DEFUN([gl_INIT],
344 +[
345 + AM_CONDITIONAL([GL_COND_LIBTOOL], [true])
346 + gl_cond_libtool=true
347 + m4_pushdef([AC_LIBOBJ], m4_defn([gl_LIBOBJ]))
348 + m4_pushdef([AC_REPLACE_FUNCS], m4_defn([gl_REPLACE_FUNCS]))
349 + m4_pushdef([AC_LIBSOURCES], m4_defn([gl_LIBSOURCES]))
350 + m4_pushdef([gl_LIBSOURCES_LIST], [])
351 + m4_pushdef([gl_LIBSOURCES_DIR], [])
352 + gl_COMMON
353 + gl_source_base='lib'
354 + m4_ifval(gl_LIBSOURCES_LIST, [
355 + m4_syscmd([test ! -d ]m4_defn([gl_LIBSOURCES_DIR])[ ||
356 + for gl_file in ]gl_LIBSOURCES_LIST[ ; do
357 + if test ! -r ]m4_defn([gl_LIBSOURCES_DIR])[/$gl_file ; then
358 + echo "missing file ]m4_defn([gl_LIBSOURCES_DIR])[/$gl_file" >&2
359 + exit 1
360 + fi
361 + done])dnl
362 + m4_if(m4_sysval, [0], [],
363 + [AC_FATAL([expected source file, required through AC_LIBSOURCES, not found])])
364 + ])
365 + m4_popdef([gl_LIBSOURCES_DIR])
366 + m4_popdef([gl_LIBSOURCES_LIST])
367 + m4_popdef([AC_LIBSOURCES])
368 + m4_popdef([AC_REPLACE_FUNCS])
369 + m4_popdef([AC_LIBOBJ])
370 + AC_CONFIG_COMMANDS_PRE([
371 + gl_libobjs=
372 + gl_ltlibobjs=
373 + if test -n "$gl_LIBOBJS"; then
374 + # Remove the extension.
375 + sed_drop_objext='s/\.o$//;s/\.obj$//'
376 + for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed "$sed_drop_objext" | sort | uniq`; do
377 + gl_libobjs="$gl_libobjs $i.$ac_objext"
378 + gl_ltlibobjs="$gl_ltlibobjs $i.lo"
379 + done
380 + fi
381 + AC_SUBST([gl_LIBOBJS], [$gl_libobjs])
382 + AC_SUBST([gl_LTLIBOBJS], [$gl_ltlibobjs])
383 + ])
384 + gltests_libdeps=
385 + gltests_ltlibdeps=
386 + m4_pushdef([AC_LIBOBJ], m4_defn([gltests_LIBOBJ]))
387 + m4_pushdef([AC_REPLACE_FUNCS], m4_defn([gltests_REPLACE_FUNCS]))
388 + m4_pushdef([AC_LIBSOURCES], m4_defn([gltests_LIBSOURCES]))
389 + m4_pushdef([gltests_LIBSOURCES_LIST], [])
390 + m4_pushdef([gltests_LIBSOURCES_DIR], [])
391 + gl_COMMON
392 + gl_source_base='tests'
393 + m4_ifval(gltests_LIBSOURCES_LIST, [
394 + m4_syscmd([test ! -d ]m4_defn([gltests_LIBSOURCES_DIR])[ ||
395 + for gl_file in ]gltests_LIBSOURCES_LIST[ ; do
396 + if test ! -r ]m4_defn([gltests_LIBSOURCES_DIR])[/$gl_file ; then
397 + echo "missing file ]m4_defn([gltests_LIBSOURCES_DIR])[/$gl_file" >&2
398 + exit 1
399 + fi
400 + done])dnl
401 + m4_if(m4_sysval, [0], [],
402 + [AC_FATAL([expected source file, required through AC_LIBSOURCES, not found])])
403 + ])
404 + m4_popdef([gltests_LIBSOURCES_DIR])
405 + m4_popdef([gltests_LIBSOURCES_LIST])
406 + m4_popdef([AC_LIBSOURCES])
407 + m4_popdef([AC_REPLACE_FUNCS])
408 + m4_popdef([AC_LIBOBJ])
409 + AC_CONFIG_COMMANDS_PRE([
410 + gltests_libobjs=
411 + gltests_ltlibobjs=
412 + if test -n "$gltests_LIBOBJS"; then
413 + # Remove the extension.
414 + sed_drop_objext='s/\.o$//;s/\.obj$//'
415 + for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed "$sed_drop_objext" | sort | uniq`; do
416 + gltests_libobjs="$gltests_libobjs $i.$ac_objext"
417 + gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
418 + done
419 + fi
420 + AC_SUBST([gltests_LIBOBJS], [$gltests_libobjs])
421 + AC_SUBST([gltests_LTLIBOBJS], [$gltests_ltlibobjs])
422 + ])
423 +])
424 +
425 +# Like AC_LIBOBJ, except that the module name goes
426 +# into gl_LIBOBJS instead of into LIBOBJS.
427 +AC_DEFUN([gl_LIBOBJ], [
428 + AS_LITERAL_IF([$1], [gl_LIBSOURCES([$1.c])])dnl
429 + gl_LIBOBJS="$gl_LIBOBJS $1.$ac_objext"
430 +])
431 +
432 +# Like AC_REPLACE_FUNCS, except that the module name goes
433 +# into gl_LIBOBJS instead of into LIBOBJS.
434 +AC_DEFUN([gl_REPLACE_FUNCS], [
435 + m4_foreach_w([gl_NAME], [$1], [AC_LIBSOURCES(gl_NAME[.c])])dnl
436 + AC_CHECK_FUNCS([$1], , [gl_LIBOBJ($ac_func)])
437 +])
438 +
439 +# Like AC_LIBSOURCES, except the directory where the source file is
440 +# expected is derived from the gnulib-tool parameterization,
441 +# and alloca is special cased (for the alloca-opt module).
442 +# We could also entirely rely on EXTRA_lib..._SOURCES.
443 +AC_DEFUN([gl_LIBSOURCES], [
444 + m4_foreach([_gl_NAME], [$1], [
445 + m4_if(_gl_NAME, [alloca.c], [], [
446 + m4_define([gl_LIBSOURCES_DIR], [lib])
447 + m4_append([gl_LIBSOURCES_LIST], _gl_NAME, [ ])
448 + ])
449 + ])
450 +])
451 +
452 +# Like AC_LIBOBJ, except that the module name goes
453 +# into gltests_LIBOBJS instead of into LIBOBJS.
454 +AC_DEFUN([gltests_LIBOBJ], [
455 + AS_LITERAL_IF([$1], [gltests_LIBSOURCES([$1.c])])dnl
456 + gltests_LIBOBJS="$gltests_LIBOBJS $1.$ac_objext"
457 +])
458 +
459 +# Like AC_REPLACE_FUNCS, except that the module name goes
460 +# into gltests_LIBOBJS instead of into LIBOBJS.
461 +AC_DEFUN([gltests_REPLACE_FUNCS], [
462 + m4_foreach_w([gl_NAME], [$1], [AC_LIBSOURCES(gl_NAME[.c])])dnl
463 + AC_CHECK_FUNCS([$1], , [gltests_LIBOBJ($ac_func)])
464 +])
465 +
466 +# Like AC_LIBSOURCES, except the directory where the source file is
467 +# expected is derived from the gnulib-tool parameterization,
468 +# and alloca is special cased (for the alloca-opt module).
469 +# We could also entirely rely on EXTRA_lib..._SOURCES.
470 +AC_DEFUN([gltests_LIBSOURCES], [
471 + m4_foreach([_gl_NAME], [$1], [
472 + m4_if(_gl_NAME, [alloca.c], [], [
473 + m4_define([gltests_LIBSOURCES_DIR], [tests])
474 + m4_append([gltests_LIBSOURCES_LIST], _gl_NAME, [ ])
475 + ])
476 + ])
477 +])
478 +
479 +# This macro records the list of files which have been installed by
480 +# gnulib-tool and may be removed by future gnulib-tool invocations.
481 +AC_DEFUN([gl_FILE_LIST], [
482 + lib/dummy.c
483 + m4/00gnulib.m4
484 + m4/gnulib-common.m4
485 + m4/onceonly.m4
486 +])
487 diff -urN popt-1.15-mod/m4/gnulib-tool.m4 popt-1.15-mod2/m4/gnulib-tool.m4
488 --- popt-1.15-mod/m4/gnulib-tool.m4 1970-01-01 01:00:00.000000000 +0100
489 +++ popt-1.15-mod2/m4/gnulib-tool.m4 2009-06-16 15:18:05.000000000 +0200
490 @@ -0,0 +1,57 @@
491 +# gnulib-tool.m4 serial 2
492 +dnl Copyright (C) 2004-2005 Free Software Foundation, Inc.
493 +dnl This file is free software; the Free Software Foundation
494 +dnl gives unlimited permission to copy and/or distribute it,
495 +dnl with or without modifications, as long as this notice is preserved.
496 +
497 +dnl The following macros need not be invoked explicitly.
498 +dnl Invoking them does nothing except to declare default arguments
499 +dnl for "gnulib-tool --import".
500 +
501 +dnl Usage: gl_LOCAL_DIR([DIR])
502 +AC_DEFUN([gl_LOCAL_DIR], [])
503 +
504 +dnl Usage: gl_MODULES([module1 module2 ...])
505 +AC_DEFUN([gl_MODULES], [])
506 +
507 +dnl Usage: gl_AVOID([module1 module2 ...])
508 +AC_DEFUN([gl_AVOID], [])
509 +
510 +dnl Usage: gl_SOURCE_BASE([DIR])
511 +AC_DEFUN([gl_SOURCE_BASE], [])
512 +
513 +dnl Usage: gl_M4_BASE([DIR])
514 +AC_DEFUN([gl_M4_BASE], [])
515 +
516 +dnl Usage: gl_PO_BASE([DIR])
517 +AC_DEFUN([gl_PO_BASE], [])
518 +
519 +dnl Usage: gl_DOC_BASE([DIR])
520 +AC_DEFUN([gl_DOC_BASE], [])
521 +
522 +dnl Usage: gl_TESTS_BASE([DIR])
523 +AC_DEFUN([gl_TESTS_BASE], [])
524 +
525 +dnl Usage: gl_WITH_TESTS
526 +AC_DEFUN([gl_WITH_TESTS], [])
527 +
528 +dnl Usage: gl_LIB([LIBNAME])
529 +AC_DEFUN([gl_LIB], [])
530 +
531 +dnl Usage: gl_LGPL or gl_LGPL([VERSION])
532 +AC_DEFUN([gl_LGPL], [])
533 +
534 +dnl Usage: gl_MAKEFILE_NAME([FILENAME])
535 +AC_DEFUN([gl_MAKEFILE_NAME], [])
536 +
537 +dnl Usage: gl_LIBTOOL
538 +AC_DEFUN([gl_LIBTOOL], [])
539 +
540 +dnl Usage: gl_MACRO_PREFIX([PREFIX])
541 +AC_DEFUN([gl_MACRO_PREFIX], [])
542 +
543 +dnl Usage: gl_PO_DOMAIN([DOMAIN])
544 +AC_DEFUN([gl_PO_DOMAIN], [])
545 +
546 +dnl Usage: gl_VC_FILES([BOOLEAN])
547 +AC_DEFUN([gl_VC_FILES], [])
548 diff -urN popt-1.15-mod/m4/onceonly.m4 popt-1.15-mod2/m4/onceonly.m4
549 --- popt-1.15-mod/m4/onceonly.m4 1970-01-01 01:00:00.000000000 +0100
550 +++ popt-1.15-mod2/m4/onceonly.m4 2009-06-16 15:18:05.000000000 +0200
551 @@ -0,0 +1,90 @@
552 +# onceonly.m4 serial 6
553 +dnl Copyright (C) 2002-2003, 2005-2006, 2008 Free Software Foundation, Inc.
554 +dnl This file is free software, distributed under the terms of the GNU
555 +dnl General Public License. As a special exception to the GNU General
556 +dnl Public License, this file may be distributed as part of a program
557 +dnl that contains a configuration script generated by Autoconf, under
558 +dnl the same distribution terms as the rest of that program.
559 +
560 +dnl This file defines some "once only" variants of standard autoconf macros.
561 +dnl AC_CHECK_HEADERS_ONCE like AC_CHECK_HEADERS
562 +dnl AC_CHECK_FUNCS_ONCE like AC_CHECK_FUNCS
563 +dnl AC_CHECK_DECLS_ONCE like AC_CHECK_DECLS
564 +dnl AC_REQUIRE([AC_FUNC_STRCOLL]) like AC_FUNC_STRCOLL
565 +dnl The advantage is that the check for each of the headers/functions/decls
566 +dnl will be put only once into the 'configure' file. It keeps the size of
567 +dnl the 'configure' file down, and avoids redundant output when 'configure'
568 +dnl is run.
569 +dnl The drawback is that the checks cannot be conditionalized. If you write
570 +dnl if some_condition; then gl_CHECK_HEADERS(stdlib.h); fi
571 +dnl inside an AC_DEFUNed function, the gl_CHECK_HEADERS macro call expands to
572 +dnl empty, and the check will be inserted before the body of the AC_DEFUNed
573 +dnl function.
574 +
575 +dnl The original code implemented AC_CHECK_HEADERS_ONCE and AC_CHECK_FUNCS_ONCE
576 +dnl in terms of AC_DEFUN and AC_REQUIRE. This implementation uses diversions to
577 +dnl named sections DEFAULTS and INIT_PREPARE in order to check all requested
578 +dnl headers at once, thus reducing the size of 'configure'. It is known to work
579 +dnl with autoconf 2.57..2.62 at least . The size reduction is ca. 9%.
580 +
581 +dnl Autoconf version 2.59 plus gnulib is required; this file is not needed
582 +dnl with Autoconf 2.60 or greater. But note that autoconf's implementation of
583 +dnl AC_CHECK_DECLS_ONCE expects a comma-separated list of symbols as first
584 +dnl argument!
585 +AC_PREREQ([2.59])
586 +
587 +# AC_CHECK_HEADERS_ONCE(HEADER1 HEADER2 ...) is a once-only variant of
588 +# AC_CHECK_HEADERS(HEADER1 HEADER2 ...).
589 +AC_DEFUN([AC_CHECK_HEADERS_ONCE], [
590 + :
591 + m4_foreach_w([gl_HEADER_NAME], [$1], [
592 + AC_DEFUN([gl_CHECK_HEADER_]m4_quote(translit(gl_HEADER_NAME,
593 + [./-], [___])), [
594 + m4_divert_text([INIT_PREPARE],
595 + [gl_header_list="$gl_header_list gl_HEADER_NAME"])
596 + gl_HEADERS_EXPANSION
597 + AH_TEMPLATE(AS_TR_CPP([HAVE_]m4_defn([gl_HEADER_NAME])),
598 + [Define to 1 if you have the <]m4_defn([gl_HEADER_NAME])[> header file.])
599 + ])
600 + AC_REQUIRE([gl_CHECK_HEADER_]m4_quote(translit(gl_HEADER_NAME,
601 + [./-], [___])))
602 + ])
603 +])
604 +m4_define([gl_HEADERS_EXPANSION], [
605 + m4_divert_text([DEFAULTS], [gl_header_list=])
606 + AC_CHECK_HEADERS([$gl_header_list])
607 + m4_define([gl_HEADERS_EXPANSION], [])
608 +])
609 +
610 +# AC_CHECK_FUNCS_ONCE(FUNC1 FUNC2 ...) is a once-only variant of
611 +# AC_CHECK_FUNCS(FUNC1 FUNC2 ...).
612 +AC_DEFUN([AC_CHECK_FUNCS_ONCE], [
613 + :
614 + m4_foreach_w([gl_FUNC_NAME], [$1], [
615 + AC_DEFUN([gl_CHECK_FUNC_]m4_defn([gl_FUNC_NAME]), [
616 + m4_divert_text([INIT_PREPARE],
617 + [gl_func_list="$gl_func_list gl_FUNC_NAME"])
618 + gl_FUNCS_EXPANSION
619 + AH_TEMPLATE(AS_TR_CPP([HAVE_]m4_defn([gl_FUNC_NAME])),
620 + [Define to 1 if you have the `]m4_defn([gl_FUNC_NAME])[' function.])
621 + ])
622 + AC_REQUIRE([gl_CHECK_FUNC_]m4_defn([gl_FUNC_NAME]))
623 + ])
624 +])
625 +m4_define([gl_FUNCS_EXPANSION], [
626 + m4_divert_text([DEFAULTS], [gl_func_list=])
627 + AC_CHECK_FUNCS([$gl_func_list])
628 + m4_define([gl_FUNCS_EXPANSION], [])
629 +])
630 +
631 +# AC_CHECK_DECLS_ONCE(DECL1 DECL2 ...) is a once-only variant of
632 +# AC_CHECK_DECLS(DECL1, DECL2, ...).
633 +AC_DEFUN([AC_CHECK_DECLS_ONCE], [
634 + :
635 + m4_foreach_w([gl_DECL_NAME], [$1], [
636 + AC_DEFUN([gl_CHECK_DECL_]m4_defn([gl_DECL_NAME]), [
637 + AC_CHECK_DECLS(m4_defn([gl_DECL_NAME]))
638 + ])
639 + AC_REQUIRE([gl_CHECK_DECL_]m4_defn([gl_DECL_NAME]))
640 + ])
641 +])