aboutsummaryrefslogtreecommitdiff
path: root/contrib/libio/configure.in
diff options
context:
space:
mode:
authorDavid E. O'Brien <obrien@FreeBSD.org>1999-10-04 08:17:54 +0000
committerDavid E. O'Brien <obrien@FreeBSD.org>1999-10-04 08:17:54 +0000
commit04626017cb749d6f136095d08849d1d014b5fb40 (patch)
tree50ded16eb354bed37a52d5661568400841645361 /contrib/libio/configure.in
parent43d36c40e70660b96e7d58f04f39090aa8ce602e (diff)
Virgin import of EGCS 1.1.2's libio -- the C++ iostream facility.
Notes
Notes: svn path=/vendor/gcc/dist/; revision=51922
Diffstat (limited to 'contrib/libio/configure.in')
-rw-r--r--contrib/libio/configure.in154
1 files changed, 154 insertions, 0 deletions
diff --git a/contrib/libio/configure.in b/contrib/libio/configure.in
new file mode 100644
index 000000000000..5cb091daac65
--- /dev/null
+++ b/contrib/libio/configure.in
@@ -0,0 +1,154 @@
+# 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 [ "${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 "${target}" in
+ *-hpux*) frags=hpux.mt ;;
+ alpha*-*-linux-gnulibc1)
+ frags="linux.mt linuxaxp1.mt mtsafe.mt" ;;
+ powerpc*-*-linux-gnulibc1)
+ frags="linux.mt linuxaxp1.mt mtsafe.mt" ;;
+ *-linux-gnulibc1)
+ frags=linuxlibc1.mt ;;
+ *-linux-gnu) frags="linux.mt mtsafe.mt" ;;
+ *-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
+ 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" ;;
+ esac
+fi
+
+# Take care of header file lossage.
+case "${target}" in
+ 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
+ ;;
+ 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
+ ;;
+ *-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
+
+ }
+ ;;
+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
+ *-*-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
+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, 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 [ -n "${with_cross_host}" ] ; then
+ rm -f Makefile.tem
+ sed \
+ -e 's|INSTALLDIR.*=.*$|INSTALLDIR = $(tooldir)/lib|' \
+ Makefile >Makefile.tem
+ mv -f Makefile.tem Makefile
+fi
+
+. ${topsrcdir}/config-ml.in