summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2000-03-27 18:20:47 +0000
committerRoland McGrath <roland@gnu.org>2000-03-27 18:20:47 +0000
commit7d520be8a7a92d72f0c65db3d5a2e4a0cf6c8914 (patch)
tree9cf6821ee670f644f974ccd394a7ac7847b5eb45
parent6e5801f728a121cc002d7f6912dab2d9b60a3743 (diff)
2000-03-27 Roland McGrath <roland@baalperazim.frob.com>
* configure.in (VERSIONING): New check for ld --version-script. * config.make.in (VERSIONING): New variable, set by configure.
-rw-r--r--config.make.in3
-rw-r--r--configure.in31
2 files changed, 33 insertions, 1 deletions
diff --git a/config.make.in b/config.make.in
index c9371150..7bbd768e 100644
--- a/config.make.in
+++ b/config.make.in
@@ -48,6 +48,9 @@ CPPFLAGS += @CPPFLAGS@ @DEFS@
CFLAGS += @CFLAGS@
LDFLAGS += @LDFLAGS@
+# `yes' or `no' to indicate if ld --version-script is available.
+VERSIONING = @VERSIONING@
+
# If a separate libcrypt is available, use it.
LIBCRYPT = @LIBCRYPT@
diff --git a/configure.in b/configure.in
index 9d65bb88..ed80813a 100644
--- a/configure.in
+++ b/configure.in
@@ -1,5 +1,5 @@
dnl Process this file with autoconf to produce a configure script.
-AC_REVISION([$Id: configure.in,v 1.17 1999/09/19 18:53:26 roland Exp $])
+AC_REVISION([$Id: configure.in,v 1.18 2000/03/27 18:20:47 roland Exp $])
AC_PREREQ(2.12) dnl Minimum Autoconf version required.
AC_INIT(hurd/hurd_types.h) dnl A distinctive file to look for in srcdir.
@@ -68,6 +68,35 @@ AC_SUBST(CFLAGS) AC_SUBST(CPPFLAGS) AC_SUBST(LDFLAGS)
AC_CHECK_LIB(crypt, crypt, LIBCRYPT=-lcrypt)
AC_SUBST(LIBCRYPT)
+# See if --version-script is available.
+AC_CACHE_CHECK(for ld --version-script, hurd_cv_ld_version_script_option, [dnl
+cat > conftest.c <<\EOF
+void foobar() {}
+EOF
+cat > conftest.map <<\EOF
+VERS_1 {
+ global: sym;
+};
+
+VERS_2 {
+ global: sym;
+} VERS_1;
+EOF
+
+if AC_TRY_COMMAND([eval $ac_compile 1>&AC_FD_CC]) &&
+ AC_TRY_COMMAND([${CC-cc} $CFLAGS -shared -o conftest.so conftest.o
+ -nostartfiles -nostdlib
+ -Wl,--version-script,conftest.map
+ 1>&AC_FD_CC]); then
+ hurd_cv_ld_version_script_option=yes
+else
+ hurd_cv_ld_version_script_option=no
+fi
+rm -f conftest*])
+VERSIONING=$hurd_cv_ld_version_script_option
+AC_SUBST(VERSIONING)
+
+
if test -f ./$ac_unique_file; then
# Configuring in source directory; don't create any Makefiles.
makefiles=