]> sourceware.org Git - lvm2.git/commitdiff
configure: Use python-config if python2-config not found.
authorAlasdair G Kergon <agk@redhat.com>
Thu, 18 Feb 2016 02:10:35 +0000 (02:10 +0000)
committerAlasdair G Kergon <agk@redhat.com>
Thu, 18 Feb 2016 02:10:35 +0000 (02:10 +0000)
Assume that's good enough for older systems.

configure
configure.in

index 93e000331a0160500b414d927efe2bd3f6202793..1d742ecf11d145642c8b410c686513705608a625 100755 (executable)
--- a/configure
+++ b/configure
@@ -12820,6 +12820,104 @@ yes:)
 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
 ac_tool_warned=yes ;;
+esac
+    PYTHON2_CONFIG=$ac_pt_PYTHON2_CONFIG
+  fi
+else
+  PYTHON2_CONFIG="$ac_cv_path_PYTHON2_CONFIG"
+fi
+
+       test -z "$PYTHON2_CONFIG" && if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}python-config", so it can be a program name with args.
+set dummy ${ac_tool_prefix}python-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_PYTHON2_CONFIG+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $PYTHON2_CONFIG in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_PYTHON2_CONFIG="$PYTHON2_CONFIG" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_PYTHON2_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+PYTHON2_CONFIG=$ac_cv_path_PYTHON2_CONFIG
+if test -n "$PYTHON2_CONFIG"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON2_CONFIG" >&5
+$as_echo "$PYTHON2_CONFIG" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_path_PYTHON2_CONFIG"; then
+  ac_pt_PYTHON2_CONFIG=$PYTHON2_CONFIG
+  # Extract the first word of "python-config", so it can be a program name with args.
+set dummy python-config; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_ac_pt_PYTHON2_CONFIG+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $ac_pt_PYTHON2_CONFIG in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_ac_pt_PYTHON2_CONFIG="$ac_pt_PYTHON2_CONFIG" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_ac_pt_PYTHON2_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+ac_pt_PYTHON2_CONFIG=$ac_cv_path_ac_pt_PYTHON2_CONFIG
+if test -n "$ac_pt_PYTHON2_CONFIG"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PYTHON2_CONFIG" >&5
+$as_echo "$ac_pt_PYTHON2_CONFIG" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_pt_PYTHON2_CONFIG" = x; then
+    PYTHON2_CONFIG=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
 esac
     PYTHON2_CONFIG=$ac_pt_PYTHON2_CONFIG
   fi
index 22ba812641d7ce685cf622ce28cad6f3cb8803df..7a5aa5d3e6000093e8c39b7d979209f7071376e4 100644 (file)
@@ -1476,6 +1476,7 @@ if test "$PYTHON2_BINDINGS" = yes; then
        AC_PATH_TOOL(PYTHON2, python2)
        test -z "$PYTHON2" && AC_MSG_ERROR([python2 is required for --enable-python2_bindings but cannot be found])
        AC_PATH_TOOL(PYTHON2_CONFIG, python2-config)
+       test -z "$PYTHON2_CONFIG" && AC_PATH_TOOL(PYTHON2_CONFIG, python-config)
        test -z "$PYTHON2_CONFIG" && AC_MSG_ERROR([python headers are required for --enable-python2_bindings but cannot be found])
        PYTHON2_INCDIRS=`"$PYTHON2_CONFIG" --includes`
        PYTHON2_LIBDIRS=`"$PYTHON2_CONFIG" --libs`
This page took 0.05516 seconds and 5 git commands to generate.