From e8b90e821cd252a9501f5c9b86eb7b1c2dd829b5 Mon Sep 17 00:00:00 2001 From: johanknol Date: Tue, 6 Mar 2001 09:30:27 +0000 Subject: [PATCH] Latest commit was incomplete Use configure generated PORT values (ports.all and ports.build) git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@672 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- Makefile | 4 +- clean.mk | 2 +- configure | 337 ++++++++++++++++++++++++++++++++------------------ configure.in | 67 ++++++++-- sdccconf_in.h | 8 +- 5 files changed, 288 insertions(+), 130 deletions(-) diff --git a/Makefile b/Makefile index 029f78c6..fe11386e 100644 --- a/Makefile +++ b/Makefile @@ -20,8 +20,8 @@ PKGS = $(SDCC_MISC) $(SDCC_LIBS) $(SDCC_ASLINK) \ src device/include device/lib $(SDCC_PACKIHX) PKGS_TINI = $(SDCC_LIBS) $(SDCC_ASLINK) \ src device/include $(SDCC_PACKIHX) -PORTS = mcs51 z80 - +PORTS = $(shell cat ports.build) +ALLPORTS = $(shell cat ports.all) # Compiling entire program or any subproject # ------------------------------------------ diff --git a/clean.mk b/clean.mk index 67b985f3..29e9e940 100644 --- a/clean.mk +++ b/clean.mk @@ -11,7 +11,7 @@ clean: distclean: clean rm -f config.cache config.log config.status Makefile.common rm -f sdccconf.h main.mk *.dep - + rm ports.all ports.build # Like clean but some files may still exist # ----------------------------------------- diff --git a/configure b/configure index f74ac2d2..e1bcf72a 100755 --- a/configure +++ b/configure @@ -12,13 +12,21 @@ ac_help= ac_default_prefix=/usr/local # Any additions from configure.in: ac_help="$ac_help ---disable-z80-port: Excludes the z80 port" +--disable-mcs51-port: Excludes the Intel mcs51 port" ac_help="$ac_help --disable-gbz80-port: Excludes the Gameboy gbz80 port" ac_help="$ac_help ---disable-mcs51-port: Excludes the Intel mcs51 port" +--disable-z80-port: Excludes the z80 port" ac_help="$ac_help --disable-avr-port: Excludes the AVR port" +ac_help="$ac_help +--disable-ds390-port: Excludes the DS390 port" +ac_help="$ac_help +--disable-pic-port: Excludes the PIC port" +ac_help="$ac_help +--disable-i186-port: Excludes the I186 port" +ac_help="$ac_help +--disable-tlcs900h-port: Excludes the TLCS900H port" # Initialize some variables set by options. # The variables have the same names as the options, with @@ -536,7 +544,7 @@ 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 $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:540: checking for $ac_word" >&5 +echo "configure:548: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -567,7 +575,7 @@ done echo $ac_n "checking version of the package""... $ac_c" 1>&6 -echo "configure:571: checking version of the package" >&5 +echo "configure:579: checking version of the package" >&5 if test -f .version; then VERSION=`cat .version` elif test -f ../.version; then @@ -609,7 +617,7 @@ sdcc_cv_versionp=$VERSIONP # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:613: checking for $ac_word" >&5 +echo "configure:621: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -639,7 +647,7 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:643: checking for $ac_word" >&5 +echo "configure:651: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -690,7 +698,7 @@ fi # Extract the first word of "cl", so it can be a program name with args. set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:694: checking for $ac_word" >&5 +echo "configure:702: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -722,7 +730,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:726: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:734: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -733,12 +741,12 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF -#line 737 "configure" +#line 745 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:742: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:750: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -764,12 +772,12 @@ if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:768: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:776: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:773: checking whether we are using GNU C" >&5 +echo "configure:781: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -778,7 +786,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:782: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:790: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -797,7 +805,7 @@ ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:801: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:809: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -833,7 +841,7 @@ 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 $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:837: checking for $ac_word" >&5 +echo "configure:845: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -865,7 +873,7 @@ test -n "$CXX" || CXX="gcc" echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:869: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5 +echo "configure:877: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5 ac_ext=C # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -876,12 +884,12 @@ cross_compiling=$ac_cv_prog_cxx_cross cat > conftest.$ac_ext << EOF -#line 880 "configure" +#line 888 "configure" #include "confdefs.h" int main(){return(0);} EOF -if { (eval echo configure:885: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:893: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cxx_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -907,12 +915,12 @@ if test $ac_cv_prog_cxx_works = no; then { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:911: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:919: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6 cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6 -echo "configure:916: checking whether we are using GNU C++" >&5 +echo "configure:924: checking whether we are using GNU C++" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -921,7 +929,7 @@ else yes; #endif EOF -if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:925: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:933: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gxx=yes else ac_cv_prog_gxx=no @@ -940,7 +948,7 @@ ac_test_CXXFLAGS="${CXXFLAGS+set}" ac_save_CXXFLAGS="$CXXFLAGS" CXXFLAGS= echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6 -echo "configure:944: checking whether ${CXX-g++} accepts -g" >&5 +echo "configure:952: checking whether ${CXX-g++} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -972,7 +980,7 @@ else fi echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:976: checking how to run the C preprocessor" >&5 +echo "configure:984: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -987,13 +995,13 @@ else # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:997: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1005: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -1004,13 +1012,13 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1014: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1022: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -1021,13 +1029,13 @@ else rm -rf conftest* CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1031: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1039: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -1082,7 +1090,7 @@ ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:1086: checking for a BSD compatible install" >&5 +echo "configure:1094: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1137,7 +1145,7 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1141: checking for $ac_word" >&5 +echo "configure:1149: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1167,7 +1175,7 @@ fi # Extract the first word of "flex", so it can be a program name with args. set dummy flex; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1171: checking for $ac_word" >&5 +echo "configure:1179: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1201,7 +1209,7 @@ then *) ac_lib=l ;; esac echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6 -echo "configure:1205: checking for yywrap in -l$ac_lib" >&5 +echo "configure:1213: checking for yywrap in -l$ac_lib" >&5 ac_lib_var=`echo $ac_lib'_'yywrap | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1209,7 +1217,7 @@ else ac_save_LIBS="$LIBS" LIBS="-l$ac_lib $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1232: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1245,7 +1253,7 @@ fi # Extract the first word of "bison", so it can be a program name with args. set dummy bison; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1249: checking for $ac_word" >&5 +echo "configure:1257: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1275,7 +1283,7 @@ fi # Extract the first word of "autoconf", so it can be a program name with args. set dummy autoconf; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1279: checking for $ac_word" >&5 +echo "configure:1287: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_AUTOCONF'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1305,7 +1313,7 @@ fi # Extract the first word of "as", so it can be a program name with args. set dummy as; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1309: checking for $ac_word" >&5 +echo "configure:1317: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1335,7 +1343,7 @@ fi # Extract the first word of "cp", so it can be a program name with args. set dummy cp; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1339: checking for $ac_word" >&5 +echo "configure:1347: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1385,12 +1393,12 @@ cross_compiling=$ac_cv_prog_cc_cross # Checking for header files. # =========================================================================== echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:1389: checking for ANSI C header files" >&5 +echo "configure:1397: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -1398,7 +1406,7 @@ else #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1402: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1410: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -1415,7 +1423,7 @@ rm -f conftest* if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -1433,7 +1441,7 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -1454,7 +1462,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -1465,7 +1473,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:1469: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1477: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -1492,17 +1500,17 @@ for ac_hdr in getopt.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1496: checking for $ac_hdr" >&5 +echo "configure:1504: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1506: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1514: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -1532,17 +1540,17 @@ for ac_hdr in unistd.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1536: checking for $ac_hdr" >&5 +echo "configure:1544: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1546: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1554: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -1572,17 +1580,17 @@ for ac_hdr in endian.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1576: checking for $ac_hdr" >&5 +echo "configure:1584: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1586: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1594: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -1612,17 +1620,17 @@ for ac_hdr in malloc.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1616: checking for $ac_hdr" >&5 +echo "configure:1624: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1626: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1634: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -1652,17 +1660,17 @@ for ac_hdr in sys/isa_defs.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1656: checking for $ac_hdr" >&5 +echo "configure:1664: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1666: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1674: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -1692,17 +1700,17 @@ for ac_hdr in sys/socket.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1696: checking for $ac_hdr" >&5 +echo "configure:1704: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1706: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1714: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -1733,12 +1741,12 @@ for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 -echo "configure:1737: checking for $ac_hdr that defines DIR" >&5 +echo "configure:1745: checking for $ac_hdr that defines DIR" >&5 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include <$ac_hdr> @@ -1746,7 +1754,7 @@ int main() { DIR *dirp = 0; ; return 0; } EOF -if { (eval echo configure:1750: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1758: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_header_dirent_$ac_safe=yes" else @@ -1771,7 +1779,7 @@ done # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. if test $ac_header_dirent = dirent.h; then echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 -echo "configure:1775: checking for opendir in -ldir" >&5 +echo "configure:1783: checking for opendir in -ldir" >&5 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1779,7 +1787,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldir $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1802: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1812,7 +1820,7 @@ fi else echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 -echo "configure:1816: checking for opendir in -lx" >&5 +echo "configure:1824: checking for opendir in -lx" >&5 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1820,7 +1828,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lx $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1843: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1857,13 +1865,13 @@ fi # This must be after CPP echo $ac_n "checking which header file defines FD_ macros""... $ac_c" 1>&6 -echo "configure:1861: checking which header file defines FD_ macros" >&5 +echo "configure:1869: checking which header file defines FD_ macros" >&5 if eval "test \"`echo '$''{'s51_cv_fd'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else sdcc_cv_fd="unknown" cat > conftest.$ac_ext < @@ -1879,7 +1887,7 @@ fi rm -f conftest* cat > conftest.$ac_ext < @@ -1895,7 +1903,7 @@ fi rm -f conftest* cat > conftest.$ac_ext < @@ -1975,12 +1983,12 @@ EOF for ac_func in strlen strcpy strcat strstr strcmp strerror strtok strdup do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:1979: checking for $ac_func" >&5 +echo "configure:1987: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2015: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2030,12 +2038,12 @@ done for ac_func in strchr memcpy do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2034: checking for $ac_func" >&5 +echo "configure:2042: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2070: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2085,12 +2093,12 @@ done for ac_func in fgets do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2089: checking for $ac_func" >&5 +echo "configure:2097: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2125: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2140,12 +2148,12 @@ done for ac_func in yylex do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2144: checking for $ac_func" >&5 +echo "configure:2152: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2180: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2196,14 +2204,14 @@ done # check if -lsocket && -lxnet is required to compile socket stuff echo $ac_n "checking for library containing socket""... $ac_c" 1>&6 -echo "configure:2200: checking for library containing socket" >&5 +echo "configure:2208: checking for library containing socket" >&5 if eval "test \"`echo '$''{'ac_cv_search_socket'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_func_search_save_LIBS="$LIBS" ac_cv_search_socket="no" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2226: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_search_socket="none required" else @@ -2225,7 +2233,7 @@ rm -f conftest* test "$ac_cv_search_socket" = "no" && for i in socket; do LIBS="-l$i $ac_func_search_save_LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2248: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_search_socket="-l$i" break @@ -2258,14 +2266,14 @@ else : fi echo $ac_n "checking for library containing inet_addr""... $ac_c" 1>&6 -echo "configure:2262: checking for library containing inet_addr" >&5 +echo "configure:2270: checking for library containing inet_addr" >&5 if eval "test \"`echo '$''{'ac_cv_search_inet_addr'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_func_search_save_LIBS="$LIBS" ac_cv_search_inet_addr="no" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2288: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_search_inet_addr="none required" else @@ -2287,7 +2295,7 @@ rm -f conftest* test "$ac_cv_search_inet_addr" = "no" && for i in nsl xnet; do LIBS="-l$i $ac_func_search_save_LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2310: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_search_inet_addr="-l$i" break @@ -2332,7 +2340,7 @@ fi # Checking characteristics of compilers and other programs # -------------------------------------------------------- echo $ac_n "checking whether preprocessor accepts -MM or -M""... $ac_c" 1>&6 -echo "configure:2336: checking whether preprocessor accepts -MM or -M" >&5 +echo "configure:2344: checking whether preprocessor accepts -MM or -M" >&5 if eval "test \"`echo '$''{'sdcc_cv_MM'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2354,7 +2362,7 @@ M_OR_MM=$sdcc_cv_MM # This is the first time when CFLAGS are set/modified!! echo $ac_n "checking whether $CC accepts -ggdb""... $ac_c" 1>&6 -echo "configure:2358: checking whether $CC accepts -ggdb" >&5 +echo "configure:2366: checking whether $CC accepts -ggdb" >&5 if eval "test \"`echo '$''{'sdcc_cv_CCggdb'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2379,7 +2387,7 @@ fi echo $ac_n "checking whether $CC accepts -pipe""... $ac_c" 1>&6 -echo "configure:2383: checking whether $CC accepts -pipe" >&5 +echo "configure:2391: checking whether $CC accepts -pipe" >&5 if eval "test \"`echo '$''{'sdcc_cv_CCpipe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2406,12 +2414,12 @@ fi # Checks for typedefs, structures, and compiler characteristics. # =========================================================================== echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:2410: checking return type of signal handlers" >&5 +echo "configure:2418: checking return type of signal handlers" >&5 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -2428,7 +2436,7 @@ int main() { int i; ; return 0; } EOF -if { (eval echo configure:2432: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2440: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else @@ -2518,20 +2526,23 @@ EOF # Now handle the port selection -# Check whether --enable-z80-port or --disable-z80-port was given. -if test "${enable_z80_port+set}" = set; then - enableval="$enable_z80_port" +rm -f ports.all ports.build +# Check whether --enable-mcs51-port or --disable-mcs51-port was given. +if test "${enable_mcs51_port+set}" = set; then + enableval="$enable_mcs51_port" : fi -if test "$enable_z80_port" = "no"; then +echo mcs51 >>ports.all +if test "$enable_mcs51_port" = "no"; then cat >> confdefs.h <>ports.build cat >> confdefs.h <>ports.all if test "$enable_gbz80_port" = "no"; then cat >> confdefs.h <>ports.build cat >> confdefs.h <>ports.all +if test "$enable_z80_port" = "no"; then cat >> confdefs.h <>ports.build cat >> confdefs.h <>ports.all if test "$enable_avr_port" = "no"; then cat >> confdefs.h <>ports.build cat >> confdefs.h <>ports.all +if test "$enable_ds390_port" = "no"; then + cat >> confdefs.h <>ports.build + cat >> confdefs.h <>ports.all +if test "$enable_pic_port" = "no"; then + cat >> confdefs.h <>ports.build + cat >> confdefs.h <>ports.all +if test "$enable_i186_port" = "no"; then + cat >> confdefs.h <>ports.build + cat >> confdefs.h <>ports.all +if test "$enable_tlcs900h_port" = "no"; then + cat >> confdefs.h <>ports.build + cat >> confdefs.h <ports +mv ports ports.all +cat ports.build | uniq >ports +mv ports ports.build + # Generating output files # =========================================================================== subdirs="sim/ucsim" diff --git a/configure.in b/configure.in index 69cb983b..926ba7ee 100755 --- a/configure.in +++ b/configure.in @@ -213,34 +213,85 @@ AC_DEFINE_UNQUOTED(SRCDIR, "${config_in}") # Now handle the port selection -AC_ARG_ENABLE(z80-port,--disable-z80-port: Excludes the z80 port) -if test "$enable_z80_port" = "no"; then - AC_DEFINE_UNQUOTED(OPT_DISABLE_Z80, 1) +rm -f ports.all ports.build +AC_ARG_ENABLE(mcs51-port,--disable-mcs51-port: Excludes the Intel mcs51 port) +echo mcs51 >>ports.all +if test "$enable_mcs51_port" = "no"; then + AC_DEFINE_UNQUOTED(OPT_DISABLE_MCS51, 1) else - AC_DEFINE_UNQUOTED(OPT_DISABLE_Z80, 0) + echo mcs51 >>ports.build + AC_DEFINE_UNQUOTED(OPT_DISABLE_MCS51, 0) fi AC_ARG_ENABLE(gbz80-port,--disable-gbz80-port: Excludes the Gameboy gbz80 port) +echo z80 >>ports.all if test "$enable_gbz80_port" = "no"; then AC_DEFINE_UNQUOTED(OPT_DISABLE_GBZ80, 1) else + echo z80 >>ports.build AC_DEFINE_UNQUOTED(OPT_DISABLE_GBZ80, 0) fi -AC_ARG_ENABLE(mcs51-port,--disable-mcs51-port: Excludes the Intel mcs51 port) -if test "$enable_mcs51_port" = "no"; then - AC_DEFINE_UNQUOTED(OPT_DISABLE_MCS51, 1) +AC_ARG_ENABLE(z80-port,--disable-z80-port: Excludes the z80 port) +echo z80 >>ports.all +if test "$enable_z80_port" = "no"; then + AC_DEFINE_UNQUOTED(OPT_DISABLE_Z80, 1) else - AC_DEFINE_UNQUOTED(OPT_DISABLE_MCS51, 0) + echo z80 >>ports.build + AC_DEFINE_UNQUOTED(OPT_DISABLE_Z80, 0) fi AC_ARG_ENABLE(avr-port,--disable-avr-port: Excludes the AVR port) +echo avr >>ports.all if test "$enable_avr_port" = "no"; then AC_DEFINE_UNQUOTED(OPT_DISABLE_AVR, 1) else + echo avr >>ports.build AC_DEFINE_UNQUOTED(OPT_DISABLE_AVR, 0) fi +AC_ARG_ENABLE(ds390-port,--disable-ds390-port: Excludes the DS390 port) +echo ds390 >>ports.all +if test "$enable_ds390_port" = "no"; then + AC_DEFINE_UNQUOTED(OPT_DISABLE_DS390, 1) +else + echo ds390 >>ports.build + AC_DEFINE_UNQUOTED(OPT_DISABLE_DS390, 0) +fi + +AC_ARG_ENABLE(pic-port,--disable-pic-port: Excludes the PIC port) +echo pic >>ports.all +if test "$enable_pic_port" = "no"; then + AC_DEFINE_UNQUOTED(OPT_DISABLE_PIC, 1) +else + echo pic >>ports.build + AC_DEFINE_UNQUOTED(OPT_DISABLE_PIC, 0) +fi + +AC_ARG_ENABLE(i186-port,--disable-i186-port: Excludes the I186 port) +echo izt >>ports.all +if test "$enable_i186_port" = "no"; then + AC_DEFINE_UNQUOTED(OPT_DISABLE_I186, 1) +else + echo izt >>ports.build + AC_DEFINE_UNQUOTED(OPT_DISABLE_I186, 0) +fi + +AC_ARG_ENABLE(tlcs900h-port,--disable-tlcs900h-port: Excludes the TLCS900H port) +echo izt >>ports.all +if test "$enable_tlcs900h_port" = "no"; then + AC_DEFINE_UNQUOTED(OPT_DISABLE_TLCS900H, 1) +else + echo izt >>ports.build + AC_DEFINE_UNQUOTED(OPT_DISABLE_TLCS900H, 0) +fi + +#remove duplicates +cat ports.all | uniq >ports +mv ports ports.all +cat ports.build | uniq >ports +mv ports ports.build + # Generating output files # =========================================================================== AC_CONFIG_SUBDIRS(sim/ucsim) diff --git a/sdccconf_in.h b/sdccconf_in.h index 70ca5cfc..a9afbb9f 100644 --- a/sdccconf_in.h +++ b/sdccconf_in.h @@ -28,10 +28,14 @@ #undef HAVE_STRERROR -#undef OPT_DISABLE_Z80 -#undef OPT_DISABLE_GBZ80 #undef OPT_DISABLE_MCS51 +#undef OPT_DISABLE_GBZ80 +#undef OPT_DISABLE_Z80 #undef OPT_DISABLE_AVR +#undef OPT_DISABLE_DS390 +#undef OPT_DISABLE_PIC +#undef OPT_DISABLE_I186 +#undef OPT_DISABLE_TLCS900H #endif -- 2.30.2