]> jfr.im git - irc/evilnet/znc.git/blob - autogen.sh
Fix missing brace
[irc/evilnet/znc.git] / autogen.sh
1 #!/bin/sh
2 # Run this to generate all the initial makefiles, etc.
3 # This is based on various examples which can be found everywhere.
4 set -e
5
6 FLAGS=${FLAGS--Wall}
7 ACLOCAL=${ACLOCAL-aclocal}
8 AUTOHEADER=${AUTOHEADER-autoheader}
9 AUTOCONF=${AUTOCONF-autoconf}
10 AUTOMAKE=${AUTOMAKE-automake}
11 ACLOCAL_FLAGS="${ACLOCAL_FLAGS--I m4} ${FLAGS}"
12 AUTOHEADER_FLAGS="${AUTOHEADER_FLAGS} ${FLAGS}"
13 AUTOCONF_FLAGS="${AUTOCONF_FLAGS} ${FLAGS}"
14 AUTOMAKE_FLAGS="${AUTOMAKE_FLAGS---add-missing} ${FLAGS}"
15
16 die() {
17 echo "$@"
18 exit 1
19 }
20 do_cmd() {
21 echo "Running '$@'"
22 $@
23 }
24
25 test -f configure.ac || die "No configure.ac found."
26 which pkg-config > /dev/null || die "ERROR: pkg-config not found. Install pkg-config and run $0 again"
27
28 # Generate aclocal.m4 for use by autoconf
29 do_cmd $ACLOCAL $ACLOCAL_FLAGS
30 # Generate zncconfig.h.in for configure
31 do_cmd $AUTOHEADER $AUTOHEADER_FLAGS
32 # Generate configure
33 do_cmd $AUTOCONF $AUTOCONF_FLAGS
34
35 # Copy config.sub, config.guess, install.sh, ...
36 # This will complain that we don't use automake, let's just ignore that
37 do_cmd $AUTOMAKE $AUTOMAKE_FLAGS || true
38 test -f config.guess -a -f config.sub -a -f install-sh ||
39 die "Automake didn't install config.guess, config.sub and install-sh!"
40
41 echo "(Yes, automake is supposed to fail, ignore that)"
42 echo
43
44 echo "You may now run ./configure."