]> sjero.net Git - wget/blob - m4/gnulib-comp.m4
5cd73ad0b1c9f627bbea926bc7197f03ccde2fe7
[wget] / m4 / gnulib-comp.m4
1 # DO NOT EDIT! GENERATED AUTOMATICALLY!
2 # Copyright (C) 2002-2008 Free Software Foundation, Inc.
3 #
4 # This file is free software, distributed under the terms of the GNU
5 # General Public License.  As a special exception to the GNU General
6 # Public License, this file may be distributed as part of a program
7 # that contains a configuration script generated by Autoconf, under
8 # the same distribution terms as the rest of that program.
9 #
10 # Generated by gnulib-tool.
11 #
12 # This file represents the compiled summary of the specification in
13 # gnulib-cache.m4. It lists the computed macro invocations that need
14 # to be invoked from configure.ac.
15 # In projects using CVS, this file can be treated like other built files.
16
17
18 # This macro should be invoked from ./configure.ac, in the section
19 # "Checks for programs", right after AC_PROG_CC, and certainly before
20 # any checks for libraries, header files, types and library functions.
21 AC_DEFUN([gl_EARLY],
22 [
23   m4_pattern_forbid([^gl_[A-Z]])dnl the gnulib macro namespace
24   m4_pattern_allow([^gl_ES$])dnl a valid locale name
25   m4_pattern_allow([^gl_LIBOBJS$])dnl a variable
26   m4_pattern_allow([^gl_LTLIBOBJS$])dnl a variable
27   AC_REQUIRE([AC_PROG_RANLIB])
28   AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
29 ])
30
31 # This macro should be invoked from ./configure.ac, in the section
32 # "Check for header files, types and library functions".
33 AC_DEFUN([gl_INIT],
34 [
35   AM_CONDITIONAL([GL_COND_LIBTOOL], [false])
36   gl_cond_libtool=false
37   gl_libdeps=
38   gl_ltlibdeps=
39   m4_pushdef([AC_LIBOBJ], m4_defn([gl_LIBOBJ]))
40   m4_pushdef([AC_REPLACE_FUNCS], m4_defn([gl_REPLACE_FUNCS]))
41   m4_pushdef([AC_LIBSOURCES], m4_defn([gl_LIBSOURCES]))
42   m4_pushdef([gl_LIBSOURCES_LIST], [])
43   m4_pushdef([gl_LIBSOURCES_DIR], [])
44   gl_COMMON
45   gl_source_base='lib'
46   gl_EOVERFLOW
47   gl_FUNC_ALLOCA
48   gl_ERROR
49   m4_ifdef([AM_XGETTEXT_OPTION],
50     [AM_XGETTEXT_OPTION([--flag=error:3:c-format])
51      AM_XGETTEXT_OPTION([--flag=error_at_line:5:c-format])])
52   gl_EXITFAIL
53   gl_FUNC_GETDELIM
54   gl_STDIO_MODULE_INDICATOR([getdelim])
55   gl_FUNC_GETLINE
56   gl_STDIO_MODULE_INDICATOR([getline])
57   gl_GETOPT
58   gl_FUNC_GETPASS_GNU
59   AC_SUBST([LIBINTL])
60   AC_SUBST([LTLIBINTL])
61   # Autoconf 2.61a.99 and earlier don't support linking a file only
62   # in VPATH builds.  But since GNUmakefile is for maintainer use
63   # only, it does not matter if we skip the link with older autoconf.
64   # Automake 1.10.1 and earlier try to remove GNUmakefile in non-VPATH
65   # builds, so use a shell variable to bypass this.
66   GNUmakefile=GNUmakefile
67   m4_if(m4_version_compare([2.61a.100],
68         m4_defn([m4_PACKAGE_VERSION])), [1], [],
69         [AC_CONFIG_LINKS([$GNUmakefile:$GNUmakefile], [],
70         [GNUmakefile=$GNUmakefile])])
71   gl_INLINE
72   gl_QUOTE
73   gl_QUOTEARG
74   gl_FUNC_REALLOC_POSIX
75   gl_STDLIB_MODULE_INDICATOR([realloc-posix])
76   AM_STDBOOL_H
77   gl_STDIO_H
78   gl_STDLIB_H
79   gl_FUNC_STRERROR
80   gl_STRING_MODULE_INDICATOR([strerror])
81   gl_HEADER_STRING_H
82   gl_UNISTD_H
83   gl_WCHAR_H
84   gl_WCTYPE_H
85   gl_XALLOC
86   m4_ifval(gl_LIBSOURCES_LIST, [
87     m4_syscmd([test ! -d ]gl_LIBSOURCES_DIR[ ||
88       for gl_file in ]gl_LIBSOURCES_LIST[ ; do
89         if test ! -r ]gl_LIBSOURCES_DIR[/$gl_file ; then
90           echo "missing file ]gl_LIBSOURCES_DIR[/$gl_file" >&2
91           exit 1
92         fi
93       done])dnl
94       m4_if(m4_sysval, [0], [],
95         [AC_FATAL([expected source file, required through AC_LIBSOURCES, not found])])
96   ])
97   m4_popdef([gl_LIBSOURCES_DIR])
98   m4_popdef([gl_LIBSOURCES_LIST])
99   m4_popdef([AC_LIBSOURCES])
100   m4_popdef([AC_REPLACE_FUNCS])
101   m4_popdef([AC_LIBOBJ])
102   AC_CONFIG_COMMANDS_PRE([
103     gl_libobjs=
104     gl_ltlibobjs=
105     if test -n "$gl_LIBOBJS"; then
106       # Remove the extension.
107       sed_drop_objext='s/\.o$//;s/\.obj$//'
108       for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed "$sed_drop_objext" | sort | uniq`; do
109         gl_libobjs="$gl_libobjs $i.$ac_objext"
110         gl_ltlibobjs="$gl_ltlibobjs $i.lo"
111       done
112     fi
113     AC_SUBST([gl_LIBOBJS], [$gl_libobjs])
114     AC_SUBST([gl_LTLIBOBJS], [$gl_ltlibobjs])
115   ])
116   gltests_libdeps=
117   gltests_ltlibdeps=
118   m4_pushdef([AC_LIBOBJ], m4_defn([gltests_LIBOBJ]))
119   m4_pushdef([AC_REPLACE_FUNCS], m4_defn([gltests_REPLACE_FUNCS]))
120   m4_pushdef([AC_LIBSOURCES], m4_defn([gltests_LIBSOURCES]))
121   m4_pushdef([gltests_LIBSOURCES_LIST], [])
122   m4_pushdef([gltests_LIBSOURCES_DIR], [])
123   gl_COMMON
124   gl_source_base='tests'
125   m4_ifval(gltests_LIBSOURCES_LIST, [
126     m4_syscmd([test ! -d ]gltests_LIBSOURCES_DIR[ ||
127       for gl_file in ]gltests_LIBSOURCES_LIST[ ; do
128         if test ! -r ]gltests_LIBSOURCES_DIR[/$gl_file ; then
129           echo "missing file ]gltests_LIBSOURCES_DIR[/$gl_file" >&2
130           exit 1
131         fi
132       done])dnl
133       m4_if(m4_sysval, [0], [],
134         [AC_FATAL([expected source file, required through AC_LIBSOURCES, not found])])
135   ])
136   m4_popdef([gltests_LIBSOURCES_DIR])
137   m4_popdef([gltests_LIBSOURCES_LIST])
138   m4_popdef([AC_LIBSOURCES])
139   m4_popdef([AC_REPLACE_FUNCS])
140   m4_popdef([AC_LIBOBJ])
141   AC_CONFIG_COMMANDS_PRE([
142     gltests_libobjs=
143     gltests_ltlibobjs=
144     if test -n "$gltests_LIBOBJS"; then
145       # Remove the extension.
146       sed_drop_objext='s/\.o$//;s/\.obj$//'
147       for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed "$sed_drop_objext" | sort | uniq`; do
148         gltests_libobjs="$gltests_libobjs $i.$ac_objext"
149         gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
150       done
151     fi
152     AC_SUBST([gltests_LIBOBJS], [$gltests_libobjs])
153     AC_SUBST([gltests_LTLIBOBJS], [$gltests_ltlibobjs])
154   ])
155   LIBGNU_LIBDEPS="$gl_libdeps"
156   AC_SUBST([LIBGNU_LIBDEPS])
157   LIBGNU_LTLIBDEPS="$gl_ltlibdeps"
158   AC_SUBST([LIBGNU_LTLIBDEPS])
159 ])
160
161 # Like AC_LIBOBJ, except that the module name goes
162 # into gl_LIBOBJS instead of into LIBOBJS.
163 AC_DEFUN([gl_LIBOBJ], [
164   AS_LITERAL_IF([$1], [gl_LIBSOURCES([$1.c])])dnl
165   gl_LIBOBJS="$gl_LIBOBJS $1.$ac_objext"
166 ])
167
168 # Like AC_REPLACE_FUNCS, except that the module name goes
169 # into gl_LIBOBJS instead of into LIBOBJS.
170 AC_DEFUN([gl_REPLACE_FUNCS], [
171   m4_foreach_w([gl_NAME], [$1], [AC_LIBSOURCES(gl_NAME[.c])])dnl
172   AC_CHECK_FUNCS([$1], , [gl_LIBOBJ($ac_func)])
173 ])
174
175 # Like AC_LIBSOURCES, except the directory where the source file is
176 # expected is derived from the gnulib-tool parameterization,
177 # and alloca is special cased (for the alloca-opt module).
178 # We could also entirely rely on EXTRA_lib..._SOURCES.
179 AC_DEFUN([gl_LIBSOURCES], [
180   m4_foreach([_gl_NAME], [$1], [
181     m4_if(_gl_NAME, [alloca.c], [], [
182       m4_define([gl_LIBSOURCES_DIR], [lib])
183       m4_append([gl_LIBSOURCES_LIST], _gl_NAME, [ ])
184     ])
185   ])
186 ])
187
188 # Like AC_LIBOBJ, except that the module name goes
189 # into gltests_LIBOBJS instead of into LIBOBJS.
190 AC_DEFUN([gltests_LIBOBJ], [
191   AS_LITERAL_IF([$1], [gltests_LIBSOURCES([$1.c])])dnl
192   gltests_LIBOBJS="$gltests_LIBOBJS $1.$ac_objext"
193 ])
194
195 # Like AC_REPLACE_FUNCS, except that the module name goes
196 # into gltests_LIBOBJS instead of into LIBOBJS.
197 AC_DEFUN([gltests_REPLACE_FUNCS], [
198   m4_foreach_w([gl_NAME], [$1], [AC_LIBSOURCES(gl_NAME[.c])])dnl
199   AC_CHECK_FUNCS([$1], , [gltests_LIBOBJ($ac_func)])
200 ])
201
202 # Like AC_LIBSOURCES, except the directory where the source file is
203 # expected is derived from the gnulib-tool parameterization,
204 # and alloca is special cased (for the alloca-opt module).
205 # We could also entirely rely on EXTRA_lib..._SOURCES.
206 AC_DEFUN([gltests_LIBSOURCES], [
207   m4_foreach([_gl_NAME], [$1], [
208     m4_if(_gl_NAME, [alloca.c], [], [
209       m4_define([gltests_LIBSOURCES_DIR], [tests])
210       m4_append([gltests_LIBSOURCES_LIST], _gl_NAME, [ ])
211     ])
212   ])
213 ])
214
215 # This macro records the list of files which have been installed by
216 # gnulib-tool and may be removed by future gnulib-tool invocations.
217 AC_DEFUN([gl_FILE_LIST], [
218   build-aux/link-warning.h
219   lib/alloca.c
220   lib/alloca.in.h
221   lib/c-ctype.c
222   lib/c-ctype.h
223   lib/error.c
224   lib/error.h
225   lib/exitfail.c
226   lib/exitfail.h
227   lib/getdelim.c
228   lib/getline.c
229   lib/getopt.c
230   lib/getopt.in.h
231   lib/getopt1.c
232   lib/getopt_int.h
233   lib/getpass.c
234   lib/getpass.h
235   lib/gettext.h
236   lib/intprops.h
237   lib/quote.c
238   lib/quote.h
239   lib/quotearg.c
240   lib/quotearg.h
241   lib/realloc.c
242   lib/stdbool.in.h
243   lib/stdio.in.h
244   lib/stdlib.in.h
245   lib/strerror.c
246   lib/string.in.h
247   lib/unistd.in.h
248   lib/wchar.in.h
249   lib/wctype.in.h
250   lib/xalloc-die.c
251   lib/xalloc.h
252   lib/xmalloc.c
253   m4/alloca.m4
254   m4/eoverflow.m4
255   m4/error.m4
256   m4/exitfail.m4
257   m4/extensions.m4
258   m4/getdelim.m4
259   m4/getline.m4
260   m4/getopt.m4
261   m4/getpass.m4
262   m4/gnulib-common.m4
263   m4/include_next.m4
264   m4/inline.m4
265   m4/malloc.m4
266   m4/mbrtowc.m4
267   m4/mbstate_t.m4
268   m4/quote.m4
269   m4/quotearg.m4
270   m4/realloc.m4
271   m4/stdbool.m4
272   m4/stdio_h.m4
273   m4/stdlib_h.m4
274   m4/strerror.m4
275   m4/string_h.m4
276   m4/unistd_h.m4
277   m4/wchar.m4
278   m4/wctype.m4
279   m4/wint_t.m4
280   m4/xalloc.m4
281   top/GNUmakefile
282   top/maint.mk
283 ])