|
|
dad965 |
From b5aab36d41f374eddb0f66f28f251588f53a1e1e Mon Sep 17 00:00:00 2001
|
|
|
dad965 |
From: Wouter Wijngaards <wouter@nlnetlabs.nl>
|
|
|
dad965 |
Date: Wed, 27 Jun 2018 05:46:36 +0000
|
|
|
dad965 |
Subject: [PATCH 1/2] - #4109: Fix that package config depends on python
|
|
|
dad965 |
unconditionally.
|
|
|
dad965 |
|
|
|
dad965 |
git-svn-id: file:///svn/unbound/trunk@4757 be551aaa-1e26-0410-a405-d3ace91eadb9
|
|
|
dad965 |
---
|
|
|
dad965 |
configure | 257 +++++++++++++++++++++++++++++++----------------------------
|
|
|
dad965 |
configure.ac | 5 +-
|
|
|
dad965 |
2 files changed, 137 insertions(+), 125 deletions(-)
|
|
|
dad965 |
|
|
|
dad965 |
diff --git a/configure b/configure
|
|
|
dad965 |
index 3f1c372a..2a1687ae 100755
|
|
|
dad965 |
--- a/configure
|
|
|
dad965 |
+++ b/configure
|
|
|
dad965 |
@@ -670,9 +670,6 @@ SYSTEMD_DAEMON_LIBS
|
|
|
dad965 |
SYSTEMD_DAEMON_CFLAGS
|
|
|
dad965 |
SYSTEMD_LIBS
|
|
|
dad965 |
SYSTEMD_CFLAGS
|
|
|
dad965 |
-PKG_CONFIG_LIBDIR
|
|
|
dad965 |
-PKG_CONFIG_PATH
|
|
|
dad965 |
-PKG_CONFIG
|
|
|
dad965 |
staticexe
|
|
|
dad965 |
PC_LIBEVENT_DEPENDENCY
|
|
|
dad965 |
UNBOUND_EVENT_UNINSTALL
|
|
|
dad965 |
@@ -697,6 +694,9 @@ swig
|
|
|
dad965 |
SWIG_LIB
|
|
|
dad965 |
SWIG
|
|
|
dad965 |
PC_PY_DEPENDENCY
|
|
|
dad965 |
+PKG_CONFIG_LIBDIR
|
|
|
dad965 |
+PKG_CONFIG_PATH
|
|
|
dad965 |
+PKG_CONFIG
|
|
|
dad965 |
PY_MAJOR_VERSION
|
|
|
dad965 |
PYTHON_SITE_PKG
|
|
|
dad965 |
PYTHON_LDFLAGS
|
|
|
dad965 |
@@ -16930,7 +16930,136 @@ $as_echo "#define HAVE_PYTHON 1" >>confdefs.h
|
|
|
dad965 |
CPPFLAGS="$PYTHON_CPPFLAGS"
|
|
|
dad965 |
fi
|
|
|
dad965 |
ub_have_python=yes
|
|
|
dad965 |
- PC_PY_DEPENDENCY="python"
|
|
|
dad965 |
+
|
|
|
dad965 |
+
|
|
|
dad965 |
+
|
|
|
dad965 |
+
|
|
|
dad965 |
+
|
|
|
dad965 |
+
|
|
|
dad965 |
+
|
|
|
dad965 |
+if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
|
|
|
dad965 |
+ if test -n "$ac_tool_prefix"; then
|
|
|
dad965 |
+ # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
|
|
|
dad965 |
+set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
|
|
|
dad965 |
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
|
|
|
dad965 |
+$as_echo_n "checking for $ac_word... " >&6; }
|
|
|
dad965 |
+if ${ac_cv_path_PKG_CONFIG+:} false; then :
|
|
|
dad965 |
+ $as_echo_n "(cached) " >&6
|
|
|
dad965 |
+else
|
|
|
dad965 |
+ case $PKG_CONFIG in
|
|
|
dad965 |
+ [\\/]* | ?:[\\/]*)
|
|
|
dad965 |
+ ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
|
|
|
dad965 |
+ ;;
|
|
|
dad965 |
+ *)
|
|
|
dad965 |
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
|
|
|
dad965 |
+for as_dir in $PATH
|
|
|
dad965 |
+do
|
|
|
dad965 |
+ IFS=$as_save_IFS
|
|
|
dad965 |
+ test -z "$as_dir" && as_dir=.
|
|
|
dad965 |
+ for ac_exec_ext in '' $ac_executable_extensions; do
|
|
|
dad965 |
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
|
|
|
dad965 |
+ ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
|
|
|
dad965 |
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
|
|
|
dad965 |
+ break 2
|
|
|
dad965 |
+ fi
|
|
|
dad965 |
+done
|
|
|
dad965 |
+ done
|
|
|
dad965 |
+IFS=$as_save_IFS
|
|
|
dad965 |
+
|
|
|
dad965 |
+ ;;
|
|
|
dad965 |
+esac
|
|
|
dad965 |
+fi
|
|
|
dad965 |
+PKG_CONFIG=$ac_cv_path_PKG_CONFIG
|
|
|
dad965 |
+if test -n "$PKG_CONFIG"; then
|
|
|
dad965 |
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
|
|
|
dad965 |
+$as_echo "$PKG_CONFIG" >&6; }
|
|
|
dad965 |
+else
|
|
|
dad965 |
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
|
|
dad965 |
+$as_echo "no" >&6; }
|
|
|
dad965 |
+fi
|
|
|
dad965 |
+
|
|
|
dad965 |
+
|
|
|
dad965 |
+fi
|
|
|
dad965 |
+if test -z "$ac_cv_path_PKG_CONFIG"; then
|
|
|
dad965 |
+ ac_pt_PKG_CONFIG=$PKG_CONFIG
|
|
|
dad965 |
+ # Extract the first word of "pkg-config", so it can be a program name with args.
|
|
|
dad965 |
+set dummy pkg-config; ac_word=$2
|
|
|
dad965 |
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
|
|
|
dad965 |
+$as_echo_n "checking for $ac_word... " >&6; }
|
|
|
dad965 |
+if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
|
|
|
dad965 |
+ $as_echo_n "(cached) " >&6
|
|
|
dad965 |
+else
|
|
|
dad965 |
+ case $ac_pt_PKG_CONFIG in
|
|
|
dad965 |
+ [\\/]* | ?:[\\/]*)
|
|
|
dad965 |
+ ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
|
|
|
dad965 |
+ ;;
|
|
|
dad965 |
+ *)
|
|
|
dad965 |
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
|
|
|
dad965 |
+for as_dir in $PATH
|
|
|
dad965 |
+do
|
|
|
dad965 |
+ IFS=$as_save_IFS
|
|
|
dad965 |
+ test -z "$as_dir" && as_dir=.
|
|
|
dad965 |
+ for ac_exec_ext in '' $ac_executable_extensions; do
|
|
|
dad965 |
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
|
|
|
dad965 |
+ ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
|
|
|
dad965 |
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
|
|
|
dad965 |
+ break 2
|
|
|
dad965 |
+ fi
|
|
|
dad965 |
+done
|
|
|
dad965 |
+ done
|
|
|
dad965 |
+IFS=$as_save_IFS
|
|
|
dad965 |
+
|
|
|
dad965 |
+ ;;
|
|
|
dad965 |
+esac
|
|
|
dad965 |
+fi
|
|
|
dad965 |
+ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
|
|
|
dad965 |
+if test -n "$ac_pt_PKG_CONFIG"; then
|
|
|
dad965 |
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
|
|
|
dad965 |
+$as_echo "$ac_pt_PKG_CONFIG" >&6; }
|
|
|
dad965 |
+else
|
|
|
dad965 |
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
|
|
dad965 |
+$as_echo "no" >&6; }
|
|
|
dad965 |
+fi
|
|
|
dad965 |
+
|
|
|
dad965 |
+ if test "x$ac_pt_PKG_CONFIG" = x; then
|
|
|
dad965 |
+ PKG_CONFIG=""
|
|
|
dad965 |
+ else
|
|
|
dad965 |
+ case $cross_compiling:$ac_tool_warned in
|
|
|
dad965 |
+yes:)
|
|
|
dad965 |
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
|
|
|
dad965 |
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
|
|
|
dad965 |
+ac_tool_warned=yes ;;
|
|
|
dad965 |
+esac
|
|
|
dad965 |
+ PKG_CONFIG=$ac_pt_PKG_CONFIG
|
|
|
dad965 |
+ fi
|
|
|
dad965 |
+else
|
|
|
dad965 |
+ PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
|
|
|
dad965 |
+fi
|
|
|
dad965 |
+
|
|
|
dad965 |
+fi
|
|
|
dad965 |
+if test -n "$PKG_CONFIG"; then
|
|
|
dad965 |
+ _pkg_min_version=0.9.0
|
|
|
dad965 |
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
|
|
|
dad965 |
+$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
|
|
|
dad965 |
+ if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
|
|
|
dad965 |
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
|
|
dad965 |
+$as_echo "yes" >&6; }
|
|
|
dad965 |
+ else
|
|
|
dad965 |
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
|
|
dad965 |
+$as_echo "no" >&6; }
|
|
|
dad965 |
+ PKG_CONFIG=""
|
|
|
dad965 |
+ fi
|
|
|
dad965 |
+fi
|
|
|
dad965 |
+ if test -n "$PKG_CONFIG" && \
|
|
|
dad965 |
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\"python\${PY_MAJOR_VERSION}\"\""; } >&5
|
|
|
dad965 |
+ ($PKG_CONFIG --exists --print-errors ""python${PY_MAJOR_VERSION}"") 2>&5
|
|
|
dad965 |
+ ac_status=$?
|
|
|
dad965 |
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
|
|
|
dad965 |
+ test $ac_status = 0; }; then
|
|
|
dad965 |
+ PC_PY_DEPENDENCY="python${PY_MAJOR_VERSION}"
|
|
|
dad965 |
+else
|
|
|
dad965 |
+ PC_PY_DEPENDENCY="python"
|
|
|
dad965 |
+fi
|
|
|
dad965 |
|
|
|
dad965 |
|
|
|
dad965 |
# Check for SWIG
|
|
|
dad965 |
@@ -18960,126 +19089,6 @@ else
|
|
|
dad965 |
fi
|
|
|
dad965 |
|
|
|
dad965 |
have_systemd=no
|
|
|
dad965 |
-
|
|
|
dad965 |
-
|
|
|
dad965 |
-
|
|
|
dad965 |
-
|
|
|
dad965 |
-
|
|
|
dad965 |
-
|
|
|
dad965 |
-
|
|
|
dad965 |
-if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
|
|
|
dad965 |
- if test -n "$ac_tool_prefix"; then
|
|
|
dad965 |
- # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
|
|
|
dad965 |
-set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
|
|
|
dad965 |
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
|
|
|
dad965 |
-$as_echo_n "checking for $ac_word... " >&6; }
|
|
|
dad965 |
-if ${ac_cv_path_PKG_CONFIG+:} false; then :
|
|
|
dad965 |
- $as_echo_n "(cached) " >&6
|
|
|
dad965 |
-else
|
|
|
dad965 |
- case $PKG_CONFIG in
|
|
|
dad965 |
- [\\/]* | ?:[\\/]*)
|
|
|
dad965 |
- ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
|
|
|
dad965 |
- ;;
|
|
|
dad965 |
- *)
|
|
|
dad965 |
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
|
|
|
dad965 |
-for as_dir in $PATH
|
|
|
dad965 |
-do
|
|
|
dad965 |
- IFS=$as_save_IFS
|
|
|
dad965 |
- test -z "$as_dir" && as_dir=.
|
|
|
dad965 |
- for ac_exec_ext in '' $ac_executable_extensions; do
|
|
|
dad965 |
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
|
|
|
dad965 |
- ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
|
|
|
dad965 |
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
|
|
|
dad965 |
- break 2
|
|
|
dad965 |
- fi
|
|
|
dad965 |
-done
|
|
|
dad965 |
- done
|
|
|
dad965 |
-IFS=$as_save_IFS
|
|
|
dad965 |
-
|
|
|
dad965 |
- ;;
|
|
|
dad965 |
-esac
|
|
|
dad965 |
-fi
|
|
|
dad965 |
-PKG_CONFIG=$ac_cv_path_PKG_CONFIG
|
|
|
dad965 |
-if test -n "$PKG_CONFIG"; then
|
|
|
dad965 |
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
|
|
|
dad965 |
-$as_echo "$PKG_CONFIG" >&6; }
|
|
|
dad965 |
-else
|
|
|
dad965 |
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
|
|
dad965 |
-$as_echo "no" >&6; }
|
|
|
dad965 |
-fi
|
|
|
dad965 |
-
|
|
|
dad965 |
-
|
|
|
dad965 |
-fi
|
|
|
dad965 |
-if test -z "$ac_cv_path_PKG_CONFIG"; then
|
|
|
dad965 |
- ac_pt_PKG_CONFIG=$PKG_CONFIG
|
|
|
dad965 |
- # Extract the first word of "pkg-config", so it can be a program name with args.
|
|
|
dad965 |
-set dummy pkg-config; ac_word=$2
|
|
|
dad965 |
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
|
|
|
dad965 |
-$as_echo_n "checking for $ac_word... " >&6; }
|
|
|
dad965 |
-if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
|
|
|
dad965 |
- $as_echo_n "(cached) " >&6
|
|
|
dad965 |
-else
|
|
|
dad965 |
- case $ac_pt_PKG_CONFIG in
|
|
|
dad965 |
- [\\/]* | ?:[\\/]*)
|
|
|
dad965 |
- ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
|
|
|
dad965 |
- ;;
|
|
|
dad965 |
- *)
|
|
|
dad965 |
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
|
|
|
dad965 |
-for as_dir in $PATH
|
|
|
dad965 |
-do
|
|
|
dad965 |
- IFS=$as_save_IFS
|
|
|
dad965 |
- test -z "$as_dir" && as_dir=.
|
|
|
dad965 |
- for ac_exec_ext in '' $ac_executable_extensions; do
|
|
|
dad965 |
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
|
|
|
dad965 |
- ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
|
|
|
dad965 |
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
|
|
|
dad965 |
- break 2
|
|
|
dad965 |
- fi
|
|
|
dad965 |
-done
|
|
|
dad965 |
- done
|
|
|
dad965 |
-IFS=$as_save_IFS
|
|
|
dad965 |
-
|
|
|
dad965 |
- ;;
|
|
|
dad965 |
-esac
|
|
|
dad965 |
-fi
|
|
|
dad965 |
-ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
|
|
|
dad965 |
-if test -n "$ac_pt_PKG_CONFIG"; then
|
|
|
dad965 |
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
|
|
|
dad965 |
-$as_echo "$ac_pt_PKG_CONFIG" >&6; }
|
|
|
dad965 |
-else
|
|
|
dad965 |
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
|
|
dad965 |
-$as_echo "no" >&6; }
|
|
|
dad965 |
-fi
|
|
|
dad965 |
-
|
|
|
dad965 |
- if test "x$ac_pt_PKG_CONFIG" = x; then
|
|
|
dad965 |
- PKG_CONFIG=""
|
|
|
dad965 |
- else
|
|
|
dad965 |
- case $cross_compiling:$ac_tool_warned in
|
|
|
dad965 |
-yes:)
|
|
|
dad965 |
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
|
|
|
dad965 |
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
|
|
|
dad965 |
-ac_tool_warned=yes ;;
|
|
|
dad965 |
-esac
|
|
|
dad965 |
- PKG_CONFIG=$ac_pt_PKG_CONFIG
|
|
|
dad965 |
- fi
|
|
|
dad965 |
-else
|
|
|
dad965 |
- PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
|
|
|
dad965 |
-fi
|
|
|
dad965 |
-
|
|
|
dad965 |
-fi
|
|
|
dad965 |
-if test -n "$PKG_CONFIG"; then
|
|
|
dad965 |
- _pkg_min_version=0.9.0
|
|
|
dad965 |
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
|
|
|
dad965 |
-$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
|
|
|
dad965 |
- if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
|
|
|
dad965 |
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
|
|
dad965 |
-$as_echo "yes" >&6; }
|
|
|
dad965 |
- else
|
|
|
dad965 |
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
|
|
dad965 |
-$as_echo "no" >&6; }
|
|
|
dad965 |
- PKG_CONFIG=""
|
|
|
dad965 |
- fi
|
|
|
dad965 |
-fi
|
|
|
dad965 |
if test "x$enable_systemd" != xno; then :
|
|
|
dad965 |
|
|
|
dad965 |
|
|
|
dad965 |
diff --git a/configure.ac b/configure.ac
|
|
|
dad965 |
index 1828253c..b2c95d1a 100644
|
|
|
dad965 |
--- a/configure.ac
|
|
|
dad965 |
+++ b/configure.ac
|
|
|
dad965 |
@@ -586,7 +586,10 @@ if test x_$ub_test_python != x_no; then
|
|
|
dad965 |
CPPFLAGS="$PYTHON_CPPFLAGS"
|
|
|
dad965 |
fi
|
|
|
dad965 |
ub_have_python=yes
|
|
|
dad965 |
- PC_PY_DEPENDENCY="python"
|
|
|
dad965 |
+ PKG_PROG_PKG_CONFIG
|
|
|
dad965 |
+ PKG_CHECK_EXISTS(["python${PY_MAJOR_VERSION}"],
|
|
|
dad965 |
+ [PC_PY_DEPENDENCY="python${PY_MAJOR_VERSION}"],
|
|
|
dad965 |
+ [PC_PY_DEPENDENCY="python"])
|
|
|
dad965 |
AC_SUBST(PC_PY_DEPENDENCY)
|
|
|
dad965 |
|
|
|
dad965 |
# Check for SWIG
|
|
|
dad965 |
--
|
|
|
dad965 |
2.14.4
|
|
|
dad965 |
|