the configure-generated CFLAGS string is one of the usual ones with -O2,
replace -O2 rather than appending, since -Os will override previously
specified optimization levels anyways.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20660
dc483132-0cff-0310-8789-
dd5450dbe970
# -Wmissing-prototypes
if test "$GCC" = yes ; then
# Putting this here means we get -Os after -O2, which works.
- if test "$with_size_optimizations" = yes; then
+ if test "$with_size_optimizations" = yes && test "x$krb5_ac_cflags_set" != xset; then
AC_MSG_NOTICE(adding -Os optimization option)
- CFLAGS="$CFLAGS -Os"
+ case "$CFLAGS" in
+ "-g -O2") CFLAGS="-g -Os" ;;
+ "-O2") CFLAGS="-Os" ;;
+ *) CFLAGS="$CFLAGS -Os" ;;
+ esac
fi
if test "x$krb5_ac_cflags_set" = xset ; then
AC_MSG_NOTICE(not adding extra gcc warning flags because CFLAGS was set)