diff options
author | Simon Josefsson <simon@josefsson.org> | 2009-03-04 15:25:13 +0100 |
---|---|---|
committer | Simon Josefsson <simon@josefsson.org> | 2009-03-04 15:25:13 +0100 |
commit | e06297f5dced46aafc3deac1805929acd4d9ce02 (patch) | |
tree | 01e3871eac5783154e77c2d3ae814abb56c556ff | |
parent | f6b9ec0b58fb3bd81818536fe8dbeeb522112760 (diff) | |
download | libtasn1-e06297f5dced46aafc3deac1805929acd4d9ce02.tar.gz libtasn1-e06297f5dced46aafc3deac1805929acd4d9ce02.tar.bz2 libtasn1-e06297f5dced46aafc3deac1805929acd4d9ce02.zip |
Use linker script test from gnulib.
-rw-r--r-- | configure.ac | 1 | ||||
-rw-r--r-- | lib/gllib/Makefile.am | 2 | ||||
-rw-r--r-- | lib/glm4/gnulib-cache.m4 | 3 | ||||
-rw-r--r-- | lib/glm4/gnulib-comp.m4 | 2 | ||||
-rw-r--r-- | lib/glm4/ld-version-script.m4 (renamed from m4/linker-script.m4) | 28 |
5 files changed, 24 insertions, 12 deletions
diff --git a/configure.ac b/configure.ac index 23048f3..b1860f8 100644 --- a/configure.ac +++ b/configure.ac @@ -49,7 +49,6 @@ AC_CHECK_SIZEOF(unsigned long int, 4) AC_CHECK_SIZEOF(unsigned int, 4) sj_VALGRIND -sj_LINKER_SCRIPT sj_UPDATE_HEADER_VERSION([$srcdir/lib/libtasn1.h]) # Check for gtk-doc. diff --git a/lib/gllib/Makefile.am b/lib/gllib/Makefile.am index 04f4712..f1d852e 100644 --- a/lib/gllib/Makefile.am +++ b/lib/gllib/Makefile.am @@ -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=libgnu --source-base=lib/gllib --m4-base=lib/glm4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --avoid=dummy --lgpl=2 --libtool --macro-prefix=lgl --no-vc-files stdint +# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib/gllib --m4-base=lib/glm4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --avoid=dummy --lgpl=2 --libtool --macro-prefix=lgl --no-vc-files ld-version-script stdint AUTOMAKE_OPTIONS = 1.5 gnits diff --git a/lib/glm4/gnulib-cache.m4 b/lib/glm4/gnulib-cache.m4 index 989a099..3c1d474 100644 --- a/lib/glm4/gnulib-cache.m4 +++ b/lib/glm4/gnulib-cache.m4 @@ -15,11 +15,12 @@ # Specification in the form of a command-line invocation: -# gnulib-tool --import --dir=. --lib=libgnu --source-base=lib/gllib --m4-base=lib/glm4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --avoid=dummy --lgpl=2 --libtool --macro-prefix=lgl --no-vc-files stdint +# gnulib-tool --import --dir=. --lib=libgnu --source-base=lib/gllib --m4-base=lib/glm4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --avoid=dummy --lgpl=2 --libtool --macro-prefix=lgl --no-vc-files ld-version-script stdint # Specification in the form of a few gnulib-tool.m4 macro invocations: gl_LOCAL_DIR([]) gl_MODULES([ + ld-version-script stdint ]) gl_AVOID([dummy]) diff --git a/lib/glm4/gnulib-comp.m4 b/lib/glm4/gnulib-comp.m4 index 4cb45d8..435a364 100644 --- a/lib/glm4/gnulib-comp.m4 +++ b/lib/glm4/gnulib-comp.m4 @@ -40,6 +40,7 @@ AC_DEFUN([lgl_INIT], m4_pushdef([lgl_LIBSOURCES_DIR], []) gl_COMMON gl_source_base='lib/gllib' + gl_LD_VERSION_SCRIPT AC_REQUIRE([gl_MULTIARCH]) gl_STDINT_H gl_WCHAR_H @@ -177,6 +178,7 @@ AC_DEFUN([lgl_FILE_LIST], [ m4/00gnulib.m4 m4/gnulib-common.m4 m4/include_next.m4 + m4/ld-version-script.m4 m4/longlong.m4 m4/multiarch.m4 m4/stdint.m4 diff --git a/m4/linker-script.m4 b/lib/glm4/ld-version-script.m4 index edf0469..e321347 100644 --- a/m4/linker-script.m4 +++ b/lib/glm4/ld-version-script.m4 @@ -1,27 +1,37 @@ -# linker-script.m4 serial 1 -dnl Copyright (C) 2008 Free Software Foundation, Inc. +# 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 -# sj_LINKER_SCRIPT() -# ------------- -# Check if ld supports linker scripts, and define automake conditional +# gl_LD_VERSION_SCRIPT +# -------------------- +# Check if LD supports linker scripts, and define automake conditional # HAVE_LD_VERSION_SCRIPT if so. -AC_DEFUN([sj_LINKER_SCRIPT], +AC_DEFUN([gl_LD_VERSION_SCRIPT], [ AC_ARG_ENABLE([ld-version-script], AS_HELP_STRING([--enable-ld-version-script], - [enable/disable linker version script (default is enabled when possible)]), + [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 -Wl,--version-script works]) + AC_MSG_CHECKING([if LD -Wl,--version-script works]) save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS -Wl,--version-script=$srcdir/lib/libtasn1.vers" + 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 |