diff --git a/configure.in b/configure.in index f2510ceda78..e91199b3d9b 100644 --- a/configure.in +++ b/configure.in @@ -98,7 +98,13 @@ fi AC_SUBST(OPT) if test -z "$OPT" then - case $ac_sys_system in + case $GCC in + yes) + case $ac_cv_prog_cc_g in + yes) OPT="-g -O2";; + *) OPT="-O2";; + esac + ;; *) OPT="-O";; esac fi