* src/mcs51/ralloc.c (isSpiltOnStack): fixed bug 1565152
[fw/sdcc] / support / cpp2 / configure.in
index c3a3d9b139afbe248b3cf66fee03612a0bfdac70..4532c6bd9d6dfc834050df63ad15cb2e02d1198b 100644 (file)
@@ -1,28 +1,28 @@
-# configure.in for GNU CC
+# configure.in for GCC
 # Process this file with autoconf to generate a configuration script.
 
-# Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+# Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
 
-#This file is part of GNU CC.
+#This file is part of GCC.
 
-#GNU CC is free software; you can redistribute it and/or modify
-#it under the terms of the GNU General Public License as published by
-#the Free Software Foundation; either version 2, or (at your option)
-#any later version.
+#GCC is free software; you can redistribute it and/or modify it under
+#the terms of the GNU General Public License as published by the Free
+#Software Foundation; either version 2, or (at your option) any later
+#version.
 
-#GNU CC is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#GNU General Public License for more details.
+#GCC is distributed in the hope that it will be useful, but WITHOUT
+#ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+#FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+#for more details.
 
 #You should have received a copy of the GNU General Public License
-#along with GNU CC; see the file COPYING.  If not, write to
-#the Free Software Foundation, 59 Temple Place - Suite 330,
-#Boston, MA 02111-1307, USA.
+#along with GCC; see the file COPYING.  If not, write to the Free
+#Software Foundation, 59 Temple Place - Suite 330, Boston, MA
+#02111-1307, USA.
 
 # Initialization and defaults
-AC_PREREQ(2.13)
-AC_INIT(cppmain.c)
+AC_PREREQ(2.60)
+AC_INIT(sdcpp.c)
 AC_CONFIG_HEADER(auto-host.h:config.in)
 
 remove=rm
@@ -108,7 +108,7 @@ if test x$enable_c_mbchar != xno; then
   [Define if you want the C and C++ compilers to support multibyte
    character sets for source code.])
 fi)
-  
+
 # Find the native compiler
 AC_PROG_CC
 AC_PROG_CC_C_O
@@ -124,6 +124,8 @@ AC_SUBST(OUTPUT_OPTION)
 AC_PROG_CPP
 AC_C_INLINE
 
+gcc_AC_C__BOOL
+
 # sizeof(char) is 1 by definition.
 gcc_AC_COMPILE_CHECK_SIZEOF(short)
 gcc_AC_COMPILE_CHECK_SIZEOF(int)
@@ -131,7 +133,7 @@ gcc_AC_COMPILE_CHECK_SIZEOF(long)
 
 gcc_AC_C_CHARSET
 
-# If the native compiler is GCC, we can enable warnings even in stage1.  
+# If the native compiler is GCC, we can enable warnings even in stage1.
 # That's useful for people building cross-compilers, or just running a
 # quick `make'.
 warn_cflags=
@@ -165,6 +167,13 @@ else
 fi
 
 # Find some useful tools
+AC_PROG_AWK
+# We need awk to run opts.sh (to create options.c and options.h).
+# Bail out if it's missing.
+case ${AWK} in
+  "") AC_MSG_ERROR([can't build without awk, bailing out]) ;;
+esac
+
 gcc_AC_PROG_LN
 gcc_AC_PROG_LN_S
 AC_PROG_RANLIB
@@ -172,6 +181,7 @@ gcc_AC_PROG_INSTALL
 
 AC_HEADER_STDC
 AC_HEADER_TIME
+gcc_AC_HEADER_STDBOOL
 gcc_AC_HEADER_STRING
 AC_HEADER_SYS_WAIT
 AC_CHECK_HEADERS(limits.h stddef.h string.h strings.h stdlib.h time.h \
@@ -197,7 +207,7 @@ AC_C_STRINGIZE
 dnl Disabled until we have a complete test for buggy enum bitfields.
 dnl gcc_AC_C_ENUM_BF_UNSIGNED
 
-AC_CHECK_FUNCS(clock strchr strrchr lstat)
+AC_CHECK_FUNCS(clock strsignal strchr strrchr lstat)
 
 AC_CHECK_TYPE(ssize_t, int)
 
@@ -207,7 +217,7 @@ AC_FUNC_MMAP_FILE
 # We will need to find libiberty.h and ansidecl.h
 saved_CFLAGS="$CFLAGS"
 CFLAGS="$CFLAGS -I${srcdir} -I${srcdir}/../include"
-gcc_AC_CHECK_DECLS(getenv abort errno \
+gcc_AC_CHECK_DECLS(getenv abort strsignal errno \
        malloc realloc calloc free clock, , ,[
 #include "ansidecl.h"
 #include "system.h"])
@@ -215,7 +225,7 @@ gcc_AC_CHECK_DECLS(getenv abort errno \
 # Restore CFLAGS from before the gcc_AC_NEED_DECLARATIONS tests.
 CFLAGS="$saved_CFLAGS"
 
-# mkdir takes a single argument on some systems. 
+# mkdir takes a single argument on some systems.
 gcc_AC_FUNC_MKDIR_TAKES_ONE_ARG
 
 # File extensions
@@ -274,7 +284,7 @@ fi
 # auto-host.h is the file containing items generated by autoconf and is
 # the first file included by config.h.
 # If host=build, it is correct to have hconfig include auto-host.h
-# as well.  If host!=build, we are in error and need to do more 
+# as well.  If host!=build, we are in error and need to do more
 # work to find out the build config parameters.
 if test x$host = x$build
 then
@@ -283,7 +293,7 @@ else
        # We create a subdir, then run autoconf in the subdir.
        # To prevent recursion we set host and build for the new
        # invocation of configure to the build for this invocation
-       # of configure. 
+       # of configure.
        tempdir=build.$$
        rm -rf $tempdir
        mkdir $tempdir
@@ -323,19 +333,6 @@ changequote(,)dnl
 gcc_version_full=`grep version_string ${gcc_version_trigger} | sed -e 's/.*"\([^"]*\)".*/\1/'`
 gcc_version=`echo ${gcc_version_full} | sed -e 's/\([^ ]*\) .*/\1/'`
 
-# Compile in configure arguments.
-if test -f configargs.h ; then
-       # Being re-configured.
-       gcc_config_arguments=`grep configuration_arguments configargs.h | sed -e 's/.*"\([^"]*\)".*/\1/'`
-       gcc_config_arguments="$gcc_config_arguments : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS"
-else
-       gcc_config_arguments="$TOPLEVEL_CONFIGURE_ARGUMENTS"
-fi
-cat > configargs.h <<EOF
-/* Generated automatically. */
-static const char configuration_arguments[] = "$gcc_config_arguments";
-static const char thread_model[] = "$thread_file";
-EOF
 changequote([,])dnl
 
 # Internationalization
@@ -502,7 +499,7 @@ fi
 AC_SUBST(build_canonical)
 AC_SUBST(host_canonical)
 AC_SUBST(target_subdir)
-       
+
 # Nothing to do for FLOAT_H, float_format already handled.
 objdir=`pwd`
 AC_SUBST(objdir)