Skip to content
Snippets Groups Projects
Commit ba3aa72e authored by Guillaume Roguez's avatar Guillaume Roguez Committed by gerrit2
Browse files

fix configure.ac

Into the darwin OS detection the AC_EGREP_CPP macro is used.
This causes an bugged configure file issued and this one
prevents Linux platform to generate shared-library.

Following this link:
https://www.gnu.org/software/autoconf/manual/autoconf-2.69/html_node/AC_005fACT_005fIFELSE-vs-AC_005fTRY_005fACT.html

Using AC_EGREP_CPP is a bad way to test a C preprocessor.
This patch changes this call by AC_COMPILE_IFELSE + AC_LANG_PROGRAM calls:
- this is a better way to process
- this fix the linux shared build

Change-Id: I150666f2bc45a48d021110025f2d486a9750d333
Tuleap: #699
parent 207627be
Branches
Tags
No related merge requests found
......@@ -50,14 +50,14 @@ case "${host_os}" in
;;
darwin*)
SYS=darwin
AC_EGREP_CPP(yes,
[#import <TargetConditionals.h>
#if TARGET_OS_IPHONE
yes
#endif],
[HAVE_IOS="1"],
[HAVE_OSX="1"])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
[[#import <TargetConditionals.h>
#if TARGET_OS_IPHONE == 0
#error this is not an IPHONE
#endif
]])],
[HAVE_IOS="1"],
[HAVE_OSX="1"])
;;
mingw32*)
SYS=mingw32
......
......@@ -75,6 +75,11 @@ libring_la_CFLAGS = \
libring_la_CXXFLAGS = @JSONCPP_CFLAGS@
if HAVE_LINUX
#needed to compile the .so
libring_la_CXXFLAGS += -fPIC
endif
libring_la_SOURCES = \
buildinfo.cpp \
conference.cpp \
......@@ -112,7 +117,7 @@ libring_la_SOURCES = \
noncopyable.h \
utf8_utils.h \
ring_types.h \
compiler_intrinsics.h \
intrin.h \
array_size.h \
account_schema.h \
registration_states.h \
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment