It works on most systems but seems to break the build bot.
Needs more investigation.
svn path=/trunk/mono/; revision=106707
cat <<'__DOLTLIBTOOL__EOF__' >>doltlibtool
top_builddir_slash="${0%%doltlibtool}"
: ${top_builddir_slash:=./}
-args=
+args=()
modeok=false
tagok=false
for arg in "$[]@"; do
case "$arg" in
--mode=compile) modeok=true ;;
--tag=CC|--tag=CXX) tagok=true ;;
- *) args="$args $arg" ;;
+ *) args+=("$arg")
esac
done
if $modeok && $tagok ; then
AM_PROG_LIBTOOL
# Use dolt (http://dolt.freedesktop.org/) instead of libtool for building.
-DOLT
+AC_ARG_ENABLE(dolt, [ --enable-dolt Use dolt (http://dolt.freedesktop.org/) instead of libtool for building.])
+
+if test "x$enable_dolt" = "xyes"; then
+ DOLT
+ else
++ # The DOLT macro contains AC_SUBST's for these so we must define them because of
+ # autoconf brokeness
+ LTCOMPILE='$(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(COMPILE)'
+ LTCXXCOMPILE='$(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXXCOMPILE)'
+fi
# Test whenever ld supports -version-script
AC_PROG_LD