From 9ad1f135fafcca1d43766dc928e50e4de201614c Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Wed, 21 Jan 1998 18:28:09 +0000 Subject: Added autoconf support for strerror/sys_errlist per Ralf Corsepius' direction. This fixes a problem reported by Steve Evans of Radstone since he is using glibc2. --- configure | 131 ++++++++++++++++++++++++++++++++++++++++++++------------------ 1 file changed, 94 insertions(+), 37 deletions(-) (limited to 'configure') diff --git a/configure b/configure index 6aa4c74f10..a64d5382f9 100644 --- a/configure +++ b/configure @@ -1028,11 +1028,66 @@ else echo "$ac_t""no" 1>&6 fi +for ac_func in strerror +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:1035: 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 < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { (eval echo configure:1063: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + # Extract the first word of "mkdir", so it can be a program name with args. set dummy mkdir; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1036: checking for $ac_word" >&5 +echo "configure:1091: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_MKDIR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1064,7 +1119,7 @@ fi echo $ac_n "checking for working $MKDIR -m 0755""... $ac_c" 1>&6 -echo "configure:1068: checking for working $MKDIR -m 0755" >&5 +echo "configure:1123: checking for working $MKDIR -m 0755" >&5 if eval "test \"`echo '$''{'rtems_cv_prog_MKDIR_P'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1081,7 +1136,7 @@ echo "$ac_t""$rtems_cv_prog_MKDIR_M" 1>&6 echo $ac_n "checking for working $MKDIR -p""... $ac_c" 1>&6 -echo "configure:1085: checking for working $MKDIR -p" >&5 +echo "configure:1140: checking for working $MKDIR -p" >&5 if eval "test \"`echo '$''{'rtems_cv_prog_mkdir_p'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1101,7 +1156,7 @@ test "$rtems_cv_prog_MKDIR_M" = "yes" && MKDIR="$MKDIR -m 0755" # Extract the first word of "touch", so it can be a program name with args. set dummy touch; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1105: checking for $ac_word" >&5 +echo "configure:1160: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_TOUCH'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1132,7 +1187,7 @@ fi # Extract the first word of "cmp", so it can be a program name with args. set dummy cmp; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1136: checking for $ac_word" >&5 +echo "configure:1191: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_CMP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1164,7 +1219,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:1168: checking for $ac_word" >&5 +echo "configure:1223: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_SED'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1197,7 +1252,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:1201: checking for $ac_word" >&5 +echo "configure:1256: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_M4'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1234,7 +1289,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:1238: checking for $ac_word" >&5 +echo "configure:1293: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_KSH'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1311,7 +1366,7 @@ case "${target}" in ;; *) echo $ac_n "checking rtems target cpu""... $ac_c" 1>&6 -echo "configure:1315: checking rtems target cpu" >&5 +echo "configure:1370: checking rtems target cpu" >&5 target_cpu=`echo $target | sed 's%^\([^-]*\)-\(.*\)$%\1%'` echo "$ac_t""$target_cpu" 1>&6 @@ -1330,7 +1385,7 @@ fi # Is this a supported CPU? echo $ac_n "checking if cpu $target_cpu is supported""... $ac_c" 1>&6 -echo "configure:1334: checking if cpu $target_cpu is supported" >&5 +echo "configure:1389: checking if cpu $target_cpu is supported" >&5 if test -d "$srcdir/c/src/exec/score/cpu/$target_cpu"; then echo "$ac_t""yes" 1>&6 makefiles="$makefiles c/src/exec/score/cpu/$target_cpu/Makefile" @@ -1341,7 +1396,7 @@ fi # find all the Executive Makefiles echo $ac_n "checking for Makefile.in in c/src/exec/score/tools/$target_cpu""... $ac_c" 1>&6 -echo "configure:1345: checking for Makefile.in in c/src/exec/score/tools/$target_cpu" >&5 +echo "configure:1400: checking for Makefile.in in c/src/exec/score/tools/$target_cpu" >&5 if test -d $srcdir/c/src/exec/score/tools/$target_cpu; then rtems_av_save_dir=`pwd`; cd $srcdir; @@ -1356,7 +1411,7 @@ fi echo $ac_n "checking for Makefile.in in c/src/exec/rtems""... $ac_c" 1>&6 -echo "configure:1360: checking for Makefile.in in c/src/exec/rtems" >&5 +echo "configure:1415: checking for Makefile.in in c/src/exec/rtems" >&5 if test -d $srcdir/c/src/exec/rtems; then rtems_av_save_dir=`pwd`; cd $srcdir; @@ -1371,7 +1426,7 @@ fi echo $ac_n "checking for Makefile.in in c/src/exec/sapi""... $ac_c" 1>&6 -echo "configure:1375: checking for Makefile.in in c/src/exec/sapi" >&5 +echo "configure:1430: checking for Makefile.in in c/src/exec/sapi" >&5 if test -d $srcdir/c/src/exec/sapi; then rtems_av_save_dir=`pwd`; cd $srcdir; @@ -1388,7 +1443,7 @@ fi if test "$RTEMS_HAS_POSIX_API" = "yes"; then echo $ac_n "checking for Makefile.in in c/src/exec/posix""... $ac_c" 1>&6 -echo "configure:1392: checking for Makefile.in in c/src/exec/posix" >&5 +echo "configure:1447: checking for Makefile.in in c/src/exec/posix" >&5 if test -d $srcdir/c/src/exec/posix; then rtems_av_save_dir=`pwd`; cd $srcdir; @@ -1410,7 +1465,7 @@ if test -d "$srcdir/c/src/lib/libbsp/$target_cpu"; then if test -z "$rtems_bsp"; then echo $ac_n "checking for bsps""... $ac_c" 1>&6 -echo "configure:1414: checking for bsps" >&5 +echo "configure:1469: checking for bsps" >&5 files=`ls $srcdir/c/src/lib/libbsp/$target_cpu` for file in $files; do case $file in @@ -1457,7 +1512,7 @@ echo "configure:1414: checking for bsps" >&5 bspdirs="$bspdirs $bspdir" echo $ac_n "checking for Makefile.in in c/src/lib/libbsp/$target_cpu/$bspdir""... $ac_c" 1>&6 -echo "configure:1461: checking for Makefile.in in c/src/lib/libbsp/$target_cpu/$bspdir" >&5 +echo "configure:1516: checking for Makefile.in in c/src/lib/libbsp/$target_cpu/$bspdir" >&5 if test -d $srcdir/c/src/lib/libbsp/$target_cpu/$bspdir; then rtems_av_save_dir=`pwd`; cd $srcdir; @@ -1480,7 +1535,7 @@ fi # find all the CPU dependent library Makefiles echo $ac_n "checking for Makefile.in in c/src/lib/libcpu/$target_cpu""... $ac_c" 1>&6 -echo "configure:1484: checking for Makefile.in in c/src/lib/libcpu/$target_cpu" >&5 +echo "configure:1539: checking for Makefile.in in c/src/lib/libcpu/$target_cpu" >&5 if test -d $srcdir/c/src/lib/libcpu/$target_cpu; then rtems_av_save_dir=`pwd`; cd $srcdir; @@ -1497,7 +1552,7 @@ fi if test "$skip_startfiles" != "yes"; then echo $ac_n "checking for Makefile.in in c/src/lib/start/$target_cpu""... $ac_c" 1>&6 -echo "configure:1501: checking for Makefile.in in c/src/lib/start/$target_cpu" >&5 +echo "configure:1556: checking for Makefile.in in c/src/lib/start/$target_cpu" >&5 if test -d $srcdir/c/src/lib/start/$target_cpu; then rtems_av_save_dir=`pwd`; cd $srcdir; @@ -1554,7 +1609,7 @@ fi # If the tests are enabled, then find all the test suite Makefiles echo $ac_n "checking Are the test suites enabled? ""... $ac_c" 1>&6 -echo "configure:1558: checking Are the test suites enabled? " >&5 +echo "configure:1613: checking Are the test suites enabled? " >&5 tests_enabled=yes # Check whether --enable-tests or --disable-tests was given. if test "${enable_tests+set}" = set; then @@ -1574,7 +1629,7 @@ fi if test "$tests_enabled" = "yes"; then echo $ac_n "checking for Makefile.in in c/src/tests/tools/$target_cpu""... $ac_c" 1>&6 -echo "configure:1578: checking for Makefile.in in c/src/tests/tools/$target_cpu" >&5 +echo "configure:1633: checking for Makefile.in in c/src/tests/tools/$target_cpu" >&5 if test -d $srcdir/c/src/tests/tools/$target_cpu; then rtems_av_save_dir=`pwd`; cd $srcdir; @@ -1589,7 +1644,7 @@ fi echo $ac_n "checking for Makefile.in in c/src/tests/libtests""... $ac_c" 1>&6 -echo "configure:1593: checking for Makefile.in in c/src/tests/libtests" >&5 +echo "configure:1648: checking for Makefile.in in c/src/tests/libtests" >&5 if test -d $srcdir/c/src/tests/libtests; then rtems_av_save_dir=`pwd`; cd $srcdir; @@ -1604,7 +1659,7 @@ fi echo $ac_n "checking for Makefile.in in c/src/tests/sptests""... $ac_c" 1>&6 -echo "configure:1608: checking for Makefile.in in c/src/tests/sptests" >&5 +echo "configure:1663: checking for Makefile.in in c/src/tests/sptests" >&5 if test -d $srcdir/c/src/tests/sptests; then rtems_av_save_dir=`pwd`; cd $srcdir; @@ -1619,7 +1674,7 @@ fi echo $ac_n "checking for Makefile.in in c/src/tests/tmtests""... $ac_c" 1>&6 -echo "configure:1623: checking for Makefile.in in c/src/tests/tmtests" >&5 +echo "configure:1678: checking for Makefile.in in c/src/tests/tmtests" >&5 if test -d $srcdir/c/src/tests/tmtests; then rtems_av_save_dir=`pwd`; cd $srcdir; @@ -1634,7 +1689,7 @@ fi echo $ac_n "checking for Makefile.in in c/src/tests/mptests""... $ac_c" 1>&6 -echo "configure:1638: checking for Makefile.in in c/src/tests/mptests" >&5 +echo "configure:1693: checking for Makefile.in in c/src/tests/mptests" >&5 if test -d $srcdir/c/src/tests/mptests; then rtems_av_save_dir=`pwd`; cd $srcdir; @@ -1650,7 +1705,7 @@ fi if test "$RTEMS_HAS_POSIX" = "yes"; then echo $ac_n "checking for Makefile.in in c/src/tests/psxtests""... $ac_c" 1>&6 -echo "configure:1654: checking for Makefile.in in c/src/tests/psxtests" >&5 +echo "configure:1709: checking for Makefile.in in c/src/tests/psxtests" >&5 if test -d $srcdir/c/src/tests/psxtests; then rtems_av_save_dir=`pwd`; cd $srcdir; @@ -1668,7 +1723,7 @@ fi # If the HWAPI is enabled, the find the HWAPI Makefiles echo $ac_n "checking Is the HWAPI enabled? ""... $ac_c" 1>&6 -echo "configure:1672: checking Is the HWAPI enabled? " >&5 +echo "configure:1727: checking Is the HWAPI enabled? " >&5 # Check whether --enable-hwapi or --disable-hwapi was given. if test "${enable_hwapi+set}" = set; then enableval="$enable_hwapi" @@ -1679,7 +1734,7 @@ if test "${enable_hwapi+set}" = set; then makefiles="$makefiles c/src/lib/libhwapi/Makefile" echo $ac_n "checking for Makefile.in in c/src/lib/libhwapi/analog""... $ac_c" 1>&6 -echo "configure:1683: checking for Makefile.in in c/src/lib/libhwapi/analog" >&5 +echo "configure:1738: checking for Makefile.in in c/src/lib/libhwapi/analog" >&5 if test -d $srcdir/c/src/lib/libhwapi/analog; then rtems_av_save_dir=`pwd`; cd $srcdir; @@ -1694,7 +1749,7 @@ fi echo $ac_n "checking for Makefile.in in c/src/lib/libhwapi/discrete""... $ac_c" 1>&6 -echo "configure:1698: checking for Makefile.in in c/src/lib/libhwapi/discrete" >&5 +echo "configure:1753: checking for Makefile.in in c/src/lib/libhwapi/discrete" >&5 if test -d $srcdir/c/src/lib/libhwapi/discrete; then rtems_av_save_dir=`pwd`; cd $srcdir; @@ -1709,7 +1764,7 @@ fi echo $ac_n "checking for Makefile.in in c/src/lib/libhwapi/drivers""... $ac_c" 1>&6 -echo "configure:1713: checking for Makefile.in in c/src/lib/libhwapi/drivers" >&5 +echo "configure:1768: checking for Makefile.in in c/src/lib/libhwapi/drivers" >&5 if test -d $srcdir/c/src/lib/libhwapi/drivers; then rtems_av_save_dir=`pwd`; cd $srcdir; @@ -1724,7 +1779,7 @@ fi echo $ac_n "checking for Makefile.in in c/src/lib/libhwapi/non_volatile_memory""... $ac_c" 1>&6 -echo "configure:1728: checking for Makefile.in in c/src/lib/libhwapi/non_volatile_memory" >&5 +echo "configure:1783: checking for Makefile.in in c/src/lib/libhwapi/non_volatile_memory" >&5 if test -d $srcdir/c/src/lib/libhwapi/non_volatile_memory; then rtems_av_save_dir=`pwd`; cd $srcdir; @@ -1739,7 +1794,7 @@ fi echo $ac_n "checking for Makefile.in in c/src/lib/libhwapi/serial""... $ac_c" 1>&6 -echo "configure:1743: checking for Makefile.in in c/src/lib/libhwapi/serial" >&5 +echo "configure:1798: checking for Makefile.in in c/src/lib/libhwapi/serial" >&5 if test -d $srcdir/c/src/lib/libhwapi/serial; then rtems_av_save_dir=`pwd`; cd $srcdir; @@ -1754,7 +1809,7 @@ fi echo $ac_n "checking for Makefile.in in c/src/lib/libhwapi/support""... $ac_c" 1>&6 -echo "configure:1758: checking for Makefile.in in c/src/lib/libhwapi/support" >&5 +echo "configure:1813: checking for Makefile.in in c/src/lib/libhwapi/support" >&5 if test -d $srcdir/c/src/lib/libhwapi/support; then rtems_av_save_dir=`pwd`; cd $srcdir; @@ -1769,7 +1824,7 @@ fi echo $ac_n "checking for Makefile.in in c/src/lib/libhwapi/wrapup""... $ac_c" 1>&6 -echo "configure:1773: checking for Makefile.in in c/src/lib/libhwapi/wrapup" >&5 +echo "configure:1828: checking for Makefile.in in c/src/lib/libhwapi/wrapup" >&5 if test -d $srcdir/c/src/lib/libhwapi/wrapup; then rtems_av_save_dir=`pwd`; cd $srcdir; @@ -1812,7 +1867,7 @@ fi # pick up all the Makefiles in required parts of the tree echo $ac_n "checking for Makefile.in in c/build-tools""... $ac_c" 1>&6 -echo "configure:1816: checking for Makefile.in in c/build-tools" >&5 +echo "configure:1871: checking for Makefile.in in c/build-tools" >&5 if test -d $srcdir/c/build-tools; then rtems_av_save_dir=`pwd`; cd $srcdir; @@ -1827,7 +1882,7 @@ fi echo $ac_n "checking for Makefile.in in make""... $ac_c" 1>&6 -echo "configure:1831: checking for Makefile.in in make" >&5 +echo "configure:1886: checking for Makefile.in in make" >&5 if test -d $srcdir/make; then rtems_av_save_dir=`pwd`; cd $srcdir; @@ -1842,7 +1897,7 @@ fi echo $ac_n "checking for Makefile.in in c/src/lib/libmisc""... $ac_c" 1>&6 -echo "configure:1846: checking for Makefile.in in c/src/lib/libmisc" >&5 +echo "configure:1901: checking for Makefile.in in c/src/lib/libmisc" >&5 if test -d $srcdir/c/src/lib/libmisc; then rtems_av_save_dir=`pwd`; cd $srcdir; @@ -1857,7 +1912,7 @@ fi echo $ac_n "checking for Makefile.in in c/src/tests/samples""... $ac_c" 1>&6 -echo "configure:1861: checking for Makefile.in in c/src/tests/samples" >&5 +echo "configure:1916: checking for Makefile.in in c/src/tests/samples" >&5 if test -d $srcdir/c/src/tests/samples; then rtems_av_save_dir=`pwd`; cd $srcdir; @@ -2017,6 +2072,7 @@ $makefiles make/host.cfg make/target.cfg make/Templates/Makefile.inc +c/build-tools/src/config.h c/update-tools/Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 EOF cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF -- cgit v1.2.3