* configure.in: Detect "cross-hosting" situation and set appropriate variables

in Makefile to avoid building excess stuff.
* configure: Regenerate.
* Makefile.in: Accomodate above change.
This commit is contained in:
Christopher Faylor 2000-06-17 17:54:05 +00:00
parent e46892585a
commit e94903eb0f
4 changed files with 100 additions and 56 deletions

View File

@ -1,3 +1,10 @@
Sat Jun 17 13:51:48 2000 Christopher Faylor <cgf@cygnus.com>
* configure.in: Detect "cross-hosting" situation and set appropriate
variables in Makefile to avoid building excess stuff.
* configure: Regenerate.
* Makefile.in: Accomodate above change.
Sat Jun 17 19:52:00 2000 Corinna Vinschen <corinna@vinschen.de>
* pinfo.cc (pinfo_init): Revert previous patch.

View File

@ -133,17 +133,27 @@ GMON_OFILES:= gmon.o mcount.o profil.o
LD_STUFF=--dll $(DLL_OFILES) version.o winver.o $(DLL_IMPORTS) $(LIBM) $(LIBC) \
$(LIBGCC) -e $(DLL_ENTRY) --image-base=0x61000000
.PHONY: all force dll_ofiles install
.PHONY: all force dll_ofiles install all_target install_target all_host install_host
.SUFFIXES:
.SUFFIXES: .c .cc .def .a .o
all: new-$(DLL_NAME) $(LIBGMON_A) $(LIB_NAME) new-$(LIB_NAME) cygrun.exe force
all_host=@all_host@
install_host=@install_host@
all: $(all_host) all_target
install: $(install_host) install_target
# all: new-$(DLL_NAME) $(LIBGMON_A) $(LIB_NAME) new-$(LIB_NAME) cygrun.exe force
all_target: $(LIBGMON_A) $(LIB_NAME)
all_host: new-$(DLL_NAME) cygrun.exe
force:
install: all
$(INSTALL_DATA) new-$(DLL_NAME) $(bindir)/$(DLL_NAME) ; \
install: all $(install_host) $(install_target)
for i in $(LIB_NAME) $(GMON_START) $(LIBGMON_A) ; do \
$(INSTALL_DATA) $$i $(tooldir)/lib/$$i ; \
done ; \
@ -155,6 +165,9 @@ install: all
done ; \
$(INSTALL_DATA) regexp/regexp.h $(tooldir)/include/regexp.h
install_host:
$(INSTALL_DATA) new-$(DLL_NAME) $(bindir)/$(DLL_NAME)
clean:
-rm -f *.o *.dll *.a *.exp junk *.base version.cc regexp/*.o winver_stamp

View File

@ -898,10 +898,24 @@ else
fi
case "$with_cross_host" in
""|*cygwin*)
all_host="all_host"
install_host="install_host"
;;
*)
all_host=
install_host=
;;
esac
# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
set dummy ${ac_tool_prefix}ar; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:905: checking for $ac_word" >&5
echo "configure:919: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -933,7 +947,7 @@ if test -n "$ac_tool_prefix"; then
# Extract the first word of "ar", so it can be a program name with args.
set dummy ar; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:937: checking for $ac_word" >&5
echo "configure:951: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -965,11 +979,10 @@ else
fi
fi
# Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
set dummy ${ac_tool_prefix}as; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:973: checking for $ac_word" >&5
echo "configure:986: 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
@ -1001,7 +1014,7 @@ if test -n "$ac_tool_prefix"; then
# 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:1005: checking for $ac_word" >&5
echo "configure:1018: 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
@ -1033,11 +1046,10 @@ else
fi
fi
# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
set dummy ${ac_tool_prefix}ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1041: checking for $ac_word" >&5
echo "configure:1053: 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
@ -1069,7 +1081,7 @@ if test -n "$ac_tool_prefix"; then
# 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:1073: checking for $ac_word" >&5
echo "configure:1085: 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
@ -1101,11 +1113,10 @@ else
fi
fi
# Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
set dummy ${ac_tool_prefix}ld; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1109: checking for $ac_word" >&5
echo "configure:1120: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_LD'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -1137,7 +1148,7 @@ if test -n "$ac_tool_prefix"; then
# Extract the first word of "ld", so it can be a program name with args.
set dummy ld; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1141: checking for $ac_word" >&5
echo "configure:1152: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_LD'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -1169,11 +1180,10 @@ else
fi
fi
# Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
set dummy ${ac_tool_prefix}dlltool; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1177: checking for $ac_word" >&5
echo "configure:1187: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -1205,7 +1215,7 @@ if test -n "$ac_tool_prefix"; then
# Extract the first word of "dlltool", so it can be a program name with args.
set dummy dlltool; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1209: checking for $ac_word" >&5
echo "configure:1219: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_DLLTOOL'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -1237,11 +1247,10 @@ else
fi
fi
# Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
set dummy ${ac_tool_prefix}windres; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1245: checking for $ac_word" >&5
echo "configure:1254: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -1273,7 +1282,7 @@ if test -n "$ac_tool_prefix"; then
# Extract the first word of "windres", so it can be a program name with args.
set dummy windres; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1277: checking for $ac_word" >&5
echo "configure:1286: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -1306,9 +1315,8 @@ fi
fi
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
echo "configure:1312: checking how to run the C preprocessor" >&5
echo "configure:1320: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
@ -1323,13 +1331,13 @@ else
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp.
cat > conftest.$ac_ext <<EOF
#line 1327 "configure"
#line 1335 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1333: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:1341: \"$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
:
@ -1340,13 +1348,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
#line 1344 "configure"
#line 1352 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1350: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:1358: \"$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
:
@ -1357,13 +1365,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -nologo -E"
cat > conftest.$ac_ext <<EOF
#line 1361 "configure"
#line 1369 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1367: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:1375: \"$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
:
@ -1390,19 +1398,19 @@ echo "$ac_t""$CPP" 1>&6
# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
# for constant arguments. Useless!
echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
echo "configure:1394: checking for working alloca.h" >&5
echo "configure:1402: checking for working alloca.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1399 "configure"
#line 1407 "configure"
#include "confdefs.h"
#include <alloca.h>
int main() {
char *p = alloca(2 * sizeof(int));
; return 0; }
EOF
if { (eval echo configure:1406: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:1414: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_header_alloca_h=yes
else
@ -1423,12 +1431,12 @@ EOF
fi
echo $ac_n "checking for alloca""... $ac_c" 1>&6
echo "configure:1427: checking for alloca" >&5
echo "configure:1435: checking for alloca" >&5
if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1432 "configure"
#line 1440 "configure"
#include "confdefs.h"
#ifdef __GNUC__
@ -1456,7 +1464,7 @@ int main() {
char *p = (char *) alloca(1);
; return 0; }
EOF
if { (eval echo configure:1460: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:1468: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_func_alloca_works=yes
else
@ -1488,12 +1496,12 @@ EOF
echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
echo "configure:1492: checking whether alloca needs Cray hooks" >&5
echo "configure:1500: checking whether alloca needs Cray hooks" >&5
if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1497 "configure"
#line 1505 "configure"
#include "confdefs.h"
#if defined(CRAY) && ! defined(CRAY2)
webecray
@ -1518,12 +1526,12 @@ echo "$ac_t""$ac_cv_os_cray" 1>&6
if test $ac_cv_os_cray = yes; then
for ac_func in _getb67 GETB67 getb67; do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:1522: checking for $ac_func" >&5
echo "configure:1530: 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 1527 "configure"
#line 1535 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@ -1546,7 +1554,7 @@ $ac_func();
; return 0; }
EOF
if { (eval echo configure:1550: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:1558: \"$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
@ -1573,7 +1581,7 @@ done
fi
echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
echo "configure:1577: checking stack direction for C alloca" >&5
echo "configure:1585: checking stack direction for C alloca" >&5
if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -1581,7 +1589,7 @@ else
ac_cv_c_stack_direction=0
else
cat > conftest.$ac_ext <<EOF
#line 1585 "configure"
#line 1593 "configure"
#include "confdefs.h"
find_stack_direction ()
{
@ -1600,7 +1608,7 @@ main ()
exit (find_stack_direction() < 0);
}
EOF
if { (eval echo configure:1604: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
if { (eval echo configure:1612: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_c_stack_direction=1
else
@ -1624,7 +1632,7 @@ fi
subdirs="utils doc"
echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
echo "configure:1628: checking whether ${MAKE-make} sets \${MAKE}" >&5
echo "configure:1636: checking whether ${MAKE-make} sets \${MAKE}" >&5
set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@ -1661,7 +1669,7 @@ ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftes
cross_compiling=$ac_cv_prog_cxx_cross
cat > conftest.$ac_ext <<EOF
#line 1665 "configure"
#line 1673 "configure"
#include "confdefs.h"
#include <string.h>
@ -1674,7 +1682,7 @@ int main() {
; return 0; }
EOF
if { (eval echo configure:1678: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:1686: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
use_builtin_memset=yes
else
@ -1770,7 +1778,7 @@ fi
echo $ac_n "checking if newlib is part of the build tree""... $ac_c" 1>&6
echo "configure:1774: checking if newlib is part of the build tree" >&5
echo "configure:1782: checking if newlib is part of the build tree" >&5
EXE_LDFLAGS=
if test -d ../newlib
@ -1785,9 +1793,9 @@ fi
if test x"$EXE_LDFLAGS" = x
then
echo $ac_n "checking if installed newlib needed""... $ac_c" 1>&6
echo "configure:1789: checking if installed newlib needed" >&5
echo "configure:1797: checking if installed newlib needed" >&5
cat > conftest.$ac_ext <<EOF
#line 1791 "configure"
#line 1799 "configure"
#include "confdefs.h"
int main() {
@ -1795,7 +1803,7 @@ int main() {
; return 0; }
EOF
if { (eval echo configure:1799: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:1807: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
echo "$ac_t""no" 1>&6
@ -1978,6 +1986,8 @@ s%@build_cpu@%$build_cpu%g
s%@build_vendor@%$build_vendor%g
s%@build_os@%$build_os%g
s%@CC@%$CC%g
s%@all_host@%$all_host%g
s%@install_host@%$install_host%g
s%@AR@%$AR%g
s%@AS@%$AS%g
s%@RANLIB@%$RANLIB%g

View File

@ -60,18 +60,32 @@ AC_CANONICAL_SYSTEM
LIB_AC_PROG_CC
case "$with_cross_host" in
""|*cygwin*)
all_host="all_host"
install_host="install_host"
;;
*)
all_host=
install_host=
;;
esac
AC_SUBST(all_host)
AC_SUBST(install_host)
AC_CHECK_TOOL(AR, ar, ar)
AC_SUBST(AR)
dnl AC_SUBST(AR)
AC_CHECK_TOOL(AS, as, as)
AC_SUBST(AS)
dnl C_SUBST(AS)
AC_CHECK_TOOL(RANLIB, ranlib, ranlib)
AC_SUBST(RANLIB)
dnl C_SUBST(RANLIB)
AC_CHECK_TOOL(LD, ld, ld)
AC_SUBST(LD)
dnl C_SUBST(LD)
AC_CHECK_TOOL(DLLTOOL, dlltool, dlltool)
AC_SUBST(DLLTOOL)
dnl C_SUBST(DLLTOOL)
AC_CHECK_TOOL(WINDRES, windres, windres)
AC_SUBST(WINDRES)
dnl C_SUBST(WINDRES)
AC_ALLOCA
AC_CONFIG_SUBDIRS(utils doc)