Mercurial > vim
comparison src/auto/configure @ 5168:a4e08386a6aa v7.4a.010
updated for version 7.4a.010
Problem: Test 86 and 97 fail when building with Python or Python 3 and
using a static library.
Solution: Add configure check to add -fPIE compiler flag.
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Tue, 09 Jul 2013 21:57:52 +0200 |
parents | 56bc3698f8c6 |
children | ce587b26b8d6 |
comparison
equal
deleted
inserted
replaced
5167:e80ac6c158b8 | 5168:a4e08386a6aa |
---|---|
5989 | 5989 |
5990 PYTHON_SRC="if_python.c" | 5990 PYTHON_SRC="if_python.c" |
5991 PYTHON_OBJ="objects/if_python.o" | 5991 PYTHON_OBJ="objects/if_python.o" |
5992 PYTHON_CFLAGS="$PYTHON_CFLAGS -DDYNAMIC_PYTHON_DLL=\\\"${python_INSTSONAME}\\\"" | 5992 PYTHON_CFLAGS="$PYTHON_CFLAGS -DDYNAMIC_PYTHON_DLL=\\\"${python_INSTSONAME}\\\"" |
5993 PYTHON_LIBS= | 5993 PYTHON_LIBS= |
5994 elif test "$python_ok" = yes; then | |
5995 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if -fPIE can be added for Python" >&5 | |
5996 $as_echo_n "checking if -fPIE can be added for Python... " >&6; } | |
5997 cflags_save=$CFLAGS | |
5998 libs_save=$LIBS | |
5999 CFLAGS="$CFLAGS $PYTHON_CFLAGS -fPIE" | |
6000 LIBS="$LIBS $PYTHON_LIBS" | |
6001 cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6002 /* end confdefs.h. */ | |
6003 | |
6004 int | |
6005 main () | |
6006 { | |
6007 | |
6008 ; | |
6009 return 0; | |
6010 } | |
6011 _ACEOF | |
6012 if ac_fn_c_try_link "$LINENO"; then : | |
6013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
6014 $as_echo "yes" >&6; }; fpie_ok=yes | |
6015 else | |
6016 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
6017 $as_echo "no" >&6; }; fpie_ok=no | |
6018 fi | |
6019 rm -f core conftest.err conftest.$ac_objext \ | |
6020 conftest$ac_exeext conftest.$ac_ext | |
6021 CFLAGS=$cflags_save | |
6022 LIBS=$libs_save | |
6023 if test $fpie_ok = yes; then | |
6024 PYTHON_CFLAGS="$PYTHON_CFLAGS -fPIE" | |
6025 fi | |
5994 elif test "$python3_ok" = yes && test "$enable_python3interp" = "dynamic"; then | 6026 elif test "$python3_ok" = yes && test "$enable_python3interp" = "dynamic"; then |
5995 $as_echo "#define DYNAMIC_PYTHON3 1" >>confdefs.h | 6027 $as_echo "#define DYNAMIC_PYTHON3 1" >>confdefs.h |
5996 | 6028 |
5997 PYTHON3_SRC="if_python3.c" | 6029 PYTHON3_SRC="if_python3.c" |
5998 PYTHON3_OBJ="objects/if_python3.o" | 6030 PYTHON3_OBJ="objects/if_python3.o" |
5999 PYTHON3_CFLAGS="$PYTHON3_CFLAGS -DDYNAMIC_PYTHON3_DLL=\\\"${python3_INSTSONAME}\\\"" | 6031 PYTHON3_CFLAGS="$PYTHON3_CFLAGS -DDYNAMIC_PYTHON3_DLL=\\\"${python3_INSTSONAME}\\\"" |
6000 PYTHON3_LIBS= | 6032 PYTHON3_LIBS= |
6033 elif test "$python3_ok" = yes; then | |
6034 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if -fPIE can be added for Python3" >&5 | |
6035 $as_echo_n "checking if -fPIE can be added for Python3... " >&6; } | |
6036 cflags_save=$CFLAGS | |
6037 libs_save=$LIBS | |
6038 CFLAGS="$CFLAGS $PYTHON3_CFLAGS -fPIE" | |
6039 LIBS="$LIBS $PYTHON3_LIBS" | |
6040 cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
6041 /* end confdefs.h. */ | |
6042 | |
6043 int | |
6044 main () | |
6045 { | |
6046 | |
6047 ; | |
6048 return 0; | |
6049 } | |
6050 _ACEOF | |
6051 if ac_fn_c_try_link "$LINENO"; then : | |
6052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
6053 $as_echo "yes" >&6; }; fpie_ok=yes | |
6054 else | |
6055 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
6056 $as_echo "no" >&6; }; fpie_ok=no | |
6057 fi | |
6058 rm -f core conftest.err conftest.$ac_objext \ | |
6059 conftest$ac_exeext conftest.$ac_ext | |
6060 CFLAGS=$cflags_save | |
6061 LIBS=$libs_save | |
6062 if test $fpie_ok = yes; then | |
6063 PYTHON3_CFLAGS="$PYTHON3_CFLAGS -fPIE" | |
6064 fi | |
6001 fi | 6065 fi |
6002 | 6066 |
6003 { $as_echo "$as_me:${as_lineno-$LINENO}: checking --enable-tclinterp argument" >&5 | 6067 { $as_echo "$as_me:${as_lineno-$LINENO}: checking --enable-tclinterp argument" >&5 |
6004 $as_echo_n "checking --enable-tclinterp argument... " >&6; } | 6068 $as_echo_n "checking --enable-tclinterp argument... " >&6; } |
6005 # Check whether --enable-tclinterp was given. | 6069 # Check whether --enable-tclinterp was given. |