2 # Taken from lighthttpd server (BSD). Thanks Jan!
3 # Run this to generate all the initial makefiles, etc.
5 die
() { echo "$@"; exit 1; }
7 # LIBTOOLIZE=${LIBTOOLIZE:-libtoolize}
8 LIBTOOLIZE_FLAGS
=" --automake --copy --force"
9 # ACLOCAL=${ACLOCAL:-aclocal}
11 # AUTOHEADER=${AUTOHEADER:-autoheader}
12 # AUTOMAKE=${AUTOMAKE:-automake}
13 AUTOMAKE_FLAGS
="--add-missing --copy --force"
14 # AUTOCONF=${AUTOCONF:-autoconf}
21 echo "$ARGV0: running \`$@' $ARGS"
25 ## jump out if one of the programs returns 'false'
28 ## We do not currently support glibtoolize
29 if test x
$LIBTOOLIZE = x
; then
30 if test \
! "x`which glibtoolize 2> /dev/null | grep -v '^no'`" = x
; then
31 LIBTOOLIZE
=glibtoolize
32 elif test \
! "x`which libtoolize-1.5 2> /dev/null | grep -v '^no'`" = x
; then
33 LIBTOOLIZE
=libtoolize-1.5
34 elif test \
! "x`which libtoolize 2> /dev/null | grep -v '^no'`" = x
; then
37 echo "libtoolize 1.5.x wasn't found, exiting"; exit 0
41 ## suse has aclocal and aclocal-1.9
42 if test x
$ACLOCAL = x
; then
43 if test \
! "x`which aclocal-1.10 2> /dev/null | grep -v '^no'`" = x
; then
45 elif test \
! "x`which aclocal-1.9 2> /dev/null | grep -v '^no'`" = x
; then
47 elif test \
! "x`which aclocal19 2> /dev/null | grep -v '^no'`" = x
; then
49 elif test \
! "x`which aclocal 2> /dev/null | grep -v '^no'`" = x
; then
52 echo "automake 1.9.x (aclocal) wasn't found, exiting"; exit 0
56 if test x
$AUTOMAKE = x
; then
57 if test \
! "x`which automake-1.10 2> /dev/null | grep -v '^no'`" = x
; then
58 AUTOMAKE
=automake-1.10
59 elif test \
! "x`which automake-1.9 2> /dev/null | grep -v '^no'`" = x
; then
61 elif test \
! "x`which automake19 2> /dev/null | grep -v '^no'`" = x
; then
63 elif test \
! "x`which automake 2> /dev/null | grep -v '^no'`" = x
; then
66 echo "automake 1.9.x wasn't found, exiting"; exit 0
71 ## macosx has autoconf-2.59 and autoconf-2.60
72 if test x
$AUTOCONF = x
; then
73 if test \
! "x`which autoconf-2.59 2> /dev/null | grep -v '^no'`" = x
; then
74 AUTOCONF
=autoconf-2.59
75 elif test \
! "x`which autoconf259 2> /dev/null | grep -v '^no'`" = x
; then
77 elif test \
! "x`which autoconf 2> /dev/null | grep -v '^no'`" = x
; then
80 echo "autoconf 2.59+ wasn't found, exiting"; exit 0
84 if test x
$AUTOHEADER = x
; then
85 if test \
! "x`which autoheader-2.59 2> /dev/null | grep -v '^no'`" = x
; then
86 AUTOHEADER
=autoheader-2.59
87 elif test \
! "x`which autoheader259 2> /dev/null | grep -v '^no'`" = x
; then
88 AUTOHEADER
=autoheader259
89 elif test \
! "x`which autoheader 2> /dev/null | grep -v '^no'`" = x
; then
92 echo "autoconf 2.59+ (autoheader) wasn't found, exiting"; exit 0
97 # --force means overwrite ltmain.sh script if it already exists
98 run
$LIBTOOLIZE $LIBTOOLIZE_FLAGS || die
"Can't execute libtoolize"
100 run
$ACLOCAL $ACLOCAL_FLAGS || die
"Can't execute aclocal"
101 run
$AUTOHEADER || die
"Can't execute autoheader"
103 # --add-missing instructs automake to install missing auxiliary files
104 # and --force to overwrite them if they already exist
105 run
$AUTOMAKE $AUTOMAKE_FLAGS || die
"Can't execute automake"
106 run
$AUTOCONF || die
"Can't execute autoconf"
108 echo -n "Automade with: "
109 $AUTOMAKE --version |
head -1
110 echo -n "Configured with: "
111 $AUTOCONF --version |
head -1