summaryrefslogtreecommitdiff
path: root/gl/m4/gnulib-comp.m4
diff options
context:
space:
mode:
authorSimon Josefsson <simon@josefsson.org>2008-01-31 12:57:24 +0100
committerSimon Josefsson <simon@josefsson.org>2008-01-31 12:57:24 +0100
commit1bc70a22302c8b07ad75e3d029f5f7f25357ae26 (patch)
tree191aecd9eea95fc3f64020e5a83845204367f043 /gl/m4/gnulib-comp.m4
parent9137b894ef5de0733acd9e11920afac8c4adde16 (diff)
downloadlibtasn1-1bc70a22302c8b07ad75e3d029f5f7f25357ae26.tar.gz
libtasn1-1bc70a22302c8b07ad75e3d029f5f7f25357ae26.tar.bz2
libtasn1-1bc70a22302c8b07ad75e3d029f5f7f25357ae26.zip
Update gnulib files.
Diffstat (limited to 'gl/m4/gnulib-comp.m4')
-rw-r--r--gl/m4/gnulib-comp.m469
1 files changed, 67 insertions, 2 deletions
diff --git a/gl/m4/gnulib-comp.m4 b/gl/m4/gnulib-comp.m4
index 2bbf090..dbf8a32 100644
--- a/gl/m4/gnulib-comp.m4
+++ b/gl/m4/gnulib-comp.m4
@@ -38,11 +38,11 @@ AC_DEFUN([gl_EARLY],
# "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='gl'
gl_GETOPT
AC_SUBST([LIBINTL])
@@ -76,6 +76,29 @@ AC_DEFUN([gl_INIT],
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
@@ -85,6 +108,13 @@ 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], [
@@ -106,6 +136,41 @@ AC_DEFUN([gl_LIBSOURCES], [
])
])
+# 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 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], [