[BACK]Return to config.if CVS log [TXT][DIR] Up to [local] / src / gnu / egcs

File: [local] / src / gnu / egcs / Attic / config.if (download)

Revision 1.1.1.1 (vendor branch), Wed May 26 13:33:48 1999 UTC (25 years ago) by espie
Branch: CYGNUS
CVS Tags: OPENBSD_5_4_BASE, OPENBSD_5_4, OPENBSD_5_3_BASE, OPENBSD_5_3, OPENBSD_5_2_BASE, OPENBSD_5_2, OPENBSD_5_1_BASE, OPENBSD_5_1, OPENBSD_5_0_BASE, OPENBSD_5_0, OPENBSD_4_9_BASE, OPENBSD_4_9, OPENBSD_4_8_BASE, OPENBSD_4_8, OPENBSD_4_7_BASE, OPENBSD_4_7, OPENBSD_4_6_BASE, OPENBSD_4_6, OPENBSD_4_5_BASE, OPENBSD_4_5, OPENBSD_4_4_BASE, OPENBSD_4_4, OPENBSD_4_3_BASE, OPENBSD_4_3, OPENBSD_4_2_BASE, OPENBSD_4_2, OPENBSD_4_1_BASE, OPENBSD_4_1, OPENBSD_4_0_BASE, OPENBSD_4_0, OPENBSD_3_9_BASE, OPENBSD_3_9, OPENBSD_3_8_BASE, OPENBSD_3_8, OPENBSD_3_7_BASE, OPENBSD_3_7, OPENBSD_3_6_BASE, OPENBSD_3_6, OPENBSD_3_5_BASE, OPENBSD_3_5, OPENBSD_3_4_BASE, OPENBSD_3_4, OPENBSD_3_3_BASE, OPENBSD_3_3, OPENBSD_3_2_BASE, OPENBSD_3_2, OPENBSD_3_1_BASE, OPENBSD_3_1, OPENBSD_3_0_BASE, OPENBSD_3_0, OPENBSD_2_9_BASE, OPENBSD_2_9, OPENBSD_2_8_BASE, OPENBSD_2_8, OPENBSD_2_7_BASE, OPENBSD_2_7, OPENBSD_2_6_BASE, OPENBSD_2_6, GCC-2_95_pre3_test3, GCC-2_95_pre3_test2, GCC-2_95_pre3_20000527, GCC-2_95_2, GCC-2_95_1, CYGNUS-990718, CYGNUS-990629, CYGNUS-990608, CYGNUS-19990517
Changes since 1.1: +0 -0 lines

egcs projects compiler system
Exact copy of the snapshot, except for the removal of
	texinfo/
	gcc/ch/
	libchill/


#! /dev/null
# Don't call it directly. This shell script fragment is called to
# determine:
#
#	1. libstcxx_interface: the interface name for libstdc++.
#	2. cxx_interface: the interface name for c++.
#	3. libc_interface: the interface name for libc.
#

# Get the top level src dir.
if [ -z "${topsrcdir}" -a -z "${top_srcdir}" ]
then
  echo "Undefined top level src dir: topsrcdir and top_srcdir are empty" >&2
  exit 1
fi

if [ -n "${topsrcdir}" ]
then
  if_topsrcdir=${topsrcdir}
else
  if_topsrcdir=${top_srcdir}
fi

if [ -f ${if_topsrcdir}/libstdc++/Makefile.in ]; then
# We check libstdc++ for libstdcxx_interface.
libstdcxx_interface=`grep "^INTERFACE" ${if_topsrcdir}/libstdc++/Makefile.in | sed 's/INTERFACE[ 	]*=[ 	]*\(.*\)/\1/'`
else
libstdcxx_interface=
fi

if [ -f ${if_topsrcdir}/gcc/cp/Makefile.in ]; then
# We check gcc/cp for cxx_interface.
cxx_interface=`grep "^INTERFACE" ${if_topsrcdir}/gcc/cp/Makefile.in | sed 's/INTERFACE[ 	]*=[ 	]*\(.*\)/\1/'`
else
cxx_interface=
fi

# The trickiest part is libc_interface.
if [ -z "${libc_interface}" ]
then
  case ${target_os} in
  *linux*libc1*|*linux*libc5*)
    case ${target_alias} in
    *alpha*|*powerpc*)
      libc_interface=-libc5.9-
      ;;
    *)
      libc_interface=-libc5-
      ;;
    esac
    ;;
  *linux*gnu*)
    # We have to work harder to figure it out.
    if [ ${target_alias} = ${build_alias} ]
    then
      dummy=if$$
      cat >$dummy.c <<EOF
#include <features.h>                      
main(argc, argv)
     int argc;          
     char *argv[];
{
  printf("%d\n", __GLIBC_MINOR__);
  return 0;
}
EOF
      ${CC-cc} $dummy.c -o $dummy 2>/dev/null
      if [ "$?" = 0 ]
      then
	libc_interface=-libc6.`./$dummy`-
	rm -f $dummy.c $dummy
      else
	# It should never happen.
	echo "Cannot find the GNU C library minor version number." >&2
	rm -f $dummy.c $dummy
	exit 1
      fi
    else
      # Cross compiling. Assume glibc 2.1.
      libc_interface=-libc6.1-
    fi
    ;;
  *)
    libc_interface=-
    ;;
  esac
fi