#!/bin/sh # Generates ./configure, Makefile.in's and tools # Copyright (C) 2007, 2008, 2010 Sylvain Beucler # Copying and distribution of this file, with or without modification, # are permitted in any medium without royalty provided the copyright # notice and this notice are preserved. # Cf. doc/bootstrap.txt. # Stop at first error: set -e # Print commands: set -x if [ "x$1" = xclean ]; then test ! -f Makefile || make maintainer-clean || true # Generated by aclocal. rm -f aclocal.m4 # Generated by autoheader. rm -f config.h.in # Generated by autoconf. rm -f configure rm -rf autom4te.cache/ # Generated or brought in by automake. find -name "Makefile.in" | xargs -r rm find autotools/ -type l | xargs -r rm exit; fi if ! which pkg-config > /dev/null; then echo "Please install 'pkg-config' (used to query installed dependencies)" echo "Cf. http://pkgconfig.freedesktop.org/" exit 1 fi # Gnulib # Look for gnulib-tool. Use '|| true' because of 'set -e' above GNULIB_TOOL=`PATH=gnulib-git:$PATH:/usr/src/gnulib which gnulib-tool \ || true` if [ -z "$GNULIB_TOOL" ]; then git clone git://git.savannah.gnu.org/gnulib.git gnulib-git GNULIB_TOOL=./gnulib-git/gnulib-tool fi $GNULIB_TOOL --update --more-symlinks # Beware of gnulib/gettext interaction, # cf. http://lists.gnu.org/archive/html/bug-gnulib/2008-12/msg00041.html if autoreconf --install --symlink --force $* then echo "You now can run ./configure" else echo "*** Error: please check the messages above. ***" fi