[augeas-devel] augeas: master - configure: do not use version script if the linker doesn't support it
David Lutterkort
lutter at fedoraproject.org
Fri Jun 12 00:24:05 UTC 2009
Gitweb: http://git.fedorahosted.org/git/augeas.git?p=augeas.git;a=commitdiff;h=86522768bcd5981ade7e4744a13fd91d1b537079
Commit: 86522768bcd5981ade7e4744a13fd91d1b537079
Parent: 731b41e8a1cd67e915d06b7da9552d6a18e8d673
Author: Anders F Björklund <afb at users.sourceforge.net>
AuthorDate: Thu Jun 11 15:12:43 2009 -0700
Committer: David Lutterkort <lutter at redhat.com>
CommitterDate: Thu Jun 11 17:17:29 2009 -0700
configure: do not use version script if the linker doesn't support it
That is the case on OS X
Fixes part of ticket #66
---
configure.ac | 7 +++++--
src/Makefile.am | 10 ++++++++--
2 files changed, 13 insertions(+), 4 deletions(-)
diff --git a/configure.ac b/configure.ac
index a2f0a58..8eb08c9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -75,10 +75,13 @@ AC_SUBST(AUGEAS_CFLAGS)
AUGEAS_CHECK_READLINE
AC_CHECK_FUNCS([open_memstream])
-VERSION_SCRIPT_FLAGS=-Wl,--version-script=
-$(/usr/bin/ld --help 2>&1 | grep -- --version-script >/dev/null) || \
+VERSION_SCRIPT_FLAGS=
+$(/usr/bin/ld --help 2>&1 | grep -- --version-script >/dev/null) && \
+ VERSION_SCRIPT_FLAGS=-Wl,--version-script=
+test "`uname`" == "SunOS" && \
VERSION_SCRIPT_FLAGS="-Wl,-M -Wl,"
AC_SUBST(VERSION_SCRIPT_FLAGS)
+AM_CONDITIONAL([USE_VERSION_SCRIPT], [test -n "$VERSION_SCRIPT_FLAGS"])
gl_INIT
diff --git a/src/Makefile.am b/src/Makefile.am
index 30dc6f7..2cc4bb8 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -24,8 +24,14 @@ libaugeas_la_SOURCES = augeas.h augeas.c pathx.c \
memory.h memory.c ref.h \
syntax.c syntax.h parser.y builtin.c lens.c lens.h regexp.c \
transform.h transform.c ast.c get.c put.c list.h
-libaugeas_la_LDFLAGS = $(VERSION_SCRIPT_FLAGS)$(srcdir)/augeas_sym.version \
- -version-info $(LIBAUGEAS_VERSION_INFO)
+
+if USE_VERSION_SCRIPT
+ VERSION_SCRIPT = $(VERSION_SCRIPT_FLAGS)$(srcdir)/augeas_sym.version
+else
+ VERSION_SCRIPT =
+endif
+
+libaugeas_la_LDFLAGS = $(VERSION_SCRIPT) -version-info $(LIBAUGEAS_VERSION_INFO)
libaugeas_la_LIBADD = liblexer.la libfa.la $(LIB_SELINUX) $(GNULIB)
augtool_SOURCES = augtool.c
More information about the augeas-devel
mailing list