From 13e4d4d3cad592fe17db37d66f365a38ee2d2aa1 Mon Sep 17 00:00:00 2001 From: borutr Date: Thu, 28 Dec 2006 20:12:21 +0000 Subject: [PATCH] * support/cpp2/config.in, support/cpp2/configure.in, support/cpp2/configure, support/cpp2/Makefile.in: fix for the solaris build git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@4533 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- ChangeLog | 8 ++++- support/cpp2/Makefile.in | 3 +- support/cpp2/config.in | 3 ++ support/cpp2/configure | 67 ++++++++++++++++++++++++++++++++++++--- support/cpp2/configure.in | 11 +++++-- 5 files changed, 83 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index f8f4477e..19b104f6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2006-12-28 Borut Razem + + * support/cpp2/config.in, support/cpp2/configure.in, + support/cpp2/configure, support/cpp2/Makefile.in: + fix for the solaris build + 2006-12-27 Erik Petrich * src/SDCC.y (type_specifier2, pointer), @@ -8,7 +14,7 @@ * support/valdiag/valdiag.py: Allow test cases to specify required language standard * support/valdiag/tests/restrict.c: New file to test restrict keyword - * support/valdiag/tests/tentdecl.c: Supress empty source file error + * support/valdiag/tests/tentdecl.c: Supress empty source file error 2006-12-27 Borut Razem diff --git a/support/cpp2/Makefile.in b/support/cpp2/Makefile.in index 228f1f93..12d10400 100644 --- a/support/cpp2/Makefile.in +++ b/support/cpp2/Makefile.in @@ -42,6 +42,7 @@ ALL_CFLAGS = $(INTERNAL_CFLAGS) $(X_CFLAGS) $(T_CFLAGS) \ ALL_CPPFLAGS = $(CPPFLAGS) $(X_CPPFLAGS) $(T_CPPFLAGS) LDFLAGS = @LDFLAGS@ +AWK = @AWK@ CC = @CC@ AR = ar AR_FLAGS = rc @@ -185,7 +186,7 @@ config.status: $(srcdir)/configure version.c options.c: $(lang_opt_files) $(srcdir)/opts.sh options.h intl.h options.h: $(lang_opt_files) $(srcdir)/opts.sh Makefile - AWK=awk $(SHELL) $(srcdir)/opts.sh \ + AWK=$(AWK) $(SHELL) $(srcdir)/opts.sh \ '$(SHELL) $(srcdir)/move-if-change' \ options.c options.h $(lang_opt_files) diff --git a/support/cpp2/config.in b/support/cpp2/config.in index 546c4e05..d5c3dbdd 100644 --- a/support/cpp2/config.in +++ b/support/cpp2/config.in @@ -106,6 +106,9 @@ /* Define if you have the tsearch function. */ #undef HAVE_TSEARCH +/* Define to 1 if we found this declaration otherwise define to 0. */ +#undef HAVE_DECL_STRSIGNAL + /* Define if you have the header file. */ #undef HAVE_FCNTL_H diff --git a/support/cpp2/configure b/support/cpp2/configure index e693f5b6..c87aecef 100755 --- a/support/cpp2/configure +++ b/support/cpp2/configure @@ -649,6 +649,7 @@ GREP EGREP warn_cflags SET_MAKE +AWK LN LN_S RANLIB @@ -3959,6 +3960,56 @@ echo "${ECHO_T}no" >&6; } fi # Find some useful tools +for ac_prog in gawk mawk nawk awk +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_AWK+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$AWK"; then + ac_cv_prog_AWK="$AWK" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_AWK="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +AWK=$ac_cv_prog_AWK +if test -n "$AWK"; then + { echo "$as_me:$LINENO: result: $AWK" >&5 +echo "${ECHO_T}$AWK" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + test -n "$AWK" && break +done + +# We need awk to run opts.sh (to create options.c and options.h). +# Bail out if it's missing. +case ${AWK} in + "") { { echo "$as_me:$LINENO: error: can't build without awk, bailing out" >&5 +echo "$as_me: error: can't build without awk, bailing out" >&2;} + { (exit 1); exit 1; }; } ;; +esac + { echo "$as_me:$LINENO: checking whether ln works" >&5 echo $ECHO_N "checking whether ln works... $ECHO_C" >&6; } if test "${gcc_cv_prog_LN+set}" = set; then @@ -5123,7 +5174,7 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu cat > conftest.$ac_ext <&5 @@ -6100,7 +6152,7 @@ fi # We will need to find libiberty.h and ansidecl.h saved_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -I${srcdir} -I${srcdir}/../include" -for ac_func in getenv abort errno \ +for ac_func in getenv abort strsignal errno \ malloc realloc calloc free clock do ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` @@ -6201,6 +6253,10 @@ cat >>confdefs.h <<\_ACEOF #define HAVE_DECL_ABORT 1 _ACEOF +cat >>confdefs.h <<\_ACEOF +#define HAVE_DECL_STRSIGNAL 1 +_ACEOF + cat >>confdefs.h <<\_ACEOF #define HAVE_DECL_ERRNO 1 _ACEOF @@ -7351,6 +7407,7 @@ GREP!$GREP$ac_delim EGREP!$EGREP$ac_delim warn_cflags!$warn_cflags$ac_delim SET_MAKE!$SET_MAKE$ac_delim +AWK!$AWK$ac_delim LN!$LN$ac_delim LN_S!$LN_S$ac_delim RANLIB!$RANLIB$ac_delim @@ -7396,7 +7453,6 @@ md_file!$md_file$ac_delim out_file!$out_file$ac_delim out_object_file!$out_object_file$ac_delim symbolic_link!$symbolic_link$ac_delim -thread_file!$thread_file$ac_delim _ACEOF if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then @@ -7438,12 +7494,13 @@ _ACEOF ac_delim='%!_!# ' for ac_last_try in false false false false false :; do cat >conf$$subs.sed <<_ACEOF +thread_file!$thread_file$ac_delim c_target_objs!$c_target_objs$ac_delim LIBOBJS!$LIBOBJS$ac_delim LTLIBOBJS!$LTLIBOBJS$ac_delim _ACEOF - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 3; then + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 4; then break elif $ac_last_try; then { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 diff --git a/support/cpp2/configure.in b/support/cpp2/configure.in index 1a2abb5b..ef1d7ec6 100644 --- a/support/cpp2/configure.in +++ b/support/cpp2/configure.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"]) -- 2.47.2