OSDN Git Service

* machmode.h (to_machine_mode): New.
[pf3gnuchains/gcc-fork.git] / gcc / aclocal.m4
index 25a8f96..9e7da1f 100644 (file)
@@ -1,52 +1,11 @@
-sinclude(../config/acx.m4)
-sinclude(../config/accross.m4)
-sinclude(../config/gettext.m4)
-sinclude(../config/progtest.m4)
-
-dnl See if stdbool.h properly defines bool and true/false.
-AC_DEFUN(gcc_AC_HEADER_STDBOOL,
-[AC_CACHE_CHECK([for working stdbool.h],
-  ac_cv_header_stdbool_h,
-[AC_TRY_COMPILE([#include <stdbool.h>],
-[bool foo = false;],
-ac_cv_header_stdbool_h=yes, ac_cv_header_stdbool_h=no)])
-if test $ac_cv_header_stdbool_h = yes; then
-  AC_DEFINE(HAVE_STDBOOL_H, 1,
-  [Define if you have a working <stdbool.h> header file.])
-fi
-])
-
-dnl Fixed AC_CHECK_TYPE that doesn't need anything in acconfig.h.
-dnl Remove after migrating to 2.5x.
-AC_DEFUN(gcc_AC_CHECK_TYPE,
-[AC_REQUIRE([AC_HEADER_STDC])dnl
-AC_MSG_CHECKING(for $1)
-AC_CACHE_VAL(ac_cv_type_$1,
-[AC_EGREP_CPP(dnl
-changequote(<<,>>)dnl
-<<(^|[^a-zA-Z_0-9])$1[^a-zA-Z_0-9]>>dnl
-changequote([,]), [#include <sys/types.h>
-#if STDC_HEADERS
-#include <stdlib.h>
-#include <stddef.h>
-#endif], ac_cv_type_$1=yes, ac_cv_type_$1=no)])dnl
-AC_MSG_RESULT($ac_cv_type_$1)
-if test $ac_cv_type_$1 = no; then
-  AC_DEFINE($1, $2, [Define as \`$2' if <sys/types.h> doesn't define.])
-fi
-])
-
-
-dnl See whether we can include both string.h and strings.h.
-AC_DEFUN(gcc_AC_HEADER_STRING,
-[AC_CACHE_CHECK([whether string.h and strings.h may both be included],
-  gcc_cv_header_string,
-[AC_TRY_COMPILE([#include <string.h>
-#include <strings.h>], , gcc_cv_header_string=yes, gcc_cv_header_string=no)])
-if test $gcc_cv_header_string = yes; then
-  AC_DEFINE(STRING_WITH_STRINGS, 1, [Define if you can safely include both <string.h> and <strings.h>.])
-fi
-])
+m4_include([../config/acx.m4])
+m4_include([../config/gettext-sister.m4])
+m4_include([../config/iconv.m4])
+m4_include([../config/lcmessage.m4])
+m4_include([../config/lib-ld.m4])
+m4_include([../config/lib-link.m4])
+m4_include([../config/lib-prefix.m4])
+m4_include([../config/progtest.m4])
 
 dnl See whether we need a declaration for a function.
 dnl The result is highly dependent on the INCLUDES passed in, so make sure
@@ -54,7 +13,7 @@ dnl to use a different cache variable name in this macro if it is invoked
 dnl in a different context somewhere else.
 dnl gcc_AC_CHECK_DECL(SYMBOL,
 dnl    [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, INCLUDES]]])
-AC_DEFUN(gcc_AC_CHECK_DECL,
+AC_DEFUN([gcc_AC_CHECK_DECL],
 [AC_MSG_CHECKING([whether $1 is declared])
 AC_CACHE_VAL(gcc_cv_have_decl_$1,
 [AC_TRY_COMPILE([$4],
@@ -72,12 +31,14 @@ dnl Check multiple functions to see whether each needs a declaration.
 dnl Arrange to define HAVE_DECL_<FUNCTION> to 0 or 1 as appropriate.
 dnl gcc_AC_CHECK_DECLS(SYMBOLS,
 dnl    [ACTION-IF-NEEDED [, ACTION-IF-NOT-NEEDED [, INCLUDES]]])
-AC_DEFUN(gcc_AC_CHECK_DECLS,
-[for ac_func in $1
+AC_DEFUN([gcc_AC_CHECK_DECLS],
+[AC_FOREACH([gcc_AC_Func], [$1],
+  [AH_TEMPLATE(AS_TR_CPP(HAVE_DECL_[]gcc_AC_Func),
+  [Define to 1 if we found a declaration for ']gcc_AC_Func[', otherwise
+   define to 0.])])dnl
+for ac_func in $1
 do
-changequote(, )dnl
-  ac_tr_decl=HAVE_DECL_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
-changequote([, ])dnl
+  ac_tr_decl=AS_TR_CPP([HAVE_DECL_$ac_func])
 gcc_AC_CHECK_DECL($ac_func,
   [AC_DEFINE_UNQUOTED($ac_tr_decl, 1) $2],
   [AC_DEFINE_UNQUOTED($ac_tr_decl, 0) $3],
@@ -93,12 +54,6 @@ dnl during this test.
   $4
 )
 done
-dnl Automatically generate config.h entries via autoheader.
-if test x = y ; then
-  patsubst(translit([$1], [a-z], [A-Z]), [\w+],
-    [AC_DEFINE([HAVE_DECL_\&], 1,
-      [Define to 1 if we found this declaration otherwise define to 0.])])dnl
-fi
 ])
 
 dnl 'make compare' can be significantly faster, if cmp itself can
@@ -107,7 +62,7 @@ dnl "if cmp --ignore-initial=2 t1 t2 && ! cmp --ignore-initial=1 t1 t2"
 dnl but we need to sink errors and handle broken shells.  We also test
 dnl for the parameter format "cmp file1 file2 skip1 skip2" which is
 dnl accepted by cmp on some systems.
-AC_DEFUN(gcc_AC_PROG_CMP_IGNORE_INITIAL,
+AC_DEFUN([gcc_AC_PROG_CMP_IGNORE_INITIAL],
 [AC_CACHE_CHECK([for cmp's capabilities], gcc_cv_prog_cmp_skip,
 [ echo abfoo >t1
   echo cdfoo >t2
@@ -135,7 +90,7 @@ AC_SUBST(make_compare_target)
 ])
 
 dnl See if the printf functions in libc support %p in format strings.
-AC_DEFUN(gcc_AC_FUNC_PRINTF_PTR,
+AC_DEFUN([gcc_AC_FUNC_PRINTF_PTR],
 [AC_CACHE_CHECK(whether the printf functions support %p,
   gcc_cv_func_printf_ptr,
 [AC_TRY_RUN([#include <stdio.h>
@@ -156,7 +111,7 @@ fi
 ])
 
 dnl See if symbolic links work and if not, try to substitute either hard links or simple copy.
-AC_DEFUN(gcc_AC_PROG_LN_S,
+AC_DEFUN([gcc_AC_PROG_LN_S],
 [AC_MSG_CHECKING(whether ln -s works)
 AC_CACHE_VAL(gcc_cv_prog_LN_S,
 [rm -f conftestdata_t
@@ -169,7 +124,12 @@ else
   then
     gcc_cv_prog_LN_S=ln
   else
-    gcc_cv_prog_LN_S=cp
+    if cp -p conftestdata_f conftestdata_t 2>/dev/null
+    then
+      gcc_cv_prog_LN_S="cp -p"
+    else
+      gcc_cv_prog_LN_S=cp
+    fi
   fi
 fi
 rm -f conftestdata_f conftestdata_t
@@ -181,59 +141,15 @@ else
   if test "$gcc_cv_prog_LN_S" = "ln"; then
     AC_MSG_RESULT([no, using ln])
   else
-    AC_MSG_RESULT([no, and neither does ln, so using cp])
+    AC_MSG_RESULT([no, and neither does ln, so using $gcc_cv_prog_LN_S])
   fi
 fi
 AC_SUBST(LN_S)dnl
 ])
 
-dnl See if hard links work and if not, try to substitute either symbolic links or simple copy.
-AC_DEFUN(gcc_AC_PROG_LN,
-[AC_MSG_CHECKING(whether ln works)
-AC_CACHE_VAL(gcc_cv_prog_LN,
-[rm -f conftestdata_t
-echo >conftestdata_f
-if ln conftestdata_f conftestdata_t 2>/dev/null
-then
-  gcc_cv_prog_LN="ln"
-else
-  if ln -s conftestdata_f conftestdata_t 2>/dev/null
-  then
-    gcc_cv_prog_LN="ln -s"
-  else
-    gcc_cv_prog_LN=cp
-  fi
-fi
-rm -f conftestdata_f conftestdata_t
-])dnl
-LN="$gcc_cv_prog_LN"
-if test "$gcc_cv_prog_LN" = "ln"; then
-  AC_MSG_RESULT(yes)
-else
-  if test "$gcc_cv_prog_LN" = "ln -s"; then
-    AC_MSG_RESULT([no, using ln -s])
-  else
-    AC_MSG_RESULT([no, and neither does ln -s, so using cp])
-  fi
-fi
-AC_SUBST(LN)dnl
-])
-
-dnl Check whether _Bool is built-in.
-AC_DEFUN(gcc_AC_C__BOOL,
-[AC_CACHE_CHECK(for built-in _Bool, gcc_cv_c__bool,
-[AC_TRY_COMPILE(,
-[_Bool foo;],
-gcc_cv_c__bool=yes, gcc_cv_c__bool=no)
-])
-if test $gcc_cv_c__bool = yes; then
-  AC_DEFINE(HAVE__BOOL, 1, [Define if the \`_Bool' type is built-in.])
-fi
-])
-
 dnl Define MKDIR_TAKES_ONE_ARG if mkdir accepts only one argument instead
 dnl of the usual 2.
-AC_DEFUN(gcc_AC_FUNC_MKDIR_TAKES_ONE_ARG,
+AC_DEFUN([gcc_AC_FUNC_MKDIR_TAKES_ONE_ARG],
 [AC_CACHE_CHECK([if mkdir takes one argument], gcc_cv_mkdir_takes_one_arg,
 [AC_TRY_COMPILE([
 #include <sys/types.h>
@@ -252,7 +168,7 @@ if test $gcc_cv_mkdir_takes_one_arg = yes ; then
 fi
 ])
 
-AC_DEFUN(gcc_AC_PROG_INSTALL,
+AC_DEFUN([gcc_AC_PROG_INSTALL],
 [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
 # Find a good install program.  We prefer a C program (faster),
 # so one script is as good as another.  But avoid the broken or
@@ -316,102 +232,15 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
 AC_SUBST(INSTALL_DATA)dnl
 ])
 
-dnl Test for GNAT.
-dnl We require the gnatbind program, and a compiler driver that
-dnl understands Ada.  The user may set the driver name explicitly
-dnl with ADAC; also, the user's CC setting is tried.  Failing that,
-dnl we try gcc and cc, then a sampling of names known to be used for
-dnl the Ada driver on various systems.
-dnl
-dnl Sets the shell variable have_gnat to yes or no as appropriate, and
-dnl substitutes GNATBIND and ADAC.
-AC_DEFUN([gcc_AC_PROG_GNAT],
-[AC_REQUIRE([AC_CHECK_TOOL_PREFIX])
-AC_CHECK_TOOL(GNATBIND, gnatbind, no)
-AC_CACHE_CHECK([for compiler driver that understands Ada],
-                gcc_cv_prog_adac,
-[cat >conftest.adb <<EOF
-procedure conftest is begin null; end conftest;
-EOF
-gcc_cv_prog_adac=no
-# Have to do ac_tool_prefix and user overrides by hand.
-for cand in ${ADAC+"$ADAC"} ${CC+"$CC"}        \
-           ${ac_tool_prefix}gcc        gcc             \
-           ${ac_tool_prefix}cc         cc              \
-           ${ac_tool_prefix}gnatgcc    gnatgcc         \
-           ${ac_tool_prefix}gnatcc     gnatcc          \
-           ${ac_tool_prefix}adagcc     adagcc          \
-           ${ac_tool_prefix}adacc      adacc           ; do
-  # There is a bug in all released versions of GCC which causes the
-  # driver to exit successfully when the appropriate language module
-  # has not been installed.  This is fixed in 2.95.4, 3.0.2, and 3.1.
-  # Therefore we must check for the error message as well as an
-  # unsuccessful exit.
-  errors=`($cand -c conftest.adb) 2>&1 || echo failure`
-  if test x"$errors" = x; then
-    gcc_cv_prog_adac=$cand
-    break
-  fi
-done
-rm -f conftest.*])
-ADAC=$gcc_cv_prog_adac
-AC_SUBST(ADAC)
-
-if test x$GNATBIND != xno && test x$ADAC != xno; then
-  have_gnat=yes
-else
-  have_gnat=no
-fi
-])
-
-dnl GCC_PATH_PROG(VARIABLE, PROG-TO-CHECK-FOR [, VALUE-IF-NOT-FOUND [, PATH]])
-dnl like AC_PATH_PROG but use other cache variables
-AC_DEFUN(GCC_PATH_PROG,
-[# Extract the first word of "$2", so it can be a program name with args.
-set dummy $2; ac_word=[$]2
-AC_MSG_CHECKING([for $ac_word])
-AC_CACHE_VAL(gcc_cv_path_$1,
-[case "[$]$1" in
-  /*)
-  gcc_cv_path_$1="[$]$1" # Let the user override the test with a path.
-  ;;
-  ?:/*)                         
-  gcc_cv_path_$1="[$]$1" # Let the user override the test with a dos path.
-  ;;
-  *)
-  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS=":"
-dnl $ac_dummy forces splitting on constant user-supplied paths.
-dnl POSIX.2 word splitting is done only on the output of word expansions,
-dnl not every word.  This closes a longstanding sh security hole.
-  ac_dummy="ifelse([$4], , $PATH, [$4])"
-  for ac_dir in $ac_dummy; do 
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      gcc_cv_path_$1="$ac_dir/$ac_word"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-dnl If no 3rd arg is given, leave the cache variable unset,
-dnl so GCC_PATH_PROGS will keep looking.
-ifelse([$3], , , [  test -z "[$]gcc_cv_path_$1" && gcc_cv_path_$1="$3"
-])dnl
-  ;;
-esac])dnl
-$1="$gcc_cv_path_$1"
-if test -n "[$]$1"; then
-  AC_MSG_RESULT([$]$1)
-else
-  AC_MSG_RESULT(no)
-fi
-AC_SUBST($1)dnl
-])
-
 # mmap(2) blacklisting.  Some platforms provide the mmap library routine
 # but don't support all of the features we need from it.
 AC_DEFUN([gcc_AC_FUNC_MMAP_BLACKLIST],
-[if test $ac_cv_header_sys_mman_h != yes \
- || test $ac_cv_func_mmap != yes; then
+[
+AC_CHECK_HEADER([sys/mman.h],
+               [gcc_header_sys_mman_h=yes], [gcc_header_sys_mman_h=no])
+AC_CHECK_FUNC([mmap], [gcc_func_mmap=yes], [gcc_func_mmap=no])
+if test "$gcc_header_sys_mman_h" != yes \
+ || test "$gcc_func_mmap" != yes; then
    gcc_cv_func_mmap_file=no
    gcc_cv_func_mmap_dev_zero=no
    gcc_cv_func_mmap_anon=no
@@ -424,7 +253,7 @@ else
    # read() to the same fd.  The only system known to have a problem here
    # is VMS, where text files have record structure.
    case "$host_os" in
-     vms*) 
+     vms* | ultrix*
         gcc_cv_func_mmap_file=no ;;
      *)
         gcc_cv_func_mmap_file=yes;;
@@ -442,7 +271,7 @@ else
    # Systems known to be in this category are Windows (all variants),
    # VMS, and Darwin.
    case "$host_os" in
-     vms* | cygwin* | pe | mingw* | darwin* | ultrix*)
+     vms* | cygwin* | pe | mingw* | darwin* | ultrix* | hpux10* | hpux11.00)
         gcc_cv_func_mmap_dev_zero=no ;;
      *)
         gcc_cv_func_mmap_dev_zero=yes;;
@@ -499,7 +328,7 @@ fi
 dnl Locate a program and check that its version is acceptable.
 dnl AC_PROG_CHECK_VER(var, name, version-switch,
 dnl                  version-extract-regexp, version-glob)
-AC_DEFUN(gcc_AC_CHECK_PROG_VER,
+AC_DEFUN([gcc_AC_CHECK_PROG_VER],
 [AC_CHECK_PROG([$1], [$2], [$2])
 if test -n "[$]$1"; then
   # Found it, now check the version.
@@ -526,7 +355,7 @@ fi
 dnl Determine if enumerated bitfields are unsigned.   ISO C says they can 
 dnl be either signed or unsigned.
 dnl
-AC_DEFUN(gcc_AC_C_ENUM_BF_UNSIGNED,
+AC_DEFUN([gcc_AC_C_ENUM_BF_UNSIGNED],
 [AC_CACHE_CHECK(for unsigned enumerated bitfields, gcc_cv_enum_bf_unsigned,
 [AC_TRY_RUN(#include <stdlib.h>
 enum t { BLAH = 128 } ;
@@ -546,7 +375,7 @@ fi])
 dnl Probe number of bits in a byte.
 dnl Note C89 requires CHAR_BIT >= 8.
 dnl
-AC_DEFUN(gcc_AC_C_CHAR_BIT,
+AC_DEFUN([gcc_AC_C_CHAR_BIT],
 [AC_CACHE_CHECK(for CHAR_BIT, gcc_cv_decl_char_bit,
 [AC_EGREP_CPP(found,
 [#ifdef HAVE_LIMITS_H
@@ -579,101 +408,23 @@ else
 fi
 fi])
 
-dnl Checking for long long.
-dnl By Caolan McNamara <caolan@skynet.ie>
-dnl Added check for __int64, Zack Weinberg <zackw@stanford.edu>
-dnl
-AC_DEFUN([gcc_AC_C_LONG_LONG],
-[AC_CACHE_CHECK(for long long int, ac_cv_c_long_long,
-  [AC_TRY_COMPILE(,[long long int i;],
-         ac_cv_c_long_long=yes,
-         ac_cv_c_long_long=no)])
-  if test $ac_cv_c_long_long = yes; then
-    AC_DEFINE(HAVE_LONG_LONG, 1,
-      [Define if your compiler supports the \`long long' type.])
-  fi
-AC_CACHE_CHECK(for __int64, ac_cv_c___int64,
-  [AC_TRY_COMPILE(,[__int64 i;],
-       ac_cv_c___int64=yes,
-       ac_cv_c___int64=no)])
-  if test $ac_cv_c___int64 = yes; then
-    AC_DEFINE(HAVE___INT64, 1,
-      [Define if your compiler supports the \`__int64' type.])
-  fi
-])
-
-#serial AM2
-
 dnl From Bruno Haible.
 
-AC_DEFUN([AM_ICONV],
+AC_DEFUN([AM_LANGINFO_CODESET],
 [
-  dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
-  dnl those with the standalone portable GNU libiconv installed).
-
-  am_cv_lib_iconv_ldpath=
-  AC_ARG_WITH([libiconv-prefix],
-[  --with-libiconv-prefix=DIR  search for libiconv in DIR/include and DIR/lib], [
-    for dir in `echo "$withval" | tr : ' '`; do
-      if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
-      if test -d $dir/lib; then am_cv_lib_iconv_ldpath="-L$dir/lib"; fi
-    done
-   ])
-
-  AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [
-    am_cv_func_iconv="no, consider installing GNU libiconv"
-    am_cv_lib_iconv=no
-    AC_TRY_LINK([#include <stdlib.h>
-#include <iconv.h>],
-      [iconv_t cd = iconv_open("","");
-       iconv(cd,NULL,NULL,NULL,NULL);
-       iconv_close(cd);],
-      am_cv_func_iconv=yes)
-    if test "$am_cv_func_iconv" != yes; then
-      am_save_LIBS="$LIBS"
-      LIBS="$LIBS $am_cv_libiconv_ldpath -liconv"
-      AC_TRY_LINK([#include <stdlib.h>
-#include <iconv.h>],
-        [iconv_t cd = iconv_open("","");
-         iconv(cd,NULL,NULL,NULL,NULL);
-         iconv_close(cd);],
-        am_cv_lib_iconv=yes
-        am_cv_func_iconv=yes)
-      LIBS="$am_save_LIBS"
-    fi
-  ])
-  if test "$am_cv_func_iconv" = yes; then
-    AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.])
-    AC_MSG_CHECKING([for iconv declaration])
-    AC_CACHE_VAL(am_cv_proto_iconv, [
-      AC_TRY_COMPILE([
-#include <stdlib.h>
-#include <iconv.h>
-extern
-#ifdef __cplusplus
-"C"
-#endif
-#if defined(__STDC__) || defined(__cplusplus)
-size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
-#else
-size_t iconv();
-#endif
-], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const")
-      am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"])
-    am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
-    AC_MSG_RESULT([$]{ac_t:-
-         }[$]am_cv_proto_iconv)
-    AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1,
-      [Define as const if the declaration of iconv() needs const.])
-  fi
-  LIBICONV=
-  if test "$am_cv_lib_iconv" = yes; then
-    LIBICONV="$am_cv_lib_iconv_ldpath -liconv"
+  AC_CACHE_CHECK([for nl_langinfo and CODESET], am_cv_langinfo_codeset,
+    [AC_TRY_LINK([#include <langinfo.h>],
+      [char* cs = nl_langinfo(CODESET);],
+      am_cv_langinfo_codeset=yes,
+      am_cv_langinfo_codeset=no)
+    ])
+  if test $am_cv_langinfo_codeset = yes; then
+    AC_DEFINE(HAVE_LANGINFO_CODESET, 1,
+      [Define if you have <langinfo.h> and nl_langinfo(CODESET).])
   fi
-  AC_SUBST(LIBICONV)
 ])
 
-AC_DEFUN(gcc_AC_INITFINI_ARRAY,
+AC_DEFUN([gcc_AC_INITFINI_ARRAY],
 [AC_ARG_ENABLE(initfini-array,
        [  --enable-initfini-array      use .init_array/.fini_array sections],
        [], [
@@ -705,7 +456,7 @@ for f in $gcc_cv_as_bfd_srcdir/configure \
          $gcc_cv_as_gas_srcdir/configure \
          $gcc_cv_as_gas_srcdir/configure.in \
          $gcc_cv_as_gas_srcdir/Makefile.in ; do
-  gcc_cv_gas_version=`grep '^VERSION=[[0-9]]*\.[[0-9]]*' $f`
+  gcc_cv_gas_version=`sed -n -e 's/^[[         ]]*\(VERSION=[[0-9]]*\.[[0-9]]*.*\)/\1/p' < $f`
   if test x$gcc_cv_gas_version != x; then
     break
   fi
@@ -764,7 +515,7 @@ AC_DEFUN([gcc_GAS_CHECK_FEATURE],
   if test $in_tree_gas = yes; then
     gcc_GAS_VERSION_GTE_IFELSE($3, [[$2]=yes])
   el])if test x$gcc_cv_as != x; then
-    echo ifelse(substr([$5],0,1),[$], "[$5]", '[$5]') > conftest.s
+    echo ifelse(m4_substr([$5],0,1),[$], "[$5]", '[$5]') > conftest.s
     if AC_TRY_COMMAND([$gcc_cv_as $4 -o conftest.o conftest.s >&AC_FD_CC])
     then
        ifelse([$6],, [$2]=yes, [$6])
@@ -779,35 +530,126 @@ if test $[$2] = yes; then
   $7
 fi])])
 
-# lcmessage.m4 serial 3 (gettext-0.11.3)
-dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
-dnl This file is free software, distributed under the terms of the GNU
-dnl General Public License.  As a special exception to the GNU General
-dnl Public License, this file may be distributed as part of a program
-dnl that contains a configuration script generated by Autoconf, under
-dnl the same distribution terms as the rest of that program.
-dnl
-dnl This file can can be used in projects which are not available under
-dnl the GNU General Public License or the GNU Library General Public
-dnl License but which still want to provide support for the GNU gettext
-dnl functionality.
-dnl Please note that the actual code of the GNU gettext library is covered
-dnl by the GNU Library General Public License, and the rest of the GNU
-dnl gettext package package is covered by the GNU General Public License.
-dnl They are *not* in the public domain.
+# AM_PROG_CC_C_O
+# --------------
+# Like AC_PROG_CC_C_O, but changed for automake.
+
+# Copyright (C) 1999, 2000, 2001, 2003 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+AC_DEFUN([AM_PROG_CC_C_O],
+[AC_REQUIRE([AC_PROG_CC_C_O])dnl
+AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+# FIXME: we rely on the cache variable name because
+# there is no other way.
+set dummy $CC
+ac_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']`
+if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" != yes"; then
+   # Losing compiler, so override with the script.
+   # FIXME: It is wrong to rewrite CC.
+   # But if we don't then we get into trouble of one sort or another.
+   # A longer-term fix would be to have automake use am__CC in this case,
+   # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
+   CC="$am_aux_dir/compile $CC"
+fi
+])
 
-dnl Authors:
-dnl   Ulrich Drepper <drepper@cygnus.com>, 1995.
+# AM_AUX_DIR_EXPAND
+
+# Copyright (C) 2001, 2003 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
+# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
+# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
+#
+# Of course, Automake must honor this variable whenever it calls a
+# tool from the auxiliary directory.  The problem is that $srcdir (and
+# therefore $ac_aux_dir as well) can be either absolute or relative,
+# depending on how configure is run.  This is pretty annoying, since
+# it makes $ac_aux_dir quite unusable in subdirectories: in the top
+# source directory, any form will work fine, but in subdirectories a
+# relative path needs to be adjusted first.
+#
+# $ac_aux_dir/missing
+#    fails when called from a subdirectory if $ac_aux_dir is relative
+# $top_srcdir/$ac_aux_dir/missing
+#    fails if $ac_aux_dir is absolute,
+#    fails when called from a subdirectory in a VPATH build with
+#          a relative $ac_aux_dir
+#
+# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
+# are both prefixed by $srcdir.  In an in-source build this is usually
+# harmless because $srcdir is `.', but things will broke when you
+# start a VPATH build or use an absolute $srcdir.
+#
+# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
+# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
+#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
+# and then we would define $MISSING as
+#   MISSING="\${SHELL} $am_aux_dir/missing"
+# This will work as long as MISSING is not called from configure, because
+# unfortunately $(top_srcdir) has no meaning in configure.
+# However there are other variables, like CC, which are often used in
+# configure, and could therefore not use this "fixed" $ac_aux_dir.
+#
+# Another solution, used here, is to always expand $ac_aux_dir to an
+# absolute PATH.  The drawback is that using absolute paths prevent a
+# configured tree to be moved without reconfiguration.
+
+AC_DEFUN([AM_AUX_DIR_EXPAND],
+[dnl Rely on autoconf to set up CDPATH properly.
+AC_PREREQ([2.50])dnl
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+])
 
-# Check whether LC_MESSAGES is available in <locale.h>.
 
-AC_DEFUN([AM_LC_MESSAGES],
-[
-  AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
-    [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
-       am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
-  if test $am_cv_val_LC_MESSAGES = yes; then
-    AC_DEFINE(HAVE_LC_MESSAGES, 1,
-      [Define if your <locale.h> file defines LC_MESSAGES.])
-  fi
-])
+dnl GCC_TARGET_TEMPLATE(KEY)
+dnl ------------------------
+dnl Define KEY as a valid configure key on the target machine.
+
+m4_define([GCC_TARGET_TEMPLATE],
+[m4_define([GCC_TARGET_TEMPLATE($1)],[])])
+
+dnl AH_TEMPLATE(KEY, DESCRIPTION)
+dnl -----------------------------
+dnl Issue an autoheader template for KEY, i.e., a comment composed of
+dnl DESCRIPTION (properly wrapped), and then #undef KEY.  Redefinition
+dnl of the macro in autoheader.m4, to support definition of only a few
+dnl keys while compiling target libraries.
+
+m4_define([AH_TEMPLATE],
+[AH_VERBATIM([$1],m4_text_wrap([$2 */], [   ], [/* ])
+m4_ifdef([GCC_TARGET_TEMPLATE($1)],[],[#ifndef USED_FOR_TARGET
+])[#undef $1]m4_ifdef([GCC_TARGET_TEMPLATE($1)],[],[
+#endif
+]))])