2 # Run this to set up the build system: configure, makefiles, etc.
3 # (based on the version in enlightenment's cvs)
9 test -z "$srcdir" && srcdir
=.
14 (autoconf
--version) < /dev
/null
> /dev
/null
2>&1 ||
{
16 echo "You must have autoconf installed to compile $package."
17 echo "Download the appropriate package for your distribution,"
18 echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
21 VERSIONGREP
="sed -e s/.*[^0-9\.]\([0-9]\.[0-9]\).*/\1/"
23 # do we need automake?
24 if test -r Makefile.am
; then
25 echo Checking
for automake version
26 options
=`fgrep AUTOMAKE_OPTIONS Makefile.am`
27 AM_NEEDED
=`echo "$options" | $VERSIONGREP`
30 if test -n "$AM_NEEDED" && test "x$AM_NEEDED" != "x$options"
32 AM_PROGS
="automake-$AM_NEEDED automake$AM_NEEDED $AM_PROGS"
33 AC_PROGS
="aclocal-$AM_NEEDED aclocal$AM_NEEDED $AC_PROGS"
37 AM_PROGS
="$AUTOMAKE $AM_PROGS"
38 AC_PROGS
="$ACLOCAL $AC_PROGS"
39 for am
in $AM_PROGS; do
40 ($am --version > /dev
/null
2>&1) 2>/dev
/null ||
continue
41 ver
=`$am --version | head -1 | $VERSIONGREP`
42 AWK_RES
=`echo $ver $AM_NEEDED | awk '{ if ( $1 >= $2 ) print "yes"; else print "no" }'`
43 if test "$AWK_RES" = "yes"; then
45 echo " found $AUTOMAKE"
49 for ac
in $AC_PROGS; do
50 ($ac --version > /dev
/null
2>&1) 2>/dev
/null ||
continue
51 ver
=`$ac --version < /dev/null | head -1 | $VERSIONGREP`
52 AWK_RES
=`echo $ver $AM_NEEDED | awk '{ if ( $1 >= $2 ) print "yes"; else print "no" }'`
53 if test "$AWK_RES" = "yes"; then
55 echo " found $ACLOCAL"
59 test -z $AUTOMAKE ||
test -z $ACLOCAL && {
61 if test -n "$AM_NEEDED"; then
62 echo "You must have automake version $AM_NEEDED installed"
63 echo "to compile $package."
65 echo "You must have automake installed to compile $package."
67 echo "Download the appropriate package for your distribution,"
68 echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
73 (libtoolize
--version) > /dev
/null
2>&1 ||
{
75 echo "You must have libtool installed to compile $package."
76 echo "Download the appropriate package for your system,"
77 echo "or get the source from one of the GNU ftp sites"
78 echo "listed in http://www.gnu.org/order/ftp.html"
82 if test "$DIE" -eq 1; then
86 echo "Generating configuration files for $package, please wait...."
88 ACLOCAL_FLAGS
="$ACLOCAL_FLAGS -I m4"
89 if test -n "$ACLOCAL"; then
90 echo " $ACLOCAL $ACLOCAL_FLAGS"
91 $ACLOCAL $ACLOCAL_FLAGS
97 echo " libtoolize --automake"
100 if test -n "$AUTOMAKE"; then
101 echo " $AUTOMAKE --add-missing"
102 $AUTOMAKE --add-missing
108 if test -z "$*"; then
109 echo "I am going to run ./configure with no arguments - if you wish "
110 echo "to pass any to it, please specify them on the $0 command line."
113 $srcdir/configure
"$@" && echo