From: Petr Menšík Date: Thu, 8 Oct 2020 07:25:59 +0000 (+0200) Subject: Move python libraries to separate options in ldns-config X-Git-Tag: 1.8.0-rc.1~50^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F112%2Fhead;p=thirdparty%2Fldns.git Move python libraries to separate options in ldns-config Libraries provided by ldns-config --libs differs from pkg-config --libs ldns, when python compilation is enabled. It may bring undesired dependencies to consuming software. Openssh is good example. Move python libraries to --python-libs, in case it is required. Common C build do not require python libraries at all. --- diff --git a/packaging/ldns-config.in b/packaging/ldns-config.in index ffb2c57f..623f77e5 100755 --- a/packaging/ldns-config.in +++ b/packaging/ldns-config.in @@ -4,26 +4,37 @@ prefix="@prefix@" exec_prefix="@exec_prefix@" VERSION="@PACKAGE_VERSION@" CFLAGS="@CFLAGS@" -CPPFLAGS="@CPPFLAGS@ @LIBSSL_CPPFLAGS@ @PYTHON_CPPFLAGS@" -LDFLAGS="@LDFLAGS@ @LIBSSL_LDFLAGS@ @PYTHON_LDFLAGS@" +CPPFLAGS="@CPPFLAGS@ @LIBSSL_CPPFLAGS@" +LDFLAGS="@LDFLAGS@ @LIBSSL_LDFLAGS@" +PYTHON_CPPFLAGS="@PYTHON_CPPFLAGS@" +PYTHON_LDFLAGS="@PYTHON_LDFLAGS@" LIBS="@LIBS@ @LIBSSL_LIBS@" LIBDIR="@libdir@" INCLUDEDIR="@includedir@" LIBVERSION="@VERSION_INFO@" + for arg in $@ do if [ $arg = "--cflags" ] then echo "-I${INCLUDEDIR}" fi + if [ $arg = "--python-cflags" ] + then + echo "${PYTHON_CPPFLAGS} -I${INCLUDEDIR}" + fi if [ $arg = "--libs" ] then echo "${LDFLAGS} -L${LIBDIR} ${LIBS} -lldns" fi + if [ $arg = "--python-libs" ] + then + echo "${LDFLAGS} ${PYTHON_LDFLAGS} -L${LIBDIR} ${LIBS} -lldns" + fi if [ $arg = "-h" ] || [ $arg = "--help" ] then - echo "Usage: $0 [--cflags] [--libs] [--version]" + echo "Usage: $0 [--cflags] [--python-cflags] [--libs] [--python-libs] [--version]" fi if [ $arg = "--version" ] then