diff options
author | Simon Josefsson <simon@josefsson.org> | 2008-05-15 13:59:44 +0200 |
---|---|---|
committer | Simon Josefsson <simon@josefsson.org> | 2008-05-15 13:59:44 +0200 |
commit | 808f9acc76c6f45f211d377b64d25a562fad08e0 (patch) | |
tree | e6134812e4a1700323d461574ea0c158896e0774 /gl | |
parent | 5838e73798ef9ba9a3de027f5a85e99b4f3d88de (diff) | |
download | gnutls-808f9acc76c6f45f211d377b64d25a562fad08e0.tar.gz |
Update gnulib files.
Diffstat (limited to 'gl')
-rw-r--r-- | gl/m4/gnulib-common.m4 | 9 | ||||
-rw-r--r-- | gl/m4/gnulib-comp.m4 | 58 |
2 files changed, 44 insertions, 23 deletions
diff --git a/gl/m4/gnulib-common.m4 b/gl/m4/gnulib-common.m4 index 3edfc120f8..34d91c728f 100644 --- a/gl/m4/gnulib-common.m4 +++ b/gl/m4/gnulib-common.m4 @@ -1,4 +1,4 @@ -# gnulib-common.m4 serial 4 +# gnulib-common.m4 serial 5 dnl Copyright (C) 2007-2008 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -31,6 +31,13 @@ AC_DEFUN([gl_MODULE_INDICATOR], [Define to 1 when using the gnulib module ]$1[.]) ]) +# m4_foreach_w +# is a backport of autoconf-2.59c's m4_foreach_w. +# Remove this macro when we can assume autoconf >= 2.60. +m4_ifndef([m4_foreach_w], + [m4_define([m4_foreach_w], + [m4_foreach([$1], m4_split(m4_normalize([$2]), [ ]), [$3])])]) + # AC_PROG_MKDIR_P # is a backport of autoconf-2.60's AC_PROG_MKDIR_P. # Remove this macro when we can assume autoconf >= 2.60. diff --git a/gl/m4/gnulib-comp.m4 b/gl/m4/gnulib-comp.m4 index 882a81f141..69102d59fd 100644 --- a/gl/m4/gnulib-comp.m4 +++ b/gl/m4/gnulib-comp.m4 @@ -43,6 +43,8 @@ AC_DEFUN([gl_INIT], 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])) + m4_pushdef([gl_LIBSOURCES_LIST], []) + m4_pushdef([gl_LIBSOURCES_DIR], []) gl_COMMON gl_source_base='gl' gl_EOVERFLOW @@ -81,6 +83,19 @@ AC_DEFUN([gl_INIT], gl_STRING_MODULE_INDICATOR([strdup]) gl_FUNC_STRERROR gl_STRING_MODULE_INDICATOR([strerror]) + m4_ifval(gl_LIBSOURCES_LIST, [ + m4_syscmd([test ! -d ]gl_LIBSOURCES_DIR[ || + for gl_file in ]gl_LIBSOURCES_LIST[ ; do + if test ! -r ]gl_LIBSOURCES_DIR[/$gl_file ; then + echo "missing file ]gl_LIBSOURCES_DIR[/$gl_file" >&2 + exit 1 + fi + done])dnl + m4_if(m4_sysval, [0], [], + [AC_FATAL([expected source file, required through AC_LIBSOURCES, not found])]) + ]) + m4_popdef([gl_LIBSOURCES_DIR]) + m4_popdef([gl_LIBSOURCES_LIST]) m4_popdef([AC_LIBSOURCES]) m4_popdef([AC_REPLACE_FUNCS]) m4_popdef([AC_LIBOBJ]) @@ -103,8 +118,23 @@ AC_DEFUN([gl_INIT], 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])) + m4_pushdef([gltests_LIBSOURCES_LIST], []) + m4_pushdef([gltests_LIBSOURCES_DIR], []) gl_COMMON gl_source_base='gl/tests' + m4_ifval(gltests_LIBSOURCES_LIST, [ + m4_syscmd([test ! -d ]gltests_LIBSOURCES_DIR[ || + for gl_file in ]gltests_LIBSOURCES_LIST[ ; do + if test ! -r ]gltests_LIBSOURCES_DIR[/$gl_file ; then + echo "missing file ]gltests_LIBSOURCES_DIR[/$gl_file" >&2 + exit 1 + fi + done])dnl + m4_if(m4_sysval, [0], [], + [AC_FATAL([expected source file, required through AC_LIBSOURCES, not found])]) + ]) + m4_popdef([gltests_LIBSOURCES_DIR]) + m4_popdef([gltests_LIBSOURCES_LIST]) m4_popdef([AC_LIBSOURCES]) m4_popdef([AC_REPLACE_FUNCS]) m4_popdef([AC_LIBOBJ]) @@ -131,13 +161,6 @@ AC_DEFUN([gl_LIBOBJ], [ 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], [ @@ -146,15 +169,14 @@ AC_DEFUN([gl_REPLACE_FUNCS], [ ]) # Like AC_LIBSOURCES, except the directory where the source file is -# expected is derived from the gnulib-tool parametrization, +# expected is derived from the gnulib-tool parameterization, # 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 gl/]_gl_NAME[ || test ! -d gl])dnl - m4_if(m4_sysval, [0], [], - [AC_FATAL([missing gl/]_gl_NAME)]) + m4_define([gl_LIBSOURCES_DIR], [gl]) + m4_append([gl_LIBSOURCES_LIST], _gl_NAME, [ ]) ]) ]) ]) @@ -166,13 +188,6 @@ AC_DEFUN([gltests_LIBOBJ], [ 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], [ @@ -181,15 +196,14 @@ AC_DEFUN([gltests_REPLACE_FUNCS], [ ]) # Like AC_LIBSOURCES, except the directory where the source file is -# expected is derived from the gnulib-tool parametrization, +# expected is derived from the gnulib-tool parameterization, # 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 gl/tests/]_gl_NAME[ || test ! -d gl/tests])dnl - m4_if(m4_sysval, [0], [], - [AC_FATAL([missing gl/tests/]_gl_NAME)]) + m4_define([gltests_LIBSOURCES_DIR], [gl/tests]) + m4_append([gltests_LIBSOURCES_LIST], _gl_NAME, [ ]) ]) ]) ]) |