|
|
b747fc |
From 3a006cd795855bf2cad86e0e86cd485d27548f36 Mon Sep 17 00:00:00 2001
|
|
|
b747fc |
From: Tomas Hozza <thozza@redhat.com>
|
|
|
b747fc |
Date: Fri, 19 Jul 2013 12:11:44 +0200
|
|
|
b747fc |
Subject: [PATCH] Make ldns-config multilib clean
|
|
|
b747fc |
|
|
|
b747fc |
Signed-off-by: Tomas Hozza <thozza@redhat.com>
|
|
|
b747fc |
---
|
|
|
b747fc |
configure | 3 +++
|
|
|
b747fc |
packaging/ldns-config.1 | 4 ++++
|
|
|
b747fc |
packaging/ldns-config.in | 26 +++++++++++++++++++++-----
|
|
|
b747fc |
3 files changed, 28 insertions(+), 5 deletions(-)
|
|
|
b747fc |
|
|
|
b747fc |
diff --git a/configure b/configure
|
|
|
b747fc |
index be312d1..ec8d551 100755
|
|
|
b747fc |
--- a/configure
|
|
|
b747fc |
+++ b/configure
|
|
|
b747fc |
@@ -674,6 +674,7 @@ PYTHON_SITE_PKG
|
|
|
b747fc |
PYTHON_LDFLAGS
|
|
|
b747fc |
PYTHON_CPPFLAGS
|
|
|
b747fc |
PYTHON
|
|
|
b747fc |
+PYTHON_LIB
|
|
|
b747fc |
PYTHON_VERSION
|
|
|
b747fc |
UNINSTALL_CONFIG_MANPAGE
|
|
|
b747fc |
UNINSTALL_CONFIG
|
|
|
b747fc |
@@ -6356,6 +6357,7 @@ EOD
|
|
|
b747fc |
# use the official shared library
|
|
|
b747fc |
ac_python_library=`echo "$ac_python_library" | sed "s/^lib//"`
|
|
|
b747fc |
PYTHON_LDFLAGS="-L$ac_python_libdir -l$ac_python_library"
|
|
|
b747fc |
+ PYTHON_LIB="$ac_python_library"
|
|
|
b747fc |
else
|
|
|
b747fc |
# old way: use libpython from python_configdir
|
|
|
b747fc |
ac_python_libdir=`$PYTHON -c \
|
|
|
b747fc |
@@ -6363,6 +6365,7 @@ EOD
|
|
|
b747fc |
import os; \
|
|
|
b747fc |
print (os.path.join(f(plat_specific=1, standard_lib=1), 'config'));"`
|
|
|
b747fc |
PYTHON_LDFLAGS="-L$ac_python_libdir -lpython$ac_python_version"
|
|
|
b747fc |
+ PYTHON_LIB="python$ac_python_version"
|
|
|
b747fc |
fi
|
|
|
b747fc |
|
|
|
b747fc |
if test -z "PYTHON_LDFLAGS"; then
|
|
|
b747fc |
diff --git a/packaging/ldns-config.1 b/packaging/ldns-config.1
|
|
|
b747fc |
index c5a00a1..1e4ff93 100644
|
|
|
b747fc |
--- a/packaging/ldns-config.1
|
|
|
b747fc |
+++ b/packaging/ldns-config.1
|
|
|
b747fc |
@@ -23,6 +23,10 @@ Show the C compiler flags needed to compile with ldns
|
|
|
b747fc |
Show the flags to be used to link with ldns
|
|
|
b747fc |
|
|
|
b747fc |
.TP
|
|
|
b747fc |
+\fB--libs_sec\fR
|
|
|
b747fc |
+Show the flags to be used to link with ldns compiled for secondary architecture.
|
|
|
b747fc |
+
|
|
|
b747fc |
+.TP
|
|
|
b747fc |
\fB--version\fR
|
|
|
b747fc |
Shows the version of the installed ldns library
|
|
|
b747fc |
|
|
|
b747fc |
diff --git a/packaging/ldns-config.in b/packaging/ldns-config.in
|
|
|
b747fc |
index b728ba5..e34051f 100755
|
|
|
b747fc |
--- a/packaging/ldns-config.in
|
|
|
b747fc |
+++ b/packaging/ldns-config.in
|
|
|
b747fc |
@@ -3,12 +3,24 @@
|
|
|
b747fc |
prefix="@prefix@"
|
|
|
b747fc |
exec_prefix="@exec_prefix@"
|
|
|
b747fc |
VERSION="@PACKAGE_VERSION@"
|
|
|
b747fc |
-CFLAGS="@CFLAGS@"
|
|
|
b747fc |
-CPPFLAGS="@CPPFLAGS@ @LIBSSL_CPPFLAGS@ @PYTHON_CPPFLAGS@"
|
|
|
b747fc |
-LDFLAGS="@LDFLAGS@ @LIBSSL_LDFLAGS@ @PYTHON_LDFLAGS@"
|
|
|
b747fc |
LIBS="@LIBS@ @LIBSSL_LIBS@"
|
|
|
b747fc |
-LIBDIR="@libdir@"
|
|
|
b747fc |
INCLUDEDIR="@includedir@"
|
|
|
b747fc |
+ARCH="`uname -m`"
|
|
|
b747fc |
+
|
|
|
b747fc |
+case $ARCH in
|
|
|
b747fc |
+ x86_64 | amd64 | sparc64 | s390x | ppc64)
|
|
|
b747fc |
+
|
|
|
b747fc |
+ LIBDIR="/usr/lib64"
|
|
|
b747fc |
+ LIBDIR_SEC="/usr/lib"
|
|
|
b747fc |
+ ;;
|
|
|
b747fc |
+ * )
|
|
|
b747fc |
+ LIBDIR="/usr/lib"
|
|
|
b747fc |
+ LIBDIR_SEC="usr/lib64"
|
|
|
b747fc |
+ ;;
|
|
|
b747fc |
+esac
|
|
|
b747fc |
+
|
|
|
b747fc |
+LDFLAGS="@LDFLAGS@ @LIBSSL_LDFLAGS@ -L$LIBDIR -l@PYTHON_LIB@"
|
|
|
b747fc |
+LDFLAGS_SEC="@LDFLAGS@ @LIBSSL_LDFLAGS@ -L$LIBDIR_SEC -l@PYTHON_LIB@"
|
|
|
b747fc |
|
|
|
b747fc |
for arg in $@
|
|
|
b747fc |
do
|
|
|
b747fc |
@@ -20,9 +32,13 @@ do
|
|
|
b747fc |
then
|
|
|
b747fc |
echo "${LDFLAGS} -L${LIBDIR} ${LIBS} -lldns"
|
|
|
b747fc |
fi
|
|
|
b747fc |
+ if [ $arg = "--libs_sec" ]
|
|
|
b747fc |
+ then
|
|
|
b747fc |
+ echo "${LDFLAGS_SEC} -L${LIBDIR_SEC} ${LIBS} -lldns"
|
|
|
b747fc |
+ fi
|
|
|
b747fc |
if [ $arg = "-h" ] || [ $arg = "--help" ]
|
|
|
b747fc |
then
|
|
|
b747fc |
- echo "Usage: $0 [--cflags] [--libs] [--version]"
|
|
|
b747fc |
+ echo "Usage: $0 [--cflags] [--libs] [--libs_sec] [--version]"
|
|
|
b747fc |
fi
|
|
|
b747fc |
if [ $arg = "--version" ]
|
|
|
b747fc |
then
|
|
|
b747fc |
--
|
|
|
b747fc |
1.8.3.1
|
|
|
b747fc |
|