1#!/bin/sh
2# Generates ./configure, Makefile.in's and tools
3
4# Copyright (C) 2007, 2008  Sylvain Beucler
5
6# Copying and distribution of this file, with or without modification,
7# are permitted in any medium without royalty provided the copyright
8# notice and this notice are preserved.
9
10
11# Stop at first error:
12set -e
13# Print commands:
14set -x
15
16if [ "x$1" = xclean ]; then
17    test ! -f Makefile || make maintainer-clean || true
18
19    # Generated by aclocal.
20    rm -f aclocal.m4
21    # Generated by autoheader.
22    rm -f config.h.in
23    # Generated by autoconf.
24    rm -f configure
25    rm -rf autom4te.cache/
26    # Generated or brought in by automake.
27    find -name "Makefile.in" | xargs -r rm
28    find autotools/ -type l | xargs -r rm
29    rm -f INSTALL
30    # Generated or brought in by intltoolize
31    rm -f po/Makefile.in.in
32    exit
33fi
34
35# Enable no-portability to disable GNU make extensions warnings, such as $(shell)
36#if autoreconf --install --symlink --warnings=all --warnings=no-portability $*
37if autoreconf --install --symlink --warnings=all $* && intltoolize --force
38then echo "You now can run ./configure"
39else echo "*** Error: please check the messages above. ***"
40fi
41