Merge from trunk.
authorEli Zaretskii <eliz@gnu.org>
Wed, 1 May 2013 17:47:50 +0000 (20:47 +0300)
committerEli Zaretskii <eliz@gnu.org>
Wed, 1 May 2013 17:47:50 +0000 (20:47 +0300)
1  2 
configure.ac
lisp/Makefile.in
lisp/subr.el

diff --cc configure.ac
@@@ -642,16 -632,29 +642,32 @@@ if test "$ac_test_CFLAGS" != set; the
        [emacs_cv_prog_cc_g3],
        [AC_LINK_IFELSE([AC_LANG_PROGRAM()],
         [emacs_cv_prog_cc_g3=yes],
-          [emacs_cv_prog_cc_g3=no])])
-     if test $emacs_cv_prog_cc_g3 = yes; then
-       CFLAGS=$emacs_g3_CFLAGS
-     else
+        [emacs_cv_prog_cc_g3=no])])
+     if test $emacs_cv_prog_cc_g3 != yes; then
        CFLAGS=$emacs_save_CFLAGS
      fi
 +    if test $opsys = mingw32; then
 +      CFLAGS="$CFLAGS -gdwarf-2"
 +    fi
    fi
+   case $CFLAGS in
+     *-O*) ;;
+     *)
+       # No optimization flag was inferred for this non-GCC compiler.
+       # Try -O.  This is needed for xlc on AIX; see Bug#14258.
+       emacs_save_CFLAGS=$CFLAGS
+       test -z "$CFLAGS" || CFLAGS="$CFLAGS "
+       CFLAGS=${CFLAGS}-O
+       AC_CACHE_CHECK([whether $CC accepts -O],
+         [emacs_cv_prog_cc_o],
+       [AC_LINK_IFELSE([AC_LANG_PROGRAM()],
+          [emacs_cv_prog_cc_o=yes],
+          [emacs_cv_prog_cc_o=no])])
+       if test $emacs_cv_prog_cc_o != yes; then
+       CFLAGS=$emacs_save_CFLAGS
+       fi ;;
+   esac
  fi
  
  AC_ARG_ENABLE([gcc-warnings],
Simple merge
diff --cc lisp/subr.el
Simple merge