@@ -5991,13 +5991,77 @@ elif test "$python_ok" = yes && test "$enable_pythoninterp" = "dynamic"; then
59915991 PYTHON_OBJ=" objects/if_python.o"
59925992 PYTHON_CFLAGS=" $PYTHON_CFLAGS -DDYNAMIC_PYTHON_DLL=\\\" ${python_INSTSONAME} \\\" "
59935993 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
59946026elif test " $python3_ok " = yes && test " $enable_python3interp " = " dynamic" ; then
59956027 $as_echo " #define DYNAMIC_PYTHON3 1" >> confdefs.h
59966028
59976029 PYTHON3_SRC=" if_python3.c"
59986030 PYTHON3_OBJ=" objects/if_python3.o"
59996031 PYTHON3_CFLAGS=" $PYTHON3_CFLAGS -DDYNAMIC_PYTHON3_DLL=\\\" ${python3_INSTSONAME} \\\" "
60006032 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
60016065fi
60026066
60036067{ $as_echo " $as_me :${as_lineno-$LINENO } : checking --enable-tclinterp argument" >&5
0 commit comments