From 3f6b46dee929304cc34c0bcca9c222a4486a2845 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Petr=20Men=C5=A1=C3=ADk?= Date: Thu, 8 Oct 2020 09:25:59 +0200 Subject: [PATCH] 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. --- packaging/ldns-config.in | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) 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 -- 2.47.3