#! /bin/sh

#
# ----------------------------------------------------------------------------
# "THE BEER-WARE LICENSE" (Revision 42):
# <raph@rhs.se> wrote this file. As long as you retain this notice
# you can do whatever you want with this stuff. If we meet some day, and you
# think this stuff is worth it, you can buy me a beer in return. Raphael Poss
# ----------------------------------------------------------------------------
#

echo "Running aclocal..."
aclocal --verbose >aclocal.log 2>&1
echo "Running libtoolize..."
#libtoolize -f -c --ltdl
false && (
   cd libltdl
   echo "Running aclocal in libltdl/..."
   aclocal --verbose &>aclocal.log
   echo "Running libtoolize in libltdl/..."
   libtoolize -f -c
   if [ -f configure.in ]; then
      echo "Fixing libltdl/configure.in..."
      (echo "AC_PREREQ(2.50)"; cat configure.in) > configure.tmp
      mv configure.tmp configure.in
   fi
   echo "Running autoreconf in libltdl/..."
   autoreconf -i -f -v >autoreconf.log 2>&1
)
echo "Re-running autoreconf..."
autoreconf -v -f -i >autoreconf.log 2>&1

echo
echo "Reconfiguration done." 
echo "Check ./configure --help for additional info."
