2 # Run this to generate all the initial makefiles, etc.
3 # It is only needed for the CVS version.
13 if test "$1" = "--build-w32"; then
16 if [ ! -f ./config.guess ]; then
17 echo "./config.guess not found" >&2
22 if ! mingw32 --version >/dev/null; then
23 echo "We need at least version 0.3 of MingW32/CPD" >&2
27 if [ -f config.h ]; then
28 if grep HAVE_DOSISH_SYSTEM config.h | grep undef >/dev/null; then
29 echo "Pease run a 'make distclean' first" >&2
34 crossinstalldir=`mingw32 --install-dir`
35 crossbindir=`mingw32 --get-bindir 2>/dev/null` \
36 || crossbindir="$crossinstalldir/bin"
37 crossdatadir=`mingw32 --get-datadir 2>/dev/null` \
38 || crossdatadir="$crossinstalldir/share"
39 crosslibdir=`mingw32 --get-libdir 2>/dev/null` \
40 || crosslibdir="$crossinstalldir/i386--mingw32/lib"
41 crossincdir=`mingw32 --get-includedir 2>/dev/null` \
42 || crossincdir="$crossinstalldir/i386--mingw32/include"
43 CC=`mingw32 --get-path gcc`
44 CPP=`mingw32 --get-path cpp`
45 AR=`mingw32 --get-path ar`
46 RANLIB=`mingw32 --get-path ranlib`
47 export CC CPP AR RANLIB
50 if [ -n "$lib_config_files" ]; then
51 for i in $lib_config_files; do
52 j=`echo $i | tr '[a-z-]' '[A-Z_]'`
53 eval "$j=${crossbindir}/$i"
55 disable_foo_tests="$disable_foo_tests --disable-`echo $i| \
56 sed 's,-config$,,'`-test"
57 if [ ! -f "${crossbindir}/$i" ]; then
58 echo "$i not installed for MingW32" >&2
63 [ $DIE = yes ] && exit 1
65 ./configure --host=${host} --target=${target} ${disable_foo_tests} \
66 --bindir=${crossbindir} --libdir=${crosslibdir} \
67 --datadir=${crossdatadir} --includedir=${crossincdir} \
68 --enable-maintainer-mode $*
74 if (autoconf --version) < /dev/null > /dev/null 2>&1 ; then
75 if (autoconf --version | awk 'NR==1 { if( $3 >= '$autoconf_vers') \
78 echo "**Error**: "\`autoconf\'" is too old."
79 echo ' (version ' $autoconf_vers ' or newer is required)'
84 echo "**Error**: You must have "\`autoconf\'" installed to compile $PGM."
85 echo ' (version ' $autoconf_vers ' or newer is required)'
89 if (automake --version) < /dev/null > /dev/null 2>&1 ; then
90 if (automake --version | awk 'NR==1 { if( $4 >= '$automake_vers') \
93 echo "**Error**: "\`automake\'" is too old."
94 echo ' (version ' $automake_vers ' or newer is required)'
97 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
98 if (aclocal --version | awk 'NR==1 { if( $4 >= '$aclocal_vers' ) \
101 echo "**Error**: "\`aclocal\'" is too old."
102 echo ' (version ' $aclocal_vers ' or newer is required)'
107 echo "**Error**: Missing "\`aclocal\'". The version of "\`automake\'
108 echo " installed doesn't appear recent enough."
113 echo "**Error**: You must have "\`automake\'" installed to compile $PGM."
114 echo ' (version ' $automake_vers ' or newer is required)'
119 if (libtool --version) < /dev/null > /dev/null 2>&1 ; then
120 if (libtool --version | awk 'NR==1 { if( $4 >= '$libtool_vers') \
123 echo "**Error**: "\`libtool\'" is too old."
124 echo ' (version ' $libtool_vers ' or newer is required)'
129 echo "**Error**: You must have "\`libtool\'" installed to compile $PGM."
130 echo ' (version ' $libtool_vers ' or newer is required)'
134 if test "$DIE" = "yes"; then
138 echo "Running libtoolize... Ignore non-fatal messages."
139 echo "no" | libtoolize
142 echo "Running aclocal..."
144 echo "Running autoheader..."
146 echo "Running automake --gnu -a ..."
148 echo "Running autoconf..."