2 # Taken from lighthttpd server (BSD). Thanks Jan!
3 # Run this to generate all the initial makefiles, etc.
5 die
() { echo "$@"; exit 1; }
7 # --force means overwrite ltmain.sh script if it already exists
8 LIBTOOLIZE_FLAGS
=" --automake --copy --force"
9 # --add-missing instructs automake to install missing auxiliary files
10 # and --force to overwrite them if they already exist
11 AUTOMAKE_FLAGS
="--add-missing --copy --force"
18 echo "$ARGV0: running \`$@' $ARGS"
22 # Try to locate a program by using which, and verify that the file is an
27 file=`which $f 2>/dev/null | grep -v '^no '`
28 if test -n "$file" -a -x "$file"; then
39 if test -f config
/pre_hook.sh
44 # Try to detect the supported binaries if the user didn't
45 # override that by pushing the environment variable
46 if test x
$LIBTOOLIZE = x
; then
47 LIBTOOLIZE
=`locate_binary glibtoolize libtoolize-1.5 libtoolize`
48 if test x
$LIBTOOLIZE = x
; then
49 die
"Did not find a supported libtoolize"
53 if test x
$ACLOCAL = x
; then
54 ACLOCAL
=`locate_binary aclocal-1.10 aclocal-1.9 aclocal19 aclocal`
55 if test x
$ACLOCAL = x
; then
56 die
"Did not find a supported aclocal"
60 if test x
$AUTOMAKE = x
; then
61 AUTOMAKE
=`locate_binary automake-1.10 automake-1.9 automake19 automake`
62 if test x
$AUTOMAKE = x
; then
63 die
"Did not find a supported automake"
67 if test x
$AUTOCONF = x
; then
68 AUTOCONF
=`locate_binary autoconf-2.59 autoconf259 autoconf`
69 if test x
$AUTOCONF = x
; then
70 die
"Did not find a supported autoconf"
74 if test x
$AUTOHEADER = x
; then
75 AUTOHEADER
=`locate_binary autoheader-2.59 autoheader259 autoheader`
76 if test x
$AUTOHEADER = x
; then
77 die
"Did not find a supported autoheader"
81 run
$LIBTOOLIZE $LIBTOOLIZE_FLAGS || die
"Can't execute libtoolize"
82 run
$ACLOCAL $ACLOCAL_FLAGS || die
"Can't execute aclocal"
83 run
$AUTOHEADER || die
"Can't execute autoheader"
84 run
$AUTOMAKE $AUTOMAKE_FLAGS || die
"Can't execute automake"
85 run
$AUTOCONF || die
"Can't execute autoconf"
87 if test -f config
/post_hook.sh
93 echo "Configured with the following tools:"
94 echo " * `$LIBTOOLIZE --version | head -1`"
95 echo " * `$ACLOCAL --version | head -1`"
96 echo " * `$AUTOHEADER --version | head -1`"
97 echo " * `$AUTOMAKE --version | head -1`"
98 echo " * `$AUTOCONF --version | head -1`"