]> git.ipfire.org Git - thirdparty/ldns.git/commitdiff
Move python libraries to separate options in ldns-config 112/head
authorPetr Menšík <pemensik@redhat.com>
Thu, 8 Oct 2020 07:25:59 +0000 (09:25 +0200)
committerPetr Menšík <pemensik@redhat.com>
Thu, 8 Oct 2020 07:25:59 +0000 (09:25 +0200)
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

index ffb2c57f3471c9b87f9ab4eed0bcdb12dc452c56..623f77e54ea4a4b955885dfb79457d189c06a0e2 100755 (executable)
@@ -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