aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorKelley Cook <kcook@gcc.gnu.org>2005-07-06 01:56:56 +0000
committerR. Kelley Cook <kcook@gcc.gnu.org>2005-07-06 01:56:56 +0000
commitf04f1d2c6305eea31102357d0b2aa7ab95ece2fb (patch)
treee3e0df050721f4beda9a008fdf986c2c5949f3cc /gcc
parent2a04824b9f21d6a57b655efb7fc531a80e6999b4 (diff)
downloadgcc-f04f1d2c6305eea31102357d0b2aa7ab95ece2fb.zip
gcc-f04f1d2c6305eea31102357d0b2aa7ab95ece2fb.tar.gz
gcc-f04f1d2c6305eea31102357d0b2aa7ab95ece2fb.tar.bz2
aclocal.m4: Update macros for autoconf 2.59 style.
2005-07-06 Kelley Cook <kcook@gcc.gnu.org> * aclocal.m4: Update macros for autoconf 2.59 style. * configure.ac: Likewise. From-SVN: r101647
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/aclocal.m440
-rw-r--r--gcc/configure.ac60
3 files changed, 55 insertions, 50 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index c452f20..b7d8723 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2005-07-06 Kelley Cook <kcook@gcc.gnu.org>
+
+ * aclocal.m4: Update macros for autoconf 2.59 style.
+ * configure.ac: Likewise.
+
2005-07-05 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
* pa.c (function_value): Handle small aggregates on 32-bit targets.
diff --git a/gcc/aclocal.m4 b/gcc/aclocal.m4
index 8961f6c..da6e38a 100644
--- a/gcc/aclocal.m4
+++ b/gcc/aclocal.m4
@@ -16,10 +16,10 @@ dnl [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, INCLUDES]]])
AC_DEFUN([gcc_AC_CHECK_DECL],
[AC_MSG_CHECKING([whether $1 is declared])
AC_CACHE_VAL(gcc_cv_have_decl_$1,
-[AC_TRY_COMPILE([$4],
+[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([$4],
[#ifndef $1
char *(*pfn) = (char *(*)) $1 ;
-#endif], eval "gcc_cv_have_decl_$1=yes", eval "gcc_cv_have_decl_$1=no")])
+#endif])], eval "gcc_cv_have_decl_$1=yes", eval "gcc_cv_have_decl_$1=no")])
if eval "test \"`echo '$gcc_cv_have_decl_'$1`\" = yes"; then
AC_MSG_RESULT(yes) ; ifelse([$2], , :, [$2])
else
@@ -93,7 +93,7 @@ dnl See if the printf functions in libc support %p in format strings.
AC_DEFUN([gcc_AC_FUNC_PRINTF_PTR],
[AC_CACHE_CHECK(whether the printf functions support %p,
gcc_cv_func_printf_ptr,
-[AC_TRY_RUN([#include <stdio.h>
+[AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdio.h>
int main()
{
@@ -102,7 +102,7 @@ int main()
sprintf(buf, "%p", p);
sscanf(buf, "%p", &q);
return (p != q);
-}], gcc_cv_func_printf_ptr=yes, gcc_cv_func_printf_ptr=no,
+}]])], gcc_cv_func_printf_ptr=yes, gcc_cv_func_printf_ptr=no,
gcc_cv_func_printf_ptr=no)
rm -f core core.* *.core])
if test $gcc_cv_func_printf_ptr = yes ; then
@@ -151,7 +151,7 @@ dnl Define MKDIR_TAKES_ONE_ARG if mkdir accepts only one argument instead
dnl of the usual 2.
AC_DEFUN([gcc_AC_FUNC_MKDIR_TAKES_ONE_ARG],
[AC_CACHE_CHECK([if mkdir takes one argument], gcc_cv_mkdir_takes_one_arg,
-[AC_TRY_COMPILE([
+[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
#include <sys/types.h>
#ifdef HAVE_SYS_STAT_H
# include <sys/stat.h>
@@ -161,7 +161,7 @@ AC_DEFUN([gcc_AC_FUNC_MKDIR_TAKES_ONE_ARG],
#endif
#ifdef HAVE_DIRECT_H
# include <direct.h>
-#endif], [mkdir ("foo", 0);],
+#endif], [mkdir ("foo", 0);])],
gcc_cv_mkdir_takes_one_arg=no, gcc_cv_mkdir_takes_one_arg=yes)])
if test $gcc_cv_mkdir_takes_one_arg = yes ; then
AC_DEFINE(MKDIR_TAKES_ONE_ARG, 1, [Define if host mkdir takes a single argument.])
@@ -279,7 +279,7 @@ else
# Unlike /dev/zero, the MAP_ANON(YMOUS) defines can be probed for.
AC_CACHE_CHECK([for MAP_ANON(YMOUS)], gcc_cv_decl_map_anon,
- [AC_TRY_COMPILE(
+ [AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
[#include <sys/types.h>
#include <sys/mman.h>
#include <unistd.h>
@@ -288,7 +288,7 @@ else
#define MAP_ANONYMOUS MAP_ANON
#endif
],
-[int n = MAP_ANONYMOUS;],
+[int n = MAP_ANONYMOUS;])],
gcc_cv_decl_map_anon=yes,
gcc_cv_decl_map_anon=no)])
@@ -338,7 +338,7 @@ if test -n "[$]$1"; then
ac_prog_version=`<<$>>$1 $3 2>&1 |
sed -n 's/^.*patsubst(<<$4>>,/,\/).*$/\1/p'`
changequote([,])dnl
- echo "configure:__oline__: version of $2 is $ac_prog_version" >&AC_FD_CC
+ echo "configure:__oline__: version of $2 is $ac_prog_version" >&AS_MESSAGE_LOG_FD
changequote(<<,>>)dnl
case $ac_prog_version in
'') gcc_cv_prog_$2_modern=no;;
@@ -358,7 +358,7 @@ dnl be either signed or unsigned.
dnl
AC_DEFUN([gcc_AC_C_ENUM_BF_UNSIGNED],
[AC_CACHE_CHECK(for unsigned enumerated bitfields, gcc_cv_enum_bf_unsigned,
-[AC_TRY_RUN(#include <stdlib.h>
+[AC_RUN_IFELSE([AC_LANG_SOURCE([#include <stdlib.h>
enum t { BLAH = 128 } ;
struct s_t { enum t member : 8; } s ;
int main(void)
@@ -367,7 +367,7 @@ int main(void)
if (s.member < 0) exit(1);
exit(0);
-}, gcc_cv_enum_bf_unsigned=yes, gcc_cv_enum_bf_unsigned=no, gcc_cv_enum_bf_unsigned=yes)])
+}])], gcc_cv_enum_bf_unsigned=yes, gcc_cv_enum_bf_unsigned=no, gcc_cv_enum_bf_unsigned=yes)])
if test $gcc_cv_enum_bf_unsigned = yes; then
AC_DEFINE(ENUM_BITFIELDS_ARE_UNSIGNED, 1,
[Define if enumerated bitfields are treated as unsigned values.])
@@ -391,11 +391,11 @@ if test $gcc_cv_decl_char_bit = no; then
[i=8
gcc_cv_c_nbby=
while test $i -lt 65; do
- AC_TRY_COMPILE(,
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,
[switch(0) {
case (unsigned char)((unsigned long)1 << $i) == ((unsigned long)1 << $i):
case (unsigned char)((unsigned long)1<<($i-1)) == ((unsigned long)1<<($i-1)):
- ; }],
+ ; }])],
[gcc_cv_c_nbby=$i; break])
i=`expr $i + 1`
done
@@ -414,8 +414,8 @@ dnl From Bruno Haible.
AC_DEFUN([AM_LANGINFO_CODESET],
[
AC_CACHE_CHECK([for nl_langinfo and CODESET], am_cv_langinfo_codeset,
- [AC_TRY_LINK([#include <langinfo.h>],
- [char* cs = nl_langinfo(CODESET);],
+ [AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <langinfo.h>],
+ [char* cs = nl_langinfo(CODESET);])],
am_cv_langinfo_codeset=yes,
am_cv_langinfo_codeset=no)
])
@@ -431,11 +431,11 @@ AC_DEFUN([gcc_AC_INITFINI_ARRAY],
[], [
AC_CACHE_CHECK(for .preinit_array/.init_array/.fini_array support,
gcc_cv_initfini_array, [dnl
- AC_TRY_RUN([
+ AC_RUN_IFELSE([AC_LANG_SOURCE([
static int x = -1;
int main (void) { return x; }
int foo (void) { x = 0; }
-int (*fp) (void) __attribute__ ((section (".init_array"))) = foo;],
+int (*fp) (void) __attribute__ ((section (".init_array"))) = foo;])],
[gcc_cv_initfini_array=yes], [gcc_cv_initfini_array=no],
[gcc_cv_initfini_array=no])])
enable_initfini_array=$gcc_cv_initfini_array
@@ -517,12 +517,12 @@ AC_DEFUN([gcc_GAS_CHECK_FEATURE],
gcc_GAS_VERSION_GTE_IFELSE($3, [[$2]=yes])
el])if test x$gcc_cv_as != x; then
echo ifelse(m4_substr([$5],0,1),[$], "[$5]", '[$5]') > conftest.s
- if AC_TRY_COMMAND([$gcc_cv_as $4 -o conftest.o conftest.s >&AC_FD_CC])
+ if AC_TRY_COMMAND([$gcc_cv_as $4 -o conftest.o conftest.s >&AS_MESSAGE_LOG_FD])
then
ifelse([$6],, [$2]=yes, [$6])
else
- echo "configure: failed program was" >&AC_FD_CC
- cat conftest.s >&AC_FD_CC
+ echo "configure: failed program was" >&AS_MESSAGE_LOG_FD
+ cat conftest.s >&AS_MESSAGE_LOG_FD
fi
rm -f conftest.o conftest.s
fi])
diff --git a/gcc/configure.ac b/gcc/configure.ac
index 945162c..0a66cdf 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -517,22 +517,22 @@ if test x$ac_valgrind_checking != x ; then
# It is certainly possible that there's valgrind but no valgrind.h.
# GCC relies on making annotations so we must have both.
AC_MSG_CHECKING(for VALGRIND_DISCARD in <valgrind/memcheck.h>)
- AC_TRY_CPP(
- [#include <valgrind/memcheck.h>
+ AC_PREPROC_IFELSE([AC_LANG_SOURCE(
+ [[#include <valgrind/memcheck.h>
#ifndef VALGRIND_DISCARD
#error VALGRIND_DISCARD not defined
-#endif],
+#endif]])],
[gcc_cv_header_valgrind_memcheck_h=yes],
[gcc_cv_header_valgrind_memcheck_h=no])
AC_MSG_RESULT($gcc_cv_header_valgrind_memcheck_h)
AC_MSG_CHECKING(for VALGRIND_DISCARD in <memcheck.h>)
- AC_TRY_CPP(
- [#include <memcheck.h>
+ AC_PREPROC_IFELSE([AC_LANG_SOURCE(
+ [[#include <memcheck.h>
#ifndef VALGRIND_DISCARD
#error VALGRIND_DISCARD not defined
-#endif],
- [gcc_cv_header_memcheck_h=yes],
- gcc_cv_header_memcheck_h=no)
+#endif]])],
+ [gcc_cv_header_memcheck_h=yes],
+ [gcc_cv_header_memcheck_h=no])
AC_MSG_RESULT($gcc_cv_header_memcheck_h)
AM_PATH_PROG_WITH_TEST(valgrind_path, valgrind,
[$ac_dir/$ac_word --version | grep valgrind- >/dev/null 2>&1])
@@ -859,13 +859,13 @@ fi
AC_MSG_CHECKING(for GNU C library)
AC_CACHE_VAL(gcc_cv_glibc,
-[AC_TRY_COMPILE(
- [#include <features.h>],[
+[AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
+ [[#include <features.h>]], [[
#if ! (defined __GLIBC__ || defined __GNU_LIBRARY__)
#error Not a GNU C library system
-#endif],
- [gcc_cv_glibc=yes],
- gcc_cv_glibc=no)])
+#endif]])],
+ [gcc_cv_glibc=yes],
+ [gcc_cv_glibc=no])])
AC_MSG_RESULT($gcc_cv_glibc)
if test $gcc_cv_glibc = yes; then
AC_DEFINE(_GNU_SOURCE, 1, [Always define this when using the GNU C Library])
@@ -959,12 +959,12 @@ AC_SUBST(LDEXP_LIB)
# doesn't clash with <sys/types.h>, and declares intmax_t.
AC_MSG_CHECKING(for inttypes.h)
AC_CACHE_VAL(gcc_cv_header_inttypes_h,
-[AC_TRY_COMPILE(
- [#include <sys/types.h>
-#include <inttypes.h>],
- [intmax_t i = -1;],
+[AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
+[[#include <sys/types.h>
+#include <inttypes.h>]],
+ [[intmax_t i = -1;]])],
[gcc_cv_header_inttypes_h=yes],
- gcc_cv_header_inttypes_h=no)])
+ [gcc_cv_header_inttypes_h=no])])
AC_MSG_RESULT($gcc_cv_header_inttypes_h)
if test $gcc_cv_header_inttypes_h = yes; then
AC_DEFINE(HAVE_INTTYPES_H, 1,
@@ -986,15 +986,15 @@ AC_CHECK_FUNCS(times clock dup2 kill getrlimit setrlimit atoll atoq \
if test x$ac_cv_func_mbstowcs = xyes; then
AC_CACHE_CHECK(whether mbstowcs works, gcc_cv_func_mbstowcs_works,
-[ AC_TRY_RUN([#include <stdlib.h>
+[ AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdlib.h>
int main()
{
mbstowcs(0, "", 0);
return 0;
-}],
- gcc_cv_func_mbstowcs_works=yes,
- gcc_cv_func_mbstowcs_works=no,
- gcc_cv_func_mbstowcs_works=yes)])
+}]])],
+ [gcc_cv_func_mbstowcs_works=yes],
+ [gcc_cv_func_mbstowcs_works=no],
+ [gcc_cv_func_mbstowcs_works=yes])])
if test x$gcc_cv_func_mbstowcs_works = xyes; then
AC_DEFINE(HAVE_WORKING_MBSTOWCS, 1,
[Define this macro if mbstowcs does not crash when its
@@ -1035,7 +1035,7 @@ case "${host}" in
ac_cv_func_vfork_works=yes
;;
esac
-AC_FUNC_VFORK
+AC_FUNC_FORK
AM_ICONV
# Until we have in-tree GNU iconv:
@@ -1063,13 +1063,13 @@ gcc_AC_CHECK_DECLS(getrlimit setrlimit getrusage, , ,[
#endif
])
-AC_TRY_COMPILE([
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#include "ansidecl.h"
#include "system.h"
#ifdef HAVE_SYS_RESOURCE_H
#include <sys/resource.h>
#endif
-],[rlim_t l = 0;],,[AC_DEFINE([rlim_t],[long],
+]], [[rlim_t l = 0;]])],[],[AC_DEFINE([rlim_t],[long],
[Define to \`long' if <sys/resource.h> doesn't define.])])
# On AIX 5.2, <ldfcn.h> conflicts with <fcntl.h>, as both define incompatible
@@ -1096,13 +1096,13 @@ gcc_AC_CHECK_DECLS(times, , ,[
# More time-related stuff.
AC_CACHE_CHECK(for struct tms, ac_cv_struct_tms, [
-AC_TRY_COMPILE([
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#include "ansidecl.h"
#include "system.h"
#ifdef HAVE_SYS_TIMES_H
#include <sys/times.h>
#endif
-], [struct tms tms;], ac_cv_struct_tms=yes, ac_cv_struct_tms=no)])
+]], [[struct tms tms;]])],[ac_cv_struct_tms=yes],[ac_cv_struct_tms=no])])
if test $ac_cv_struct_tms = yes; then
AC_DEFINE(HAVE_STRUCT_TMS, 1,
[Define if <sys/times.h> defines struct tms.])
@@ -1111,10 +1111,10 @@ fi
# use gcc_cv_* here because this doesn't match the behavior of AC_CHECK_TYPE.
# revisit after autoconf 2.50.
AC_CACHE_CHECK(for clock_t, gcc_cv_type_clock_t, [
-AC_TRY_COMPILE([
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#include "ansidecl.h"
#include "system.h"
-], [clock_t x;], gcc_cv_type_clock_t=yes, gcc_cv_type_clock_t=no)])
+]], [[clock_t x;]])],[gcc_cv_type_clock_t=yes],[gcc_cv_type_clock_t=no])])
if test $gcc_cv_type_clock_t = yes; then
AC_DEFINE(HAVE_CLOCK_T, 1,
[Define if <time.h> defines clock_t.])