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 echo "checking for autoconf... "
15 (autoconf
--version) < /dev
/null
> /dev
/null
2>&1 ||
{
17 echo "You must have autoconf installed to compile $package."
18 echo "Download the appropriate package for your distribution,"
19 echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
23 VERSIONGREP
="sed -e s/.*[^0-9\.]\([0-9]\.[0-9]\).*/\1/"
24 VERSIONMKINT
="sed -e s/[^0-9]//"
28 # do we need automake?
29 if test -r Makefile.am
; then
30 AM_OPTIONS
=`fgrep AUTOMAKE_OPTIONS Makefile.am`
31 AM_NEEDED
=`echo $AM_OPTIONS | $VERSIONGREP`
32 if test x
"$AM_NEEDED" = "x$AM_OPTIONS"; then
35 if test -z $AM_NEEDED; then
36 echo -n "checking for automake... "
39 if ($AUTOMAKE --version < /dev
/null
> /dev
/null
2>&1); then
46 echo -n "checking for automake $AM_NEEDED or later... "
47 for am
in automake-
$AM_NEEDED automake
$AM_NEEDED automake
; do
48 ($am --version < /dev
/null
> /dev
/null
2>&1) ||
continue
49 ver
=`$am --version < /dev/null | head -n 1 | $VERSIONGREP | $VERSIONMKINT`
50 verneeded
=`echo $AM_NEEDED | $VERSIONMKINT`
51 if test $ver -ge $verneeded; then
57 test -z $AUTOMAKE && echo "no"
58 echo -n "checking for aclocal $AM_NEEDED or later... "
59 for ac
in aclocal-
$AM_NEEDED aclocal
$AM_NEEDED aclocal
; do
60 ($ac --version < /dev
/null
> /dev
/null
2>&1) ||
continue
61 ver
=`$ac --version < /dev/null | head -n 1 | $VERSIONGREP | $VERSIONMKINT`
62 verneeded
=`echo $AM_NEEDED | $VERSIONMKINT`
63 if test $ver -ge $verneeded; then
69 test -z $ACLOCAL && echo "no"
71 test -z $AUTOMAKE ||
test -z $ACLOCAL && {
73 echo "You must have automake installed to compile $package."
74 echo "Download the appropriate package for your distribution,"
75 echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
80 echo -n "checking for libtool... "
81 for LIBTOOLIZE
in libtoolize glibtoolize nope
; do
82 ($LIBTOOLIZE --version) < /dev
/null
> /dev
/null
2>&1 && break
84 if test x
$LIBTOOLIZE = xnope
; then
90 ($LIBTOOLIZE --version) < /dev
/null
> /dev
/null
2>&1 ||
{
92 echo "You must have libtool installed to compile $package."
93 echo "Download the appropriate package for your system,"
94 echo "or get the source from one of the GNU ftp sites"
95 echo "listed in http://www.gnu.org/order/ftp.html"
99 if test "$DIE" -eq 1; then
103 if test -z "$*"; then
104 echo "I am going to run ./configure with no arguments - if you wish "
105 echo "to pass any to it, please specify them on the $0 command line."
108 echo "Generating configuration files for $package, please wait...."
110 echo " $ACLOCAL $ACLOCAL_FLAGS"
111 $ACLOCAL $ACLOCAL_FLAGS ||
exit 1
112 echo " $LIBTOOLIZE --automake"
113 $LIBTOOLIZE --automake ||
exit 1
116 echo " $AUTOMAKE --add-missing $AUTOMAKE_FLAGS"
117 $AUTOMAKE --add-missing $AUTOMAKE_FLAGS ||
exit 1
122 $srcdir/configure
--enable-maintainer-mode "$@" && echo