3 # Run this before configure
5 # This file blatantly ripped off from subversion.
7 # Note: this dependency on Perl is fine: only developers use autogen.sh
8 # and we can state that dev people need Perl on their machine
14 test -z "$srcdir" && srcdir=.
19 automake --version | perl -ne 'if (/\(GNU automake\) (([0-9]+).([0-9]+))/) {print; if ($2 < 1 || ($2 == 1 && $3 < 4)) {exit 1;}}'
22 echo "Error: you need automake 1.4 or later. Please upgrade."
26 if test ! -d `aclocal --print-ac-dir 2>> autogen.err`; then
27 echo "Bad aclocal (automake) installation"
32 for found_lib in libtoolize glibtoolize ; do
33 $found_lib --version > /dev/null 2>&1
40 $libtoolize --force --copy || {
41 echo "error: libtoolize failed"
45 # Produce aclocal.m4, so autoconf gets the automake macros it needs
47 echo "Creating aclocal.m4: aclocal -I ac-helpers $ACLOCAL_FLAGS"
49 aclocal -I ac-helpers $ACLOCAL_FLAGS 2>> autogen.err
51 # Produce all the `GNUmakefile.in's and create neat missing things
52 # like `install-sh', etc.
54 echo "automake --add-missing --copy --foreign"
56 automake --add-missing --copy --foreign 2>> autogen.err || {
58 echo "* * * warning: possible errors while running automake - check autogen.err"
62 # If there's a config.cache file, we may need to delete it.
63 # If we have an existing configure script, save a copy for comparison.
64 if [ -f config.cache ] && [ -f configure ]; then
65 cp configure configure.$$.tmp
70 echo "Creating configure..."
72 autoconf 2>> autogen.err || {
74 echo "* * * warning: possible errors while running automake - check autogen.err"
91 if $run_configure; then
92 $srcdir/configure --enable-maintainer-mode "$@"
94 echo "Now type 'make' to compile enchant."
97 echo "Now run 'configure' and 'make' to compile enchant."