summaryrefslogtreecommitdiffstats
path: root/contrib/libio/configure.in
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/libio/configure.in')
-rw-r--r--contrib/libio/configure.in73
1 files changed, 59 insertions, 14 deletions
diff --git a/contrib/libio/configure.in b/contrib/libio/configure.in
index 5cb091d..ac49429 100644
--- a/contrib/libio/configure.in
+++ b/contrib/libio/configure.in
@@ -2,6 +2,25 @@
# 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}../..
@@ -53,15 +72,13 @@ esac
if [ "${shared}" = "yes" ]; then
case "${target}" in
- hppa*-*) frags="${frags} ../../config/mh-papic" ;;
- i[3456]86-*) frags="${frags} ../../config/mh-x86pic" ;;
- alpha*-*-linux*) frags="${frags} ../../config/mh-elfalphapic" ;;
-
- # There doesn't seem to be a simpler way to say all-ppc except AIX
- *-*-aix*) ;;
- powerpc*-* | ppc*-*) frags="${frags} ../../config/mh-ppcpic" ;;
-
- *) frags="${frags} ../../config/mh-${target_cpu}pic" ;;
+ 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" ;;
esac
fi
@@ -120,7 +137,7 @@ LIBDIR=yes
TO_TOPDIR=../
ALL='$(_G_CONFIG_H) libio.a libiostream.a iostream.list'
case "${target}" in
- *-*-cygwin32*)
+ *-*-cygwin*)
XCINCLUDES='-I. -I$(srcdir) -I$(srcdir)/../winsup/include'
XCXXINCLUDES='-I. -I$(srcdir) -I$(srcdir)/../winsup/include'
;;
@@ -140,15 +157,43 @@ fi
# post-target:
-# If cross-compiling, don't build gperf or the utils. They
-# will get built by the target compiler, which is confusing.
-# We cannot test the installation. We install in $(tooldir).
+# 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.*=.*$|INSTALLDIR = $(tooldir)/lib|' \
+ -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
OpenPOWER on IntegriCloud