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]//"
17 AM_VERSIONS
='1.4 1.5 1.9'
18 AC_VERSIONS
='2.53 2.59'
26 # AM_VERSIONS='1.4 1.8 1.9'
27 # AC_VERSIONS='2.13 2.52 2.57 2.59'
30 # Use * here not to limit systems we do not have a case for.
31 # wrappers should pick these up without the need of our help.
32 #AM_VERSIONS='1.4 1.5 1.6 1.7 1.8 1.9 1.10'
33 #AC_VERSIONS='2.13 2.58 2.59 2.60'
38 if test -n "$AM_FORCE_VERSION"
40 AM_VERSIONS
="$AM_FORCE_VERSION"
44 if test -n "$AC_FORCE_VERSION"
46 AC_VERSIONS
="$AC_FORCE_VERSION"
54 needed_int
=`echo $VERNEEDED | $VERSIONMKINT`
57 i_int
=`echo $i | $VERSIONMKINT`
58 if test $i_int -ge $needed_int
60 echo $bin-$i $bin$i $bin-$i_int $bin$i_int
66 for c
in autoconf autoheader automake aclocal
68 uc
=`echo $c | tr a-z A-Z`
69 eval "val=`echo '$'$uc`"
72 echo "$uc=$val in environment, will not attempt to auto-detect"
78 VERNEEDED
=`fgrep AC_PREREQ configure.ac | $AC_VERSIONGREP`
79 VERSIONS
="$AC_VERSIONS"
83 VERNEEDED
=`fgrep AUTOMAKE_OPTIONS Makefile.am | $AM_VERSIONGREP`
84 VERSIONS
="$AM_VERSIONS"
88 printf "checking for $c ... "
89 for x
in `versioned_bins $c`; do
90 ($x --version < /dev
/null
> /dev
/null
2>&1) > /dev
/null
2>&1
98 eval "val=`echo '$'$uc`"
103 DIE
="$DIE $c=$VERNEEDED"
105 DIE
="$DIE $c($pkg)=$VERNEEDED"
110 if test -n "$LIBTOOLIZE"
112 echo "LIBTOOLIZE=$LIBTOOLIZE in environment," \
113 "will not attempt to auto-detect"
115 printf "checking for libtoolize ... "
116 for x
in libtoolize glibtoolize
118 ($x --version < /dev
/null
> /dev
/null
2>&1) > /dev
/null
2>&1
128 if test -z "$LIBTOOLIZE"
130 DIE
="$DIE libtoolize(libtool)"
135 echo "You must have the following installed to compile $package:"
139 echo $i |
sed -e 's/(/ (from /' -e 's/=\(.*\)/ (>= \1)/'
141 echo "Download the appropriate package(s) for your system,"
142 echo "or get the source from one of the GNU ftp sites"
143 echo "listed in http://www.gnu.org/order/ftp.html"
147 echo "Generating configuration files for $package, please wait...."
149 ACLOCAL_FLAGS
="$ACLOCAL_FLAGS"
151 # /usr/share/aclocal is most likely included by default, already...
153 /usr/local/share/aclocal
155 /usr/pkg/share/aclocal
157 /usr/gnu/share/aclocal
160 for i
in $ac_local_paths; do
161 if test -d "$i"; then
162 ACLOCAL_FLAGS
="$ACLOCAL_FLAGS -I $i"
163 # we probably only want one of these...
168 echo " $ACLOCAL $ACLOCAL_FLAGS"
169 $ACLOCAL $ACLOCAL_FLAGS
174 echo " $LIBTOOLIZE --automake"
175 $LIBTOOLIZE --automake
177 echo " $AUTOMAKE --add-missing $AUTOMAKE_FLAGS"
178 $AUTOMAKE --add-missing $AUTOMAKE_FLAGS
184 if test x
$NOCONFIGURE = x
; then
185 "$srcdir"/configure
"$@" && echo