#! /bin/sh
# where are the sources? If you use (like I) to have the sources
# in a separate directory and the objects in an other, then set
# here the full path to the source directory and run this script
# in the directory where you want to build gcc!!
# WARNING: Only unix-like absolute paths are known to work, like
#
# /src/egcs-1.1a
#
# do not use any drive in it like
#
# c:/src/egcs-1.1a
#
# since this will confuse all that unix like scrips, which
# assume that a absolute path starts with a slash.
srcdir=..

# just in case
export PATH_SEPARATOR=:

# The following is needed, to get not the // syntax, when
# the configure script or the makefile calls pwd
current_drive=`pwd | sed 's,//\(.\).*,\1,'`
export SYSROOT=$current_drive:/

# give now the configure script some hints
topdir=`(cd $srcdir/..; pwd;)`
export CC="$topdir/gcc/build.djg/xgcc.exe -B $topdir/gcc/build.djg/"
export CXX="$topdir/gcc/build.djg/g++.exe -B $topdir/gcc/build.djg/"
export LD=ld
export DEFAULT_LEX=flex
export LEX=flex
export RANLIB=ranlib
export ac_cv_path_install="ginstall -c"
export CONFIG_SHELL=bash
#
$srcdir/configure --srcdir=$srcdir --disable-shared --verbose \
		  --with-gxx-include-dir=\\\${prefix}/lang/cxx \
		  --with-gnu-ld	--target=i586-pc-msdosdjgpp \
		  --host=i586-pc-msdosdjgpp
#
dtou `find . -name Makefile`
