24e54fa3b824b7ae528aab9bcdcd3dd107fe3531
[external/binutils.git] / gdb / gnulib / import / m4 / gnulib-comp.m4
1 # DO NOT EDIT! GENERATED AUTOMATICALLY!
2 # Copyright (C) 2002-2012 Free Software Foundation, Inc.
3 #
4 # This file is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation; either version 3 of the License, or
7 # (at your option) any later version.
8 #
9 # This file is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12 # GNU General Public License for more details.
13 #
14 # You should have received a copy of the GNU General Public License
15 # along with this file.  If not, see <http://www.gnu.org/licenses/>.
16 #
17 # As a special exception to the GNU General Public License,
18 # this file may be distributed as part of a program that
19 # contains a configuration script generated by Autoconf, under
20 # the same distribution terms as the rest of that program.
21 #
22 # Generated by gnulib-tool.
23 #
24 # This file represents the compiled summary of the specification in
25 # gnulib-cache.m4. It lists the computed macro invocations that need
26 # to be invoked from configure.ac.
27 # In projects that use version control, this file can be treated like
28 # other built files.
29
30
31 # This macro should be invoked from ./configure.ac, in the section
32 # "Checks for programs", right after AC_PROG_CC, and certainly before
33 # any checks for libraries, header files, types and library functions.
34 AC_DEFUN([gl_EARLY],
35 [
36   m4_pattern_forbid([^gl_[A-Z]])dnl the gnulib macro namespace
37   m4_pattern_allow([^gl_ES$])dnl a valid locale name
38   m4_pattern_allow([^gl_LIBOBJS$])dnl a variable
39   m4_pattern_allow([^gl_LTLIBOBJS$])dnl a variable
40   AC_REQUIRE([gl_PROG_AR_RANLIB])
41   # Code from module alloca:
42   # Code from module alloca-opt:
43   # Code from module canonicalize-lgpl:
44   # Code from module configmake:
45   # Code from module dirent:
46   # Code from module dirfd:
47   # Code from module dosname:
48   # Code from module errno:
49   # Code from module extensions:
50   AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
51   # Code from module extern-inline:
52   # Code from module float:
53   # Code from module fnmatch:
54   # Code from module fnmatch-gnu:
55   # Code from module fpieee:
56   AC_REQUIRE([gl_FP_IEEE])
57   # Code from module fpucw:
58   # Code from module frexp:
59   # Code from module frexpl:
60   # Code from module include_next:
61   # Code from module inttypes:
62   # Code from module inttypes-incomplete:
63   # Code from module isnand-nolibm:
64   # Code from module isnanl-nolibm:
65   # Code from module largefile:
66   AC_REQUIRE([AC_SYS_LARGEFILE])
67   # Code from module localcharset:
68   # Code from module lstat:
69   # Code from module malloca:
70   # Code from module math:
71   # Code from module mbrtowc:
72   # Code from module mbsinit:
73   # Code from module mbsrtowcs:
74   # Code from module memchr:
75   # Code from module memmem:
76   # Code from module memmem-simple:
77   # Code from module multiarch:
78   # Code from module nocrash:
79   # Code from module pathmax:
80   # Code from module readlink:
81   # Code from module snippet/_Noreturn:
82   # Code from module snippet/arg-nonnull:
83   # Code from module snippet/c++defs:
84   # Code from module snippet/warn-on-use:
85   # Code from module ssize_t:
86   # Code from module stat:
87   # Code from module stdbool:
88   # Code from module stddef:
89   # Code from module stdint:
90   # Code from module stdlib:
91   # Code from module streq:
92   # Code from module string:
93   # Code from module strnlen1:
94   # Code from module strstr:
95   # Code from module strstr-simple:
96   # Code from module sys_stat:
97   # Code from module sys_types:
98   # Code from module time:
99   # Code from module unistd:
100   # Code from module update-copyright:
101   # Code from module verify:
102   # Code from module wchar:
103   # Code from module wctype-h:
104 ])
105
106 # This macro should be invoked from ./configure.ac, in the section
107 # "Check for header files, types and library functions".
108 AC_DEFUN([gl_INIT],
109 [
110   AM_CONDITIONAL([GL_COND_LIBTOOL], [false])
111   gl_cond_libtool=false
112   gl_libdeps=
113   gl_ltlibdeps=
114   gl_m4_base='import/m4'
115   m4_pushdef([AC_LIBOBJ], m4_defn([gl_LIBOBJ]))
116   m4_pushdef([AC_REPLACE_FUNCS], m4_defn([gl_REPLACE_FUNCS]))
117   m4_pushdef([AC_LIBSOURCES], m4_defn([gl_LIBSOURCES]))
118   m4_pushdef([gl_LIBSOURCES_LIST], [])
119   m4_pushdef([gl_LIBSOURCES_DIR], [])
120   gl_COMMON
121   gl_source_base='import'
122   gl_FUNC_ALLOCA
123   gl_CANONICALIZE_LGPL
124   if test $HAVE_CANONICALIZE_FILE_NAME = 0 || test $REPLACE_CANONICALIZE_FILE_NAME = 1; then
125     AC_LIBOBJ([canonicalize-lgpl])
126   fi
127   gl_MODULE_INDICATOR([canonicalize-lgpl])
128   gl_STDLIB_MODULE_INDICATOR([canonicalize_file_name])
129   gl_STDLIB_MODULE_INDICATOR([realpath])
130   gl_CONFIGMAKE_PREP
131   gl_DIRENT_H
132   gl_FUNC_DIRFD
133   if test $ac_cv_func_dirfd = no && test $gl_cv_func_dirfd_macro = no; then
134     AC_LIBOBJ([dirfd])
135     gl_PREREQ_DIRFD
136   fi
137   gl_DIRENT_MODULE_INDICATOR([dirfd])
138   gl_HEADER_ERRNO_H
139   AC_REQUIRE([gl_EXTERN_INLINE])
140   gl_FLOAT_H
141   if test $REPLACE_FLOAT_LDBL = 1; then
142     AC_LIBOBJ([float])
143   fi
144   if test $REPLACE_ITOLD = 1; then
145     AC_LIBOBJ([itold])
146   fi
147   gl_FUNC_FNMATCH_POSIX
148   if test -n "$FNMATCH_H"; then
149     AC_LIBOBJ([fnmatch])
150     gl_PREREQ_FNMATCH
151   fi
152   gl_FUNC_FNMATCH_GNU
153   if test -n "$FNMATCH_H"; then
154     AC_LIBOBJ([fnmatch])
155     gl_PREREQ_FNMATCH
156   fi
157   gl_FUNC_FREXP
158   if test $gl_func_frexp != yes; then
159     AC_LIBOBJ([frexp])
160   fi
161   gl_MATH_MODULE_INDICATOR([frexp])
162   gl_FUNC_FREXPL
163   if test $HAVE_DECL_FREXPL = 0 || test $gl_func_frexpl = no; then
164     AC_LIBOBJ([frexpl])
165   fi
166   gl_MATH_MODULE_INDICATOR([frexpl])
167   gl_INTTYPES_H
168   gl_INTTYPES_INCOMPLETE
169   gl_FUNC_ISNAND_NO_LIBM
170   if test $gl_func_isnand_no_libm != yes; then
171     AC_LIBOBJ([isnand])
172     gl_PREREQ_ISNAND
173   fi
174   gl_FUNC_ISNANL_NO_LIBM
175   if test $gl_func_isnanl_no_libm != yes; then
176     AC_LIBOBJ([isnanl])
177     gl_PREREQ_ISNANL
178   fi
179   AC_REQUIRE([gl_LARGEFILE])
180   gl_LOCALCHARSET
181   LOCALCHARSET_TESTS_ENVIRONMENT="CHARSETALIASDIR=\"\$(abs_top_builddir)/$gl_source_base\""
182   AC_SUBST([LOCALCHARSET_TESTS_ENVIRONMENT])
183   gl_FUNC_LSTAT
184   if test $REPLACE_LSTAT = 1; then
185     AC_LIBOBJ([lstat])
186     gl_PREREQ_LSTAT
187   fi
188   gl_SYS_STAT_MODULE_INDICATOR([lstat])
189   gl_MALLOCA
190   gl_MATH_H
191   gl_FUNC_MBRTOWC
192   if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then
193     AC_LIBOBJ([mbrtowc])
194     gl_PREREQ_MBRTOWC
195   fi
196   gl_WCHAR_MODULE_INDICATOR([mbrtowc])
197   gl_FUNC_MBSINIT
198   if test $HAVE_MBSINIT = 0 || test $REPLACE_MBSINIT = 1; then
199     AC_LIBOBJ([mbsinit])
200     gl_PREREQ_MBSINIT
201   fi
202   gl_WCHAR_MODULE_INDICATOR([mbsinit])
203   gl_FUNC_MBSRTOWCS
204   if test $HAVE_MBSRTOWCS = 0 || test $REPLACE_MBSRTOWCS = 1; then
205     AC_LIBOBJ([mbsrtowcs])
206     AC_LIBOBJ([mbsrtowcs-state])
207     gl_PREREQ_MBSRTOWCS
208   fi
209   gl_WCHAR_MODULE_INDICATOR([mbsrtowcs])
210   gl_FUNC_MEMCHR
211   if test $HAVE_MEMCHR = 0 || test $REPLACE_MEMCHR = 1; then
212     AC_LIBOBJ([memchr])
213     gl_PREREQ_MEMCHR
214   fi
215   gl_STRING_MODULE_INDICATOR([memchr])
216   gl_FUNC_MEMMEM
217   if test $HAVE_MEMMEM = 0 || test $REPLACE_MEMMEM = 1; then
218     AC_LIBOBJ([memmem])
219   fi
220   gl_FUNC_MEMMEM_SIMPLE
221   if test $HAVE_MEMMEM = 0 || test $REPLACE_MEMMEM = 1; then
222     AC_LIBOBJ([memmem])
223   fi
224   gl_STRING_MODULE_INDICATOR([memmem])
225   gl_MULTIARCH
226   gl_PATHMAX
227   gl_FUNC_READLINK
228   if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then
229     AC_LIBOBJ([readlink])
230     gl_PREREQ_READLINK
231   fi
232   gl_UNISTD_MODULE_INDICATOR([readlink])
233   gt_TYPE_SSIZE_T
234   gl_FUNC_STAT
235   if test $REPLACE_STAT = 1; then
236     AC_LIBOBJ([stat])
237     gl_PREREQ_STAT
238   fi
239   gl_SYS_STAT_MODULE_INDICATOR([stat])
240   AM_STDBOOL_H
241   gl_STDDEF_H
242   gl_STDINT_H
243   gl_STDLIB_H
244   gl_HEADER_STRING_H
245   gl_FUNC_STRSTR
246   if test $REPLACE_STRSTR = 1; then
247     AC_LIBOBJ([strstr])
248   fi
249   gl_FUNC_STRSTR_SIMPLE
250   if test $REPLACE_STRSTR = 1; then
251     AC_LIBOBJ([strstr])
252   fi
253   gl_STRING_MODULE_INDICATOR([strstr])
254   gl_HEADER_SYS_STAT_H
255   AC_PROG_MKDIR_P
256   gl_SYS_TYPES_H
257   AC_PROG_MKDIR_P
258   gl_HEADER_TIME_H
259   gl_UNISTD_H
260   gl_WCHAR_H
261   gl_WCTYPE_H
262   # End of code from modules
263   m4_ifval(gl_LIBSOURCES_LIST, [
264     m4_syscmd([test ! -d ]m4_defn([gl_LIBSOURCES_DIR])[ ||
265       for gl_file in ]gl_LIBSOURCES_LIST[ ; do
266         if test ! -r ]m4_defn([gl_LIBSOURCES_DIR])[/$gl_file ; then
267           echo "missing file ]m4_defn([gl_LIBSOURCES_DIR])[/$gl_file" >&2
268           exit 1
269         fi
270       done])dnl
271       m4_if(m4_sysval, [0], [],
272         [AC_FATAL([expected source file, required through AC_LIBSOURCES, not found])])
273   ])
274   m4_popdef([gl_LIBSOURCES_DIR])
275   m4_popdef([gl_LIBSOURCES_LIST])
276   m4_popdef([AC_LIBSOURCES])
277   m4_popdef([AC_REPLACE_FUNCS])
278   m4_popdef([AC_LIBOBJ])
279   AC_CONFIG_COMMANDS_PRE([
280     gl_libobjs=
281     gl_ltlibobjs=
282     if test -n "$gl_LIBOBJS"; then
283       # Remove the extension.
284       sed_drop_objext='s/\.o$//;s/\.obj$//'
285       for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
286         gl_libobjs="$gl_libobjs $i.$ac_objext"
287         gl_ltlibobjs="$gl_ltlibobjs $i.lo"
288       done
289     fi
290     AC_SUBST([gl_LIBOBJS], [$gl_libobjs])
291     AC_SUBST([gl_LTLIBOBJS], [$gl_ltlibobjs])
292   ])
293   gltests_libdeps=
294   gltests_ltlibdeps=
295   m4_pushdef([AC_LIBOBJ], m4_defn([gltests_LIBOBJ]))
296   m4_pushdef([AC_REPLACE_FUNCS], m4_defn([gltests_REPLACE_FUNCS]))
297   m4_pushdef([AC_LIBSOURCES], m4_defn([gltests_LIBSOURCES]))
298   m4_pushdef([gltests_LIBSOURCES_LIST], [])
299   m4_pushdef([gltests_LIBSOURCES_DIR], [])
300   gl_COMMON
301   gl_source_base='tests'
302 changequote(,)dnl
303   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
304 changequote([, ])dnl
305   AC_SUBST([gltests_WITNESS])
306   gl_module_indicator_condition=$gltests_WITNESS
307   m4_pushdef([gl_MODULE_INDICATOR_CONDITION], [$gl_module_indicator_condition])
308   m4_popdef([gl_MODULE_INDICATOR_CONDITION])
309   m4_ifval(gltests_LIBSOURCES_LIST, [
310     m4_syscmd([test ! -d ]m4_defn([gltests_LIBSOURCES_DIR])[ ||
311       for gl_file in ]gltests_LIBSOURCES_LIST[ ; do
312         if test ! -r ]m4_defn([gltests_LIBSOURCES_DIR])[/$gl_file ; then
313           echo "missing file ]m4_defn([gltests_LIBSOURCES_DIR])[/$gl_file" >&2
314           exit 1
315         fi
316       done])dnl
317       m4_if(m4_sysval, [0], [],
318         [AC_FATAL([expected source file, required through AC_LIBSOURCES, not found])])
319   ])
320   m4_popdef([gltests_LIBSOURCES_DIR])
321   m4_popdef([gltests_LIBSOURCES_LIST])
322   m4_popdef([AC_LIBSOURCES])
323   m4_popdef([AC_REPLACE_FUNCS])
324   m4_popdef([AC_LIBOBJ])
325   AC_CONFIG_COMMANDS_PRE([
326     gltests_libobjs=
327     gltests_ltlibobjs=
328     if test -n "$gltests_LIBOBJS"; then
329       # Remove the extension.
330       sed_drop_objext='s/\.o$//;s/\.obj$//'
331       for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
332         gltests_libobjs="$gltests_libobjs $i.$ac_objext"
333         gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
334       done
335     fi
336     AC_SUBST([gltests_LIBOBJS], [$gltests_libobjs])
337     AC_SUBST([gltests_LTLIBOBJS], [$gltests_ltlibobjs])
338   ])
339   LIBGNU_LIBDEPS="$gl_libdeps"
340   AC_SUBST([LIBGNU_LIBDEPS])
341   LIBGNU_LTLIBDEPS="$gl_ltlibdeps"
342   AC_SUBST([LIBGNU_LTLIBDEPS])
343 ])
344
345 # Like AC_LIBOBJ, except that the module name goes
346 # into gl_LIBOBJS instead of into LIBOBJS.
347 AC_DEFUN([gl_LIBOBJ], [
348   AS_LITERAL_IF([$1], [gl_LIBSOURCES([$1.c])])dnl
349   gl_LIBOBJS="$gl_LIBOBJS $1.$ac_objext"
350 ])
351
352 # Like AC_REPLACE_FUNCS, except that the module name goes
353 # into gl_LIBOBJS instead of into LIBOBJS.
354 AC_DEFUN([gl_REPLACE_FUNCS], [
355   m4_foreach_w([gl_NAME], [$1], [AC_LIBSOURCES(gl_NAME[.c])])dnl
356   AC_CHECK_FUNCS([$1], , [gl_LIBOBJ($ac_func)])
357 ])
358
359 # Like AC_LIBSOURCES, except the directory where the source file is
360 # expected is derived from the gnulib-tool parameterization,
361 # and alloca is special cased (for the alloca-opt module).
362 # We could also entirely rely on EXTRA_lib..._SOURCES.
363 AC_DEFUN([gl_LIBSOURCES], [
364   m4_foreach([_gl_NAME], [$1], [
365     m4_if(_gl_NAME, [alloca.c], [], [
366       m4_define([gl_LIBSOURCES_DIR], [import])
367       m4_append([gl_LIBSOURCES_LIST], _gl_NAME, [ ])
368     ])
369   ])
370 ])
371
372 # Like AC_LIBOBJ, except that the module name goes
373 # into gltests_LIBOBJS instead of into LIBOBJS.
374 AC_DEFUN([gltests_LIBOBJ], [
375   AS_LITERAL_IF([$1], [gltests_LIBSOURCES([$1.c])])dnl
376   gltests_LIBOBJS="$gltests_LIBOBJS $1.$ac_objext"
377 ])
378
379 # Like AC_REPLACE_FUNCS, except that the module name goes
380 # into gltests_LIBOBJS instead of into LIBOBJS.
381 AC_DEFUN([gltests_REPLACE_FUNCS], [
382   m4_foreach_w([gl_NAME], [$1], [AC_LIBSOURCES(gl_NAME[.c])])dnl
383   AC_CHECK_FUNCS([$1], , [gltests_LIBOBJ($ac_func)])
384 ])
385
386 # Like AC_LIBSOURCES, except the directory where the source file is
387 # expected is derived from the gnulib-tool parameterization,
388 # and alloca is special cased (for the alloca-opt module).
389 # We could also entirely rely on EXTRA_lib..._SOURCES.
390 AC_DEFUN([gltests_LIBSOURCES], [
391   m4_foreach([_gl_NAME], [$1], [
392     m4_if(_gl_NAME, [alloca.c], [], [
393       m4_define([gltests_LIBSOURCES_DIR], [tests])
394       m4_append([gltests_LIBSOURCES_LIST], _gl_NAME, [ ])
395     ])
396   ])
397 ])
398
399 # This macro records the list of files which have been installed by
400 # gnulib-tool and may be removed by future gnulib-tool invocations.
401 AC_DEFUN([gl_FILE_LIST], [
402   build-aux/snippet/_Noreturn.h
403   build-aux/snippet/arg-nonnull.h
404   build-aux/snippet/c++defs.h
405   build-aux/snippet/warn-on-use.h
406   build-aux/update-copyright
407   lib/alloca.c
408   lib/alloca.in.h
409   lib/canonicalize-lgpl.c
410   lib/config.charset
411   lib/dirent.in.h
412   lib/dirfd.c
413   lib/dosname.h
414   lib/errno.in.h
415   lib/float+.h
416   lib/float.c
417   lib/float.in.h
418   lib/fnmatch.c
419   lib/fnmatch.in.h
420   lib/fnmatch_loop.c
421   lib/fpucw.h
422   lib/frexp.c
423   lib/frexpl.c
424   lib/inttypes.in.h
425   lib/isnan.c
426   lib/isnand-nolibm.h
427   lib/isnand.c
428   lib/isnanl-nolibm.h
429   lib/isnanl.c
430   lib/itold.c
431   lib/localcharset.c
432   lib/localcharset.h
433   lib/lstat.c
434   lib/malloca.c
435   lib/malloca.h
436   lib/malloca.valgrind
437   lib/math.c
438   lib/math.in.h
439   lib/mbrtowc.c
440   lib/mbsinit.c
441   lib/mbsrtowcs-impl.h
442   lib/mbsrtowcs-state.c
443   lib/mbsrtowcs.c
444   lib/memchr.c
445   lib/memchr.valgrind
446   lib/memmem.c
447   lib/pathmax.h
448   lib/readlink.c
449   lib/ref-add.sin
450   lib/ref-del.sin
451   lib/stat.c
452   lib/stdbool.in.h
453   lib/stddef.in.h
454   lib/stdint.in.h
455   lib/stdlib.in.h
456   lib/str-two-way.h
457   lib/streq.h
458   lib/string.in.h
459   lib/strnlen1.c
460   lib/strnlen1.h
461   lib/strstr.c
462   lib/sys_stat.in.h
463   lib/sys_types.in.h
464   lib/time.in.h
465   lib/unistd.c
466   lib/unistd.in.h
467   lib/verify.h
468   lib/wchar.in.h
469   lib/wctype-h.c
470   lib/wctype.in.h
471   m4/00gnulib.m4
472   m4/alloca.m4
473   m4/canonicalize.m4
474   m4/codeset.m4
475   m4/configmake.m4
476   m4/dirent_h.m4
477   m4/dirfd.m4
478   m4/double-slash-root.m4
479   m4/eealloc.m4
480   m4/errno_h.m4
481   m4/exponentd.m4
482   m4/exponentl.m4
483   m4/extensions.m4
484   m4/extern-inline.m4
485   m4/fcntl-o.m4
486   m4/float_h.m4
487   m4/fnmatch.m4
488   m4/fpieee.m4
489   m4/frexp.m4
490   m4/frexpl.m4
491   m4/glibc21.m4
492   m4/gnulib-common.m4
493   m4/include_next.m4
494   m4/inttypes-pri.m4
495   m4/inttypes.m4
496   m4/isnand.m4
497   m4/isnanl.m4
498   m4/largefile.m4
499   m4/localcharset.m4
500   m4/locale-fr.m4
501   m4/locale-ja.m4
502   m4/locale-zh.m4
503   m4/longlong.m4
504   m4/lstat.m4
505   m4/malloca.m4
506   m4/math_h.m4
507   m4/mbrtowc.m4
508   m4/mbsinit.m4
509   m4/mbsrtowcs.m4
510   m4/mbstate_t.m4
511   m4/memchr.m4
512   m4/memmem.m4
513   m4/mmap-anon.m4
514   m4/multiarch.m4
515   m4/nocrash.m4
516   m4/off_t.m4
517   m4/pathmax.m4
518   m4/readlink.m4
519   m4/ssize_t.m4
520   m4/stat.m4
521   m4/stdbool.m4
522   m4/stddef_h.m4
523   m4/stdint.m4
524   m4/stdlib_h.m4
525   m4/string_h.m4
526   m4/strstr.m4
527   m4/sys_stat_h.m4
528   m4/sys_types_h.m4
529   m4/time_h.m4
530   m4/unistd_h.m4
531   m4/warn-on-use.m4
532   m4/wchar_h.m4
533   m4/wchar_t.m4
534   m4/wctype_h.m4
535   m4/wint_t.m4
536 ])