get rid of some duplicated flags during build and in pkg-config

This commit is contained in:
cg25 2009-04-06 19:05:08 +00:00
parent 426e653213
commit c23fda2e2a
3 changed files with 15 additions and 19 deletions

View File

@ -36,6 +36,8 @@ INTERFACE_VERSION_INFO=$VERSION_INFO_CURRENT:$VERSION_INFO_REVISION:$VERSION_INF
AC_SUBST(INTERFACE_VERSION_INFO)
dnl ---------------------------------------------------------------------------
AC_CONFIG_MACRO_DIR([m4])
AC_PROG_CC
if test -z "$(which $CC)"; then
@ -59,10 +61,6 @@ AC_SYS_LARGEFILE
dnl Check for pthreads.
ACX_PTHREAD
dnl Apply pthread config.
CC=$PTHREAD_CC
CPPFLAGS="$CPPFLAGS $PTHREAD_CFLAGS"
LIBS="$LIBS $PTHREAD_LIBS"
AM_CONDITIONAL([ENABLE_SHIPPED_ASIO], false)
@ -297,7 +295,7 @@ if [[ "$zlib" = "shipped" ]]; then
AM_CONDITIONAL([ENABLE_SHIPPED_ZLIB], true)
ZLIBINCL="-I\$(top_srcdir)/zlib"
elif [[ "$zlib" = "system" ]]; then
ZLIB="-lz"
ZLIB="" # AC_CHECK_LIB will add -lz to @LIBS@ automatically
AM_CONDITIONAL([ENABLE_SHIPPED_ZLIB], false)
ZLIBINCL=""
fi

View File

@ -12,6 +12,6 @@ Name: libtorrent-rasterbar
Description: Bittorrent library.
Version: @VERSION@
Libs: -L${libdir} -ltorrent-rasterbar
Libs.private: @LIBS@ @BOOST_FILESYSTEM_LIB@ @BOOST_THREAD_LIB@ @PTHREAD_LIBS@ @SSL_LIBS@ @BOOST_SYSTEM_LIB@ @SSL_LDFLAGS@
Cflags: -I${includedir} -I${includedir}/libtorrent @COMPILETIME_OPTIONS@ @SSL_CXXFLAGS@
Libs.private: @LIBS@ @BOOST_SYSTEM_LIB@ @BOOST_FILESYSTEM_LIB@ @BOOST_THREAD_LIB@ @PTHREAD_LIBS@ @SSL_LIBS@ @ZLIB@
Cflags: -I${includedir} -I${includedir}/libtorrent @SSL_CXXFLAGS@ @COMPILETIME_OPTIONS@

View File

@ -51,18 +51,14 @@ dnl [ AC_MSG_RESULT(yes)
ssldir="$dir"
if test -f "$dir/include/openssl/ssl.h"; then
found_ssl="yes";
SSL_CFLAGS="$CFLAGS -I$ssldir/include/openssl -DHAVE_SSL";
AC_SUBST(SSL_CFLAGS)
SSL_CXXFLAGS="$CXXFLAGS -I$ssldir/include/openssl -DHAVE_SSL";
AC_SUBST(SSL_CXXFLAGS)
SSL_CFLAGS="-I$ssldir/include/openssl -DHAVE_SSL";
SSL_CXXFLAGS="-I$ssldir/include/openssl -DHAVE_SSL";
break;
fi
if test -f "$dir/include/ssl.h"; then
found_ssl="yes";
SSL_CFLAGS="$CFLAGS -I$ssldir/include/ -DHAVE_SSL";
AC_SUBST(SSL_CFLAGS)
SSL_CXXFLAGS="$CXXFLAGS -I$ssldir/include/ -DHAVE_SSL";
AC_SUBST(SSL_CXXFLAGS)
SSL_CFLAGS="-I$ssldir/include/ -DHAVE_SSL";
SSL_CXXFLAGS="-I$ssldir/include/ -DHAVE_SSL";
break
fi
done
@ -70,12 +66,14 @@ dnl [ AC_MSG_RESULT(yes)
AC_MSG_ERROR(Cannot find ssl libraries)
else
printf "OpenSSL found in $ssldir\n";
SSL_LIBS="$LIBS -lssl -lcrypto";
AC_SUBST(SSL_LIBS)
SSL_LDFLAGS="$LDFLAGS -L$ssldir/lib";
AC_SUBST(SSL_LDFLAGS)
SSL_LIBS="-lssl -lcrypto";
SSL_LDFLAGS="-L$ssldir/lib";
HAVE_SSL=yes
fi
AC_SUBST(SSL_CFLAGS)
AC_SUBST(SSL_CXXFLAGS)
AC_SUBST(SSL_LIBS)
AC_SUBST(SSL_LDFLAGS)
AC_SUBST(HAVE_SSL)
dnl ],
dnl [