summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1998-02-17 13:48:43 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1998-02-17 13:48:43 +0000
commit3771cc6ee82b406fef5741faf9344ed5960e900c (patch)
tree39a701607ee05a2870ea177ea9db73332fd9cb9c
parentSwapped C++ and ASM "endifs" (diff)
downloadrtems-3771cc6ee82b406fef5741faf9344ed5960e900c.tar.bz2
Update from Ralf Corsepius:
Yep, I have a bunch of bug-fixes and additions pending (Yet another monster patch, ... I can hear you scream :-). 1) configure.in : one AC_CONFIG_HEADER(...) line too much. 5) configure.in: --enable-cpp should probably be renamed to --enable-cxx, as gnu-programs use "cxx" to specify C++ specific configure options, while cpp is used for the preprocessor (e.g egcs uses --with-cxx-includedir, autoconf internally uses $CXX),
-rw-r--r--configure1110
-rw-r--r--configure.in77
2 files changed, 1041 insertions, 146 deletions
diff --git a/configure b/configure
index 1b8384f162..1bf6a0b361 100644
--- a/configure
+++ b/configure
@@ -27,7 +27,7 @@ ac_help="$ac_help
--enable-rtems-inlines enable RTEMS inline functions (use macros)"
ac_help="$ac_help
\
- --enable-cpp enable C++ support, and build the rtems++ library"
+ --enable-cxx enable C++ support, and build the rtems++ library"
ac_help="$ac_help
\
--enable-gcc28 enable use of gcc 2.8.x features"
@@ -750,14 +750,14 @@ else
fi
-# Check whether --enable-cpp or --disable-cpp was given.
-if test "${enable_cpp+set}" = set; then
- enableval="$enable_cpp"
+# Check whether --enable-cxx or --disable-cxx was given.
+if test "${enable_cxx+set}" = set; then
+ enableval="$enable_cxx"
\
case "${enableval}" in
yes) RTEMS_HAS_CPLUSPLUS=yes ;;
no) RTEMS_HAS_CPLUSPLUS=no ;;
- *) { echo "configure: error: bad value ${enableval} for enable-cpp option" 1>&2; exit 1; } ;;
+ *) { echo "configure: error: bad value ${enableval} for enable-cxx option" 1>&2; exit 1; } ;;
esac
else
RTEMS_HAS_CPLUSPLUS=no
@@ -1028,66 +1028,11 @@ 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 <<EOF
-#line 1040 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
-#include <assert.h>
-/* 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 <<EOF
-#define $ac_tr_func 1
-EOF
-
-else
- echo "$ac_t""no" 1>&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:1091: checking for $ac_word" >&5
+echo "configure:1036: 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
@@ -1119,7 +1064,7 @@ fi
echo $ac_n "checking for working $MKDIR -m 0755""... $ac_c" 1>&6
-echo "configure:1123: checking for working $MKDIR -m 0755" >&5
+echo "configure:1068: 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
@@ -1136,7 +1081,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:1140: checking for working $MKDIR -p" >&5
+echo "configure:1085: 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
@@ -1156,7 +1101,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:1160: checking for $ac_word" >&5
+echo "configure:1105: 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
@@ -1187,7 +1132,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:1191: checking for $ac_word" >&5
+echo "configure:1136: 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
@@ -1219,7 +1164,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:1223: checking for $ac_word" >&5
+echo "configure:1168: 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
@@ -1252,7 +1197,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:1256: checking for $ac_word" >&5
+echo "configure:1201: 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
@@ -1289,7 +1234,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:1293: checking for $ac_word" >&5
+echo "configure:1238: 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
@@ -1330,7 +1275,6 @@ fi
-
RTEMS_HOST=$host_os
case "${target}" in
@@ -1363,7 +1307,7 @@ case "${target}" in
;;
*)
echo $ac_n "checking rtems target cpu""... $ac_c" 1>&6
-echo "configure:1367: checking rtems target cpu" >&5
+echo "configure:1311: checking rtems target cpu" >&5
target_cpu=`echo $target | sed 's%^\([^-]*\)-\(.*\)$%\1%'`
echo "$ac_t""$target_cpu" 1>&6
@@ -1382,7 +1326,7 @@ fi
# Is this a supported CPU?
echo $ac_n "checking if cpu $target_cpu is supported""... $ac_c" 1>&6
-echo "configure:1386: checking if cpu $target_cpu is supported" >&5
+echo "configure:1330: 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"
@@ -1390,10 +1334,941 @@ else
{ echo "configure: error: no" 1>&2; exit 1; }
fi
+
+if [ "${program_prefix}" = "NONE" ] ; then
+ if [ "${target}" = "${host}" ] ; then
+ program_prefix=
+ else
+ program_prefix=${target}-
+ fi
+fi
+
+CC="$program_prefix"gcc
+
+# 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:1352: 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
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_CC="gcc"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+fi
+fi
+CC="$ac_cv_prog_CC"
+if test -n "$CC"; then
+ echo "$ac_t""$CC" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+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:1381: 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
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ ac_prog_rejected=no
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
+ ac_prog_rejected=yes
+ continue
+ fi
+ ac_cv_prog_CC="cc"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+if test $ac_prog_rejected = yes; then
+ # We found a bogon in the path, so make sure we never use it.
+ set dummy $ac_cv_prog_CC
+ shift
+ if test $# -gt 0; then
+ # We chose a different compiler from the bogus one.
+ # However, it has the same basename, so the bogon will be chosen
+ # first if we set CC to just the basename; use the full file name.
+ shift
+ set dummy "$ac_dir/$ac_word" "$@"
+ shift
+ ac_cv_prog_CC="$@"
+ fi
+fi
+fi
+fi
+CC="$ac_cv_prog_CC"
+if test -n "$CC"; then
+ echo "$ac_t""$CC" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
+fi
+
+echo $ac_n "checking whether the target C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
+echo "configure:1429: checking whether the target 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.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+cat > conftest.$ac_ext <<EOF
+#line 1439 "configure"
+#include "confdefs.h"
+void *malloc() { return 0; }
+ main(){return(0);}
+EOF
+if { (eval echo configure:1444: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+ rtems_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
+ rtems_cv_prog_cc_cross=no
+ else
+ rtems_cv_prog_cc_cross=yes
+ fi
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rtems_cv_prog_cc_works=no
+fi
+rm -fr conftest*
+
+echo "$ac_t""$rtems_cv_prog_cc_works" 1>&6
+if test $rtems_cv_prog_cc_works = no; then
+ { echo "configure: error: installation or configuration problem: target C compiler cannot create executables." 1>&2; exit 1; }
+fi
+echo $ac_n "checking whether the target C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
+echo "configure:1464: checking whether the target C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "$ac_t""$rtems_cv_prog_cc_cross" 1>&6
+
+echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
+echo "configure:1468: 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
+ cat > conftest.c <<EOF
+#ifdef __GNUC__
+ yes;
+#endif
+EOF
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1477: \"$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
+fi
+fi
+
+echo "$ac_t""$ac_cv_prog_gcc" 1>&6
+
+if test $ac_cv_prog_gcc = yes; then
+ GCC=yes
+ 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:1492: 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
+ echo 'void f(){}' > conftest.c
+if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
+ ac_cv_prog_cc_g=yes
+else
+ ac_cv_prog_cc_g=no
+fi
+rm -f conftest*
+
+fi
+
+echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
+ if test "$ac_test_CFLAGS" = set; then
+ CFLAGS="$ac_save_CFLAGS"
+ elif test $ac_cv_prog_cc_g = yes; then
+ CFLAGS="-g -O2"
+ else
+ CFLAGS="-O2"
+ fi
+else
+ GCC=
+ test "${CFLAGS+set}" = set || CFLAGS="-g"
+fi
+
+CC_FOR_TARGET=$CC
+rtems_cv_prog_gcc=$ac_cv_prog_gcc
+rtems_cv_prog_cc_g=$ac_cv_prog_cc_g
+
+unset CC
+unset ac_cv_prog_gcc
+unset ac_cv_prog_cc_g
+unset ac_cv_prog_CC
+
+
+if test "$RTEMS_USE_GCC272" != "yes" ; then
+
+echo $ac_n "checking whether $CC_FOR_TARGET accepts -specs""... $ac_c" 1>&6
+echo "configure:1532: checking whether $CC_FOR_TARGET accepts -specs" >&5
+if eval "test \"`echo '$''{'rtems_cv_gcc_specs'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ touch confspec
+echo 'void f(){}' >conftest.c
+if test -z "`${CC_FOR_TARGET} -specs confspec -c conftest.c 2>&1`";then
+ rtems_cv_gcc_specs=yes
+else
+ rtems_cv_gcc_specs=no
+fi
+rm -f confspec conftest*
+
+fi
+
+echo "$ac_t""$rtems_cv_gcc_specs" 1>&6
+ if test "$rtems_cv_gcc_specs" = "no"; then
+ echo "configure: warning: *** disabling --enable-gcc28" 1>&2
+ RTEMS_USE_GCC272=yes
+ fi
+fi
+
+
+echo $ac_n "checking whether $CC_FOR_TARGET accepts --pipe""... $ac_c" 1>&6
+echo "configure:1556: checking whether $CC_FOR_TARGET accepts --pipe" >&5
+if eval "test \"`echo '$''{'rtems_cv_gcc_pipe'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+
+echo 'void f(){}' >conftest.c
+if test -z "`${CC_FOR_TARGET} --pipe -c conftest.c 2>&1`";then
+ rtems_cv_gcc_pipe=yes
+else
+ rtems_cv_gcc_pipe=no
+fi
+rm -f conftest*
+
+fi
+
+echo "$ac_t""$rtems_cv_gcc_pipe" 1>&6
+
+if test "$RTEMS_HAS_CPLUSPLUS" = "yes"; then
+ CXX="$program_prefix"g++
+
+for ac_prog in $CCC c++ g++ gcc CC cxx cc++
+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:1581: 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
+ if test -n "$CXX"; then
+ ac_cv_prog_CXX="$CXX" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_CXX="$ac_prog"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+fi
+fi
+CXX="$ac_cv_prog_CXX"
+if test -n "$CXX"; then
+ echo "$ac_t""$CXX" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+test -n "$CXX" && break
+done
+test -n "$CXX" || CXX="gcc"
+
+
+echo $ac_n "checking whether the target C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
+echo "configure:1612: checking whether the target 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.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+
+
+cat > conftest.$ac_ext <<EOF
+#line 1623 "configure"
+#include "confdefs.h"
+main(){return(0);}
+EOF
+if { (eval echo configure:1627: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+ rtems_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
+ rtems_cv_prog_cxx_cross=no
+ else
+ rtems_cv_prog_cxx_cross=yes
+ fi
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rtems_cv_prog_cxx_works=no
+fi
+rm -fr conftest*
+if test "$rtems_cv_prog_cxx_works" = "no"; then
+ cat > conftest.$ac_ext <<EOF
+#line 1643 "configure"
+#include "confdefs.h"
+extern "C" void *malloc();
+ void *malloc() { return (0); }
+ main(){return(0);}
+EOF
+if { (eval echo configure:1649: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+ rtems_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
+ rtems_cv_prog_cxx_cross=no
+ else
+ rtems_cv_prog_cxx_cross=yes
+ fi
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rtems_cv_prog_cxx_works=no
+fi
+rm -fr conftest*
+fi
+ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+echo "$ac_t""$rtems_cv_prog_cxx_works" 1>&6
+if test $rtems_cv_prog_cxx_works = no; then
+ { echo "configure: error: installation or configuration problem: target C++ compiler cannot create executables." 1>&2; exit 1; }
+fi
+echo $ac_n "checking whether the target C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
+echo "configure:1676: checking whether the target C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "$ac_t""$rtems_cv_prog_cxx_cross" 1>&6
+
+echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
+echo "configure:1680: 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
+ cat > conftest.C <<EOF
+#ifdef __GNUC__
+ yes;
+#endif
+EOF
+if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1689: \"$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
+fi
+fi
+
+echo "$ac_t""$ac_cv_prog_gxx" 1>&6
+
+if test $ac_cv_prog_gxx = yes; then
+ GXX=yes
+ 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:1704: 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
+ echo 'void f(){}' > conftest.cc
+if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
+ ac_cv_prog_cxx_g=yes
+else
+ ac_cv_prog_cxx_g=no
+fi
+rm -f conftest*
+
+fi
+
+echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6
+ if test "$ac_test_CXXFLAGS" = set; then
+ CXXFLAGS="$ac_save_CXXFLAGS"
+ elif test $ac_cv_prog_cxx_g = yes; then
+ CXXFLAGS="-g -O2"
+ else
+ CXXFLAGS="-O2"
+ fi
+else
+ GXX=
+ test "${CXXFLAGS+set}" = set || CXXFLAGS="-g"
+fi
+CXX_FOR_TARGET=$CXX
+
+unset CXX
+unset ac_cv_prog_gxx
+
+ # Extract the first word of ""$program_prefix"g++", so it can be a program name with args.
+set dummy "$program_prefix"g++; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1738: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_path_CXX_FOR_TARGET'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ case "$CXX_FOR_TARGET" in
+ /*)
+ ac_cv_path_CXX_FOR_TARGET="$CXX_FOR_TARGET" # Let the user override the test with a path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_path_CXX_FOR_TARGET="$ac_dir/$ac_word"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_path_CXX_FOR_TARGET" && ac_cv_path_CXX_FOR_TARGET="no"
+ ;;
+esac
+fi
+CXX_FOR_TARGET="$ac_cv_path_CXX_FOR_TARGET"
+if test -n "$CXX_FOR_TARGET"; then
+ echo "$ac_t""$CXX_FOR_TARGET" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+else
+ CXX_FOR_TARGET="no"
+fi
+
+if test "$rtems_cv_prog_gcc" = "yes" ; then
+ AR_FOR_TARGET=`$CC_FOR_TARGET --print-prog-name=ar`
+ AS_FOR_TARGET=`$CC_FOR_TARGET --print-prog-name=as`
+ LD_FOR_TARGET=`$CC_FOR_TARGET --print-prog-name=ld`
+ NM_FOR_TARGET=`$CC_FOR_TARGET --print-prog-name=nm`
+ RANLIB_FOR_TARGET=`$CC_FOR_TARGET --print-prog-name=ranlib`
+fi
+
+
+# Extract the first word of ""$program_prefix"gcc", so it can be a program name with args.
+set dummy "$program_prefix"gcc; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1783: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_path_CC_FOR_TARGET'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ case "$CC_FOR_TARGET" in
+ /*)
+ ac_cv_path_CC_FOR_TARGET="$CC_FOR_TARGET" # Let the user override the test with a path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_path_CC_FOR_TARGET="$ac_dir/$ac_word"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_path_CC_FOR_TARGET" && ac_cv_path_CC_FOR_TARGET="no"
+ ;;
+esac
+fi
+CC_FOR_TARGET="$ac_cv_path_CC_FOR_TARGET"
+if test -n "$CC_FOR_TARGET"; then
+ echo "$ac_t""$CC_FOR_TARGET" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+
+# Extract the first word of ""$program_prefix"ar", so it can be a program name with args.
+set dummy "$program_prefix"ar; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1816: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_path_AR_FOR_TARGET'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ case "$AR_FOR_TARGET" in
+ /*)
+ ac_cv_path_AR_FOR_TARGET="$AR_FOR_TARGET" # Let the user override the test with a path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_path_AR_FOR_TARGET="$ac_dir/$ac_word"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_path_AR_FOR_TARGET" && ac_cv_path_AR_FOR_TARGET="no"
+ ;;
+esac
+fi
+AR_FOR_TARGET="$ac_cv_path_AR_FOR_TARGET"
+if test -n "$AR_FOR_TARGET"; then
+ echo "$ac_t""$AR_FOR_TARGET" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+# Extract the first word of ""$program_prefix"as", so it can be a program name with args.
+set dummy "$program_prefix"as; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1848: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_path_AS_FOR_TARGET'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ case "$AS_FOR_TARGET" in
+ /*)
+ ac_cv_path_AS_FOR_TARGET="$AS_FOR_TARGET" # Let the user override the test with a path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_path_AS_FOR_TARGET="$ac_dir/$ac_word"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_path_AS_FOR_TARGET" && ac_cv_path_AS_FOR_TARGET="no"
+ ;;
+esac
+fi
+AS_FOR_TARGET="$ac_cv_path_AS_FOR_TARGET"
+if test -n "$AS_FOR_TARGET"; then
+ echo "$ac_t""$AS_FOR_TARGET" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+# Extract the first word of ""$program_prefix"nm", so it can be a program name with args.
+set dummy "$program_prefix"nm; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1880: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_path_NM_FOR_TARGET'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ case "$NM_FOR_TARGET" in
+ /*)
+ ac_cv_path_NM_FOR_TARGET="$NM_FOR_TARGET" # Let the user override the test with a path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_path_NM_FOR_TARGET="$ac_dir/$ac_word"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_path_NM_FOR_TARGET" && ac_cv_path_NM_FOR_TARGET="no"
+ ;;
+esac
+fi
+NM_FOR_TARGET="$ac_cv_path_NM_FOR_TARGET"
+if test -n "$NM_FOR_TARGET"; then
+ echo "$ac_t""$NM_FOR_TARGET" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+# Extract the first word of ""$program_prefix"ld", so it can be a program name with args.
+set dummy "$program_prefix"ld; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1912: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_path_LD_FOR_TARGET'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ case "$LD_FOR_TARGET" in
+ /*)
+ ac_cv_path_LD_FOR_TARGET="$LD_FOR_TARGET" # Let the user override the test with a path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_path_LD_FOR_TARGET="$ac_dir/$ac_word"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_path_LD_FOR_TARGET" && ac_cv_path_LD_FOR_TARGET="no"
+ ;;
+esac
+fi
+LD_FOR_TARGET="$ac_cv_path_LD_FOR_TARGET"
+if test -n "$LD_FOR_TARGET"; then
+ echo "$ac_t""$LD_FOR_TARGET" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+
+# Extract the first word of ""$program_prefix"ranlib", so it can be a program name with args.
+set dummy "$program_prefix"ranlib; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1945: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_path_RANLIB_FOR_TARGET'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ case "$RANLIB_FOR_TARGET" in
+ /*)
+ ac_cv_path_RANLIB_FOR_TARGET="$RANLIB_FOR_TARGET" # Let the user override the test with a path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_path_RANLIB_FOR_TARGET="$ac_dir/$ac_word"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_path_RANLIB_FOR_TARGET" && ac_cv_path_RANLIB_FOR_TARGET="no"
+ ;;
+esac
+fi
+RANLIB_FOR_TARGET="$ac_cv_path_RANLIB_FOR_TARGET"
+if test -n "$RANLIB_FOR_TARGET"; then
+ echo "$ac_t""$RANLIB_FOR_TARGET" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+
+# Extract the first word of ""$program_prefix"objcopy", so it can be a program name with args.
+set dummy "$program_prefix"objcopy; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1978: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_path_OBJCOPY_FOR_TARGET'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ case "$OBJCOPY_FOR_TARGET" in
+ /*)
+ ac_cv_path_OBJCOPY_FOR_TARGET="$OBJCOPY_FOR_TARGET" # Let the user override the test with a path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_path_OBJCOPY_FOR_TARGET="$ac_dir/$ac_word"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_path_OBJCOPY_FOR_TARGET" && ac_cv_path_OBJCOPY_FOR_TARGET="no"
+ ;;
+esac
+fi
+OBJCOPY_FOR_TARGET="$ac_cv_path_OBJCOPY_FOR_TARGET"
+if test -n "$OBJCOPY_FOR_TARGET"; then
+ echo "$ac_t""$OBJCOPY_FOR_TARGET" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+# Extract the first word of ""$program_prefix"size", so it can be a program name with args.
+set dummy "$program_prefix"size; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:2010: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_path_SIZE_FOR_TARGET'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ case "$SIZE_FOR_TARGET" in
+ /*)
+ ac_cv_path_SIZE_FOR_TARGET="$SIZE_FOR_TARGET" # Let the user override the test with a path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_path_SIZE_FOR_TARGET="$ac_dir/$ac_word"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_path_SIZE_FOR_TARGET" && ac_cv_path_SIZE_FOR_TARGET="no"
+ ;;
+esac
+fi
+SIZE_FOR_TARGET="$ac_cv_path_SIZE_FOR_TARGET"
+if test -n "$SIZE_FOR_TARGET"; then
+ echo "$ac_t""$SIZE_FOR_TARGET" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+
+test "$rtems_cv_gcc_pipe" = "yes" && CC_FOR_TARGET="$CC_FOR_TARGET --pipe"
+
+# 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:2045: 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
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_CC="gcc"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+fi
+fi
+CC="$ac_cv_prog_CC"
+if test -n "$CC"; then
+ echo "$ac_t""$CC" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+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:2074: 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
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ ac_prog_rejected=no
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
+ ac_prog_rejected=yes
+ continue
+ fi
+ ac_cv_prog_CC="cc"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+if test $ac_prog_rejected = yes; then
+ # We found a bogon in the path, so make sure we never use it.
+ set dummy $ac_cv_prog_CC
+ shift
+ if test $# -gt 0; then
+ # We chose a different compiler from the bogus one.
+ # However, it has the same basename, so the bogon will be chosen
+ # first if we set CC to just the basename; use the full file name.
+ shift
+ set dummy "$ac_dir/$ac_word" "$@"
+ shift
+ ac_cv_prog_CC="$@"
+ fi
+fi
+fi
+fi
+CC="$ac_cv_prog_CC"
+if test -n "$CC"; then
+ echo "$ac_t""$CC" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+ test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
+fi
+
+echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
+echo "configure:2122: 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.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+cat > conftest.$ac_ext <<EOF
+#line 2132 "configure"
+#include "confdefs.h"
+main(){return(0);}
+EOF
+if { (eval echo configure:2136: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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
+ ac_cv_prog_cc_cross=no
+ else
+ ac_cv_prog_cc_cross=yes
+ fi
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ ac_cv_prog_cc_works=no
+fi
+rm -fr conftest*
+
+echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
+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:2156: 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:2161: 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
+ cat > conftest.c <<EOF
+#ifdef __GNUC__
+ yes;
+#endif
+EOF
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2170: \"$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
+fi
+fi
+
+echo "$ac_t""$ac_cv_prog_gcc" 1>&6
+
+if test $ac_cv_prog_gcc = yes; then
+ GCC=yes
+ 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:2185: 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
+ echo 'void f(){}' > conftest.c
+if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
+ ac_cv_prog_cc_g=yes
+else
+ ac_cv_prog_cc_g=no
+fi
+rm -f conftest*
+
+fi
+
+echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
+ if test "$ac_test_CFLAGS" = set; then
+ CFLAGS="$ac_save_CFLAGS"
+ elif test $ac_cv_prog_cc_g = yes; then
+ CFLAGS="-g -O2"
+ else
+ CFLAGS="-O2"
+ fi
+else
+ GCC=
+ test "${CFLAGS+set}" = set || CFLAGS="-g"
+fi
+
+
+for ac_func in strerror
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:2216: 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 <<EOF
+#line 2221 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func(); below. */
+#include <assert.h>
+/* 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:2244: \"$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 <<EOF
+#define $ac_tr_func 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+done
+
+
# 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:1397: checking for Makefile.in in c/src/exec/score/tools/$target_cpu" >&5
+echo "configure:2272: 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;
@@ -1408,7 +2283,7 @@ fi
echo $ac_n "checking for Makefile.in in c/src/exec/rtems""... $ac_c" 1>&6
-echo "configure:1412: checking for Makefile.in in c/src/exec/rtems" >&5
+echo "configure:2287: 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;
@@ -1423,7 +2298,7 @@ fi
echo $ac_n "checking for Makefile.in in c/src/exec/sapi""... $ac_c" 1>&6
-echo "configure:1427: checking for Makefile.in in c/src/exec/sapi" >&5
+echo "configure:2302: 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;
@@ -1440,7 +2315,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:1444: checking for Makefile.in in c/src/exec/posix" >&5
+echo "configure:2319: 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;
@@ -1462,7 +2337,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:1466: checking for bsps" >&5
+echo "configure:2341: checking for bsps" >&5
files=`ls $srcdir/c/src/lib/libbsp/$target_cpu`
for file in $files; do
case $file in
@@ -1509,7 +2384,7 @@ echo "configure:1466: 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:1513: checking for Makefile.in in c/src/lib/libbsp/$target_cpu/$bspdir" >&5
+echo "configure:2388: 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;
@@ -1532,7 +2407,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:1536: checking for Makefile.in in c/src/lib/libcpu/$target_cpu" >&5
+echo "configure:2411: 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;
@@ -1549,7 +2424,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:1553: checking for Makefile.in in c/src/lib/start/$target_cpu" >&5
+echo "configure:2428: 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;
@@ -1566,20 +2441,6 @@ fi
-#
-# Target configurations are listed in alphabetical order.
-# The BSPs for a target configuration are also listed in alphabetical order.
-#
-
-
-if [ "${program_prefix}" = "NONE" ] ; then
- if [ "${target}" = "${host}" ] ; then
- program_prefix=
- else
- program_prefix=${target}-
- fi
-fi
-
PROJECT_ROOT=`pwd;`
# If RTEMS macros are enabled, then use them. Otherwise, use inlines.
@@ -1605,7 +2466,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:1609: checking Are the test suites enabled? " >&5
+echo "configure:2470: 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
@@ -1625,7 +2486,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:1629: checking for Makefile.in in c/src/tests/tools/$target_cpu" >&5
+echo "configure:2490: 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;
@@ -1640,7 +2501,7 @@ fi
echo $ac_n "checking for Makefile.in in c/src/tests/libtests""... $ac_c" 1>&6
-echo "configure:1644: checking for Makefile.in in c/src/tests/libtests" >&5
+echo "configure:2505: 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;
@@ -1655,7 +2516,7 @@ fi
echo $ac_n "checking for Makefile.in in c/src/tests/sptests""... $ac_c" 1>&6
-echo "configure:1659: checking for Makefile.in in c/src/tests/sptests" >&5
+echo "configure:2520: 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;
@@ -1670,7 +2531,7 @@ fi
echo $ac_n "checking for Makefile.in in c/src/tests/tmtests""... $ac_c" 1>&6
-echo "configure:1674: checking for Makefile.in in c/src/tests/tmtests" >&5
+echo "configure:2535: 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;
@@ -1685,7 +2546,7 @@ fi
echo $ac_n "checking for Makefile.in in c/src/tests/mptests""... $ac_c" 1>&6
-echo "configure:1689: checking for Makefile.in in c/src/tests/mptests" >&5
+echo "configure:2550: 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;
@@ -1701,7 +2562,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:1705: checking for Makefile.in in c/src/tests/psxtests" >&5
+echo "configure:2566: 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;
@@ -1719,7 +2580,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:1723: checking Is the HWAPI enabled? " >&5
+echo "configure:2584: 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"
@@ -1730,7 +2591,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:1734: checking for Makefile.in in c/src/lib/libhwapi/analog" >&5
+echo "configure:2595: 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;
@@ -1745,7 +2606,7 @@ fi
echo $ac_n "checking for Makefile.in in c/src/lib/libhwapi/discrete""... $ac_c" 1>&6
-echo "configure:1749: checking for Makefile.in in c/src/lib/libhwapi/discrete" >&5
+echo "configure:2610: 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;
@@ -1760,7 +2621,7 @@ fi
echo $ac_n "checking for Makefile.in in c/src/lib/libhwapi/drivers""... $ac_c" 1>&6
-echo "configure:1764: checking for Makefile.in in c/src/lib/libhwapi/drivers" >&5
+echo "configure:2625: 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;
@@ -1775,7 +2636,7 @@ fi
echo $ac_n "checking for Makefile.in in c/src/lib/libhwapi/non_volatile_memory""... $ac_c" 1>&6
-echo "configure:1779: checking for Makefile.in in c/src/lib/libhwapi/non_volatile_memory" >&5
+echo "configure:2640: 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;
@@ -1790,7 +2651,7 @@ fi
echo $ac_n "checking for Makefile.in in c/src/lib/libhwapi/serial""... $ac_c" 1>&6
-echo "configure:1794: checking for Makefile.in in c/src/lib/libhwapi/serial" >&5
+echo "configure:2655: 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;
@@ -1805,7 +2666,7 @@ fi
echo $ac_n "checking for Makefile.in in c/src/lib/libhwapi/support""... $ac_c" 1>&6
-echo "configure:1809: checking for Makefile.in in c/src/lib/libhwapi/support" >&5
+echo "configure:2670: 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;
@@ -1820,7 +2681,7 @@ fi
echo $ac_n "checking for Makefile.in in c/src/lib/libhwapi/wrapup""... $ac_c" 1>&6
-echo "configure:1824: checking for Makefile.in in c/src/lib/libhwapi/wrapup" >&5
+echo "configure:2685: 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;
@@ -1862,7 +2723,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:1866: checking for Makefile.in in c/build-tools" >&5
+echo "configure:2727: checking for Makefile.in in c/build-tools" >&5
if test -d $srcdir/c/build-tools; then
rtems_av_save_dir=`pwd`;
cd $srcdir;
@@ -1877,7 +2738,7 @@ fi
echo $ac_n "checking for Makefile.in in make""... $ac_c" 1>&6
-echo "configure:1881: checking for Makefile.in in make" >&5
+echo "configure:2742: checking for Makefile.in in make" >&5
if test -d $srcdir/make; then
rtems_av_save_dir=`pwd`;
cd $srcdir;
@@ -1892,7 +2753,7 @@ fi
echo $ac_n "checking for Makefile.in in c/src/lib/libmisc""... $ac_c" 1>&6
-echo "configure:1896: checking for Makefile.in in c/src/lib/libmisc" >&5
+echo "configure:2757: 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;
@@ -1907,7 +2768,7 @@ fi
echo $ac_n "checking for Makefile.in in c/src/tests/samples""... $ac_c" 1>&6
-echo "configure:1911: checking for Makefile.in in c/src/tests/samples" >&5
+echo "configure:2772: 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;
@@ -1923,8 +2784,6 @@ fi
-
-
# try not to explicitly list a Makefile here
trap '' 1 2 15
cat > confcache <<\EOF
@@ -2027,6 +2886,9 @@ done
ac_given_srcdir=$srcdir
trap 'rm -fr `echo "Makefile
+make/host.cfg
+make/target.cfg
+make/Templates/Makefile.inc
c/Makefile
c/src/Makefile
c/src/exec/Makefile
@@ -2056,9 +2918,6 @@ c/src/tests/support/wrapup/Makefile
c/src/tests/tools/Makefile
c/src/tests/tools/generic/Makefile
$makefiles
-make/host.cfg
-make/target.cfg
-make/Templates/Makefile.inc
c/update-tools/Makefile c/build-tools/src/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
EOF
cat >> $CONFIG_STATUS <<EOF
@@ -2119,6 +2978,17 @@ s%@CMP@%$CMP%g
s%@SED@%$SED%g
s%@M4@%$M4%g
s%@KSH@%$KSH%g
+s%@CC@%$CC%g
+s%@CXX@%$CXX%g
+s%@CXX_FOR_TARGET@%$CXX_FOR_TARGET%g
+s%@CC_FOR_TARGET@%$CC_FOR_TARGET%g
+s%@AR_FOR_TARGET@%$AR_FOR_TARGET%g
+s%@AS_FOR_TARGET@%$AS_FOR_TARGET%g
+s%@NM_FOR_TARGET@%$NM_FOR_TARGET%g
+s%@LD_FOR_TARGET@%$LD_FOR_TARGET%g
+s%@RANLIB_FOR_TARGET@%$RANLIB_FOR_TARGET%g
+s%@OBJCOPY_FOR_TARGET@%$OBJCOPY_FOR_TARGET%g
+s%@SIZE_FOR_TARGET@%$SIZE_FOR_TARGET%g
s%@RTEMS_BSP_LIST@%$RTEMS_BSP_LIST%g
s%@RTEMS_HOST@%$RTEMS_HOST%g
s%@RTEMS_LIBC_DIR@%$RTEMS_LIBC_DIR%g
@@ -2172,6 +3042,9 @@ EOF
cat >> $CONFIG_STATUS <<EOF
CONFIG_FILES=\${CONFIG_FILES-"Makefile
+make/host.cfg
+make/target.cfg
+make/Templates/Makefile.inc
c/Makefile
c/src/Makefile
c/src/exec/Makefile
@@ -2201,9 +3074,6 @@ c/src/tests/support/wrapup/Makefile
c/src/tests/tools/Makefile
c/src/tests/tools/generic/Makefile
$makefiles
-make/host.cfg
-make/target.cfg
-make/Templates/Makefile.inc
c/update-tools/Makefile"}
EOF
cat >> $CONFIG_STATUS <<\EOF
diff --git a/configure.in b/configure.in
index 3b796011e1..498f18a952 100644
--- a/configure.in
+++ b/configure.in
@@ -43,12 +43,12 @@ AC_ARG_ENABLE(rtems-inlines, \
*) AC_MSG_ERROR(bad value ${enableval} for disable-rtems-inlines option) ;;
esac],[RTEMS_USE_MACROS=no])
-AC_ARG_ENABLE(cpp, \
-[ --enable-cpp enable C++ support, and build the rtems++ library], \
+AC_ARG_ENABLE(cxx, \
+[ --enable-cxx enable C++ support, and build the rtems++ library], \
[case "${enableval}" in
yes) RTEMS_HAS_CPLUSPLUS=yes ;;
no) RTEMS_HAS_CPLUSPLUS=no ;;
- *) AC_MSG_ERROR(bad value ${enableval} for enable-cpp option) ;;
+ *) AC_MSG_ERROR(bad value ${enableval} for enable-cxx option) ;;
esac], [RTEMS_HAS_CPLUSPLUS=no])
AC_ARG_ENABLE(gcc28, \
@@ -76,7 +76,6 @@ AC_PATH_PROG(LN,ln)
AC_PROG_LN_S
AC_PATH_PROG(CHMOD,chmod)
AC_PATH_PROG(SORT,sort)
-AC_CHECK_FUNCS(strerror)
dnl check mkdir behaviour, try to get mkdir -p -m 0755
RTEMS_PATH_MKDIR
@@ -102,8 +101,6 @@ AC_MSG_ERROR(
[ Please contact your system administrator] );
fi
-dnl END configure.host.in
-
dnl BEGIN configure.target.in
dnl echo "TARGET"
@@ -172,6 +169,51 @@ else
AC_MSG_ERROR(no)
fi
+dnl NOTE: host_os is automatically set by autoconf
+
+if [[ "${program_prefix}" = "NONE" ]] ; then
+ if [[ "${target}" = "${host}" ]] ; then
+ program_prefix=
+ else
+ program_prefix=${target}-
+ fi
+fi
+
+dnl check target cc
+CC="$program_prefix"gcc
+RTEMS_PROG_CC
+
+dnl check if the compiler supports --specs if gcc28 is requested
+if test "$RTEMS_USE_GCC272" != "yes" ; then
+ RTEMS_GCC_SPECS
+ if test "$rtems_cv_gcc_specs" = "no"; then
+ AC_MSG_WARN([*** disabling --enable-gcc28])
+ RTEMS_USE_GCC272=yes
+ fi
+fi
+
+dnl check if the target compiler may use --pipe
+RTEMS_GCC_PIPE
+
+dnl check for g++
+if test "$RTEMS_HAS_CPLUSPLUS" = "yes"; then
+ CXX="$program_prefix"g++
+ RTEMS_PROG_CXX
+ AC_PATH_PROG(CXX_FOR_TARGET,"$program_prefix"g++,no)
+else
+ CXX_FOR_TARGET="no"
+fi
+
+RTEMS_CANONICALIZE_TOOLS
+test "$rtems_cv_gcc_pipe" = "yes" && CC_FOR_TARGET="$CC_FOR_TARGET --pipe"
+
+dnl check host cc
+AC_PROG_CC
+
+dnl check for host library functions
+dnl NOTE: must be called after AC_PROG_CC
+AC_CHECK_FUNCS(strerror)
+
# find all the Executive Makefiles
RTEMS_CHECK_MAKEFILE(c/src/exec/score/tools/$target_cpu)
RTEMS_CHECK_MAKEFILE(c/src/exec/rtems)
@@ -251,21 +293,6 @@ fi
dnl END configure.target.in
-#
-# Target configurations are listed in alphabetical order.
-# The BSPs for a target configuration are also listed in alphabetical order.
-#
-
-dnl NOTE: host_os is automatically set by autoconf
-
-if [[ "${program_prefix}" = "NONE" ]] ; then
- if [[ "${target}" = "${host}" ]] ; then
- program_prefix=
- else
- program_prefix=${target}-
- fi
-fi
-
PROJECT_ROOT=`pwd;`
# If RTEMS macros are enabled, then use them. Otherwise, use inlines.
@@ -359,11 +386,12 @@ RTEMS_CHECK_MAKEFILE(c/src/tests/samples)
AC_CONFIG_HEADER(c/build-tools/src/config.h)
-AC_CONFIG_HEADER(c/build-tools/src/config.h)
-
# try not to explicitly list a Makefile here
AC_OUTPUT(
Makefile
+make/host.cfg
+make/target.cfg
+make/Templates/Makefile.inc
c/Makefile
c/src/Makefile
c/src/exec/Makefile
@@ -393,9 +421,6 @@ c/src/tests/support/wrapup/Makefile
c/src/tests/tools/Makefile
c/src/tests/tools/generic/Makefile
$makefiles
-make/host.cfg
-make/target.cfg
-make/Templates/Makefile.inc
c/update-tools/Makefile)
echo