2 # Run this to generate all the initial makefiles, etc.
3 # This is based on various examples which can be found everywhere.
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}"
25 test -f configure.ac
|| die
"No configure.ac found."
27 # Generate aclocal.m4 for use by autoconf
28 do_cmd
$ACLOCAL $ACLOCAL_FLAGS
29 # Generate zncconfig.h.in for configure
30 do_cmd
$AUTOHEADER $AUTOHEADER_FLAGS
32 do_cmd
$AUTOCONF $AUTOCONF_FLAGS
34 if grep PKG_CHECK_MODULES configure
> /dev
/null
37 die
"ERROR: pkg-config not found. Install pkg-config and run $0 again"
40 # Copy config.sub, config.guess, install.sh, ...
41 # This will complain that we don't use automake, let's just ignore that
42 do_cmd
$AUTOMAKE $AUTOMAKE_FLAGS || true
43 test -f config.guess
-a -f config.sub
-a -f install-sh ||
44 die
"Automake didn't install config.guess, config.sub and install-sh!"
46 echo "(Yes, automake is supposed to fail, ignore that)"
49 echo "You may now run ./configure."