Fix --with_properly_linked_python2_python3 option

This commit is contained in:
Kazuki Sakamoto
2016-05-17 22:07:12 -07:00
parent 5e1d8fba9e
commit 1a84f8da5c
2 changed files with 14 additions and 2 deletions
+8 -1
View File
@@ -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
+6 -1
View File
@@ -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 <dlfcn.h>
/* 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