This actually allows for the user to override the decision and at the
same time supports compilers that might not be able to use -fPIC at
all.
Signed-off-by: Diego Elio Pettenò <flameeyes(a)flameeyes.eu>
---
configure.ac | 2 +-
src/Makefile.am | 2 +-
src/codec/Makefile.am | 2 +-
src/gb/Makefile.am | 2 +-
src/gsm/Makefile.am | 2 +-
src/vty/Makefile.am | 2 +-
6 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/configure.ac b/configure.ac
index b0c0fb7..3e88a1b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -13,7 +13,7 @@ AC_PROG_MAKE_SET
AC_PROG_MKDIR_P
AC_PROG_CC
AC_PROG_INSTALL
-LT_INIT
+LT_INIT([pic-only])
AC_CONFIG_MACRO_DIR([m4])
diff --git a/src/Makefile.am b/src/Makefile.am
index d38082b..d719df7 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -3,7 +3,7 @@
LIBVERSION=4:0:0
INCLUDES = $(all_includes) -I$(top_srcdir)/include -I$(top_builddir)/include
-AM_CFLAGS = -fPIC -Wall
+AM_CFLAGS = -Wall
lib_LTLIBRARIES = libosmocore.la
diff --git a/src/codec/Makefile.am b/src/codec/Makefile.am
index d36e23f..665768c 100644
--- a/src/codec/Makefile.am
+++ b/src/codec/Makefile.am
@@ -3,7 +3,7 @@
LIBVERSION=0:0:0
INCLUDES = $(all_includes) -I$(top_srcdir)/include
-AM_CFLAGS = -fPIC -Wall
+AM_CFLAGS = -Wall
lib_LTLIBRARIES = libosmocodec.la
diff --git a/src/gb/Makefile.am b/src/gb/Makefile.am
index 2b60464..7381ed4 100644
--- a/src/gb/Makefile.am
+++ b/src/gb/Makefile.am
@@ -3,7 +3,7 @@
LIBVERSION=1:0:0
INCLUDES = $(all_includes) -I$(top_srcdir)/include
-AM_CFLAGS = -fPIC -Wall ${GCC_FVISIBILITY_HIDDEN}
+AM_CFLAGS = -Wall ${GCC_FVISIBILITY_HIDDEN}
# FIXME: this should eventually go into a milenage/Makefile.am
noinst_HEADERS = common_vty.h
diff --git a/src/gsm/Makefile.am b/src/gsm/Makefile.am
index 167aeb7..81a318b 100644
--- a/src/gsm/Makefile.am
+++ b/src/gsm/Makefile.am
@@ -3,7 +3,7 @@
LIBVERSION=2:0:1
INCLUDES = $(all_includes) -I$(top_srcdir)/include
-AM_CFLAGS = -fPIC -Wall ${GCC_FVISIBILITY_HIDDEN}
+AM_CFLAGS = -Wall ${GCC_FVISIBILITY_HIDDEN}
# FIXME: this should eventually go into a milenage/Makefile.am
noinst_HEADERS = milenage/aes.h milenage/aes_i.h milenage/aes_wrap.h \
diff --git a/src/vty/Makefile.am b/src/vty/Makefile.am
index b7be6f8..6111123 100644
--- a/src/vty/Makefile.am
+++ b/src/vty/Makefile.am
@@ -3,7 +3,7 @@
LIBVERSION=0:0:0
INCLUDES = $(all_includes) -I$(top_srcdir)/include
-AM_CFLAGS = -fPIC -Wall
+AM_CFLAGS = -Wall
if ENABLE_VTY
lib_LTLIBRARIES = libosmovty.la
--
1.7.8.6