* src/SDCCcse.c (algebraicOpts): fixed bug 1579949
[fw/sdcc] / support / cpp2 / configure.in
index 1a2abb5bb7e18e437fdd51798467458bb721341d..4532c6bd9d6dfc834050df63ad15cb2e02d1198b 100644 (file)
@@ -21,7 +21,7 @@
 #02111-1307, USA.
 
 # Initialization and defaults
-AC_PREREQ(2.13)
+AC_PREREQ(2.60)
 AC_INIT(sdcpp.c)
 AC_CONFIG_HEADER(auto-host.h:config.in)
 
@@ -167,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
@@ -200,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)
 
@@ -210,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"])
@@ -326,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