Skip to content

Commit

Permalink
PYTHON_BIN -> PYTHON3_BIN so configure doesn't pull the wrong value f…
Browse files Browse the repository at this point in the history
…rom cache
  • Loading branch information
aren authored and alandekok committed Oct 31, 2019
1 parent 4cfced5 commit dbe05c0
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 26 deletions.
36 changes: 18 additions & 18 deletions src/modules/rlm_python3/configure
Original file line number Diff line number Diff line change
Expand Up @@ -588,7 +588,7 @@ LIBOBJS
targetname
mod_cflags
mod_ldflags
PYTHON_BIN
PYTHON3_BIN
CPP
OBJEXT
EXEEXT
Expand Down Expand Up @@ -2822,7 +2822,7 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
ac_compiler_gnu=$ac_cv_c_compiler_gnu
PYTHON_BIN=
PYTHON3_BIN=
# Check whether --with-rlm-python3-bin was given.
if test "${with_rlm_python3_bin+set}" = set; then :
Expand All @@ -2833,25 +2833,25 @@ if test "${with_rlm_python3_bin+set}" = set; then :
yes)
;;
*)
PYTHON_BIN="$withval"
PYTHON3_BIN="$withval"
;;
esac
fi
if test "x$PYTHON_BIN" = x; then
if test "x$PYTHON3_BIN" = x; then
for ac_prog in python3
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; 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_prog_PYTHON_BIN+:} false; then :
if ${ac_cv_prog_PYTHON3_BIN+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$PYTHON_BIN"; then
ac_cv_prog_PYTHON_BIN="$PYTHON_BIN" # Let the user override the test.
if test -n "$PYTHON3_BIN"; then
ac_cv_prog_PYTHON3_BIN="$PYTHON3_BIN" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
as_dummy="${PATH}:/usr/bin:/usr/local/bin"
Expand All @@ -2861,7 +2861,7 @@ do
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_prog_PYTHON_BIN="$ac_prog"
ac_cv_prog_PYTHON3_BIN="$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
Expand All @@ -2871,23 +2871,23 @@ IFS=$as_save_IFS
fi
fi
PYTHON_BIN=$ac_cv_prog_PYTHON_BIN
if test -n "$PYTHON_BIN"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_BIN" >&5
$as_echo "$PYTHON_BIN" >&6; }
PYTHON3_BIN=$ac_cv_prog_PYTHON3_BIN
if test -n "$PYTHON3_BIN"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON3_BIN" >&5
$as_echo "$PYTHON3_BIN" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
test -n "$PYTHON_BIN" && break
test -n "$PYTHON3_BIN" && break
done
test -n "$PYTHON_BIN" || PYTHON_BIN="not-found"
test -n "$PYTHON3_BIN" || PYTHON3_BIN="not-found"
fi
if test "x$PYTHON_BIN" = "xnot-found"; then
if test "x$PYTHON3_BIN" = "xnot-found"; then
fail="python-binary"
fi
Expand Down Expand Up @@ -2928,15 +2928,15 @@ fi
if test x$fail = x; then
PY_PREFIX=`${PYTHON_BIN} -c 'import sys ; print(sys.prefix)'`
PY_PREFIX=`${PYTHON3_BIN} -c 'import sys ; print(sys.prefix)'`
{ $as_echo "$as_me:${as_lineno-$LINENO}: Python sys.prefix \"${PY_PREFIX}\"" >&5
$as_echo "$as_me: Python sys.prefix \"${PY_PREFIX}\"" >&6;}
PY_EXEC_PREFIX=`${PYTHON_BIN} -c 'import sys ; print(sys.exec_prefix)'`
PY_EXEC_PREFIX=`${PYTHON3_BIN} -c 'import sys ; print(sys.exec_prefix)'`
{ $as_echo "$as_me:${as_lineno-$LINENO}: Python sys.exec_prefix \"${PY_EXEC_PREFIX}\"" >&5
$as_echo "$as_me: Python sys.exec_prefix \"${PY_EXEC_PREFIX}\"" >&6;}
PY_SYS_VERSION=`${PYTHON_BIN} -c 'import sys ; print(sys.version[0:3])'`
PY_SYS_VERSION=`${PYTHON3_BIN} -c 'import sys ; print(sys.version[0:3])'`
{ $as_echo "$as_me:${as_lineno-$LINENO}: Python sys.version \"${PY_SYS_VERSION}\"" >&5
$as_echo "$as_me: Python sys.version \"${PY_SYS_VERSION}\"" >&6;}
Expand Down
16 changes: 8 additions & 8 deletions src/modules/rlm_python3/configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ if test x$with_[]modname != xno; then
AC_PROG_CPP

dnl extra argument: --with-rlm-python3-bin
PYTHON_BIN=
PYTHON3_BIN=
AC_ARG_WITH(rlm-python3-bin,
[ --with-rlm-python3-bin=PATH Path to python3 binary []],
[ case "$withval" in
Expand All @@ -19,16 +19,16 @@ if test x$with_[]modname != xno; then
yes)
;;
*)
PYTHON_BIN="$withval"
PYTHON3_BIN="$withval"
;;
esac ]
)

if test "x$PYTHON_BIN" = x; then
AC_CHECK_PROGS(PYTHON_BIN, [ python3 ], not-found, [${PATH}:/usr/bin:/usr/local/bin])
if test "x$PYTHON3_BIN" = x; then
AC_CHECK_PROGS(PYTHON3_BIN, [ python3 ], not-found, [${PATH}:/usr/bin:/usr/local/bin])
fi

if test "x$PYTHON_BIN" = "xnot-found"; then
if test "x$PYTHON3_BIN" = "xnot-found"; then
fail="python-binary"
fi

Expand Down Expand Up @@ -65,13 +65,13 @@ if test x$with_[]modname != xno; then
)

if test x$fail = x; then
PY_PREFIX=`${PYTHON_BIN} -c 'import sys ; print(sys.prefix)'`
PY_PREFIX=`${PYTHON3_BIN} -c 'import sys ; print(sys.prefix)'`
AC_MSG_NOTICE([Python sys.prefix \"${PY_PREFIX}\"])

PY_EXEC_PREFIX=`${PYTHON_BIN} -c 'import sys ; print(sys.exec_prefix)'`
PY_EXEC_PREFIX=`${PYTHON3_BIN} -c 'import sys ; print(sys.exec_prefix)'`
AC_MSG_NOTICE([Python sys.exec_prefix \"${PY_EXEC_PREFIX}\"])

PY_SYS_VERSION=`${PYTHON_BIN} -c 'import sys ; print(sys.version[[0:3]])'`
PY_SYS_VERSION=`${PYTHON3_BIN} -c 'import sys ; print(sys.version[[0:3]])'`
AC_MSG_NOTICE([Python sys.version \"${PY_SYS_VERSION}\"])

if test "x$PY_LIB_DIR" = "x"; then
Expand Down

0 comments on commit dbe05c0

Please sign in to comment.