summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Engel <t-openbsc@tobias.org>2012-10-24 17:52:52 +0200
committerHarald Welte <laforge@gnumonks.org>2012-10-27 10:03:12 +0200
commit597460fd97f485abd5bc61f6718ddc8e6b9a0f25 (patch)
treee11b11deda2b07d62984abc191805bd33c22f521
parent2db368ee8d440312dd0a7481e9b9e30d2921096c (diff)
Do not use --version-script linker flag on OSX
Add a check to not use --version-script linker flag if compiled on OSX since it doesn't exist there
-rw-r--r--configure.ac12
-rw-r--r--src/gb/Makefile.am2
-rw-r--r--src/gsm/Makefile.am2
3 files changed, 14 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index f119c90..24ddd0c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -17,6 +17,18 @@ LT_INIT([pic-only])
AC_CONFIG_MACRO_DIR([m4])
+dnl check os: some linker flags not available on osx
+case $host in
+*-darwin*)
+ ;;
+*)
+ LTLDFLAGS_OSMOGB='-Wl,--version-script=$(srcdir)/libosmogb.map'
+ LTLDFLAGS_OSMOGSM='-Wl,--version-script=$(srcdir)/libosmogsm.map'
+ ;;
+esac
+AC_SUBST(LTLDFLAGS_OSMOGB)
+AC_SUBST(LTLDFLAGS_OSMOGSM)
+
dnl checks for header files
AC_HEADER_STDC
AC_CHECK_HEADERS(execinfo.h sys/select.h sys/socket.h syslog.h ctype.h)
diff --git a/src/gb/Makefile.am b/src/gb/Makefile.am
index c137766..04d2108 100644
--- a/src/gb/Makefile.am
+++ b/src/gb/Makefile.am
@@ -11,7 +11,7 @@ noinst_HEADERS = common_vty.h
if ENABLE_GB
lib_LTLIBRARIES = libosmogb.la
-libosmogb_la_LDFLAGS = -Wl,--version-script=$(srcdir)/libosmogb.map -version-info $(LIBVERSION)
+libosmogb_la_LDFLAGS = $(LTLDFLAGS_OSMOGB) -version-info $(LIBVERSION)
libosmogb_la_LIBADD = \
$(top_builddir)/src/libosmocore.la \
$(top_builddir)/src/vty/libosmovty.la \
diff --git a/src/gsm/Makefile.am b/src/gsm/Makefile.am
index b72a8d4..0544e0a 100644
--- a/src/gsm/Makefile.am
+++ b/src/gsm/Makefile.am
@@ -21,7 +21,7 @@ libosmogsm_la_SOURCES = a5.c rxlev_stat.c tlv_parser.c comp128.c gsm_utils.c \
milenage/aes-encblock.c milenage/aes-internal.c \
milenage/aes-internal-enc.c milenage/milenage.c gan.c
-libosmogsm_la_LDFLAGS = -Wl,--version-script=$(srcdir)/libosmogsm.map -version-info $(LIBVERSION)
+libosmogsm_la_LDFLAGS = $(LTLDFLAGS_OSMOGSM) -version-info $(LIBVERSION)
libosmogsm_la_LIBADD = $(top_builddir)/src/libosmocore.la
EXTRA_DIST = libosmogsm.map