summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorSimon Josefsson <simon@josefsson.org>2008-11-12 13:24:58 +0100
committerSimon Josefsson <simon@josefsson.org>2008-11-12 13:24:58 +0100
commiteb06e219aa42536dcc4491d443164d0f0f606e25 (patch)
tree59043c05f45511494523371bd57f3c326181fd5c /lib
parent6e86a54e3f6ce7ba6e53e223f3794ae41a7451e1 (diff)
downloadgnutls-eb06e219aa42536dcc4491d443164d0f0f606e25.tar.gz
Fix version script detection.
Diffstat (limited to 'lib')
-rw-r--r--lib/m4/hooks.m42
-rw-r--r--lib/m4/linker-script.m47
2 files changed, 5 insertions, 4 deletions
diff --git a/lib/m4/hooks.m4 b/lib/m4/hooks.m4
index 4c43d69ca1..e2a21c105d 100644
--- a/lib/m4/hooks.m4
+++ b/lib/m4/hooks.m4
@@ -243,7 +243,7 @@ AC_DEFUN([LIBGNUTLS_HOOKS],
fi
AM_CONDITIONAL(HAVE_LD_OUTPUT_DEF, test "$output_def" = "yes")
- sj_LINKER_SCRIPT
+ sj_LINKER_SCRIPT([$srcdir/libgnutls.vers])
# For storing integers in pointers without warnings
# http://developer.gnome.org/doc/API/2.0/glib/glib-Type-Conversion-Macros.html#desc
diff --git a/lib/m4/linker-script.m4 b/lib/m4/linker-script.m4
index edf04698ed..7570a942a2 100644
--- a/lib/m4/linker-script.m4
+++ b/lib/m4/linker-script.m4
@@ -6,10 +6,11 @@ dnl with or without modifications, as long as this notice is preserved.
dnl From Simon Josefsson
-# sj_LINKER_SCRIPT()
+# sj_LINKER_SCRIPT(VERSION-SCRIPT)
# -------------
# Check if ld supports linker scripts, and define automake conditional
-# HAVE_LD_VERSION_SCRIPT if so.
+# HAVE_LD_VERSION_SCRIPT if so. VERSION-SCRIPT is a valid version script
+# file.
AC_DEFUN([sj_LINKER_SCRIPT],
[
AC_ARG_ENABLE([ld-version-script],
@@ -19,7 +20,7 @@ AC_DEFUN([sj_LINKER_SCRIPT],
if test -z "$have_ld_version_script"; then
AC_MSG_CHECKING([if -Wl,--version-script works])
save_LDFLAGS="$LDFLAGS"
- LDFLAGS="$LDFLAGS -Wl,--version-script=$srcdir/lib/libtasn1.vers"
+ LDFLAGS="$LDFLAGS -Wl,--version-script=$1"
AC_LINK_IFELSE(AC_LANG_PROGRAM([], []),
[have_ld_version_script=yes], [have_ld_version_script=no])
LDFLAGS="$save_LDFLAGS"