57119aa9eb
* configure: Make enable_threads and enable_shared defaults explicit. Substitute enable_threads into generated Makefiles. * configure.in: Accept *-*-linux* not just *-*-linux-gnu*. * libtool.m4: Accept *-*-linux* not just *-*-linux-gnu*. gcc: * configure.in: Accept *-*-linux* not just *-*-linux-gnu*. * fixinc/inclhack.def: Likewise. * fixinc/mkfixinc.sh: Likewise. * configure: Regenerate. * fixinc/fixincl.x: Regenerate. * install.texi: Document equivalence of linux and linux-gnu. libio: * configure.in: Accept *-*-linux* not just *-*-linux-gnu*. Honor --disable-threads. libstdc++: * configure.in: Accept *-*-linux* not just *-*-linux-gnu*. Honor --disable-threads. libstdc++-v3: * configure: Regenerate after change to ../libtool.m4. libobjc: * configure: Regenerate after change to ../libtool.m4. From-SVN: r35680
209 lines
6.2 KiB
Plaintext
209 lines
6.2 KiB
Plaintext
# 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.
|
|
|
|
# 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.
|
|
# Note that if $norecursion is set we're being called from config.status,
|
|
# so don't check for the compiler; we might be doing a make clean.
|
|
compiler_name=cc1plus
|
|
rm -f skip-this-dir
|
|
if test -n "$r" && [ -z "$norecursion" ] ; then
|
|
if test -d "$r"/gcc; then
|
|
if test -f "$r"/gcc/$compiler_name \
|
|
|| test -f "$r"/gcc/$compiler_name.exe; then
|
|
true
|
|
else
|
|
echo "rm -f multilib.out" > skip-this-dir
|
|
fi
|
|
fi
|
|
fi
|
|
|
|
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
|
|
configdirs="tests dbz stdio testsuite"
|
|
else
|
|
configdirs="tests dbz stdio"
|
|
fi
|
|
srctrigger=libioP.h
|
|
srcname="input/output library"
|
|
package_makefile_frag=Make.pack
|
|
package_makefile_rules_frag=Make.pack.r
|
|
|
|
# per-host:
|
|
|
|
# per-target:
|
|
|
|
echo "# Warning: this fragment is automatically generated" > temp.mt
|
|
frags=
|
|
case x$enable_threads in
|
|
xno) ;;
|
|
*) mtsafe=mtsafe.mt ;;
|
|
esac
|
|
|
|
case "${target}" in
|
|
*-mpeix*) frags="mpeix.mt" ;;
|
|
*-hpux*) frags=hpux.mt ;;
|
|
alpha*-*-linux*libc1)
|
|
frags="linux.mt linuxaxp1.mt $mtsafe" ;;
|
|
powerpc*-*-linux*libc1)
|
|
frags="linux.mt linuxaxp1.mt $mtsafe" ;;
|
|
*-linux*libc1)
|
|
frags=linuxlibc1.mt ;;
|
|
*-linux*)
|
|
frags="linux.mt $mtsafe" ;;
|
|
*-isc*) frags=isc.mt ;;
|
|
*-netware*) frags=netware.mt ;;
|
|
*-dgux*) frags=dgux.mt ;;
|
|
*vxworks*) frags="vxworks.mt" ;;
|
|
*-beos*) frags="beos.mt $mtsafe" ;;
|
|
*) 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
|
|
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" ;;
|
|
sparc*-*-*) frags="${frags} ../../config/mh-sparcpic" ;;
|
|
*-*-*) frags="${frags} ../../config/mh-${target_cpu}pic" ;;
|
|
esac
|
|
fi
|
|
|
|
# Take care of header file lossage.
|
|
case "${target}" in
|
|
alpha*-*-linux*libc1)
|
|
# 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
|
|
;;
|
|
powerpc*-*-linux*libc1)
|
|
# 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
|
|
;;
|
|
*-linux*)
|
|
# 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
|
|
|
|
}
|
|
;;
|
|
esac
|
|
|
|
for frag in ${frags}; do
|
|
case ${frag} in
|
|
../* )
|
|
if [ ${srcdir} = . ]; then
|
|
[ -n "${with_target_subdir}" ] && frag=../${frag}
|
|
[ -n "${with_multisrctop}" ] && frag=${with_multisrctop}${frag}
|
|
fi
|
|
;;
|
|
esac
|
|
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=../
|
|
ALL='$(_G_CONFIG_H) libio.a libiostream.a iostream.list'
|
|
case "${target}" in
|
|
*-*-cygwin*)
|
|
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
|
|
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
|
|
if [ -n "${with_cross_host}" -a -d ${topsrcdir}/gcc ]; then
|
|
CHECK_SUBDIRS=testsuite
|
|
fi
|
|
(. ${srcdir}/config.shared) >${package_makefile_frag} 2>${package_makefile_rules_frag}
|
|
|
|
# post-target:
|
|
|
|
# If cross-compiling, we install in $(tooldir)/lib or in $(libsubdir)
|
|
# depending on --enable-version-specific-runtime-libs.
|
|
if [ -n "${with_cross_host}" ] ; then
|
|
rm -f Makefile.tem
|
|
sed \
|
|
-e 's|\(^[ ]*INSTALLDIR[ ]*=[ ]*\)\$(libdir)|\1$(tooldir)/lib|' \
|
|
Makefile >Makefile.tem
|
|
mv -f Makefile.tem Makefile
|
|
fi
|
|
|
|
. ${topsrcdir}/config-ml.in
|
|
|
|
gxx_include_dir=
|
|
# Specify the g++ header file directory
|
|
# Check whether --with-gxx-include-dir or --without-gxx-include-dir was given.
|
|
if test "${with_gxx_include_dir+set}" = set; then
|
|
withval="$with_gxx_include_dir"
|
|
case "${withval}" in
|
|
yes)
|
|
echo "configure.in: error: bad value ${withval} given for g++ include directory" 1>&2
|
|
exit 1
|
|
;;
|
|
no) ;;
|
|
*) gxx_include_dir=$with_gxx_include_dir ;;
|
|
esac
|
|
fi
|
|
|
|
if test x${gxx_include_dir} = x; then
|
|
if test x${enable_version_specific_runtime_libs} = xyes; then
|
|
gxx_include_dir='${libsubdir}/include/g++'
|
|
else
|
|
. ${topsrcdir}/config.if
|
|
gxx_include_dir='${prefix}/include/g++'-${libstdcxx_interface}
|
|
fi
|
|
fi
|
|
|
|
rm -f Makefile.tem
|
|
sed -e "s%^gxx_include_dir[ ]*=.*$%gxx_include_dir=${gxx_include_dir}%" \
|
|
Makefile >Makefile.tem
|
|
mv -f Makefile.tem Makefile
|