Commit 8df8bef6 authored by Felix Paul Kühne's avatar Felix Paul Kühne

added support for -O4 when compiling with --disable-debug

parent 8416c5ff
...@@ -1017,26 +1017,34 @@ else ...@@ -1017,26 +1017,34 @@ else
fi fi
fi fi
AC_CACHE_CHECK([if \$CC accepts -O3], AC_CACHE_CHECK([if \$CC accepts -O4],
[ac_cv_c_o3], [ac_cv_c_o4],
[CFLAGS="${CFLAGS_save} -O3" [CFLAGS="${CFLAGS_save} -O4"
AC_TRY_COMPILE([],,ac_cv_c_o3=yes, ac_cv_c_o3=no)]) AC_TRY_COMPILE([],,ac_cv_c_o4=yes, ac_cv_c_o4=no)])
if test "${ac_cv_c_o3}" != "no" -a "x${enable_debug}" = "xno"; then if test "${ac_cv_c_o4}" != "no" -a "x${enable_debug}" = "xno"; then
CFLAGS_OPTIM_SPEED="${CFLAGS_OPTIM_SPEED} -O3" CFLAGS_OPTIM_SPEED="${CFLAGS_OPTIM_SPEED} -O4"
else else
AC_CACHE_CHECK([if \$CC accepts -O2], AC_CACHE_CHECK([if \$CC accepts -O3],
[ac_cv_c_o2], [ac_cv_c_o3],
[CFLAGS="${CFLAGS_save} -O2" [CFLAGS="${CFLAGS_save} -O3"
AC_TRY_COMPILE([],,ac_cv_c_o2=yes, ac_cv_c_o2=no)]) AC_TRY_COMPILE([],,ac_cv_c_o3=yes, ac_cv_c_o3=no)])
if test "${ac_cv_c_o2}" != "no"; then if test "${ac_cv_c_o3}" != "no" -a "x${enable_debug}" = "xno"; then
CFLAGS_OPTIM_SPEED="${CFLAGS_OPTIM_SPEED} -O2" CFLAGS_OPTIM_SPEED="${CFLAGS_OPTIM_SPEED} -O3"
else else
AC_CACHE_CHECK([if \$CC accepts -O], AC_CACHE_CHECK([if \$CC accepts -O2],
[ac_cv_c_o], [ac_cv_c_o2],
[CFLAGS="${CFLAGS_save} -O" [CFLAGS="${CFLAGS_save} -O2"
AC_TRY_COMPILE([],,ac_cv_c_o=yes, ac_cv_c_o=no)]) AC_TRY_COMPILE([],,ac_cv_c_o2=yes, ac_cv_c_o2=no)])
if test "${ac_cv_c_o}" != "no"; then if test "${ac_cv_c_o2}" != "no"; then
CFLAGS_OPTIM_SPEED="${CFLAGS_OPTIM_SPEED} -O" CFLAGS_OPTIM_SPEED="${CFLAGS_OPTIM_SPEED} -O2"
else
AC_CACHE_CHECK([if \$CC accepts -O],
[ac_cv_c_o],
[CFLAGS="${CFLAGS_save} -O"
AC_TRY_COMPILE([],,ac_cv_c_o=yes, ac_cv_c_o=no)])
if test "${ac_cv_c_o}" != "no"; then
CFLAGS_OPTIM_SPEED="${CFLAGS_OPTIM_SPEED} -O"
fi
fi fi
fi fi
fi fi
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment