]> git.cworth.org Git - ttt/blob - autogen.sh
Kevin learning C maintenance
[ttt] / autogen.sh
1 #!/bin/sh
2 # Run this to generate all the initial makefiles, etc.
3
4 set -e
5
6 ACLOCAL=${ACLOCAL-aclocal}
7 AUTOHEADER=${AUTOHEADER-autoheader}
8 AUTOMAKE=${AUTOMAKE-automake}
9 AUTOMAKE_FLAGS="--add-missing"
10 AUTOCONF=${AUTOCONF-autoconf}
11
12 ARGV0=$0
13
14 ## If you decide to use pkg-config to locate dependencies, then this
15 ## check can help tell users where to get pkg-config from if they
16 ## don't already have it.
17 #
18 #if test -z "$ACLOCAL_FLAGS"; then
19 #    acdir=`aclocal --print-ac-dir`
20 #    if [ ! -f $acdir/pkg.m4 ]; then
21 #       echo "$ARGV0: Error: Could not find pkg-config macros."
22 #       echo "        (Looked in $acdir/pkg.m4)"
23 #       echo "        If pkg.m4 is available in /another/directory, please set"
24 #       echo "        ACLOCAL_FLAGS=\"-I /another/directory\""
25 #       echo "        Otherwise, please install pkg-config."
26 #       echo ""
27 #       echo "pkg-config is available from:"
28 #       echo "http://www.freedesktop.org/software/pkgconfig/"
29 #       exit 1
30 #    fi
31 #fi
32
33 if test -z "$*"; then
34   echo "$ARGV0: Note: \`./configure' will be run with no arguments."
35   echo "                If you wish to pass any to it, please specify them on the"
36   echo "                \`$0' command line."
37   echo
38 fi
39
40 do_cmd() {
41     echo "$ARGV0: running \`$@'"
42     $@
43 }
44
45 do_cmd $ACLOCAL $ACLOCAL_FLAGS
46
47 do_cmd $AUTOHEADER
48
49 do_cmd $AUTOMAKE $AUTOMAKE_FLAGS
50
51 do_cmd $AUTOCONF
52
53 do_cmd ./configure --enable-maintainer-mode ${1+"$@"} && echo "Now type \`make' to compile" || exit 1