Add cyclomatic code complexity charts.
[gnutls:gnutls.git] / gl / 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([AC_GNU_SOURCE])
29   AB_INIT
30   AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
31   AC_REQUIRE([AC_FUNC_FSEEKO])
32   dnl Some compilers (e.g., AIX 5.3 cc) need to be in c99 mode
33   dnl for the builtin va_copy to work.  With Autoconf 2.60 or later,
34   dnl AC_PROG_CC_STDC arranges for this.  With older Autoconf AC_PROG_CC_STDC
35   dnl shouldn't hurt, though installers are on their own to set c99 mode.
36   AC_REQUIRE([AC_PROG_CC_STDC])
37 ])
38
39 # This macro should be invoked from ./configure.ac, in the section
40 # "Check for header files, types and library functions".
41 AC_DEFUN([gl_INIT],
42 [
43   AM_CONDITIONAL([GL_COND_LIBTOOL], [true])
44   gl_cond_libtool=true
45   m4_pushdef([AC_LIBOBJ], m4_defn([gl_LIBOBJ]))
46   m4_pushdef([AC_REPLACE_FUNCS], m4_defn([gl_REPLACE_FUNCS]))
47   m4_pushdef([AC_LIBSOURCES], m4_defn([gl_LIBSOURCES]))
48   m4_pushdef([gl_LIBSOURCES_LIST], [])
49   m4_pushdef([gl_LIBSOURCES_DIR], [])
50   gl_COMMON
51   gl_source_base='gl'
52   AC_REQUIRE([gl_HEADER_SYS_SOCKET])
53   if test "$ac_cv_header_winsock2_h" = yes; then
54     AC_LIBOBJ([accept])
55   fi
56   gl_SYS_SOCKET_MODULE_INDICATOR([accept])
57 changequote(,)dnl
58 LTALLOCA=`echo "$ALLOCA" | sed 's/\.[^.]* /.lo /g;s/\.[^.]*$/.lo/'`
59 changequote([, ])dnl
60 AC_SUBST([LTALLOCA])
61   gl_FUNC_ALLOCA
62   gl_HEADER_ARPA_INET
63   AC_PROG_MKDIR_P
64   AC_REQUIRE([gl_HEADER_SYS_SOCKET])
65   if test "$ac_cv_header_winsock2_h" = yes; then
66     AC_LIBOBJ([bind])
67   fi
68   gl_SYS_SOCKET_MODULE_INDICATOR([bind])
69   gl_FUNC_CLOSE
70   gl_UNISTD_MODULE_INDICATOR([close])
71   AC_REQUIRE([gl_HEADER_SYS_SOCKET])
72   if test "$ac_cv_header_winsock2_h" = yes; then
73     AC_LIBOBJ([connect])
74   fi
75   gl_SYS_SOCKET_MODULE_INDICATOR([connect])
76   gl_HEADER_ERRNO_H
77   gl_ERROR
78   m4_ifdef([AM_XGETTEXT_OPTION],
79     [AM_XGETTEXT_OPTION([--flag=error:3:c-format])
80      AM_XGETTEXT_OPTION([--flag=error_at_line:5:c-format])])
81   gl_FUNC_FCLOSE
82   gl_STDIO_MODULE_INDICATOR([fclose])
83   gl_FLOAT_H
84   gl_FUNC_FSEEKO
85   gl_STDIO_MODULE_INDICATOR([fseeko])
86   gl_GETADDRINFO
87   gl_NETDB_MODULE_INDICATOR([getaddrinfo])
88   gl_FUNC_GETDELIM
89   gl_STDIO_MODULE_INDICATOR([getdelim])
90   gl_FUNC_GETLINE
91   gl_STDIO_MODULE_INDICATOR([getline])
92   gl_FUNC_GETPASS_GNU
93   AC_SUBST([LIBINTL])
94   AC_SUBST([LTLIBINTL])
95   # Autoconf 2.61a.99 and earlier don't support linking a file only
96   # in VPATH builds.  But since GNUmakefile is for maintainer use
97   # only, it does not matter if we skip the link with older autoconf.
98   # Automake 1.10.1 and earlier try to remove GNUmakefile in non-VPATH
99   # builds, so use a shell variable to bypass this.
100   GNUmakefile=GNUmakefile
101   m4_if(m4_version_compare([2.61a.100],
102         m4_defn([m4_PACKAGE_VERSION])), [1], [],
103         [AC_CONFIG_LINKS([$GNUmakefile:$GNUmakefile], [],
104         [GNUmakefile=$GNUmakefile])])
105   gl_INET_NTOP
106   gl_ARPA_INET_MODULE_INDICATOR([inet_ntop])
107   gl_INET_PTON
108   gl_ARPA_INET_MODULE_INDICATOR([inet_pton])
109   AC_REQUIRE([gl_HEADER_SYS_SOCKET])
110   if test "$ac_cv_header_winsock2_h" = yes; then
111     AC_LIBOBJ([listen])
112   fi
113   gl_SYS_SOCKET_MODULE_INDICATOR([listen])
114   gl_FUNC_LSEEK
115   gl_UNISTD_MODULE_INDICATOR([lseek])
116   gl_MINMAX
117   gl_HEADER_NETDB
118   gl_HEADER_NETINET_IN
119   AC_PROG_MKDIR_P
120   gl_FUNC_PERROR
121   gl_STRING_MODULE_INDICATOR([perror])
122   gl_PMCCABE2HTML
123   gl_FUNC_READ_FILE
124   gl_FUNC_READLINE
125   gl_FUNC_REALLOC_POSIX
126   gl_STDLIB_MODULE_INDICATOR([realloc-posix])
127   AC_REQUIRE([gl_HEADER_SYS_SOCKET])
128   if test "$ac_cv_header_winsock2_h" = yes; then
129     AC_LIBOBJ([recv])
130   fi
131   gl_SYS_SOCKET_MODULE_INDICATOR([recv])
132   AC_REQUIRE([gl_HEADER_SYS_SELECT])
133   if test "$ac_cv_header_winsock2_h" = yes; then
134     AC_LIBOBJ([winsock-select])
135   fi
136   gl_SYS_SELECT_MODULE_INDICATOR([select])
137   AC_REQUIRE([gl_HEADER_SYS_SOCKET])
138   if test "$ac_cv_header_winsock2_h" = yes; then
139     AC_LIBOBJ([send])
140   fi
141   gl_SYS_SOCKET_MODULE_INDICATOR([send])
142   AC_REQUIRE([gl_HEADER_SYS_SOCKET])
143   if test "$ac_cv_header_winsock2_h" = yes; then
144     AC_LIBOBJ([setsockopt])
145   fi
146   gl_SYS_SOCKET_MODULE_INDICATOR([setsockopt])
147   AC_REQUIRE([gl_HEADER_SYS_SOCKET])
148   if test "$ac_cv_header_winsock2_h" = yes; then
149     AC_LIBOBJ([shutdown])
150   fi
151   gl_SYS_SOCKET_MODULE_INDICATOR([shutdown])
152   gl_SIZE_MAX
153   gl_FUNC_SNPRINTF
154   gl_STDIO_MODULE_INDICATOR([snprintf])
155   AC_REQUIRE([gl_HEADER_SYS_SOCKET])
156   if test "$ac_cv_header_winsock2_h" = yes; then
157     AC_LIBOBJ([socket])
158   fi
159   gl_SYS_SOCKET_MODULE_INDICATOR([socket])
160   gl_TYPE_SOCKLEN_T
161   gl_STDARG_H
162   AM_STDBOOL_H
163   gl_STDINT_H
164   gl_STDIO_H
165   gl_STDLIB_H
166   gl_FUNC_STRERROR
167   gl_STRING_MODULE_INDICATOR([strerror])
168   gl_HEADER_STRING_H
169   gl_HEADER_SYS_SELECT
170   AC_PROG_MKDIR_P
171   gl_HEADER_SYS_SOCKET
172   gl_MODULE_INDICATOR([sys_socket])
173   AC_PROG_MKDIR_P
174   gl_HEADER_SYS_STAT_H
175   AC_PROG_MKDIR_P
176   gl_HEADER_SYS_TIME_H
177   AC_PROG_MKDIR_P
178   gl_UNISTD_H
179   gl_FUNC_VASNPRINTF
180   gl_WCHAR_H
181   gl_XSIZE
182   m4_ifval(gl_LIBSOURCES_LIST, [
183     m4_syscmd([test ! -d ]m4_defn([gl_LIBSOURCES_DIR])[ ||
184       for gl_file in ]gl_LIBSOURCES_LIST[ ; do
185         if test ! -r ]m4_defn([gl_LIBSOURCES_DIR])[/$gl_file ; then
186           echo "missing file ]m4_defn([gl_LIBSOURCES_DIR])[/$gl_file" >&2
187           exit 1
188         fi
189       done])dnl
190       m4_if(m4_sysval, [0], [],
191         [AC_FATAL([expected source file, required through AC_LIBSOURCES, not found])])
192   ])
193   m4_popdef([gl_LIBSOURCES_DIR])
194   m4_popdef([gl_LIBSOURCES_LIST])
195   m4_popdef([AC_LIBSOURCES])
196   m4_popdef([AC_REPLACE_FUNCS])
197   m4_popdef([AC_LIBOBJ])
198   AC_CONFIG_COMMANDS_PRE([
199     gl_libobjs=
200     gl_ltlibobjs=
201     if test -n "$gl_LIBOBJS"; then
202       # Remove the extension.
203       sed_drop_objext='s/\.o$//;s/\.obj$//'
204       for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed "$sed_drop_objext" | sort | uniq`; do
205         gl_libobjs="$gl_libobjs $i.$ac_objext"
206         gl_ltlibobjs="$gl_ltlibobjs $i.lo"
207       done
208     fi
209     AC_SUBST([gl_LIBOBJS], [$gl_libobjs])
210     AC_SUBST([gl_LTLIBOBJS], [$gl_ltlibobjs])
211   ])
212   gltests_libdeps=
213   gltests_ltlibdeps=
214   m4_pushdef([AC_LIBOBJ], m4_defn([gltests_LIBOBJ]))
215   m4_pushdef([AC_REPLACE_FUNCS], m4_defn([gltests_REPLACE_FUNCS]))
216   m4_pushdef([AC_LIBSOURCES], m4_defn([gltests_LIBSOURCES]))
217   m4_pushdef([gltests_LIBSOURCES_LIST], [])
218   m4_pushdef([gltests_LIBSOURCES_DIR], [])
219   gl_COMMON
220   gl_source_base='gl/tests'
221   AC_REQUIRE([gl_HEADER_SYS_SOCKET])
222   if test "$ac_cv_header_winsock2_h" = yes; then
223     AC_LIBOBJ([ioctl])
224     gl_REPLACE_SYS_IOCTL_H
225   fi
226   gl_SYS_IOCTL_MODULE_INDICATOR([ioctl])
227   gl_MODULE_INDICATOR([ioctl])
228   gl_SOCKETS
229   gt_TYPE_WCHAR_T
230   gt_TYPE_WINT_T
231   gl_SYS_IOCTL_H
232   AC_PROG_MKDIR_P
233   AC_CHECK_FUNCS([shutdown])
234   m4_ifval(gltests_LIBSOURCES_LIST, [
235     m4_syscmd([test ! -d ]m4_defn([gltests_LIBSOURCES_DIR])[ ||
236       for gl_file in ]gltests_LIBSOURCES_LIST[ ; do
237         if test ! -r ]m4_defn([gltests_LIBSOURCES_DIR])[/$gl_file ; then
238           echo "missing file ]m4_defn([gltests_LIBSOURCES_DIR])[/$gl_file" >&2
239           exit 1
240         fi
241       done])dnl
242       m4_if(m4_sysval, [0], [],
243         [AC_FATAL([expected source file, required through AC_LIBSOURCES, not found])])
244   ])
245   m4_popdef([gltests_LIBSOURCES_DIR])
246   m4_popdef([gltests_LIBSOURCES_LIST])
247   m4_popdef([AC_LIBSOURCES])
248   m4_popdef([AC_REPLACE_FUNCS])
249   m4_popdef([AC_LIBOBJ])
250   AC_CONFIG_COMMANDS_PRE([
251     gltests_libobjs=
252     gltests_ltlibobjs=
253     if test -n "$gltests_LIBOBJS"; then
254       # Remove the extension.
255       sed_drop_objext='s/\.o$//;s/\.obj$//'
256       for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed "$sed_drop_objext" | sort | uniq`; do
257         gltests_libobjs="$gltests_libobjs $i.$ac_objext"
258         gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
259       done
260     fi
261     AC_SUBST([gltests_LIBOBJS], [$gltests_libobjs])
262     AC_SUBST([gltests_LTLIBOBJS], [$gltests_ltlibobjs])
263   ])
264   LIBTESTS_LIBDEPS="$gltests_libdeps"
265   AC_SUBST([LIBTESTS_LIBDEPS])
266 ])
267
268 # Like AC_LIBOBJ, except that the module name goes
269 # into gl_LIBOBJS instead of into LIBOBJS.
270 AC_DEFUN([gl_LIBOBJ], [
271   AS_LITERAL_IF([$1], [gl_LIBSOURCES([$1.c])])dnl
272   gl_LIBOBJS="$gl_LIBOBJS $1.$ac_objext"
273 ])
274
275 # Like AC_REPLACE_FUNCS, except that the module name goes
276 # into gl_LIBOBJS instead of into LIBOBJS.
277 AC_DEFUN([gl_REPLACE_FUNCS], [
278   m4_foreach_w([gl_NAME], [$1], [AC_LIBSOURCES(gl_NAME[.c])])dnl
279   AC_CHECK_FUNCS([$1], , [gl_LIBOBJ($ac_func)])
280 ])
281
282 # Like AC_LIBSOURCES, except the directory where the source file is
283 # expected is derived from the gnulib-tool parameterization,
284 # and alloca is special cased (for the alloca-opt module).
285 # We could also entirely rely on EXTRA_lib..._SOURCES.
286 AC_DEFUN([gl_LIBSOURCES], [
287   m4_foreach([_gl_NAME], [$1], [
288     m4_if(_gl_NAME, [alloca.c], [], [
289       m4_define([gl_LIBSOURCES_DIR], [gl])
290       m4_append([gl_LIBSOURCES_LIST], _gl_NAME, [ ])
291     ])
292   ])
293 ])
294
295 # Like AC_LIBOBJ, except that the module name goes
296 # into gltests_LIBOBJS instead of into LIBOBJS.
297 AC_DEFUN([gltests_LIBOBJ], [
298   AS_LITERAL_IF([$1], [gltests_LIBSOURCES([$1.c])])dnl
299   gltests_LIBOBJS="$gltests_LIBOBJS $1.$ac_objext"
300 ])
301
302 # Like AC_REPLACE_FUNCS, except that the module name goes
303 # into gltests_LIBOBJS instead of into LIBOBJS.
304 AC_DEFUN([gltests_REPLACE_FUNCS], [
305   m4_foreach_w([gl_NAME], [$1], [AC_LIBSOURCES(gl_NAME[.c])])dnl
306   AC_CHECK_FUNCS([$1], , [gltests_LIBOBJ($ac_func)])
307 ])
308
309 # Like AC_LIBSOURCES, except the directory where the source file is
310 # expected is derived from the gnulib-tool parameterization,
311 # and alloca is special cased (for the alloca-opt module).
312 # We could also entirely rely on EXTRA_lib..._SOURCES.
313 AC_DEFUN([gltests_LIBSOURCES], [
314   m4_foreach([_gl_NAME], [$1], [
315     m4_if(_gl_NAME, [alloca.c], [], [
316       m4_define([gltests_LIBSOURCES_DIR], [gl/tests])
317       m4_append([gltests_LIBSOURCES_LIST], _gl_NAME, [ ])
318     ])
319   ])
320 ])
321
322 # This macro records the list of files which have been installed by
323 # gnulib-tool and may be removed by future gnulib-tool invocations.
324 AC_DEFUN([gl_FILE_LIST], [
325   build-aux/config.rpath
326   build-aux/gendocs.sh
327   build-aux/gnupload
328   build-aux/link-warning.h
329   build-aux/pmccabe.css
330   build-aux/pmccabe2html
331   doc/fdl-1.3.texi
332   doc/gendocs_template
333   doc/gpl-3.0.texi
334   doc/lgpl-2.1.texi
335   lib/accept.c
336   lib/alloca.c
337   lib/alloca.in.h
338   lib/arpa_inet.in.h
339   lib/asnprintf.c
340   lib/bind.c
341   lib/c-ctype.c
342   lib/c-ctype.h
343   lib/close.c
344   lib/connect.c
345   lib/errno.in.h
346   lib/error.c
347   lib/error.h
348   lib/fclose.c
349   lib/float+.h
350   lib/float.in.h
351   lib/fseeko.c
352   lib/gai_strerror.c
353   lib/getaddrinfo.c
354   lib/getdelim.c
355   lib/getline.c
356   lib/getpass.c
357   lib/getpass.h
358   lib/gettext.h
359   lib/inet_ntop.c
360   lib/inet_pton.c
361   lib/intprops.h
362   lib/listen.c
363   lib/lseek.c
364   lib/minmax.h
365   lib/netdb.in.h
366   lib/netinet_in.in.h
367   lib/perror.c
368   lib/printf-args.c
369   lib/printf-args.h
370   lib/printf-parse.c
371   lib/printf-parse.h
372   lib/progname.c
373   lib/progname.h
374   lib/read-file.c
375   lib/read-file.h
376   lib/readline.c
377   lib/readline.h
378   lib/realloc.c
379   lib/recv.c
380   lib/send.c
381   lib/setsockopt.c
382   lib/shutdown.c
383   lib/size_max.h
384   lib/snprintf.c
385   lib/socket.c
386   lib/stdarg.in.h
387   lib/stdbool.in.h
388   lib/stdint.in.h
389   lib/stdio-impl.h
390   lib/stdio-write.c
391   lib/stdio.in.h
392   lib/stdlib.in.h
393   lib/strerror.c
394   lib/string.in.h
395   lib/sys_select.in.h
396   lib/sys_socket.in.h
397   lib/sys_stat.in.h
398   lib/sys_time.in.h
399   lib/unistd.in.h
400   lib/vasnprintf.c
401   lib/vasnprintf.h
402   lib/version-etc-fsf.c
403   lib/version-etc.c
404   lib/version-etc.h
405   lib/w32sock.h
406   lib/wchar.in.h
407   lib/winsock-select.c
408   lib/xsize.h
409   m4/alloca.m4
410   m4/arpa_inet_h.m4
411   m4/autobuild.m4
412   m4/close.m4
413   m4/errno_h.m4
414   m4/error.m4
415   m4/extensions.m4
416   m4/fclose.m4
417   m4/float_h.m4
418   m4/fseeko.m4
419   m4/getaddrinfo.m4
420   m4/getdelim.m4
421   m4/getline.m4
422   m4/getpass.m4
423   m4/gnulib-common.m4
424   m4/include_next.m4
425   m4/inet_ntop.m4
426   m4/inet_pton.m4
427   m4/intmax_t.m4
428   m4/inttypes_h.m4
429   m4/lib-ld.m4
430   m4/lib-link.m4
431   m4/lib-prefix.m4
432   m4/longlong.m4
433   m4/lseek.m4
434   m4/malloc.m4
435   m4/minmax.m4
436   m4/netdb_h.m4
437   m4/netinet_in_h.m4
438   m4/perror.m4
439   m4/pmccabe2html.m4
440   m4/printf.m4
441   m4/read-file.m4
442   m4/readline.m4
443   m4/realloc.m4
444   m4/size_max.m4
445   m4/snprintf.m4
446   m4/sockets.m4
447   m4/socklen.m4
448   m4/sockpfaf.m4
449   m4/stdarg.m4
450   m4/stdbool.m4
451   m4/stdint.m4
452   m4/stdint_h.m4
453   m4/stdio_h.m4
454   m4/stdlib_h.m4
455   m4/strerror.m4
456   m4/string_h.m4
457   m4/sys_ioctl_h.m4
458   m4/sys_select_h.m4
459   m4/sys_socket_h.m4
460   m4/sys_stat_h.m4
461   m4/sys_time_h.m4
462   m4/unistd_h.m4
463   m4/vasnprintf.m4
464   m4/wchar.m4
465   m4/wchar_t.m4
466   m4/wint_t.m4
467   m4/xsize.m4
468   tests/test-alloca-opt.c
469   tests/test-arpa_inet.c
470   tests/test-c-ctype.c
471   tests/test-errno.c
472   tests/test-fseeko.c
473   tests/test-fseeko.sh
474   tests/test-getaddrinfo.c
475   tests/test-getdelim.c
476   tests/test-getline.c
477   tests/test-lseek.c
478   tests/test-lseek.sh
479   tests/test-netdb.c
480   tests/test-netinet_in.c
481   tests/test-perror.c
482   tests/test-perror.sh
483   tests/test-read-file.c
484   tests/test-select.c
485   tests/test-snprintf.c
486   tests/test-sockets.c
487   tests/test-stdbool.c
488   tests/test-stdint.c
489   tests/test-stdio.c
490   tests/test-stdlib.c
491   tests/test-strerror.c
492   tests/test-string.c
493   tests/test-sys_select.c
494   tests/test-sys_socket.c
495   tests/test-sys_stat.c
496   tests/test-sys_time.c
497   tests/test-unistd.c
498   tests/test-vasnprintf.c
499   tests/test-wchar.c
500   tests=lib/ioctl.c
501   tests=lib/sockets.c
502   tests=lib/sockets.h
503   tests=lib/sys_ioctl.in.h
504   tests=lib/verify.h
505   tests=lib/w32sock.h
506   top/GNUmakefile
507   top/maint.mk
508 ])