summaryrefslogtreecommitdiff
path: root/libextra
diff options
context:
space:
mode:
authorSimon Josefsson <simon@josefsson.org>2009-05-11 19:09:13 +0200
committerSimon Josefsson <simon@josefsson.org>2009-05-11 19:09:13 +0200
commitf9e7f4a1a398666143ef0c29da0ee406616e3807 (patch)
tree53c5d5b24f858ddaa6921ab96ae3ee4b0d211c7a /libextra
parente31ee323fe17e3478bc6c614af64eb73b35395d9 (diff)
downloadgnutls-f9e7f4a1a398666143ef0c29da0ee406616e3807.tar.gz
Move gnulib tests into proper directory.
Diffstat (limited to 'libextra')
-rw-r--r--libextra/gl/gnulib.mk2
-rw-r--r--libextra/gl/m4/gnulib-cache.m44
-rw-r--r--libextra/gl/m4/gnulib-comp.m44
-rw-r--r--libextra/gl/m4/ld-output-def.m429
-rw-r--r--libextra/gl/m4/ld-version-script.m444
5 files changed, 81 insertions, 2 deletions
diff --git a/libextra/gl/gnulib.mk b/libextra/gl/gnulib.mk
index 09f301cbd9..c20e84c116 100644
--- a/libextra/gl/gnulib.mk
+++ b/libextra/gl/gnulib.mk
@@ -9,7 +9,7 @@
# the same distribution terms as the rest of that program.
#
# Generated by gnulib-tool.
-# Reproduce by: gnulib-tool --import --dir=. --lib=libxgnu --source-base=gl --m4-base=gl/m4 --doc-base=doc --tests-base=gl/tests --aux-dir=build-aux --avoid=dummy --avoid=stdint --makefile-name=gnulib.mk --libtool --macro-prefix=xgl --no-vc-files crypto/hmac-md5 crypto/md5 extensions havelib
+# Reproduce by: gnulib-tool --import --dir=. --lib=libxgnu --source-base=gl --m4-base=gl/m4 --doc-base=doc --tests-base=gl/tests --aux-dir=build-aux --avoid=dummy --avoid=stdint --makefile-name=gnulib.mk --libtool --macro-prefix=xgl --no-vc-files crypto/hmac-md5 crypto/md5 extensions havelib lib-msvc-compat lib-symbol-versions
MOSTLYCLEANFILES += core *.stackdump
diff --git a/libextra/gl/m4/gnulib-cache.m4 b/libextra/gl/m4/gnulib-cache.m4
index 21c1d85537..2d161fc4af 100644
--- a/libextra/gl/m4/gnulib-cache.m4
+++ b/libextra/gl/m4/gnulib-cache.m4
@@ -15,7 +15,7 @@
# Specification in the form of a command-line invocation:
-# gnulib-tool --import --dir=. --lib=libxgnu --source-base=gl --m4-base=gl/m4 --doc-base=doc --tests-base=gl/tests --aux-dir=build-aux --avoid=dummy --avoid=stdint --makefile-name=gnulib.mk --libtool --macro-prefix=xgl --no-vc-files crypto/hmac-md5 crypto/md5 extensions havelib
+# gnulib-tool --import --dir=. --lib=libxgnu --source-base=gl --m4-base=gl/m4 --doc-base=doc --tests-base=gl/tests --aux-dir=build-aux --avoid=dummy --avoid=stdint --makefile-name=gnulib.mk --libtool --macro-prefix=xgl --no-vc-files crypto/hmac-md5 crypto/md5 extensions havelib lib-msvc-compat lib-symbol-versions
# Specification in the form of a few gnulib-tool.m4 macro invocations:
gl_LOCAL_DIR([])
@@ -24,6 +24,8 @@ gl_MODULES([
crypto/md5
extensions
havelib
+ lib-msvc-compat
+ lib-symbol-versions
])
gl_AVOID([dummy stdint])
gl_SOURCE_BASE([gl])
diff --git a/libextra/gl/m4/gnulib-comp.m4 b/libextra/gl/m4/gnulib-comp.m4
index d4ea4cf754..432b3e0d76 100644
--- a/libextra/gl/m4/gnulib-comp.m4
+++ b/libextra/gl/m4/gnulib-comp.m4
@@ -43,6 +43,8 @@ AC_DEFUN([xgl_INIT],
gl_source_base='gl'
gl_HMAC_MD5
gl_MD5
+ gl_LD_OUTPUT_DEF
+ gl_LD_VERSION_SCRIPT
gl_MEMXOR
m4_ifval(xgl_LIBSOURCES_LIST, [
m4_syscmd([test ! -d ]m4_defn([xgl_LIBSOURCES_DIR])[ ||
@@ -183,6 +185,8 @@ AC_DEFUN([xgl_FILE_LIST], [
m4/extensions.m4
m4/gnulib-common.m4
m4/hmac-md5.m4
+ m4/ld-output-def.m4
+ m4/ld-version-script.m4
m4/lib-ld.m4
m4/lib-link.m4
m4/lib-prefix.m4
diff --git a/libextra/gl/m4/ld-output-def.m4 b/libextra/gl/m4/ld-output-def.m4
new file mode 100644
index 0000000000..1aa6a6fbbf
--- /dev/null
+++ b/libextra/gl/m4/ld-output-def.m4
@@ -0,0 +1,29 @@
+# ld-output-def.m4 serial 2
+dnl Copyright (C) 2008, 2009 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Simon Josefsson
+
+# gl_LD_OUTPUT_DEF()
+# -------------
+# Check if linker supports -Wl,--output-def and define automake
+# conditional HAVE_LD_OUTPUT_DEF if it is.
+AC_DEFUN([gl_LD_OUTPUT_DEF],
+[
+ AC_CACHE_CHECK([if gcc/ld supports -Wl,--output-def],
+ [gl_cv_ld_output_def],
+ [if test "$enable_shared" = no; then
+ gl_cv_ld_output_def="not needed, shared libraries are disabled"
+ else
+ gl_ldflags_save=$LDFLAGS
+ LDFLAGS="-Wl,--output-def,conftest.def"
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([])],
+ [gl_cv_ld_output_def=yes],
+ [gl_cv_ld_output_def=no])
+ rm -f conftest.def
+ LDFLAGS="$gl_ldflags_save"
+ fi])
+ AM_CONDITIONAL([HAVE_LD_OUTPUT_DEF], test "x$gl_cv_ld_output_def" = "xyes")
+])
diff --git a/libextra/gl/m4/ld-version-script.m4 b/libextra/gl/m4/ld-version-script.m4
new file mode 100644
index 0000000000..a97888f249
--- /dev/null
+++ b/libextra/gl/m4/ld-version-script.m4
@@ -0,0 +1,44 @@
+# ld-version-script.m4 serial 1
+dnl Copyright (C) 2008, 2009 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Simon Josefsson
+
+# FIXME: The test below returns a false positive for mingw
+# cross-compiles, 'local:' statements does not reduce number of
+# exported symbols in a DLL. Use --disable-ld-version-script to work
+# around the problem.
+
+# gl_LD_VERSION_SCRIPT
+# --------------------
+# Check if LD supports linker scripts, and define automake conditional
+# HAVE_LD_VERSION_SCRIPT if so.
+AC_DEFUN([gl_LD_VERSION_SCRIPT],
+[
+ AC_ARG_ENABLE([ld-version-script],
+ AS_HELP_STRING([--enable-ld-version-script],
+ [enable linker version script (default is enabled when possible)]),
+ [have_ld_version_script=$enableval], [])
+ if test -z "$have_ld_version_script"; then
+ AC_MSG_CHECKING([if LD -Wl,--version-script works])
+ save_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS -Wl,--version-script=conftest.map"
+ cat > conftest.map <<EOF
+VERS_1 {
+ global: sym;
+};
+
+VERS_2 {
+ global: sym;
+} VERS_1;
+EOF
+ AC_LINK_IFELSE(AC_LANG_PROGRAM([], []),
+ [have_ld_version_script=yes], [have_ld_version_script=no])
+ rm -f conftest.map
+ LDFLAGS="$save_LDFLAGS"
+ AC_MSG_RESULT($have_ld_version_script)
+ fi
+ AM_CONDITIONAL(HAVE_LD_VERSION_SCRIPT, test "$have_ld_version_script" = "yes")
+])