1#!/bin/sh
2# Run this to generate all the initial makefiles, etc.
3# This was lifted from the Gimp, and adapted slightly by
4# Raph Levien .
5
6DIE=0
7
8PROJECT=libggzmod
9
10(autoconf --version) < /dev/null > /dev/null 2>&1 || {
11        echo
12        echo "You must have autoconf installed to compile $PROJECT."
13        echo "Download the appropriate package for your distribution,"
14        echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
15        DIE=1
16}
17
18# Do we really need libtool?
19(libtool --version) < /dev/null > /dev/null 2>&1 || {
20        echo
21        echo "You must have libtool installed to compile $PROJECT."
22        echo "Get ftp://ftp.gnu.org/pub/gnu/libtool-1.2.tar.gz"
23        echo "(or a newer version if it is available)"
24        DIE=1
25}
26
27(automake --version) < /dev/null > /dev/null 2>&1 || {
28        echo
29        echo "You must have automake installed to compile $PROJECT."
30        echo "Get ftp://ftp.gnu.org/pub/gnu/automake-1.3.tar.gz"
31        echo "(or a newer version if it is available)"
32        DIE=1
33}
34
35if test "$DIE" -eq 1; then
36        exit 1
37fi
38
39if test -z "$*"; then
40        echo "I am going to run ./configure with no arguments - if you wish "
41        echo "to pass any to it, please specify them on the $0 command line."
42fi
43
44case $CC in
45*xlc | *xlc\ * | *lcc | *lcc\ *) am_opt=--include-deps;;
46esac
47
48for dir in .
49do
50  echo processing $dir
51  (cd $dir; \
52  aclocalinclude="$ACLOCAL_FLAGS"; \
53  aclocal $aclocalinclude; \
54  autoheader; automake --add-missing --gnu $am_opt; autoconf)
55done
56
57./configure "$@"
58
59echo
60echo "Now type 'make' to compile $PROJECT."
61