1997-08-22 06:57:35 +08:00
|
|
|
# This file is a shell script fragment that supplies the information
|
|
|
|
# necessary for a configure script to process the program in
|
|
|
|
# this directory. For more information, look at ../configure.
|
|
|
|
|
1999-03-25 05:44:23 +08:00
|
|
|
# find a possible extension of the just-built C++ compiler. Note that this
|
|
|
|
# is not the only choice, taking into cross and canadian cross into
|
|
|
|
# account, and we need to search for with and without the extension.
|
|
|
|
case "${host_alias}" in
|
|
|
|
*cygwin* | *mingw32*)
|
|
|
|
EXEEXT=.exe
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
EXEEXT=
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
# If the language specific compiler does not exist, but the "gcc" directory
|
|
|
|
# does, we do not build anything. Note, $r is set by the top-level Makefile.
|
|
|
|
# Note that when we look for the compiler, we search both with and without
|
|
|
|
# extension to handle cross and canadian cross builds.
|
1998-11-26 09:48:34 +08:00
|
|
|
compiler_name=cc1plus
|
|
|
|
rm -f skip-this-dir
|
|
|
|
if test -n "$r"; then
|
|
|
|
if test -d "$r"/gcc; then
|
1999-03-25 05:44:23 +08:00
|
|
|
if test -f "$r"/gcc/$compiler_name \
|
|
|
|
|| test -f "$r"/gcc/$compiler_name$EXEEXT; then
|
1998-11-26 09:48:34 +08:00
|
|
|
true
|
|
|
|
else
|
|
|
|
echo "rm -f multilib.out" > skip-this-dir
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
1998-01-27 17:34:31 +08:00
|
|
|
if [ "${srcdir}" = "." ] ; then
|
|
|
|
if [ "${with_target_subdir}" != "." ] ; then
|
|
|
|
topsrcdir=${with_multisrctop}../..
|
|
|
|
else
|
|
|
|
topsrcdir=${with_multisrctop}..
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
topsrcdir=${srcdir}/..
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ -d ${topsrcdir}/gcc ] ; then
|
1998-01-14 04:28:27 +08:00
|
|
|
configdirs="tests dbz stdio testsuite"
|
|
|
|
else
|
|
|
|
configdirs="tests dbz stdio"
|
|
|
|
fi
|
1997-08-22 06:57:35 +08:00
|
|
|
srctrigger=libioP.h
|
|
|
|
srcname="input/output library"
|
|
|
|
package_makefile_frag=Make.pack
|
1998-01-28 06:25:13 +08:00
|
|
|
package_makefile_rules_frag=Make.pack.r
|
1997-08-22 06:57:35 +08:00
|
|
|
|
|
|
|
# per-host:
|
|
|
|
|
|
|
|
# per-target:
|
|
|
|
|
|
|
|
echo "# Warning: this fragment is automatically generated" > temp.mt
|
|
|
|
frags=
|
|
|
|
|
|
|
|
case "${target}" in
|
|
|
|
*-hpux*) frags=hpux.mt ;;
|
1997-11-27 07:54:30 +08:00
|
|
|
alpha*-*-linux-gnulibc1)
|
|
|
|
frags="linux.mt linuxaxp1.mt mtsafe.mt" ;;
|
|
|
|
powerpc*-*-linux-gnulibc1)
|
|
|
|
frags="linux.mt linuxaxp1.mt mtsafe.mt" ;;
|
1997-09-17 00:01:55 +08:00
|
|
|
*-linux-gnulibc1)
|
|
|
|
frags=linuxlibc1.mt ;;
|
1997-09-27 12:07:00 +08:00
|
|
|
*-linux-gnu) frags="linux.mt mtsafe.mt" ;;
|
1997-08-22 06:57:35 +08:00
|
|
|
*-sco3.2v[45]*) frags=sco4.mt ;;
|
|
|
|
*-isc*) frags=isc.mt ;;
|
|
|
|
*-netware*) frags=netware.mt ;;
|
|
|
|
*) frags=${target_cpu}.mt ;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
case "${enable_shared}" in
|
|
|
|
yes) shared=yes ;;
|
|
|
|
no) shared=no ;;
|
|
|
|
*libio*) shared=yes ;;
|
|
|
|
*) shared=no ;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
if [ "${shared}" = "yes" ]; then
|
|
|
|
case "${target}" in
|
1999-03-11 08:10:48 +08:00
|
|
|
alpha*-*-linux*) frags="${frags} ../../config/mh-elfalphapic" ;;
|
|
|
|
arm*-*-*) frags="${frags} ../../config/mh-armpic" ;;
|
|
|
|
hppa*-*-*) frags="${frags} ../../config/mh-papic" ;;
|
|
|
|
i[3456]86-*-*) frags="${frags} ../../config/mh-x86pic" ;;
|
|
|
|
powerpc*-*-aix*) ;;
|
|
|
|
powerpc*-*-*) frags="${frags} ../../config/mh-ppcpic" ;;
|
|
|
|
*-*-*) frags="${frags} ../../config/mh-${target_cpu}pic" ;;
|
1997-08-22 06:57:35 +08:00
|
|
|
esac
|
|
|
|
fi
|
|
|
|
|
1997-11-27 07:54:30 +08:00
|
|
|
# Take care of header file lossage.
|
1997-09-17 00:01:55 +08:00
|
|
|
case "${target}" in
|
1997-11-27 07:54:30 +08:00
|
|
|
alpha*-*-linux-gnulibc1)
|
|
|
|
# For some reason stdio-lock.h is not installed on Red Hat systems.
|
|
|
|
# Further, libc-lock.h needs to define the pthreads stuff weak, and
|
|
|
|
# fails to do this for other than _LIBC. Install our own versions
|
|
|
|
# of these files.
|
|
|
|
cp ${srcdir}/config/linuxaxp1-libc-lock.h libc-lock.h
|
|
|
|
cp ${srcdir}/config/linuxaxp1-stdio-lock.h stdio-lock.h
|
1997-09-17 00:01:55 +08:00
|
|
|
;;
|
1997-11-27 07:54:30 +08:00
|
|
|
powerpc*-*-linux-gnulibc1)
|
|
|
|
# For some reason stdio-lock.h is not installed on Red Hat systems.
|
|
|
|
# Further, libc-lock.h needs to define the pthreads stuff weak, and
|
|
|
|
# fails to do this for other than _LIBC. Install our own versions
|
|
|
|
# of these files.
|
|
|
|
cp ${srcdir}/config/linuxaxp1-libc-lock.h libc-lock.h
|
|
|
|
cp ${srcdir}/config/linuxaxp1-stdio-lock.h stdio-lock.h
|
1997-09-17 00:01:55 +08:00
|
|
|
;;
|
1997-12-12 02:19:38 +08:00
|
|
|
*-linux-gnu)
|
|
|
|
# We have a correct libc-lock.h in glibc 2.1 but not all glibc 2.0.
|
|
|
|
# Create a wrapper if necessary.
|
|
|
|
(echo "#include <bits/libc-lock.h>" | ${CC-cc} -E -) >/dev/null 2>&1 ||
|
|
|
|
{
|
|
|
|
echo "#include_next <libc-lock.h>" > libc-lock.h
|
|
|
|
echo 'asm (".weak _pthread_cleanup_pop_restore");' >> libc-lock.h
|
|
|
|
echo 'asm (".weak _pthread_cleanup_push_defer");' >> libc-lock.h
|
|
|
|
|
|
|
|
}
|
|
|
|
;;
|
1997-09-17 00:01:55 +08:00
|
|
|
esac
|
|
|
|
|
1997-08-22 06:57:35 +08:00
|
|
|
for frag in ${frags}; do
|
1998-03-05 08:28:12 +08:00
|
|
|
case ${frag} in
|
|
|
|
../* )
|
|
|
|
if [ ${srcdir} = . ]; then
|
|
|
|
[ -n "${with_target_subdir}" ] && frag=../${frag}
|
|
|
|
[ -n "${with_multisrctop}" ] && frag=${with_multisrctop}${frag}
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
esac
|
1997-08-22 06:57:35 +08:00
|
|
|
frag=${srcdir}/config/$frag
|
|
|
|
if [ -f ${frag} ]; then
|
|
|
|
echo "Appending ${frag} to target-mkfrag"
|
|
|
|
echo "# Following fragment copied from ${frag}" >> temp.mt
|
|
|
|
cat ${frag} >> temp.mt
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
|
|
|
target_makefile_frag=target-mkfrag
|
|
|
|
${moveifchange} temp.mt target-mkfrag
|
|
|
|
|
|
|
|
LIBDIR=yes
|
|
|
|
TO_TOPDIR=../
|
1997-09-06 15:44:38 +08:00
|
|
|
ALL='$(_G_CONFIG_H) libio.a libiostream.a iostream.list'
|
1998-02-23 00:31:03 +08:00
|
|
|
case "${target}" in
|
|
|
|
*-*-cygwin32*)
|
|
|
|
XCINCLUDES='-I. -I$(srcdir) -I$(srcdir)/../winsup/include'
|
|
|
|
XCXXINCLUDES='-I. -I$(srcdir) -I$(srcdir)/../winsup/include'
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
XCINCLUDES='-I. -I$(srcdir)'
|
|
|
|
XCXXINCLUDES='-I. -I$(srcdir)'
|
|
|
|
;;
|
|
|
|
esac
|
1997-08-22 06:57:35 +08:00
|
|
|
MOSTLYCLEAN='*.o pic stamp-picdir core iostream.list'
|
|
|
|
DISTCLEAN='config.status Makefile *~ Make.pack target-mkfrag multilib.out'
|
|
|
|
CLEAN='_G_config.h *.a'
|
|
|
|
INFO_FILES=iostream
|
1998-01-27 17:34:31 +08:00
|
|
|
if [ -n "${with_cross_host}" -a -d ${topsrcdir}/gcc ]; then
|
1997-08-22 06:57:35 +08:00
|
|
|
CHECK_SUBDIRS=testsuite
|
|
|
|
fi
|
1998-01-28 06:25:13 +08:00
|
|
|
(. ${srcdir}/config.shared) >${package_makefile_frag} 2>${package_makefile_rules_frag}
|
1997-08-22 06:57:35 +08:00
|
|
|
|
|
|
|
# post-target:
|
|
|
|
|
1998-09-09 19:49:07 +08:00
|
|
|
# If cross-compiling, we install in $(tooldir)/lib or in $(libsubdir)
|
|
|
|
# depending on --enable-version-specific-runtime-libs.
|
1997-08-22 06:57:35 +08:00
|
|
|
if [ -n "${with_cross_host}" ] ; then
|
|
|
|
rm -f Makefile.tem
|
|
|
|
sed \
|
1998-09-09 19:49:07 +08:00
|
|
|
-e 's|\(^[ ]*INSTALLDIR[ ]*=[ ]*\)\$(libdir)|\1$(tooldir)/lib|' \
|
1997-08-22 06:57:35 +08:00
|
|
|
Makefile >Makefile.tem
|
|
|
|
mv -f Makefile.tem Makefile
|
|
|
|
fi
|
|
|
|
|
1998-01-27 17:34:31 +08:00
|
|
|
. ${topsrcdir}/config-ml.in
|