OSDN Git Service

* fr.po: Update.
[pf3gnuchains/gcc-fork.git] / zlib / configure.in
index 2edccc3..a0bb1e6 100644 (file)
@@ -1,12 +1,44 @@
 dnl Process this with autoconf to create configure
 
+AC_PREREQ(2.13)
 AC_INIT(zlib.h)
+
+# This works around the fact that libtool configuration may change LD
+# for this particular configuration, but some shells, instead of
+# keeping the changes in LD private, export them just because LD is
+# exported.
+ORIGINAL_LD_FOR_MULTILIBS=$LD
+
+dnl We may get other options which we dont document:
+dnl --with-target-subdir, --with-multisrctop, --with-multisubdir
+
+if test "x[$]{with_target_subdir}" != x && \
+   test "[$]{srcdir}" = "."; then
+  if test "[$]{with_target_subdir}" != "."; then
+    zlib_basedir="[$]{srcdir}/[$]{with_multisrctop}../"
+  else
+    zlib_basedir="[$]{srcdir}/[$]{with_multisrctop}"
+  fi
+else
+  zlib_basedir="[$]{srcdir}/"
+fi
+AC_SUBST(zlib_basedir)
+AC_CONFIG_AUX_DIR($zlib_basedir..)
+if :; then :; else
+  # This overrides the previous occurrence for automake, but not for
+  # autoconf, which is exactly what we want.
+  AC_CONFIG_AUX_DIR(..)
+fi
+
 AC_CANONICAL_SYSTEM
-AM_INIT_AUTOMAKE(zlib, 1.1.3)
 
-AM_MAINTAINER_MODE
+# This works around an automake problem.
+mkinstalldirs="`cd $ac_aux_dir && ${PWDCMD-pwd}`/mkinstalldirs"
+AC_SUBST(mkinstalldirs)
 
-AC_CONFIG_AUX_DIR(..)
+AM_INIT_AUTOMAKE(zlib, 1.1.4)
+
+AM_MAINTAINER_MODE
 
 dnl We use these options to decide which functions to include.
 AC_ARG_WITH(target-subdir,
@@ -24,21 +56,6 @@ AC_ARG_ENABLE(multilib,
   *)   AC_MSG_ERROR(bad value ${enableval} for multilib option) ;;
  esac], [test -z "$with_target_subdir" && multilib=no || multilib=yes])dnl
 
-dnl We may get other options which we dont document:
-dnl --with-target-subdir, --with-multisrctop, --with-multisubdir
-
-if test "x[$]{with_target_subdir}" != x && \
-   test "[$]{srcdir}" = "."; then
-  if test "[$]{with_target_subdir}" != "."; then
-    zlib_basedir="[$]{srcdir}/[$]{with_multisrctop}../"
-  else
-    zlib_basedir="[$]{srcdir}/[$]{with_multisrctop}"
-  fi
-else
-  zlib_basedir="[$]{srcdir}/"
-fi
-AC_SUBST(zlib_basedir)
-
 AC_ARG_WITH(system-zlib,
 [  --with-system-zlib      use installed libz])
 
@@ -51,6 +68,10 @@ LIB_AC_PROG_CC
 # 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
@@ -93,7 +114,26 @@ AC_SUBST(target_all)
 
 AC_CHECK_HEADERS(unistd.h)
 
-AM_CONDITIONAL(USE_LIBDIR, test -z "$with_cross_host")
+if test -n "$with_cross_host" &&
+   test x"$with_cross_host" != x"no"; then
+  toolexecdir='$(exec_prefix)/$(target_alias)'
+  toolexeclibdir='$(toolexecdir)/lib'
+else
+  toolexecdir='$(libdir)/gcc-lib/$(target_alias)'
+  toolexeclibdir='$(libdir)'
+fi
+if test "$GCC" = yes && $CC -print-multi-os-directory > /dev/null 2>&1; then
+  multiosdir=/`$CC -print-multi-os-directory`
+  case $multiosdir in
+    /.) multiosdir= ;; # Avoid trailing /.
+  esac
+else
+  multiosdir=
+fi
+toolexeclibdir=${toolexeclibdir}${multiosdir}
+AC_SUBST(toolexecdir)
+AC_SUBST(toolexeclibdir)
+
 AM_CONDITIONAL(TARGET_LIBRARY, test -n "$with_target_subdir")
 
 if test "${multilib}" = "yes"; then
@@ -104,6 +144,7 @@ fi
 
 AC_OUTPUT(Makefile,
 [if test -n "$CONFIG_FILES"; then
+  LD="${ORIGINAL_LD_FOR_MULTILIBS}"
   ac_file=Makefile . ${zlib_basedir}/../config-ml.in
 fi],
 srcdir=${srcdir}
@@ -115,4 +156,5 @@ CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
 zlib_basedir=${zlib_basedir}
 CC="${CC}"
 CXX="${CXX}"
+ORIGINAL_LD_FOR_MULTILIBS="${ORIGINAL_LD_FOR_MULTILIBS}"
 )