configure
changeset 6116 66f48d6bf735
parent 6102 bf7254ec1bf9
child 6188 e82023802002
     1.1 --- a/configure	Thu Dec 29 05:18:16 2011 -0500
     1.2 +++ b/configure	Thu Dec 29 05:36:39 2011 -0500
     1.3 @@ -20593,6 +20593,70 @@
     1.4      fi
     1.5  }
     1.6  
     1.7 +CheckStackBoundary()
     1.8 +{
     1.9 +    { echo "$as_me:$LINENO: checking for GCC -mpreferred-stack-boundary option" >&5
    1.10 +echo $ECHO_N "checking for GCC -mpreferred-stack-boundary option... $ECHO_C" >&6; }
    1.11 +    have_gcc_preferred_stack_boundary=no
    1.12 +
    1.13 +    save_CFLAGS="$CFLAGS"
    1.14 +    CFLAGS="$save_CFLAGS -mpreferred-stack-boundary=2"
    1.15 +    cat >conftest.$ac_ext <<_ACEOF
    1.16 +/* confdefs.h.  */
    1.17 +_ACEOF
    1.18 +cat confdefs.h >>conftest.$ac_ext
    1.19 +cat >>conftest.$ac_ext <<_ACEOF
    1.20 +/* end confdefs.h.  */
    1.21 +
    1.22 +    int x = 0;
    1.23 +
    1.24 +int
    1.25 +main ()
    1.26 +{
    1.27 +
    1.28 +
    1.29 +  ;
    1.30 +  return 0;
    1.31 +}
    1.32 +_ACEOF
    1.33 +rm -f conftest.$ac_objext
    1.34 +if { (ac_try="$ac_compile"
    1.35 +case "(($ac_try" in
    1.36 +  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
    1.37 +  *) ac_try_echo=$ac_try;;
    1.38 +esac
    1.39 +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
    1.40 +  (eval "$ac_compile") 2>conftest.er1
    1.41 +  ac_status=$?
    1.42 +  grep -v '^ *+' conftest.er1 >conftest.err
    1.43 +  rm -f conftest.er1
    1.44 +  cat conftest.err >&5
    1.45 +  echo "$as_me:$LINENO: \$? = $ac_status" >&5
    1.46 +  (exit $ac_status); } && {
    1.47 +	 test -z "$ac_c_werror_flag" ||
    1.48 +	 test ! -s conftest.err
    1.49 +       } && test -s conftest.$ac_objext; then
    1.50 +
    1.51 +    have_gcc_preferred_stack_boundary=yes
    1.52 +
    1.53 +else
    1.54 +  echo "$as_me: failed program was:" >&5
    1.55 +sed 's/^/| /' conftest.$ac_ext >&5
    1.56 +
    1.57 +
    1.58 +fi
    1.59 +
    1.60 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
    1.61 +    { echo "$as_me:$LINENO: result: $have_gcc_preferred_stack_boundary" >&5
    1.62 +echo "${ECHO_T}$have_gcc_preferred_stack_boundary" >&6; }
    1.63 +    CFLAGS="$save_CFLAGS"
    1.64 +
    1.65 +    if test x$have_gcc_preferred_stack_boundary = xyes; then
    1.66 +        EXTRA_CFLAGS="$EXTRA_CFLAGS -mpreferred-stack-boundary=2"
    1.67 +    fi
    1.68 +}
    1.69 +
    1.70 +
    1.71  CheckWarnAll()
    1.72  {
    1.73      { echo "$as_me:$LINENO: checking for GCC -Wall option" >&5
    1.74 @@ -24695,6 +24759,9 @@
    1.75  rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
    1.76      { echo "$as_me:$LINENO: result: $have_wince" >&5
    1.77  echo "${ECHO_T}$have_wince" >&6; }
    1.78 +
    1.79 +    # This fixes Windows stack alignment with newer GCC
    1.80 +    CheckStackBoundary
    1.81  }
    1.82  
    1.83  CheckDIRECTX()