changeset 3317:83ea3a38afe7

[xemacs-hg @ 2006-03-30 18:11:17 by james] Fix broken -Kalloca detection due to recent autoconf updates. See xemacs-patches message <m33bgziz2f.fsf@jerrypc.cs.usu.edu>.
author james
date Thu, 30 Mar 2006 18:11:18 +0000
parents d45de99b5d79
children 1ec58ab31874
files ChangeLog configure configure.ac
diffstat 3 files changed, 21 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Thu Mar 30 16:22:27 2006 +0000
+++ b/ChangeLog	Thu Mar 30 18:11:18 2006 +0000
@@ -1,3 +1,8 @@
+2006-03-30  Jerry James  <james@xemacs.org>
+
+	* configure.ac: Fix for -Kalloca detection, also broken by the
+	recent autoconf updates.  Thanks to Ilya Golubev.
+
 2006-03-30  Jerry James  <james@xemacs.org>
 
 	* configure.ac: Fix FOR_MSW XPM test, broken by previous update.
--- a/configure	Thu Mar 30 16:22:27 2006 +0000
+++ b/configure	Thu Mar 30 18:11:18 2006 +0000
@@ -9025,7 +9025,14 @@
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
+
+int
+main ()
+{
 void *x = alloca(4);
+  ;
+  return 0;
+}
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
@@ -9063,7 +9070,14 @@
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
+
+int
+main ()
+{
 void *x = alloca(4);
+  ;
+  return 0;
+}
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
--- a/configure.ac	Thu Mar 30 16:22:27 2006 +0000
+++ b/configure.ac	Thu Mar 30 18:11:18 2006 +0000
@@ -2184,10 +2184,10 @@
 if test "$__USLC__" = yes; then
   AC_MSG_CHECKING(for whether the -Kalloca compiler flag is needed)
   need_kalloca=no
-  AC_LINK_IFELSE([AC_LANG_SOURCE([void *x = alloca(4);])], [:], [
+  AC_LINK_IFELSE([AC_LANG_PROGRAM([], [void *x = alloca(4);])], [:], [
     xe_save_c_switch_system="$c_switch_system"
     c_switch_system="$c_switch_system -Kalloca"
-    AC_LINK_IFELSE([AC_LANG_SOURCE([void *x = alloca(4);])],
+    AC_LINK_IFELSE([AC_LANG_PROGRAM([], [void *x = alloca(4);])],
       [ need_kalloca=yes ])
     c_switch_system="$xe_save_c_switch_system"])
   AC_MSG_RESULT($need_kalloca)