2 # Run this to set up the build system: configure, makefiles, etc.
3 # (at one point this was based on the version in enlightenment's cvs)
9 test -z "$srcdir" && srcdir
=.
12 AM_VERSIONGREP
="sed -e s/.*[^0-9\.]\([0-9]\.[0-9]\+\).*/\1/"
13 AC_VERSIONGREP
="sed -e s/.*[^0-9\.]\([0-9]\.[0-9][0-9]\).*/\1/"
14 VERSIONMKINT
="sed -e s/[^0-9]//"
15 if test -n "$AM_FORCE_VERSION"
17 AM_VERSIONS
="$AM_FORCE_VERSION"
21 if test -n "$AC_FORCE_VERSION"
23 AC_VERSIONS
="$AC_FORCE_VERSION"
25 AC_VERSIONS
='2.60 2.61'
31 needed_int
=`echo $VERNEEDED | $VERSIONMKINT`
34 i_int
=`echo $i | $VERSIONMKINT`
35 if test $i_int -ge $needed_int
37 echo $bin-$i $bin$i $bin-$i_int $bin$i_int
43 for c
in autoconf autoheader automake aclocal
45 uc
=`echo $c | tr '[:lower:]' '[:upper:]'`
46 eval "val=`echo '$'$uc`"
49 echo "$uc=$val in environment, will not attempt to auto-detect"
55 VERNEEDED
=`fgrep AC_PREREQ configure.ac | $AC_VERSIONGREP`
56 VERSIONS
="$AC_VERSIONS"
60 VERNEEDED
=`fgrep AUTOMAKE_OPTIONS Makefile.am | $AM_VERSIONGREP`
61 VERSIONS
="$AM_VERSIONS"
65 printf "checking for $c ... "
66 for x
in `versioned_bins $c`; do
67 ($x --version < /dev
/null
> /dev
/null
2>&1) > /dev
/null
2>&1
75 eval "val=`echo '$'$uc`"
80 DIE
="$DIE $c=$VERNEEDED"
82 DIE
="$DIE $c($pkg)=$VERNEEDED"
89 echo "You must have the following installed to compile $package:"
93 echo $i |
sed -e 's/(/ (from /' -e 's/=\(.*\)/ (>= \1)/'
95 echo "Download the appropriate package(s) for your system,"
96 echo "or get the source from one of the GNU ftp sites"
97 echo "listed in http://www.gnu.org/order/ftp.html"
101 echo "Generating configuration files for $package, please wait...."
103 ACLOCAL_FLAGS
="$ACLOCAL_FLAGS -I m4"
105 # /usr/share/aclocal is most likely included by default, already...
107 /usr/local/share/aclocal
109 /usr/pkg/share/aclocal
111 /usr/gnu/share/aclocal
114 for i
in $ac_local_paths; do
115 if test -d "$i"; then
116 ACLOCAL_FLAGS
="$ACLOCAL_FLAGS -I $i"
117 # we probably only want one of these...
122 echo " $ACLOCAL $ACLOCAL_FLAGS"
123 $ACLOCAL $ACLOCAL_FLAGS ||
exit 1
126 $AUTOHEADER ||
exit 1
128 echo " $AUTOMAKE --add-missing $AUTOMAKE_FLAGS"
129 $AUTOMAKE --add-missing $AUTOMAKE_FLAGS ||
exit 1
135 if test x
$NOCONFIGURE = x
; then
136 "$srcdir"/configure
"$@" ||
exit 1