# "Check for header files, types and library functions".
AC_DEFUN([gl_INIT],
[
+ AM_CONDITIONAL([GL_COND_LIBTOOL], [true])
+ gl_cond_libtool=true
m4_pushdef([AC_LIBOBJ], m4_defn([gl_LIBOBJ]))
m4_pushdef([AC_REPLACE_FUNCS], m4_defn([gl_REPLACE_FUNCS]))
m4_pushdef([AC_LIBSOURCES], m4_defn([gl_LIBSOURCES]))
- AM_CONDITIONAL([GL_COND_LIBTOOL], [true])
- gl_cond_libtool=true
gl_source_base='gnulib'
gl_FUNC_ALLOCA
gl_HEADER_ARPA_INET
- dnl gl_USE_SYSTEM_EXTENSIONS must be added quite early to configure.ac.
+ AC_PROG_MKDIR_P
+ gl_FUNC_BASE64
+ gl_FLOAT_H
+ gl_FSUSAGE
gl_GETADDRINFO
+ gl_GETOPT
+ AC_SUBST([LIBINTL])
+ AC_SUBST([LTLIBINTL])
+ gl_FUNC_GETTIMEOFDAY
gl_INET_NTOP
gl_LOCK
+ gl_FUNC_MALLOC_POSIX
+ gl_STDLIB_MODULE_INDICATOR([malloc-posix])
+ gt_FUNC_MKDTEMP
+ gl_STDLIB_MODULE_INDICATOR([mkdtemp])
gl_HEADER_NETINET_IN
+ AC_PROG_MKDIR_P
+ gl_PHYSMEM
+ gl_SAFE_READ
+ gl_SAFE_WRITE
gl_SIZE_MAX
gl_FUNC_SNPRINTF
+ gl_STDIO_MODULE_INDICATOR([snprintf])
gl_TYPE_SOCKLEN_T
+ gt_TYPE_SSIZE_T
AM_STDBOOL_H
+ gl_STDINT_H
+ gl_STDIO_H
+ gl_STDLIB_H
gl_FUNC_STRDUP
+ gl_STRING_MODULE_INDICATOR([strdup])
gl_HEADER_STRING_H
gl_HEADER_SYS_SOCKET
AC_PROG_MKDIR_P
+ gl_HEADER_SYS_STAT_H
+ AC_PROG_MKDIR_P
+ gl_HEADER_SYS_TIME_H
+ AC_PROG_MKDIR_P
+ gl_FUNC_GEN_TEMPNAME
+ gl_UNISTD_H
gl_FUNC_VASNPRINTF
gl_VISIBILITY
+ gl_WCHAR_H
gl_XSIZE
m4_popdef([AC_LIBSOURCES])
m4_popdef([AC_REPLACE_FUNCS])
AC_SUBST([gl_LIBOBJS], [$gl_libobjs])
AC_SUBST([gl_LTLIBOBJS], [$gl_ltlibobjs])
])
+ gltests_libdeps=
+ gltests_ltlibdeps=
+ m4_pushdef([AC_LIBOBJ], m4_defn([gltests_LIBOBJ]))
+ m4_pushdef([AC_REPLACE_FUNCS], m4_defn([gltests_REPLACE_FUNCS]))
+ m4_pushdef([AC_LIBSOURCES], m4_defn([gltests_LIBSOURCES]))
+ gl_source_base='tests'
+ m4_popdef([AC_LIBSOURCES])
+ m4_popdef([AC_REPLACE_FUNCS])
+ m4_popdef([AC_LIBOBJ])
+ AC_CONFIG_COMMANDS_PRE([
+ gltests_libobjs=
+ gltests_ltlibobjs=
+ if test -n "$gltests_LIBOBJS"; then
+ # Remove the extension.
+ sed_drop_objext='s/\.o$//;s/\.obj$//'
+ for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed "$sed_drop_objext" | sort | uniq`; do
+ gltests_libobjs="$gltests_libobjs $i.$ac_objext"
+ gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
+ done
+ fi
+ AC_SUBST([gltests_LIBOBJS], [$gltests_libobjs])
+ AC_SUBST([gltests_LTLIBOBJS], [$gltests_ltlibobjs])
+ ])
])
# Like AC_LIBOBJ, except that the module name goes
# into gl_LIBOBJS instead of into LIBOBJS.
-AC_DEFUN([gl_LIBOBJ],
- [gl_LIBOBJS="$gl_LIBOBJS $1.$ac_objext"])
+AC_DEFUN([gl_LIBOBJ], [
+ AS_LITERAL_IF([$1], [gl_LIBSOURCES([$1.c])])dnl
+ gl_LIBOBJS="$gl_LIBOBJS $1.$ac_objext"
+])
+
+# m4_foreach_w is provided by autoconf-2.59c and later.
+# This definition is to accommodate developers using versions
+# of autoconf older than that.
+m4_ifndef([m4_foreach_w],
+ [m4_define([m4_foreach_w],
+ [m4_foreach([$1], m4_split(m4_normalize([$2]), [ ]), [$3])])])
# Like AC_REPLACE_FUNCS, except that the module name goes
# into gl_LIBOBJS instead of into LIBOBJS.
-AC_DEFUN([gl_REPLACE_FUNCS],
- [AC_CHECK_FUNCS([$1], , [gl_LIBOBJ($ac_func)])])
+AC_DEFUN([gl_REPLACE_FUNCS], [
+ m4_foreach_w([gl_NAME], [$1], [AC_LIBSOURCES(gl_NAME[.c])])dnl
+ AC_CHECK_FUNCS([$1], , [gl_LIBOBJ($ac_func)])
+])
+
+# Like AC_LIBSOURCES, except the directory where the source file is
+# expected is derived from the gnulib-tool parametrization,
+# and alloca is special cased (for the alloca-opt module).
+# We could also entirely rely on EXTRA_lib..._SOURCES.
+AC_DEFUN([gl_LIBSOURCES], [
+ m4_foreach([_gl_NAME], [$1], [
+ m4_if(_gl_NAME, [alloca.c], [], [
+ m4_syscmd([test -r gnulib/]_gl_NAME[ || test ! -d gnulib])dnl
+ m4_if(m4_sysval, [0], [],
+ [AC_FATAL([missing gnulib/]_gl_NAME)])
+ ])
+ ])
+])
+
+# Like AC_LIBOBJ, except that the module name goes
+# into gltests_LIBOBJS instead of into LIBOBJS.
+AC_DEFUN([gltests_LIBOBJ], [
+ AS_LITERAL_IF([$1], [gltests_LIBSOURCES([$1.c])])dnl
+ gltests_LIBOBJS="$gltests_LIBOBJS $1.$ac_objext"
+])
+
+# m4_foreach_w is provided by autoconf-2.59c and later.
+# This definition is to accommodate developers using versions
+# of autoconf older than that.
+m4_ifndef([m4_foreach_w],
+ [m4_define([m4_foreach_w],
+ [m4_foreach([$1], m4_split(m4_normalize([$2]), [ ]), [$3])])])
+
+# Like AC_REPLACE_FUNCS, except that the module name goes
+# into gltests_LIBOBJS instead of into LIBOBJS.
+AC_DEFUN([gltests_REPLACE_FUNCS], [
+ m4_foreach_w([gl_NAME], [$1], [AC_LIBSOURCES(gl_NAME[.c])])dnl
+ AC_CHECK_FUNCS([$1], , [gltests_LIBOBJ($ac_func)])
+])
-# Like AC_LIBSOURCES, except that it does nothing.
-# We rely on EXTRA_lib..._SOURCES instead.
-AC_DEFUN([gl_LIBSOURCES],
- [])
+# Like AC_LIBSOURCES, except the directory where the source file is
+# expected is derived from the gnulib-tool parametrization,
+# and alloca is special cased (for the alloca-opt module).
+# We could also entirely rely on EXTRA_lib..._SOURCES.
+AC_DEFUN([gltests_LIBSOURCES], [
+ m4_foreach([_gl_NAME], [$1], [
+ m4_if(_gl_NAME, [alloca.c], [], [
+ m4_syscmd([test -r tests/]_gl_NAME[ || test ! -d tests])dnl
+ m4_if(m4_sysval, [0], [],
+ [AC_FATAL([missing tests/]_gl_NAME)])
+ ])
+ ])
+])
# This macro records the list of files which have been installed by
# gnulib-tool and may be removed by future gnulib-tool invocations.
AC_DEFUN([gl_FILE_LIST], [
build-aux/config.rpath
- lib/alloca_.h
+ build-aux/link-warning.h
+ lib/alloca.in.h
lib/asnprintf.c
+ lib/base64.c
+ lib/base64.h
+ lib/float+.h
+ lib/float.in.h
+ lib/fsusage.c
+ lib/fsusage.h
+ lib/full-read.c
+ lib/full-read.h
+ lib/full-write.c
+ lib/full-write.h
lib/gai_strerror.c
lib/getaddrinfo.c
lib/getaddrinfo.h
+ lib/getopt.c
+ lib/getopt.in.h
+ lib/getopt1.c
+ lib/getopt_int.h
lib/gettext.h
+ lib/gettimeofday.c
lib/inet_ntop.c
lib/inet_ntop.h
lib/lock.c
lib/lock.h
+ lib/malloc.c
+ lib/mkdtemp.c
+ lib/netinet_in.in.h
+ lib/physmem.c
+ lib/physmem.h
lib/printf-args.c
lib/printf-args.h
lib/printf-parse.c
lib/printf-parse.h
+ lib/safe-read.c
+ lib/safe-read.h
+ lib/safe-write.c
+ lib/safe-write.h
lib/size_max.h
lib/snprintf.c
- lib/snprintf.h
- lib/socket_.h
- lib/stdbool_.h
+ lib/stdbool.in.h
+ lib/stdint.in.h
+ lib/stdio.in.h
+ lib/stdlib.in.h
lib/strdup.c
- lib/string_.h
+ lib/string.in.h
+ lib/sys_socket.in.h
+ lib/sys_stat.in.h
+ lib/sys_time.in.h
+ lib/tempname.c
+ lib/tempname.h
+ lib/unistd.in.h
lib/vasnprintf.c
lib/vasnprintf.h
+ lib/wchar.in.h
lib/xsize.h
m4/absolute-header.m4
m4/alloca.m4
m4/arpa_inet_h.m4
+ m4/base64.m4
m4/eoverflow.m4
m4/extensions.m4
+ m4/float_h.m4
+ m4/fsusage.m4
m4/getaddrinfo.m4
+ m4/getopt.m4
+ m4/gettimeofday.m4
m4/gnulib-common.m4
+ m4/include_next.m4
m4/inet_ntop.m4
m4/intmax_t.m4
m4/inttypes_h.m4
m4/lib-link.m4
m4/lib-prefix.m4
m4/lock.m4
- m4/longdouble.m4
m4/longlong.m4
+ m4/malloc.m4
+ m4/mkdtemp.m4
m4/netinet_in_h.m4
m4/onceonly_2_57.m4
+ m4/physmem.m4
+ m4/safe-read.m4
+ m4/safe-write.m4
m4/size_max.m4
m4/snprintf.m4
m4/socklen.m4
m4/sockpfaf.m4
+ m4/ssize_t.m4
m4/stdbool.m4
+ m4/stdint.m4
m4/stdint_h.m4
+ m4/stdio_h.m4
+ m4/stdlib_h.m4
m4/strdup.m4
m4/string_h.m4
m4/sys_socket_h.m4
+ m4/sys_stat_h.m4
+ m4/sys_time_h.m4
+ m4/tempname.m4
+ m4/unistd_h.m4
m4/vasnprintf.m4
m4/visibility.m4
+ m4/wchar.m4
m4/wchar_t.m4
m4/wint_t.m4
m4/xsize.m4