From ce9b5c4919e54be00a45a7ca30ebac99bc552cae Mon Sep 17 00:00:00 2001 From: Samuel Tardieu Date: Thu, 24 Sep 1998 13:52:23 +0000 Subject: [PATCH] Regenerated Subversion-branch: /importfromcvs/trunk Subversion-revision: 47009 --- aclocal.m4 | 2 +- configure | 105 +++++++++++++++++++++++++------------------------ support/ada.m4 | 33 +++++++++++++++- 3 files changed, 85 insertions(+), 55 deletions(-) diff --git a/aclocal.m4 b/aclocal.m4 index b5ab1ae12..56d385cf4 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -141,7 +141,7 @@ dnl Look for an Ada compiler (ADA environment variable, then gcc, then $CC) AC_DEFUN(AM_PROG_ADA, [AC_BEFORE([$0], [AM_TRY_ADA]) AC_REQUIRE([AC_PROG_CC]) -AC_CHECK_PROG(ADA, gcc, gcc) +AC_CHECK_PROG(ADA, GNAT, gnatgcc, gcc) if test -z "$ADA"; then AC_MSG_RESULT([ Tentatively using $CC as an Ada compiler]) ADA="$CC" diff --git a/configure b/configure index 351e62128..d118510cf 100755 --- a/configure +++ b/configure @@ -1091,8 +1091,8 @@ fi -# Extract the first word of "gcc", so it can be a program name with args. -set dummy gcc; ac_word=$2 +# Extract the first word of "GNAT", so it can be a program name with args. +set dummy GNAT; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo "configure:1098: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_ADA'+set}'`\" = set"; then @@ -1105,11 +1105,12 @@ else for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then - ac_cv_prog_ADA="gcc" + ac_cv_prog_ADA="gnatgcc" break fi done IFS="$ac_save_ifs" + test -z "$ac_cv_prog_ADA" && ac_cv_prog_ADA="gcc" fi fi ADA="$ac_cv_prog_ADA" @@ -1125,7 +1126,7 @@ if test -z "$ADA"; then fi echo $ac_n "checking if the$crossflagmsg Ada compiler works""... $ac_c" 1>&6 -echo "configure:1129: checking if the$crossflagmsg Ada compiler works" >&5 +echo "configure:1130: checking if the$crossflagmsg Ada compiler works" >&5 mkdir conftest cat > conftest/check.adb <&5; (eval $ac_try) 2>&5; }; then +if { (eval echo configure:1142: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; then rm -rf conftest* echo "$ac_t""yes" 1>&6 else @@ -1156,7 +1157,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:1160: checking for $ac_word" >&5 +echo "configure:1161: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_ADA_FOR_TARGET'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1193,7 +1194,7 @@ done crossflagmsg=" cross" echo $ac_n "checking if the$crossflagmsg Ada compiler works""... $ac_c" 1>&6 -echo "configure:1197: checking if the$crossflagmsg Ada compiler works" >&5 +echo "configure:1198: checking if the$crossflagmsg Ada compiler works" >&5 mkdir conftest cat > conftest/check.adb <&5; (eval $ac_try) 2>&5; }; then +if { (eval echo configure:1210: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; then rm -rf conftest* echo "$ac_t""yes" 1>&6 else @@ -1219,19 +1220,19 @@ rm -f conftest* fi echo $ac_n "checking for Cygwin32 environment""... $ac_c" 1>&6 -echo "configure:1223: checking for Cygwin32 environment" >&5 +echo "configure:1224: checking for Cygwin32 environment" >&5 if eval "test \"`echo '$''{'am_cv_cygwin32'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1236: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* am_cv_cygwin32=yes else @@ -1248,19 +1249,19 @@ echo "$ac_t""$am_cv_cygwin32" 1>&6 CYGWIN32= test "$am_cv_cygwin32" = yes && CYGWIN32=yes echo $ac_n "checking for Mingw32 environment""... $ac_c" 1>&6 -echo "configure:1252: checking for Mingw32 environment" >&5 +echo "configure:1253: checking for Mingw32 environment" >&5 if eval "test \"`echo '$''{'am_cv_mingw32'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1265: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* am_cv_mingw32=yes else @@ -1279,7 +1280,7 @@ test "$am_cv_mingw32" = yes && MINGW32=yes echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 -echo "configure:1283: checking for executable suffix" >&5 +echo "configure:1284: checking for executable suffix" >&5 if eval "test \"`echo '$''{'am_cv_exeext'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1312,7 +1313,7 @@ echo "$ac_t""${am_cv_exeext}" 1>&6 # 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:1316: checking for $ac_word" >&5 +echo "configure:1317: 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 @@ -1343,7 +1344,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:1347: checking for $ac_word" >&5 +echo "configure:1348: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_SED'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1376,7 +1377,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:1380: checking for $ac_word" >&5 +echo "configure:1381: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_TAR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1407,7 +1408,7 @@ done # Extract the first word of "gunzip", so it can be a program name with args. set dummy gunzip; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1411: checking for $ac_word" >&5 +echo "configure:1412: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_UNZIP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1435,7 +1436,7 @@ fi # Extract the first word of "gnatmake", so it can be a program name with args. set dummy gnatmake; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1439: checking for $ac_word" >&5 +echo "configure:1440: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_GNATMAKE'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1495,7 +1496,7 @@ if test "${with_launching+set}" = set; then withval="$with_launching" echo $ac_n "checking launching facilities""... $ac_c" 1>&6 -echo "configure:1499: checking launching facilities" >&5 +echo "configure:1500: checking launching facilities" >&5 case ${withval} in yes) LAUNCHINGSOURCES="\$(LAUNCHINGSOURCES)"; @@ -1512,7 +1513,7 @@ echo "configure:1499: checking launching facilities" >&5 else echo $ac_n "checking launching facilities""... $ac_c" 1>&6 -echo "configure:1516: checking launching facilities" >&5 +echo "configure:1517: checking launching facilities" >&5 LAUNCHINGSOURCES="\$(LAUNCHINGSOURCES)"; LAUNCHINGOBJECTS="\$(LAUNCHINGOBJECTS)"; LAUNCHING_INCLUDED=""; @@ -1528,7 +1529,7 @@ fi # echo $ac_n "checking for GNAT sources""... $ac_c" 1>&6 -echo "configure:1532: checking for GNAT sources" >&5 +echo "configure:1533: checking for GNAT sources" >&5 if test -f gnat/osint.ads; then GNAT_SOURCE=../gnat echo "$ac_t""gnat" 1>&6 @@ -1553,7 +1554,7 @@ echo "configure:1532: checking for GNAT sources" >&5 # Extract the first word of "gnatls", so it can be a program name with args. set dummy gnatls; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1557: checking for $ac_word" >&5 +echo "configure:1558: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_GNATLS'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1581,7 +1582,7 @@ fi # Extract the first word of "sed", so it can be a program name with args. set dummy sed; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1585: checking for $ac_word" >&5 +echo "configure:1586: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_SED'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1607,7 +1608,7 @@ else fi echo $ac_n "checking if the Ada compiler is recent enough""... $ac_c" 1>&6 -echo "configure:1611: checking if the Ada compiler is recent enough" >&5 +echo "configure:1612: checking if the Ada compiler is recent enough" >&5 am_gnatls_date=`$GNATLS -v | $SED -ne 's/^GNATLS .*(\(.*\)).*$/\1/p'` if test "980803" -le "$am_gnatls_date"; then echo "$ac_t""yes" 1>&6 @@ -1621,7 +1622,7 @@ fi # Platform specific # echo $ac_n "checking which platform-specific variant to use""... $ac_c" 1>&6 -echo "configure:1625: checking which platform-specific variant to use" >&5 +echo "configure:1626: checking which platform-specific variant to use" >&5 # Check whether --with-platform or --without-platform was given. if test "${with_platform+set}" = set; then withval="$with_platform" @@ -1660,7 +1661,7 @@ case "${PLATFORM_SPECIFIC}" in esac echo "$ac_t""$PSNAME" 1>&6 echo $ac_n "checking preserve the original file properties with""... $ac_c" 1>&6 -echo "configure:1664: checking preserve the original file properties with" >&5 +echo "configure:1665: checking preserve the original file properties with" >&5 case "${PLATFORM_SPECIFIC}" in w) CP_PRESERVE="-lf";; @@ -1672,7 +1673,7 @@ echo "$ac_t""$CP_PRESERVE" 1>&6 # LinuxThreads with libc1. This crashes the machine. # echo $ac_n "checking if platform supports local launching""... $ac_c" 1>&6 -echo "configure:1676: checking if platform supports local launching" >&5 +echo "configure:1677: checking if platform supports local launching" >&5 case "${target}" in *-linux*libc1*) SUPPORTS_LOCAL_LAUNCH=False; echo "$ac_t""no" 1>&6;; *) SUPPORTS_LOCAL_LAUNCH=True; echo "$ac_t""yes" 1>&6;; @@ -1682,7 +1683,7 @@ esac # Remote shell # echo $ac_n "checking which remote shell to use""... $ac_c" 1>&6 -echo "configure:1686: checking which remote shell to use" >&5 +echo "configure:1687: checking which remote shell to use" >&5 # Check whether --with-remsh or --without-remsh was given. if test "${with_remsh+set}" = set; then withval="$with_remsh" @@ -1712,7 +1713,7 @@ if test "${with_protocols+set}" = set; then withval="$with_protocols" echo $ac_n "checking default protocols""... $ac_c" 1>&6 -echo "configure:1716: checking default protocols" >&5 +echo "configure:1717: checking default protocols" >&5 LIST=""; PROTOCOLSSOURCES=""; PROTOCOLSOBJECTS=""; @@ -1737,7 +1738,7 @@ echo "configure:1716: checking default protocols" >&5 else echo $ac_n "checking default protocols""... $ac_c" 1>&6 -echo "configure:1741: checking default protocols" >&5 +echo "configure:1742: checking default protocols" >&5 PROTOCOLSSOURCES="\$(TCPSOURCES)"; PROTOCOLSOBJECTS="\$(TCPOBJECTS)"; TCP_INCLUDED="" @@ -1771,13 +1772,13 @@ else ISTHRBIO="yes" if test "${PLATFORM_SPECIFIC}" = "w"; then echo $ac_n "checking for thread-blocking I/O""... $ac_c" 1>&6 -echo "configure:1775: checking for thread-blocking I/O" >&5 +echo "configure:1776: checking for thread-blocking I/O" >&5 echo "with System.Garlic.Thin;" >$srcdir/Garlic/s-gatcop.ads echo "package System.Garlic.TCP.Operations" >>$srcdir/Garlic/s-gatcop.ads echo " renames System.Garlic.Thin;" >>$srcdir/Garlic/s-gatcop.ads else echo $ac_n "checking for thread-blocking I/O (long)""... $ac_c" 1>&6 -echo "configure:1781: checking for thread-blocking I/O (long)" >&5 +echo "configure:1782: checking for thread-blocking I/O (long)" >&5 ${ADA} -c -gnatg $srcdir/Garlic/${TCP_PLATFORM_SOURCE} -I$srcdir/Garlic; ${ADA} -c -gnatg $srcdir/Garlic/s-garlic.ads -I$srcdir/Garlic; ${ADA} -c -gnatg $srcdir/Garlic/s-garthi.ads -I$srcdir/Garlic; @@ -1816,7 +1817,7 @@ else fi echo $ac_n "checking default filters""... $ac_c" 1>&6 -echo "configure:1820: checking default filters" >&5 +echo "configure:1821: checking default filters" >&5 if test -d Garlic; then : @@ -1851,7 +1852,7 @@ fi # if test $target = $host; then echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:1855: checking how to run the C preprocessor" >&5 +echo "configure:1856: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -1866,13 +1867,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:1876: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1877: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then : @@ -1883,13 +1884,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:1893: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1894: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then : @@ -1915,17 +1916,17 @@ for ac_hdr in stdio.h sys/types.h sys/socket.h errno.h netdb.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1919: checking for $ac_hdr" >&5 +echo "configure:1920: 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:1929: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1930: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -1955,17 +1956,17 @@ for ac_hdr in netinet/in.h signal.h fcntl.h termio.h termios.h sys/file.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1959: checking for $ac_hdr" >&5 +echo "configure:1960: 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:1969: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1970: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -1995,17 +1996,17 @@ for ac_hdr in sys/ioctl.h netinet/tcp.h sys/systeminfo.h poll.h stropts.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1999: checking for $ac_hdr" >&5 +echo "configure:2000: 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:2009: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2010: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2035,17 +2036,17 @@ for ac_hdr in sys/conf.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2039: checking for $ac_hdr" >&5 +echo "configure:2040: 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:2049: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2050: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* diff --git a/support/ada.m4 b/support/ada.m4 index 29bec3e5f..4ab91d953 100644 --- a/support/ada.m4 +++ b/support/ada.m4 @@ -2,7 +2,7 @@ ## Contributed by Samuel Tardieu dnl Usage: AM_PROG_ADA -dnl Look for an Ada compiler (ADA environment variable, gnatgcc, gcc, $CC) +dnl Look for an Ada compiler (ADA environment variable, then gcc, then $CC) AC_DEFUN(AM_PROG_ADA, [AC_BEFORE([$0], [AM_TRY_ADA]) @@ -38,7 +38,7 @@ dnl (especially the standard libraries such as Ada.Text_IO) AC_DEFUN(AM_PROG_WORKING_ADA, [AC_REQUIRE([AM_PROG_ADA]) -AC_MSG_CHECKING([if the Ada compiler works]) +AC_MSG_CHECKING([if the$crossflagmsg Ada compiler works]) AM_TRY_ADA([check.adb], [with Ada.Text_IO; procedure Check is @@ -66,3 +66,32 @@ else AC_MSG_ERROR([Please get a version of GNAT no older than [$2 ($1)] (it looks like you only have GNAT [$am_gnatls_version ($am_gnatls_date)])]) fi]) + +dnl Usage: AM_CROSS_PROG_ADA +dnl Look for an Ada compiler for the target (same as the host one if host and +dnl target are equal) + +AC_DEFUN(AM_CROSS_PROG_ADA, +[AC_REQUIRE([AM_PROG_WORKING_ADA]) + if test $host = $target; then + ADA_FOR_TARGET=$ADA + AC_SUBST(ADA_FOR_TARGET) + else + AC_CHECK_PROGS(ADA_FOR_TARGET, [$target_alias-$ADA $target-$ADA]) + fi +]) + +dnl Usage: AM_CROSS_PROG_WORKING_ADA +dnl Try to use Ada compiler for the target if it is different from the host + +AC_DEFUN(AM_CROSS_PROG_WORKING_ADA, +[AC_REQUIRE([AM_CROSS_PROG_ADA]) + if test $host != $target; then + OLDADA=$ADA + ADA=$ADA_FOR_TARGET + crossflagmsg=" cross" + AM_PROG_WORKING_ADA + crossflagmsg="" + ADA=$OLDADA + fi +])