fixed libcurl link error with --enable-shared

git-svn-id: https://zeitsenke.de/svn/SyncEvolution/trunk@731 15ad00c4-1369-45f4-8270-35d70d36bdcd
This commit is contained in:
Patrick Ohly 2008-08-17 09:26:34 +00:00
parent 46d72adbe0
commit f1a3198058
2 changed files with 35 additions and 1 deletions

View File

@ -100,6 +100,40 @@ FUNAMBOL_LIB=$PWD/src/client-api.build/src/libfunambol.la
AC_SUBST(CLEAN_CLIENT_SRC)
case $target in
*apple-darwin*) use_mac_ta="yes" ;;
*) use_libcurl="yes" ;;
esac
# Check for libcurl now instead of during make.
# Strictly speaking, building libfunambol takes
# care of that, but because we build it in a
# slightly unusual way (build libfunambol.a with
# -fPIC, include just the required object files
# in libsyncevolution) libtool doesn't pick up
# that dependency and we have to add libcurl to
# out link flags ourselves.
AC_MSG_CHECKING([for libcurl])
if TRANSPORT_LDFLAGS=`sh -c 'curl-config --libs' 2>&AS_MESSAGE_LOG_FD` && \
TRANSPORT_CFLAGS=`sh -c 'curl-config --cflags' 2>&AS_MESSAGE_LOG_FD`; then
AC_MSG_RESULT([found])
else
AC_MSG_RESULT([missing])
# FIXME: hard-coded check for Mac (same as in libfunambol)
case $target in
*apple-darwin*) TRANSPORT_LDFLAGS="-framework CoreServices" ;;
*) AC_MSG_ERROR([libcurl is required, check that its development package is installed and curl-config is in your PATH]) ;;
esac
fi
AC_SUBST(TRANSPORT_LDFLAGS)
AC_SUBST(TRANSPORT_CFLAGS)
if test "x$use_mac_ta" = "xyes"; then
CURL_LDFLAGS="-framework CoreServices"
AC_SUBST(CURL_LDFLAGS)
fi
if test ! "$FUNAMBOL"; then
if test "$FUNAMBOLSRC"; then
# make a copy of the sources, remove it during maintainer-clean and distclean

View File

@ -66,7 +66,7 @@ CORE_SOURCES = \
$(VOCL_SOURCES)
libsyncevolution_la_SOURCES = $(CORE_SOURCES)
libsyncevolution_la_LIBADD = @FUNAMBOL_LIBS@ @EPACKAGE_LIBS@ @GLIB_LIBS@ @LIBS@
libsyncevolution_la_LIBADD = @FUNAMBOL_LIBS@ @TRANSPORT_LDFLAGS@ @EPACKAGE_LIBS@ @GLIB_LIBS@ @LIBS@
libsyncevolution_la_CXXFLAGS = $(SYNCEVOLUTION_CXXFLAGS)
# include boost in distribution