Update gnulib files, use valgrind-tests module.
[platform/upstream/libtasn1.git] / gl / m4 / gnulib-comp.m4
1 # DO NOT EDIT! GENERATED AUTOMATICALLY!
2 # Copyright (C) 2002-2010 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   # Code from module arg-nonnull:
29   # Code from module autobuild:
30   AB_INIT
31   # Code from module c++defs:
32   # Code from module extensions:
33   AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
34   # Code from module fdl-1.3:
35   # Code from module gendocs:
36   # Code from module getopt-gnu:
37   # Code from module getopt-posix:
38   # Code from module gettext-h:
39   # Code from module gnumakefile:
40   # Code from module include_next:
41   # Code from module maintainer-makefile:
42   # Code from module manywarnings:
43   # Code from module multiarch:
44   # Code from module pmccabe2html:
45   # Code from module progname:
46   # Code from module read-file:
47   # Code from module realloc-posix:
48   # Code from module stdarg:
49   dnl Some compilers (e.g., AIX 5.3 cc) need to be in c99 mode
50   dnl for the builtin va_copy to work.  With Autoconf 2.60 or later,
51   dnl AC_PROG_CC_STDC arranges for this.  With older Autoconf AC_PROG_CC_STDC
52   dnl shouldn't hurt, though installers are on their own to set c99 mode.
53   AC_REQUIRE([AC_PROG_CC_STDC])
54   # Code from module stddef:
55   # Code from module stdint:
56   # Code from module stdlib:
57   # Code from module unistd:
58   # Code from module update-copyright:
59   # Code from module useless-if-before-free:
60   # Code from module valgrind-tests:
61   # Code from module vc-list-files:
62   # Code from module version-etc:
63   # Code from module version-etc-fsf:
64   # Code from module warn-on-use:
65   # Code from module warnings:
66   # Code from module wchar:
67 ])
68
69 # This macro should be invoked from ./configure.ac, in the section
70 # "Check for header files, types and library functions".
71 AC_DEFUN([gl_INIT],
72 [
73   AM_CONDITIONAL([GL_COND_LIBTOOL], [true])
74   gl_cond_libtool=true
75   gl_m4_base='gl/m4'
76   m4_pushdef([AC_LIBOBJ], m4_defn([gl_LIBOBJ]))
77   m4_pushdef([AC_REPLACE_FUNCS], m4_defn([gl_REPLACE_FUNCS]))
78   m4_pushdef([AC_LIBSOURCES], m4_defn([gl_LIBSOURCES]))
79   m4_pushdef([gl_LIBSOURCES_LIST], [])
80   m4_pushdef([gl_LIBSOURCES_DIR], [])
81   gl_COMMON
82   gl_source_base='gl'
83   # Code from module arg-nonnull:
84   # Code from module autobuild:
85   # Code from module c++defs:
86   # Code from module extensions:
87   # Code from module fdl-1.3:
88   # Code from module gendocs:
89   # Code from module getopt-gnu:
90   gl_FUNC_GETOPT_GNU
91   gl_MODULE_INDICATOR_FOR_TESTS([getopt-gnu])
92   # Code from module getopt-posix:
93   gl_FUNC_GETOPT_POSIX
94   # Code from module gettext-h:
95   AC_SUBST([LIBINTL])
96   AC_SUBST([LTLIBINTL])
97   # Code from module gnumakefile:
98   # Autoconf 2.61a.99 and earlier don't support linking a file only
99   # in VPATH builds.  But since GNUmakefile is for maintainer use
100   # only, it does not matter if we skip the link with older autoconf.
101   # Automake 1.10.1 and earlier try to remove GNUmakefile in non-VPATH
102   # builds, so use a shell variable to bypass this.
103   GNUmakefile=GNUmakefile
104   m4_if(m4_version_compare([2.61a.100],
105         m4_defn([m4_PACKAGE_VERSION])), [1], [],
106         [AC_CONFIG_LINKS([$GNUmakefile:$GNUmakefile], [],
107         [GNUmakefile=$GNUmakefile])])
108   # Code from module include_next:
109   # Code from module maintainer-makefile:
110   AC_CONFIG_COMMANDS_PRE([m4_ifdef([AH_HEADER],
111     [AC_SUBST([CONFIG_INCLUDE], m4_defn([AH_HEADER]))])])
112   # Code from module manywarnings:
113   # Code from module multiarch:
114   gl_MULTIARCH
115   # Code from module pmccabe2html:
116   AC_PATH_PROG([PMCCABE], [pmccabe], [false])
117   # Code from module progname:
118   AC_CHECK_DECLS([program_invocation_name], [], [], [#include <errno.h>])
119   AC_CHECK_DECLS([program_invocation_short_name], [], [], [#include <errno.h>])
120   # Code from module read-file:
121   gl_FUNC_READ_FILE
122   # Code from module realloc-posix:
123   gl_FUNC_REALLOC_POSIX
124   gl_STDLIB_MODULE_INDICATOR([realloc-posix])
125   # Code from module stdarg:
126   gl_STDARG_H
127   # Code from module stddef:
128   gl_STDDEF_H
129   # Code from module stdint:
130   gl_STDINT_H
131   # Code from module stdlib:
132   gl_STDLIB_H
133   # Code from module unistd:
134   gl_UNISTD_H
135   # Code from module update-copyright:
136   # Code from module useless-if-before-free:
137   # Code from module valgrind-tests:
138   gl_VALGRIND_TESTS
139   # Code from module vc-list-files:
140   # Code from module version-etc:
141   gl_VERSION_ETC
142   # Code from module version-etc-fsf:
143   # Code from module warn-on-use:
144   # Code from module warnings:
145   AC_SUBST([WARN_CFLAGS])
146   # Code from module wchar:
147   gl_WCHAR_H
148   # End of code from modules
149   m4_ifval(gl_LIBSOURCES_LIST, [
150     m4_syscmd([test ! -d ]m4_defn([gl_LIBSOURCES_DIR])[ ||
151       for gl_file in ]gl_LIBSOURCES_LIST[ ; do
152         if test ! -r ]m4_defn([gl_LIBSOURCES_DIR])[/$gl_file ; then
153           echo "missing file ]m4_defn([gl_LIBSOURCES_DIR])[/$gl_file" >&2
154           exit 1
155         fi
156       done])dnl
157       m4_if(m4_sysval, [0], [],
158         [AC_FATAL([expected source file, required through AC_LIBSOURCES, not found])])
159   ])
160   m4_popdef([gl_LIBSOURCES_DIR])
161   m4_popdef([gl_LIBSOURCES_LIST])
162   m4_popdef([AC_LIBSOURCES])
163   m4_popdef([AC_REPLACE_FUNCS])
164   m4_popdef([AC_LIBOBJ])
165   AC_CONFIG_COMMANDS_PRE([
166     gl_libobjs=
167     gl_ltlibobjs=
168     if test -n "$gl_LIBOBJS"; then
169       # Remove the extension.
170       sed_drop_objext='s/\.o$//;s/\.obj$//'
171       for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
172         gl_libobjs="$gl_libobjs $i.$ac_objext"
173         gl_ltlibobjs="$gl_ltlibobjs $i.lo"
174       done
175     fi
176     AC_SUBST([gl_LIBOBJS], [$gl_libobjs])
177     AC_SUBST([gl_LTLIBOBJS], [$gl_ltlibobjs])
178   ])
179   gltests_libdeps=
180   gltests_ltlibdeps=
181   m4_pushdef([AC_LIBOBJ], m4_defn([gltests_LIBOBJ]))
182   m4_pushdef([AC_REPLACE_FUNCS], m4_defn([gltests_REPLACE_FUNCS]))
183   m4_pushdef([AC_LIBSOURCES], m4_defn([gltests_LIBSOURCES]))
184   m4_pushdef([gltests_LIBSOURCES_LIST], [])
185   m4_pushdef([gltests_LIBSOURCES_DIR], [])
186   gl_COMMON
187   gl_source_base='tests'
188 changequote(,)dnl
189   gltests_WITNESS=IN_`echo "${PACKAGE-$PACKAGE_TARNAME}" | LC_ALL=C tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ | LC_ALL=C sed -e 's/[^A-Z0-9_]/_/g'`_GNULIB_TESTS
190 changequote([, ])dnl
191   AC_SUBST([gltests_WITNESS])
192   gl_module_indicator_condition=$gltests_WITNESS
193   m4_pushdef([gl_MODULE_INDICATOR_CONDITION], [$gl_module_indicator_condition])
194   gl_VALGRIND_TESTS
195   m4_popdef([gl_MODULE_INDICATOR_CONDITION])
196   m4_ifval(gltests_LIBSOURCES_LIST, [
197     m4_syscmd([test ! -d ]m4_defn([gltests_LIBSOURCES_DIR])[ ||
198       for gl_file in ]gltests_LIBSOURCES_LIST[ ; do
199         if test ! -r ]m4_defn([gltests_LIBSOURCES_DIR])[/$gl_file ; then
200           echo "missing file ]m4_defn([gltests_LIBSOURCES_DIR])[/$gl_file" >&2
201           exit 1
202         fi
203       done])dnl
204       m4_if(m4_sysval, [0], [],
205         [AC_FATAL([expected source file, required through AC_LIBSOURCES, not found])])
206   ])
207   m4_popdef([gltests_LIBSOURCES_DIR])
208   m4_popdef([gltests_LIBSOURCES_LIST])
209   m4_popdef([AC_LIBSOURCES])
210   m4_popdef([AC_REPLACE_FUNCS])
211   m4_popdef([AC_LIBOBJ])
212   AC_CONFIG_COMMANDS_PRE([
213     gltests_libobjs=
214     gltests_ltlibobjs=
215     if test -n "$gltests_LIBOBJS"; then
216       # Remove the extension.
217       sed_drop_objext='s/\.o$//;s/\.obj$//'
218       for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
219         gltests_libobjs="$gltests_libobjs $i.$ac_objext"
220         gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
221       done
222     fi
223     AC_SUBST([gltests_LIBOBJS], [$gltests_libobjs])
224     AC_SUBST([gltests_LTLIBOBJS], [$gltests_ltlibobjs])
225   ])
226 ])
227
228 # Like AC_LIBOBJ, except that the module name goes
229 # into gl_LIBOBJS instead of into LIBOBJS.
230 AC_DEFUN([gl_LIBOBJ], [
231   AS_LITERAL_IF([$1], [gl_LIBSOURCES([$1.c])])dnl
232   gl_LIBOBJS="$gl_LIBOBJS $1.$ac_objext"
233 ])
234
235 # Like AC_REPLACE_FUNCS, except that the module name goes
236 # into gl_LIBOBJS instead of into LIBOBJS.
237 AC_DEFUN([gl_REPLACE_FUNCS], [
238   m4_foreach_w([gl_NAME], [$1], [AC_LIBSOURCES(gl_NAME[.c])])dnl
239   AC_CHECK_FUNCS([$1], , [gl_LIBOBJ($ac_func)])
240 ])
241
242 # Like AC_LIBSOURCES, except the directory where the source file is
243 # expected is derived from the gnulib-tool parameterization,
244 # and alloca is special cased (for the alloca-opt module).
245 # We could also entirely rely on EXTRA_lib..._SOURCES.
246 AC_DEFUN([gl_LIBSOURCES], [
247   m4_foreach([_gl_NAME], [$1], [
248     m4_if(_gl_NAME, [alloca.c], [], [
249       m4_define([gl_LIBSOURCES_DIR], [gl])
250       m4_append([gl_LIBSOURCES_LIST], _gl_NAME, [ ])
251     ])
252   ])
253 ])
254
255 # Like AC_LIBOBJ, except that the module name goes
256 # into gltests_LIBOBJS instead of into LIBOBJS.
257 AC_DEFUN([gltests_LIBOBJ], [
258   AS_LITERAL_IF([$1], [gltests_LIBSOURCES([$1.c])])dnl
259   gltests_LIBOBJS="$gltests_LIBOBJS $1.$ac_objext"
260 ])
261
262 # Like AC_REPLACE_FUNCS, except that the module name goes
263 # into gltests_LIBOBJS instead of into LIBOBJS.
264 AC_DEFUN([gltests_REPLACE_FUNCS], [
265   m4_foreach_w([gl_NAME], [$1], [AC_LIBSOURCES(gl_NAME[.c])])dnl
266   AC_CHECK_FUNCS([$1], , [gltests_LIBOBJ($ac_func)])
267 ])
268
269 # Like AC_LIBSOURCES, except the directory where the source file is
270 # expected is derived from the gnulib-tool parameterization,
271 # and alloca is special cased (for the alloca-opt module).
272 # We could also entirely rely on EXTRA_lib..._SOURCES.
273 AC_DEFUN([gltests_LIBSOURCES], [
274   m4_foreach([_gl_NAME], [$1], [
275     m4_if(_gl_NAME, [alloca.c], [], [
276       m4_define([gltests_LIBSOURCES_DIR], [tests])
277       m4_append([gltests_LIBSOURCES_LIST], _gl_NAME, [ ])
278     ])
279   ])
280 ])
281
282 # This macro records the list of files which have been installed by
283 # gnulib-tool and may be removed by future gnulib-tool invocations.
284 AC_DEFUN([gl_FILE_LIST], [
285   build-aux/arg-nonnull.h
286   build-aux/c++defs.h
287   build-aux/gendocs.sh
288   build-aux/pmccabe.css
289   build-aux/pmccabe2html
290   build-aux/update-copyright
291   build-aux/useless-if-before-free
292   build-aux/vc-list-files
293   build-aux/warn-on-use.h
294   doc/fdl-1.3.texi
295   doc/gendocs_template
296   lib/getopt.c
297   lib/getopt.in.h
298   lib/getopt1.c
299   lib/getopt_int.h
300   lib/gettext.h
301   lib/progname.c
302   lib/progname.h
303   lib/read-file.c
304   lib/read-file.h
305   lib/realloc.c
306   lib/stdarg.in.h
307   lib/stddef.in.h
308   lib/stdint.in.h
309   lib/stdlib.in.h
310   lib/unistd.in.h
311   lib/version-etc-fsf.c
312   lib/version-etc.c
313   lib/version-etc.h
314   lib/wchar.in.h
315   m4/00gnulib.m4
316   m4/autobuild.m4
317   m4/extensions.m4
318   m4/getopt.m4
319   m4/gnulib-common.m4
320   m4/include_next.m4
321   m4/longlong.m4
322   m4/malloc.m4
323   m4/manywarnings.m4
324   m4/multiarch.m4
325   m4/read-file.m4
326   m4/realloc.m4
327   m4/stdarg.m4
328   m4/stddef_h.m4
329   m4/stdint.m4
330   m4/stdlib_h.m4
331   m4/unistd_h.m4
332   m4/valgrind-tests.m4
333   m4/version-etc.m4
334   m4/warn-on-use.m4
335   m4/warnings.m4
336   m4/wchar_h.m4
337   m4/wchar_t.m4
338   m4/wint_t.m4
339   top/GNUmakefile
340   top/maint.mk
341 ])