Import the "dirfd" gnulib module.
[deliverable/binutils-gdb.git] / gdb / gnulib / import / m4 / gnulib-comp.m4
CommitLineData
f6ea5628 1# DO NOT EDIT! GENERATED AUTOMATICALLY!
770d76d7 2# Copyright (C) 2002-2012 Free Software Foundation, Inc.
f6ea5628 3#
770d76d7
PA
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
f6ea5628
DJ
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.
770d76d7
PA
27# In projects that use version control, this file can be treated like
28# other built files.
f6ea5628
DJ
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.
34AC_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
770d76d7 40 AC_REQUIRE([gl_PROG_AR_RANLIB])
8690e634
JK
41 # Code from module alloca:
42 # Code from module alloca-opt:
43 # Code from module configmake:
e26b6bb0 44 # Code from module dirent:
18848e28
GF
45 # Code from module dirfd:
46 # Code from module errno:
f434ba03 47 # Code from module extensions:
f6ea5628 48 AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
a512b375 49 # Code from module extern-inline:
88b48903 50 # Code from module float:
8690e634
JK
51 # Code from module fnmatch:
52 # Code from module fnmatch-gnu:
88b48903
WN
53 # Code from module fpieee:
54 AC_REQUIRE([gl_FP_IEEE])
55 # Code from module fpucw:
56 # Code from module frexp:
57 # Code from module frexpl:
f434ba03 58 # Code from module include_next:
55a8c076 59 # Code from module inttypes:
770d76d7 60 # Code from module inttypes-incomplete:
88b48903
WN
61 # Code from module isnand-nolibm:
62 # Code from module isnanl-nolibm:
8690e634 63 # Code from module localcharset:
88b48903 64 # Code from module math:
8690e634
JK
65 # Code from module mbrtowc:
66 # Code from module mbsinit:
67 # Code from module mbsrtowcs:
f434ba03
PA
68 # Code from module memchr:
69 # Code from module memmem:
70 # Code from module memmem-simple:
71 # Code from module multiarch:
38ec2207 72 # Code from module pathmax:
770d76d7
PA
73 # Code from module snippet/arg-nonnull:
74 # Code from module snippet/c++defs:
75 # Code from module snippet/warn-on-use:
8839a007 76 # Code from module ssize_t:
8690e634 77 # Code from module stdbool:
f434ba03
PA
78 # Code from module stddef:
79 # Code from module stdint:
8690e634 80 # Code from module streq:
f434ba03 81 # Code from module string:
8690e634 82 # Code from module strnlen1:
63ce7108
TT
83 # Code from module strstr:
84 # Code from module strstr-simple:
09607c9e 85 # Code from module sys_stat:
8839a007 86 # Code from module sys_types:
09607c9e 87 # Code from module time:
8839a007 88 # Code from module unistd:
174e088e 89 # Code from module update-copyright:
8690e634
JK
90 # Code from module verify:
91 # Code from module wchar:
92 # Code from module wctype-h:
f6ea5628
DJ
93])
94
95# This macro should be invoked from ./configure.ac, in the section
96# "Check for header files, types and library functions".
97AC_DEFUN([gl_INIT],
98[
99 AM_CONDITIONAL([GL_COND_LIBTOOL], [false])
100 gl_cond_libtool=false
101 gl_libdeps=
102 gl_ltlibdeps=
c971b7fa 103 gl_m4_base='import/m4'
f6ea5628
DJ
104 m4_pushdef([AC_LIBOBJ], m4_defn([gl_LIBOBJ]))
105 m4_pushdef([AC_REPLACE_FUNCS], m4_defn([gl_REPLACE_FUNCS]))
106 m4_pushdef([AC_LIBSOURCES], m4_defn([gl_LIBSOURCES]))
f434ba03
PA
107 m4_pushdef([gl_LIBSOURCES_LIST], [])
108 m4_pushdef([gl_LIBSOURCES_DIR], [])
109 gl_COMMON
c971b7fa 110 gl_source_base='import'
a512b375
JB
111 gl_FUNC_ALLOCA
112 gl_CONFIGMAKE_PREP
e26b6bb0 113 gl_DIRENT_H
18848e28
GF
114 gl_FUNC_DIRFD
115 if test $ac_cv_func_dirfd = no && test $gl_cv_func_dirfd_macro = no; then
116 AC_LIBOBJ([dirfd])
117 gl_PREREQ_DIRFD
118 fi
119 gl_DIRENT_MODULE_INDICATOR([dirfd])
120 gl_HEADER_ERRNO_H
a512b375 121 AC_REQUIRE([gl_EXTERN_INLINE])
88b48903
WN
122 gl_FLOAT_H
123 if test $REPLACE_FLOAT_LDBL = 1; then
124 AC_LIBOBJ([float])
125 fi
126 if test $REPLACE_ITOLD = 1; then
127 AC_LIBOBJ([itold])
128 fi
a512b375
JB
129 gl_FUNC_FNMATCH_POSIX
130 if test -n "$FNMATCH_H"; then
131 AC_LIBOBJ([fnmatch])
132 gl_PREREQ_FNMATCH
133 fi
134 gl_FUNC_FNMATCH_GNU
135 if test -n "$FNMATCH_H"; then
136 AC_LIBOBJ([fnmatch])
137 gl_PREREQ_FNMATCH
138 fi
88b48903
WN
139 gl_FUNC_FREXP
140 if test $gl_func_frexp != yes; then
141 AC_LIBOBJ([frexp])
142 fi
143 gl_MATH_MODULE_INDICATOR([frexp])
144 gl_FUNC_FREXPL
145 if test $HAVE_DECL_FREXPL = 0 || test $gl_func_frexpl = no; then
146 AC_LIBOBJ([frexpl])
147 fi
148 gl_MATH_MODULE_INDICATOR([frexpl])
a512b375
JB
149 gl_INTTYPES_H
150 gl_INTTYPES_INCOMPLETE
88b48903
WN
151 gl_FUNC_ISNAND_NO_LIBM
152 if test $gl_func_isnand_no_libm != yes; then
153 AC_LIBOBJ([isnand])
154 gl_PREREQ_ISNAND
155 fi
156 gl_FUNC_ISNANL_NO_LIBM
157 if test $gl_func_isnanl_no_libm != yes; then
158 AC_LIBOBJ([isnanl])
159 gl_PREREQ_ISNANL
160 fi
a512b375
JB
161 gl_LOCALCHARSET
162 LOCALCHARSET_TESTS_ENVIRONMENT="CHARSETALIASDIR=\"\$(abs_top_builddir)/$gl_source_base\""
163 AC_SUBST([LOCALCHARSET_TESTS_ENVIRONMENT])
88b48903 164 gl_MATH_H
a512b375
JB
165 gl_FUNC_MBRTOWC
166 if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then
167 AC_LIBOBJ([mbrtowc])
168 gl_PREREQ_MBRTOWC
169 fi
170 gl_WCHAR_MODULE_INDICATOR([mbrtowc])
171 gl_FUNC_MBSINIT
172 if test $HAVE_MBSINIT = 0 || test $REPLACE_MBSINIT = 1; then
173 AC_LIBOBJ([mbsinit])
174 gl_PREREQ_MBSINIT
175 fi
176 gl_WCHAR_MODULE_INDICATOR([mbsinit])
177 gl_FUNC_MBSRTOWCS
178 if test $HAVE_MBSRTOWCS = 0 || test $REPLACE_MBSRTOWCS = 1; then
179 AC_LIBOBJ([mbsrtowcs])
180 AC_LIBOBJ([mbsrtowcs-state])
181 gl_PREREQ_MBSRTOWCS
182 fi
183 gl_WCHAR_MODULE_INDICATOR([mbsrtowcs])
184 gl_FUNC_MEMCHR
185 if test $HAVE_MEMCHR = 0 || test $REPLACE_MEMCHR = 1; then
186 AC_LIBOBJ([memchr])
187 gl_PREREQ_MEMCHR
188 fi
189 gl_STRING_MODULE_INDICATOR([memchr])
190 gl_FUNC_MEMMEM
191 if test $HAVE_MEMMEM = 0 || test $REPLACE_MEMMEM = 1; then
192 AC_LIBOBJ([memmem])
193 fi
194 gl_FUNC_MEMMEM_SIMPLE
195 if test $HAVE_MEMMEM = 0 || test $REPLACE_MEMMEM = 1; then
196 AC_LIBOBJ([memmem])
197 fi
198 gl_STRING_MODULE_INDICATOR([memmem])
199 gl_MULTIARCH
38ec2207 200 gl_PATHMAX
8839a007 201 gt_TYPE_SSIZE_T
a512b375
JB
202 AM_STDBOOL_H
203 gl_STDDEF_H
204 gl_STDINT_H
205 gl_HEADER_STRING_H
63ce7108
TT
206 gl_FUNC_STRSTR
207 if test $REPLACE_STRSTR = 1; then
208 AC_LIBOBJ([strstr])
209 fi
210 gl_FUNC_STRSTR_SIMPLE
211 if test $REPLACE_STRSTR = 1; then
212 AC_LIBOBJ([strstr])
213 fi
214 gl_STRING_MODULE_INDICATOR([strstr])
09607c9e
TT
215 gl_HEADER_SYS_STAT_H
216 AC_PROG_MKDIR_P
8839a007
PA
217 gl_SYS_TYPES_H
218 AC_PROG_MKDIR_P
09607c9e 219 gl_HEADER_TIME_H
8839a007 220 gl_UNISTD_H
a512b375
JB
221 gl_WCHAR_H
222 gl_WCTYPE_H
f434ba03
PA
223 # End of code from modules
224 m4_ifval(gl_LIBSOURCES_LIST, [
225 m4_syscmd([test ! -d ]m4_defn([gl_LIBSOURCES_DIR])[ ||
226 for gl_file in ]gl_LIBSOURCES_LIST[ ; do
227 if test ! -r ]m4_defn([gl_LIBSOURCES_DIR])[/$gl_file ; then
228 echo "missing file ]m4_defn([gl_LIBSOURCES_DIR])[/$gl_file" >&2
229 exit 1
230 fi
231 done])dnl
232 m4_if(m4_sysval, [0], [],
233 [AC_FATAL([expected source file, required through AC_LIBSOURCES, not found])])
234 ])
235 m4_popdef([gl_LIBSOURCES_DIR])
236 m4_popdef([gl_LIBSOURCES_LIST])
f6ea5628
DJ
237 m4_popdef([AC_LIBSOURCES])
238 m4_popdef([AC_REPLACE_FUNCS])
239 m4_popdef([AC_LIBOBJ])
240 AC_CONFIG_COMMANDS_PRE([
241 gl_libobjs=
242 gl_ltlibobjs=
243 if test -n "$gl_LIBOBJS"; then
244 # Remove the extension.
245 sed_drop_objext='s/\.o$//;s/\.obj$//'
f434ba03 246 for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
f6ea5628
DJ
247 gl_libobjs="$gl_libobjs $i.$ac_objext"
248 gl_ltlibobjs="$gl_ltlibobjs $i.lo"
249 done
250 fi
251 AC_SUBST([gl_LIBOBJS], [$gl_libobjs])
252 AC_SUBST([gl_LTLIBOBJS], [$gl_ltlibobjs])
253 ])
254 gltests_libdeps=
255 gltests_ltlibdeps=
256 m4_pushdef([AC_LIBOBJ], m4_defn([gltests_LIBOBJ]))
257 m4_pushdef([AC_REPLACE_FUNCS], m4_defn([gltests_REPLACE_FUNCS]))
258 m4_pushdef([AC_LIBSOURCES], m4_defn([gltests_LIBSOURCES]))
f434ba03
PA
259 m4_pushdef([gltests_LIBSOURCES_LIST], [])
260 m4_pushdef([gltests_LIBSOURCES_DIR], [])
261 gl_COMMON
f6ea5628 262 gl_source_base='tests'
f434ba03
PA
263changequote(,)dnl
264 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
265changequote([, ])dnl
266 AC_SUBST([gltests_WITNESS])
267 gl_module_indicator_condition=$gltests_WITNESS
268 m4_pushdef([gl_MODULE_INDICATOR_CONDITION], [$gl_module_indicator_condition])
269 m4_popdef([gl_MODULE_INDICATOR_CONDITION])
270 m4_ifval(gltests_LIBSOURCES_LIST, [
271 m4_syscmd([test ! -d ]m4_defn([gltests_LIBSOURCES_DIR])[ ||
272 for gl_file in ]gltests_LIBSOURCES_LIST[ ; do
273 if test ! -r ]m4_defn([gltests_LIBSOURCES_DIR])[/$gl_file ; then
274 echo "missing file ]m4_defn([gltests_LIBSOURCES_DIR])[/$gl_file" >&2
275 exit 1
276 fi
277 done])dnl
278 m4_if(m4_sysval, [0], [],
279 [AC_FATAL([expected source file, required through AC_LIBSOURCES, not found])])
280 ])
281 m4_popdef([gltests_LIBSOURCES_DIR])
282 m4_popdef([gltests_LIBSOURCES_LIST])
f6ea5628
DJ
283 m4_popdef([AC_LIBSOURCES])
284 m4_popdef([AC_REPLACE_FUNCS])
285 m4_popdef([AC_LIBOBJ])
286 AC_CONFIG_COMMANDS_PRE([
287 gltests_libobjs=
288 gltests_ltlibobjs=
289 if test -n "$gltests_LIBOBJS"; then
290 # Remove the extension.
291 sed_drop_objext='s/\.o$//;s/\.obj$//'
f434ba03 292 for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
f6ea5628
DJ
293 gltests_libobjs="$gltests_libobjs $i.$ac_objext"
294 gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
295 done
296 fi
297 AC_SUBST([gltests_LIBOBJS], [$gltests_libobjs])
298 AC_SUBST([gltests_LTLIBOBJS], [$gltests_ltlibobjs])
299 ])
300 LIBGNU_LIBDEPS="$gl_libdeps"
301 AC_SUBST([LIBGNU_LIBDEPS])
302 LIBGNU_LTLIBDEPS="$gl_ltlibdeps"
303 AC_SUBST([LIBGNU_LTLIBDEPS])
304])
305
306# Like AC_LIBOBJ, except that the module name goes
307# into gl_LIBOBJS instead of into LIBOBJS.
308AC_DEFUN([gl_LIBOBJ], [
309 AS_LITERAL_IF([$1], [gl_LIBSOURCES([$1.c])])dnl
310 gl_LIBOBJS="$gl_LIBOBJS $1.$ac_objext"
311])
312
f6ea5628
DJ
313# Like AC_REPLACE_FUNCS, except that the module name goes
314# into gl_LIBOBJS instead of into LIBOBJS.
315AC_DEFUN([gl_REPLACE_FUNCS], [
316 m4_foreach_w([gl_NAME], [$1], [AC_LIBSOURCES(gl_NAME[.c])])dnl
317 AC_CHECK_FUNCS([$1], , [gl_LIBOBJ($ac_func)])
318])
319
320# Like AC_LIBSOURCES, except the directory where the source file is
f434ba03 321# expected is derived from the gnulib-tool parameterization,
f6ea5628
DJ
322# and alloca is special cased (for the alloca-opt module).
323# We could also entirely rely on EXTRA_lib..._SOURCES.
324AC_DEFUN([gl_LIBSOURCES], [
325 m4_foreach([_gl_NAME], [$1], [
326 m4_if(_gl_NAME, [alloca.c], [], [
c971b7fa 327 m4_define([gl_LIBSOURCES_DIR], [import])
f434ba03 328 m4_append([gl_LIBSOURCES_LIST], _gl_NAME, [ ])
f6ea5628
DJ
329 ])
330 ])
331])
332
333# Like AC_LIBOBJ, except that the module name goes
334# into gltests_LIBOBJS instead of into LIBOBJS.
335AC_DEFUN([gltests_LIBOBJ], [
336 AS_LITERAL_IF([$1], [gltests_LIBSOURCES([$1.c])])dnl
337 gltests_LIBOBJS="$gltests_LIBOBJS $1.$ac_objext"
338])
339
f6ea5628
DJ
340# Like AC_REPLACE_FUNCS, except that the module name goes
341# into gltests_LIBOBJS instead of into LIBOBJS.
342AC_DEFUN([gltests_REPLACE_FUNCS], [
343 m4_foreach_w([gl_NAME], [$1], [AC_LIBSOURCES(gl_NAME[.c])])dnl
344 AC_CHECK_FUNCS([$1], , [gltests_LIBOBJ($ac_func)])
345])
346
347# Like AC_LIBSOURCES, except the directory where the source file is
f434ba03 348# expected is derived from the gnulib-tool parameterization,
f6ea5628
DJ
349# and alloca is special cased (for the alloca-opt module).
350# We could also entirely rely on EXTRA_lib..._SOURCES.
351AC_DEFUN([gltests_LIBSOURCES], [
352 m4_foreach([_gl_NAME], [$1], [
353 m4_if(_gl_NAME, [alloca.c], [], [
f434ba03
PA
354 m4_define([gltests_LIBSOURCES_DIR], [tests])
355 m4_append([gltests_LIBSOURCES_LIST], _gl_NAME, [ ])
f6ea5628
DJ
356 ])
357 ])
358])
359
360# This macro records the list of files which have been installed by
361# gnulib-tool and may be removed by future gnulib-tool invocations.
362AC_DEFUN([gl_FILE_LIST], [
770d76d7
PA
363 build-aux/snippet/arg-nonnull.h
364 build-aux/snippet/c++defs.h
365 build-aux/snippet/warn-on-use.h
174e088e 366 build-aux/update-copyright
8690e634
JK
367 lib/alloca.c
368 lib/alloca.in.h
369 lib/config.charset
e26b6bb0 370 lib/dirent.in.h
18848e28
GF
371 lib/dirfd.c
372 lib/errno.in.h
88b48903
WN
373 lib/float+.h
374 lib/float.c
375 lib/float.in.h
8690e634
JK
376 lib/fnmatch.c
377 lib/fnmatch.in.h
378 lib/fnmatch_loop.c
88b48903
WN
379 lib/fpucw.h
380 lib/frexp.c
381 lib/frexpl.c
55a8c076 382 lib/inttypes.in.h
88b48903
WN
383 lib/isnan.c
384 lib/isnand-nolibm.h
385 lib/isnand.c
386 lib/isnanl-nolibm.h
387 lib/isnanl.c
388 lib/itold.c
8690e634
JK
389 lib/localcharset.c
390 lib/localcharset.h
88b48903
WN
391 lib/math.c
392 lib/math.in.h
8690e634
JK
393 lib/mbrtowc.c
394 lib/mbsinit.c
395 lib/mbsrtowcs-impl.h
396 lib/mbsrtowcs-state.c
397 lib/mbsrtowcs.c
f6ea5628 398 lib/memchr.c
f434ba03 399 lib/memchr.valgrind
f6ea5628 400 lib/memmem.c
38ec2207 401 lib/pathmax.h
8690e634
JK
402 lib/ref-add.sin
403 lib/ref-del.sin
404 lib/stdbool.in.h
f434ba03 405 lib/stddef.in.h
f6ea5628
DJ
406 lib/stdint.in.h
407 lib/str-two-way.h
8690e634 408 lib/streq.h
f6ea5628 409 lib/string.in.h
8690e634
JK
410 lib/strnlen1.c
411 lib/strnlen1.h
63ce7108 412 lib/strstr.c
09607c9e 413 lib/sys_stat.in.h
8839a007 414 lib/sys_types.in.h
09607c9e 415 lib/time.in.h
8839a007
PA
416 lib/unistd.c
417 lib/unistd.in.h
8690e634
JK
418 lib/verify.h
419 lib/wchar.in.h
a512b375 420 lib/wctype-h.c
8690e634 421 lib/wctype.in.h
f434ba03 422 m4/00gnulib.m4
8690e634
JK
423 m4/alloca.m4
424 m4/codeset.m4
425 m4/configmake.m4
e26b6bb0 426 m4/dirent_h.m4
18848e28
GF
427 m4/dirfd.m4
428 m4/errno_h.m4
88b48903
WN
429 m4/exponentd.m4
430 m4/exponentl.m4
f6ea5628 431 m4/extensions.m4
a512b375 432 m4/extern-inline.m4
8690e634 433 m4/fcntl-o.m4
88b48903 434 m4/float_h.m4
8690e634 435 m4/fnmatch.m4
88b48903
WN
436 m4/fpieee.m4
437 m4/frexp.m4
438 m4/frexpl.m4
8690e634 439 m4/glibc21.m4
f6ea5628
DJ
440 m4/gnulib-common.m4
441 m4/include_next.m4
55a8c076
YQ
442 m4/inttypes-pri.m4
443 m4/inttypes.m4
88b48903
WN
444 m4/isnand.m4
445 m4/isnanl.m4
8690e634
JK
446 m4/localcharset.m4
447 m4/locale-fr.m4
448 m4/locale-ja.m4
449 m4/locale-zh.m4
f6ea5628 450 m4/longlong.m4
88b48903 451 m4/math_h.m4
8690e634
JK
452 m4/mbrtowc.m4
453 m4/mbsinit.m4
454 m4/mbsrtowcs.m4
455 m4/mbstate_t.m4
f6ea5628 456 m4/memchr.m4
f6ea5628 457 m4/memmem.m4
f434ba03
PA
458 m4/mmap-anon.m4
459 m4/multiarch.m4
8839a007 460 m4/off_t.m4
38ec2207 461 m4/pathmax.m4
8839a007 462 m4/ssize_t.m4
8690e634 463 m4/stdbool.m4
f434ba03 464 m4/stddef_h.m4
f6ea5628
DJ
465 m4/stdint.m4
466 m4/string_h.m4
63ce7108 467 m4/strstr.m4
09607c9e 468 m4/sys_stat_h.m4
8839a007 469 m4/sys_types_h.m4
09607c9e 470 m4/time_h.m4
8839a007 471 m4/unistd_h.m4
f434ba03 472 m4/warn-on-use.m4
8690e634 473 m4/wchar_h.m4
f434ba03 474 m4/wchar_t.m4
8690e634
JK
475 m4/wctype_h.m4
476 m4/wint_t.m4
f6ea5628 477])
This page took 0.59928 seconds and 4 git commands to generate.