dnl Process this with autoconf to create configure
-AC_PREREQ(2.13)
-AC_INIT(zlib.h)
+AC_PREREQ(2.59)
+AC_INIT
+AC_CONFIG_SRCDIR([zlib.h])
# This works around the fact that libtool configuration may change LD
# for this particular configuration, but some shells, instead of
AC_ARG_WITH(target-subdir,
[ --with-target-subdir=SUBDIR
configuring in a subdirectory])
+
+if test -z "$with_target_subdir" || test "$with_target_subdir" = "."; then
+ COMPPATH=.
+else
+ COMPPATH=..
+fi
+AC_SUBST(COMPPATH)
+
AC_ARG_WITH(cross-host,
[ --with-cross-host=HOST configuring with a cross compiler])
AC_ARG_WITH(system-zlib,
[ --with-system-zlib use installed libz])
-LIB_AC_PROG_CC
-# We need AC_EXEEXT to keep automake happy in cygnus mode. However,
-# at least currently, we never actually build a program, so we never
-# need to use $(EXEEXT). Moreover, the test for EXEEXT normally
-# fails, because we are probably configuring with a cross compiler
-# which cant create executables. So we include AC_EXEEXT to keep
-# automake happy, but we dont execute it, since we dont care about
-# the result.
-if false; then
- # autoconf 2.50 runs AC_EXEEXT by default, and the macro expands
- # to nothing, so nothing would remain between `then' and `fi' if it
- # were not for the `:' below.
- :
- AC_EXEEXT
-fi
-AM_PROG_LIBTOOL
+# Make sure we don't test executables when making cross-tools.
+GCC_NO_EXECUTABLES
-if test -z "$with_target_subdir" || test "$with_target_subdir" = "."; then
- COMPPATH=.
-else
- COMPPATH=..
-fi
-AC_SUBST(COMPPATH)
+AC_PROG_CC
+
+AM_PROG_LIBTOOL
# Find CPP now so that any conditional tests below won't do it and
# thereby make the resulting definitions conditional.
multilib_arg=
fi
-AC_OUTPUT(Makefile,
-[if test -n "$CONFIG_FILES"; then
+AC_CONFIG_FILES([Makefile])
+
+AC_CONFIG_COMMANDS([default],
+[[if test -n "$CONFIG_FILES"; then
LD="${ORIGINAL_LD_FOR_MULTILIBS}"
ac_file=Makefile . ${zlib_basedir}/../config-ml.in
-fi],
-srcdir=${srcdir}
+fi]],
+[[srcdir=${srcdir}
host=${host}
target=${target}
with_multisubdir=${with_multisubdir}
CC="${CC}"
CXX="${CXX}"
ORIGINAL_LD_FOR_MULTILIBS="${ORIGINAL_LD_FOR_MULTILIBS}"
-)
+]])
+
+AC_OUTPUT