OSDN Git Service

2004-04-09 Nathanael Nerode <neroden@gcc.gnu.org>
[pf3gnuchains/gcc-fork.git] / zlib / configure.in
index a0bb1e6..e716daf 100644 (file)
@@ -1,7 +1,8 @@
 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
@@ -44,6 +45,14 @@ dnl We use these options to decide which functions to include.
 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])
 
@@ -59,29 +68,12 @@ AC_ARG_ENABLE(multilib,
 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.
@@ -142,12 +134,14 @@ else
   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}
@@ -157,4 +151,6 @@ zlib_basedir=${zlib_basedir}
 CC="${CC}"
 CXX="${CXX}"
 ORIGINAL_LD_FOR_MULTILIBS="${ORIGINAL_LD_FOR_MULTILIBS}"
-)
+]])
+
+AC_OUTPUT