From 1a84f8da5c786cc7d19c2a26f3e3021c110d2dba Mon Sep 17 00:00:00 2001 From: Kazuki Sakamoto Date: Tue, 17 May 2016 22:07:12 -0700 Subject: [PATCH] Fix --with_properly_linked_python2_python3 option --- src/auto/configure | 9 ++++++++- src/configure.in | 7 ++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/src/auto/configure b/src/auto/configure index 36c2ac8a1a..c6bba8130e 100755 --- a/src/auto/configure +++ b/src/auto/configure @@ -6551,7 +6551,7 @@ $as_echo_n "checking whether we can do without RTLD_GLOBAL for Python... " >&6; CFLAGS="$CFLAGS $PYTHON_CFLAGS" libs_save=$LIBS LIBS="-ldl $LIBS" - if test "x$MACOSX" != "xyes" || test "$vi_cv_with_properly_linked_python2_python3" = "yes"; then + if test "x$MACOSX" != "xyes"; then if test "$cross_compiling" = yes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} @@ -6675,6 +6675,13 @@ fi fi + if test "$vi_cv_with_properly_linked_python2_python3" = "yes"; then + $as_echo "#define PY_NO_RTLD_GLOBAL 1" >>confdefs.h + + $as_echo "#define PY3_NO_RTLD_GLOBAL 1" >>confdefs.h + + fi + CFLAGS=$cflags_save LIBS=$libs_save diff --git a/src/configure.in b/src/configure.in index e62dc808f5..4e24c45492 100644 --- a/src/configure.in +++ b/src/configure.in @@ -1584,7 +1584,7 @@ if test "$python_ok" = yes && test "$python3_ok" = yes; then libs_save=$LIBS dnl -ldl must go first to make this work on Archlinux (Roland Puntaier) LIBS="-ldl $LIBS" - if test "x$MACOSX" != "xyes" || test "$vi_cv_with_properly_linked_python2_python3" = "yes"; then + if test "x$MACOSX" != "xyes"; then AC_RUN_IFELSE([AC_LANG_SOURCE([ #include /* If this program fails, then RTLD_GLOBAL is needed. @@ -1668,6 +1668,11 @@ if test "$python_ok" = yes && test "$python3_ok" = yes; then [AC_MSG_RESULT(yes);AC_DEFINE(PY3_NO_RTLD_GLOBAL)], [AC_MSG_RESULT(no)]) fi + if test "$vi_cv_with_properly_linked_python2_python3" = "yes"; then + AC_DEFINE(PY_NO_RTLD_GLOBAL) + AC_DEFINE(PY3_NO_RTLD_GLOBAL) + fi + CFLAGS=$cflags_save LIBS=$libs_save