#!/bin/sh
#
# djconfig.sh
# Configure the DJGPP port of libtool 1.4.3.
# Written by Richard Dawe <rich@phekda.freeserve.co.uk> 2003-01-01.
#

# Give the configure script some hints:
export LD=ld
export NM=nm
export CC=gcc
export CFLAGS="-O2 -g"
export RANLIB=ranlib
export DEFAULT_YACC="bison -y"
export YACC="bison -y"
export DEFAULT_LEX=flex

# Fileutils built against DJGPP 2.03 and earlier doesn't support
# proper symlinks.
export ac_cv_prog_LN_S='cp -pf'

# Fix up the test suite, so that we use autoconf's config.site.
# The DJGPP port of autoconf doesn't work properly without config.site.
# LATER: These changes have been incorporated into the diffs.
#echo "Fixing up libtool's test suite..."
#for i in tests/*.test; do
#    src=$i
#    backup=$(echo $i | sed -e 's:\.test$:.bak:')
#    echo -n ". $i -"
#    if [ -f $backup ]; then
#	echo " already backed up"
#    else
#	echo "> $backup"
#	cp -af $src $backup
#    fi
#    sed -e 's,^CONFIG_SITE.*/bin/sh} ,,' $backup > $src
#done

# Finally, configure.
echo "Running libtool's configure script..."
./configure --prefix=/dev/env/DJDIR --disable-shared
