Fixes: debbugs:17865
[bpt/emacs.git] / configure.ac
index 600271d..8e74f79 100644 (file)
@@ -22,7 +22,7 @@ dnl  You should have received a copy of the GNU General Public License
 dnl  along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
 
 AC_PREREQ(2.65)
-AC_INIT(emacs, 24.3.91)
+AC_INIT(emacs, 24.3.92)
 
 dnl We get MINGW64 with MSYS2
 if test "x$MSYSTEM" = "xMINGW32" -o "x$MSYSTEM" = "xMINGW64"
@@ -757,7 +757,10 @@ AC_ARG_ENABLE([gcc-warnings],
 AC_ARG_ENABLE(link-time-optimization,
 [AS_HELP_STRING([--enable-link-time-optimization],
                 [build emacs with link-time optimization.
-                 This is supported only for GCC since 4.5.0.])],
+                This requires GCC 4.5.0 or later.
+                It also makes Emacs harder to debug, and when we tried it
+                with GCC 4.9.0 x86-64 it made Emacs slower, so it's not
+                recommended for typical use.])],
 if test "${enableval}" != "no"; then
    AC_MSG_CHECKING([whether link-time optimization is supported])
    ac_lto_supported=no
@@ -777,6 +780,12 @@ if test "${enableval}" != "no"; then
    AC_MSG_RESULT([$ac_lto_supported])
    if test "$ac_lto_supported" = "yes"; then
       CFLAGS="$CFLAGS $LTO"
+      dnl The following is needed for GCC 4.9.0.  The GCC 4.9.0 release notes
+      dnl suggest that instead of -ffat-lto-objects we should use gcc-ar and
+      dnl gcc-ranlib in place of ar and ranlib, but gcc-ar makes /usr/bin/ar
+      dnl dump core on Fedora 20, so play it safe for now.
+      gl_COMPILER_OPTION_IF([-ffat-lto-objects],
+       [CFLAGS="$CFLAGS -ffat-lto-objects"])
    fi
 fi)
 
@@ -2079,10 +2088,14 @@ if test "$HAVE_PTHREAD" = yes; then
   # Some systems optimize for single-threaded programs by default, and
   # need special flags to disable these optimizations. For example, the
   # definition of 'errno' in <errno.h>.
-  if test "$opsys" = aix4-2; then
-    AC_DEFINE([_THREAD_SAFE], [1],
-      [Define to 1 if your system requires this in multithreaded code.])
-  fi
+  case $opsys in
+    sol*)
+      AC_DEFINE([_REENTRANT], 1,
+       [Define to 1 if your system requires this in multithreaded code.]);;
+    aix4-2)
+      AC_DEFINE([_THREAD_SAFE], 1,
+       [Define to 1 if your system requires this in multithreaded code.]);;
+  esac
 fi
 AC_SUBST([LIB_PTHREAD])