]> git.eshelyaron.com Git - emacs.git/commitdiff
Auto-commit of generated files.
authorGlenn Morris <rgm@gnu.org>
Sat, 27 Apr 2013 10:17:37 +0000 (06:17 -0400)
committerGlenn Morris <rgm@gnu.org>
Sat, 27 Apr 2013 10:17:37 +0000 (06:17 -0400)
autogen/configure

index 7ddac01fb102e68e8ec06fa89651ade207a262c9..bd900b5afefba2f179a609fd81353e20423937e3 100755 (executable)
@@ -7271,10 +7271,10 @@ esac
   # Code from module xalloc-oversized:
 
 
-# It's helpful to have C macros available to GDB, so prefer -g3 to -g
-# if -g3 works and the user does not specify CFLAGS.
-# This test must follow gl_EARLY; otherwise AC_LINK_IFELSE complains.
 if test "$ac_test_CFLAGS" != set; then
+  # It's helpful to have C macros available to GDB, so prefer -g3 to -g
+  # if -g3 works and the user does not specify CFLAGS.
+  # This test must follow gl_EARLY; otherwise AC_LINK_IFELSE complains.
   case $CFLAGS in
     '-g')
       emacs_g3_CFLAGS='-g3';;
@@ -7312,12 +7312,49 @@ rm -f core conftest.err conftest.$ac_objext \
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_prog_cc_g3" >&5
 $as_echo "$emacs_cv_prog_cc_g3" >&6; }
-    if test $emacs_cv_prog_cc_g3 = yes; then
-      CFLAGS=$emacs_g3_CFLAGS
-    else
+    if test $emacs_cv_prog_cc_g3 != yes; then
       CFLAGS=$emacs_save_CFLAGS
     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
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -O" >&5
+$as_echo_n "checking whether $CC accepts -O... " >&6; }
+if test "${emacs_cv_prog_cc_o+set}" = set; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  emacs_cv_prog_cc_o=yes
+else
+  emacs_cv_prog_cc_o=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $emacs_cv_prog_cc_o" >&5
+$as_echo "$emacs_cv_prog_cc_o" >&6; }
+      if test $emacs_cv_prog_cc_o != yes; then
+       CFLAGS=$emacs_save_CFLAGS
+      fi ;;
+  esac
 fi
 
 # Check whether --enable-gcc-warnings was given.