From 7ed1a08985ee943646612563e1fc09f5d51425f8 Mon Sep 17 00:00:00 2001 From: Paul Smith Date: Sun, 21 Apr 2002 23:57:24 +0000 Subject: Update GNU make to use Autoconf 2.53, Automake 1.6.1, Gettext 0.11.1. We're using Gettext's "external" feature to avoid including the intl code in the GNU make distribution. --- acinclude.m4 | 428 +---------------------------------------------------------- 1 file changed, 3 insertions(+), 425 deletions(-) (limited to 'acinclude.m4') diff --git a/acinclude.m4 b/acinclude.m4 index 3822e74..59a9359 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -66,7 +66,7 @@ dnl set to 'no'). AC_DEFUN([CF_RECHECK_FUNC],[ AC_CHECK_LIB($2,$1,[ CF_UPPER(cf_tr_func,$1) - AC_DEFINE_UNQUOTED(HAVE_$cf_tr_func) + AC_DEFINE_UNQUOTED(HAVE_$cf_tr_func,1,[Define if you have function $1]) ac_cv_func_$1=yes $3="-l$2 [$]$3"],[ ac_cv_func_$1=unknown @@ -84,173 +84,12 @@ $1=`echo $2 | tr '[a-z]' '[A-Z]'` changequote([,])dnl ])dnl -dnl --------------------------------------------------------------------------- -dnl Got this from the GNU tar 1.13.11 distribution -dnl by Paul Eggert -dnl --------------------------------------------------------------------------- - -dnl By default, many hosts won't let programs access large files; -dnl one must use special compiler options to get large-file access to work. -dnl For more details about this brain damage please see: -dnl http://www.sas.com/standards/large.file/x_open.20Mar96.html - -dnl Written by Paul Eggert . - -dnl Internal subroutine of AC_SYS_LARGEFILE. -dnl AC_SYS_LARGEFILE_FLAGS(FLAGSNAME) -AC_DEFUN(AC_SYS_LARGEFILE_FLAGS, - [AC_CACHE_CHECK([for $1 value to request large file support], - ac_cv_sys_largefile_$1, - [if ($GETCONF LFS_$1) >conftest.1 2>conftest.2 && test ! -s conftest.2 - then - ac_cv_sys_largefile_$1=`cat conftest.1` - else - ac_cv_sys_largefile_$1=no - ifelse($1, CFLAGS, - [case "$host_os" in - # HP-UX 10.20 requires -D__STDC_EXT__ with gcc 2.95.1. -changequote(, )dnl - hpux10.[2-9][0-9]* | hpux1[1-9]* | hpux[2-9][0-9]*) -changequote([, ])dnl - if test "$GCC" = yes; then - ac_cv_sys_largefile_CFLAGS=-D__STDC_EXT__ - fi - ;; - # IRIX 6.2 and later require cc -n32. -changequote(, )dnl - irix6.[2-9]* | irix6.1[0-9]* | irix[7-9].* | irix[1-9][0-9]*) -changequote([, ])dnl - if test "$GCC" != yes; then - ac_cv_sys_largefile_CFLAGS=-n32 - fi - esac - if test "$ac_cv_sys_largefile_CFLAGS" != no; then - ac_save_CC="$CC" - CC="$CC $ac_cv_sys_largefile_CFLAGS" - AC_TRY_LINK(, , , ac_cv_sys_largefile_CFLAGS=no) - CC="$ac_save_CC" - fi]) - fi - rm -f conftest*])]) - -dnl Internal subroutine of AC_SYS_LARGEFILE. -dnl AC_SYS_LARGEFILE_SPACE_APPEND(VAR, VAL) -AC_DEFUN(AC_SYS_LARGEFILE_SPACE_APPEND, - [case $2 in - no) ;; - ?*) - case "[$]$1" in - '') $1=$2 ;; - *) $1=[$]$1' '$2 ;; - esac ;; - esac]) - -dnl Internal subroutine of AC_SYS_LARGEFILE. -dnl AC_SYS_LARGEFILE_MACRO_VALUE(C-MACRO, CACHE-VAR, COMMENT, CODE-TO-SET-DEFAULT) -AC_DEFUN(AC_SYS_LARGEFILE_MACRO_VALUE, - [AC_CACHE_CHECK([for $1], $2, - [$2=no -changequote(, )dnl - $4 - for ac_flag in $ac_cv_sys_largefile_CFLAGS no; do - case "$ac_flag" in - -D$1) - $2=1 ;; - -D$1=*) - $2=`expr " $ac_flag" : '[^=]*=\(.*\)'` ;; - esac - done -changequote([, ])dnl - ]) - if test "[$]$2" != no; then - AC_DEFINE_UNQUOTED([$1], [$]$2, [$3]) - fi]) - -AC_DEFUN(AC_SYS_LARGEFILE, - [AC_REQUIRE([AC_CANONICAL_HOST]) - AC_ARG_ENABLE(largefile, - [ --disable-largefile omit support for large files]) - if test "$enable_largefile" != no; then - AC_CHECK_TOOL(GETCONF, getconf) - AC_SYS_LARGEFILE_FLAGS(CFLAGS) - AC_SYS_LARGEFILE_FLAGS(LDFLAGS) - AC_SYS_LARGEFILE_FLAGS(LIBS) - - for ac_flag in $ac_cv_sys_largefile_CFLAGS no; do - case "$ac_flag" in - no) ;; - -D_FILE_OFFSET_BITS=*) ;; - -D_LARGEFILE_SOURCE | -D_LARGEFILE_SOURCE=*) ;; - -D_LARGE_FILES | -D_LARGE_FILES=*) ;; - -D?* | -I?*) - AC_SYS_LARGEFILE_SPACE_APPEND(CPPFLAGS, "$ac_flag") ;; - *) - AC_SYS_LARGEFILE_SPACE_APPEND(CFLAGS, "$ac_flag") ;; - esac - done - AC_SYS_LARGEFILE_SPACE_APPEND(LDFLAGS, "$ac_cv_sys_largefile_LDFLAGS") - AC_SYS_LARGEFILE_SPACE_APPEND(LIBS, "$ac_cv_sys_largefile_LIBS") - AC_SYS_LARGEFILE_MACRO_VALUE(_FILE_OFFSET_BITS, - ac_cv_sys_file_offset_bits, - [Number of bits in a file offset, on hosts where this is settable.], - [case "$host_os" in - # HP-UX 10.20 and later - hpux10.[2-9][0-9]* | hpux1[1-9]* | hpux[2-9][0-9]*) - ac_cv_sys_file_offset_bits=64 ;; - esac]) - AC_SYS_LARGEFILE_MACRO_VALUE(_LARGEFILE_SOURCE, - ac_cv_sys_largefile_source, - [Define to make fseeko etc. visible, on some hosts.], - [case "$host_os" in - # HP-UX 10.20 and later - hpux10.[2-9][0-9]* | hpux1[1-9]* | hpux[2-9][0-9]*) - ac_cv_sys_largefile_source=1 ;; - esac]) - AC_SYS_LARGEFILE_MACRO_VALUE(_LARGE_FILES, - ac_cv_sys_large_files, - [Define for large files, on AIX-style hosts.], - [case "$host_os" in - # AIX 4.2 and later - aix4.[2-9]* | aix4.1[0-9]* | aix[5-9].* | aix[1-9][0-9]*) - ac_cv_sys_large_files=1 ;; - esac]) - fi - ]) - - -dnl --------------------------------------------------------------------------- -dnl From Paul Eggert - -dnl Define HAVE_INTTYPES_H if exists, -dnl doesn't clash with , and declares uintmax_t. - -AC_DEFUN(jm_AC_HEADER_INTTYPES_H, -[ - if test x = y; then - dnl This code is deliberately never run via ./configure. - dnl FIXME: this is a gross hack to make autoheader put an entry - dnl for `HAVE_INTTYPES_H' in config.h.in. - AC_CHECK_FUNCS(INTTYPES_H) - fi - AC_CACHE_CHECK([for inttypes.h], jm_ac_cv_header_inttypes_h, - [AC_TRY_COMPILE( - [#include -#include ], - [uintmax_t i = (uintmax_t) -1;], - jm_ac_cv_header_inttypes_h=yes, - jm_ac_cv_header_inttypes_h=no)]) - if test $jm_ac_cv_header_inttypes_h = yes; then - ac_kludge=HAVE_INTTYPES_H - AC_DEFINE_UNQUOTED($ac_kludge) - fi -]) - dnl --------------------------------------------------------------------------- dnl From Paul Eggert AC_DEFUN(AC_STRUCT_ST_MTIM_NSEC, - [AC_CACHE_CHECK([for nanoseconds member of struct stat.st_mtim], + [AC_CACHE_CHECK([for nanoseconds field of struct stat.st_mtim], ac_cv_struct_st_mtim_nsec, [ac_save_CPPFLAGS="$CPPFLAGS" ac_cv_struct_st_mtim_nsec=no @@ -268,268 +107,7 @@ AC_DEFUN(AC_STRUCT_ST_MTIM_NSEC, CPPFLAGS="$ac_save_CPPFLAGS"]) if test $ac_cv_struct_st_mtim_nsec != no; then - AC_DEFINE_UNQUOTED(ST_MTIM_NSEC, $ac_cv_struct_st_mtim_nsec) + AC_DEFINE_UNQUOTED(ST_MTIM_NSEC, $ac_cv_struct_st_mtim_nsec, [Define if 'struct stat' contains a nanoseconds field]) fi ] ) - -dnl --------------------------------------------------------------------------- -dnl From Paul Eggert - -dnl Define uintmax_t to `unsigned long' or `unsigned long long' -dnl if does not exist. - -AC_DEFUN(jm_AC_TYPE_UINTMAX_T, -[ - AC_REQUIRE([jm_AC_HEADER_INTTYPES_H]) - if test $jm_ac_cv_header_inttypes_h = no; then - AC_CACHE_CHECK([for unsigned long long], ac_cv_type_unsigned_long_long, - [AC_TRY_LINK([unsigned long long ull = 1; int i = 63;], - [unsigned long long ullmax = (unsigned long long) -1; - return ull << i | ull >> i | ullmax / ull | ullmax % ull;], - ac_cv_type_unsigned_long_long=yes, - ac_cv_type_unsigned_long_long=no)]) - if test $ac_cv_type_unsigned_long_long = yes; then - AC_DEFINE(uintmax_t, unsigned long long) - else - AC_DEFINE(uintmax_t, unsigned long) - fi - fi -]) - - -# The following is taken from automake 1.4, -# except that it prefers the compiler option -Ae to "-Aa -D_HPUX_SOURCE" -# because only the former supports 64-bit integral types on HP-UX 10.20. - -## ----------------------------------------- ## -## ANSIfy the C compiler whenever possible. ## -## From Franc,ois Pinard ## -## ----------------------------------------- ## - -# serial 2 - -# @defmac AC_PROG_CC_STDC -# @maindex PROG_CC_STDC -# @ovindex CC -# If the C compiler in not in ANSI C mode by default, try to add an option -# to output variable @code{CC} to make it so. This macro tries various -# options that select ANSI C on some system or another. It considers the -# compiler to be in ANSI C mode if it handles function prototypes correctly. -# -# If you use this macro, you should check after calling it whether the C -# compiler has been set to accept ANSI C; if not, the shell variable -# @code{am_cv_prog_cc_stdc} is set to @samp{no}. If you wrote your source -# code in ANSI C, you can make an un-ANSIfied copy of it by using the -# program @code{ansi2knr}, which comes with Ghostscript. -# @end defmac - -AC_DEFUN(AM_PROG_CC_STDC, -[AC_REQUIRE([AC_PROG_CC]) -AC_BEFORE([$0], [AC_C_INLINE]) -AC_BEFORE([$0], [AC_C_CONST]) -dnl Force this before AC_PROG_CPP. Some cpp's, eg on HPUX, require -dnl a magic option to avoid problems with ANSI preprocessor commands -dnl like #elif. -dnl FIXME: can't do this because then AC_AIX won't work due to a -dnl circular dependency. -dnl AC_BEFORE([$0], [AC_PROG_CPP]) -AC_MSG_CHECKING(for ${CC-cc} option to accept ANSI C) -AC_CACHE_VAL(am_cv_prog_cc_stdc, -[am_cv_prog_cc_stdc=no -ac_save_CC="$CC" -# Don't try gcc -ansi; that turns off useful extensions and -# breaks some systems' header files. -# AIX -qlanglvl=ansi -# Ultrix and OSF/1 -std1 -# HP-UX -Aa -D_HPUX_SOURCE -# SVR4 -Xc -D__EXTENSIONS__ -for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" -do - CC="$ac_save_CC $ac_arg" - AC_TRY_COMPILE( -[#include -#include -#include -#include -/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ -struct buf { int x; }; -FILE * (*rcsopen) (struct buf *, struct stat *, int); -static char *e (p, i) - char **p; - int i; -{ - return p[i]; -} -static char *f (char * (*g) (char **, int), char **p, ...) -{ - char *s; - va_list v; - va_start (v,p); - s = g (p, va_arg (v,int)); - va_end (v); - return s; -} -int test (int i, double x); -struct s1 {int (*f) (int a);}; -struct s2 {int (*f) (double a);}; -int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); -int argc; -char **argv; -], [ -return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; -], -[am_cv_prog_cc_stdc="$ac_arg"; break]) -done -CC="$ac_save_CC" -]) -if test -z "$am_cv_prog_cc_stdc"; then - AC_MSG_RESULT([none needed]) -else - AC_MSG_RESULT($am_cv_prog_cc_stdc) -fi -case "x$am_cv_prog_cc_stdc" in - x|xno) ;; - *) CC="$CC $am_cv_prog_cc_stdc" ;; -esac -]) - -dnl --------------------------------------------------------------------------- -dnl Enable internationalization support for GNU make. -dnl Original obtained from the libit 0.7 distribution -dnl Rewritten by Paul D. Smith -dnl This version is much more straightforward than the original (I think); -dnl If the user doesn't disable NLS, check whether she asked for the -dnl included gettext. If so, we use that. If not, test to see if the -dnl system gettext is GNU. If not, use the included gettext. If so, -dnl use the system gettext. We are very strict about testing for GNU -dnl gettext; not only must the library be GNU gettext, but the libintl.h -dnl file must also be GNU. -dnl -AC_DEFUN(pds_CHECK_SYSTEM_GETTEXT, [ - - # OK. What we're going to do is see if the system gettext is really - # GNU gettext, and we're going to make _sure_ (as we can) that if - # it's not we'll use the included gettext. - - pds_keep_LIBS="$LIBS" - - # Look around for gettext() and libintl.h on the system - AC_CHECK_HEADERS(locale.h) - AC_SEARCH_LIBS(gettext, intl) - if test "$ac_cv_search_gettext" = no; then - with_included_gettext=yes - - else - # We only want to deal with GNU's gettext; if we don't have that - # we'll just use our own, thanks very much. - AC_CACHE_CHECK([whether the system has GNU gettext], - pds_cv_system_gnu_gettext, [ - AC_TRY_LINK([ -#include -#ifdef HAVE_LOCALE_H -#include -#endif -], [ -#if __USE_GNU_GETTEXT - extern int _nl_msg_cat_cntr; - return _nl_msg_cat_cntr; -#else -not GNU gettext -#endif -], - pds_cv_system_gnu_gettext=yes, pds_cv_system_gnu_gettext=no)]) - - if test "x$pds_cv_system_gnu_gettext" = xyes; then - with_included_gettext=no - AC_DEFINE(HAVE_LIBINTL_H, 1, [Define if you have .]) - else - with_included_gettext=yes - LIBS="$pds_keep_LIBS" - fi - fi -]) - - -AC_DEFUN(pds_WITH_GETTEXT, [ - - AC_MSG_CHECKING(whether NLS is wanted) - AC_ARG_ENABLE(nls, - [ --disable-nls disallow Native Language Support], - enable_nls=$enableval, enable_nls=yes) - AC_MSG_RESULT($enable_nls) - use_nls=$enable_nls - AM_CONDITIONAL(USE_NLS, test $use_nls = yes) - - if test $enable_nls = yes; then - AC_DEFINE(ENABLE_NLS, 1, [Define if NLS is requested.]) - - # We don't support catgets at all - if test "x$with_catgets" != x; then - AC_MSG_WARN([catgets not supported; --with-catgets ignored]) - fi - - # Find out what the user wants. - - AC_ARG_WITH(included-gettext, - [ --with-included-gettext use the GNU gettext library included here], - with_included_gettext=yes, - with_included_gettext=maybe) - - if test "x$with_included_gettext" != xyes; then - pds_CHECK_SYSTEM_GETTEXT - fi - - AC_MSG_CHECKING([whether to use included gettext]) - AC_MSG_RESULT($with_included_gettext) - - if test "$with_included_gettext" = yes; then - LIBOBJS="$LIBOBJS gettext.o" - fi - - AC_DEFINE(HAVE_GETTEXT, 1, [Define if you have the gettext function.]) - AC_DEFINE(HAVE_DCGETTEXT, 1, [Define if you have the dcgettext function.]) - - AC_CHECK_FUNCS(getcwd setlocale stpcpy) - - if test -z "$ALL_LINGUAS"; then - AC_MSG_WARN(This package does not install translations yet.) - else - ac_items="$ALL_LINGUAS" - for ac_item in $ac_items; do - ALL_POFILES="$ALL_POFILES $ac_item.po" - ALL_MOFILES="$ALL_MOFILES $ac_item.mo" - done - fi - AC_SUBST(ALL_LINGUAS) - AC_SUBST(ALL_POFILES) - AC_SUBST(ALL_MOFILES) - - AC_MSG_CHECKING(which translations to install) - if test -z "$LINGUAS"; then - ac_print="$ALL_LINGUAS" - MOFILES="$ALL_MOFILES" - else - ac_items="$LINGUAS" - for ac_item in $ac_items; do - case "$ALL_LINGUAS" in - *$ac_item*) - ac_print="$ac_print $ac_item" - MOFILES="$MOFILES $ac_item.mo" - ;; - esac - done - fi - AC_SUBST(MOFILES) - if test -z "$ac_print"; then - AC_MSG_RESULT(none) - else - AC_MSG_RESULT($ac_print) - fi - - if test "x$prefix" = xNONE; then - AC_DEFINE_UNQUOTED(LOCALEDIR, "$ac_default_prefix/share/locale") - else - AC_DEFINE_UNQUOTED(LOCALEDIR, "$prefix/share/locale") - fi - fi]) -- cgit v1.2.3