added --enable-static-cxx to link libstdc++ statically
git-svn-id: https://zeitsenke.de/svn/SyncEvolution/trunk@311 15ad00c4-1369-45f4-8270-35d70d36bdcd
This commit is contained in:
parent
c4600802f3
commit
58c9c6a73c
2 changed files with 18 additions and 1 deletions
11
configure.in
11
configure.in
|
@ -26,6 +26,11 @@ AC_ARG_ENABLE(integration-tests,
|
|||
[enables tests outside of the library (can be used together with normal builds of the library)]),
|
||||
enable_integration_tests="$enableval", enable_integration_tests="no")
|
||||
|
||||
AC_ARG_ENABLE(static-cxx,
|
||||
AS_HELP_STRING([--enable-static-cxx],
|
||||
[build executables which contain libstdc++ instead of requiring suitable libstdc++.so to run]),
|
||||
enable_static_cxx="$enableval", enable_static_cxx="no")
|
||||
|
||||
AC_CHECK_HEADERS(signal.h)
|
||||
|
||||
# cppunit needed?
|
||||
|
@ -47,6 +52,12 @@ if test $enable_integration_tests == "yes"; then
|
|||
AC_DEFINE(ENABLE_INTEGRATION_TESTS, 1, [enable unit tests outside of the library's source code])
|
||||
fi
|
||||
|
||||
if test $enable_static_cxx == "yes"; then
|
||||
LIBS="$LIBS -L."
|
||||
CORE_LDADD_DEP=libstdc++.a
|
||||
fi
|
||||
AC_SUBST(CORE_LDADD_DEP)
|
||||
|
||||
if test ! "$SYNC4J"; then
|
||||
if test "$SYNC4JSRC"; then
|
||||
# make a copy of the sources
|
||||
|
|
|
@ -12,6 +12,7 @@ TESTS = @CPPUNIT_TESTS@
|
|||
|
||||
DISTCLEANFILES = synccompare
|
||||
MAINTAINERCLEANFILES = Makefile.in
|
||||
CLEANFILES = libstdc++.a
|
||||
|
||||
synccompare : normalize_vcard.pl
|
||||
cp $< $@
|
||||
|
@ -43,6 +44,10 @@ CORE_SOURCES = \
|
|||
|
||||
CORE_LDADD = @EPACKAGE_LIBS@ @GLIB_LIBS@ @SYNC4J_LIBS@ @LIBS@
|
||||
|
||||
# put link to static c++ library into current directory, needed if compiling with --enable-static-c++
|
||||
libstdc++.a :
|
||||
path=`$(CXX) $(CORE_LDADD) $(LD_FLAGS) -print-file-name=libstdc++.a` && ln -s $$path .
|
||||
|
||||
syncevolution_SOURCES = \
|
||||
syncevolution.cpp \
|
||||
$(CORE_SOURCES)
|
||||
|
@ -81,7 +86,7 @@ SYNC4JSRC = @SYNC4JSRC@
|
|||
SYNC4J_SUBDIR = @SYNC4J_SUBDIR@
|
||||
BUILT_SOURCES = $(SYNC4J_SUBDIR)/all
|
||||
|
||||
clean distclean mostlyclean distdir maintainer-clean : % : $(SYNC4J_SUBDIR)/%
|
||||
clean distclean mostlyclean distdir maintainer-clean : % : $(SYNC4J_SUBDIR)/% %-am
|
||||
clean : testclean
|
||||
|
||||
# With --disable-shared autotools links against libsync4j.a which does not
|
||||
|
@ -96,6 +101,7 @@ client_test_LDADD = $(SYNC4J_SUBDIR)/src/libsync4j.la $(CORE_LDADD)
|
|||
vpath %.cpp : $(SYNC4J_SUBDIR)/test/test
|
||||
|
||||
TestEvolution syncevolution vcardconverter : \
|
||||
@CORE_LDADD_DEP@ \
|
||||
$(SYNC4J_SUBDIR)/src/libsync4j.la
|
||||
test : TestEvolution addressbook.tests calendar.tests todo.tests memo.tests synccompare vcardconverter
|
||||
|
||||
|
|
Loading…
Reference in a new issue