2
# Run this to generate all the initial makefiles, etc.
4
# Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
6
# This file is free software; as a special exception the author gives
7
# unlimited permission to copy and/or distribute it, with or without
8
# modifications, as long as this notice is preserved.
10
# This program is distributed in the hope that it will be useful, but
11
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
12
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
20
ACLOCAL=${ACLOCAL:-aclocal}
21
AUTOCONF=${AUTOCONF:-autoconf}
22
AUTOMAKE=${AUTOMAKE:-automake}
23
AUTOHEADER=${AUTOHEADER:-autoheader}
25
if test "$1" = "--build-w32"; then
27
tsdir=`cd "$tmp"; cd ..; pwd`
30
if [ ! -f $tsdir/scripts/config.guess ]; then
31
echo "$tsdir/scripts/config.guess not found" >&2
34
build=`$tsdir/scripts/config.guess`
36
if ! mingw32 --version >/dev/null; then
37
echo "We need at least version 0.3 of MingW32/CPD" >&2
41
if [ -f "$tsdir/config.log" ]; then
42
if ! head $tsdir/config.log | grep i386--mingw32 >/dev/null; then
43
echo "Pease run a 'make distclean' first" >&2
48
crossbindir=`mingw32 --install-dir`/bin
49
CC=`mingw32 --get-path gcc`
50
CPP=`mingw32 --get-path cpp`
51
AR=`mingw32 --get-path ar`
52
RANLIB=`mingw32 --get-path ranlib`
53
export CC CPP AR RANLIB
56
if [ -n "$lib_config_files" ]; then
57
for i in $lib_config_files; do
58
j=`echo $i | tr '[a-z-]' '[A-Z_]'`
59
eval "$j=${crossbindir}/$i"
61
disable_foo_tests="$disable_foo_tests --disable-`echo $i| \
62
sed 's,-config$,,'`-test"
63
if [ ! -f "${crossbindir}/$i" ]; then
64
echo "$i not installed for MingW32" >&2
69
[ $DIE = yes ] && exit 1
71
$tsdir/configure --build=${build} --host=${host} \
72
${disable_foo_tests} $*
78
if ($AUTOCONF --version) < /dev/null > /dev/null 2>&1 ; then
79
if ($AUTOCONF --version | awk 'NR==1 { if( $3 >= '$autoconf_vers') \
82
echo "**Error**: "\`autoconf\'" is too old."
83
echo ' (version ' $autoconf_vers ' or newer is required)'
88
echo "**Error**: You must have "\`autoconf\'" installed to compile $PGM."
89
echo ' (version ' $autoconf_vers ' or newer is required)'
93
if ($AUTOMAKE --version) < /dev/null > /dev/null 2>&1 ; then
94
if ($AUTOMAKE --version | awk 'NR==1 { if( $4 >= '$automake_vers') \
97
echo "**Error**: "\`automake\'" is too old."
98
echo ' (version ' $automake_vers ' or newer is required)'
101
if ($ACLOCAL --version) < /dev/null > /dev/null 2>&1; then
102
if ($ACLOCAL --version | awk 'NR==1 { if( $4 >= '$aclocal_vers' ) \
103
exit 1; exit 0; }' );
105
echo "**Error**: "\`aclocal\'" is too old."
106
echo ' (version ' $aclocal_vers ' or newer is required)'
111
echo "**Error**: Missing "\`aclocal\'". The version of "\`automake\'
112
echo " installed doesn't appear recent enough."
117
echo "**Error**: You must have "\`automake\'" installed to compile $PGM."
118
echo ' (version ' $automake_vers ' or newer is required)'
123
if (gettext --version </dev/null 2>/dev/null | awk 'NR==1 { split($4,A,"."); \
124
X=10000*A[1]+100*A[2]+A[3]; echo X; if( X >= 1038 ) exit 1; exit 0}')
126
echo "**Error**: You must have "\`gettext\'" installed to compile $PGM."
127
echo ' (version 0.10.38 or newer is required; get'
128
echo ' ftp://alpha.gnu.org/gnu/gettext/gettext-0.10.38.tar.gz'
129
echo ' or install the latest Debian package)'
134
if test "$DIE" = "yes"; then
138
echo "Running aclocal..."
140
echo "Running autoheader..."
142
echo "Running automake --gnu ..."
144
echo "Running autoconf..."
147
echo "You can now run \"./configure --enable-maintainer-mode\" and then \"make\"."