2 # Run this to generate all the initial makefiles, etc.
3 # It is only needed for the CVS version.
9 # Use --build-w32 to prepare the cross compiling build for Windoze
11 if test "$1" = "--build-w32"; then
17 CPP="${target}-gcc -E"
18 RANLIB="${target}-ranlib"
20 cc_version=`$CC --version`
21 if ! echo "$cc_version" | egrep '[0-9]+wk[0-9]+' ; then
22 echo "gcc version $cc_version is not supported" >&2
23 echo "see doc/README.W32 for instructions" >&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
35 ./configure --host=${host} --target=${target} $*
45 if (autoconf --version) < /dev/null > /dev/null 2>&1 ; then
46 if (autoconf --version | awk 'NR==1 { if( $3 >= '$autoconf_vers') \
49 echo "**Error**: "\`autoconf\'" is too old."
50 echo ' (version ' $autoconf_vers ' or newer is required)'
55 echo "**Error**: You must have "\`autoconf\'" installed to compile $PGM."
56 echo ' (version ' $autoconf_vers ' or newer is required)'
60 if (automake --version) < /dev/null > /dev/null 2>&1 ; then
61 if (automake --version | awk 'NR==1 { if( $4 >= '$automake_vers') \
64 echo "**Error**: "\`automake\'" is too old."
65 echo ' (version ' $automake_vers ' or newer is required)'
68 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
69 if (aclocal --version | awk 'NR==1 { if( $4 >= '$aclocal_vers' ) \
72 echo "**Error**: "\`aclocal\'" is too old."
73 echo ' (version ' $aclocal_vers ' or newer is required)'
78 echo "**Error**: Missing "\`aclocal\'". The version of "\`automake\'
79 echo " installed doesn't appear recent enough."
84 echo "**Error**: You must have "\`automake\'" installed to compile $PGM."
85 echo ' (version ' $automake_vers ' or newer is required)'
90 if (libtool --version) < /dev/null > /dev/null 2>&1 ; then
91 if (libtool --version | awk 'NR==1 { if( $4 >= '$libtool_vers') \
94 echo "**Error**: "\`libtool\'" is too old."
95 echo ' (version ' $libtool_vers ' or newer is required)'
100 echo "**Error**: You must have "\`libtool\'" installed to compile $PGM."
101 echo ' (version ' $libtool_vers ' or newer is required)'
105 if test "$DIE" = "yes"; then
109 echo "Running libtoolize... Ignore non-fatal messages."
110 echo "no" | libtoolize
113 echo "Running aclocal..."
115 echo "Running autoheader..."
117 echo "Running automake --gnu ..."
119 echo "Running autoconf..."
122 if test "$*" = ""; then
123 conf_options="--enable-maintainer-mode"
127 echo "Running ./configure $conf_options"
128 ./configure $conf_options