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'
22 # AM_VERSIONS='1.4 1.8 1.9'
23 # AC_VERSIONS='2.13 2.52 2.57 2.59'
26 # Use * here not to limit systems we do not have a case for.
27 # wrappers should pick these up without the need of our help.
28 #AM_VERSIONS='1.4 1.5 1.6 1.7 1.8 1.9 1.10'
29 #AC_VERSIONS='2.13 2.58 2.59 2.60'
34 if test -n "$AM_FORCE_VERSION"
36 AM_VERSIONS
="$AM_FORCE_VERSION"
40 if test -n "$AC_FORCE_VERSION"
42 AC_VERSIONS
="$AC_FORCE_VERSION"
50 needed_int
=`echo $VERNEEDED | $VERSIONMKINT`
53 i_int
=`echo $i | $VERSIONMKINT`
54 if test $i_int -ge $needed_int
56 echo $bin-$i $bin$i $bin-$i_int $bin$i_int
62 for c
in autoconf autoheader automake aclocal
64 uc
=`echo $c | tr a-z A-Z`
65 eval "val=`echo '$'$uc`"
68 echo "$uc=$val in environment, will not attempt to auto-detect"
74 VERNEEDED
=`fgrep AC_PREREQ configure.ac | $AC_VERSIONGREP`
75 VERSIONS
="$AC_VERSIONS"
79 VERNEEDED
=`fgrep AUTOMAKE_OPTIONS Makefile.am | $AM_VERSIONGREP`
80 VERSIONS
="$AM_VERSIONS"
84 printf "checking for $c ... "
85 for x
in `versioned_bins $c`; do
86 ($x --version < /dev
/null
> /dev
/null
2>&1) > /dev
/null
2>&1
94 eval "val=`echo '$'$uc`"
99 DIE
="$DIE $c=$VERNEEDED"
101 DIE
="$DIE $c($pkg)=$VERNEEDED"
106 if test -n "$LIBTOOLIZE"
108 echo "LIBTOOLIZE=$LIBTOOLIZE in environment," \
109 "will not attempt to auto-detect"
111 printf "checking for libtoolize ... "
112 for x
in libtoolize glibtoolize
114 ($x --version < /dev
/null
> /dev
/null
2>&1) > /dev
/null
2>&1
124 if test -z "$LIBTOOLIZE"
126 DIE
="$DIE libtoolize(libtool)"
131 echo "You must have the following installed to compile $package:"
135 echo $i |
sed -e 's/(/ (from /' -e 's/=\(.*\)/ (>= \1)/'
137 echo "Download the appropriate package(s) for your system,"
138 echo "or get the source from one of the GNU ftp sites"
139 echo "listed in http://www.gnu.org/order/ftp.html"
143 echo "Generating configuration files for $package, please wait...."
145 ACLOCAL_FLAGS
="$ACLOCAL_FLAGS"
147 # /usr/share/aclocal is most likely included by default, already...
149 /usr/local/share/aclocal
151 /usr/pkg/share/aclocal
153 /usr/gnu/share/aclocal
156 for i
in $ac_local_paths; do
157 if test -d "$i"; then
158 ACLOCAL_FLAGS
="$ACLOCAL_FLAGS -I $i"
159 # we probably only want one of these...
164 echo " $ACLOCAL $ACLOCAL_FLAGS"
165 $ACLOCAL $ACLOCAL_FLAGS
170 echo " $LIBTOOLIZE --automake"
171 $LIBTOOLIZE --automake
173 echo " $AUTOMAKE --add-missing $AUTOMAKE_FLAGS"
174 $AUTOMAKE --add-missing $AUTOMAKE_FLAGS
180 if test x
$NOCONFIGURE = x
; then
181 "$srcdir"/configure
"$@" && echo