diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2006-08-21 07:26:38 +0000 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2006-08-21 07:26:38 +0000 |
commit | 0f7a044109b860443ecaa4f8a37652b1b4423057 (patch) | |
tree | b5834ed9867213221a2636e0fa7e8da178749a76 /m4 | |
parent | 11fd62b0080ce376b26241bd789b7e7390befef6 (diff) | |
download | coreutils-0f7a044109b860443ecaa4f8a37652b1b4423057.tar.xz |
Remove from CVS, since the bootstrap script generates them automatically.
Diffstat (limited to 'm4')
230 files changed, 0 insertions, 10536 deletions
diff --git a/m4/absolute-header.m4 b/m4/absolute-header.m4 deleted file mode 100644 index c649df084..000000000 --- a/m4/absolute-header.m4 +++ /dev/null @@ -1,44 +0,0 @@ -# absolute-header.m4 serial 6 -dnl Copyright (C) 2006 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Derek Price. - -# gl_ABSOLUTE_HEADER(HEADER1 HEADER2 ...) -# --------------------------------------- -# Find the absolute name of a header file, assuming the header exists. -# If the header were sys/inttypes.h, this macro would define -# ABSOLUTE_SYS_INTTYPES_H to the `""' quoted absolute name of sys/inttypes.h -# in config.h -# (e.g. `#define ABSOLUTE_SYS_INTTYPES_H "///usr/include/sys/inttypes.h"'). -# The three "///" are to pacify Sun C 5.8, which otherwise would say -# "warning: #include of /usr/include/... may be non-portable". -# Use `""', not `<>', so that the /// cannot be confused with a C99 comment. -AC_DEFUN([gl_ABSOLUTE_HEADER], -[AC_LANG_PREPROC_REQUIRE()dnl -AC_FOREACH([gl_HEADER_NAME], [$1], - [AS_VAR_PUSHDEF([gl_absolute_header], - [gl_cv_absolute_]m4_quote(m4_defn([gl_HEADER_NAME])))dnl - AC_CACHE_CHECK([absolute name of <]m4_quote(m4_defn([gl_HEADER_NAME]))[>], - m4_quote(m4_defn([gl_absolute_header])), - [AS_VAR_PUSHDEF([ac_header_exists], - [ac_cv_header_]m4_quote(m4_defn([gl_HEADER_NAME])))dnl - AC_CHECK_HEADERS_ONCE(m4_quote(m4_defn([gl_HEADER_NAME])))dnl - if test AS_VAR_GET(ac_header_exists) = yes; then - AC_LANG_CONFTEST([AC_LANG_SOURCE([[#include <]]m4_dquote(m4_defn([gl_HEADER_NAME]))[[>]])]) -dnl eval is necessary to expand ac_cpp. -dnl Ultrix and Pyramid sh refuse to redirect output of eval, so use subshell. - AS_VAR_SET(gl_absolute_header, -[`(eval "$ac_cpp conftest.$ac_ext") 2>&AS_MESSAGE_LOG_FD | -sed -n '\#/]m4_quote(m4_defn([gl_HEADER_NAME]))[#{s#.*"\(.*/]m4_quote(m4_defn([gl_HEADER_NAME]))[\)".*#\1#;s#^/[^/]#//&#;p;q;}'`]) - fi - AS_VAR_POPDEF([ac_header_exists])dnl - ])dnl - AC_DEFINE_UNQUOTED(AS_TR_CPP([ABSOLUTE_]m4_quote(m4_defn([gl_HEADER_NAME]))), - ["AS_VAR_GET(gl_absolute_header)"], - [Define this to an absolute name of <]m4_quote(m4_defn([gl_HEADER_NAME]))[>.]) - AS_VAR_POPDEF([gl_absolute_header])dnl -])dnl -])# gl_ABSOLUTE_HEADER diff --git a/m4/acl.m4 b/m4/acl.m4 deleted file mode 100644 index 2cc1ca3dd..000000000 --- a/m4/acl.m4 +++ /dev/null @@ -1,35 +0,0 @@ -# acl.m4 - check for access control list (ACL) primitives - -# Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc. -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# Written by Paul Eggert. - -AC_DEFUN([AC_FUNC_ACL], -[ - AC_LIBSOURCES([acl.c, acl.h]) - AC_LIBOBJ([acl]) - - dnl Prerequisites of lib/acl.c. - AC_CHECK_HEADERS(sys/acl.h) - if test "$ac_cv_header_sys_acl_h" = yes; then - use_acl=1 - else - use_acl=0 - fi - AC_DEFINE_UNQUOTED(USE_ACL, $use_acl, - [Define if you want access control list support.]) - AC_CHECK_FUNCS(acl) - ac_save_LIBS="$LIBS" - AC_SEARCH_LIBS(acl_get_file, acl, - [test "$ac_cv_search_acl_get_file" = "none required" || - LIB_ACL=$ac_cv_search_acl_get_file]) - AC_SUBST(LIB_ACL) - AC_CHECK_HEADERS(acl/libacl.h) - AC_CHECK_FUNCS(acl_get_file acl_get_fd acl_set_file acl_set_fd \ - acl_free acl_from_mode acl_from_text acl_to_text \ - acl_delete_def_file acl_entries acl_extended_file) - LIBS="$ac_save_LIBS" -]) diff --git a/m4/alloca.m4 b/m4/alloca.m4 deleted file mode 100644 index a9e3f452c..000000000 --- a/m4/alloca.m4 +++ /dev/null @@ -1,42 +0,0 @@ -# alloca.m4 serial 5 -dnl Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_FUNC_ALLOCA], -[ - dnl Work around a bug of AC_EGREP_CPP in autoconf-2.57. - AC_REQUIRE([AC_PROG_CPP]) - AC_REQUIRE([AC_PROG_EGREP]) - - AC_REQUIRE([AC_FUNC_ALLOCA]) - if test $ac_cv_func_alloca_works = no; then - gl_PREREQ_ALLOCA - fi - - # Define an additional variable used in the Makefile substitution. - if test $ac_cv_working_alloca_h = yes; then - AC_EGREP_CPP([Need own alloca], [ -#if defined __GNUC__ || defined _AIX || defined _MSC_VER - Need own alloca -#endif - ], - [AC_DEFINE(HAVE_ALLOCA, 1, - [Define to 1 if you have `alloca' after including <alloca.h>, - a header that may be supplied by this distribution.]) - ALLOCA_H=alloca.h], - [ALLOCA_H=]) - else - ALLOCA_H=alloca.h - fi - AC_SUBST([ALLOCA_H]) - - AC_DEFINE(HAVE_ALLOCA_H, 1, - [Define HAVE_ALLOCA_H for backward compatibility with older code - that includes <alloca.h> only if HAVE_ALLOCA_H is defined.]) -]) - -# Prerequisites of lib/alloca.c. -# STACK_DIRECTION is already handled by AC_FUNC_ALLOCA. -AC_DEFUN([gl_PREREQ_ALLOCA], [:]) diff --git a/m4/allocsa.m4 b/m4/allocsa.m4 deleted file mode 100644 index 474862fe3..000000000 --- a/m4/allocsa.m4 +++ /dev/null @@ -1,15 +0,0 @@ -# allocsa.m4 serial 3 -dnl Copyright (C) 2003-2004 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_ALLOCSA], -[ - dnl Use the autoconf tests for alloca(), but not the AC_SUBSTed variables - dnl @ALLOCA@ and @LTALLOCA@. - AC_REQUIRE([gl_FUNC_ALLOCA]) - AC_REQUIRE([gl_EEMALLOC]) - AC_REQUIRE([gl_AC_TYPE_LONG_LONG]) - AC_REQUIRE([gt_TYPE_LONGDOUBLE]) -]) diff --git a/m4/arpa_inet_h.m4 b/m4/arpa_inet_h.m4 deleted file mode 100644 index d01d0984e..000000000 --- a/m4/arpa_inet_h.m4 +++ /dev/null @@ -1,18 +0,0 @@ -# arpa_inet_h.m4 serial 1 -dnl Copyright (C) 2006 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl Written by Simon Josefsson - -AC_DEFUN([gl_HEADER_ARPA_INET], -[ - AC_CHECK_HEADERS_ONCE([arpa/inet.h]) - if test $ac_cv_header_arpa_inet_h = yes; then - ARPA_INET_H='' - else - ARPA_INET_H='arpa/inet.h' - fi - AC_SUBST(ARPA_INET_H) -]) diff --git a/m4/assert.m4 b/m4/assert.m4 deleted file mode 100644 index bfdc00f23..000000000 --- a/m4/assert.m4 +++ /dev/null @@ -1,19 +0,0 @@ -#serial 5 - -# Copyright (C) 1998, 1999, 2001, 2004 Free Software Foundation, Inc. -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -dnl based on code from Eleftherios Gkioulekas - -AC_DEFUN([gl_ASSERT], -[ - AC_MSG_CHECKING(whether to enable assertions) - AC_ARG_ENABLE(assert, - [ --disable-assert turn off assertions], - [ AC_MSG_RESULT(no) - AC_DEFINE(NDEBUG,1,[Define to 1 if assertions should be disabled.]) ], - [ AC_MSG_RESULT(yes) ] - ) -]) diff --git a/m4/atexit.m4 b/m4/atexit.m4 deleted file mode 100644 index 348912f9f..000000000 --- a/m4/atexit.m4 +++ /dev/null @@ -1,18 +0,0 @@ -# atexit.m4 serial 2 -dnl Copyright (C) 2002 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_FUNC_ATEXIT], -[ - AC_REPLACE_FUNCS(atexit) - if test $ac_cv_func_atexit = no; then - gl_PREREQ_ATEXIT - fi -]) - -# Prerequisites of lib/atexit.c. -AC_DEFUN([gl_PREREQ_ATEXIT], [ - : -]) diff --git a/m4/backupfile.m4 b/m4/backupfile.m4 deleted file mode 100644 index 6e08f72c5..000000000 --- a/m4/backupfile.m4 +++ /dev/null @@ -1,17 +0,0 @@ -# backupfile.m4 serial 11 -dnl Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_BACKUPFILE], -[ - AC_LIBSOURCES([backupfile.c, backupfile.h]) - AC_LIBOBJ([backupfile]) - - dnl Prerequisites of lib/backupfile.c. - AC_REQUIRE([gl_CHECK_TYPE_STRUCT_DIRENT_D_INO]) - AC_REQUIRE([gl_AC_DOS]) - AC_REQUIRE([AC_SYS_LONG_FILE_NAMES]) - AC_CHECK_FUNCS_ONCE([pathconf]) -]) diff --git a/m4/basename.m4 b/m4/basename.m4 deleted file mode 100644 index 69a0996fb..000000000 --- a/m4/basename.m4 +++ /dev/null @@ -1,14 +0,0 @@ -# basename.m4 serial 1 -dnl Copyright (C) 2005 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_BASENAME], -[ - AC_LIBSOURCES([basename.c, dirname.h]) - AC_LIBOBJ([basename]) - - dnl Prerequisites of lib/basename.c. - AC_REQUIRE([gl_AC_DOS]) -]) diff --git a/m4/bison.m4 b/m4/bison.m4 deleted file mode 100644 index 91039b1ce..000000000 --- a/m4/bison.m4 +++ /dev/null @@ -1,24 +0,0 @@ -#serial 4 - -# Copyright (C) 2002, 2005 Free Software Foundation, Inc. -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_BISON], -[ - # getdate.y works with bison only. - : ${YACC='bison -y'} -dnl -dnl Declaring YACC & YFLAGS precious will not be necessary after GNULIB -dnl requires an Autoconf greater than 2.59c, but it will probably still be -dnl useful to override the description of YACC in the --help output, re -dnl getdate.y assuming `bison -y'. - AC_ARG_VAR(YACC, -[The `Yet Another C Compiler' implementation to use. Defaults to `bison -y'. -Values other than `bison -y' will most likely break on most systems.])dnl - AC_ARG_VAR(YFLAGS, -[YFLAGS contains the list arguments that will be passed by default to Bison. -This script will default YFLAGS to the empty string to avoid a default value of -`-d' given by some make applications.])dnl -]) diff --git a/m4/c-strtod.m4 b/m4/c-strtod.m4 deleted file mode 100644 index 729f1aac7..000000000 --- a/m4/c-strtod.m4 +++ /dev/null @@ -1,55 +0,0 @@ -# c-strtod.m4 serial 8 - -# Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc. -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# Written by Paul Eggert. - -AC_DEFUN([gl_C99_STRTOLD], -[ - AC_CACHE_CHECK([whether strtold conforms to C99], - [gl_cv_func_c99_strtold], - [AC_LINK_IFELSE( - [AC_LANG_PROGRAM( - [[/* On HP-UX before 11.23, strtold returns a struct instead of - long double. Reject implementations like that, by requiring - compatibility with the C99 prototype. */ - #include <stdlib.h> - static long double (*p) (char const *, char **) = strtold; - static long double - test (char const *nptr, char **endptr) - { - long double r; - r = strtold (nptr, endptr); - return r; - }]], - [[return test ("1.0", NULL) != 1 || p ("1.0", NULL) != 1;]])], - [gl_cv_func_c99_strtold=yes], - [gl_cv_func_c99_strtold=no])]) - if test $gl_cv_func_c99_strtold = yes; then - AC_DEFINE([HAVE_C99_STRTOLD], 1, [Define to 1 if strtold conforms to C99.]) - fi -]) - -AC_DEFUN([gl_C_STRTOD], -[ - AC_LIBSOURCES([c-strtod.c, c-strtod.h]) - AC_LIBOBJ([c-strtod]) - - dnl Prerequisites of lib/c-strtod.c. - AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) - : -]) - -AC_DEFUN([gl_C_STRTOLD], -[ - AC_LIBSOURCES([c-strtod.c, c-strtold.c, c-strtod.h]) - AC_LIBOBJ([c-strtold]) - - dnl Prerequisites of lib/c-strtold.c. - AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) - AC_REQUIRE([gl_C99_STRTOLD]) - : -]) diff --git a/m4/c.m4 b/m4/c.m4 deleted file mode 100644 index 098322470..000000000 --- a/m4/c.m4 +++ /dev/null @@ -1,262 +0,0 @@ -# c.m4 serial 1 -dnl Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl This code stolen from CVS Autoconf lib/autoconf/c.m4 on 2005-11-17. -dnl It can be removed once we assume Autoconf 2.60 or later. - -# -------------------------------- # -# 4b. C compiler characteristics. # -# -------------------------------- # - -# _AC_PROG_CC_C89 ([ACTION-IF-AVAILABLE], [ACTION-IF-UNAVAILABLE]) -# ---------------------------------------------------------------- -# If the C compiler is not in ANSI C89 (ISO C90) mode by default, try -# to add an option to output variable CC to make it so. This macro -# tries various options that select ANSI C89 on some system or -# another. It considers the compiler to be in ANSI C89 mode if it -# handles function prototypes correctly. -AC_DEFUN([_AC_PROG_CC_C89], -[_AC_C_STD_TRY([c89], -[[#include <stdarg.h> -#include <stdio.h> -#include <sys/types.h> -#include <sys/stat.h> -/* 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; -} - -/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has - function prototypes and stuff, but not '\xHH' hex character constants. - These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std is added to get - proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an - array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std. */ -int osf4_cc_array ['\x00' == 0 ? 1 : -1]; - -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];]], -dnl Don't try gcc -ansi; that turns off useful extensions and -dnl breaks some systems' header files. -dnl AIX circa 2003 -qlanglvl=extc89 -dnl old AIX -qlanglvl=ansi -dnl Ultrix, OSF/1, Tru64 -std -dnl HP-UX 10.20 and later -Ae -dnl HP-UX older versions -Aa -D_HPUX_SOURCE -dnl SVR4 -Xc -D__EXTENSIONS__ -[-qlanglvl=extc89 -qlanglvl=ansi -std \ - -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"], [$1], [$2])[]dnl -])# _AC_PROG_CC_C89 - - -# _AC_C_STD_TRY(STANDARD, TEST-PROLOGUE, TEST-BODY, OPTION-LIST, -# ACTION-IF-AVAILABLE, ACTION-IF-UNAVAILABLE) -# -------------------------------------------------------------- -# Check whether the C compiler accepts features of STANDARD (e.g `c89', `c99') -# by trying to compile a program of TEST-PROLOGUE and TEST-BODY. If this fails, -# try again with each compiler option in the space-separated OPTION-LIST; if one -# helps, append it to CC. If eventually successful, run ACTION-IF-AVAILABLE, -# else ACTION-IF-UNAVAILABLE. -AC_DEFUN([_AC_C_STD_TRY], -[AC_MSG_CHECKING([for $CC option to accept ISO ]m4_translit($1, [c], [C])) -AC_CACHE_VAL(ac_cv_prog_cc_$1, -[ac_cv_prog_cc_$1=no -ac_save_CC=$CC -AC_LANG_CONFTEST([AC_LANG_PROGRAM([$2], [$3])]) -for ac_arg in '' $4 -do - CC="$ac_save_CC $ac_arg" - _AC_COMPILE_IFELSE([], [ac_cv_prog_cc_$1=$ac_arg]) - test "x$ac_cv_prog_cc_$1" != "xno" && break -done -rm -f conftest.$ac_ext -CC=$ac_save_CC -])# AC_CACHE_VAL -case "x$ac_cv_prog_cc_$1" in - x) - AC_MSG_RESULT([none needed]) ;; - xno) - AC_MSG_RESULT([unsupported]) ;; - *) - CC="$CC $ac_cv_prog_cc_$1" - AC_MSG_RESULT([$ac_cv_prog_cc_$1]) ;; -esac -AS_IF([test "x$ac_cv_prog_cc_$1" != xno], [$5], [$6]) -])# _AC_C_STD_TRY - - -# _AC_PROG_CC_C99 ([ACTION-IF-AVAILABLE], [ACTION-IF-UNAVAILABLE]) -# ---------------------------------------------------------------- -# If the C compiler is not in ISO C99 mode by default, try to add an -# option to output variable CC to make it so. This macro tries -# various options that select ISO C99 on some system or another. It -# considers the compiler to be in ISO C99 mode if it handles mixed -# code and declarations, _Bool, inline and restrict. -AC_DEFUN([_AC_PROG_CC_C99], -[_AC_C_STD_TRY([c99], -[[#include <stdarg.h> -#include <stdbool.h> -#include <stdlib.h> -#include <wchar.h> -#include <stdio.h> - -struct incomplete_array -{ - int datasize; - double data[]; -}; - -struct named_init { - int number; - const wchar_t *name; - double average; -}; - -static inline int -test_restrict(const char *restrict text) -{ - // See if C++-style comments work. - // Iterate through items via the restricted pointer. - // Also check for declarations in for loops. - for (unsigned int i = 0; *(text+i) != '\0'; ++i) - continue; - return 0; -} - -// Check varargs and va_copy work. -static void -test_varargs(const char *format, ...) -{ - va_list args; - va_start(args, format); - va_list args_copy; - va_copy(args_copy, args); - - const char *str; - int number; - float fnumber; - - while (*format) - { - switch (*format++) - { - case 's': // string - str = va_arg(args_copy, const char *); - break; - case 'd': // int - number = va_arg(args_copy, int); - break; - case 'f': // float - fnumber = (float) va_arg(args_copy, double); - break; - default: - break; - } - } - va_end(args_copy); - va_end(args); -} -]], -[[ - // Check bool and long long datatypes. - _Bool success = false; - long long int bignum = -1234567890LL; - unsigned long long int ubignum = 1234567890uLL; - - // Check restrict. - if (test_restrict("String literal") != 0) - success = true; - char *restrict newvar = "Another string"; - - // Check varargs. - test_varargs("s, d' f .", "string", 65, 34.234); - - // Check incomplete arrays work. - struct incomplete_array *ia = - malloc(sizeof(struct incomplete_array) + (sizeof(double) * 10)); - ia->datasize = 10; - for (int i = 0; i < ia->datasize; ++i) - ia->data[i] = (double) i * 1.234; - - // Check named initialisers. - struct named_init ni = { - .number = 34, - .name = L"Test wide string", - .average = 543.34343, - }; - - ni.number = 58; - - int dynamic_array[ni.number]; - dynamic_array[43] = 543; -]], -dnl Try -dnl GCC -std=gnu99 (unused restrictive modes: -std=c99 -std=iso9899:1999) -dnl AIX -qlanglvl=extc99 (unused restrictive mode: -qlanglvl=stdc99) -dnl Intel ICC -c99 -dnl IRIX -c99 -dnl Solaris (unused because it causes the compiler to assume C99 semantics for -dnl library functions, and this is invalid before Solaris 10: -xc99) -dnl Tru64 -c99 -dnl with extended modes being tried first. -[[-std=gnu99 -c99 -qlanglvl=extc99]], [$1], [$2])[]dnl -])# _AC_PROG_CC_C99 - - -# AC_PROG_CC_C89 -# -------------- -AC_DEFUN([AC_PROG_CC_C89], -[ _AC_PROG_CC_C89 -]) - - -# AC_PROG_CC_C99 -# -------------- -AC_DEFUN([AC_PROG_CC_C99], -[ _AC_PROG_CC_C99 -]) - - -# _AC_PROG_CC_STDC -# ---------------- -AC_DEFUN([_AC_PROG_CC_STDC], -[ _AC_PROG_CC_C99([ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99], - [_AC_PROG_CC_C89([ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89], [no])])dnl - AC_MSG_CHECKING([for $CC option to accept ISO Standard C]) - AC_CACHE_VAL([ac_cv_prog_cc_stdc], []) - case "x$ac_cv_prog_cc_stdc" in - xno) - AC_MSG_RESULT([unsupported]) - ;; - *) - if test "x$ac_cv_prog_cc_stdc" = x; then - AC_MSG_RESULT([none needed]) - else - AC_MSG_RESULT([$ac_cv_prog_cc_stdc]) - fi - ;; - esac -]) diff --git a/m4/calloc.m4 b/m4/calloc.m4 deleted file mode 100644 index c1091718e..000000000 --- a/m4/calloc.m4 +++ /dev/null @@ -1,43 +0,0 @@ -# calloc.m4 serial 6 - -# Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc. -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# Written by Jim Meyering. - -# Determine whether calloc (N, S) returns non-NULL when N*S is zero, -# and returns NULL when N*S overflows. -# If so, define HAVE_CALLOC. Otherwise, define calloc to rpl_calloc -# and arrange to use a calloc wrapper function that does work in that case. - -# _AC_FUNC_CALLOC_IF(IF-WORKS, IF-NOT) -# ------------------------------------- -# If `calloc (0, 0)' is properly handled, run IF-WORKS, otherwise, IF-NOT. -AC_DEFUN([_AC_FUNC_CALLOC_IF], -[AC_REQUIRE([AC_TYPE_SIZE_T])dnl -AC_CACHE_CHECK([for GNU libc compatible calloc], ac_cv_func_calloc_0_nonnull, -[AC_RUN_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT], - [exit (!calloc (0, 0) || calloc ((size_t) -1 / 8 + 1, 8));])], - [ac_cv_func_calloc_0_nonnull=yes], - [ac_cv_func_calloc_0_nonnull=no], - [ac_cv_func_calloc_0_nonnull=no])]) -AS_IF([test $ac_cv_func_calloc_0_nonnull = yes], [$1], [$2]) -])# AC_FUNC_CALLOC - - -# AC_FUNC_CALLOC -# --------------- -# Report whether `calloc (0, 0)' is properly handled, and replace calloc if -# needed. -AC_DEFUN([AC_FUNC_CALLOC], -[_AC_FUNC_CALLOC_IF( - [AC_DEFINE([HAVE_CALLOC], 1, - [Define to 1 if your system has a GNU libc compatible `calloc' - function, and to 0 otherwise.])], - [AC_DEFINE([HAVE_CALLOC], 0) - AC_LIBOBJ([calloc]) - AC_DEFINE([calloc], [rpl_calloc], - [Define to rpl_calloc if the replacement function should be used.])]) -])# AC_FUNC_CALLOC diff --git a/m4/canon-host.m4 b/m4/canon-host.m4 deleted file mode 100644 index b41610471..000000000 --- a/m4/canon-host.m4 +++ /dev/null @@ -1,16 +0,0 @@ -# canon-host.m4 serial 7 -dnl Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_CANON_HOST], -[ - AC_LIBSOURCES([canon-host.c, canon-host.h]) - AC_LIBOBJ([canon-host]) - gl_PREREQ_CANON_HOST -]) - -AC_DEFUN([gl_PREREQ_CANON_HOST], [ - AC_REQUIRE([gl_GETADDRINFO]) -]) diff --git a/m4/canonicalize.m4 b/m4/canonicalize.m4 deleted file mode 100644 index 0ed92e1f1..000000000 --- a/m4/canonicalize.m4 +++ /dev/null @@ -1,17 +0,0 @@ -#serial 9 - -# Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# Written by Jim Meyering. - -AC_DEFUN([AC_FUNC_CANONICALIZE_FILE_NAME], - [ - AC_LIBSOURCES([canonicalize.c, canonicalize.h]) - AC_LIBOBJ([canonicalize]) - - AC_CHECK_HEADERS(sys/param.h) - AC_CHECK_FUNCS(resolvepath canonicalize_file_name) - ]) diff --git a/m4/chdir-long.m4 b/m4/chdir-long.m4 deleted file mode 100644 index 170434924..000000000 --- a/m4/chdir-long.m4 +++ /dev/null @@ -1,42 +0,0 @@ -#serial 7 - -# Use Gnulib's robust chdir function. -# It can handle arbitrarily long directory names, which means -# that when it is given the name of an existing directory, it -# never fails with ENAMETOOLONG. -# Arrange to compile chdir-long.c only on systems that define PATH_MAX. - -dnl Copyright (C) 2004, 2005 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -# Written by Jim Meyering. - -AC_DEFUN([gl_FUNC_CHDIR_LONG], -[ - AC_LIBSOURCES([chdir-long.c, chdir-long.h]) - AC_CACHE_CHECK([whether this system has an arbitrary file name length limit], - gl_have_arbitrary_file_name_length_limit, - [AC_EGREP_CPP([have_arbitrary_file_name_length_limit], - [#include <unistd.h> -#include <limits.h> -#if defined PATH_MAX || defined MAXPATHLEN -have_arbitrary_file_name_length_limit -#endif], - gl_have_arbitrary_file_name_length_limit=yes, - gl_have_arbitrary_file_name_length_limit=no)]) - - if test $gl_have_arbitrary_file_name_length_limit = yes; then - AC_LIBOBJ([chdir-long]) - gl_PREREQ_CHDIR_LONG - fi -]) - -AC_DEFUN([gl_PREREQ_CHDIR_LONG], -[ - AM_STDBOOL_H - gl_FUNC_MEMPCPY - gl_FUNC_OPENAT - gl_FUNC_MEMRCHR -]) diff --git a/m4/chdir-safer.m4 b/m4/chdir-safer.m4 deleted file mode 100644 index b3c351c78..000000000 --- a/m4/chdir-safer.m4 +++ /dev/null @@ -1,11 +0,0 @@ -#serial 2 -dnl Copyright (C) 2005, 2006 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_CHDIR_SAFER], -[ - AC_LIBSOURCES([chdir-safer.c, chdir-safer.h, same-inode.h]) - AC_LIBOBJ([chdir-safer]) -]) diff --git a/m4/chown.m4 b/m4/chown.m4 deleted file mode 100644 index d1a7147e5..000000000 --- a/m4/chown.m4 +++ /dev/null @@ -1,83 +0,0 @@ -#serial 16 -# Determine whether we need the chown wrapper. - -dnl Copyright (C) 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005 Free -dnl Software Foundation, Inc. - -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -# chown should accept arguments of -1 for uid and gid, and it should -# dereference symlinks. If it doesn't, arrange to use the replacement -# function. - -# From Jim Meyering. - -AC_DEFUN([gl_FUNC_CHOWN], -[ - AC_REQUIRE([AC_TYPE_UID_T]) - AC_REQUIRE([AC_FUNC_CHOWN]) - AC_REQUIRE([gl_FUNC_CHOWN_FOLLOWS_SYMLINK]) - - if test $ac_cv_func_chown_works = no; then - AC_DEFINE(CHOWN_FAILS_TO_HONOR_ID_OF_NEGATIVE_ONE, 1, - [Define if chown is not POSIX compliant regarding IDs of -1.]) - fi - - # If chown has either of the above problems, then we need the wrapper. - if test $ac_cv_func_chown_works$gl_cv_func_chown_follows_symlink = yesyes; then - : # no wrapper needed - else - AC_LIBOBJ(chown) - AC_DEFINE(chown, rpl_chown, - [Define to rpl_chown if the replacement function should be used.]) - gl_PREREQ_CHOWN - fi -]) - -# Determine whether chown follows symlinks (it should). -AC_DEFUN([gl_FUNC_CHOWN_FOLLOWS_SYMLINK], -[ - AC_CACHE_CHECK( - [whether chown(2) dereferences symlinks], - gl_cv_func_chown_follows_symlink, - [ - AC_RUN_IFELSE([AC_LANG_SOURCE([[ -#include <unistd.h> -#include <stdlib.h> -#include <errno.h> - - int - main () - { - char const *dangling_symlink = "conftest.dangle"; - - unlink (dangling_symlink); - if (symlink ("conftest.no-such", dangling_symlink)) - abort (); - - /* Exit successfully on a conforming system, - i.e., where chown must fail with ENOENT. */ - exit ( ! (chown (dangling_symlink, getuid (), getgid ()) != 0 - && errno == ENOENT)); - } - ]])], - [gl_cv_func_chown_follows_symlink=yes], - [gl_cv_func_chown_follows_symlink=no], - [gl_cv_func_chown_follows_symlink=yes] - ) - ] - ) - - if test $gl_cv_func_chown_follows_symlink = no; then - AC_DEFINE(CHOWN_MODIFIES_SYMLINK, 1, - [Define if chown modifies symlinks.]) - fi -]) - -# Prerequisites of lib/chown.c. -AC_DEFUN([gl_PREREQ_CHOWN], -[ - AC_CHECK_FUNC([fchown], , [AC_LIBOBJ(fchown-stub)]) -]) diff --git a/m4/clock_time.m4 b/m4/clock_time.m4 deleted file mode 100644 index 63196ae27..000000000 --- a/m4/clock_time.m4 +++ /dev/null @@ -1,26 +0,0 @@ -# clock_time.m4 serial 7 -dnl Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -# Check for clock_gettime and clock_settime, and sets LIB_CLOCK_GETTIME. -AC_DEFUN([gl_CLOCK_TIME], -[ - dnl Persuade glibc and Solaris <time.h> to declare these functions. - AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) - - # Solaris 2.5.1 needs -lposix4 to get the clock_gettime function. - # Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4. - - # Save and restore LIBS so e.g., -lrt, isn't added to it. Otherwise, *all* - # programs in the package would end up linked with that potentially-shared - # library, inducing unnecessary run-time overhead. - gl_saved_libs=$LIBS - AC_SEARCH_LIBS(clock_gettime, [rt posix4], - [test "$ac_cv_search_clock_gettime" = "none required" || - LIB_CLOCK_GETTIME=$ac_cv_search_clock_gettime]) - AC_SUBST(LIB_CLOCK_GETTIME) - AC_CHECK_FUNCS(clock_gettime clock_settime) - LIBS=$gl_saved_libs -]) diff --git a/m4/cloexec.m4 b/m4/cloexec.m4 deleted file mode 100644 index 7e0f801e9..000000000 --- a/m4/cloexec.m4 +++ /dev/null @@ -1,11 +0,0 @@ -#serial 5 -dnl Copyright (C) 2004, 2005 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_CLOEXEC], -[ - AC_LIBSOURCES([cloexec.c, cloexec.h]) - AC_LIBOBJ([cloexec]) -]) diff --git a/m4/close-stream.m4 b/m4/close-stream.m4 deleted file mode 100644 index 93f4d9a91..000000000 --- a/m4/close-stream.m4 +++ /dev/null @@ -1,13 +0,0 @@ -dnl Copyright (C) 2006 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_CLOSE_STREAM], -[ - AC_LIBSOURCES([close-stream.c, close-stream.h]) - AC_LIBOBJ([close-stream]) - - dnl Prerequisites of lib/close-stream.c. - : -]) diff --git a/m4/closeout.m4 b/m4/closeout.m4 deleted file mode 100644 index 8d3ead35f..000000000 --- a/m4/closeout.m4 +++ /dev/null @@ -1,14 +0,0 @@ -# closeout.m4 serial 4 -dnl Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_CLOSEOUT], -[ - AC_LIBSOURCES([closeout.c, closeout.h]) - AC_LIBOBJ([closeout]) - - dnl Prerequisites of lib/closeout.c. - : -]) diff --git a/m4/codeset.m4 b/m4/codeset.m4 deleted file mode 100644 index a6e67ec49..000000000 --- a/m4/codeset.m4 +++ /dev/null @@ -1,21 +0,0 @@ -# codeset.m4 serial AM1 (gettext-0.10.40) -dnl Copyright (C) 2000-2002 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Bruno Haible. - -AC_DEFUN([AM_LANGINFO_CODESET], -[ - 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 -]) diff --git a/m4/cycle-check.m4 b/m4/cycle-check.m4 deleted file mode 100644 index 613b0a931..000000000 --- a/m4/cycle-check.m4 +++ /dev/null @@ -1,16 +0,0 @@ -#serial 3 -dnl Copyright (C) 2005, 2006 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_CYCLE_CHECK], -[ - AC_LIBSOURCES([cycle-check.c, cycle-check.h]) - AC_LIBOBJ([cycle-check]) - - dnl Prerequisites. - AC_REQUIRE([gl_AC_TYPE_UINTMAX_T]) - AC_REQUIRE([gl_STRUCT_DEV_INO]) - AC_REQUIRE([gl_SAME_INODE]) -]) diff --git a/m4/d-ino.m4 b/m4/d-ino.m4 deleted file mode 100644 index d87b4dbe0..000000000 --- a/m4/d-ino.m4 +++ /dev/null @@ -1,35 +0,0 @@ -#serial 8 - -dnl From Jim Meyering. -dnl -dnl Check whether struct dirent has a member named d_ino. -dnl - -# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2006 Free Software -# Foundation, Inc. - -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_CHECK_TYPE_STRUCT_DIRENT_D_INO], - [AC_CACHE_CHECK([for d_ino member in directory struct], - jm_cv_struct_dirent_d_ino, - [AC_TRY_LINK(dnl - [ -#include <sys/types.h> -#include <dirent.h> - ], - [struct dirent dp; dp.d_ino = 0;], - - jm_cv_struct_dirent_d_ino=yes, - jm_cv_struct_dirent_d_ino=no) - ] - ) - if test $jm_cv_struct_dirent_d_ino = yes; then - AC_DEFINE(D_INO_IN_DIRENT, 1, - [Define if there is a member named d_ino in the struct describing - directory headers.]) - fi - ] -) diff --git a/m4/d-type.m4 b/m4/d-type.m4 deleted file mode 100644 index 7675dd2b0..000000000 --- a/m4/d-type.m4 +++ /dev/null @@ -1,35 +0,0 @@ -#serial 9 - -dnl From Jim Meyering. -dnl -dnl Check whether struct dirent has a member named d_type. -dnl - -# Copyright (C) 1997, 1999, 2000, 2001, 2002, 2003, 2004, 2006 Free Software -# Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_CHECK_TYPE_STRUCT_DIRENT_D_TYPE], - [AC_CACHE_CHECK([for d_type member in directory struct], - jm_cv_struct_dirent_d_type, - [AC_TRY_LINK(dnl - [ -#include <sys/types.h> -#include <dirent.h> - ], - [struct dirent dp; dp.d_type = 0;], - - jm_cv_struct_dirent_d_type=yes, - jm_cv_struct_dirent_d_type=no) - ] - ) - if test $jm_cv_struct_dirent_d_type = yes; then - AC_DEFINE(HAVE_STRUCT_DIRENT_D_TYPE, 1, - [Define if there is a member named d_type in the struct describing - directory headers.]) - fi - ] -) diff --git a/m4/dev-ino.m4 b/m4/dev-ino.m4 deleted file mode 100644 index 7b51d9867..000000000 --- a/m4/dev-ino.m4 +++ /dev/null @@ -1,10 +0,0 @@ -#serial 1 -dnl Copyright (C) 2006 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_STRUCT_DEV_INO], -[ - AC_LIBSOURCES([dev-ino.h]) -]) diff --git a/m4/diacrit.m4 b/m4/diacrit.m4 deleted file mode 100644 index 90618b878..000000000 --- a/m4/diacrit.m4 +++ /dev/null @@ -1,14 +0,0 @@ -#serial 1 -dnl Copyright (C) 2005 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_DIACRIT], -[ - AC_LIBSOURCES([diacrit.c, diacrit.h]) - AC_LIBOBJ([diacrit]) - - dnl Prerequisites. - : -]) diff --git a/m4/dirfd.m4 b/m4/dirfd.m4 deleted file mode 100644 index c377b87a3..000000000 --- a/m4/dirfd.m4 +++ /dev/null @@ -1,76 +0,0 @@ -#serial 13 -*- Autoconf -*- - -dnl Find out how to get the file descriptor associated with an open DIR*. - -# Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 Free Software -# Foundation, Inc. -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -dnl From Jim Meyering - -AC_DEFUN([gl_FUNC_DIRFD], -[ - AC_LIBSOURCES([dirfd.c, dirfd.h]) - - dnl Work around a bug of AC_EGREP_CPP in autoconf-2.57. - AC_REQUIRE([AC_PROG_CPP]) - AC_REQUIRE([AC_PROG_EGREP]) - AC_CHECK_FUNCS(dirfd) - AC_CHECK_DECLS([dirfd], , , - [#include <sys/types.h> - #include <dirent.h>]) - - AC_CACHE_CHECK([whether dirfd is a macro], - gl_cv_func_dirfd_macro, - [AC_EGREP_CPP([dirent_header_defines_dirfd], [ -#include <sys/types.h> -#include <dirent.h> -#ifdef dirfd - dirent_header_defines_dirfd -#endif], - gl_cv_func_dirfd_macro=yes, - gl_cv_func_dirfd_macro=no)]) - - # Use the replacement only if we have no function, macro, - # or declaration with that name. - if test $ac_cv_func_dirfd,$ac_cv_have_decl_dirfd,$gl_cv_func_dirfd_macro \ - = no,no,no; then - AC_REPLACE_FUNCS([dirfd]) - AC_CACHE_CHECK( - [how to get the file descriptor associated with an open DIR*], - gl_cv_sys_dir_fd_member_name, - [ - dirfd_save_CFLAGS=$CFLAGS - for ac_expr in d_fd dd_fd; do - - CFLAGS="$CFLAGS -DDIR_FD_MEMBER_NAME=$ac_expr" - AC_TRY_COMPILE( - [#include <sys/types.h> - #include <dirent.h>], - [DIR *dir_p = opendir("."); (void) dir_p->DIR_FD_MEMBER_NAME;], - dir_fd_found=yes - ) - CFLAGS=$dirfd_save_CFLAGS - test "$dir_fd_found" = yes && break - done - test "$dir_fd_found" = yes || ac_expr=no_such_member - - gl_cv_sys_dir_fd_member_name=$ac_expr - ] - ) - if test $gl_cv_sys_dir_fd_member_name != no_such_member; then - AC_DEFINE_UNQUOTED(DIR_FD_MEMBER_NAME, - $gl_cv_sys_dir_fd_member_name, - [the name of the file descriptor member of DIR]) - fi - AH_VERBATIM(DIR_TO_FD, - [#ifdef DIR_FD_MEMBER_NAME -# define DIR_TO_FD(Dir_p) ((Dir_p)->DIR_FD_MEMBER_NAME) -#else -# define DIR_TO_FD(Dir_p) -1 -#endif -]) - fi -]) diff --git a/m4/dirname.m4 b/m4/dirname.m4 deleted file mode 100644 index f3412ad08..000000000 --- a/m4/dirname.m4 +++ /dev/null @@ -1,17 +0,0 @@ -#serial 6 -*- autoconf -*- -dnl Copyright (C) 2002-2006 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_DIRNAME], -[ - AC_LIBSOURCES([dirname.c, dirname.h]) - AC_LIBOBJ([dirname]) - - dnl Prerequisites of lib/dirname.h. - AC_REQUIRE([gl_AC_DOS]) - AC_REQUIRE([gl_DOUBLE_SLASH_ROOT]) - - dnl No prerequisites of lib/basename.c, lib/dirname.c, lib/stripslash.c. -]) diff --git a/m4/dos.m4 b/m4/dos.m4 deleted file mode 100644 index dd59571c0..000000000 --- a/m4/dos.m4 +++ /dev/null @@ -1,71 +0,0 @@ -#serial 10 -*- autoconf -*- - -# Define some macros required for proper operation of code in lib/*.c -# on MSDOS/Windows systems. - -# Copyright (C) 2000, 2001, 2004, 2005, 2006 Free Software Foundation, Inc. -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# From Jim Meyering. - -AC_DEFUN([gl_AC_DOS], - [ - AC_CACHE_CHECK([whether system is Windows or MSDOS], [ac_cv_win_or_dos], - [ - AC_TRY_COMPILE([], - [#if !defined _WIN32 && !defined __WIN32__ && !defined __MSDOS__ && !defined __CYGWIN__ -neither MSDOS nor Windows -#endif], - [ac_cv_win_or_dos=yes], - [ac_cv_win_or_dos=no]) - ]) - - if test x"$ac_cv_win_or_dos" = xyes; then - ac_fs_accepts_drive_letter_prefix=1 - ac_fs_backslash_is_file_name_separator=1 - AC_CACHE_CHECK([whether drive letter can start relative path], - [ac_cv_drive_letter_can_be_relative], - [ - AC_TRY_COMPILE([], - [#if defined __CYGWIN__ -drive letters are always absolute -#endif], - [ac_cv_drive_letter_can_be_relative=yes], - [ac_cv_drive_letter_can_be_relative=no]) - ]) - if test x"$ac_cv_drive_letter_can_be_relative" = xyes; then - ac_fs_drive_letter_can_be_relative=1 - else - ac_fs_drive_letter_can_be_relative=0 - fi - else - ac_fs_accepts_drive_letter_prefix=0 - ac_fs_backslash_is_file_name_separator=0 - ac_fs_drive_letter_can_be_relative=0 - fi - - AC_DEFINE_UNQUOTED([FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX], - $ac_fs_accepts_drive_letter_prefix, - [Define on systems for which file names may have a so-called - `drive letter' prefix, define this to compute the length of that - prefix, including the colon.]) - - AH_VERBATIM(ISSLASH, - [#if FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR -# define ISSLASH(C) ((C) == '/' || (C) == '\\') -#else -# define ISSLASH(C) ((C) == '/') -#endif]) - - AC_DEFINE_UNQUOTED([FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR], - $ac_fs_backslash_is_file_name_separator, - [Define if the backslash character may also serve as a file name - component separator.]) - - AC_DEFINE_UNQUOTED([FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE], - $ac_fs_drive_letter_can_be_relative, - [Define if a drive letter prefix denotes a relative path if it is - not followed by a file name component separator.]) - ]) diff --git a/m4/double-slash-root.m4 b/m4/double-slash-root.m4 deleted file mode 100644 index f8cbd54f3..000000000 --- a/m4/double-slash-root.m4 +++ /dev/null @@ -1,43 +0,0 @@ -#serial 1 -*- autoconf -*- -dnl Copyright (C) 2006 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_DOUBLE_SLASH_ROOT], -[ - AC_REQUIRE([AC_CANONICAL_HOST]) - AC_CACHE_CHECK([whether // is distinct from /], [ac_cv_double_slash_root], - [ if test x"$cross_compiling" = xyes ; then - # When cross-compiling, there is no way to tell whether // is special - # short of a list of hosts. However, the only known hosts to date - # that have a distinct // are Apollo DomainOS (too old to port to) - # and Cygwin. If anyone knows of another system for which // has - # special semantics and is distinct from /, please report it to - # <bug-coreutils@gnu.org>. - case $host in - *-cygwin) - ac_cv_double_slash_root=yes ;; - *) - # Be optimistic and assume that / and // are the same when we - # don't know. - ac_cv_double_slash_root='unknown, assuming no' ;; - esac - else - set x `ls -di / //` - if test $[2] = $[4]; then - ac_cv_double_slash_root=no - else - ac_cv_double_slash_root=yes - fi - fi]) - if test x"$ac_cv_double_slash_root" = xyes; then - ac_double_slash_root=1 - else - ac_double_slash_root=0 - fi - - AC_DEFINE_UNQUOTED([DOUBLE_SLASH_IS_DISTINCT_ROOT], - $ac_double_slash_root, - [Define to 1 if // is a file system root distinct from /.]) -]) diff --git a/m4/dup2.m4 b/m4/dup2.m4 deleted file mode 100644 index bf8524e14..000000000 --- a/m4/dup2.m4 +++ /dev/null @@ -1,10 +0,0 @@ -#serial 4 -dnl Copyright (C) 2002, 2005 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_FUNC_DUP2], -[ - AC_REPLACE_FUNCS(dup2) -]) diff --git a/m4/eealloc.m4 b/m4/eealloc.m4 deleted file mode 100644 index adcfd06c9..000000000 --- a/m4/eealloc.m4 +++ /dev/null @@ -1,32 +0,0 @@ -# eealloc.m4 serial 1 -dnl Copyright (C) 2003 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_EEALLOC], -[ - AC_REQUIRE([gl_EEMALLOC]) - AC_REQUIRE([gl_EEREALLOC]) - AC_REQUIRE([AC_C_INLINE]) -]) - -AC_DEFUN([gl_EEMALLOC], -[ - _AC_FUNC_MALLOC_IF( - [gl_cv_func_malloc_0_nonnull=1], - [gl_cv_func_malloc_0_nonnull=0]) - AC_DEFINE_UNQUOTED([MALLOC_0_IS_NONNULL], $gl_cv_func_malloc_0_nonnull, - [If malloc(0) is != NULL, define this to 1. Otherwise define this - to 0.]) -]) - -AC_DEFUN([gl_EEREALLOC], -[ - _AC_FUNC_REALLOC_IF( - [gl_cv_func_realloc_0_nonnull=1], - [gl_cv_func_realloc_0_nonnull=0]) - AC_DEFINE_UNQUOTED([REALLOC_0_IS_NONNULL], $gl_cv_func_realloc_0_nonnull, - [If realloc(NULL,0) is != NULL, define this to 1. Otherwise define this - to 0.]) -]) diff --git a/m4/eoverflow.m4 b/m4/eoverflow.m4 deleted file mode 100644 index 8c28ca305..000000000 --- a/m4/eoverflow.m4 +++ /dev/null @@ -1,64 +0,0 @@ -# eoverflow.m4 serial 1 -dnl Copyright (C) 2004 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Bruno Haible. - -# The EOVERFLOW errno value ought to be defined in <errno.h>, according to -# POSIX. But some systems (like AIX 3) don't define it, and some systems -# (like OSF/1) define it when _XOPEN_SOURCE_EXTENDED is defined. - -# Define EOVERFLOW as a C macro and as a substituted macro in such a way that -# 1. on all systems, after inclusion of <errno.h>, EOVERFLOW is usable, -# 2. on systems where EOVERFLOW is defined elsewhere, we use the same numeric -# value. - -AC_DEFUN([gl_EOVERFLOW], -[ - AC_REQUIRE([AC_PROG_CC])dnl - - AC_CACHE_CHECK([for EOVERFLOW], ac_cv_decl_EOVERFLOW, [ - AC_EGREP_CPP(yes,[ -#include <errno.h> -#ifdef EOVERFLOW -yes -#endif - ], have_eoverflow=1) - if test -n "$have_eoverflow"; then - dnl EOVERFLOW exists in <errno.h>. Don't need to define EOVERFLOW ourselves. - ac_cv_decl_EOVERFLOW=yes - else - AC_EGREP_CPP(yes,[ -#define _XOPEN_SOURCE_EXTENDED 1 -#include <errno.h> -#ifdef EOVERFLOW -yes -#endif - ], have_eoverflow=1) - if test -n "$have_eoverflow"; then - dnl EOVERFLOW exists but is hidden. - dnl Define it to the same value. - _AC_COMPUTE_INT([EOVERFLOW], ac_cv_decl_EOVERFLOW, [ -#define _XOPEN_SOURCE_EXTENDED 1 -#include <errno.h> -/* The following two lines are a workaround against an autoconf-2.52 bug. */ -#include <stdio.h> -#include <stdlib.h> -]) - else - dnl EOVERFLOW isn't defined by the system. Define EOVERFLOW ourselves, but - dnl don't define it as EINVAL, because snprintf() callers want to - dnl distinguish EINVAL and EOVERFLOW. - ac_cv_decl_EOVERFLOW=E2BIG - fi - fi - ]) - if test "$ac_cv_decl_EOVERFLOW" != yes; then - AC_DEFINE_UNQUOTED([EOVERFLOW], [$ac_cv_decl_EOVERFLOW], - [Define as good substitute value for EOVERFLOW.]) - EOVERFLOW="$ac_cv_decl_EOVERFLOW" - AC_SUBST(EOVERFLOW) - fi -]) diff --git a/m4/error.m4 b/m4/error.m4 deleted file mode 100644 index 7c7746e2c..000000000 --- a/m4/error.m4 +++ /dev/null @@ -1,22 +0,0 @@ -#serial 11 - -# Copyright (C) 1996, 1997, 1998, 2001, 2002, 2003, 2004 Free Software -# Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_ERROR], -[ - AC_FUNC_ERROR_AT_LINE - dnl Note: AC_FUNC_ERROR_AT_LINE does AC_LIBSOURCES([error.h, error.c]). - gl_PREREQ_ERROR -]) - -# Prerequisites of lib/error.c. -AC_DEFUN([gl_PREREQ_ERROR], -[ - AC_REQUIRE([AC_FUNC_STRERROR_R]) - : -]) diff --git a/m4/euidaccess.m4 b/m4/euidaccess.m4 deleted file mode 100644 index e0a6e60b2..000000000 --- a/m4/euidaccess.m4 +++ /dev/null @@ -1,47 +0,0 @@ -# euidaccess.m4 serial 6 -dnl Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_FUNC_NONREENTRANT_EUIDACCESS], -[ - AC_REQUIRE([gl_FUNC_EUIDACCESS]) - AC_DEFINE([PREFER_NONREENTRANT_EUIDACCESS], 1, - [Define this if you prefer euidaccess to return the correct result - even if this would make it nonreentrant. Define this only if your - entire application is safe even if the uid or gid might temporarily - change. If your application uses signal handlers or threads it - is probably not safe.]) -]) - -AC_DEFUN([gl_FUNC_EUIDACCESS], -[ - dnl Persuade glibc <unistd.h> to declare euidaccess(). - AC_REQUIRE([AC_GNU_SOURCE]) - - AC_CHECK_DECLS_ONCE([euidaccess]) - AC_REPLACE_FUNCS(euidaccess) - if test $ac_cv_func_euidaccess = no; then - gl_PREREQ_EUIDACCESS - fi -]) - -# Prerequisites of lib/euidaccess.c. -AC_DEFUN([gl_PREREQ_EUIDACCESS], [ - AC_CHECK_HEADERS_ONCE(libgen.h) - AC_CHECK_DECLS_ONCE(setregid) - AC_REQUIRE([AC_FUNC_GETGROUPS]) - - # Solaris 9 needs -lgen to get the eaccess function. - # Save and restore LIBS so -lgen isn't added to it. Otherwise, *all* - # programs in the package would end up linked with that potentially-shared - # library, inducing unnecessary run-time overhead. - gl_saved_libs=$LIBS - AC_SEARCH_LIBS(eaccess, [gen], - [test "$ac_cv_search_eaccess" = "none required" || - LIB_EACCESS=$ac_cv_search_eaccess]) - AC_SUBST(LIB_EACCESS) - AC_CHECK_FUNCS(eaccess) - LIBS=$gl_saved_libs -]) diff --git a/m4/exclude.m4 b/m4/exclude.m4 deleted file mode 100644 index 87acf841f..000000000 --- a/m4/exclude.m4 +++ /dev/null @@ -1,11 +0,0 @@ -# exclude.m4 serial 6 -dnl Copyright (C) 2002, 2003, 2005, 2006 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_EXCLUDE], -[ - AC_LIBSOURCES([exclude.c, exclude.h]) - AC_LIBOBJ([exclude]) -]) diff --git a/m4/exitfail.m4 b/m4/exitfail.m4 deleted file mode 100644 index 5523676f1..000000000 --- a/m4/exitfail.m4 +++ /dev/null @@ -1,14 +0,0 @@ -# exitfail.m4 serial 5 -dnl Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_EXITFAIL], -[ - AC_LIBSOURCES([exitfail.c, exitfail.h]) - AC_LIBOBJ([exitfail]) - - dnl No prerequisites of lib/exitfail.c. - : -]) diff --git a/m4/extensions.m4 b/m4/extensions.m4 deleted file mode 100644 index 497607918..000000000 --- a/m4/extensions.m4 +++ /dev/null @@ -1,42 +0,0 @@ -# Enable extensions on systems that normally disable them. - -# Copyright (C) 2003, 2006 Free Software Foundation, Inc. -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This file is only needed in autoconf <= 2.59. Newer versions of autoconf -# have a macro AC_USE_SYSTEM_EXTENSIONS with identical semantics. - -# gl_USE_SYSTEM_EXTENSIONS -# ------------------------ -# Enable extensions on systems that normally disable them, -# typically due to standards-conformance issues. -AC_DEFUN([gl_USE_SYSTEM_EXTENSIONS], [ - AC_BEFORE([$0], [AC_COMPILE_IFELSE]) - AC_BEFORE([$0], [AC_RUN_IFELSE]) - - AC_REQUIRE([AC_GNU_SOURCE]) - AC_REQUIRE([AC_AIX]) - AC_REQUIRE([AC_MINIX]) - - AH_VERBATIM([__EXTENSIONS__], -[/* Enable extensions on Solaris. */ -#ifndef __EXTENSIONS__ -# undef __EXTENSIONS__ -#endif -#ifndef _POSIX_PTHREAD_SEMANTICS -# undef _POSIX_PTHREAD_SEMANTICS -#endif]) - AC_CACHE_CHECK([whether it is safe to define __EXTENSIONS__], - [ac_cv_safe_to_define___extensions__], - [AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM([ - #define __EXTENSIONS__ 1 - AC_INCLUDES_DEFAULT])], - [ac_cv_safe_to_define___extensions__=yes], - [ac_cv_safe_to_define___extensions__=no])]) - test $ac_cv_safe_to_define___extensions__ = yes && - AC_DEFINE([__EXTENSIONS__]) - AC_DEFINE([_POSIX_PTHREAD_SEMANTICS]) -]) diff --git a/m4/fcntl-safer.m4 b/m4/fcntl-safer.m4 deleted file mode 100644 index be210f9a0..000000000 --- a/m4/fcntl-safer.m4 +++ /dev/null @@ -1,12 +0,0 @@ -#serial 2 -dnl Copyright (C) 2005 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_FCNTL_SAFER], -[ - AC_LIBSOURCES([creat-safer.c, fcntl-safer.h, open-safer.c, fcntl--.h]) - AC_LIBOBJ([open-safer]) - AC_LIBOBJ([creat-safer]) -]) diff --git a/m4/file-type.m4 b/m4/file-type.m4 deleted file mode 100644 index 7d1830965..000000000 --- a/m4/file-type.m4 +++ /dev/null @@ -1,11 +0,0 @@ -# file-type.m4 serial 5 -dnl Copyright (C) 2002, 2005 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_FILE_TYPE], -[ - AC_LIBSOURCES([file-type.c, file-type.h]) - AC_LIBOBJ([file-type]) -]) diff --git a/m4/fileblocks.m4 b/m4/fileblocks.m4 deleted file mode 100644 index 5fb631112..000000000 --- a/m4/fileblocks.m4 +++ /dev/null @@ -1,20 +0,0 @@ -# fileblocks.m4 serial 4 -dnl Copyright (C) 2002, 2005, 2006 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_FILEBLOCKS], -[ - AC_STRUCT_ST_BLOCKS - dnl Note: AC_STRUCT_ST_BLOCKS does AC_LIBOBJ(fileblocks). - if test $ac_cv_member_struct_stat_st_blocks = no; then - gl_PREREQ_FILEBLOCKS - fi -]) - -# Prerequisites of lib/fileblocks.c. -AC_DEFUN([gl_PREREQ_FILEBLOCKS], [ - AC_CHECK_HEADERS_ONCE(sys/param.h) - : -]) diff --git a/m4/filemode.m4 b/m4/filemode.m4 deleted file mode 100644 index 2b9334f85..000000000 --- a/m4/filemode.m4 +++ /dev/null @@ -1,12 +0,0 @@ -# filemode.m4 serial 6 -dnl Copyright (C) 2002, 2005, 2006 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_FILEMODE], -[ - AC_LIBSOURCES([filemode.c, filemode.h]) - AC_LIBOBJ([filemode]) - AC_CHECK_DECLS_ONCE([strmode]) -]) diff --git a/m4/filenamecat.m4 b/m4/filenamecat.m4 deleted file mode 100644 index c75a57d06..000000000 --- a/m4/filenamecat.m4 +++ /dev/null @@ -1,14 +0,0 @@ -# filenamecat.m4 serial 7 -dnl Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_FILE_NAME_CONCAT], -[ - AC_LIBSOURCES([filenamecat.c, filenamecat.h]) - AC_LIBOBJ([filenamecat]) - - dnl Prerequisites of lib/filenamecat.c. - AC_CHECK_FUNCS_ONCE(mempcpy) -]) diff --git a/m4/fnmatch.m4 b/m4/fnmatch.m4 deleted file mode 100644 index ce94c84a7..000000000 --- a/m4/fnmatch.m4 +++ /dev/null @@ -1,108 +0,0 @@ -# Check for fnmatch. - -# This is a modified version of autoconf's AC_FUNC_FNMATCH. -# This file should be simplified after Autoconf 2.57 is required. - -# Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software -# Foundation, Inc. -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# _AC_FUNC_FNMATCH_IF(STANDARD = GNU | POSIX, CACHE_VAR, IF-TRUE, IF-FALSE) -# ------------------------------------------------------------------------- -# If a STANDARD compliant fnmatch is found, run IF-TRUE, otherwise -# IF-FALSE. Use CACHE_VAR. -AC_DEFUN([_AC_FUNC_FNMATCH_IF], -[AC_CACHE_CHECK( - [for working $1 fnmatch], - [$2], - [dnl Some versions of Solaris, SCO, and the GNU C Library - dnl have a broken or incompatible fnmatch. - dnl So we run a test program. If we are cross-compiling, take no chance. - dnl Thanks to John Oleynick, François Pinard, and Paul Eggert for this test. - AC_RUN_IFELSE( - [AC_LANG_PROGRAM( - [ -# include <stdlib.h> -# include <fnmatch.h> -# define y(a, b, c) (fnmatch (a, b, c) == 0) -# define n(a, b, c) (fnmatch (a, b, c) == FNM_NOMATCH) - static int - fnm (char const *pattern, char const *string, int flags) - { - return fnmatch (pattern, string, flags); - } - ], - [exit - (!((fnm ? fnm : fnmatch) ("a*", "", 0) == FNM_NOMATCH - && y ("a*", "abc", 0) - && n ("d*/*1", "d/s/1", FNM_PATHNAME) - && y ("a\\\\bc", "abc", 0) - && n ("a\\\\bc", "abc", FNM_NOESCAPE) - && y ("*x", ".x", 0) - && n ("*x", ".x", FNM_PERIOD) - && m4_if([$1], [GNU], - [y ("xxXX", "xXxX", FNM_CASEFOLD) - && y ("a++(x|yy)b", "a+xyyyyxb", FNM_EXTMATCH) - && n ("d*/*1", "d/s/1", FNM_FILE_NAME) - && y ("*", "x", FNM_FILE_NAME | FNM_LEADING_DIR) - && y ("x*", "x/y/z", FNM_FILE_NAME | FNM_LEADING_DIR) - && y ("*c*", "c/x", FNM_FILE_NAME | FNM_LEADING_DIR)], - 1)));])], - [$2=yes], - [$2=no], - [$2=cross])]) -AS_IF([test $$2 = yes], [$3], [$4]) -])# _AC_FUNC_FNMATCH_IF - - -# _AC_LIBOBJ_FNMATCH -# ------------------ -# Prepare the replacement of fnmatch. -AC_DEFUN([_AC_LIBOBJ_FNMATCH], -[AC_REQUIRE([AC_FUNC_ALLOCA])dnl -AC_REQUIRE([AC_TYPE_MBSTATE_T])dnl -AC_CHECK_DECLS([isblank], [], [], [#include <ctype.h>]) -AC_CHECK_FUNCS([btowc mbsrtowcs mempcpy wmemchr wmemcpy wmempcpy]) -AC_CHECK_HEADERS([wchar.h wctype.h]) -AC_LIBOBJ([fnmatch]) -FNMATCH_H=fnmatch.h -])# _AC_LIBOBJ_FNMATCH - - -AC_DEFUN([gl_FUNC_FNMATCH_POSIX], -[ - FNMATCH_H= - _AC_FUNC_FNMATCH_IF([POSIX], [ac_cv_func_fnmatch_posix], - [rm -f lib/fnmatch.h], - [_AC_LIBOBJ_FNMATCH]) - if test $ac_cv_func_fnmatch_posix != yes; then - dnl We must choose a different name for our function, since on ELF systems - dnl a broken fnmatch() in libc.so would override our fnmatch() if it is - dnl compiled into a shared library. - AC_DEFINE([fnmatch], [posix_fnmatch], - [Define to a replacement function name for fnmatch().]) - fi - AC_SUBST([FNMATCH_H]) -]) - - -AC_DEFUN([gl_FUNC_FNMATCH_GNU], -[ - dnl Persuade glibc <fnmatch.h> to declare FNM_CASEFOLD etc. - AC_REQUIRE([AC_GNU_SOURCE]) - - FNMATCH_H= - _AC_FUNC_FNMATCH_IF([GNU], [ac_cv_func_fnmatch_gnu], - [rm -f lib/fnmatch.h], - [_AC_LIBOBJ_FNMATCH]) - if test $ac_cv_func_fnmatch_gnu != yes; then - dnl We must choose a different name for our function, since on ELF systems - dnl a broken fnmatch() in libc.so would override our fnmatch() if it is - dnl compiled into a shared library. - AC_DEFINE([fnmatch], [gnu_fnmatch], - [Define to a replacement function name for fnmatch().]) - fi - AC_SUBST([FNMATCH_H]) -]) diff --git a/m4/fpending.m4 b/m4/fpending.m4 deleted file mode 100644 index edf737800..000000000 --- a/m4/fpending.m4 +++ /dev/null @@ -1,80 +0,0 @@ -#serial 8 - -# Copyright (C) 2000, 2001, 2004, 2005, 2006 Free Software Foundation, Inc. -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -dnl From Jim Meyering -dnl Using code from emacs, based on suggestions from Paul Eggert -dnl and Ulrich Drepper. - -dnl Find out how to determine the number of pending output bytes on a stream. -dnl glibc (2.1.93 and newer) and Solaris provide __fpending. On other systems, -dnl we have to grub around in the FILE struct. - -AC_DEFUN([gl_FUNC_FPENDING], -[ - AC_LIBSOURCES([__fpending.c, __fpending.h]) - - AC_CHECK_HEADERS(stdio_ext.h) - AC_REPLACE_FUNCS([__fpending]) - fp_headers=' -# include <stdio.h> -# if HAVE_STDIO_EXT_H -# include <stdio_ext.h> -# endif -' - AC_CHECK_DECLS([__fpending], , , $fp_headers) - if test $ac_cv_func___fpending = no; then - AC_CACHE_CHECK( - [how to determine the number of pending output bytes on a stream], - ac_cv_sys_pending_output_n_bytes, - [ - for ac_expr in \ - \ - '# glibc2' \ - 'fp->_IO_write_ptr - fp->_IO_write_base' \ - \ - '# traditional Unix' \ - 'fp->_ptr - fp->_base' \ - \ - '# BSD' \ - 'fp->_p - fp->_bf._base' \ - \ - '# SCO, Unixware' \ - '(fp->__ptr ? fp->__ptr - fp->__base : 0)' \ - \ - '# old glibc?' \ - 'fp->__bufp - fp->__buffer' \ - \ - '# old glibc iostream?' \ - 'fp->_pptr - fp->_pbase' \ - \ - '# VMS' \ - '(*fp)->_ptr - (*fp)->_base' \ - \ - '# e.g., DGUX R4.11; the info is not available' \ - 1 \ - ; do - - # Skip each embedded comment. - case "$ac_expr" in '#'*) continue;; esac - - AC_TRY_COMPILE( - [#include <stdio.h> - ], - [FILE *fp = stdin; (void) ($ac_expr);], - fp_done=yes - ) - test "$fp_done" = yes && break - done - - ac_cv_sys_pending_output_n_bytes=$ac_expr - ] - ) - AC_DEFINE_UNQUOTED(PENDING_OUTPUT_N_BYTES, - $ac_cv_sys_pending_output_n_bytes, - [the number of pending output bytes on stream `fp']) - fi -]) diff --git a/m4/fprintftime.m4 b/m4/fprintftime.m4 deleted file mode 100644 index f60df3ec5..000000000 --- a/m4/fprintftime.m4 +++ /dev/null @@ -1,11 +0,0 @@ -#serial 1 -dnl Copyright (C) 2005 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_FPRINTFTIME], -[ - AC_LIBSOURCES([fprintftime.c, fprintftime.h]) - AC_LIBOBJ([fprintftime]) -]) diff --git a/m4/free.m4 b/m4/free.m4 deleted file mode 100644 index 566734b77..000000000 --- a/m4/free.m4 +++ /dev/null @@ -1,40 +0,0 @@ -# Check whether free (NULL) is supposed to work. - -# Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# Written by Paul Eggert. - -# We can't test for free (NULL) even at runtime, since it might -# happen to "work" for our test program, but not in general. So, be -# conservative and use feature tests for relatively modern hosts, -# where free (NULL) is known to work. This costs a bit of -# performance on some older hosts, but we can fix that later if -# needed. - -AC_DEFUN([gl_FUNC_FREE], -[ - AC_CACHE_CHECK([whether free (NULL) is known to work], - [gl_cv_func_free], - [AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [[@%:@include <unistd.h>]], - [[@%:@if _POSIX_VERSION < 199009L && \ - (defined unix || defined _unix || defined _unix_ \ - || defined __unix || defined __unix__) - @%:@error "'free (NULL)' is not known to work" - @%:@endif]])], - [gl_cv_func_free=yes], - [gl_cv_func_free=no])]) - - if test $gl_cv_func_free = no; then - AC_LIBOBJ(free) - AC_DEFINE(free, rpl_free, - [Define to rpl_free if the replacement function should be used.]) - fi -]) - -# Prerequisites of lib/free.c. -AC_DEFUN([gl_PREREQ_FREE], [:]) diff --git a/m4/fstypename.m4 b/m4/fstypename.m4 deleted file mode 100644 index 7ff33e20a..000000000 --- a/m4/fstypename.m4 +++ /dev/null @@ -1,37 +0,0 @@ -#serial 5 - -dnl From Jim Meyering. -dnl -dnl See if struct statfs has the f_fstypename member. -dnl If so, define HAVE_F_FSTYPENAME_IN_STATFS. -dnl - -# Copyright (C) 1998, 1999, 2001, 2004 Free Software Foundation, Inc. -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_FSTYPENAME], - [ - AC_CACHE_CHECK([for f_fstypename in struct statfs], - fu_cv_sys_f_fstypename_in_statfs, - [ - AC_TRY_COMPILE( - [ -#include <sys/param.h> -#include <sys/types.h> -#include <sys/mount.h> - ], - [struct statfs s; int i = sizeof s.f_fstypename;], - fu_cv_sys_f_fstypename_in_statfs=yes, - fu_cv_sys_f_fstypename_in_statfs=no - ) - ] - ) - - if test $fu_cv_sys_f_fstypename_in_statfs = yes; then - AC_DEFINE(HAVE_F_FSTYPENAME_IN_STATFS, 1, - [Define if struct statfs has the f_fstypename member.]) - fi - ] -) diff --git a/m4/fsusage.m4 b/m4/fsusage.m4 deleted file mode 100644 index 451bd7d1e..000000000 --- a/m4/fsusage.m4 +++ /dev/null @@ -1,265 +0,0 @@ -#serial 18 -# Obtaining file system usage information. - -# Copyright (C) 1997, 1998, 2000, 2001, 2003, 2004, 2005, 2006 Free Software -# Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# Written by Jim Meyering. - -AC_DEFUN([gl_FSUSAGE], -[ - AC_LIBSOURCES([fsusage.c, fsusage.h]) - - AC_CHECK_HEADERS_ONCE(sys/param.h) - AC_CHECK_HEADERS_ONCE(sys/vfs.h sys/fs_types.h) - AC_CHECK_HEADERS(sys/mount.h, [], [], - [AC_INCLUDES_DEFAULT - [#if HAVE_SYS_PARAM_H - #include <sys/param.h> - #endif]]) - gl_FILE_SYSTEM_USAGE([gl_cv_fs_space=yes], [gl_cv_fs_space=no]) - if test $gl_cv_fs_space = yes; then - AC_LIBOBJ(fsusage) - gl_PREREQ_FSUSAGE_EXTRA - fi -]) - -# Try to determine how a program can obtain file system usage information. -# If successful, define the appropriate symbol (see fsusage.c) and -# execute ACTION-IF-FOUND. Otherwise, execute ACTION-IF-NOT-FOUND. -# -# gl_FILE_SYSTEM_USAGE([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) - -AC_DEFUN([gl_FILE_SYSTEM_USAGE], -[ - -echo "checking how to get file system space usage..." -ac_fsusage_space=no - -# Perform only the link test since it seems there are no variants of the -# statvfs function. This check is more than just AC_CHECK_FUNCS(statvfs) -# because that got a false positive on SCO OSR5. Adding the declaration -# of a `struct statvfs' causes this test to fail (as it should) on such -# systems. That system is reported to work fine with STAT_STATFS4 which -# is what it gets when this test fails. -if test $ac_fsusage_space = no; then - # SVR4 - AC_CACHE_CHECK([for statvfs function (SVR4)], fu_cv_sys_stat_statvfs, - [AC_TRY_LINK([#include <sys/types.h> -#ifdef __GLIBC__ -Do not use statvfs on systems with GNU libc, because that function stats -all preceding entries in /proc/mounts, and that makes df hang if even -one of the corresponding file systems is hard-mounted, but not available. -#endif -#include <sys/statvfs.h>], - [struct statvfs fsd; statvfs (0, &fsd);], - fu_cv_sys_stat_statvfs=yes, - fu_cv_sys_stat_statvfs=no)]) - if test $fu_cv_sys_stat_statvfs = yes; then - ac_fsusage_space=yes - AC_DEFINE(STAT_STATVFS, 1, - [ Define if there is a function named statvfs. (SVR4)]) - fi -fi - -if test $ac_fsusage_space = no; then - # DEC Alpha running OSF/1 - AC_MSG_CHECKING([for 3-argument statfs function (DEC OSF/1)]) - AC_CACHE_VAL(fu_cv_sys_stat_statfs3_osf1, - [AC_TRY_RUN([ -#include <sys/param.h> -#include <sys/types.h> -#include <sys/mount.h> - int - main () - { - struct statfs fsd; - fsd.f_fsize = 0; - return statfs (".", &fsd, sizeof (struct statfs)) != 0; - }], - fu_cv_sys_stat_statfs3_osf1=yes, - fu_cv_sys_stat_statfs3_osf1=no, - fu_cv_sys_stat_statfs3_osf1=no)]) - AC_MSG_RESULT($fu_cv_sys_stat_statfs3_osf1) - if test $fu_cv_sys_stat_statfs3_osf1 = yes; then - ac_fsusage_space=yes - AC_DEFINE(STAT_STATFS3_OSF1, 1, - [ Define if statfs takes 3 args. (DEC Alpha running OSF/1)]) - fi -fi - -if test $ac_fsusage_space = no; then -# AIX - AC_MSG_CHECKING([for two-argument statfs with statfs.bsize dnl -member (AIX, 4.3BSD)]) - AC_CACHE_VAL(fu_cv_sys_stat_statfs2_bsize, - [AC_TRY_RUN([ -#ifdef HAVE_SYS_PARAM_H -#include <sys/param.h> -#endif -#ifdef HAVE_SYS_MOUNT_H -#include <sys/mount.h> -#endif -#ifdef HAVE_SYS_VFS_H -#include <sys/vfs.h> -#endif - int - main () - { - struct statfs fsd; - fsd.f_bsize = 0; - return statfs (".", &fsd) != 0; - }], - fu_cv_sys_stat_statfs2_bsize=yes, - fu_cv_sys_stat_statfs2_bsize=no, - fu_cv_sys_stat_statfs2_bsize=no)]) - AC_MSG_RESULT($fu_cv_sys_stat_statfs2_bsize) - if test $fu_cv_sys_stat_statfs2_bsize = yes; then - ac_fsusage_space=yes - AC_DEFINE(STAT_STATFS2_BSIZE, 1, -[ Define if statfs takes 2 args and struct statfs has a field named f_bsize. - (4.3BSD, SunOS 4, HP-UX, AIX PS/2)]) - fi -fi - -if test $ac_fsusage_space = no; then -# SVR3 - AC_MSG_CHECKING([for four-argument statfs (AIX-3.2.5, SVR3)]) - AC_CACHE_VAL(fu_cv_sys_stat_statfs4, - [AC_TRY_RUN([#include <sys/types.h> -#include <sys/statfs.h> - int - main () - { - struct statfs fsd; - return statfs (".", &fsd, sizeof fsd, 0) != 0; - }], - fu_cv_sys_stat_statfs4=yes, - fu_cv_sys_stat_statfs4=no, - fu_cv_sys_stat_statfs4=no)]) - AC_MSG_RESULT($fu_cv_sys_stat_statfs4) - if test $fu_cv_sys_stat_statfs4 = yes; then - ac_fsusage_space=yes - AC_DEFINE(STAT_STATFS4, 1, - [ Define if statfs takes 4 args. (SVR3, Dynix, Irix, Dolphin)]) - fi -fi - -if test $ac_fsusage_space = no; then -# 4.4BSD and NetBSD - AC_MSG_CHECKING([for two-argument statfs with statfs.fsize dnl -member (4.4BSD and NetBSD)]) - AC_CACHE_VAL(fu_cv_sys_stat_statfs2_fsize, - [AC_TRY_RUN([#include <sys/types.h> -#ifdef HAVE_SYS_PARAM_H -#include <sys/param.h> -#endif -#ifdef HAVE_SYS_MOUNT_H -#include <sys/mount.h> -#endif - int - main () - { - struct statfs fsd; - fsd.f_fsize = 0; - return statfs (".", &fsd) != 0; - }], - fu_cv_sys_stat_statfs2_fsize=yes, - fu_cv_sys_stat_statfs2_fsize=no, - fu_cv_sys_stat_statfs2_fsize=no)]) - AC_MSG_RESULT($fu_cv_sys_stat_statfs2_fsize) - if test $fu_cv_sys_stat_statfs2_fsize = yes; then - ac_fsusage_space=yes - AC_DEFINE(STAT_STATFS2_FSIZE, 1, -[ Define if statfs takes 2 args and struct statfs has a field named f_fsize. - (4.4BSD, NetBSD)]) - fi -fi - -if test $ac_fsusage_space = no; then - # Ultrix - AC_MSG_CHECKING([for two-argument statfs with struct fs_data (Ultrix)]) - AC_CACHE_VAL(fu_cv_sys_stat_fs_data, - [AC_TRY_RUN([#include <sys/types.h> -#ifdef HAVE_SYS_PARAM_H -#include <sys/param.h> -#endif -#ifdef HAVE_SYS_MOUNT_H -#include <sys/mount.h> -#endif -#ifdef HAVE_SYS_FS_TYPES_H -#include <sys/fs_types.h> -#endif - int - main () - { - struct fs_data fsd; - /* Ultrix's statfs returns 1 for success, - 0 for not mounted, -1 for failure. */ - return statfs (".", &fsd) != 1; - }], - fu_cv_sys_stat_fs_data=yes, - fu_cv_sys_stat_fs_data=no, - fu_cv_sys_stat_fs_data=no)]) - AC_MSG_RESULT($fu_cv_sys_stat_fs_data) - if test $fu_cv_sys_stat_fs_data = yes; then - ac_fsusage_space=yes - AC_DEFINE(STAT_STATFS2_FS_DATA, 1, -[ Define if statfs takes 2 args and the second argument has - type struct fs_data. (Ultrix)]) - fi -fi - -if test $ac_fsusage_space = no; then - # SVR2 - AC_TRY_CPP([#include <sys/filsys.h> - ], - AC_DEFINE(STAT_READ_FILSYS, 1, - [Define if there is no specific function for reading file systems usage - information and you have the <sys/filsys.h> header file. (SVR2)]) - ac_fsusage_space=yes) -fi - -AS_IF([test $ac_fsusage_space = yes], [$1], [$2]) - -]) - - -# Check for SunOS statfs brokenness wrt partitions 2GB and larger. -# If <sys/vfs.h> exists and struct statfs has a member named f_spare, -# enable the work-around code in fsusage.c. -AC_DEFUN([gl_STATFS_TRUNCATES], -[ - AC_MSG_CHECKING([for statfs that truncates block counts]) - AC_CACHE_VAL(fu_cv_sys_truncating_statfs, - [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ -#if !defined(sun) && !defined(__sun) -choke -- this is a workaround for a Sun-specific problem -#endif -#include <sys/types.h> -#include <sys/vfs.h>]], - [[struct statfs t; long c = *(t.f_spare);]])], - [fu_cv_sys_truncating_statfs=yes], - [fu_cv_sys_truncating_statfs=no])]) - if test $fu_cv_sys_truncating_statfs = yes; then - AC_DEFINE(STATFS_TRUNCATES_BLOCK_COUNTS, 1, - [Define if the block counts reported by statfs may be truncated to 2GB - and the correct values may be stored in the f_spare array. - (SunOS 4.1.2, 4.1.3, and 4.1.3_U1 are reported to have this problem. - SunOS 4.1.1 seems not to be affected.)]) - fi - AC_MSG_RESULT($fu_cv_sys_truncating_statfs) -]) - - -# Prerequisites of lib/fsusage.c not done by gl_FILE_SYSTEM_USAGE. -AC_DEFUN([gl_PREREQ_FSUSAGE_EXTRA], -[ - AC_REQUIRE([gl_AC_TYPE_UINTMAX_T]) - AC_CHECK_HEADERS(dustat.h sys/fs/s5param.h sys/filsys.h sys/statfs.h sys/statvfs.h) - gl_STATFS_TRUNCATES -]) diff --git a/m4/ftruncate.m4 b/m4/ftruncate.m4 deleted file mode 100644 index e71e99b40..000000000 --- a/m4/ftruncate.m4 +++ /dev/null @@ -1,34 +0,0 @@ -#serial 10 - -# See if we need to emulate a missing ftruncate function using fcntl or chsize. - -# Copyright (C) 2000, 2001, 2003-2006 Free Software Foundation, Inc. -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# FIXME: remove this macro, along with all uses of HAVE_FTRUNCATE in 2007, -# if the check below provokes no reports. - -AC_DEFUN([gl_FUNC_FTRUNCATE], -[ - AC_REPLACE_FUNCS(ftruncate) - if test $ac_cv_func_ftruncate = no; then - gl_PREREQ_FTRUNCATE - # If someone lacks ftruncate, make configure fail, and request - # a bug report to inform us about it. - if test x"$SKIP_FTRUNCATE_CHECK" != xyes; then - AC_MSG_FAILURE([Your system lacks the ftruncate function. - Please report this, along with the output of "uname -a", to the - bug-coreutils@gnu.org mailing list. To continue past this point, - rerun configure with SKIP_FTRUNCATE_CHECK=yes. - E.g., ./configure SKIP_FTRUNCATE_CHECK=yes]) - fi - fi -]) - -# Prerequisites of lib/ftruncate.c. -AC_DEFUN([gl_PREREQ_FTRUNCATE], -[ - AC_CHECK_FUNCS(chsize) -]) diff --git a/m4/fts.m4 b/m4/fts.m4 deleted file mode 100644 index ebb249826..000000000 --- a/m4/fts.m4 +++ /dev/null @@ -1,34 +0,0 @@ -#serial 10 -dnl Copyright (C) 2005, 2006 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_FUNC_FTS], -[ - AC_REQUIRE([gl_FUNC_FTS_CORE]) - AC_LIBSOURCES([fts-cycle.c]) -]) - -AC_DEFUN([gl_FUNC_FTS_LGPL], -[ - AC_REQUIRE([gl_FUNC_FTS_CORE]) - AC_DEFINE([_LGPL_PACKAGE], 1, - [Define to 1 if compiling for a package to be distributed under the - GNU Lesser Public License.]) -]) - -AC_DEFUN([gl_FUNC_FTS_CORE], -[ - AC_LIBSOURCES([fts.c, fts_.h]) - - dnl Use this version of fts unconditionally, since the GNU libc and - dnl NetBSD versions have bugs and/or unnecessary limitations. - AC_LIBOBJ([fts]) - - dnl Prerequisites of lib/fts.c. - AC_REQUIRE([gl_FUNC_OPENAT]) - - # Checks for header files. - AC_CHECK_HEADERS_ONCE([sys/param.h])dnl -]) diff --git a/m4/getaddrinfo.m4 b/m4/getaddrinfo.m4 deleted file mode 100644 index db285d942..000000000 --- a/m4/getaddrinfo.m4 +++ /dev/null @@ -1,88 +0,0 @@ -# getaddrinfo.m4 serial 11 -dnl Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_GETADDRINFO], -[ - AC_MSG_NOTICE([checking how to do getaddrinfo, freeaddrinfo and getnameinfo]) - - AC_SEARCH_LIBS(getaddrinfo, [nsl socket]) - AC_CHECK_FUNCS(getaddrinfo,, [ - AC_CACHE_CHECK(for getaddrinfo in ws2tcpip.h and -lws2_32, - gl_cv_w32_getaddrinfo, [ - gl_cv_w32_getaddrinfo=no - am_save_LIBS="$LIBS" - LIBS="$LIBS -lws2_32" - AC_TRY_LINK([ -#ifdef HAVE_WS2TCPIP_H -#include <ws2tcpip.h> -#endif -], [getaddrinfo(0, 0, 0, 0);], gl_cv_w32_getaddrinfo=yes) - LIBS="$am_save_LIBS"]) - if test "$gl_cv_w32_getaddrinfo" = "yes"; then - LIBS="$LIBS -lws2_32" - else - AC_LIBOBJ(getaddrinfo) - fi - ]) - - AC_REPLACE_FUNCS(gai_strerror) - gl_PREREQ_GETADDRINFO -]) - -# Prerequisites of lib/getaddrinfo.h and lib/getaddrinfo.c. -AC_DEFUN([gl_PREREQ_GETADDRINFO], [ - AC_SEARCH_LIBS(gethostbyname, [inet nsl]) - AC_SEARCH_LIBS(getservbyname, [inet nsl socket xnet]) - AC_CHECK_FUNCS(gethostbyname,, [ - AC_CACHE_CHECK(for gethostbyname in winsock2.h and -lws2_32, - gl_cv_w32_gethostbyname, [ - gl_cv_w32_gethostbyname=no - am_save_LIBS="$LIBS" - LIBS="$LIBS -lws2_32" - AC_TRY_LINK([ -#ifdef HAVE_WINSOCK2_H -#include <winsock2.h> -#endif -], [gethostbyname(0);], gl_cv_w32_gethostbyname=yes) - LIBS="$am_save_LIBS"]) - if test "$gl_cv_w32_gethostbyname" = "yes"; then - LIBS="$LIBS -lws2_32" - fi - ]) - AC_REQUIRE([AC_C_RESTRICT]) - AC_REQUIRE([gl_SOCKET_FAMILIES]) - AC_REQUIRE([gl_HEADER_SYS_SOCKET]) - AC_REQUIRE([AC_C_INLINE]) - AC_REQUIRE([AC_GNU_SOURCE]) - AC_CHECK_HEADERS_ONCE(netinet/in.h netdb.h) - AC_CHECK_DECLS([getaddrinfo, freeaddrinfo, gai_strerror, getnameinfo],,,[ - /* sys/types.h is not needed according to POSIX, but the - sys/socket.h in i386-unknown-freebsd4.10 and - powerpc-apple-darwin5.5 required it. */ -#include <sys/types.h> -#ifdef HAVE_SYS_SOCKET_H -#include <sys/socket.h> -#endif -#ifdef HAVE_NETDB_H -#include <netdb.h> -#endif -#ifdef HAVE_WS2TCPIP_H -#include <ws2tcpip.h> -#endif -]) - AC_CHECK_TYPES([struct addrinfo],,,[ -#include <sys/types.h> -#ifdef HAVE_SYS_SOCKET_H -#include <sys/socket.h> -#endif -#ifdef HAVE_NETDB_H -#include <netdb.h> -#endif -#ifdef HAVE_WS2TCPIP_H -#include <ws2tcpip.h> -#endif -]) -]) diff --git a/m4/getcwd-abort-bug.m4 b/m4/getcwd-abort-bug.m4 deleted file mode 100644 index a431a7ccc..000000000 --- a/m4/getcwd-abort-bug.m4 +++ /dev/null @@ -1,106 +0,0 @@ -#serial 1 -# Determine whether getcwd aborts when the length of the working directory -# name is unusually large. Any length between 4k and 16k trigger the bug -# when using glibc-2.4.90-9 or older. - -# Copyright (C) 2006 Free Software Foundation, Inc. -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# From Jim Meyering - -# gl_FUNC_GETCWD_ABORT_BUG([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) -AC_DEFUN([gl_FUNC_GETCWD_ABORT_BUG], -[ - AC_CHECK_DECLS_ONCE(getcwd) - AC_CHECK_FUNCS(getpagesize) - AC_CACHE_CHECK([whether getcwd aborts when 4k < cwd_length < 16k], - gl_cv_func_getcwd_abort_bug, - [# Remove any remnants of a previous test. - rm -rf confdir-14B--- - # Arrange for deletion of the temporary directory this test creates. - ac_clean_files="$ac_clean_files confdir-14B---" - AC_RUN_IFELSE( - [AC_LANG_SOURCE( - [[ -#include <stdlib.h> -#include <unistd.h> -#include <limits.h> -#include <string.h> -#include <sys/stat.h> - -/* Don't get link errors because mkdir is redefined to rpl_mkdir. */ -#undef mkdir - -#ifndef S_IRWXU -# define S_IRWXU 0700 -#endif - -/* FIXME: skip the run-test altogether on systems without getpagesize. */ -#if ! HAVE_GETPAGESIZE -# define getpagesize() 0 -#endif - -/* This size is chosen to be larger than PATH_MAX (4k), yet smaller than - the 16kB pagesize on ia64 linux. Those conditions make the code below - trigger a bug in glibc's getcwd implementation before 2.4.90-10. */ -#define TARGET_LEN (5 * 1024) - -int -main () -{ - char const *dir_name = "confdir-14B---"; - char *cwd; - size_t initial_cwd_len; - int fail = 0; - size_t desired_depth; - size_t d; - - /* The bug is triggered when PATH_MAX < getpagesize (), so skip - this relative expensive and invasive test if that's not true. */ - if (getpagesize () <= PATH_MAX) - return 0; - - cwd = getcwd (NULL, 0); - if (cwd == NULL) - return 0; - - initial_cwd_len = strlen (cwd); - free (cwd); - desired_depth = ((TARGET_LEN - 1 - initial_cwd_len) - / (1 + strlen (dir_name))); - for (d = 0; d < desired_depth; d++) - { - if (mkdir (dir_name, S_IRWXU) < 0 || chdir (dir_name) < 0) - { - fail = 3; /* Unable to construct deep hierarchy. */ - break; - } - } - - /* If libc has the bug in question, this invocation of getcwd - results in a failed assertion. */ - cwd = getcwd (NULL, 0); - if (cwd == NULL) - fail = 4; /* getcwd failed. This is ok, and expected. */ - free (cwd); - - /* Call rmdir first, in case the above chdir failed. */ - rmdir (dir_name); - while (0 < d--) - { - if (chdir ("..") < 0) - break; - rmdir (dir_name); - } - - return 0; -} - ]])], - [gl_cv_func_getcwd_abort_bug=no], - [gl_cv_func_getcwd_abort_bug=yes], - [gl_cv_func_getcwd_abort_bug=yes]) - ]) - AS_IF([test $gl_cv_func_getcwd_abort_bug = yes], [$1], [$2]) -]) diff --git a/m4/getcwd-path-max.m4 b/m4/getcwd-path-max.m4 deleted file mode 100644 index 3d0af8751..000000000 --- a/m4/getcwd-path-max.m4 +++ /dev/null @@ -1,189 +0,0 @@ -#serial 12 -# Check for several getcwd bugs with long file names. -# If so, arrange to compile the wrapper function. - -# This is necessary for at least GNU libc on linux-2.4.19 and 2.4.20. -# I've heard that this is due to a Linux kernel bug, and that it has -# been fixed between 2.4.21-pre3 and 2.4.21-pre4. */ - -# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# From Jim Meyering - -AC_DEFUN([gl_FUNC_GETCWD_PATH_MAX], -[ - AC_CHECK_DECLS_ONCE(getcwd) - AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) - AC_CACHE_CHECK([whether getcwd handles long file names properly], - gl_cv_func_getcwd_path_max, - [# Arrange for deletion of the temporary directory this test creates. - ac_clean_files="$ac_clean_files confdir3" - AC_RUN_IFELSE( - [AC_LANG_SOURCE( - [[ -#include <errno.h> -#include <stdlib.h> -#include <unistd.h> -#include <string.h> -#include <limits.h> -#include <sys/stat.h> -#include <sys/types.h> -#include <fcntl.h> - -#ifndef AT_FDCWD -# define AT_FDCWD 0 -#endif -#ifdef ENAMETOOLONG -# define is_ENAMETOOLONG(x) ((x) == ENAMETOOLONG) -#else -# define is_ENAMETOOLONG(x) 0 -#endif - -/* Don't get link errors because mkdir is redefined to rpl_mkdir. */ -#undef mkdir - -#ifndef S_IRWXU -# define S_IRWXU 0700 -#endif - -/* The length of this name must be 8. */ -#define DIR_NAME "confdir3" -#define DIR_NAME_LEN 8 -#define DIR_NAME_SIZE (DIR_NAME_LEN + 1) - -/* The length of "../". */ -#define DOTDOTSLASH_LEN 3 - -/* Leftover bytes in the buffer, to work around library or OS bugs. */ -#define BUF_SLOP 20 - -int -main () -{ -#ifndef PATH_MAX - /* The Hurd doesn't define this, so getcwd can't exhibit the bug -- - at least not on a local file system. And if we were to start worrying - about remote file systems, we'd have to enable the wrapper function - all of the time, just to be safe. That's not worth the cost. */ - exit (0); -#elif ((INT_MAX / (DIR_NAME_SIZE / DOTDOTSLASH_LEN + 1) \ - - DIR_NAME_SIZE - BUF_SLOP) \ - <= PATH_MAX) - /* FIXME: Assuming there's a system for which this is true, - this should be done in a compile test. */ - exit (0); -#else - char buf[PATH_MAX * (DIR_NAME_SIZE / DOTDOTSLASH_LEN + 1) - + DIR_NAME_SIZE + BUF_SLOP]; - char *cwd = getcwd (buf, PATH_MAX); - size_t initial_cwd_len; - size_t cwd_len; - int fail = 0; - size_t n_chdirs = 0; - - if (cwd == NULL) - exit (1); - - cwd_len = initial_cwd_len = strlen (cwd); - - while (1) - { - size_t dotdot_max = PATH_MAX * (DIR_NAME_SIZE / DOTDOTSLASH_LEN); - char *c = NULL; - - cwd_len += DIR_NAME_SIZE; - /* If mkdir or chdir fails, it could be that this system cannot create - any file with an absolute name longer than PATH_MAX, such as cygwin. - If so, leave fail as 0, because the current working directory can't - be too long for getcwd if it can't even be created. For other - errors, be pessimistic and consider that as a failure, too. */ - if (mkdir (DIR_NAME, S_IRWXU) < 0 || chdir (DIR_NAME) < 0) - { - if (! (errno == ERANGE || is_ENAMETOOLONG (errno))) - fail = 2; - break; - } - - if (PATH_MAX <= cwd_len && cwd_len < PATH_MAX + DIR_NAME_SIZE) - { - c = getcwd (buf, PATH_MAX); - if (!c && errno == ENOENT) - { - fail = 1; - break; - } - if (c || ! (errno == ERANGE || is_ENAMETOOLONG (errno))) - { - fail = 2; - break; - } - } - - if (dotdot_max <= cwd_len - initial_cwd_len) - { - if (dotdot_max + DIR_NAME_SIZE < cwd_len - initial_cwd_len) - break; - c = getcwd (buf, cwd_len + 1); - if (!c) - { - if (! (errno == ERANGE || errno == ENOENT - || is_ENAMETOOLONG (errno))) - { - fail = 2; - break; - } - if (AT_FDCWD || errno == ERANGE || errno == ENOENT) - { - fail = 1; - break; - } - } - } - - if (c && strlen (c) != cwd_len) - { - fail = 2; - break; - } - ++n_chdirs; - } - - /* Leaving behind such a deep directory is not polite. - So clean up here, right away, even though the driving - shell script would also clean up. */ - { - size_t i; - - /* Try rmdir first, in case the chdir failed. */ - rmdir (DIR_NAME); - for (i = 0; i <= n_chdirs; i++) - { - if (chdir ("..") < 0) - break; - rmdir (DIR_NAME); - } - } - - exit (fail); -#endif -} - ]])], - [gl_cv_func_getcwd_path_max=yes], - [case $? in - 1) gl_cv_func_getcwd_path_max='no, but it is partly working';; - *) gl_cv_func_getcwd_path_max=no;; - esac], - [gl_cv_func_getcwd_path_max=no]) - ]) - case $gl_cv_func_getcwd_path_max in - no,*) - AC_DEFINE([HAVE_PARTLY_WORKING_GETCWD], 1, - [Define to 1 if getcwd works, except it sometimes fails when it shouldn't, - setting errno to ERANGE, ENAMETOOLONG, or ENOENT. If __GETCWD_PREFIX - is not defined, it doesn't matter whether HAVE_PARTLY_WORKING_GETCWD - is defined.]);; - esac -]) diff --git a/m4/getcwd.m4 b/m4/getcwd.m4 deleted file mode 100644 index 2a19a083a..000000000 --- a/m4/getcwd.m4 +++ /dev/null @@ -1,66 +0,0 @@ -# getcwd.m4 - check for working getcwd that is compatible with glibc - -# Copyright (C) 2001, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# Written by Paul Eggert. - -AC_DEFUN([gl_FUNC_GETCWD_NULL], - [ - AC_LIBSOURCES([getcwd.c, getcwd.h]) - - AC_CACHE_CHECK([whether getcwd (NULL, 0) allocates memory for result], - [gl_cv_func_getcwd_null], - [AC_TRY_RUN( - [ -# include <stdlib.h> -# include <unistd.h> -# ifndef getcwd - char *getcwd (); -# endif - int - main () - { - if (chdir ("/") != 0) - exit (1); - else - { - char *f = getcwd (NULL, 0); - exit (! (f && f[0] == '/' && !f[1])); - } - }], - [gl_cv_func_getcwd_null=yes], - [gl_cv_func_getcwd_null=no], - [gl_cv_func_getcwd_null=no])]) -]) - -AC_DEFUN([gl_FUNC_GETCWD], -[ - AC_REQUIRE([gl_FUNC_GETCWD_NULL]) - - gl_abort_bug=no - case $gl_cv_func_getcwd_null in - yes) - gl_FUNC_GETCWD_PATH_MAX - gl_FUNC_GETCWD_ABORT_BUG([gl_abort_bug=yes]);; - esac - - case $gl_cv_func_getcwd_null,$gl_cv_func_getcwd_path_max,$gl_abort_bug in - yes,yes,no) ;; - *) - AC_LIBOBJ([getcwd]) - AC_DEFINE([__GETCWD_PREFIX], [[rpl_]], - [Define to rpl_ if the getcwd replacement function should be used.]) - gl_PREREQ_GETCWD;; - esac -]) - -# Prerequisites of lib/getcwd.c. -AC_DEFUN([gl_PREREQ_GETCWD], -[ - AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) - AC_REQUIRE([gl_CHECK_TYPE_STRUCT_DIRENT_D_INO]) - : -]) diff --git a/m4/getdate.m4 b/m4/getdate.m4 deleted file mode 100644 index 225b7b75b..000000000 --- a/m4/getdate.m4 +++ /dev/null @@ -1,35 +0,0 @@ -# getdate.m4 serial 9 -dnl Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_C_COMPOUND_LITERALS], -[ - AC_CACHE_CHECK([for compound literals], gl_cv_compound_literals, - [AC_TRY_COMPILE([struct s { int i, j; }; struct s s = (struct s) { 1, 2 };], - [struct s t = (struct s) { 3, 4 };], - gl_cv_compound_literals=yes, - gl_cv_compound_literals=no)]) - if test $gl_cv_compound_literals = yes; then - AC_DEFINE(HAVE_COMPOUND_LITERALS, 1, - [Define if you have compound literals.]) - fi -]) - -AC_DEFUN([gl_GETDATE], -[ - AC_LIBSOURCES([getdate.h, getdate.y]) - AC_LIBOBJ([getdate]) - - dnl Prerequisites of lib/getdate.h. - AC_REQUIRE([AM_STDBOOL_H]) - AC_REQUIRE([gl_TIMESPEC]) - - dnl Prerequisites of lib/getdate.y. - AC_REQUIRE([gl_BISON]) - AC_REQUIRE([gl_C_COMPOUND_LITERALS]) - AC_STRUCT_TIMEZONE - AC_REQUIRE([gl_CLOCK_TIME]) - AC_REQUIRE([gl_TM_GMTOFF]) -]) diff --git a/m4/getdelim.m4 b/m4/getdelim.m4 deleted file mode 100644 index 340bb7126..000000000 --- a/m4/getdelim.m4 +++ /dev/null @@ -1,30 +0,0 @@ -# getdelim.m4 serial 1 - -dnl Copyright (C) 2005 Free Software dnl Foundation, Inc. -dnl -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_PREREQ(2.52) - -AC_DEFUN([gl_FUNC_GETDELIM], -[ - AC_LIBSOURCES([getdelim.c, getdelim.h]) - - dnl Persuade glibc <stdio.h> to declare getdelim(). - AC_REQUIRE([AC_GNU_SOURCE]) - - AC_REPLACE_FUNCS(getdelim) - AC_CHECK_DECLS_ONCE(getdelim) - - if test $ac_cv_func_getdelim = no; then - gl_PREREQ_GETDELIM - fi -]) - -# Prerequisites of lib/getdelim.c. -AC_DEFUN([gl_PREREQ_GETDELIM], -[ - AC_CHECK_FUNCS([flockfile funlockfile]) -]) diff --git a/m4/getgroups.m4 b/m4/getgroups.m4 deleted file mode 100644 index edc2bde9d..000000000 --- a/m4/getgroups.m4 +++ /dev/null @@ -1,29 +0,0 @@ -#serial 10 - -dnl From Jim Meyering. -dnl A wrapper around AC_FUNC_GETGROUPS. - -# Copyright (C) 1996, 1997, 1999, 2000, 2001, 2002, 2003, 2004 Free -# Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_FUNC_GETGROUPS], -[ - AC_REQUIRE([AC_FUNC_GETGROUPS]) - if test $ac_cv_func_getgroups_works = no; then - AC_LIBOBJ(getgroups) - AC_DEFINE(getgroups, rpl_getgroups, - [Define as rpl_getgroups if getgroups doesn't work right.]) - gl_PREREQ_GETGROUPS - fi - test -n "$GETGROUPS_LIB" && LIBS="$GETGROUPS_LIB $LIBS" -]) - -# Prerequisites of lib/getgroups.c. -AC_DEFUN([gl_PREREQ_GETGROUPS], -[ - AC_REQUIRE([AC_TYPE_GETGROUPS]) -]) diff --git a/m4/gethostname.m4 b/m4/gethostname.m4 deleted file mode 100644 index 1e9749d39..000000000 --- a/m4/gethostname.m4 +++ /dev/null @@ -1,18 +0,0 @@ -# gethostname.m4 serial 2 -dnl Copyright (C) 2002 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_FUNC_GETHOSTNAME], -[ - AC_REPLACE_FUNCS(gethostname) - if test $ac_cv_func_gethostname = no; then - gl_PREREQ_GETHOSTNAME - fi -]) - -# Prerequisites of lib/gethostname.c. -AC_DEFUN([gl_PREREQ_GETHOSTNAME], [ - AC_CHECK_FUNCS(uname) -]) diff --git a/m4/gethrxtime.m4 b/m4/gethrxtime.m4 deleted file mode 100644 index 663bd70a1..000000000 --- a/m4/gethrxtime.m4 +++ /dev/null @@ -1,75 +0,0 @@ -# gethrxtime.m4 serial 4 -dnl Copyright (C) 2005, 2006 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl Written by Paul Eggert. - -AC_DEFUN([gl_GETHRXTIME], -[ - AC_LIBSOURCES([gethrxtime.c, gethrxtime.h, xtime.h]) - AC_REQUIRE([gl_ARITHMETIC_HRTIME_T]) - AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) - AC_REQUIRE([gl_XTIME]) - AC_CHECK_DECLS([gethrtime], [], [], [#include <time.h>]) - case $ac_cv_have_decl_gethrtime,$gl_cv_arithmetic_hrtime_t in - yes,yes) ;; - *) - AC_LIBOBJ([gethrxtime]) - gl_PREREQ_GETHRXTIME;; - esac -]) - -# Test whether hrtime_t is an arithmetic type. -# It is not arithmetic in older Solaris c89 (which insists on -# not having a long long int type). -AC_DEFUN([gl_ARITHMETIC_HRTIME_T], -[ - AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) - AC_CACHE_CHECK([for arithmetic hrtime_t], gl_cv_arithmetic_hrtime_t, - [AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM([#include <time.h>], - [hrtime_t x = 0; return x/x;])], - [gl_cv_arithmetic_hrtime_t=yes], - [gl_cv_arithmetic_hrtime_t=no])]) - if test $gl_cv_arithmetic_hrtime_t = yes; then - AC_DEFINE([HAVE_ARITHMETIC_HRTIME_T], 1, - [Define if you have an arithmetic hrtime_t type.]) - fi -]) - -# Prerequisites of lib/xtime.h. -AC_DEFUN([gl_XTIME], -[ - AC_REQUIRE([AC_C_INLINE]) - AC_REQUIRE([gl_AC_TYPE_LONG_LONG]) - : -]) - -# Prerequisites of lib/gethrxtime.c. -AC_DEFUN([gl_PREREQ_GETHRXTIME], -[ - AC_REQUIRE([gl_CLOCK_TIME]) - AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) - AC_CHECK_FUNCS_ONCE(microuptime nanouptime) - - if test $ac_cv_func_nanouptime != yes; then - LIB_GETHRXTIME= - AC_CACHE_CHECK([whether CLOCK_MONOTONIC or CLOCK_REALTIME is defined], - gl_cv_have_clock_gettime_macro, - [AC_EGREP_CPP([have_clock_gettime_macro], - [ -# include <time.h> -# if defined CLOCK_MONOTONIC || defined CLOCK_REALTIME - have_clock_gettime_macro -# endif - ], - gl_cv_have_clock_gettime_macro=yes, - gl_cv_have_clock_gettime_macro=no)]) - if test $gl_cv_have_clock_gettime_macro = yes; then - LIB_GETHRXTIME=$LIB_CLOCK_GETTIME - fi - AC_SUBST([LIB_GETHRXTIME]) - fi -]) diff --git a/m4/getline.m4 b/m4/getline.m4 deleted file mode 100644 index f49c50eed..000000000 --- a/m4/getline.m4 +++ /dev/null @@ -1,81 +0,0 @@ -# getline.m4 serial 14 - -dnl Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2005, 2006 Free Software -dnl Foundation, Inc. -dnl -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_PREREQ(2.52) - -dnl See if there's a working, system-supplied version of the getline function. -dnl We can't just do AC_REPLACE_FUNCS(getline) because some systems -dnl have a function by that name in -linet that doesn't have anything -dnl to do with the function we need. -AC_DEFUN([gl_FUNC_GETLINE], -[ - AC_LIBSOURCES([getline.c, getline.h]) - - dnl Persuade glibc <stdio.h> to declare getline(). - AC_REQUIRE([AC_GNU_SOURCE]) - - AC_CHECK_DECLS([getline]) - - gl_getline_needs_run_time_check=no - AC_CHECK_FUNC(getline, - dnl Found it in some library. Verify that it works. - gl_getline_needs_run_time_check=yes, - am_cv_func_working_getline=no) - if test $gl_getline_needs_run_time_check = yes; then - AC_CACHE_CHECK([for working getline function], am_cv_func_working_getline, - [echo fooN |tr -d '\012'|tr N '\012' > conftest.data - AC_TRY_RUN([ -# include <stdio.h> -# include <stdlib.h> -# include <string.h> - int main () - { /* Based on a test program from Karl Heuer. */ - char *line = NULL; - size_t siz = 0; - int len; - FILE *in = fopen ("./conftest.data", "r"); - if (!in) - return 1; - len = getline (&line, &siz, in); - exit ((len == 4 && line && strcmp (line, "foo\n") == 0) ? 0 : 1); - } - ], am_cv_func_working_getline=yes dnl The library version works. - , am_cv_func_working_getline=no dnl The library version does NOT work. - , dnl We're cross compiling. Assume it works on glibc2 systems. - [AC_EGREP_CPP([Lucky GNU user], - [ -#include <features.h> -#ifdef __GNU_LIBRARY__ - #if (__GLIBC__ >= 2) - Lucky GNU user - #endif -#endif - ], - [am_cv_func_working_getline=yes], - [am_cv_func_working_getline=no])] - )]) - fi - - if test $am_cv_func_working_getline = no; then - dnl We must choose a different name for our function, since on ELF systems - dnl a broken getline() in libc.so would override our getline() in - dnl libgettextlib.so. - AC_DEFINE([getline], [gnu_getline], - [Define to a replacement function name for getline().]) - AC_LIBOBJ(getline) - - gl_PREREQ_GETLINE - fi -]) - -# Prerequisites of lib/getline.c. -AC_DEFUN([gl_PREREQ_GETLINE], -[ - gl_FUNC_GETDELIM -]) diff --git a/m4/getndelim2.m4 b/m4/getndelim2.m4 deleted file mode 100644 index 404b36d4f..000000000 --- a/m4/getndelim2.m4 +++ /dev/null @@ -1,25 +0,0 @@ -# getndelim2.m4 serial 4 -dnl Copyright (C) 2003 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_GETNDELIM2], -[ - # Avoid multiple inclusions of getndelim2.o into LIBOBJS. - # This hack won't be needed after gnulib requires Autoconf 2.58 or later. - case " $LIB@&t@OBJS " in - *" getndelim2.$ac_objext "* ) ;; - *) AC_LIBOBJ(getndelim2);; - esac - - gl_PREREQ_GETNDELIM2 -]) - -# Prerequisites of lib/getndelim2.h and lib/getndelim2.c. -AC_DEFUN([gl_PREREQ_GETNDELIM2], -[ - dnl Prerequisites of lib/getndelim2.h. - AC_REQUIRE([gt_TYPE_SSIZE_T]) - dnl No prerequisites of lib/getndelim2.c. -]) diff --git a/m4/getopt.m4 b/m4/getopt.m4 deleted file mode 100644 index c0a73b2cb..000000000 --- a/m4/getopt.m4 +++ /dev/null @@ -1,83 +0,0 @@ -# getopt.m4 serial 13 -dnl Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -# The getopt module assume you want GNU getopt, with getopt_long etc, -# rather than vanilla POSIX getopt. This means your code should -# always include <getopt.h> for the getopt prototypes. - -AC_DEFUN([gl_GETOPT_SUBSTITUTE], -[ - AC_LIBOBJ([getopt]) - AC_LIBOBJ([getopt1]) - gl_GETOPT_SUBSTITUTE_HEADER - gl_PREREQ_GETOPT -]) - -AC_DEFUN([gl_GETOPT_SUBSTITUTE_HEADER], -[ - GETOPT_H=getopt.h - AC_DEFINE([__GETOPT_PREFIX], [[rpl_]], - [Define to rpl_ if the getopt replacement functions and variables - should be used.]) - AC_SUBST([GETOPT_H]) -]) - -AC_DEFUN([gl_GETOPT_CHECK_HEADERS], -[ - if test -z "$GETOPT_H"; then - AC_CHECK_HEADERS([getopt.h], [], [GETOPT_H=getopt.h]) - fi - - if test -z "$GETOPT_H"; then - AC_CHECK_FUNCS([getopt_long_only], [], [GETOPT_H=getopt.h]) - fi - - dnl BSD getopt_long uses an incompatible method to reset option processing, - dnl and (as of 2004-10-15) mishandles optional option-arguments. - if test -z "$GETOPT_H"; then - AC_CHECK_DECL([optreset], [GETOPT_H=getopt.h], [], [#include <getopt.h>]) - fi - - dnl Solaris 10 getopt doesn't handle `+' as a leading character in an - dnl option string (as of 2005-05-05). - if test -z "$GETOPT_H"; then - AC_CACHE_CHECK([for working GNU getopt function], [gl_cv_func_gnu_getopt], - [AC_RUN_IFELSE( - [AC_LANG_PROGRAM([#include <getopt.h>], - [[ - char *myargv[3]; - myargv[0] = "conftest"; - myargv[1] = "-+"; - myargv[2] = 0; - return getopt (2, myargv, "+a") != '?'; - ]])], - [gl_cv_func_gnu_getopt=yes], - [gl_cv_func_gnu_getopt=no], - [dnl cross compiling - pessimistically guess based on decls - dnl Solaris 10 getopt doesn't handle `+' as a leading character in an - dnl option string (as of 2005-05-05). - AC_CHECK_DECL([getopt_clip], - [gl_cv_func_gnu_getopt=no], [gl_cv_func_gnu_getopt=yes], - [#include <getopt.h>])])]) - if test "$gl_cv_func_gnu_getopt" = "no"; then - GETOPT_H=getopt.h - fi - fi -]) - -AC_DEFUN([gl_GETOPT_IFELSE], -[ - AC_REQUIRE([gl_GETOPT_CHECK_HEADERS]) - AS_IF([test -n "$GETOPT_H"], [$1], [$2]) -]) - -AC_DEFUN([gl_GETOPT], [gl_GETOPT_IFELSE([gl_GETOPT_SUBSTITUTE])]) - -# Prerequisites of lib/getopt*. -AC_DEFUN([gl_PREREQ_GETOPT], -[ - AC_CHECK_DECLS_ONCE([getenv]) -]) diff --git a/m4/getpagesize.m4 b/m4/getpagesize.m4 deleted file mode 100644 index 6d84890e7..000000000 --- a/m4/getpagesize.m4 +++ /dev/null @@ -1,15 +0,0 @@ -# getpagesize.m4 serial 5 -dnl Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_GETPAGESIZE], -[ - AC_LIBSOURCES([getpagesize.h]) - - dnl Prerequisites of lib/getpagesize.h. - AC_CHECK_HEADERS_ONCE(sys/param.h) - AC_CHECK_HEADERS(OS.h) - AC_CHECK_FUNCS(getpagesize) -]) diff --git a/m4/getpass.m4 b/m4/getpass.m4 deleted file mode 100644 index 44c24d030..000000000 --- a/m4/getpass.m4 +++ /dev/null @@ -1,46 +0,0 @@ -# getpass.m4 serial 8 -dnl Copyright (C) 2002-2003, 2005-2006 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -# Provide a getpass() function if the system doesn't have it. -AC_DEFUN([gl_FUNC_GETPASS], -[ - AC_LIBSOURCES([getpass.c, getpass.h]) - - AC_REPLACE_FUNCS(getpass) - AC_CHECK_DECLS_ONCE(getpass) - if test $ac_cv_func_getpass = no; then - gl_PREREQ_GETPASS - fi -]) - -# Provide the GNU getpass() implementation. It supports passwords of -# arbitrary length (not just 8 bytes as on HP-UX). -AC_DEFUN([gl_FUNC_GETPASS_GNU], -[ - AC_LIBSOURCES([getpass.c, getpass.h]) - - AC_CHECK_DECLS_ONCE(getpass) - dnl TODO: Detect when GNU getpass() is already found in glibc. - AC_LIBOBJ(getpass) - gl_PREREQ_GETPASS - dnl We must choose a different name for our function, since on ELF systems - dnl an unusable getpass() in libc.so would override our getpass() if it is - dnl compiled into a shared library. - AC_DEFINE([getpass], [gnu_getpass], - [Define to a replacement function name for getpass().]) -]) - -# Prerequisites of lib/getpass.c. -AC_DEFUN([gl_PREREQ_GETPASS], [ - AC_CHECK_HEADERS_ONCE(stdio_ext.h termios.h) - AC_CHECK_FUNCS_ONCE(__fsetlocking tcgetattr tcsetattr) - AC_CHECK_DECLS_ONCE([fflush_unlocked]) - AC_CHECK_DECLS_ONCE([flockfile]) - AC_CHECK_DECLS_ONCE([fputs_unlocked]) - AC_CHECK_DECLS_ONCE([funlockfile]) - AC_CHECK_DECLS_ONCE([putc_unlocked]) - : -]) diff --git a/m4/gettext.m4 b/m4/gettext.m4 deleted file mode 100644 index dae3d81e7..000000000 --- a/m4/gettext.m4 +++ /dev/null @@ -1,631 +0,0 @@ -# gettext.m4 serial 53 (gettext-0.15) -dnl Copyright (C) 1995-2006 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. -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. - -dnl Authors: -dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000. -dnl Bruno Haible <haible@clisp.cons.org>, 2000-2005. - -dnl Macro to add for using GNU gettext. - -dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]). -dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The -dnl default (if it is not specified or empty) is 'no-libtool'. -dnl INTLSYMBOL should be 'external' for packages with no intl directory, -dnl and 'no-libtool' or 'use-libtool' for packages with an intl directory. -dnl If INTLSYMBOL is 'use-libtool', then a libtool library -dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static, -dnl depending on --{enable,disable}-{shared,static} and on the presence of -dnl AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library -dnl $(top_builddir)/intl/libintl.a will be created. -dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext -dnl implementations (in libc or libintl) without the ngettext() function -dnl will be ignored. If NEEDSYMBOL is specified and is -dnl 'need-formatstring-macros', then GNU gettext implementations that don't -dnl support the ISO C 99 <inttypes.h> formatstring macros will be ignored. -dnl INTLDIR is used to find the intl libraries. If empty, -dnl the value `$(top_builddir)/intl/' is used. -dnl -dnl The result of the configuration is one of three cases: -dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled -dnl and used. -dnl Catalog format: GNU --> install in $(datadir) -dnl Catalog extension: .mo after installation, .gmo in source tree -dnl 2) GNU gettext has been found in the system's C library. -dnl Catalog format: GNU --> install in $(datadir) -dnl Catalog extension: .mo after installation, .gmo in source tree -dnl 3) No internationalization, always use English msgid. -dnl Catalog format: none -dnl Catalog extension: none -dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur. -dnl The use of .gmo is historical (it was needed to avoid overwriting the -dnl GNU format catalogs when building on a platform with an X/Open gettext), -dnl but we keep it in order not to force irrelevant filename changes on the -dnl maintainers. -dnl -AC_DEFUN([AM_GNU_GETTEXT], -[ - dnl Argument checking. - ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], , - [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT -])])])])]) - ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], , - [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT -])])])]) - define([gt_included_intl], ifelse([$1], [external], [no], [yes])) - define([gt_libtool_suffix_prefix], ifelse([$1], [use-libtool], [l], [])) - - AC_REQUIRE([AM_PO_SUBDIRS])dnl - ifelse(gt_included_intl, yes, [ - AC_REQUIRE([AM_INTL_SUBDIR])dnl - ]) - - dnl Prerequisites of AC_LIB_LINKFLAGS_BODY. - AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) - AC_REQUIRE([AC_LIB_RPATH]) - - dnl Sometimes libintl requires libiconv, so first search for libiconv. - dnl Ideally we would do this search only after the - dnl if test "$USE_NLS" = "yes"; then - dnl if test "$gt_cv_func_gnugettext_libc" != "yes"; then - dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT - dnl the configure script would need to contain the same shell code - dnl again, outside any 'if'. There are two solutions: - dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'. - dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE. - dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not - dnl documented, we avoid it. - ifelse(gt_included_intl, yes, , [ - AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) - ]) - - dnl Sometimes, on MacOS X, libintl requires linking with CoreFoundation. - gt_INTL_MACOSX - - dnl Set USE_NLS. - AC_REQUIRE([AM_NLS]) - - ifelse(gt_included_intl, yes, [ - BUILD_INCLUDED_LIBINTL=no - USE_INCLUDED_LIBINTL=no - ]) - LIBINTL= - LTLIBINTL= - POSUB= - - dnl If we use NLS figure out what method - if test "$USE_NLS" = "yes"; then - gt_use_preinstalled_gnugettext=no - ifelse(gt_included_intl, yes, [ - AC_MSG_CHECKING([whether included gettext is requested]) - AC_ARG_WITH(included-gettext, - [ --with-included-gettext use the GNU gettext library included here], - nls_cv_force_use_gnu_gettext=$withval, - nls_cv_force_use_gnu_gettext=no) - AC_MSG_RESULT($nls_cv_force_use_gnu_gettext) - - nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" - if test "$nls_cv_force_use_gnu_gettext" != "yes"; then - ]) - dnl User does not insist on using GNU NLS library. Figure out what - dnl to use. If GNU gettext is available we use this. Else we have - dnl to fall back to GNU NLS library. - - dnl Add a version number to the cache macros. - define([gt_api_version], ifelse([$2], [need-formatstring-macros], 3, ifelse([$2], [need-ngettext], 2, 1))) - define([gt_cv_func_gnugettext_libc], [gt_cv_func_gnugettext]gt_api_version[_libc]) - define([gt_cv_func_gnugettext_libintl], [gt_cv_func_gnugettext]gt_api_version[_libintl]) - - AC_CACHE_CHECK([for GNU gettext in libc], gt_cv_func_gnugettext_libc, - [AC_TRY_LINK([#include <libintl.h> -]ifelse([$2], [need-formatstring-macros], -[[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION -#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1) -#endif -typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; -]], [])[extern int _nl_msg_cat_cntr; -extern int *_nl_domain_bindings;], - [bindtextdomain ("", ""); -return * gettext ("")]ifelse([$2], [need-ngettext], [ + * ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_domain_bindings], - gt_cv_func_gnugettext_libc=yes, - gt_cv_func_gnugettext_libc=no)]) - - if test "$gt_cv_func_gnugettext_libc" != "yes"; then - dnl Sometimes libintl requires libiconv, so first search for libiconv. - ifelse(gt_included_intl, yes, , [ - AM_ICONV_LINK - ]) - dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL - dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv]) - dnl because that would add "-liconv" to LIBINTL and LTLIBINTL - dnl even if libiconv doesn't exist. - AC_LIB_LINKFLAGS_BODY([intl]) - AC_CACHE_CHECK([for GNU gettext in libintl], - gt_cv_func_gnugettext_libintl, - [gt_save_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS $INCINTL" - gt_save_LIBS="$LIBS" - LIBS="$LIBS $LIBINTL" - dnl Now see whether libintl exists and does not depend on libiconv. - AC_TRY_LINK([#include <libintl.h> -]ifelse([$2], [need-formatstring-macros], -[[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION -#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1) -#endif -typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; -]], [])[extern int _nl_msg_cat_cntr; -extern -#ifdef __cplusplus -"C" -#endif -const char *_nl_expand_alias (const char *);], - [bindtextdomain ("", ""); -return * gettext ("")]ifelse([$2], [need-ngettext], [ + * ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias ("")], - gt_cv_func_gnugettext_libintl=yes, - gt_cv_func_gnugettext_libintl=no) - dnl Now see whether libintl exists and depends on libiconv. - if test "$gt_cv_func_gnugettext_libintl" != yes && test -n "$LIBICONV"; then - LIBS="$LIBS $LIBICONV" - AC_TRY_LINK([#include <libintl.h> -]ifelse([$2], [need-formatstring-macros], -[[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION -#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1) -#endif -typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; -]], [])[extern int _nl_msg_cat_cntr; -extern -#ifdef __cplusplus -"C" -#endif -const char *_nl_expand_alias (const char *);], - [bindtextdomain ("", ""); -return * gettext ("")]ifelse([$2], [need-ngettext], [ + * ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias ("")], - [LIBINTL="$LIBINTL $LIBICONV" - LTLIBINTL="$LTLIBINTL $LTLIBICONV" - gt_cv_func_gnugettext_libintl=yes - ]) - fi - CPPFLAGS="$gt_save_CPPFLAGS" - LIBS="$gt_save_LIBS"]) - fi - - dnl If an already present or preinstalled GNU gettext() is found, - dnl use it. But if this macro is used in GNU gettext, and GNU - dnl gettext is already preinstalled in libintl, we update this - dnl libintl. (Cf. the install rule in intl/Makefile.in.) - if test "$gt_cv_func_gnugettext_libc" = "yes" \ - || { test "$gt_cv_func_gnugettext_libintl" = "yes" \ - && test "$PACKAGE" != gettext-runtime \ - && test "$PACKAGE" != gettext-tools; }; then - gt_use_preinstalled_gnugettext=yes - else - dnl Reset the values set by searching for libintl. - LIBINTL= - LTLIBINTL= - INCINTL= - fi - - ifelse(gt_included_intl, yes, [ - if test "$gt_use_preinstalled_gnugettext" != "yes"; then - dnl GNU gettext is not found in the C library. - dnl Fall back on included GNU gettext library. - nls_cv_use_gnu_gettext=yes - fi - fi - - if test "$nls_cv_use_gnu_gettext" = "yes"; then - dnl Mark actions used to generate GNU NLS library. - BUILD_INCLUDED_LIBINTL=yes - USE_INCLUDED_LIBINTL=yes - LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV $LIBTHREAD" - LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV $LTLIBTHREAD" - LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'` - fi - - CATOBJEXT= - if test "$gt_use_preinstalled_gnugettext" = "yes" \ - || test "$nls_cv_use_gnu_gettext" = "yes"; then - dnl Mark actions to use GNU gettext tools. - CATOBJEXT=.gmo - fi - ]) - - if test -n "$INTL_MACOSX_LIBS"; then - if test "$gt_use_preinstalled_gnugettext" = "yes" \ - || test "$nls_cv_use_gnu_gettext" = "yes"; then - dnl Some extra flags are needed during linking. - LIBINTL="$LIBINTL $INTL_MACOSX_LIBS" - LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS" - fi - fi - - if test "$gt_use_preinstalled_gnugettext" = "yes" \ - || test "$nls_cv_use_gnu_gettext" = "yes"; then - AC_DEFINE(ENABLE_NLS, 1, - [Define to 1 if translation of program messages to the user's native language - is requested.]) - else - USE_NLS=no - fi - fi - - AC_MSG_CHECKING([whether to use NLS]) - AC_MSG_RESULT([$USE_NLS]) - if test "$USE_NLS" = "yes"; then - AC_MSG_CHECKING([where the gettext function comes from]) - if test "$gt_use_preinstalled_gnugettext" = "yes"; then - if test "$gt_cv_func_gnugettext_libintl" = "yes"; then - gt_source="external libintl" - else - gt_source="libc" - fi - else - gt_source="included intl directory" - fi - AC_MSG_RESULT([$gt_source]) - fi - - if test "$USE_NLS" = "yes"; then - - if test "$gt_use_preinstalled_gnugettext" = "yes"; then - if test "$gt_cv_func_gnugettext_libintl" = "yes"; then - AC_MSG_CHECKING([how to link with libintl]) - AC_MSG_RESULT([$LIBINTL]) - AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL]) - fi - - dnl For backward compatibility. Some packages may be using this. - AC_DEFINE(HAVE_GETTEXT, 1, - [Define if the GNU gettext() function is already present or preinstalled.]) - AC_DEFINE(HAVE_DCGETTEXT, 1, - [Define if the GNU dcgettext() function is already present or preinstalled.]) - fi - - dnl We need to process the po/ directory. - POSUB=po - fi - - ifelse(gt_included_intl, yes, [ - dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL - dnl to 'yes' because some of the testsuite requires it. - if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then - BUILD_INCLUDED_LIBINTL=yes - fi - - dnl Make all variables we use known to autoconf. - AC_SUBST(BUILD_INCLUDED_LIBINTL) - AC_SUBST(USE_INCLUDED_LIBINTL) - AC_SUBST(CATOBJEXT) - - dnl For backward compatibility. Some configure.ins may be using this. - nls_cv_header_intl= - nls_cv_header_libgt= - - dnl For backward compatibility. Some Makefiles may be using this. - DATADIRNAME=share - AC_SUBST(DATADIRNAME) - - dnl For backward compatibility. Some Makefiles may be using this. - INSTOBJEXT=.mo - AC_SUBST(INSTOBJEXT) - - dnl For backward compatibility. Some Makefiles may be using this. - GENCAT=gencat - AC_SUBST(GENCAT) - - dnl For backward compatibility. Some Makefiles may be using this. - INTLOBJS= - if test "$USE_INCLUDED_LIBINTL" = yes; then - INTLOBJS="\$(GETTOBJS)" - fi - AC_SUBST(INTLOBJS) - - dnl Enable libtool support if the surrounding package wishes it. - INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix - AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX) - ]) - - dnl For backward compatibility. Some Makefiles may be using this. - INTLLIBS="$LIBINTL" - AC_SUBST(INTLLIBS) - - dnl Make all documented variables known to autoconf. - AC_SUBST(LIBINTL) - AC_SUBST(LTLIBINTL) - AC_SUBST(POSUB) -]) - - -dnl Checks for all prerequisites of the intl subdirectory, -dnl except for INTL_LIBTOOL_SUFFIX_PREFIX (and possibly LIBTOOL), INTLOBJS, -dnl USE_INCLUDED_LIBINTL, BUILD_INCLUDED_LIBINTL. -AC_DEFUN([AM_INTL_SUBDIR], -[ - AC_REQUIRE([AC_PROG_INSTALL])dnl - AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake - AC_REQUIRE([AC_PROG_CC])dnl - AC_REQUIRE([AC_CANONICAL_HOST])dnl - AC_REQUIRE([gt_GLIBC2])dnl - AC_REQUIRE([AC_PROG_RANLIB])dnl - AC_REQUIRE([gl_VISIBILITY])dnl - AC_REQUIRE([gt_INTL_SUBDIR_CORE])dnl - AC_REQUIRE([bh_C_SIGNED])dnl - AC_REQUIRE([gl_AC_TYPE_LONG_LONG])dnl - AC_REQUIRE([gt_TYPE_LONGDOUBLE])dnl - AC_REQUIRE([gt_TYPE_WCHAR_T])dnl - AC_REQUIRE([gt_TYPE_WINT_T])dnl - AC_REQUIRE([gl_AC_HEADER_INTTYPES_H]) - AC_REQUIRE([gt_TYPE_INTMAX_T]) - AC_REQUIRE([gt_PRINTF_POSIX]) - AC_REQUIRE([gl_GLIBC21])dnl - AC_REQUIRE([gl_XSIZE])dnl - AC_REQUIRE([gt_INTL_MACOSX])dnl - - AC_CHECK_TYPE([ptrdiff_t], , - [AC_DEFINE([ptrdiff_t], [long], - [Define as the type of the result of subtracting two pointers, if the system doesn't define it.]) - ]) - AC_CHECK_HEADERS([stddef.h stdlib.h string.h]) - AC_CHECK_FUNCS([asprintf fwprintf putenv setenv setlocale snprintf wcslen]) - - dnl Use the _snprintf function only if it is declared (because on NetBSD it - dnl is defined as a weak alias of snprintf; we prefer to use the latter). - gt_CHECK_DECL(_snprintf, [#include <stdio.h>]) - gt_CHECK_DECL(_snwprintf, [#include <stdio.h>]) - - dnl Use the *_unlocked functions only if they are declared. - dnl (because some of them were defined without being declared in Solaris - dnl 2.5.1 but were removed in Solaris 2.6, whereas we want binaries built - dnl on Solaris 2.5.1 to run on Solaris 2.6). - dnl Don't use AC_CHECK_DECLS because it isn't supported in autoconf-2.13. - gt_CHECK_DECL(getc_unlocked, [#include <stdio.h>]) - - case $gt_cv_func_printf_posix in - *yes) HAVE_POSIX_PRINTF=1 ;; - *) HAVE_POSIX_PRINTF=0 ;; - esac - AC_SUBST([HAVE_POSIX_PRINTF]) - if test "$ac_cv_func_asprintf" = yes; then - HAVE_ASPRINTF=1 - else - HAVE_ASPRINTF=0 - fi - AC_SUBST([HAVE_ASPRINTF]) - if test "$ac_cv_func_snprintf" = yes; then - HAVE_SNPRINTF=1 - else - HAVE_SNPRINTF=0 - fi - AC_SUBST([HAVE_SNPRINTF]) - if test "$ac_cv_func_wprintf" = yes; then - HAVE_WPRINTF=1 - else - HAVE_WPRINTF=0 - fi - AC_SUBST([HAVE_WPRINTF]) - - AM_LANGINFO_CODESET - gt_LC_MESSAGES - - dnl Compilation on mingw and Cygwin needs special Makefile rules, because - dnl 1. when we install a shared library, we must arrange to export - dnl auxiliary pointer variables for every exported variable, - dnl 2. when we install a shared library and a static library simultaneously, - dnl the include file specifies __declspec(dllimport) and therefore we - dnl must arrange to define the auxiliary pointer variables for the - dnl exported variables _also_ in the static library. - if test "$enable_shared" = yes; then - case "$host_os" in - cygwin*) is_woe32dll=yes ;; - *) is_woe32dll=no ;; - esac - else - is_woe32dll=no - fi - WOE32DLL=$is_woe32dll - AC_SUBST([WOE32DLL]) - - dnl Rename some macros and functions used for locking. - AH_BOTTOM([ -#define __libc_lock_t gl_lock_t -#define __libc_lock_define gl_lock_define -#define __libc_lock_define_initialized gl_lock_define_initialized -#define __libc_lock_init gl_lock_init -#define __libc_lock_lock gl_lock_lock -#define __libc_lock_unlock gl_lock_unlock -#define __libc_lock_recursive_t gl_recursive_lock_t -#define __libc_lock_define_recursive gl_recursive_lock_define -#define __libc_lock_define_initialized_recursive gl_recursive_lock_define_initialized -#define __libc_lock_init_recursive gl_recursive_lock_init -#define __libc_lock_lock_recursive gl_recursive_lock_lock -#define __libc_lock_unlock_recursive gl_recursive_lock_unlock -#define glthread_in_use libintl_thread_in_use -#define glthread_lock_init libintl_lock_init -#define glthread_lock_lock libintl_lock_lock -#define glthread_lock_unlock libintl_lock_unlock -#define glthread_lock_destroy libintl_lock_destroy -#define glthread_rwlock_init libintl_rwlock_init -#define glthread_rwlock_rdlock libintl_rwlock_rdlock -#define glthread_rwlock_wrlock libintl_rwlock_wrlock -#define glthread_rwlock_unlock libintl_rwlock_unlock -#define glthread_rwlock_destroy libintl_rwlock_destroy -#define glthread_recursive_lock_init libintl_recursive_lock_init -#define glthread_recursive_lock_lock libintl_recursive_lock_lock -#define glthread_recursive_lock_unlock libintl_recursive_lock_unlock -#define glthread_recursive_lock_destroy libintl_recursive_lock_destroy -#define glthread_once libintl_once -#define glthread_once_call libintl_once_call -#define glthread_once_singlethreaded libintl_once_singlethreaded -]) -]) - - -dnl Checks for the core files of the intl subdirectory: -dnl dcigettext.c -dnl eval-plural.h -dnl explodename.c -dnl finddomain.c -dnl gettextP.h -dnl gmo.h -dnl hash-string.h hash-string.c -dnl l10nflist.c -dnl libgnuintl.h.in (except the *printf stuff) -dnl loadinfo.h -dnl loadmsgcat.c -dnl localealias.c -dnl log.c -dnl plural-exp.h plural-exp.c -dnl plural.y -dnl Used by libglocale. -AC_DEFUN([gt_INTL_SUBDIR_CORE], -[ - AC_REQUIRE([AC_C_INLINE])dnl - AC_REQUIRE([AC_TYPE_SIZE_T])dnl - AC_REQUIRE([gl_AC_HEADER_STDINT_H]) - AC_REQUIRE([AC_FUNC_ALLOCA])dnl - AC_REQUIRE([AC_FUNC_MMAP])dnl - AC_REQUIRE([gt_INTDIV0])dnl - AC_REQUIRE([gl_AC_TYPE_UINTMAX_T])dnl - AC_REQUIRE([gl_HEADER_INTTYPES_H])dnl - AC_REQUIRE([gt_INTTYPES_PRI])dnl - AC_REQUIRE([gl_LOCK])dnl - - AC_TRY_LINK( - [int foo (int a) { a = __builtin_expect (a, 10); return a == 10 ? 0 : 1; }], - [], - [AC_DEFINE([HAVE_BUILTIN_EXPECT], 1, - [Define to 1 if the compiler understands __builtin_expect.])]) - - AC_CHECK_HEADERS([argz.h limits.h unistd.h sys/param.h]) - AC_CHECK_FUNCS([getcwd getegid geteuid getgid getuid mempcpy munmap \ - stpcpy strcasecmp strdup strtoul tsearch argz_count argz_stringify \ - argz_next __fsetlocking]) - - dnl Use the *_unlocked functions only if they are declared. - dnl (because some of them were defined without being declared in Solaris - dnl 2.5.1 but were removed in Solaris 2.6, whereas we want binaries built - dnl on Solaris 2.5.1 to run on Solaris 2.6). - dnl Don't use AC_CHECK_DECLS because it isn't supported in autoconf-2.13. - gt_CHECK_DECL(feof_unlocked, [#include <stdio.h>]) - gt_CHECK_DECL(fgets_unlocked, [#include <stdio.h>]) - - AM_ICONV - - dnl glibc >= 2.4 has a NL_LOCALE_NAME macro when _GNU_SOURCE is defined, - dnl and a _NL_LOCALE_NAME macro always. - AC_CACHE_CHECK([for NL_LOCALE_NAME macro], gt_cv_nl_locale_name, - [AC_TRY_LINK([#include <langinfo.h> -#include <locale.h>], - [char* cs = nl_langinfo(_NL_LOCALE_NAME(LC_MESSAGES));], - gt_cv_nl_locale_name=yes, - gt_cv_nl_locale_name=no) - ]) - if test $gt_cv_nl_locale_name = yes; then - AC_DEFINE(HAVE_NL_LOCALE_NAME, 1, - [Define if you have <langinfo.h> and it defines the NL_LOCALE_NAME macro if _GNU_SOURCE is defined.]) - fi - - dnl intl/plural.c is generated from intl/plural.y. It requires bison, - dnl because plural.y uses bison specific features. It requires at least - dnl bison-1.26 because earlier versions generate a plural.c that doesn't - dnl compile. - dnl bison is only needed for the maintainer (who touches plural.y). But in - dnl order to avoid separate Makefiles or --enable-maintainer-mode, we put - dnl the rule in general Makefile. Now, some people carelessly touch the - dnl files or have a broken "make" program, hence the plural.c rule will - dnl sometimes fire. To avoid an error, defines BISON to ":" if it is not - dnl present or too old. - AC_CHECK_PROGS([INTLBISON], [bison]) - if test -z "$INTLBISON"; then - ac_verc_fail=yes - else - dnl Found it, now check the version. - AC_MSG_CHECKING([version of bison]) -changequote(<<,>>)dnl - ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'` - case $ac_prog_version in - '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; - 1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*) -changequote([,])dnl - ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; - *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; - esac - AC_MSG_RESULT([$ac_prog_version]) - fi - if test $ac_verc_fail = yes; then - INTLBISON=: - fi -]) - - -dnl Checks for special options needed on MacOS X. -dnl Defines INTL_MACOSX_LIBS. -AC_DEFUN([gt_INTL_MACOSX], -[ - dnl Check for API introduced in MacOS X 10.2. - AC_CACHE_CHECK([for CFPreferencesCopyAppValue], - gt_cv_func_CFPreferencesCopyAppValue, - [gt_save_LIBS="$LIBS" - LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" - AC_TRY_LINK([#include <CoreFoundation/CFPreferences.h>], - [CFPreferencesCopyAppValue(NULL, NULL)], - [gt_cv_func_CFPreferencesCopyAppValue=yes], - [gt_cv_func_CFPreferencesCopyAppValue=no]) - LIBS="$gt_save_LIBS"]) - if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then - AC_DEFINE([HAVE_CFPREFERENCESCOPYAPPVALUE], 1, - [Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in the CoreFoundation framework.]) - fi - dnl Check for API introduced in MacOS X 10.3. - AC_CACHE_CHECK([for CFLocaleCopyCurrent], gt_cv_func_CFLocaleCopyCurrent, - [gt_save_LIBS="$LIBS" - LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" - AC_TRY_LINK([#include <CoreFoundation/CFLocale.h>], [CFLocaleCopyCurrent();], - [gt_cv_func_CFLocaleCopyCurrent=yes], - [gt_cv_func_CFLocaleCopyCurrent=no]) - LIBS="$gt_save_LIBS"]) - if test $gt_cv_func_CFLocaleCopyCurrent = yes; then - AC_DEFINE([HAVE_CFLOCALECOPYCURRENT], 1, - [Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the CoreFoundation framework.]) - fi - INTL_MACOSX_LIBS= - if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then - INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation" - fi - AC_SUBST([INTL_MACOSX_LIBS]) -]) - - -dnl gt_CHECK_DECL(FUNC, INCLUDES) -dnl Check whether a function is declared. -AC_DEFUN([gt_CHECK_DECL], -[ - AC_CACHE_CHECK([whether $1 is declared], ac_cv_have_decl_$1, - [AC_TRY_COMPILE([$2], [ -#ifndef $1 - char *p = (char *) $1; -#endif -], ac_cv_have_decl_$1=yes, ac_cv_have_decl_$1=no)]) - if test $ac_cv_have_decl_$1 = yes; then - gt_value=1 - else - gt_value=0 - fi - AC_DEFINE_UNQUOTED([HAVE_DECL_]translit($1, [a-z], [A-Z]), [$gt_value], - [Define to 1 if you have the declaration of `$1', and to 0 if you don't.]) -]) - - -dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version]) -AC_DEFUN([AM_GNU_GETTEXT_VERSION], []) diff --git a/m4/gettime.m4 b/m4/gettime.m4 deleted file mode 100644 index 0ae4c3908..000000000 --- a/m4/gettime.m4 +++ /dev/null @@ -1,16 +0,0 @@ -# gettime.m4 serial 5 -dnl Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_GETTIME], -[ - AC_LIBSOURCES([gettime.c]) - AC_LIBOBJ([gettime]) - - dnl Prerequisites of lib/gettime.c. - AC_REQUIRE([gl_CLOCK_TIME]) - AC_REQUIRE([gl_TIMESPEC]) - AC_CHECK_FUNCS_ONCE(gettimeofday nanotime) -]) diff --git a/m4/gettimeofday.m4 b/m4/gettimeofday.m4 deleted file mode 100644 index 2fdc531cb..000000000 --- a/m4/gettimeofday.m4 +++ /dev/null @@ -1,80 +0,0 @@ -#serial 7 - -# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -dnl From Jim Meyering. -dnl -dnl See if gettimeofday clobbers the static buffer that localtime uses -dnl for its return value. The gettimeofday function from Mac OS X 10.0.4 -dnl (i.e., Darwin 1.3.7) has this problem. -dnl -dnl If it does, then arrange to use gettimeofday and localtime only via -dnl the wrapper functions that work around the problem. - -AC_DEFUN([AC_FUNC_GETTIMEOFDAY_CLOBBER], -[ - AC_REQUIRE([AC_HEADER_TIME]) - AC_CACHE_CHECK([whether gettimeofday clobbers localtime buffer], - jm_cv_func_gettimeofday_clobber, - [AC_TRY_RUN([ -#include <stdio.h> -#include <string.h> - -#if TIME_WITH_SYS_TIME -# include <sys/time.h> -# include <time.h> -#else -# if HAVE_SYS_TIME_H -# include <sys/time.h> -# else -# include <time.h> -# endif -#endif - -#include <stdlib.h> - -int -main () -{ - time_t t = 0; - struct tm *lt; - struct tm saved_lt; - struct timeval tv; - lt = localtime (&t); - saved_lt = *lt; - gettimeofday (&tv, NULL); - if (memcmp (lt, &saved_lt, sizeof (struct tm)) != 0) - exit (1); - - exit (0); -} - ], - jm_cv_func_gettimeofday_clobber=no, - jm_cv_func_gettimeofday_clobber=yes, - dnl When crosscompiling, assume it is broken. - jm_cv_func_gettimeofday_clobber=yes) - ]) - if test $jm_cv_func_gettimeofday_clobber = yes; then - gl_GETTIMEOFDAY_REPLACE_LOCALTIME - - AC_DEFINE(gettimeofday, rpl_gettimeofday, - [Define to rpl_gettimeofday if the replacement function should be used.]) - gl_PREREQ_GETTIMEOFDAY - fi -]) - -AC_DEFUN([gl_GETTIMEOFDAY_REPLACE_LOCALTIME], [ - AC_LIBOBJ(gettimeofday) - AC_DEFINE(gmtime, rpl_gmtime, - [Define to rpl_gmtime if the replacement function should be used.]) - AC_DEFINE(localtime, rpl_localtime, - [Define to rpl_localtime if the replacement function should be used.]) -]) - -# Prerequisites of lib/gettimeofday.c. -AC_DEFUN([gl_PREREQ_GETTIMEOFDAY], [ - AC_REQUIRE([AC_HEADER_TIME]) -]) diff --git a/m4/getugroups.m4 b/m4/getugroups.m4 deleted file mode 100644 index 0369b07b3..000000000 --- a/m4/getugroups.m4 +++ /dev/null @@ -1,14 +0,0 @@ -# getugroups.m4 serial 5 -dnl Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_GETUGROUPS], -[ - AC_LIBSOURCES([getugroups.c]) - AC_LIBOBJ([getugroups]) - - dnl Prerequisites of lib/getugroups.c. - AC_TYPE_GETGROUPS -]) diff --git a/m4/getusershell.m4 b/m4/getusershell.m4 deleted file mode 100644 index de602d337..000000000 --- a/m4/getusershell.m4 +++ /dev/null @@ -1,10 +0,0 @@ -# getusershell.m4 serial 4 -dnl Copyright (C) 2002, 2003, 2006 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_FUNC_GETUSERSHELL], -[ - AC_REPLACE_FUNCS(getusershell) -]) diff --git a/m4/glibc21.m4 b/m4/glibc21.m4 deleted file mode 100644 index d95fd9861..000000000 --- a/m4/glibc21.m4 +++ /dev/null @@ -1,30 +0,0 @@ -# glibc21.m4 serial 3 -dnl Copyright (C) 2000-2002, 2004 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -# Test for the GNU C Library, version 2.1 or newer. -# From Bruno Haible. - -AC_DEFUN([gl_GLIBC21], - [ - AC_CACHE_CHECK(whether we are using the GNU C Library 2.1 or newer, - ac_cv_gnu_library_2_1, - [AC_EGREP_CPP([Lucky GNU user], - [ -#include <features.h> -#ifdef __GNU_LIBRARY__ - #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2) - Lucky GNU user - #endif -#endif - ], - ac_cv_gnu_library_2_1=yes, - ac_cv_gnu_library_2_1=no) - ] - ) - AC_SUBST(GLIBC21) - GLIBC21="$ac_cv_gnu_library_2_1" - ] -) diff --git a/m4/group-member.m4 b/m4/group-member.m4 deleted file mode 100644 index ab4a920ed..000000000 --- a/m4/group-member.m4 +++ /dev/null @@ -1,29 +0,0 @@ -#serial 9 - -# Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005 Free Software Foundation, Inc. -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -dnl Written by Jim Meyering - -AC_DEFUN([gl_FUNC_GROUP_MEMBER], -[ - AC_LIBSOURCES([group-member.c, group-member.h]) - - dnl Persuade glibc <unistd.h> to declare group_member(). - AC_REQUIRE([AC_GNU_SOURCE]) - - dnl Do this replacement check manually because I want the hyphen - dnl (not the underscore) in the filename. - AC_CHECK_FUNC(group_member, , [ - AC_LIBOBJ(group-member) - gl_PREREQ_GROUP_MEMBER - ]) -]) - -# Prerequisites of lib/group-member.c. -AC_DEFUN([gl_PREREQ_GROUP_MEMBER], -[ - AC_REQUIRE([AC_FUNC_GETGROUPS]) -]) diff --git a/m4/hard-locale.m4 b/m4/hard-locale.m4 deleted file mode 100644 index 640a75560..000000000 --- a/m4/hard-locale.m4 +++ /dev/null @@ -1,12 +0,0 @@ -# hard-locale.m4 serial 6 -dnl Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl No prerequisites of lib/hard-locale.c. -AC_DEFUN([gl_HARD_LOCALE], -[ - AC_LIBSOURCES([hard-locale.c, hard-locale.h]) - AC_LIBOBJ([hard-locale]) -]) diff --git a/m4/hash-pjw.m4 b/m4/hash-pjw.m4 deleted file mode 100644 index 08ee14b85..000000000 --- a/m4/hash-pjw.m4 +++ /dev/null @@ -1,14 +0,0 @@ -# hash-pjw.m4 serial 1 -dnl Copyright (C) 2005 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_HASH_PJW], -[ - AC_LIBSOURCES([hash-pjw.c, hash-pjw.h]) - AC_LIBOBJ([hash-pjw]) - - dnl prerequisites - dnl size_t and const; those aren't really worth mentioning anymore -]) diff --git a/m4/hash.m4 b/m4/hash.m4 deleted file mode 100644 index 948dd9720..000000000 --- a/m4/hash.m4 +++ /dev/null @@ -1,14 +0,0 @@ -# hash.m4 serial 5 -dnl Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_HASH], -[ - AC_LIBSOURCES([hash.c, hash.h]) - AC_LIBOBJ([hash]) - - dnl Prerequisites of lib/hash.c. - AC_REQUIRE([AM_STDBOOL_H]) -]) diff --git a/m4/host-os.m4 b/m4/host-os.m4 deleted file mode 100644 index 2e32329ae..000000000 --- a/m4/host-os.m4 +++ /dev/null @@ -1,81 +0,0 @@ -#serial 5 - -# Copyright (C) 2001, 2003, 2004 Free Software Foundation, Inc. -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# Written by Paul Eggert. - -dnl From Paul Eggert. - -# Define HOST_OPERATING_SYSTEM to a name for the host operating system. -AC_DEFUN([gl_HOST_OS], -[ - AC_CACHE_CHECK([host operating system], - gl_cv_host_operating_system, - - [[case $host_os in - - # These operating system names do not use the default heuristic below. - # They are in reverse order, so that more-specific prefixes come first. - winnt*) os='Windows NT';; - vos*) os='VOS';; - sysv*) os='Unix System V';; - superux*) os='SUPER-UX';; - sunos*) os='SunOS';; - stop*) os='STOP';; - sco*) os='SCO Unix';; - riscos*) os='RISC OS';; - riscix*) os='RISCiX';; - qnx*) os='QNX';; - pw32*) os='PW32';; - ptx*) os='ptx';; - plan9*) os='Plan 9';; - osf*) os='Tru64';; - os2*) os='OS/2';; - openbsd*) os='OpenBSD';; - nsk*) os='NonStop Kernel';; - nonstopux*) os='NonStop-UX';; - netbsd*-gnu*) os='GNU/NetBSD';; # NetBSD kernel+libc, GNU userland - netbsd*) os='NetBSD';; - knetbsd*-gnu) os='GNU/kNetBSD';; # NetBSD kernel, GNU libc+userland - kfreebsd*-gnu) os='GNU/kFreeBSD';; # FreeBSD kernel, GNU libc+userland - msdosdjgpp*) os='DJGPP';; - mpeix*) os='MPE/iX';; - mint*) os='MiNT';; - mingw*) os='MinGW';; - lynxos*) os='LynxOS';; - linux*) os='GNU/Linux';; - hpux*) os='HP-UX';; - hiux*) os='HI-UX';; - gnu*) os='GNU';; - freebsd*) os='FreeBSD';; - dgux*) os='DG/UX';; - bsdi*) os='BSD/OS';; - bsd*) os='BSD';; - beos*) os='BeOS';; - aux*) os='A/UX';; - atheos*) os='AtheOS';; - amigaos*) os='Amiga OS';; - aix*) os='AIX';; - - # The default heuristic takes the initial alphabetic string - # from $host_os, but capitalizes its first letter. - [A-Za-z]*) - os=` - expr "X$host_os" : 'X\([A-Za-z]\)' | tr '[a-z]' '[A-Z]' - `` - expr "X$host_os" : 'X.\([A-Za-z]*\)' - ` - ;; - - # If $host_os does not start with an alphabetic string, use it unchanged. - *) - os=$host_os;; - esac - gl_cv_host_operating_system=$os]]) - AC_DEFINE_UNQUOTED(HOST_OPERATING_SYSTEM, - "$gl_cv_host_operating_system", - [The host operating system.]) -]) diff --git a/m4/human.m4 b/m4/human.m4 deleted file mode 100644 index 1787c48f9..000000000 --- a/m4/human.m4 +++ /dev/null @@ -1,18 +0,0 @@ -#serial 9 -dnl Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_HUMAN], -[ - AC_LIBSOURCES([human.c, human.h, intprops.h]) - AC_LIBOBJ([human]) - - dnl Prerequisites of lib/human.h. - AC_REQUIRE([AM_STDBOOL_H]) - AC_REQUIRE([gl_AC_TYPE_UINTMAX_T]) - - dnl Prerequisites of lib/human.c. - : -]) diff --git a/m4/iconv.m4 b/m4/iconv.m4 deleted file mode 100644 index 654c41589..000000000 --- a/m4/iconv.m4 +++ /dev/null @@ -1,101 +0,0 @@ -# iconv.m4 serial AM4 (gettext-0.11.3) -dnl Copyright (C) 2000-2002 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Bruno Haible. - -AC_DEFUN([AM_ICONV_LINKFLAGS_BODY], -[ - dnl Prerequisites of AC_LIB_LINKFLAGS_BODY. - AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) - AC_REQUIRE([AC_LIB_RPATH]) - - dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV - dnl accordingly. - AC_LIB_LINKFLAGS_BODY([iconv]) -]) - -AC_DEFUN([AM_ICONV_LINK], -[ - dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and - dnl those with the standalone portable GNU libiconv installed). - - dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV - dnl accordingly. - AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) - - dnl Add $INCICONV to CPPFLAGS before performing the following checks, - dnl because if the user has installed libiconv and not disabled its use - dnl via --without-libiconv-prefix, he wants to use it. The first - dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed. - am_save_CPPFLAGS="$CPPFLAGS" - AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV]) - - 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 $LIBICONV" - 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.]) - fi - if test "$am_cv_lib_iconv" = yes; then - AC_MSG_CHECKING([how to link with libiconv]) - AC_MSG_RESULT([$LIBICONV]) - else - dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV - dnl either. - CPPFLAGS="$am_save_CPPFLAGS" - LIBICONV= - LTLIBICONV= - fi - AC_SUBST(LIBICONV) - AC_SUBST(LTLIBICONV) -]) - -AC_DEFUN([AM_ICONV], -[ - AM_ICONV_LINK - if test "$am_cv_func_iconv" = yes; then - 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 -]) diff --git a/m4/idcache.m4 b/m4/idcache.m4 deleted file mode 100644 index 804ce42a1..000000000 --- a/m4/idcache.m4 +++ /dev/null @@ -1,11 +0,0 @@ -# idcache.m4 serial 5 -dnl Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_IDCACHE], -[ - AC_LIBSOURCES([idcache.c]) - AC_LIBOBJ([idcache]) -]) diff --git a/m4/inet_ntop.m4 b/m4/inet_ntop.m4 deleted file mode 100644 index bb02d2298..000000000 --- a/m4/inet_ntop.m4 +++ /dev/null @@ -1,19 +0,0 @@ -# inet_ntop.m4 serial 3 -dnl Copyright (C) 2005, 2006 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_INET_NTOP], -[ - AC_REPLACE_FUNCS(inet_ntop) - gl_PREREQ_INET_NTOP -]) - -# Prerequisites of lib/inet_ntop.h and lib/inet_ntop.c. -AC_DEFUN([gl_PREREQ_INET_NTOP], [ - AC_CHECK_HEADERS_ONCE([netinet/in.h arpa/inet.h]) - AC_CHECK_DECLS([inet_ntop],,,[#include <arpa/inet.h>]) - AC_REQUIRE([gl_SOCKET_FAMILIES]) - AC_REQUIRE([AC_C_RESTRICT]) -]) diff --git a/m4/intmax_t.m4 b/m4/intmax_t.m4 deleted file mode 100644 index 44b16523c..000000000 --- a/m4/intmax_t.m4 +++ /dev/null @@ -1,61 +0,0 @@ -# intmax_t.m4 serial 4 -dnl Copyright (C) 1997-2004 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Paul Eggert. - -AC_PREREQ(2.13) - -# Define intmax_t to 'long' or 'long long' -# if it is not already defined in <stdint.h> or <inttypes.h>. - -AC_DEFUN([gl_AC_TYPE_INTMAX_T], -[ - dnl For simplicity, we assume that a header file defines 'intmax_t' if and - dnl only if it defines 'uintmax_t'. - AC_REQUIRE([gl_AC_HEADER_INTTYPES_H]) - AC_REQUIRE([gl_AC_HEADER_STDINT_H]) - if test $gl_cv_header_inttypes_h = no && test $gl_cv_header_stdint_h = no; then - AC_REQUIRE([gl_AC_TYPE_LONG_LONG]) - test $ac_cv_type_long_long = yes \ - && ac_type='long long' \ - || ac_type='long' - AC_DEFINE_UNQUOTED(intmax_t, $ac_type, - [Define to long or long long if <inttypes.h> and <stdint.h> don't define.]) - else - AC_DEFINE(HAVE_INTMAX_T, 1, - [Define if you have the 'intmax_t' type in <stdint.h> or <inttypes.h>.]) - fi -]) - -dnl An alternative would be to explicitly test for 'intmax_t'. - -AC_DEFUN([gt_AC_TYPE_INTMAX_T], -[ - AC_REQUIRE([gl_AC_HEADER_INTTYPES_H]) - AC_REQUIRE([gl_AC_HEADER_STDINT_H]) - AC_CACHE_CHECK(for intmax_t, gt_cv_c_intmax_t, - [AC_TRY_COMPILE([ -#include <stddef.h> -#include <stdlib.h> -#if HAVE_STDINT_H_WITH_UINTMAX -#include <stdint.h> -#endif -#if HAVE_INTTYPES_H_WITH_UINTMAX -#include <inttypes.h> -#endif -], [intmax_t x = -1;], gt_cv_c_intmax_t=yes, gt_cv_c_intmax_t=no)]) - if test $gt_cv_c_intmax_t = yes; then - AC_DEFINE(HAVE_INTMAX_T, 1, - [Define if you have the 'intmax_t' type in <stdint.h> or <inttypes.h>.]) - else - AC_REQUIRE([gl_AC_TYPE_LONG_LONG]) - test $ac_cv_type_long_long = yes \ - && ac_type='long long' \ - || ac_type='long' - AC_DEFINE_UNQUOTED(intmax_t, $ac_type, - [Define to long or long long if <stdint.h> and <inttypes.h> don't define.]) - fi -]) diff --git a/m4/inttostr.m4 b/m4/inttostr.m4 deleted file mode 100644 index 600c82ca9..000000000 --- a/m4/inttostr.m4 +++ /dev/null @@ -1,41 +0,0 @@ -#serial 5 -dnl Copyright (C) 2004, 2005 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_INTTOSTR], -[ - AC_LIBSOURCES([inttostr.c, inttostr.h, intprops.h]) - - dnl We don't technically need to list the following .c files, since their - dnl functions are named in the AC_LIBOBJ calls, but this is an unusual - dnl module and it seems a little clearer to do so. - AC_LIBSOURCES([imaxtostr.c, offtostr.c, umaxtostr.c]) - - AC_LIBOBJ([imaxtostr]) - AC_LIBOBJ([offtostr]) - AC_LIBOBJ([umaxtostr]) - - gl_PREREQ_INTTOSTR - gl_PREREQ_IMAXTOSTR - gl_PREREQ_OFFTOSTR - gl_PREREQ_UMAXTOSTR -]) - -# Prerequisites of lib/inttostr.h. -AC_DEFUN([gl_PREREQ_INTTOSTR], [ - AC_REQUIRE([gl_AC_TYPE_INTMAX_T]) - AC_REQUIRE([gl_AC_TYPE_UINTMAX_T]) - AC_REQUIRE([AC_TYPE_OFF_T]) - : -]) - -# Prerequisites of lib/imaxtostr.c. -AC_DEFUN([gl_PREREQ_IMAXTOSTR], [:]) - -# Prerequisites of lib/offtostr.c. -AC_DEFUN([gl_PREREQ_OFFTOSTR], [:]) - -# Prerequisites of lib/umaxtostr.c. -AC_DEFUN([gl_PREREQ_UMAXTOSTR], [:]) diff --git a/m4/inttypes-h.m4 b/m4/inttypes-h.m4 deleted file mode 100644 index d7ec94c5a..000000000 --- a/m4/inttypes-h.m4 +++ /dev/null @@ -1,25 +0,0 @@ -# inttypes-h.m4 serial 1 (gettext-0.15) -dnl Copyright (C) 1997-2002, 2006 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Paul Eggert. - -# Define HAVE_INTTYPES_H if <inttypes.h> exists and doesn't clash with -# <sys/types.h>. - -AC_DEFUN([gl_HEADER_INTTYPES_H], -[ - AC_CACHE_CHECK([for inttypes.h], gl_cv_header_inttypes_h, - [ - AC_TRY_COMPILE( - [#include <sys/types.h> -#include <inttypes.h>], - [], gl_cv_header_inttypes_h=yes, gl_cv_header_inttypes_h=no) - ]) - if test $gl_cv_header_inttypes_h = yes; then - AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H, 1, - [Define if <inttypes.h> exists and doesn't clash with <sys/types.h>.]) - fi -]) diff --git a/m4/inttypes-pri.m4 b/m4/inttypes-pri.m4 deleted file mode 100644 index ef00da742..000000000 --- a/m4/inttypes-pri.m4 +++ /dev/null @@ -1,30 +0,0 @@ -# inttypes-pri.m4 serial 2 (gettext-0.15) -dnl Copyright (C) 1997-2002, 2006 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Bruno Haible. - -# Define PRI_MACROS_BROKEN if <inttypes.h> exists and defines the PRI* -# macros to non-string values. This is the case on AIX 4.3.3. - -AC_DEFUN([gt_INTTYPES_PRI], -[ - AC_REQUIRE([gl_HEADER_INTTYPES_H]) - if test $gl_cv_header_inttypes_h = yes; then - AC_CACHE_CHECK([whether the inttypes.h PRIxNN macros are broken], - gt_cv_inttypes_pri_broken, - [ - AC_TRY_COMPILE([#include <inttypes.h> -#ifdef PRId32 -char *p = PRId32; -#endif -], [], gt_cv_inttypes_pri_broken=no, gt_cv_inttypes_pri_broken=yes) - ]) - fi - if test "$gt_cv_inttypes_pri_broken" = yes; then - AC_DEFINE_UNQUOTED(PRI_MACROS_BROKEN, 1, - [Define if <inttypes.h> exists and defines unusable PRI* macros.]) - fi -]) diff --git a/m4/inttypes.m4 b/m4/inttypes.m4 deleted file mode 100644 index 779bcea05..000000000 --- a/m4/inttypes.m4 +++ /dev/null @@ -1,25 +0,0 @@ -# inttypes.m4 serial 1 (gettext-0.11.4) -dnl Copyright (C) 1997-2002 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Paul Eggert. - -# Define HAVE_INTTYPES_H if <inttypes.h> exists and doesn't clash with -# <sys/types.h>. - -AC_DEFUN([gt_HEADER_INTTYPES_H], -[ - AC_CACHE_CHECK([for inttypes.h], gt_cv_header_inttypes_h, - [ - AC_TRY_COMPILE( - [#include <sys/types.h> -#include <inttypes.h>], - [], gt_cv_header_inttypes_h=yes, gt_cv_header_inttypes_h=no) - ]) - if test $gt_cv_header_inttypes_h = yes; then - AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H, 1, - [Define if <inttypes.h> exists and doesn't clash with <sys/types.h>.]) - fi -]) diff --git a/m4/inttypes_h.m4 b/m4/inttypes_h.m4 deleted file mode 100644 index a5d075d96..000000000 --- a/m4/inttypes_h.m4 +++ /dev/null @@ -1,26 +0,0 @@ -# inttypes_h.m4 serial 6 -dnl Copyright (C) 1997-2004 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Paul Eggert. - -# Define HAVE_INTTYPES_H_WITH_UINTMAX if <inttypes.h> exists, -# doesn't clash with <sys/types.h>, and declares uintmax_t. - -AC_DEFUN([gl_AC_HEADER_INTTYPES_H], -[ - AC_CACHE_CHECK([for inttypes.h], gl_cv_header_inttypes_h, - [AC_TRY_COMPILE( - [#include <sys/types.h> -#include <inttypes.h>], - [uintmax_t i = (uintmax_t) -1;], - gl_cv_header_inttypes_h=yes, - gl_cv_header_inttypes_h=no)]) - if test $gl_cv_header_inttypes_h = yes; then - AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H_WITH_UINTMAX, 1, - [Define if <inttypes.h> exists, doesn't clash with <sys/types.h>, - and declares uintmax_t. ]) - fi -]) diff --git a/m4/isc-posix.m4 b/m4/isc-posix.m4 deleted file mode 100644 index 74dc8f26d..000000000 --- a/m4/isc-posix.m4 +++ /dev/null @@ -1,24 +0,0 @@ -# isc-posix.m4 serial 2 (gettext-0.11.2) -dnl Copyright (C) 1995-2002 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -# This file is not needed with autoconf-2.53 and newer. Remove it in 2005. - -# This test replaces the one in autoconf. -# Currently this macro should have the same name as the autoconf macro -# because gettext's gettext.m4 (distributed in the automake package) -# still uses it. Otherwise, the use in gettext.m4 makes autoheader -# give these diagnostics: -# configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX -# configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX - -undefine([AC_ISC_POSIX]) - -AC_DEFUN([AC_ISC_POSIX], - [ - dnl This test replaces the obsolescent AC_ISC_POSIX kludge. - AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"]) - ] -) diff --git a/m4/jm-winsz1.m4 b/m4/jm-winsz1.m4 deleted file mode 100644 index ce5eca00e..000000000 --- a/m4/jm-winsz1.m4 +++ /dev/null @@ -1,45 +0,0 @@ -#serial 8 - -# Copyright (C) 1996, 1999, 2001, 2002, 2004 Free Software Foundation, Inc. -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -dnl From Jim Meyering and Paul Eggert. -AC_DEFUN([gl_HEADER_TIOCGWINSZ_IN_TERMIOS_H], -[AC_REQUIRE([AC_SYS_POSIX_TERMIOS]) - AC_CACHE_CHECK([whether use of TIOCGWINSZ requires termios.h], - jm_cv_sys_tiocgwinsz_needs_termios_h, - [jm_cv_sys_tiocgwinsz_needs_termios_h=no - - if test $ac_cv_sys_posix_termios = yes; then - AC_EGREP_CPP([yes], - [#include <sys/types.h> -# include <termios.h> -# ifdef TIOCGWINSZ - yes -# endif - ], jm_cv_sys_tiocgwinsz_needs_termios_h=yes) - fi - ]) -]) - -AC_DEFUN([gl_WINSIZE_IN_PTEM], - [AC_REQUIRE([AC_SYS_POSIX_TERMIOS]) - AC_CACHE_CHECK([whether use of struct winsize requires sys/ptem.h], - jm_cv_sys_struct_winsize_needs_sys_ptem_h, - [jm_cv_sys_struct_winsize_needs_sys_ptem_h=yes - if test $ac_cv_sys_posix_termios = yes; then - AC_TRY_COMPILE([#include <termios.h>] - [struct winsize x;], - [jm_cv_sys_struct_winsize_needs_sys_ptem_h=no]) - fi - if test $jm_cv_sys_struct_winsize_needs_sys_ptem_h = yes; then - AC_TRY_COMPILE([#include <sys/ptem.h>], - [struct winsize x;], - [], [jm_cv_sys_struct_winsize_needs_sys_ptem_h=no]) - fi]) - if test $jm_cv_sys_struct_winsize_needs_sys_ptem_h = yes; then - AC_DEFINE([WINSIZE_IN_PTEM], 1, - [Define if sys/ptem.h is required for struct winsize.]) - fi]) diff --git a/m4/jm-winsz2.m4 b/m4/jm-winsz2.m4 deleted file mode 100644 index 66c504092..000000000 --- a/m4/jm-winsz2.m4 +++ /dev/null @@ -1,28 +0,0 @@ -#serial 6 - -# Copyright (C) 1996, 1999, 2001, 2004 Free Software Foundation, Inc. -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_HEADER_TIOCGWINSZ_NEEDS_SYS_IOCTL], -[AC_REQUIRE([gl_HEADER_TIOCGWINSZ_IN_TERMIOS_H]) - AC_CACHE_CHECK([whether use of TIOCGWINSZ requires sys/ioctl.h], - jm_cv_sys_tiocgwinsz_needs_sys_ioctl_h, - [jm_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no - - if test $jm_cv_sys_tiocgwinsz_needs_termios_h = no; then - AC_EGREP_CPP([yes], - [#include <sys/types.h> -# include <sys/ioctl.h> -# ifdef TIOCGWINSZ - yes -# endif - ], jm_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes) - fi - ]) - if test $jm_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then - AC_DEFINE(GWINSZ_IN_SYS_IOCTL, 1, - [Define if your system defines TIOCGWINSZ in sys/ioctl.h.]) - fi -]) diff --git a/m4/lchmod.m4 b/m4/lchmod.m4 deleted file mode 100644 index d035bba28..000000000 --- a/m4/lchmod.m4 +++ /dev/null @@ -1,15 +0,0 @@ -#serial 1 - -dnl Copyright (C) 2005 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Paul Eggert. -dnl Provide a replacement for lchmod on hosts that lack it. - -AC_DEFUN([gl_FUNC_LCHMOD], -[ - AC_LIBSOURCES([lchmod.h]) - AC_CHECK_FUNCS_ONCE([lchmod]) -]) diff --git a/m4/lchown.m4 b/m4/lchown.m4 deleted file mode 100644 index cbbbe34f1..000000000 --- a/m4/lchown.m4 +++ /dev/null @@ -1,18 +0,0 @@ -#serial 8 - -dnl Copyright (C) 1998, 2001, 2003, 2004, 2005 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Jim Meyering. -dnl Provide lchown on systems that lack it. - -AC_DEFUN([gl_FUNC_LCHOWN], -[ - AC_LIBSOURCES([lchown.c, lchown.h]) - AC_REQUIRE([AC_TYPE_UID_T]) - AC_REQUIRE([gl_FUNC_CHOWN]) - AC_REQUIRE([gl_STAT_MACROS]) - AC_REPLACE_FUNCS(lchown) -]) diff --git a/m4/lib-ignore.m4 b/m4/lib-ignore.m4 deleted file mode 100644 index e518f8113..000000000 --- a/m4/lib-ignore.m4 +++ /dev/null @@ -1,43 +0,0 @@ -# If possible, ignore libraries that are not depended on. - -dnl Copyright (C) 2006 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl Written by Paul Eggert. - -AC_DEFUN([gl_IGNORE_UNUSED_LIBRARIES], -[ - AC_CACHE_CHECK([for flag to ignore unused libraries], - [gl_cv_ignore_unused_libraries], - [gl_cv_ignore_unused_libraries=none - gl_saved_ldflags=$LDFLAGS - gl_saved_libs=$LIBS - # Link with -lm to detect binutils 2.16 bug with --as-needed; see - # <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00131.html>. - LIBS="$LIBS -lm" - # Use long option sequences like '-z ignore' to test for the feature, - # to forestall problems with linkers that have -z, -i, -g, -n, etc. flags. - # GCC + binutils likes '-Wl,--as-needed'. - # GCC + Solaris ld likes '-Wl,-z,ignore'. - # Sun C likes '-z ignore'. - # Don't try bare '--as-needed'; nothing likes it and the HP-UX 11.11 - # native cc issues annoying warnings and then ignores it, - # which would cause us to incorrectly conclude that it worked. - for gl_flags in \ - '-Wl,--as-needed' \ - '-Wl,-z,ignore' \ - '-z ignore' - do - LDFLAGS="$gl_flags $LDFLAGS" - AC_LINK_IFELSE([AC_LANG_PROGRAM()], - [gl_cv_ignore_unused_libraries=$gl_flags]) - LDFLAGS=$gl_saved_ldflags - test "$gl_cv_ignore_unused_libraries" != none && break - done - LIBS=$gl_saved_libs]) - - test "$gl_cv_ignore_unused_libraries" != none && - LDFLAGS="$LDFLAGS $gl_cv_ignore_unused_libraries" -]) diff --git a/m4/lib-ld.m4 b/m4/lib-ld.m4 deleted file mode 100644 index 96c4e2c33..000000000 --- a/m4/lib-ld.m4 +++ /dev/null @@ -1,110 +0,0 @@ -# lib-ld.m4 serial 3 (gettext-0.13) -dnl Copyright (C) 1996-2003 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl Subroutines of libtool.m4, -dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision -dnl with libtool.m4. - -dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no. -AC_DEFUN([AC_LIB_PROG_LD_GNU], -[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld, -[# I'd rather use --version here, but apparently some GNU ld's only accept -v. -case `$LD -v 2>&1 </dev/null` in -*GNU* | *'with BFD'*) - acl_cv_prog_gnu_ld=yes ;; -*) - acl_cv_prog_gnu_ld=no ;; -esac]) -with_gnu_ld=$acl_cv_prog_gnu_ld -]) - -dnl From libtool-1.4. Sets the variable LD. -AC_DEFUN([AC_LIB_PROG_LD], -[AC_ARG_WITH(gnu-ld, -[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]], -test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no) -AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([AC_CANONICAL_HOST])dnl -# Prepare PATH_SEPARATOR. -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh -fi -ac_prog=ld -if test "$GCC" = yes; then - # Check if gcc -print-prog-name=ld gives a path. - AC_MSG_CHECKING([for ld used by GCC]) - case $host in - *-*-mingw*) - # gcc leaves a trailing carriage return which upsets mingw - ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; - *) - ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; - esac - case $ac_prog in - # Accept absolute paths. - [[\\/]* | [A-Za-z]:[\\/]*)] - [re_direlt='/[^/][^/]*/\.\./'] - # Canonicalize the path of ld - ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` - while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do - ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` - done - test -z "$LD" && LD="$ac_prog" - ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac -elif test "$with_gnu_ld" = yes; then - AC_MSG_CHECKING([for GNU ld]) -else - AC_MSG_CHECKING([for non-GNU ld]) -fi -AC_CACHE_VAL(acl_cv_path_LD, -[if test -z "$LD"; then - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" - for ac_dir in $PATH; do - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - acl_cv_path_LD="$ac_dir/$ac_prog" - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some GNU ld's only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in - *GNU* | *'with BFD'*) - test "$with_gnu_ld" != no && break ;; - *) - test "$with_gnu_ld" != yes && break ;; - esac - fi - done - IFS="$ac_save_ifs" -else - acl_cv_path_LD="$LD" # Let the user override the test with a path. -fi]) -LD="$acl_cv_path_LD" -if test -n "$LD"; then - AC_MSG_RESULT($LD) -else - AC_MSG_RESULT(no) -fi -test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) -AC_LIB_PROG_LD_GNU -]) diff --git a/m4/lib-link.m4 b/m4/lib-link.m4 deleted file mode 100644 index 92929193f..000000000 --- a/m4/lib-link.m4 +++ /dev/null @@ -1,630 +0,0 @@ -# lib-link.m4 serial 8 (gettext-0.15) -dnl Copyright (C) 2001-2006 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Bruno Haible. - -AC_PREREQ(2.50) - -dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and -dnl the libraries corresponding to explicit and implicit dependencies. -dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and -dnl augments the CPPFLAGS variable. -AC_DEFUN([AC_LIB_LINKFLAGS], -[ - AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) - AC_REQUIRE([AC_LIB_RPATH]) - define([Name],[translit([$1],[./-], [___])]) - define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], - [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) - AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [ - AC_LIB_LINKFLAGS_BODY([$1], [$2]) - ac_cv_lib[]Name[]_libs="$LIB[]NAME" - ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME" - ac_cv_lib[]Name[]_cppflags="$INC[]NAME" - ]) - LIB[]NAME="$ac_cv_lib[]Name[]_libs" - LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs" - INC[]NAME="$ac_cv_lib[]Name[]_cppflags" - AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) - AC_SUBST([LIB]NAME) - AC_SUBST([LTLIB]NAME) - dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the - dnl results of this search when this library appears as a dependency. - HAVE_LIB[]NAME=yes - undefine([Name]) - undefine([NAME]) -]) - -dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode) -dnl searches for libname and the libraries corresponding to explicit and -dnl implicit dependencies, together with the specified include files and -dnl the ability to compile and link the specified testcode. If found, it -dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and -dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and -dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs -dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty. -AC_DEFUN([AC_LIB_HAVE_LINKFLAGS], -[ - AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) - AC_REQUIRE([AC_LIB_RPATH]) - define([Name],[translit([$1],[./-], [___])]) - define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], - [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) - - dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME - dnl accordingly. - AC_LIB_LINKFLAGS_BODY([$1], [$2]) - - dnl Add $INC[]NAME to CPPFLAGS before performing the following checks, - dnl because if the user has installed lib[]Name and not disabled its use - dnl via --without-lib[]Name-prefix, he wants to use it. - ac_save_CPPFLAGS="$CPPFLAGS" - AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) - - AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [ - ac_save_LIBS="$LIBS" - LIBS="$LIBS $LIB[]NAME" - AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no]) - LIBS="$ac_save_LIBS" - ]) - if test "$ac_cv_lib[]Name" = yes; then - HAVE_LIB[]NAME=yes - AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.]) - AC_MSG_CHECKING([how to link with lib[]$1]) - AC_MSG_RESULT([$LIB[]NAME]) - else - HAVE_LIB[]NAME=no - dnl If $LIB[]NAME didn't lead to a usable library, we don't need - dnl $INC[]NAME either. - CPPFLAGS="$ac_save_CPPFLAGS" - LIB[]NAME= - LTLIB[]NAME= - fi - AC_SUBST([HAVE_LIB]NAME) - AC_SUBST([LIB]NAME) - AC_SUBST([LTLIB]NAME) - undefine([Name]) - undefine([NAME]) -]) - -dnl Determine the platform dependent parameters needed to use rpath: -dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator, -dnl hardcode_direct, hardcode_minus_L. -AC_DEFUN([AC_LIB_RPATH], -[ - dnl Tell automake >= 1.10 to complain if config.rpath is missing. - m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])]) - AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS - AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld - AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host - AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir - AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [ - CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ - ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh - . ./conftest.sh - rm -f ./conftest.sh - acl_cv_rpath=done - ]) - wl="$acl_cv_wl" - libext="$acl_cv_libext" - shlibext="$acl_cv_shlibext" - hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" - hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" - hardcode_direct="$acl_cv_hardcode_direct" - hardcode_minus_L="$acl_cv_hardcode_minus_L" - dnl Determine whether the user wants rpath handling at all. - AC_ARG_ENABLE(rpath, - [ --disable-rpath do not hardcode runtime library paths], - :, enable_rpath=yes) -]) - -dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and -dnl the libraries corresponding to explicit and implicit dependencies. -dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables. -AC_DEFUN([AC_LIB_LINKFLAGS_BODY], -[ - AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) - define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], - [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) - dnl By default, look in $includedir and $libdir. - use_additional=yes - AC_LIB_WITH_FINAL_PREFIX([ - eval additional_includedir=\"$includedir\" - eval additional_libdir=\"$libdir\" - ]) - AC_LIB_ARG_WITH([lib$1-prefix], -[ --with-lib$1-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib - --without-lib$1-prefix don't search for lib$1 in includedir and libdir], -[ - if test "X$withval" = "Xno"; then - use_additional=no - else - if test "X$withval" = "X"; then - AC_LIB_WITH_FINAL_PREFIX([ - eval additional_includedir=\"$includedir\" - eval additional_libdir=\"$libdir\" - ]) - else - additional_includedir="$withval/include" - additional_libdir="$withval/$acl_libdirstem" - fi - fi -]) - dnl Search the library and its dependencies in $additional_libdir and - dnl $LDFLAGS. Using breadth-first-seach. - LIB[]NAME= - LTLIB[]NAME= - INC[]NAME= - rpathdirs= - ltrpathdirs= - names_already_handled= - names_next_round='$1 $2' - while test -n "$names_next_round"; do - names_this_round="$names_next_round" - names_next_round= - for name in $names_this_round; do - already_handled= - for n in $names_already_handled; do - if test "$n" = "$name"; then - already_handled=yes - break - fi - done - if test -z "$already_handled"; then - names_already_handled="$names_already_handled $name" - dnl See if it was already located by an earlier AC_LIB_LINKFLAGS - dnl or AC_LIB_HAVE_LINKFLAGS call. - uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` - eval value=\"\$HAVE_LIB$uppername\" - if test -n "$value"; then - if test "$value" = yes; then - eval value=\"\$LIB$uppername\" - test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value" - eval value=\"\$LTLIB$uppername\" - test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value" - else - dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined - dnl that this library doesn't exist. So just drop it. - : - fi - else - dnl Search the library lib$name in $additional_libdir and $LDFLAGS - dnl and the already constructed $LIBNAME/$LTLIBNAME. - found_dir= - found_la= - found_so= - found_a= - if test $use_additional = yes; then - if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then - found_dir="$additional_libdir" - found_so="$additional_libdir/lib$name.$shlibext" - if test -f "$additional_libdir/lib$name.la"; then - found_la="$additional_libdir/lib$name.la" - fi - else - if test -f "$additional_libdir/lib$name.$libext"; then - found_dir="$additional_libdir" - found_a="$additional_libdir/lib$name.$libext" - if test -f "$additional_libdir/lib$name.la"; then - found_la="$additional_libdir/lib$name.la" - fi - fi - fi - fi - if test "X$found_dir" = "X"; then - for x in $LDFLAGS $LTLIB[]NAME; do - AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) - case "$x" in - -L*) - dir=`echo "X$x" | sed -e 's/^X-L//'` - if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then - found_dir="$dir" - found_so="$dir/lib$name.$shlibext" - if test -f "$dir/lib$name.la"; then - found_la="$dir/lib$name.la" - fi - else - if test -f "$dir/lib$name.$libext"; then - found_dir="$dir" - found_a="$dir/lib$name.$libext" - if test -f "$dir/lib$name.la"; then - found_la="$dir/lib$name.la" - fi - fi - fi - ;; - esac - if test "X$found_dir" != "X"; then - break - fi - done - fi - if test "X$found_dir" != "X"; then - dnl Found the library. - LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name" - if test "X$found_so" != "X"; then - dnl Linking with a shared library. We attempt to hardcode its - dnl directory into the executable's runpath, unless it's the - dnl standard /usr/lib. - if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/$acl_libdirstem"; then - dnl No hardcoding is needed. - LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" - else - dnl Use an explicit option to hardcode DIR into the resulting - dnl binary. - dnl Potentially add DIR to ltrpathdirs. - dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. - haveit= - for x in $ltrpathdirs; do - if test "X$x" = "X$found_dir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - ltrpathdirs="$ltrpathdirs $found_dir" - fi - dnl The hardcoding into $LIBNAME is system dependent. - if test "$hardcode_direct" = yes; then - dnl Using DIR/libNAME.so during linking hardcodes DIR into the - dnl resulting binary. - LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" - else - if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then - dnl Use an explicit option to hardcode DIR into the resulting - dnl binary. - LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" - dnl Potentially add DIR to rpathdirs. - dnl The rpathdirs will be appended to $LIBNAME at the end. - haveit= - for x in $rpathdirs; do - if test "X$x" = "X$found_dir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - rpathdirs="$rpathdirs $found_dir" - fi - else - dnl Rely on "-L$found_dir". - dnl But don't add it if it's already contained in the LDFLAGS - dnl or the already constructed $LIBNAME - haveit= - for x in $LDFLAGS $LIB[]NAME; do - AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) - if test "X$x" = "X-L$found_dir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir" - fi - if test "$hardcode_minus_L" != no; then - dnl FIXME: Not sure whether we should use - dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" - dnl here. - LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" - else - dnl We cannot use $hardcode_runpath_var and LD_RUN_PATH - dnl here, because this doesn't fit in flags passed to the - dnl compiler. So give up. No hardcoding. This affects only - dnl very old systems. - dnl FIXME: Not sure whether we should use - dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" - dnl here. - LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" - fi - fi - fi - fi - else - if test "X$found_a" != "X"; then - dnl Linking with a static library. - LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a" - else - dnl We shouldn't come here, but anyway it's good to have a - dnl fallback. - LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name" - fi - fi - dnl Assume the include files are nearby. - additional_includedir= - case "$found_dir" in - */$acl_libdirstem | */$acl_libdirstem/) - basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` - additional_includedir="$basedir/include" - ;; - esac - if test "X$additional_includedir" != "X"; then - dnl Potentially add $additional_includedir to $INCNAME. - dnl But don't add it - dnl 1. if it's the standard /usr/include, - dnl 2. if it's /usr/local/include and we are using GCC on Linux, - dnl 3. if it's already present in $CPPFLAGS or the already - dnl constructed $INCNAME, - dnl 4. if it doesn't exist as a directory. - if test "X$additional_includedir" != "X/usr/include"; then - haveit= - if test "X$additional_includedir" = "X/usr/local/include"; then - if test -n "$GCC"; then - case $host_os in - linux* | gnu* | k*bsd*-gnu) haveit=yes;; - esac - fi - fi - if test -z "$haveit"; then - for x in $CPPFLAGS $INC[]NAME; do - AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) - if test "X$x" = "X-I$additional_includedir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - if test -d "$additional_includedir"; then - dnl Really add $additional_includedir to $INCNAME. - INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir" - fi - fi - fi - fi - fi - dnl Look for dependencies. - if test -n "$found_la"; then - dnl Read the .la file. It defines the variables - dnl dlname, library_names, old_library, dependency_libs, current, - dnl age, revision, installed, dlopen, dlpreopen, libdir. - save_libdir="$libdir" - case "$found_la" in - */* | *\\*) . "$found_la" ;; - *) . "./$found_la" ;; - esac - libdir="$save_libdir" - dnl We use only dependency_libs. - for dep in $dependency_libs; do - case "$dep" in - -L*) - additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` - dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME. - dnl But don't add it - dnl 1. if it's the standard /usr/lib, - dnl 2. if it's /usr/local/lib and we are using GCC on Linux, - dnl 3. if it's already present in $LDFLAGS or the already - dnl constructed $LIBNAME, - dnl 4. if it doesn't exist as a directory. - if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then - haveit= - if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then - if test -n "$GCC"; then - case $host_os in - linux* | gnu* | k*bsd*-gnu) haveit=yes;; - esac - fi - fi - if test -z "$haveit"; then - haveit= - for x in $LDFLAGS $LIB[]NAME; do - AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) - if test "X$x" = "X-L$additional_libdir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - if test -d "$additional_libdir"; then - dnl Really add $additional_libdir to $LIBNAME. - LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir" - fi - fi - haveit= - for x in $LDFLAGS $LTLIB[]NAME; do - AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) - if test "X$x" = "X-L$additional_libdir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - if test -d "$additional_libdir"; then - dnl Really add $additional_libdir to $LTLIBNAME. - LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir" - fi - fi - fi - fi - ;; - -R*) - dir=`echo "X$dep" | sed -e 's/^X-R//'` - if test "$enable_rpath" != no; then - dnl Potentially add DIR to rpathdirs. - dnl The rpathdirs will be appended to $LIBNAME at the end. - haveit= - for x in $rpathdirs; do - if test "X$x" = "X$dir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - rpathdirs="$rpathdirs $dir" - fi - dnl Potentially add DIR to ltrpathdirs. - dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. - haveit= - for x in $ltrpathdirs; do - if test "X$x" = "X$dir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - ltrpathdirs="$ltrpathdirs $dir" - fi - fi - ;; - -l*) - dnl Handle this in the next round. - names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` - ;; - *.la) - dnl Handle this in the next round. Throw away the .la's - dnl directory; it is already contained in a preceding -L - dnl option. - names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` - ;; - *) - dnl Most likely an immediate library name. - LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep" - LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep" - ;; - esac - done - fi - else - dnl Didn't find the library; assume it is in the system directories - dnl known to the linker and runtime loader. (All the system - dnl directories known to the linker should also be known to the - dnl runtime loader, otherwise the system is severely misconfigured.) - LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" - LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name" - fi - fi - fi - done - done - if test "X$rpathdirs" != "X"; then - if test -n "$hardcode_libdir_separator"; then - dnl Weird platform: only the last -rpath option counts, the user must - dnl pass all path elements in one option. We can arrange that for a - dnl single library, but not when more than one $LIBNAMEs are used. - alldirs= - for found_dir in $rpathdirs; do - alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" - done - dnl Note: hardcode_libdir_flag_spec uses $libdir and $wl. - acl_save_libdir="$libdir" - libdir="$alldirs" - eval flag=\"$hardcode_libdir_flag_spec\" - libdir="$acl_save_libdir" - LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" - else - dnl The -rpath options are cumulative. - for found_dir in $rpathdirs; do - acl_save_libdir="$libdir" - libdir="$found_dir" - eval flag=\"$hardcode_libdir_flag_spec\" - libdir="$acl_save_libdir" - LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" - done - fi - fi - if test "X$ltrpathdirs" != "X"; then - dnl When using libtool, the option that works for both libraries and - dnl executables is -R. The -R options are cumulative. - for found_dir in $ltrpathdirs; do - LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir" - done - fi -]) - -dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR, -dnl unless already present in VAR. -dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes -dnl contains two or three consecutive elements that belong together. -AC_DEFUN([AC_LIB_APPENDTOVAR], -[ - for element in [$2]; do - haveit= - for x in $[$1]; do - AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) - if test "X$x" = "X$element"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - [$1]="${[$1]}${[$1]:+ }$element" - fi - done -]) - -dnl For those cases where a variable contains several -L and -l options -dnl referring to unknown libraries and directories, this macro determines the -dnl necessary additional linker options for the runtime path. -dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL]) -dnl sets LDADDVAR to linker options needed together with LIBSVALUE. -dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed, -dnl otherwise linking without libtool is assumed. -AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS], -[ - AC_REQUIRE([AC_LIB_RPATH]) - AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) - $1= - if test "$enable_rpath" != no; then - if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then - dnl Use an explicit option to hardcode directories into the resulting - dnl binary. - rpathdirs= - next= - for opt in $2; do - if test -n "$next"; then - dir="$next" - dnl No need to hardcode the standard /usr/lib. - if test "X$dir" != "X/usr/$acl_libdirstem"; then - rpathdirs="$rpathdirs $dir" - fi - next= - else - case $opt in - -L) next=yes ;; - -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'` - dnl No need to hardcode the standard /usr/lib. - if test "X$dir" != "X/usr/$acl_libdirstem"; then - rpathdirs="$rpathdirs $dir" - fi - next= ;; - *) next= ;; - esac - fi - done - if test "X$rpathdirs" != "X"; then - if test -n ""$3""; then - dnl libtool is used for linking. Use -R options. - for dir in $rpathdirs; do - $1="${$1}${$1:+ }-R$dir" - done - else - dnl The linker is used for linking directly. - if test -n "$hardcode_libdir_separator"; then - dnl Weird platform: only the last -rpath option counts, the user - dnl must pass all path elements in one option. - alldirs= - for dir in $rpathdirs; do - alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$dir" - done - acl_save_libdir="$libdir" - libdir="$alldirs" - eval flag=\"$hardcode_libdir_flag_spec\" - libdir="$acl_save_libdir" - $1="$flag" - else - dnl The -rpath options are cumulative. - for dir in $rpathdirs; do - acl_save_libdir="$libdir" - libdir="$dir" - eval flag=\"$hardcode_libdir_flag_spec\" - libdir="$acl_save_libdir" - $1="${$1}${$1:+ }$flag" - done - fi - fi - fi - fi - fi - AC_SUBST([$1]) -]) diff --git a/m4/lib-prefix.m4 b/m4/lib-prefix.m4 deleted file mode 100644 index a8684e17e..000000000 --- a/m4/lib-prefix.m4 +++ /dev/null @@ -1,185 +0,0 @@ -# lib-prefix.m4 serial 5 (gettext-0.15) -dnl Copyright (C) 2001-2005 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Bruno Haible. - -dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and -dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't -dnl require excessive bracketing. -ifdef([AC_HELP_STRING], -[AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])], -[AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])]) - -dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed -dnl to access previously installed libraries. The basic assumption is that -dnl a user will want packages to use other packages he previously installed -dnl with the same --prefix option. -dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate -dnl libraries, but is otherwise very convenient. -AC_DEFUN([AC_LIB_PREFIX], -[ - AC_BEFORE([$0], [AC_LIB_LINKFLAGS]) - AC_REQUIRE([AC_PROG_CC]) - AC_REQUIRE([AC_CANONICAL_HOST]) - AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) - AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) - dnl By default, look in $includedir and $libdir. - use_additional=yes - AC_LIB_WITH_FINAL_PREFIX([ - eval additional_includedir=\"$includedir\" - eval additional_libdir=\"$libdir\" - ]) - AC_LIB_ARG_WITH([lib-prefix], -[ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib - --without-lib-prefix don't search for libraries in includedir and libdir], -[ - if test "X$withval" = "Xno"; then - use_additional=no - else - if test "X$withval" = "X"; then - AC_LIB_WITH_FINAL_PREFIX([ - eval additional_includedir=\"$includedir\" - eval additional_libdir=\"$libdir\" - ]) - else - additional_includedir="$withval/include" - additional_libdir="$withval/$acl_libdirstem" - fi - fi -]) - if test $use_additional = yes; then - dnl Potentially add $additional_includedir to $CPPFLAGS. - dnl But don't add it - dnl 1. if it's the standard /usr/include, - dnl 2. if it's already present in $CPPFLAGS, - dnl 3. if it's /usr/local/include and we are using GCC on Linux, - dnl 4. if it doesn't exist as a directory. - if test "X$additional_includedir" != "X/usr/include"; then - haveit= - for x in $CPPFLAGS; do - AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) - if test "X$x" = "X-I$additional_includedir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - if test "X$additional_includedir" = "X/usr/local/include"; then - if test -n "$GCC"; then - case $host_os in - linux* | gnu* | k*bsd*-gnu) haveit=yes;; - esac - fi - fi - if test -z "$haveit"; then - if test -d "$additional_includedir"; then - dnl Really add $additional_includedir to $CPPFLAGS. - CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir" - fi - fi - fi - fi - dnl Potentially add $additional_libdir to $LDFLAGS. - dnl But don't add it - dnl 1. if it's the standard /usr/lib, - dnl 2. if it's already present in $LDFLAGS, - dnl 3. if it's /usr/local/lib and we are using GCC on Linux, - dnl 4. if it doesn't exist as a directory. - if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then - haveit= - for x in $LDFLAGS; do - AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) - if test "X$x" = "X-L$additional_libdir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then - if test -n "$GCC"; then - case $host_os in - linux*) haveit=yes;; - esac - fi - fi - if test -z "$haveit"; then - if test -d "$additional_libdir"; then - dnl Really add $additional_libdir to $LDFLAGS. - LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir" - fi - fi - fi - fi - fi -]) - -dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix, -dnl acl_final_exec_prefix, containing the values to which $prefix and -dnl $exec_prefix will expand at the end of the configure script. -AC_DEFUN([AC_LIB_PREPARE_PREFIX], -[ - dnl Unfortunately, prefix and exec_prefix get only finally determined - dnl at the end of configure. - if test "X$prefix" = "XNONE"; then - acl_final_prefix="$ac_default_prefix" - else - acl_final_prefix="$prefix" - fi - if test "X$exec_prefix" = "XNONE"; then - acl_final_exec_prefix='${prefix}' - else - acl_final_exec_prefix="$exec_prefix" - fi - acl_save_prefix="$prefix" - prefix="$acl_final_prefix" - eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" - prefix="$acl_save_prefix" -]) - -dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the -dnl variables prefix and exec_prefix bound to the values they will have -dnl at the end of the configure script. -AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX], -[ - acl_save_prefix="$prefix" - prefix="$acl_final_prefix" - acl_save_exec_prefix="$exec_prefix" - exec_prefix="$acl_final_exec_prefix" - $1 - exec_prefix="$acl_save_exec_prefix" - prefix="$acl_save_prefix" -]) - -dnl AC_LIB_PREPARE_MULTILIB creates a variable acl_libdirstem, containing -dnl the basename of the libdir, either "lib" or "lib64". -AC_DEFUN([AC_LIB_PREPARE_MULTILIB], -[ - dnl There is no formal standard regarding lib and lib64. The current - dnl practice is that on a system supporting 32-bit and 64-bit instruction - dnl sets or ABIs, 64-bit libraries go under $prefix/lib64 and 32-bit - dnl libraries go under $prefix/lib. We determine the compiler's default - dnl mode by looking at the compiler's library search path. If at least - dnl of its elements ends in /lib64 or points to a directory whose absolute - dnl pathname ends in /lib64, we assume a 64-bit ABI. Otherwise we use the - dnl default, namely "lib". - acl_libdirstem=lib - searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` - if test -n "$searchpath"; then - acl_save_IFS="${IFS= }"; IFS=":" - for searchdir in $searchpath; do - if test -d "$searchdir"; then - case "$searchdir" in - */lib64/ | */lib64 ) acl_libdirstem=lib64 ;; - *) searchdir=`cd "$searchdir" && pwd` - case "$searchdir" in - */lib64 ) acl_libdirstem=lib64 ;; - esac ;; - esac - fi - done - IFS="$acl_save_IFS" - fi -]) diff --git a/m4/linebuffer.m4 b/m4/linebuffer.m4 deleted file mode 100644 index 1148b2ad4..000000000 --- a/m4/linebuffer.m4 +++ /dev/null @@ -1,15 +0,0 @@ -# serial 1 -dnl Copyright (C) 2005 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_LINEBUFFER], -[ - AC_LIBSOURCES([linebuffer.c, linebuffer.h]) - AC_LIBOBJ([linebuffer]) - - dnl prerequisites - AC_REQUIRE([AC_TYPE_SIZE_T]) - AC_REQUIRE([gl_FUNC_MEMSET]) -]) diff --git a/m4/link-follow.m4 b/m4/link-follow.m4 deleted file mode 100644 index f75062ce4..000000000 --- a/m4/link-follow.m4 +++ /dev/null @@ -1,63 +0,0 @@ -#serial 8 -dnl Run a program to determine whether link(2) follows symlinks. -dnl Set LINK_FOLLOWS_SYMLINKS accordingly. - -# Copyright (C) 1999, 2000, 2001, 2004, 2005, 2006 Free Software Foundation, Inc. -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_AC_FUNC_LINK_FOLLOWS_SYMLINK], -[dnl - AC_CACHE_CHECK( - [whether link(2) dereferences a symlink specified with a trailing slash], - jm_ac_cv_func_link_follows_symlink, - [ - # Create a regular file. - echo > conftest.file - AC_TRY_RUN( - [ -# include <sys/types.h> -# include <sys/stat.h> -# include <unistd.h> - -# define SAME_INODE(Stat_buf_1, Stat_buf_2) \ - ((Stat_buf_1).st_ino == (Stat_buf_2).st_ino \ - && (Stat_buf_1).st_dev == (Stat_buf_2).st_dev) - - int - main () - { - const char *file = "conftest.file"; - const char *sym = "conftest.sym"; - const char *hard = "conftest.hard"; - struct stat sb_file, sb_hard; - - /* Create a symlink to the regular file. */ - if (symlink (file, sym)) - abort (); - - /* Create a hard link to that symlink. */ - if (link (sym, hard)) - abort (); - - if (lstat (hard, &sb_hard)) - abort (); - if (lstat (file, &sb_file)) - abort (); - - /* If the dev/inode of hard and file are the same, then - the link call followed the symlink. */ - return SAME_INODE (sb_hard, sb_file) ? 0 : 1; - } - ], - jm_ac_cv_func_link_follows_symlink=yes, - jm_ac_cv_func_link_follows_symlink=no, - jm_ac_cv_func_link_follows_symlink=yes dnl We're cross compiling. - ) - ]) - if test $jm_ac_cv_func_link_follows_symlink = yes; then - AC_DEFINE(LINK_FOLLOWS_SYMLINKS, 1, - [Define if `link(2)' dereferences symbolic links.]) - fi -]) diff --git a/m4/localcharset.m4 b/m4/localcharset.m4 deleted file mode 100644 index c0396356c..000000000 --- a/m4/localcharset.m4 +++ /dev/null @@ -1,17 +0,0 @@ -# localcharset.m4 serial 4 -dnl Copyright (C) 2002, 2004, 2006 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_LOCALCHARSET], -[ - dnl Prerequisites of lib/localcharset.c. - AC_REQUIRE([AM_LANGINFO_CODESET]) - AC_CHECK_DECLS_ONCE(getc_unlocked) - AC_CHECK_FUNCS_ONCE(setlocale) - - dnl Prerequisites of the lib/Makefile.am snippet. - AC_REQUIRE([AC_CANONICAL_HOST]) - AC_REQUIRE([gl_GLIBC21]) -]) diff --git a/m4/long-options.m4 b/m4/long-options.m4 deleted file mode 100644 index f4af901e0..000000000 --- a/m4/long-options.m4 +++ /dev/null @@ -1,13 +0,0 @@ -# long-options.m4 serial 4 -dnl Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_LONG_OPTIONS], -[ - AC_LIBSOURCES([long-options.c, long-options.h]) - AC_LIBOBJ([long-options]) - - dnl Prerequisites of lib/long-options.c. -]) diff --git a/m4/longdouble.m4 b/m4/longdouble.m4 deleted file mode 100644 index 25590f470..000000000 --- a/m4/longdouble.m4 +++ /dev/null @@ -1,31 +0,0 @@ -# longdouble.m4 serial 2 (gettext-0.15) -dnl Copyright (C) 2002-2003, 2006 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Bruno Haible. -dnl Test whether the compiler supports the 'long double' type. -dnl Prerequisite: AC_PROG_CC - -dnl This file is only needed in autoconf <= 2.59. Newer versions of autoconf -dnl have a macro AC_TYPE_LONG_DOUBLE with identical semantics. - -AC_DEFUN([gt_TYPE_LONGDOUBLE], -[ - AC_CACHE_CHECK([for long double], gt_cv_c_long_double, - [if test "$GCC" = yes; then - gt_cv_c_long_double=yes - else - AC_TRY_COMPILE([ - /* The Stardent Vistra knows sizeof(long double), but does not support it. */ - long double foo = 0.0; - /* On Ultrix 4.3 cc, long double is 4 and double is 8. */ - int array [2*(sizeof(long double) >= sizeof(double)) - 1]; - ], , - gt_cv_c_long_double=yes, gt_cv_c_long_double=no) - fi]) - if test $gt_cv_c_long_double = yes; then - AC_DEFINE(HAVE_LONG_DOUBLE, 1, [Define if you have the 'long double' type.]) - fi -]) diff --git a/m4/longlong.m4 b/m4/longlong.m4 deleted file mode 100644 index ea7c485c3..000000000 --- a/m4/longlong.m4 +++ /dev/null @@ -1,44 +0,0 @@ -# longlong.m4 serial 6 -dnl Copyright (C) 1999-2006 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Paul Eggert. - -# Define HAVE_LONG_LONG_INT if 'long long int' works. -# This fixes a bug in Autoconf 2.60, but can be removed once we -# assume 2.61 everywhere. - -AC_DEFUN([AC_TYPE_LONG_LONG_INT], -[ - AC_CACHE_CHECK([for long long int], [ac_cv_type_long_long_int], - [AC_LINK_IFELSE( - [AC_LANG_PROGRAM( - [[long long int ll = 9223372036854775807ll; - long long int nll = -9223372036854775807LL; - typedef int a[((-9223372036854775807LL < 0 - && 0 < 9223372036854775807ll) - ? 1 : -1)]; - int i = 63;]], - [[long long int llmax = 9223372036854775807ll; - return (ll << 63 | ll >> 63 | ll < i | ll > i - | llmax / ll | llmax % ll);]])], - [ac_cv_type_long_long_int=yes], - [ac_cv_type_long_long_int=no])]) - if test $ac_cv_type_long_long_int = yes; then - AC_DEFINE([HAVE_LONG_LONG_INT], 1, - [Define to 1 if the system has the type `long long int'.]) - fi -]) - -# This macro is obsolescent and should go away soon. -AC_DEFUN([gl_AC_TYPE_LONG_LONG], -[ - AC_REQUIRE([AC_TYPE_LONG_LONG_INT]) - ac_cv_type_long_long=$ac_cv_type_long_long_int - if test $ac_cv_type_long_long = yes; then - AC_DEFINE(HAVE_LONG_LONG, 1, - [Define if you have the 'long long' type.]) - fi -]) diff --git a/m4/ls-mntd-fs.m4 b/m4/ls-mntd-fs.m4 deleted file mode 100644 index c29933162..000000000 --- a/m4/ls-mntd-fs.m4 +++ /dev/null @@ -1,332 +0,0 @@ -#serial 22 -# How to list mounted file systems. - -# Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2006 Free Software -# Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -dnl From Jim Meyering. -dnl -dnl This is not pretty. I've just taken the autoconf code and wrapped -dnl it in an AC_DEFUN and made some other fixes. -dnl - -# Replace Autoconf's AC_FUNC_GETMNTENT to work around a bug in Autoconf -# through Autoconf 2.59. We can remove this once we assume Autoconf 2.60 -# or later. -AC_DEFUN([AC_FUNC_GETMNTENT], -[# getmntent is in the standard C library on UNICOS, in -lsun on Irix 4, -# -lseq on Dynix/PTX, -lgen on Unixware. -AC_SEARCH_LIBS(getmntent, [sun seq gen]) -AC_CHECK_FUNCS(getmntent) -]) - -# gl_LIST_MOUNTED_FILE_SYSTEMS([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) -AC_DEFUN([gl_LIST_MOUNTED_FILE_SYSTEMS], - [ -AC_CHECK_FUNCS(listmntent getmntinfo) -AC_CHECK_HEADERS_ONCE(sys/param.h sys/statvfs.h) - -# We must include grp.h before ucred.h on OSF V4.0, since ucred.h uses -# NGROUPS (as the array dimension for a struct member) without a definition. -AC_CHECK_HEADERS(sys/ucred.h, [], [], [#include <grp.h>]) - -AC_CHECK_HEADERS(sys/mount.h, [], [], - [AC_INCLUDES_DEFAULT - [#if HAVE_SYS_PARAM_H - #include <sys/param.h> - #endif]]) - -AC_CHECK_HEADERS(mntent.h sys/fs_types.h) - getfsstat_includes="\ -$ac_includes_default -#if HAVE_SYS_PARAM_H -# include <sys/param.h> /* needed by powerpc-apple-darwin1.3.7 */ -#endif -#if HAVE_SYS_UCRED_H -# include <grp.h> /* needed for definition of NGROUPS */ -# include <sys/ucred.h> /* needed by powerpc-apple-darwin1.3.7 */ -#endif -#if HAVE_SYS_MOUNT_H -# include <sys/mount.h> -#endif -#if HAVE_SYS_FS_TYPES_H -# include <sys/fs_types.h> /* needed by powerpc-apple-darwin1.3.7 */ -#endif -" -AC_CHECK_MEMBERS([struct fsstat.f_fstypename],,,[$getfsstat_includes]) - -# Determine how to get the list of mounted file systems. -ac_list_mounted_fs= - -# If the getmntent function is available but not in the standard library, -# make sure LIBS contains the appropriate -l option. -AC_FUNC_GETMNTENT - -# This test must precede the ones for getmntent because Unicos-9 is -# reported to have the getmntent function, but its support is incompatible -# with other getmntent implementations. - -# NOTE: Normally, I wouldn't use a check for system type as I've done for -# `CRAY' below since that goes against the whole autoconf philosophy. But -# I think there is too great a chance that some non-Cray system has a -# function named listmntent to risk the false positive. - -if test -z "$ac_list_mounted_fs"; then - # Cray UNICOS 9 - AC_MSG_CHECKING([for listmntent of Cray/Unicos-9]) - AC_CACHE_VAL(fu_cv_sys_mounted_cray_listmntent, - [fu_cv_sys_mounted_cray_listmntent=no - AC_EGREP_CPP(yes, - [#ifdef _CRAY -yes -#endif - ], [test $ac_cv_func_listmntent = yes \ - && fu_cv_sys_mounted_cray_listmntent=yes] - ) - ] - ) - AC_MSG_RESULT($fu_cv_sys_mounted_cray_listmntent) - if test $fu_cv_sys_mounted_cray_listmntent = yes; then - ac_list_mounted_fs=found - AC_DEFINE(MOUNTED_LISTMNTENT, 1, - [Define if there is a function named listmntent that can be used to - list all mounted file systems. (UNICOS)]) - fi -fi - -if test -z "$ac_list_mounted_fs"; then - # AIX. - AC_MSG_CHECKING([for mntctl function and struct vmount]) - AC_CACHE_VAL(fu_cv_sys_mounted_vmount, - [AC_TRY_CPP([#include <fshelp.h>], - fu_cv_sys_mounted_vmount=yes, - fu_cv_sys_mounted_vmount=no)]) - AC_MSG_RESULT($fu_cv_sys_mounted_vmount) - if test $fu_cv_sys_mounted_vmount = yes; then - ac_list_mounted_fs=found - AC_DEFINE(MOUNTED_VMOUNT, 1, - [Define if there is a function named mntctl that can be used to read - the list of mounted file systems, and there is a system header file - that declares `struct vmount.' (AIX)]) - fi -fi - -if test $ac_cv_func_getmntent = yes; then - - # This system has the getmntent function. - # Determine whether it's the one-argument variant or the two-argument one. - - if test -z "$ac_list_mounted_fs"; then - # 4.3BSD, SunOS, HP-UX, Dynix, Irix - AC_MSG_CHECKING([for one-argument getmntent function]) - AC_CACHE_VAL(fu_cv_sys_mounted_getmntent1, - [AC_TRY_COMPILE([ -/* SunOS 4.1.x /usr/include/mntent.h needs this for FILE */ -#include <stdio.h> - -#include <mntent.h> -#if !defined MOUNTED -# if defined _PATH_MOUNTED /* GNU libc */ -# define MOUNTED _PATH_MOUNTED -# endif -# if defined MNT_MNTTAB /* HP-UX. */ -# define MOUNTED MNT_MNTTAB -# endif -# if defined MNTTABNAME /* Dynix. */ -# define MOUNTED MNTTABNAME -# endif -#endif -], - [ struct mntent *mnt = 0; char *table = MOUNTED; ], - fu_cv_sys_mounted_getmntent1=yes, - fu_cv_sys_mounted_getmntent1=no)]) - AC_MSG_RESULT($fu_cv_sys_mounted_getmntent1) - if test $fu_cv_sys_mounted_getmntent1 = yes; then - ac_list_mounted_fs=found - AC_DEFINE(MOUNTED_GETMNTENT1, 1, - [Define if there is a function named getmntent for reading the list - of mounted file systems, and that function takes a single argument. - (4.3BSD, SunOS, HP-UX, Dynix, Irix)]) - fi - fi - - if test -z "$ac_list_mounted_fs"; then - # SVR4 - AC_MSG_CHECKING([for two-argument getmntent function]) - AC_CACHE_VAL(fu_cv_sys_mounted_getmntent2, - [AC_EGREP_HEADER(getmntent, sys/mnttab.h, - fu_cv_sys_mounted_getmntent2=yes, - fu_cv_sys_mounted_getmntent2=no)]) - AC_MSG_RESULT($fu_cv_sys_mounted_getmntent2) - if test $fu_cv_sys_mounted_getmntent2 = yes; then - ac_list_mounted_fs=found - AC_DEFINE(MOUNTED_GETMNTENT2, 1, - [Define if there is a function named getmntent for reading the list of - mounted file systems, and that function takes two arguments. (SVR4)]) - fi - fi - -fi - -if test -z "$ac_list_mounted_fs"; then - # DEC Alpha running OSF/1, and Apple Darwin 1.3. - # powerpc-apple-darwin1.3.7 needs sys/param.h sys/ucred.h sys/fs_types.h - - AC_MSG_CHECKING([for getfsstat function]) - AC_CACHE_VAL(fu_cv_sys_mounted_getfsstat, - [AC_TRY_LINK([ -#include <sys/types.h> -#if HAVE_STRUCT_FSSTAT_F_FSTYPENAME -# define FS_TYPE(Ent) ((Ent).f_fstypename) -#else -# define FS_TYPE(Ent) mnt_names[(Ent).f_type] -#endif -]$getfsstat_includes -, - [struct statfs *stats; - int numsys = getfsstat ((struct statfs *)0, 0L, MNT_WAIT); - char *t = FS_TYPE (*stats); ], - fu_cv_sys_mounted_getfsstat=yes, - fu_cv_sys_mounted_getfsstat=no)]) - AC_MSG_RESULT($fu_cv_sys_mounted_getfsstat) - if test $fu_cv_sys_mounted_getfsstat = yes; then - ac_list_mounted_fs=found - AC_DEFINE(MOUNTED_GETFSSTAT, 1, - [Define if there is a function named getfsstat for reading the - list of mounted file systems. (DEC Alpha running OSF/1)]) - fi -fi - -if test -z "$ac_list_mounted_fs"; then - # SVR3 - AC_MSG_CHECKING([for FIXME existence of three headers]) - AC_CACHE_VAL(fu_cv_sys_mounted_fread_fstyp, - [AC_TRY_CPP([ -#include <sys/statfs.h> -#include <sys/fstyp.h> -#include <mnttab.h>], - fu_cv_sys_mounted_fread_fstyp=yes, - fu_cv_sys_mounted_fread_fstyp=no)]) - AC_MSG_RESULT($fu_cv_sys_mounted_fread_fstyp) - if test $fu_cv_sys_mounted_fread_fstyp = yes; then - ac_list_mounted_fs=found - AC_DEFINE(MOUNTED_FREAD_FSTYP, 1, - [Define if (like SVR2) there is no specific function for reading the - list of mounted file systems, and your system has these header files: - <sys/fstyp.h> and <sys/statfs.h>. (SVR3)]) - fi -fi - -if test -z "$ac_list_mounted_fs"; then - # 4.4BSD and DEC OSF/1. - AC_MSG_CHECKING([for getmntinfo function]) - AC_CACHE_VAL(fu_cv_sys_mounted_getmntinfo, - [ - test "$ac_cv_func_getmntinfo" = yes \ - && fu_cv_sys_mounted_getmntinfo=yes \ - || fu_cv_sys_mounted_getmntinfo=no - ]) - AC_MSG_RESULT($fu_cv_sys_mounted_getmntinfo) - if test $fu_cv_sys_mounted_getmntinfo = yes; then - AC_MSG_CHECKING([whether getmntinfo returns statvfs structures]) - AC_CACHE_VAL(fu_cv_sys_mounted_getmntinfo2, - [ - AC_TRY_COMPILE([ -#include <sys/types.h> -#if HAVE_SYS_MOUNT_H -# include <sys/mount.h> -#endif -#if HAVE_SYS_STATVFS_H -# include <sys/statvfs.h> -#endif -extern int getmntinfo (struct statfs **, int); - ], [], - [fu_cv_sys_mounted_getmntinfo2=no], - [fu_cv_sys_mounted_getmntinfo2=yes]) - ]) - AC_MSG_RESULT([$fu_cv_sys_mounted_getmntinfo2]) - if test $fu_cv_sys_mounted_getmntinfo2 = no; then - ac_list_mounted_fs=found - AC_DEFINE(MOUNTED_GETMNTINFO, 1, - [Define if there is a function named getmntinfo for reading the - list of mounted file systems and it returns an array of - 'struct statfs'. (4.4BSD, Darwin)]) - else - ac_list_mounted_fs=found - AC_DEFINE(MOUNTED_GETMNTINFO2, 1, - [Define if there is a function named getmntinfo for reading the - list of mounted file systems and it returns an array of - 'struct statvfs'. (NetBSD 3.0)]) - fi - fi -fi - -if test -z "$ac_list_mounted_fs"; then - # Ultrix - AC_MSG_CHECKING([for getmnt function]) - AC_CACHE_VAL(fu_cv_sys_mounted_getmnt, - [AC_TRY_CPP([ -#include <sys/fs_types.h> -#include <sys/mount.h>], - fu_cv_sys_mounted_getmnt=yes, - fu_cv_sys_mounted_getmnt=no)]) - AC_MSG_RESULT($fu_cv_sys_mounted_getmnt) - if test $fu_cv_sys_mounted_getmnt = yes; then - ac_list_mounted_fs=found - AC_DEFINE(MOUNTED_GETMNT, 1, - [Define if there is a function named getmnt for reading the list of - mounted file systems. (Ultrix)]) - fi -fi - -if test -z "$ac_list_mounted_fs"; then - # BeOS - AC_CHECK_FUNCS(next_dev fs_stat_dev) - AC_CHECK_HEADERS(fs_info.h) - AC_MSG_CHECKING([for BEOS mounted file system support functions]) - if test $ac_cv_header_fs_info_h = yes \ - && test $ac_cv_func_next_dev = yes \ - && test $ac_cv_func_fs_stat_dev = yes; then - fu_result=yes - else - fu_result=no - fi - AC_MSG_RESULT($fu_result) - if test $fu_result = yes; then - ac_list_mounted_fs=found - AC_DEFINE(MOUNTED_FS_STAT_DEV, 1, - [Define if there are functions named next_dev and fs_stat_dev for - reading the list of mounted file systems. (BeOS)]) - fi -fi - -if test -z "$ac_list_mounted_fs"; then - # SVR2 - AC_MSG_CHECKING([whether it is possible to resort to fread on /etc/mnttab]) - AC_CACHE_VAL(fu_cv_sys_mounted_fread, - [AC_TRY_CPP([#include <mnttab.h>], - fu_cv_sys_mounted_fread=yes, - fu_cv_sys_mounted_fread=no)]) - AC_MSG_RESULT($fu_cv_sys_mounted_fread) - if test $fu_cv_sys_mounted_fread = yes; then - ac_list_mounted_fs=found - AC_DEFINE(MOUNTED_FREAD, 1, - [Define if there is no specific function for reading the list of - mounted file systems. fread will be used to read /etc/mnttab. - (SVR2) ]) - fi -fi - -if test -z "$ac_list_mounted_fs"; then - AC_MSG_ERROR([could not determine how to read list of mounted file systems]) - # FIXME -- no need to abort building the whole package - # Can't build mountlist.c or anything that needs its functions -fi - -AS_IF([test $ac_list_mounted_fs = found], [$1], [$2]) - - ]) diff --git a/m4/lstat.m4 b/m4/lstat.m4 deleted file mode 100644 index 20e6fc315..000000000 --- a/m4/lstat.m4 +++ /dev/null @@ -1,19 +0,0 @@ -#serial 14 - -# Copyright (C) 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005 Free Software -# Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -dnl From Jim Meyering. - -AC_DEFUN([gl_FUNC_LSTAT], -[ - AC_LIBSOURCES([lstat.c, lstat.h]) - - AC_REQUIRE([AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK]) - dnl Note: AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK does AC_LIBOBJ(lstat). - : -]) diff --git a/m4/mbchar.m4 b/m4/mbchar.m4 deleted file mode 100644 index ec4cbab11..000000000 --- a/m4/mbchar.m4 +++ /dev/null @@ -1,22 +0,0 @@ -# mbchar.m4 serial 3 -dnl Copyright (C) 2005-2006 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl autoconf tests required for use of mbchar.m4 -dnl From Bruno Haible. - -AC_DEFUN([gl_MBCHAR], -[ - AC_REQUIRE([AC_GNU_SOURCE]) - dnl The following line is that so the user can test - dnl HAVE_WCHAR_H && HAVE_WCTYPE_H before #include "mbchar.h". - AC_CHECK_HEADERS_ONCE(wchar.h wctype.h) - dnl Compile mbchar.c only if HAVE_WCHAR_H && HAVE_WCTYPE_H. - if test $ac_cv_header_wchar_h = yes && test $ac_cv_header_wctype_h = yes; then - AC_LIBOBJ([mbchar]) - dnl Prerequisites of mbchar.h and mbchar.c. - AC_CHECK_FUNCS([iswcntrl]) - fi -]) diff --git a/m4/mbiter.m4 b/m4/mbiter.m4 deleted file mode 100644 index 7d51af10d..000000000 --- a/m4/mbiter.m4 +++ /dev/null @@ -1,17 +0,0 @@ -# mbiter.m4 serial 2 -dnl Copyright (C) 2005 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl autoconf tests required for use of mbiter.h -dnl From Bruno Haible. - -AC_DEFUN([gl_MBITER], -[ - AC_REQUIRE([AC_TYPE_MBSTATE_T]) - dnl The following line is that so the user can test HAVE_MBRTOWC before - dnl #include "mbiter.h" or "mbuiter.h". - AC_REQUIRE([gl_FUNC_MBRTOWC]) - : -]) diff --git a/m4/mbrtowc.m4 b/m4/mbrtowc.m4 deleted file mode 100644 index a3bd9114c..000000000 --- a/m4/mbrtowc.m4 +++ /dev/null @@ -1,31 +0,0 @@ -# mbrtowc.m4 serial 8 -dnl Copyright (C) 2001-2002, 2004-2005 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Paul Eggert - -dnl This file can be removed, and gl_FUNC_MBRTOWC replaced with -dnl AC_FUNC_MBRTOWC, when autoconf 2.60 can be assumed everywhere. - -AC_DEFUN([gl_FUNC_MBRTOWC], -[ - dnl Same as AC_FUNC_MBRTOWC in autoconf-2.60. - AC_CACHE_CHECK([whether mbrtowc and mbstate_t are properly declared], - gl_cv_func_mbrtowc, - [AC_LINK_IFELSE( - [AC_LANG_PROGRAM( - [[#include <wchar.h>]], - [[wchar_t wc; - char const s[] = ""; - size_t n = 1; - mbstate_t state; - return ! (sizeof state && (mbrtowc) (&wc, s, n, &state));]])], - gl_cv_func_mbrtowc=yes, - gl_cv_func_mbrtowc=no)]) - if test $gl_cv_func_mbrtowc = yes; then - AC_DEFINE([HAVE_MBRTOWC], 1, - [Define to 1 if mbrtowc and mbstate_t are properly declared.]) - fi -]) diff --git a/m4/mbstate_t.m4 b/m4/mbstate_t.m4 deleted file mode 100644 index df2a275c2..000000000 --- a/m4/mbstate_t.m4 +++ /dev/null @@ -1,30 +0,0 @@ -# mbstate_t.m4 serial 9 -dnl Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -# From Paul Eggert. - -# BeOS 5 has <wchar.h> but does not define mbstate_t, -# so you can't declare an object of that type. -# Check for this incompatibility with Standard C. - -# AC_TYPE_MBSTATE_T -# ----------------- -AC_DEFUN([AC_TYPE_MBSTATE_T], - [AC_CACHE_CHECK([for mbstate_t], ac_cv_type_mbstate_t, - [AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [AC_INCLUDES_DEFAULT -# include <wchar.h>], - [mbstate_t x; return sizeof x;])], - [ac_cv_type_mbstate_t=yes], - [ac_cv_type_mbstate_t=no])]) - if test $ac_cv_type_mbstate_t = yes; then - AC_DEFINE([HAVE_MBSTATE_T], 1, - [Define to 1 if <wchar.h> declares mbstate_t.]) - else - AC_DEFINE([mbstate_t], int, - [Define to a type if <wchar.h> does not define.]) - fi]) diff --git a/m4/mbswidth.m4 b/m4/mbswidth.m4 deleted file mode 100644 index 3cb200039..000000000 --- a/m4/mbswidth.m4 +++ /dev/null @@ -1,37 +0,0 @@ -# mbswidth.m4 serial 12 -dnl Copyright (C) 2000-2002, 2004, 2006 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl autoconf tests required for use of mbswidth.c -dnl From Bruno Haible. - -AC_DEFUN([gl_MBSWIDTH], -[ - AC_CHECK_HEADERS_ONCE([wchar.h wctype.h]) - AC_CHECK_FUNCS_ONCE([isascii mbsinit]) - AC_CHECK_FUNCS([iswcntrl]) - gl_FUNC_MBRTOWC - - dnl UnixWare 7.1.1 <wchar.h> has a declaration of a function mbswidth() - dnl that clashes with ours. - AC_CACHE_CHECK([whether mbswidth is declared in <wchar.h>], - ac_cv_have_decl_mbswidth, - [AC_TRY_COMPILE([ -#if HAVE_WCHAR_H -# include <wchar.h> -#endif -], [ - char *p = (char *) mbswidth; -], ac_cv_have_decl_mbswidth=yes, ac_cv_have_decl_mbswidth=no)]) - if test $ac_cv_have_decl_mbswidth = yes; then - ac_val=1 - else - ac_val=0 - fi - AC_DEFINE_UNQUOTED(HAVE_DECL_MBSWIDTH_IN_WCHAR_H, $ac_val, - [Define to 1 if you have a declaration of mbswidth() in <wchar.h>, and to 0 otherwise.]) - - AC_TYPE_MBSTATE_T -]) diff --git a/m4/md5.m4 b/m4/md5.m4 deleted file mode 100644 index 0c4d86b59..000000000 --- a/m4/md5.m4 +++ /dev/null @@ -1,15 +0,0 @@ -# md5.m4 serial 8 -dnl Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_MD5], -[ - AC_LIBSOURCES([md5.c, md5.h]) - AC_LIBOBJ([md5]) - - dnl Prerequisites of lib/md5.c. - AC_REQUIRE([AC_C_BIGENDIAN]) - : -]) diff --git a/m4/memcasecmp.m4 b/m4/memcasecmp.m4 deleted file mode 100644 index 95a3dc087..000000000 --- a/m4/memcasecmp.m4 +++ /dev/null @@ -1,11 +0,0 @@ -#serial 4 -dnl Copyright (C) 2005, 2006 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_MEMCASECMP], -[ - AC_LIBSOURCES([memcasecmp.c, memcasecmp.h]) - AC_LIBOBJ([memcasecmp]) -]) diff --git a/m4/memchr.m4 b/m4/memchr.m4 deleted file mode 100644 index 91b8636eb..000000000 --- a/m4/memchr.m4 +++ /dev/null @@ -1,18 +0,0 @@ -# memchr.m4 serial 4 -dnl Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_FUNC_MEMCHR], -[ - AC_REPLACE_FUNCS(memchr) - if test $ac_cv_func_memchr = no; then - gl_PREREQ_MEMCHR - fi -]) - -# Prerequisites of lib/memchr.c. -AC_DEFUN([gl_PREREQ_MEMCHR], [ - AC_CHECK_HEADERS(bp-sym.h) -]) diff --git a/m4/memcmp.m4 b/m4/memcmp.m4 deleted file mode 100644 index 58faf0bd2..000000000 --- a/m4/memcmp.m4 +++ /dev/null @@ -1,18 +0,0 @@ -# memcmp.m4 serial 11 -dnl Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_FUNC_MEMCMP], -[ - AC_REQUIRE([AC_FUNC_MEMCMP]) - if test $ac_cv_func_memcmp_working = no; then - AC_DEFINE(memcmp, rpl_memcmp, - [Define to rpl_memcmp if the replacement function should be used.]) - gl_PREREQ_MEMCMP - fi -]) - -# Prerequisites of lib/memcmp.c. -AC_DEFUN([gl_PREREQ_MEMCMP], [:]) diff --git a/m4/memcoll.m4 b/m4/memcoll.m4 deleted file mode 100644 index f9cd1deac..000000000 --- a/m4/memcoll.m4 +++ /dev/null @@ -1,14 +0,0 @@ -# memcoll.m4 serial 6 -dnl Copyright (C) 2002, 2003, 2005, 2006 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_MEMCOLL], -[ - AC_LIBSOURCES([memcoll.c, memcoll.h]) - AC_LIBOBJ([memcoll]) - - dnl Prerequisites of lib/memcoll.c. - AC_FUNC_STRCOLL -]) diff --git a/m4/memcpy.m4 b/m4/memcpy.m4 deleted file mode 100644 index 3edc62e46..000000000 --- a/m4/memcpy.m4 +++ /dev/null @@ -1,18 +0,0 @@ -# memcpy.m4 serial 2 -dnl Copyright (C) 2002 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_FUNC_MEMCPY], -[ - AC_REPLACE_FUNCS(memcpy) - if test $ac_cv_func_memcpy = no; then - gl_PREREQ_MEMCPY - fi -]) - -# Prerequisites of lib/memcpy.c. -AC_DEFUN([gl_PREREQ_MEMCPY], [ - : -]) diff --git a/m4/memmove.m4 b/m4/memmove.m4 deleted file mode 100644 index 66054e441..000000000 --- a/m4/memmove.m4 +++ /dev/null @@ -1,18 +0,0 @@ -# memmove.m4 serial 2 -dnl Copyright (C) 2002 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_FUNC_MEMMOVE], -[ - AC_REPLACE_FUNCS(memmove) - if test $ac_cv_func_memmove = no; then - gl_PREREQ_MEMMOVE - fi -]) - -# Prerequisites of lib/memmove.c. -AC_DEFUN([gl_PREREQ_MEMMOVE], [ - : -]) diff --git a/m4/mempcpy.m4 b/m4/mempcpy.m4 deleted file mode 100644 index a96168d88..000000000 --- a/m4/mempcpy.m4 +++ /dev/null @@ -1,23 +0,0 @@ -# mempcpy.m4 serial 3 -dnl Copyright (C) 2003, 2004 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_FUNC_MEMPCPY], -[ - AC_LIBSOURCES([mempcpy.c, mempcpy.h]) - - dnl Persuade glibc <string.h> to declare mempcpy(). - AC_REQUIRE([AC_GNU_SOURCE]) - - AC_REPLACE_FUNCS(mempcpy) - if test $ac_cv_func_mempcpy = no; then - gl_PREREQ_MEMPCPY - fi -]) - -# Prerequisites of lib/mempcpy.c. -AC_DEFUN([gl_PREREQ_MEMPCPY], [ - : -]) diff --git a/m4/memrchr.m4 b/m4/memrchr.m4 deleted file mode 100644 index e2406ec89..000000000 --- a/m4/memrchr.m4 +++ /dev/null @@ -1,23 +0,0 @@ -# memrchr.m4 serial 4 -dnl Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_FUNC_MEMRCHR], -[ - AC_LIBSOURCES([memrchr.c, memrchr.h]) - - dnl Persuade glibc <string.h> to declare memrchr(). - AC_REQUIRE([AC_GNU_SOURCE]) - - AC_CHECK_DECLS_ONCE([memrchr]) - - AC_REPLACE_FUNCS(memrchr) - if test $ac_cv_func_memrchr = no; then - gl_PREREQ_MEMRCHR - fi -]) - -# Prerequisites of lib/memrchr.c. -AC_DEFUN([gl_PREREQ_MEMRCHR], [:]) diff --git a/m4/memset.m4 b/m4/memset.m4 deleted file mode 100644 index 14ac2678e..000000000 --- a/m4/memset.m4 +++ /dev/null @@ -1,18 +0,0 @@ -# memset.m4 serial 2 -dnl Copyright (C) 2002 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_FUNC_MEMSET], -[ - AC_REPLACE_FUNCS(memset) - if test $ac_cv_func_memset = no; then - gl_PREREQ_MEMSET - fi -]) - -# Prerequisites of lib/memset.c. -AC_DEFUN([gl_PREREQ_MEMSET], [ - : -]) diff --git a/m4/mkancesdirs.m4 b/m4/mkancesdirs.m4 deleted file mode 100644 index cd44d4874..000000000 --- a/m4/mkancesdirs.m4 +++ /dev/null @@ -1,11 +0,0 @@ -# Make a file's ancestor directories. -dnl Copyright (C) 2006 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_MKANCESDIRS], -[ - AC_LIBSOURCES([mkancesdirs.c, mkancesdirs.h]) - AC_LIBOBJ([mkancesdirs]) -]) diff --git a/m4/mkdir-p.m4 b/m4/mkdir-p.m4 deleted file mode 100644 index b0ceb1821..000000000 --- a/m4/mkdir-p.m4 +++ /dev/null @@ -1,16 +0,0 @@ -# mkdir-p.m4 serial 11 -dnl Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_MKDIR_PARENTS], -[ - AC_LIBSOURCES([dirchownmod.c, dirchownmod.h, mkdir-p.c, mkdir-p.h]) - AC_LIBOBJ([dirchownmod]) - AC_LIBOBJ([mkdir-p]) - - dnl Prerequisites of lib/dirchownmod.c. - AC_REQUIRE([gl_FUNC_LCHMOD]) - AC_REQUIRE([gl_FUNC_LCHOWN]) -]) diff --git a/m4/mkdir-slash.m4 b/m4/mkdir-slash.m4 deleted file mode 100644 index c1e595bbd..000000000 --- a/m4/mkdir-slash.m4 +++ /dev/null @@ -1,44 +0,0 @@ -#serial 4 - -# Copyright (C) 2001, 2003, 2004 Free Software Foundation, Inc. -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# On some systems, mkdir ("foo/", 0700) fails because of the trailing slash. -# On such systems, arrange to use a wrapper function that removes any -# trailing slashes. -AC_DEFUN([gl_FUNC_MKDIR_TRAILING_SLASH], -[dnl - AC_CACHE_CHECK([whether mkdir fails due to a trailing slash], - gl_cv_func_mkdir_trailing_slash_bug, - [ - # Arrange for deletion of the temporary directory this test might create. - ac_clean_files="$ac_clean_files confdir-slash" - AC_TRY_RUN([ -# include <sys/types.h> -# include <sys/stat.h> -# include <stdlib.h> - int main () - { - rmdir ("confdir-slash"); - exit (mkdir ("confdir-slash/", 0700)); - } - ], - gl_cv_func_mkdir_trailing_slash_bug=no, - gl_cv_func_mkdir_trailing_slash_bug=yes, - gl_cv_func_mkdir_trailing_slash_bug=yes - ) - ] - ) - - if test $gl_cv_func_mkdir_trailing_slash_bug = yes; then - AC_LIBOBJ(mkdir) - AC_DEFINE(mkdir, rpl_mkdir, - [Define to rpl_mkdir if the replacement function should be used.]) - gl_PREREQ_MKDIR - fi -]) - -# Prerequisites of lib/mkdir.c. -AC_DEFUN([gl_PREREQ_MKDIR], [:]) diff --git a/m4/mkstemp.m4 b/m4/mkstemp.m4 deleted file mode 100644 index 57fa8a485..000000000 --- a/m4/mkstemp.m4 +++ /dev/null @@ -1,71 +0,0 @@ -#serial 13 - -# Copyright (C) 2001, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# On some hosts (e.g., HP-UX 10.20, SunOS 4.1.4, Solaris 2.5.1), mkstemp has a -# silly limit that it can create no more than 26 files from a given template. -# Other systems lack mkstemp altogether. -# On OSF1/Tru64 V4.0F, the system-provided mkstemp function can create -# only 32 files per process. -# On systems like the above, arrange to use the replacement function. -AC_DEFUN([gl_FUNC_MKSTEMP], -[dnl - AC_REPLACE_FUNCS(mkstemp) - if test $ac_cv_func_mkstemp = no; then - gl_cv_func_mkstemp_limitations=yes - else - AC_CACHE_CHECK([for mkstemp limitations], - gl_cv_func_mkstemp_limitations, - [ - mkdir conftest.mkstemp - AC_TRY_RUN([ -# include <stdlib.h> -# include <unistd.h> - int main () - { - int i; - for (i = 0; i < 70; i++) - { - char template[] = "conftest.mkstemp/coXXXXXX"; - int fd = mkstemp (template); - if (fd == -1) - exit (1); - close (fd); - } - exit (0); - } - ], - gl_cv_func_mkstemp_limitations=no, - gl_cv_func_mkstemp_limitations=yes, - gl_cv_func_mkstemp_limitations=yes - ) - rm -rf conftest.mkstemp - ] - ) - fi - - if test $gl_cv_func_mkstemp_limitations = yes; then - AC_LIBOBJ(mkstemp) - AC_LIBOBJ(tempname) - AC_DEFINE(mkstemp, rpl_mkstemp, - [Define to rpl_mkstemp if the replacement function should be used.]) - gl_PREREQ_MKSTEMP - gl_PREREQ_TEMPNAME - fi -]) - -# Prerequisites of lib/mkstemp.c. -AC_DEFUN([gl_PREREQ_MKSTEMP], -[ -]) - -# Prerequisites of lib/tempname.c. -AC_DEFUN([gl_PREREQ_TEMPNAME], -[ - AC_CHECK_HEADERS_ONCE(sys/time.h) - AC_CHECK_FUNCS(__secure_getenv gettimeofday) - AC_REQUIRE([gl_AC_TYPE_UINTMAX_T]) -]) diff --git a/m4/mktime.m4 b/m4/mktime.m4 deleted file mode 100644 index 07be5ccc0..000000000 --- a/m4/mktime.m4 +++ /dev/null @@ -1,195 +0,0 @@ -#serial 7 -dnl Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Jim Meyering. - -# Redefine AC_FUNC_MKTIME, to fix a bug in Autoconf 2.57 and earlier. -# This redefinition can be removed once a new version of Autoconf comes out. -# The redefinition is taken from -# <http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/autoconf/autoconf/lib/autoconf/functions.m4?rev=1.78>. -# AC_FUNC_MKTIME -# -------------- -AC_DEFUN([AC_FUNC_MKTIME], -[AC_REQUIRE([AC_HEADER_TIME])dnl -AC_CHECK_HEADERS_ONCE(sys/time.h) -AC_CHECK_FUNCS_ONCE(alarm) -AC_CACHE_CHECK([for working mktime], ac_cv_func_working_mktime, -[AC_RUN_IFELSE([AC_LANG_SOURCE( -[[/* Test program from Paul Eggert and Tony Leneis. */ -#if TIME_WITH_SYS_TIME -# include <sys/time.h> -# include <time.h> -#else -# if HAVE_SYS_TIME_H -# include <sys/time.h> -# else -# include <time.h> -# endif -#endif - -#include <stdlib.h> -#include <unistd.h> - -#if !HAVE_ALARM -# define alarm(X) /* empty */ -#endif - -/* Work around redefinition to rpl_putenv by other config tests. */ -#undef putenv - -static time_t time_t_max; -static time_t time_t_min; - -/* Values we'll use to set the TZ environment variable. */ -static char *tz_strings[] = { - (char *) 0, "TZ=GMT0", "TZ=JST-9", - "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00" -}; -#define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0])) - -/* Fail if mktime fails to convert a date in the spring-forward gap. - Based on a problem report from Andreas Jaeger. */ -static void -spring_forward_gap () -{ - /* glibc (up to about 1998-10-07) failed this test. */ - struct tm tm; - - /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0" - instead of "TZ=America/Vancouver" in order to detect the bug even - on systems that don't support the Olson extension, or don't have the - full zoneinfo tables installed. */ - putenv ("TZ=PST8PDT,M4.1.0,M10.5.0"); - - tm.tm_year = 98; - tm.tm_mon = 3; - tm.tm_mday = 5; - tm.tm_hour = 2; - tm.tm_min = 0; - tm.tm_sec = 0; - tm.tm_isdst = -1; - if (mktime (&tm) == (time_t)-1) - exit (1); -} - -static void -mktime_test1 (now) - time_t now; -{ - struct tm *lt; - if ((lt = localtime (&now)) && mktime (lt) != now) - exit (1); -} - -static void -mktime_test (now) - time_t now; -{ - mktime_test1 (now); - mktime_test1 ((time_t) (time_t_max - now)); - mktime_test1 ((time_t) (time_t_min + now)); -} - -static void -irix_6_4_bug () -{ - /* Based on code from Ariel Faigon. */ - struct tm tm; - tm.tm_year = 96; - tm.tm_mon = 3; - tm.tm_mday = 0; - tm.tm_hour = 0; - tm.tm_min = 0; - tm.tm_sec = 0; - tm.tm_isdst = -1; - mktime (&tm); - if (tm.tm_mon != 2 || tm.tm_mday != 31) - exit (1); -} - -static void -bigtime_test (j) - int j; -{ - struct tm tm; - time_t now; - tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j; - now = mktime (&tm); - if (now != (time_t) -1) - { - struct tm *lt = localtime (&now); - if (! (lt - && lt->tm_year == tm.tm_year - && lt->tm_mon == tm.tm_mon - && lt->tm_mday == tm.tm_mday - && lt->tm_hour == tm.tm_hour - && lt->tm_min == tm.tm_min - && lt->tm_sec == tm.tm_sec - && lt->tm_yday == tm.tm_yday - && lt->tm_wday == tm.tm_wday - && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst) - == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst)))) - exit (1); - } -} - -int -main () -{ - time_t t, delta; - int i, j; - - /* This test makes some buggy mktime implementations loop. - Give up after 60 seconds; a mktime slower than that - isn't worth using anyway. */ - alarm (60); - - for (time_t_max = 1; 0 < time_t_max; time_t_max *= 2) - continue; - time_t_max--; - if ((time_t) -1 < 0) - for (time_t_min = -1; (time_t) (time_t_min * 2) < 0; time_t_min *= 2) - continue; - delta = time_t_max / 997; /* a suitable prime number */ - for (i = 0; i < N_STRINGS; i++) - { - if (tz_strings[i]) - putenv (tz_strings[i]); - - for (t = 0; t <= time_t_max - delta; t += delta) - mktime_test (t); - mktime_test ((time_t) 1); - mktime_test ((time_t) (60 * 60)); - mktime_test ((time_t) (60 * 60 * 24)); - - for (j = 1; 0 < j; j *= 2) - bigtime_test (j); - bigtime_test (j - 1); - } - irix_6_4_bug (); - spring_forward_gap (); - exit (0); -}]])], - [ac_cv_func_working_mktime=yes], - [ac_cv_func_working_mktime=no], - [ac_cv_func_working_mktime=no])]) -if test $ac_cv_func_working_mktime = no; then - AC_LIBOBJ([mktime]) -fi -])# AC_FUNC_MKTIME - -AC_DEFUN([gl_FUNC_MKTIME], -[ - AC_REQUIRE([AC_FUNC_MKTIME]) - if test $ac_cv_func_working_mktime = no; then - AC_DEFINE(mktime, rpl_mktime, - [Define to rpl_mktime if the replacement function should be used.]) - gl_PREREQ_MKTIME - fi -]) - -# Prerequisites of lib/mktime.c. -AC_DEFUN([gl_PREREQ_MKTIME], [:]) diff --git a/m4/modechange.m4 b/m4/modechange.m4 deleted file mode 100644 index c703e94f5..000000000 --- a/m4/modechange.m4 +++ /dev/null @@ -1,11 +0,0 @@ -# modechange.m4 serial 5 -dnl Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_MODECHANGE], -[ - AC_LIBSOURCES([modechange.c, modechange.h]) - AC_LIBOBJ([modechange]) -]) diff --git a/m4/mountlist.m4 b/m4/mountlist.m4 deleted file mode 100644 index b2a2e12f8..000000000 --- a/m4/mountlist.m4 +++ /dev/null @@ -1,25 +0,0 @@ -#serial 8 -dnl Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_MOUNTLIST], -[ - AC_LIBSOURCES([mountlist.c, mountlist.h]) - - gl_LIST_MOUNTED_FILE_SYSTEMS([gl_cv_list_mounted_fs=yes], - [gl_cv_list_mounted_fs=no]) - if test $gl_cv_list_mounted_fs = yes; then - AC_LIBOBJ(mountlist) - gl_PREREQ_MOUNTLIST_EXTRA - fi -]) - -# Prerequisites of lib/mountlist.c not done by gl_LIST_MOUNTED_FILE_SYSTEMS. -AC_DEFUN([gl_PREREQ_MOUNTLIST_EXTRA], -[ - dnl Note gl_LIST_MOUNTED_FILE_SYSTEMS checks for mntent.h, not sys/mntent.h. - AC_CHECK_HEADERS(sys/mntent.h) - gl_FSTYPENAME -]) diff --git a/m4/nanosleep.m4 b/m4/nanosleep.m4 deleted file mode 100644 index 56c66bbb9..000000000 --- a/m4/nanosleep.m4 +++ /dev/null @@ -1,76 +0,0 @@ -#serial 17 - -dnl From Jim Meyering. -dnl Check for the nanosleep function. -dnl If not found, use the supplied replacement. -dnl - -# Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005, 2006 Free Software -# Foundation, Inc. - -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_FUNC_NANOSLEEP], -[ - AC_LIBSOURCES([nanosleep.c]) - - dnl Persuade glibc and Solaris <time.h> to declare nanosleep. - AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) - - AC_REQUIRE([AC_HEADER_TIME]) - AC_CHECK_HEADERS_ONCE(sys/time.h) - - nanosleep_save_libs=$LIBS - - # Solaris 2.5.1 needs -lposix4 to get the nanosleep function. - # Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4. - AC_SEARCH_LIBS([nanosleep], [rt posix4], - [test "$ac_cv_search_nanosleep" = "none required" || - LIB_NANOSLEEP=$ac_cv_search_nanosleep]) - AC_SUBST([LIB_NANOSLEEP]) - - AC_CACHE_CHECK([for nanosleep], - [gl_cv_func_nanosleep], - [ - AC_LINK_IFELSE([AC_LANG_SOURCE([[ -# if TIME_WITH_SYS_TIME -# include <sys/time.h> -# include <time.h> -# else -# if HAVE_SYS_TIME_H -# include <sys/time.h> -# else -# include <time.h> -# endif -# endif - - int - main () - { - struct timespec ts_sleep, ts_remaining; - ts_sleep.tv_sec = 0; - ts_sleep.tv_nsec = 1; - return nanosleep (&ts_sleep, &ts_remaining) < 0; - } - ]])], - [gl_cv_func_nanosleep=yes], - [gl_cv_func_nanosleep=no]) - ]) - if test $gl_cv_func_nanosleep = no; then - AC_LIBOBJ(nanosleep) - AC_DEFINE(nanosleep, rpl_nanosleep, - [Define to rpl_nanosleep if the replacement function should be used.]) - gl_PREREQ_NANOSLEEP - fi - - LIBS=$nanosleep_save_libs -]) - -# Prerequisites of lib/nanosleep.c. -AC_DEFUN([gl_PREREQ_NANOSLEEP], -[ - AC_CHECK_FUNCS_ONCE(siginterrupt) - AC_CHECK_HEADERS_ONCE(sys/select.h) -]) diff --git a/m4/netinet_in_h.m4 b/m4/netinet_in_h.m4 deleted file mode 100644 index d73531a05..000000000 --- a/m4/netinet_in_h.m4 +++ /dev/null @@ -1,18 +0,0 @@ -# netinet_in_h.m4 serial 1 -dnl Copyright (C) 2006 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl Written by Simon Josefsson - -AC_DEFUN([gl_HEADER_NETINET_IN], -[ - AC_CHECK_HEADERS_ONCE([netinet/in.h]) - if test $ac_cv_header_netinet_in_h = yes; then - NETINET_IN_H='' - else - NETINET_IN_H='netinet/in.h' - fi - AC_SUBST(NETINET_IN_H) -]) diff --git a/m4/nls.m4 b/m4/nls.m4 deleted file mode 100644 index 7967cc2f9..000000000 --- a/m4/nls.m4 +++ /dev/null @@ -1,31 +0,0 @@ -# nls.m4 serial 3 (gettext-0.15) -dnl Copyright (C) 1995-2003, 2005-2006 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. -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. - -dnl Authors: -dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000. -dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003. - -AC_PREREQ(2.50) - -AC_DEFUN([AM_NLS], -[ - AC_MSG_CHECKING([whether NLS is requested]) - dnl Default is enabled NLS - AC_ARG_ENABLE(nls, - [ --disable-nls do not use Native Language Support], - USE_NLS=$enableval, USE_NLS=yes) - AC_MSG_RESULT($USE_NLS) - AC_SUBST(USE_NLS) -]) diff --git a/m4/obstack.m4 b/m4/obstack.m4 deleted file mode 100644 index ea60f7fc8..000000000 --- a/m4/obstack.m4 +++ /dev/null @@ -1,23 +0,0 @@ -# obstack.m4 serial 4 -dnl Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_OBSTACK], -[ - AC_FUNC_OBSTACK - dnl Note: AC_FUNC_OBSTACK does AC_LIBSOURCES([obstack.h, obstack.c]). - if test $ac_cv_func_obstack = no; then - gl_PREREQ_OBSTACK - fi -]) - -# Prerequisites of lib/obstack.c. -AC_DEFUN([gl_PREREQ_OBSTACK], -[ - AC_REQUIRE([gl_AC_HEADER_INTTYPES_H]) - AC_REQUIRE([gl_AC_HEADER_STDINT_H]) - AC_REQUIRE([gl_AC_TYPE_UINTMAX_T]) - : -]) diff --git a/m4/openat.m4 b/m4/openat.m4 deleted file mode 100644 index 0abb8c87d..000000000 --- a/m4/openat.m4 +++ /dev/null @@ -1,39 +0,0 @@ -#serial 9 -# See if we need to use our replacement for Solaris' openat et al functions. - -dnl Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -# Written by Jim Meyering. - -AC_DEFUN([gl_FUNC_OPENAT], -[ - AC_LIBSOURCES([openat.c, openat.h, openat-priv.h, openat-die.c, at-func.c]) - AC_LIBSOURCES([intprops.h]) - AC_LIBSOURCES([mkdirat.c]) - AC_LIBSOURCES([fchmodat.c]) - - # No system provides these functions; compile them unconditionally. - AC_LIBOBJ([mkdirat]) - AC_LIBOBJ([fchmodat]) - - AC_LIBOBJ([openat-die]) - AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) - AC_CHECK_FUNCS_ONCE([lchmod]) - AC_CHECK_FUNCS_ONCE([fdopendir]) - AC_REPLACE_FUNCS(openat) - case $ac_cv_func_openat in - yes) ;; - *) - AC_DEFINE([__OPENAT_PREFIX], [[rpl_]], - [Define to rpl_ if the openat replacement function should be used.]) - gl_PREREQ_OPENAT;; - esac -]) - -AC_DEFUN([gl_PREREQ_OPENAT], -[ - AC_REQUIRE([gl_SAVE_CWD]) -]) diff --git a/m4/pathmax.m4 b/m4/pathmax.m4 deleted file mode 100644 index 26c165935..000000000 --- a/m4/pathmax.m4 +++ /dev/null @@ -1,13 +0,0 @@ -# pathmax.m4 serial 5 -dnl Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_PATHMAX], -[ - AC_LIBSOURCES([pathmax.h]) - - dnl Prerequisites of lib/pathmax.h. - AC_CHECK_HEADERS_ONCE(sys/param.h) -]) diff --git a/m4/perl.m4 b/m4/perl.m4 deleted file mode 100644 index 96421b9a3..000000000 --- a/m4/perl.m4 +++ /dev/null @@ -1,48 +0,0 @@ -#serial 7 - -dnl From Jim Meyering. -dnl Find a new-enough version of Perl. -dnl - -# Copyright (C) 1998, 1999, 2000, 2001, 2003, 2004 Free Software -# Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_PERL], -[ - dnl FIXME: don't hard-code 5.003 - dnl FIXME: should we cache the result? - AC_MSG_CHECKING([for perl5.003 or newer]) - if test "${PERL+set}" = set; then - # `PERL' is set in the user's environment. - candidate_perl_names="$PERL" - perl_specified=yes - else - candidate_perl_names='perl perl5' - perl_specified=no - fi - - found=no - AC_SUBST(PERL) - PERL="$am_missing_run perl" - for perl in $candidate_perl_names; do - # Run test in a subshell; some versions of sh will print an error if - # an executable is not found, even if stderr is redirected. - if ( $perl -e 'require 5.003; use File::Compare' ) > /dev/null 2>&1; then - PERL=$perl - found=yes - break - fi - done - - AC_MSG_RESULT($found) - test $found = no && AC_MSG_WARN([ -WARNING: You don't seem to have perl5.003 or newer installed, or you lack - a usable version of the Perl File::Compare module. As a result, - you may be unable to run a few tests or to regenerate certain - files if you modify the sources from which they are derived. -] ) -]) diff --git a/m4/physmem.m4 b/m4/physmem.m4 deleted file mode 100644 index 18250ddec..000000000 --- a/m4/physmem.m4 +++ /dev/null @@ -1,39 +0,0 @@ -# physmem.m4 serial 5 -dnl Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -# Check for the external symbol, _system_configuration, -# a struct with member `physmem'. -AC_DEFUN([gl_SYS__SYSTEM_CONFIGURATION], - [AC_CACHE_CHECK(for external symbol _system_configuration, - gl_cv_var__system_configuration, - [AC_LINK_IFELSE([AC_LANG_PROGRAM( - [[#include <sys/systemcfg.h> - ]], - [double x = _system_configuration.physmem;])], - [gl_cv_var__system_configuration=yes], - [gl_cv_var__system_configuration=no])]) - - if test $gl_cv_var__system_configuration = yes; then - AC_DEFINE(HAVE__SYSTEM_CONFIGURATION, 1, - [Define to 1 if you have the external variable, - _system_configuration with a member named physmem.]) - fi - ] -) - -AC_DEFUN([gl_PHYSMEM], -[ - AC_LIBSOURCES([physmem.c, physmem.h]) - AC_LIBOBJ([physmem]) - - # Prerequisites of lib/physmem.c. - AC_CHECK_HEADERS([sys/pstat.h sys/sysmp.h sys/sysinfo.h \ - machine/hal_sysinfo.h sys/table.h sys/param.h sys/sysctl.h \ - sys/systemcfg.h],,, [AC_INCLUDES_DEFAULT]) - - AC_CHECK_FUNCS(pstat_getstatic pstat_getdynamic sysmp getsysinfo sysctl table) - AC_REQUIRE([gl_SYS__SYSTEM_CONFIGURATION]) -]) diff --git a/m4/po.m4 b/m4/po.m4 deleted file mode 100644 index 00133ef36..000000000 --- a/m4/po.m4 +++ /dev/null @@ -1,428 +0,0 @@ -# po.m4 serial 13 (gettext-0.15) -dnl Copyright (C) 1995-2006 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. -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. - -dnl Authors: -dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000. -dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003. - -AC_PREREQ(2.50) - -dnl Checks for all prerequisites of the po subdirectory. -AC_DEFUN([AM_PO_SUBDIRS], -[ - AC_REQUIRE([AC_PROG_MAKE_SET])dnl - AC_REQUIRE([AC_PROG_INSTALL])dnl - AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake - AC_REQUIRE([AM_NLS])dnl - - dnl Perform the following tests also if --disable-nls has been given, - dnl because they are needed for "make dist" to work. - - dnl Search for GNU msgfmt in the PATH. - dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions. - dnl The second test excludes FreeBSD msgfmt. - AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, - [$ac_dir/$ac_word --statistics /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 && - (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)], - :) - AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) - - dnl Test whether it is GNU msgfmt >= 0.15. -changequote(,)dnl - case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in - '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;; - *) MSGFMT_015=$MSGFMT ;; - esac -changequote([,])dnl - AC_SUBST([MSGFMT_015]) -changequote(,)dnl - case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in - '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;; - *) GMSGFMT_015=$GMSGFMT ;; - esac -changequote([,])dnl - AC_SUBST([GMSGFMT_015]) - - dnl Search for GNU xgettext 0.12 or newer in the PATH. - dnl The first test excludes Solaris xgettext and early GNU xgettext versions. - dnl The second test excludes FreeBSD xgettext. - AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, - [$ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 && - (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)], - :) - dnl Remove leftover from FreeBSD xgettext call. - rm -f messages.po - - dnl Test whether it is GNU xgettext >= 0.15. -changequote(,)dnl - case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in - '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;; - *) XGETTEXT_015=$XGETTEXT ;; - esac -changequote([,])dnl - AC_SUBST([XGETTEXT_015]) - - dnl Search for GNU msgmerge 0.11 or newer in the PATH. - AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge, - [$ac_dir/$ac_word --update -q /dev/null /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1], :) - - dnl Installation directories. - dnl Autoconf >= 2.60 defines localedir. For older versions of autoconf, we - dnl have to define it here, so that it can be used in po/Makefile. - test -n "$localedir" || localedir='${datadir}/locale' - AC_SUBST([localedir]) - - AC_CONFIG_COMMANDS([po-directories], [[ - for ac_file in $CONFIG_FILES; do - # Support "outfile[:infile[:infile...]]" - case "$ac_file" in - *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; - esac - # PO directories have a Makefile.in generated from Makefile.in.in. - case "$ac_file" in */Makefile.in) - # Adjust a relative srcdir. - ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` - ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`" - ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` - # In autoconf-2.13 it is called $ac_given_srcdir. - # In autoconf-2.50 it is called $srcdir. - test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir" - case "$ac_given_srcdir" in - .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;; - /*) top_srcdir="$ac_given_srcdir" ;; - *) top_srcdir="$ac_dots$ac_given_srcdir" ;; - esac - # Treat a directory as a PO directory if and only if it has a - # POTFILES.in file. This allows packages to have multiple PO - # directories under different names or in different locations. - if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then - rm -f "$ac_dir/POTFILES" - test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES" - cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES" - POMAKEFILEDEPS="POTFILES.in" - # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend - # on $ac_dir but don't depend on user-specified configuration - # parameters. - if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then - # The LINGUAS file contains the set of available languages. - if test -n "$OBSOLETE_ALL_LINGUAS"; then - test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete" - fi - ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"` - # Hide the ALL_LINGUAS assigment from automake < 1.5. - eval 'ALL_LINGUAS''=$ALL_LINGUAS_' - POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS" - else - # The set of available languages was given in configure.in. - # Hide the ALL_LINGUAS assigment from automake < 1.5. - eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS' - fi - # Compute POFILES - # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po) - # Compute UPDATEPOFILES - # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update) - # Compute DUMMYPOFILES - # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop) - # Compute GMOFILES - # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo) - case "$ac_given_srcdir" in - .) srcdirpre= ;; - *) srcdirpre='$(srcdir)/' ;; - esac - POFILES= - UPDATEPOFILES= - DUMMYPOFILES= - GMOFILES= - for lang in $ALL_LINGUAS; do - POFILES="$POFILES $srcdirpre$lang.po" - UPDATEPOFILES="$UPDATEPOFILES $lang.po-update" - DUMMYPOFILES="$DUMMYPOFILES $lang.nop" - GMOFILES="$GMOFILES $srcdirpre$lang.gmo" - done - # CATALOGS depends on both $ac_dir and the user's LINGUAS - # environment variable. - INST_LINGUAS= - if test -n "$ALL_LINGUAS"; then - for presentlang in $ALL_LINGUAS; do - useit=no - if test "%UNSET%" != "$LINGUAS"; then - desiredlanguages="$LINGUAS" - else - desiredlanguages="$ALL_LINGUAS" - fi - for desiredlang in $desiredlanguages; do - # Use the presentlang catalog if desiredlang is - # a. equal to presentlang, or - # b. a variant of presentlang (because in this case, - # presentlang can be used as a fallback for messages - # which are not translated in the desiredlang catalog). - case "$desiredlang" in - "$presentlang"*) useit=yes;; - esac - done - if test $useit = yes; then - INST_LINGUAS="$INST_LINGUAS $presentlang" - fi - done - fi - CATALOGS= - if test -n "$INST_LINGUAS"; then - for lang in $INST_LINGUAS; do - CATALOGS="$CATALOGS $lang.gmo" - done - fi - test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile" - sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile" - for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do - if test -f "$f"; then - case "$f" in - *.orig | *.bak | *~) ;; - *) cat "$f" >> "$ac_dir/Makefile" ;; - esac - fi - done - fi - ;; - esac - done]], - [# Capture the value of obsolete ALL_LINGUAS because we need it to compute - # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it - # from automake < 1.5. - eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"' - # Capture the value of LINGUAS because we need it to compute CATALOGS. - LINGUAS="${LINGUAS-%UNSET%}" - ]) -]) - -dnl Postprocesses a Makefile in a directory containing PO files. -AC_DEFUN([AM_POSTPROCESS_PO_MAKEFILE], -[ - # When this code is run, in config.status, two variables have already been - # set: - # - OBSOLETE_ALL_LINGUAS is the value of LINGUAS set in configure.in, - # - LINGUAS is the value of the environment variable LINGUAS at configure - # time. - -changequote(,)dnl - # Adjust a relative srcdir. - ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` - ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`" - ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` - # In autoconf-2.13 it is called $ac_given_srcdir. - # In autoconf-2.50 it is called $srcdir. - test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir" - case "$ac_given_srcdir" in - .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;; - /*) top_srcdir="$ac_given_srcdir" ;; - *) top_srcdir="$ac_dots$ac_given_srcdir" ;; - esac - - # Find a way to echo strings without interpreting backslash. - if test "X`(echo '\t') 2>/dev/null`" = 'X\t'; then - gt_echo='echo' - else - if test "X`(printf '%s\n' '\t') 2>/dev/null`" = 'X\t'; then - gt_echo='printf %s\n' - else - echo_func () { - cat <<EOT -$* -EOT - } - gt_echo='echo_func' - fi - fi - - # A sed script that extracts the value of VARIABLE from a Makefile. - sed_x_variable=' -# Test if the hold space is empty. -x -s/P/P/ -x -ta -# Yes it was empty. Look if we have the expected variable definition. -/^[ ]*VARIABLE[ ]*=/{ - # Seen the first line of the variable definition. - s/^[ ]*VARIABLE[ ]*=// - ba -} -bd -:a -# Here we are processing a line from the variable definition. -# Remove comment, more precisely replace it with a space. -s/#.*$/ / -# See if the line ends in a backslash. -tb -:b -s/\\$// -# Print the line, without the trailing backslash. -p -tc -# There was no trailing backslash. The end of the variable definition is -# reached. Clear the hold space. -s/^.*$// -x -bd -:c -# A trailing backslash means that the variable definition continues in the -# next line. Put a nonempty string into the hold space to indicate this. -s/^.*$/P/ -x -:d -' -changequote([,])dnl - - # Set POTFILES to the value of the Makefile variable POTFILES. - sed_x_POTFILES=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 's/VARIABLE/POTFILES/g'` - POTFILES=`sed -n -e "$sed_x_POTFILES" < "$ac_file"` - # Compute POTFILES_DEPS as - # $(foreach file, $(POTFILES), $(top_srcdir)/$(file)) - POTFILES_DEPS= - for file in $POTFILES; do - POTFILES_DEPS="$POTFILES_DEPS "'$(top_srcdir)/'"$file" - done - POMAKEFILEDEPS="" - - if test -n "$OBSOLETE_ALL_LINGUAS"; then - test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete" - fi - if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then - # The LINGUAS file contains the set of available languages. - ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"` - POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS" - else - # Set ALL_LINGUAS to the value of the Makefile variable LINGUAS. - sed_x_LINGUAS=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 's/VARIABLE/LINGUAS/g'` - ALL_LINGUAS_=`sed -n -e "$sed_x_LINGUAS" < "$ac_file"` - fi - # Hide the ALL_LINGUAS assigment from automake < 1.5. - eval 'ALL_LINGUAS''=$ALL_LINGUAS_' - # Compute POFILES - # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po) - # Compute UPDATEPOFILES - # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update) - # Compute DUMMYPOFILES - # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop) - # Compute GMOFILES - # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo) - # Compute PROPERTIESFILES - # as $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).properties) - # Compute CLASSFILES - # as $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).class) - # Compute QMFILES - # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).qm) - # Compute MSGFILES - # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang)).msg) - # Compute RESOURCESDLLFILES - # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang))/$(DOMAIN).resources.dll) - case "$ac_given_srcdir" in - .) srcdirpre= ;; - *) srcdirpre='$(srcdir)/' ;; - esac - POFILES= - UPDATEPOFILES= - DUMMYPOFILES= - GMOFILES= - PROPERTIESFILES= - CLASSFILES= - QMFILES= - MSGFILES= - RESOURCESDLLFILES= - for lang in $ALL_LINGUAS; do - POFILES="$POFILES $srcdirpre$lang.po" - UPDATEPOFILES="$UPDATEPOFILES $lang.po-update" - DUMMYPOFILES="$DUMMYPOFILES $lang.nop" - GMOFILES="$GMOFILES $srcdirpre$lang.gmo" - PROPERTIESFILES="$PROPERTIESFILES \$(top_srcdir)/\$(DOMAIN)_$lang.properties" - CLASSFILES="$CLASSFILES \$(top_srcdir)/\$(DOMAIN)_$lang.class" - QMFILES="$QMFILES $srcdirpre$lang.qm" - frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'` - MSGFILES="$MSGFILES $srcdirpre$frobbedlang.msg" - frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'` - RESOURCESDLLFILES="$RESOURCESDLLFILES $srcdirpre$frobbedlang/\$(DOMAIN).resources.dll" - done - # CATALOGS depends on both $ac_dir and the user's LINGUAS - # environment variable. - INST_LINGUAS= - if test -n "$ALL_LINGUAS"; then - for presentlang in $ALL_LINGUAS; do - useit=no - if test "%UNSET%" != "$LINGUAS"; then - desiredlanguages="$LINGUAS" - else - desiredlanguages="$ALL_LINGUAS" - fi - for desiredlang in $desiredlanguages; do - # Use the presentlang catalog if desiredlang is - # a. equal to presentlang, or - # b. a variant of presentlang (because in this case, - # presentlang can be used as a fallback for messages - # which are not translated in the desiredlang catalog). - case "$desiredlang" in - "$presentlang"*) useit=yes;; - esac - done - if test $useit = yes; then - INST_LINGUAS="$INST_LINGUAS $presentlang" - fi - done - fi - CATALOGS= - JAVACATALOGS= - QTCATALOGS= - TCLCATALOGS= - CSHARPCATALOGS= - if test -n "$INST_LINGUAS"; then - for lang in $INST_LINGUAS; do - CATALOGS="$CATALOGS $lang.gmo" - JAVACATALOGS="$JAVACATALOGS \$(DOMAIN)_$lang.properties" - QTCATALOGS="$QTCATALOGS $lang.qm" - frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'` - TCLCATALOGS="$TCLCATALOGS $frobbedlang.msg" - frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'` - CSHARPCATALOGS="$CSHARPCATALOGS $frobbedlang/\$(DOMAIN).resources.dll" - done - fi - - sed -e "s|@POTFILES_DEPS@|$POTFILES_DEPS|g" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@PROPERTIESFILES@|$PROPERTIESFILES|g" -e "s|@CLASSFILES@|$CLASSFILES|g" -e "s|@QMFILES@|$QMFILES|g" -e "s|@MSGFILES@|$MSGFILES|g" -e "s|@RESOURCESDLLFILES@|$RESOURCESDLLFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@JAVACATALOGS@|$JAVACATALOGS|g" -e "s|@QTCATALOGS@|$QTCATALOGS|g" -e "s|@TCLCATALOGS@|$TCLCATALOGS|g" -e "s|@CSHARPCATALOGS@|$CSHARPCATALOGS|g" -e 's,^#distdir:,distdir:,' < "$ac_file" > "$ac_file.tmp" - if grep -l '@TCLCATALOGS@' "$ac_file" > /dev/null; then - # Add dependencies that cannot be formulated as a simple suffix rule. - for lang in $ALL_LINGUAS; do - frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'` - cat >> "$ac_file.tmp" <<EOF -$frobbedlang.msg: $lang.po - @echo "\$(MSGFMT) -c --tcl -d \$(srcdir) -l $lang $srcdirpre$lang.po"; \ - \$(MSGFMT) -c --tcl -d "\$(srcdir)" -l $lang $srcdirpre$lang.po || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; } -EOF - done - fi - if grep -l '@CSHARPCATALOGS@' "$ac_file" > /dev/null; then - # Add dependencies that cannot be formulated as a simple suffix rule. - for lang in $ALL_LINGUAS; do - frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'` - cat >> "$ac_file.tmp" <<EOF -$frobbedlang/\$(DOMAIN).resources.dll: $lang.po - @echo "\$(MSGFMT) -c --csharp -d \$(srcdir) -l $lang $srcdirpre$lang.po -r \$(DOMAIN)"; \ - \$(MSGFMT) -c --csharp -d "\$(srcdir)" -l $lang $srcdirpre$lang.po -r "\$(DOMAIN)" || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; } -EOF - done - fi - if test -n "$POMAKEFILEDEPS"; then - cat >> "$ac_file.tmp" <<EOF -Makefile: $POMAKEFILEDEPS -EOF - fi - mv "$ac_file.tmp" "$ac_file" -]) diff --git a/m4/posixtm.m4 b/m4/posixtm.m4 deleted file mode 100644 index 9acf84a12..000000000 --- a/m4/posixtm.m4 +++ /dev/null @@ -1,14 +0,0 @@ -# posixtm.m4 serial 4 -dnl Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_POSIXTM], -[ - AC_LIBSOURCES([posixtm.c, posixtm.h]) - AC_LIBOBJ(posixtm) - - dnl Prerequisites of lib/posixtm.c. - AC_STRUCT_TM -]) diff --git a/m4/posixver.m4 b/m4/posixver.m4 deleted file mode 100644 index 838441a49..000000000 --- a/m4/posixver.m4 +++ /dev/null @@ -1,46 +0,0 @@ -# posixver.m4 serial 7 -dnl Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_POSIXVER], -[ - AC_LIBSOURCES([posixver.c, posixver.h]) - AC_LIBOBJ([posixver]) - - AC_REQUIRE([gl_DEFAULT_POSIX2_VERSION]) -]) - -# Set the default level of POSIX conformance at configure-time. -# Build with `./configure DEFAULT_POSIX2_VERSION=199209 ...' to -# support the older version, thus preserving portability with -# scripts that use sort +1, tail +32, head -1, etc. -# Note however, that this breaks tools that might run commands -# like `sort +some-file' that conform with the newer standard. -AC_DEFUN([gl_DEFAULT_POSIX2_VERSION], -[ - AC_MSG_CHECKING([for desired default level of POSIX conformance]) - gl_default_posix2_version=none-specified - if test -n "$ac_cv_env_DEFAULT_POSIX2_VERSION_set"; then - gl_default_posix2_version=$ac_cv_env_DEFAULT_POSIX2_VERSION_value - AC_DEFINE_UNQUOTED(DEFAULT_POSIX2_VERSION, - $gl_default_posix2_version, - [Define the default level of POSIX conformance. The value is of - the form YYYYMM, specifying the year and month the standard was - adopted. If not defined here, it defaults to the value of - _POSIX2_VERSION in <unistd.h>. Define to 199209 to default to - POSIX 1003.2-1992, which makes standard programs like `head', - `tail', and `sort' accept obsolete options like `+10' and - `-10'. Define to 200112 to default to POSIX 1003.1-2001, which - makes these standard programs treat leading-`+' operands as - file names and require modern usages like `-n 10' instead of - `-10'. Whether defined here or not, the default can be - overridden at run time via the _POSIX2_VERSION environment - variable.]) - fi - AC_MSG_RESULT($gl_default_posix2_version) - AC_ARG_VAR( - [DEFAULT_POSIX2_VERSION], - [POSIX version to default to; see 'config.hin'.]) -]) diff --git a/m4/progtest.m4 b/m4/progtest.m4 deleted file mode 100644 index a56365cd3..000000000 --- a/m4/progtest.m4 +++ /dev/null @@ -1,92 +0,0 @@ -# progtest.m4 serial 4 (gettext-0.14.2) -dnl Copyright (C) 1996-2003, 2005 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. -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. - -dnl Authors: -dnl Ulrich Drepper <drepper@cygnus.com>, 1996. - -AC_PREREQ(2.50) - -# Search path for a program which passes the given test. - -dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR, -dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]]) -AC_DEFUN([AM_PATH_PROG_WITH_TEST], -[ -# Prepare PATH_SEPARATOR. -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh -fi - -# Find out how to test for executable files. Don't use a zero-byte file, -# as systems may use methods other than mode bits to determine executability. -cat >conf$$.file <<_ASEOF -#! /bin/sh -exit 0 -_ASEOF -chmod +x conf$$.file -if test -x conf$$.file >/dev/null 2>&1; then - ac_executable_p="test -x" -else - ac_executable_p="test -f" -fi -rm -f conf$$.file - -# 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(ac_cv_path_$1, -[case "[$]$1" in - [[\\/]]* | ?:[[\\/]]*) - ac_cv_path_$1="[$]$1" # Let the user override the test with a path. - ;; - *) - ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in ifelse([$5], , $PATH, [$5]); do - IFS="$ac_save_IFS" - test -z "$ac_dir" && ac_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then - echo "$as_me: trying $ac_dir/$ac_word..." >&AS_MESSAGE_LOG_FD - if [$3]; then - ac_cv_path_$1="$ac_dir/$ac_word$ac_exec_ext" - break 2 - fi - fi - done - done - IFS="$ac_save_IFS" -dnl If no 4th arg is given, leave the cache variable unset, -dnl so AC_PATH_PROGS will keep looking. -ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4" -])dnl - ;; -esac])dnl -$1="$ac_cv_path_$1" -if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then - AC_MSG_RESULT([$]$1) -else - AC_MSG_RESULT(no) -fi -AC_SUBST($1)dnl -]) diff --git a/m4/putenv.m4 b/m4/putenv.m4 deleted file mode 100644 index 04556b928..000000000 --- a/m4/putenv.m4 +++ /dev/null @@ -1,43 +0,0 @@ -# putenv.m4 serial 11 -dnl Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Jim Meyering. -dnl -dnl Check whether putenv ("FOO") removes FOO from the environment. -dnl The putenv in libc on at least SunOS 4.1.4 does *not* do that. - -AC_DEFUN([gl_FUNC_PUTENV], -[AC_CACHE_CHECK([for SVID conformant putenv], jm_cv_func_svid_putenv, - [AC_TRY_RUN([ - int - main () - { - /* Put it in env. */ - if (putenv ("CONFTEST_putenv=val")) - return 1; - - /* Try to remove it. */ - if (putenv ("CONFTEST_putenv")) - return 1; - - /* Make sure it was deleted. */ - if (getenv ("CONFTEST_putenv") != 0) - return 1; - - return 0; - } - ], - jm_cv_func_svid_putenv=yes, - jm_cv_func_svid_putenv=no, - dnl When crosscompiling, assume putenv is broken. - jm_cv_func_svid_putenv=no) - ]) - if test $jm_cv_func_svid_putenv = no; then - AC_LIBOBJ(putenv) - AC_DEFINE(putenv, rpl_putenv, - [Define to rpl_putenv if the replacement function should be used.]) - fi -]) diff --git a/m4/quote.m4 b/m4/quote.m4 deleted file mode 100644 index ca66b53aa..000000000 --- a/m4/quote.m4 +++ /dev/null @@ -1,14 +0,0 @@ -# quote.m4 serial 4 -dnl Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_QUOTE], -[ - AC_LIBSOURCES([quote.c, quote.h]) - AC_LIBOBJ([quote]) - - dnl Prerequisites of lib/quote.c. - dnl (none) -]) diff --git a/m4/quotearg.m4 b/m4/quotearg.m4 deleted file mode 100644 index 98ae13316..000000000 --- a/m4/quotearg.m4 +++ /dev/null @@ -1,17 +0,0 @@ -# quotearg.m4 serial 4 -dnl Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_QUOTEARG], -[ - AC_LIBSOURCES([quotearg.c, quotearg.h]) - AC_LIBOBJ([quotearg]) - - dnl Prerequisites of lib/quotearg.c. - AC_CHECK_HEADERS_ONCE(wchar.h wctype.h) - AC_CHECK_FUNCS_ONCE(iswprint mbsinit) - AC_TYPE_MBSTATE_T - gl_FUNC_MBRTOWC -]) diff --git a/m4/readlink.m4 b/m4/readlink.m4 deleted file mode 100644 index b4a7f55d7..000000000 --- a/m4/readlink.m4 +++ /dev/null @@ -1,20 +0,0 @@ -# readlink.m4 serial 2 -dnl Copyright (C) 2003 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_FUNC_READLINK], -[ - AC_CHECK_FUNCS(readlink) - if test $ac_cv_func_readlink = no; then - AC_LIBOBJ(readlink) - gl_PREREQ_READLINK - fi -]) - -# Prerequisites of lib/readlink.c. -AC_DEFUN([gl_PREREQ_READLINK], -[ - : -]) diff --git a/m4/readtokens.m4 b/m4/readtokens.m4 deleted file mode 100644 index 94561ebb3..000000000 --- a/m4/readtokens.m4 +++ /dev/null @@ -1,14 +0,0 @@ -# readtokens.m4 serial 4 -dnl Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_READTOKENS], -[ - AC_LIBSOURCES([readtokens.c, readtokens.h]) - AC_LIBOBJ([readtokens]) - - dnl Prerequisites of lib/readtokens.c. - : -]) diff --git a/m4/readutmp.m4 b/m4/readutmp.m4 deleted file mode 100644 index ac413f6c1..000000000 --- a/m4/readutmp.m4 +++ /dev/null @@ -1,55 +0,0 @@ -# readutmp.m4 serial 9 -dnl Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_READUTMP], -[ - AC_LIBSOURCES([readutmp.c, readutmp.h]) - AC_LIBOBJ([readutmp]) - - dnl Prerequisites of lib/readutmp.h and lib/readutmp.c. - AC_REQUIRE([AC_C_INLINE]) - AC_REQUIRE([gl_FUNC_FREE]) - AC_CHECK_HEADERS_ONCE(utmp.h utmpx.h) - AC_CHECK_FUNCS_ONCE(utmpname utmpxname) - AC_CHECK_DECLS(getutent,,,[ -#ifdef HAVE_UTMP_H -# include <utmp.h> -#endif -]) - if test $ac_cv_header_utmp_h = yes || test $ac_cv_header_utmpx_h = yes; then - utmp_includes="\ -$ac_includes_default -#ifdef HAVE_UTMPX_H -# include <utmpx.h> -#endif -#ifdef HAVE_UTMP_H -# include <utmp.h> -#endif -" - AC_CHECK_MEMBERS([struct utmpx.ut_user],,,[$utmp_includes]) - AC_CHECK_MEMBERS([struct utmp.ut_user],,,[$utmp_includes]) - AC_CHECK_MEMBERS([struct utmpx.ut_name],,,[$utmp_includes]) - AC_CHECK_MEMBERS([struct utmp.ut_name],,,[$utmp_includes]) - AC_CHECK_MEMBERS([struct utmpx.ut_type],,,[$utmp_includes]) - AC_CHECK_MEMBERS([struct utmp.ut_type],,,[$utmp_includes]) - AC_CHECK_MEMBERS([struct utmpx.ut_pid],,,[$utmp_includes]) - AC_CHECK_MEMBERS([struct utmp.ut_pid],,,[$utmp_includes]) - AC_CHECK_MEMBERS([struct utmpx.ut_id],,,[$utmp_includes]) - AC_CHECK_MEMBERS([struct utmp.ut_id],,,[$utmp_includes]) - AC_CHECK_MEMBERS([struct utmpx.ut_exit],,,[$utmp_includes]) - AC_CHECK_MEMBERS([struct utmp.ut_exit],,,[$utmp_includes]) - - AC_CHECK_MEMBERS([struct utmpx.ut_exit.ut_exit],,,[$utmp_includes]) - AC_CHECK_MEMBERS([struct utmp.ut_exit.ut_exit],,,[$utmp_includes]) - AC_CHECK_MEMBERS([struct utmpx.ut_exit.e_exit],,,[$utmp_includes]) - AC_CHECK_MEMBERS([struct utmp.ut_exit.e_exit],,,[$utmp_includes]) - - AC_CHECK_MEMBERS([struct utmpx.ut_exit.ut_termination],,,[$utmp_includes]) - AC_CHECK_MEMBERS([struct utmp.ut_exit.ut_termination],,,[$utmp_includes]) - AC_CHECK_MEMBERS([struct utmpx.ut_exit.e_termination],,,[$utmp_includes]) - AC_CHECK_MEMBERS([struct utmp.ut_exit.e_termination],,,[$utmp_includes]) - fi -]) diff --git a/m4/regex.m4 b/m4/regex.m4 deleted file mode 100644 index 5ca868bbe..000000000 --- a/m4/regex.m4 +++ /dev/null @@ -1,171 +0,0 @@ -#serial 38 - -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -dnl Initially derived from code in GNU grep. -dnl Mostly written by Jim Meyering. - -AC_PREREQ([2.50]) - -AC_DEFUN([gl_REGEX], -[ - AC_LIBSOURCES( - [regcomp.c, regex.c, regex.h, - regex_internal.c, regex_internal.h, regexec.c]) - - AC_ARG_WITH([included-regex], - [AC_HELP_STRING([--without-included-regex], - [don't compile regex; this is the default on - systems with recent-enough versions of the GNU C - Library (use with caution on other systems)])]) - - case $with_included_regex in #( - yes|no) ac_use_included_regex=$with_included_regex - ;; - '') - # If the system regex support is good enough that it passes the - # following run test, then default to *not* using the included regex.c. - # If cross compiling, assume the test would fail and use the included - # regex.c. The first failing regular expression is from `Spencer ere - # test #75' in grep-2.3. - AC_CACHE_CHECK([for working re_compile_pattern], - [gl_cv_func_re_compile_pattern_working], - [AC_RUN_IFELSE( - [AC_LANG_PROGRAM( - [AC_INCLUDES_DEFAULT - #include <limits.h> - #include <regex.h> - ], - [[static struct re_pattern_buffer regex; - unsigned char folded_chars[UCHAR_MAX + 1]; - int i; - const char *s; - struct re_registers regs; - re_set_syntax (RE_SYNTAX_POSIX_EGREP); - memset (®ex, 0, sizeof (regex)); - for (i = 0; i <= UCHAR_MAX; i++) - folded_chars[i] = i; - regex.translate = folded_chars; - s = re_compile_pattern ("a[[:@:>@:]]b\n", 11, ®ex); - /* This should fail with _Invalid character class name_ error. */ - if (!s) - exit (1); - - /* This should succeed, but does not for e.g. glibc-2.1.3. */ - memset (®ex, 0, sizeof (regex)); - s = re_compile_pattern ("{1", 2, ®ex); - - if (s) - exit (1); - - /* The following example is derived from a problem report - against gawk from Jorge Stolfi <stolfi@ic.unicamp.br>. */ - memset (®ex, 0, sizeof (regex)); - s = re_compile_pattern ("[an\371]*n", 7, ®ex); - if (s) - exit (1); - - /* This should match, but does not for e.g. glibc-2.2.1. */ - if (re_match (®ex, "an", 2, 0, ®s) != 2) - exit (1); - - memset (®ex, 0, sizeof (regex)); - s = re_compile_pattern ("x", 1, ®ex); - if (s) - exit (1); - - /* The version of regex.c in e.g. GNU libc-2.2.93 did not - work with a negative RANGE argument. */ - if (re_search (®ex, "wxy", 3, 2, -2, ®s) != 1) - exit (1); - - /* The version of regex.c in older versions of gnulib - ignored RE_ICASE. Detect that problem too. */ - memset (®ex, 0, sizeof (regex)); - re_set_syntax (RE_SYNTAX_EMACS | RE_ICASE); - s = re_compile_pattern ("x", 1, ®ex); - if (s) - exit (1); - - if (re_search (®ex, "WXY", 3, 0, 3, ®s) < 0) - exit (1); - - /* REG_STARTEND was added to glibc on 2004-01-15. - Reject older versions. */ - if (! REG_STARTEND) - exit (1); - - /* Reject hosts whose regoff_t values are too narrow. - These include glibc 2.3.5 on hosts with 64-bit ptrdiff_t - and 32-bit int. */ - if (sizeof (regoff_t) < sizeof (ptrdiff_t) - || sizeof (regoff_t) < sizeof (ssize_t)) - exit (1); - - exit (0);]])], - [gl_cv_func_re_compile_pattern_working=yes], - [gl_cv_func_re_compile_pattern_working=no], - dnl When crosscompiling, assume it is not working. - [gl_cv_func_re_compile_pattern_working=no])]) - case $gl_cv_func_re_compile_pattern_working in #( - yes) ac_use_included_regex=no;; #( - no) ac_use_included_regex=yes;; - esac - ;; - *) AC_MSG_ERROR([Invalid value for --with-included-regex: $with_included_regex]) - ;; - esac - - if test $ac_use_included_regex = yes; then - AC_DEFINE([_REGEX_LARGE_OFFSETS], 1, - [Define if you want regoff_t to be at least as wide POSIX requires.]) - AC_DEFINE([re_syntax_options], [rpl_re_syntax_options], - [Define to rpl_re_syntax_options if the replacement should be used.]) - AC_DEFINE([re_set_syntax], [rpl_re_set_syntax], - [Define to rpl_re_set_syntax if the replacement should be used.]) - AC_DEFINE([re_compile_pattern], [rpl_re_compile_pattern], - [Define to rpl_re_compile_pattern if the replacement should be used.]) - AC_DEFINE([re_compile_fastmap], [rpl_re_compile_fastmap], - [Define to rpl_re_compile_fastmap if the replacement should be used.]) - AC_DEFINE([re_search], [rpl_re_search], - [Define to rpl_re_search if the replacement should be used.]) - AC_DEFINE([re_search_2], [rpl_re_search_2], - [Define to rpl_re_search_2 if the replacement should be used.]) - AC_DEFINE([re_match], [rpl_re_match], - [Define to rpl_re_match if the replacement should be used.]) - AC_DEFINE([re_match_2], [rpl_re_match_2], - [Define to rpl_re_match_2 if the replacement should be used.]) - AC_DEFINE([re_set_registers], [rpl_re_set_registers], - [Define to rpl_re_set_registers if the replacement should be used.]) - AC_DEFINE([re_comp], [rpl_re_comp], - [Define to rpl_re_comp if the replacement should be used.]) - AC_DEFINE([re_exec], [rpl_re_exec], - [Define to rpl_re_exec if the replacement should be used.]) - AC_DEFINE([regcomp], [rpl_regcomp], - [Define to rpl_regcomp if the replacement should be used.]) - AC_DEFINE([regexec], [rpl_regexec], - [Define to rpl_regexec if the replacement should be used.]) - AC_DEFINE([regerror], [rpl_regerror], - [Define to rpl_regerror if the replacement should be used.]) - AC_DEFINE([regfree], [rpl_regfree], - [Define to rpl_regfree if the replacement should be used.]) - AC_LIBOBJ([regex]) - gl_PREREQ_REGEX - fi -]) - -# Prerequisites of lib/regex.c and lib/regex_internal.c. -AC_DEFUN([gl_PREREQ_REGEX], -[ - AC_REQUIRE([AC_GNU_SOURCE]) - AC_REQUIRE([AC_C_RESTRICT]) - AC_REQUIRE([AM_LANGINFO_CODESET]) - AC_CHECK_HEADERS_ONCE([locale.h wchar.h wctype.h]) - AC_CHECK_FUNCS_ONCE([mbrtowc mempcpy wcrtomb wcscoll]) - AC_CHECK_DECLS([isblank], [], [], [#include <ctype.h>]) -]) diff --git a/m4/rename.m4 b/m4/rename.m4 deleted file mode 100644 index 5e6f00347..000000000 --- a/m4/rename.m4 +++ /dev/null @@ -1,52 +0,0 @@ -#serial 9 - -# Copyright (C) 2001, 2003, 2005, 2006 Free Software Foundation, Inc. -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -dnl From Volker Borchert. -dnl Determine whether rename works for source file names with a trailing slash. -dnl The rename from SunOS 4.1.1_U1 doesn't. -dnl -dnl If it doesn't, then define RENAME_TRAILING_SLASH_BUG and arrange -dnl to compile the wrapper function. -dnl - -AC_DEFUN([vb_FUNC_RENAME], -[ - AC_CACHE_CHECK([whether rename is broken], - vb_cv_func_rename_trailing_slash_bug, - [ - rm -rf conftest.d1 conftest.d2 - mkdir conftest.d1 || - AC_MSG_ERROR([cannot create temporary directory]) - AC_TRY_RUN([ -# include <stdio.h> -# include <stdlib.h> - int - main () - { - exit (rename ("conftest.d1/", "conftest.d2") ? 1 : 0); - } - ], - vb_cv_func_rename_trailing_slash_bug=no, - vb_cv_func_rename_trailing_slash_bug=yes, - dnl When crosscompiling, assume rename is broken. - vb_cv_func_rename_trailing_slash_bug=yes) - - rm -rf conftest.d1 conftest.d2 - ]) - if test $vb_cv_func_rename_trailing_slash_bug = yes; then - AC_LIBOBJ(rename) - AC_DEFINE(rename, rpl_rename, - [Define to rpl_rename if the replacement function should be used.]) - AC_DEFINE(RENAME_TRAILING_SLASH_BUG, 1, - [Define if rename does not work for source file names with a trailing - slash, like the one from SunOS 4.1.1_U1.]) - gl_PREREQ_RENAME - fi -]) - -# Prerequisites of lib/rename.c. -AC_DEFUN([gl_PREREQ_RENAME], [:]) diff --git a/m4/rmdir-errno.m4 b/m4/rmdir-errno.m4 deleted file mode 100644 index 2907e7b34..000000000 --- a/m4/rmdir-errno.m4 +++ /dev/null @@ -1,45 +0,0 @@ -#serial 7 - -# Copyright (C) 2000, 2001, 2005, 2006 Free Software Foundation, Inc. -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# When rmdir fails because the specified directory is not empty, it sets -# errno to some value, usually ENOTEMPTY. However, on some AIX systems, -# ENOTEMPTY is mistakenly defined to be EEXIST. To work around this, and -# in general, to avoid depending on the use of any particular symbol, this -# test runs a test to determine the actual numeric value. -AC_DEFUN([gl_FUNC_RMDIR_NOTEMPTY], -[dnl - AC_CACHE_CHECK([for rmdir-not-empty errno value], - gl_cv_func_rmdir_errno_not_empty, - [ - # Arrange for deletion of the temporary directory this test creates. - ac_clean_files="$ac_clean_files confdir2" - mkdir confdir2; : > confdir2/file - AC_TRY_RUN([ -#include <stdio.h> -#include <errno.h> - int main () - { - FILE *s; - int val; - rmdir ("confdir2"); - val = errno; - s = fopen ("confdir2/errno", "w"); - fprintf (s, "%d\n", val); - return 0; - } - ], - gl_cv_func_rmdir_errno_not_empty=`cat confdir2/errno`, - gl_cv_func_rmdir_errno_not_empty='configure error in rmdir-errno.m4', - gl_cv_func_rmdir_errno_not_empty=ENOTEMPTY - ) - ] - ) - - AC_DEFINE_UNQUOTED([RMDIR_ERRNO_NOT_EMPTY], - $gl_cv_func_rmdir_errno_not_empty, - [the value to which errno is set when rmdir fails on a nonempty directory]) -]) diff --git a/m4/rmdir.m4 b/m4/rmdir.m4 deleted file mode 100644 index 7235203f2..000000000 --- a/m4/rmdir.m4 +++ /dev/null @@ -1,10 +0,0 @@ -# rmdir.m4 serial 3 -dnl Copyright (C) 2002, 2005 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_FUNC_RMDIR], -[ - AC_REPLACE_FUNCS(rmdir) -]) diff --git a/m4/rpmatch.m4 b/m4/rpmatch.m4 deleted file mode 100644 index 4a471ac86..000000000 --- a/m4/rpmatch.m4 +++ /dev/null @@ -1,16 +0,0 @@ -# rpmatch.m4 serial 5 -dnl Copyright (C) 2002, 2003 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_FUNC_RPMATCH], -[ - AC_REPLACE_FUNCS(rpmatch) - if test $ac_cv_func_rpmatch = no; then - gl_PREREQ_RPMATCH - fi -]) - -# Prerequisites of lib/rpmatch.c. -AC_DEFUN([gl_PREREQ_RPMATCH], [:]) diff --git a/m4/safe-read.m4 b/m4/safe-read.m4 deleted file mode 100644 index e1f306417..000000000 --- a/m4/safe-read.m4 +++ /dev/null @@ -1,19 +0,0 @@ -# safe-read.m4 serial 4 -dnl Copyright (C) 2002-2003, 2005 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_SAFE_READ], -[ - AC_LIBSOURCES([safe-read.c, safe-read.h]) - AC_LIBOBJ([safe-read]) - - gl_PREREQ_SAFE_READ -]) - -# Prerequisites of lib/safe-read.c. -AC_DEFUN([gl_PREREQ_SAFE_READ], -[ - AC_REQUIRE([gt_TYPE_SSIZE_T]) -]) diff --git a/m4/safe-write.m4 b/m4/safe-write.m4 deleted file mode 100644 index 197adeba2..000000000 --- a/m4/safe-write.m4 +++ /dev/null @@ -1,19 +0,0 @@ -# safe-write.m4 serial 2 -dnl Copyright (C) 2002, 2005 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_SAFE_WRITE], -[ - AC_LIBSOURCES([safe-write.c, safe-write.h]) - AC_LIBOBJ([safe-write]) - - gl_PREREQ_SAFE_WRITE -]) - -# Prerequisites of lib/safe-write.c. -AC_DEFUN([gl_PREREQ_SAFE_WRITE], -[ - gl_PREREQ_SAFE_READ -]) diff --git a/m4/same-inode.m4 b/m4/same-inode.m4 deleted file mode 100644 index 55b3928df..000000000 --- a/m4/same-inode.m4 +++ /dev/null @@ -1,10 +0,0 @@ -#serial 1 -dnl Copyright (C) 2006 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_SAME_INODE], -[ - AC_LIBSOURCES([same-inode.h]) -]) diff --git a/m4/same.m4 b/m4/same.m4 deleted file mode 100644 index 0eacf4f1b..000000000 --- a/m4/same.m4 +++ /dev/null @@ -1,15 +0,0 @@ -#serial 7 -dnl Copyright (C) 2002, 2003, 2005, 2006 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_SAME], -[ - AC_LIBSOURCES([same.c, same.h, same-inode.h]) - AC_LIBOBJ([same]) - - dnl Prerequisites of lib/same.c. - AC_REQUIRE([AC_SYS_LONG_FILE_NAMES]) - AC_CHECK_FUNCS_ONCE([pathconf]) -]) diff --git a/m4/save-cwd.m4 b/m4/save-cwd.m4 deleted file mode 100644 index eec27890f..000000000 --- a/m4/save-cwd.m4 +++ /dev/null @@ -1,13 +0,0 @@ -#serial 7 -dnl Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_SAVE_CWD], -[ - AC_LIBSOURCES([save-cwd.c, save-cwd.h]) - AC_LIBOBJ([save-cwd]) - dnl Prerequisites for lib/save-cwd.c. - AC_CHECK_FUNCS_ONCE(fchdir) -]) diff --git a/m4/savedir.m4 b/m4/savedir.m4 deleted file mode 100644 index b6968ebaa..000000000 --- a/m4/savedir.m4 +++ /dev/null @@ -1,11 +0,0 @@ -# savedir.m4 serial 8 -dnl Copyright (C) 2002, 2003, 2005, 2006 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_SAVEDIR], -[ - AC_LIBSOURCES([savedir.c, savedir.h]) - AC_LIBOBJ([savedir]) -]) diff --git a/m4/setenv.m4 b/m4/setenv.m4 deleted file mode 100644 index 623fcf2b5..000000000 --- a/m4/setenv.m4 +++ /dev/null @@ -1,68 +0,0 @@ -# setenv.m4 serial 6 -dnl Copyright (C) 2001-2004, 2006 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gt_FUNC_SETENV], -[ - AC_REPLACE_FUNCS(setenv unsetenv) - if test $ac_cv_func_setenv = no; then - gl_PREREQ_SETENV - fi - if test $ac_cv_func_unsetenv = no; then - gl_PREREQ_UNSETENV - else - AC_CACHE_CHECK([for unsetenv() return type], gt_cv_func_unsetenv_ret, - [AC_TRY_COMPILE([#include <stdlib.h> -extern -#ifdef __cplusplus -"C" -#endif -#if defined(__STDC__) || defined(__cplusplus) -int unsetenv (const char *name); -#else -int unsetenv(); -#endif -], , gt_cv_func_unsetenv_ret='int', gt_cv_func_unsetenv_ret='void')]) - if test $gt_cv_func_unsetenv_ret = 'void'; then - AC_DEFINE(VOID_UNSETENV, 1, [Define if unsetenv() returns void, not int.]) - fi - fi -]) - -# Check if a variable is properly declared. -# gt_CHECK_VAR_DECL(includes,variable) -AC_DEFUN([gt_CHECK_VAR_DECL], -[ - define([gt_cv_var], [gt_cv_var_]$2[_declaration]) - AC_MSG_CHECKING([if $2 is properly declared]) - AC_CACHE_VAL(gt_cv_var, [ - AC_TRY_COMPILE([$1 - extern struct { int foo; } $2;], - [$2.foo = 1;], - gt_cv_var=no, - gt_cv_var=yes)]) - AC_MSG_RESULT($gt_cv_var) - if test $gt_cv_var = yes; then - AC_DEFINE([HAVE_]translit($2, [a-z], [A-Z])[_DECL], 1, - [Define if you have the declaration of $2.]) - fi -]) - -# Prerequisites of lib/setenv.c. -AC_DEFUN([gl_PREREQ_SETENV], -[ - AC_REQUIRE([AC_FUNC_ALLOCA]) - AC_CHECK_HEADERS_ONCE(unistd.h) - AC_CHECK_HEADERS(search.h) - AC_CHECK_FUNCS(tsearch) - gt_CHECK_VAR_DECL([#include <unistd.h>], environ) -]) - -# Prerequisites of lib/unsetenv.c. -AC_DEFUN([gl_PREREQ_UNSETENV], -[ - AC_CHECK_HEADERS_ONCE(unistd.h) - gt_CHECK_VAR_DECL([#include <unistd.h>], environ) -]) diff --git a/m4/settime.m4 b/m4/settime.m4 deleted file mode 100644 index 20bb360d8..000000000 --- a/m4/settime.m4 +++ /dev/null @@ -1,16 +0,0 @@ -# settime.m4 serial 4 -dnl Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_SETTIME], -[ - AC_LIBSOURCES([settime.c]) - AC_LIBOBJ([settime]) - - dnl Prerequisites of lib/settime.c. - AC_REQUIRE([gl_CLOCK_TIME]) - AC_REQUIRE([gl_TIMESPEC]) - AC_CHECK_FUNCS_ONCE(settimeofday stime) -]) diff --git a/m4/sha1.m4 b/m4/sha1.m4 deleted file mode 100644 index 7b6c21cb8..000000000 --- a/m4/sha1.m4 +++ /dev/null @@ -1,15 +0,0 @@ -# sha1.m4 serial 6 -dnl Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_SHA1], -[ - AC_LIBSOURCES([sha1.c, sha1.h]) - AC_LIBOBJ([sha1]) - - dnl Prerequisites of lib/sha1.c. - AC_REQUIRE([AC_C_BIGENDIAN]) - : -]) diff --git a/m4/sig2str.m4 b/m4/sig2str.m4 deleted file mode 100644 index 92c80630c..000000000 --- a/m4/sig2str.m4 +++ /dev/null @@ -1,20 +0,0 @@ -#serial 4 -dnl Copyright (C) 2002, 2005 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_FUNC_SIG2STR], -[ - AC_LIBSOURCES([sig2str.c, sig2str.h, intprops.h]) - - AC_REPLACE_FUNCS(sig2str) - if test $ac_cv_func_sig2str = no; then - gl_PREREQ_SIG2STR - fi -]) - -# Prerequisites of lib/sig2str.c. -AC_DEFUN([gl_PREREQ_SIG2STR], [ - : -]) diff --git a/m4/signed.m4 b/m4/signed.m4 deleted file mode 100644 index 048f59369..000000000 --- a/m4/signed.m4 +++ /dev/null @@ -1,17 +0,0 @@ -# signed.m4 serial 1 (gettext-0.10.40) -dnl Copyright (C) 2001-2002 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Bruno Haible. - -AC_DEFUN([bh_C_SIGNED], -[ - AC_CACHE_CHECK([for signed], bh_cv_c_signed, - [AC_TRY_COMPILE(, [signed char x;], bh_cv_c_signed=yes, bh_cv_c_signed=no)]) - if test $bh_cv_c_signed = no; then - AC_DEFINE(signed, , - [Define to empty if the C compiler doesn't support this keyword.]) - fi -]) diff --git a/m4/snprintf.m4 b/m4/snprintf.m4 deleted file mode 100644 index 432e03755..000000000 --- a/m4/snprintf.m4 +++ /dev/null @@ -1,15 +0,0 @@ -# snprintf.m4 serial 2 -dnl Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_FUNC_SNPRINTF], -[ - AC_REPLACE_FUNCS(snprintf) - AC_CHECK_DECLS_ONCE(snprintf) - gl_PREREQ_SNPRINTF -]) - -# Prerequisites of lib/snprintf.c. -AC_DEFUN([gl_PREREQ_SNPRINTF], [:]) diff --git a/m4/socklen.m4 b/m4/socklen.m4 deleted file mode 100644 index 5e3765a64..000000000 --- a/m4/socklen.m4 +++ /dev/null @@ -1,52 +0,0 @@ -# socklen.m4 serial 4 -dnl Copyright (C) 2005, 2006 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Albert Chin, Windows fixes from Simon Josefsson. - -dnl Check for socklen_t: historically on BSD it is an int, and in -dnl POSIX 1g it is a type of its own, but some platforms use different -dnl types for the argument to getsockopt, getpeername, etc. So we -dnl have to test to find something that will work. - -dnl On mingw32, socklen_t is in ws2tcpip.h ('int'), so we try to find -dnl it there first. That file is included by gnulib's socket_.h, which -dnl all users of this module should include. Cygwin must not include -dnl ws2tcpip.h. -AC_DEFUN([gl_TYPE_SOCKLEN_T], - [AC_REQUIRE([gl_HEADER_SYS_SOCKET])dnl - AC_CHECK_TYPE([socklen_t], , - [AC_MSG_CHECKING([for socklen_t equivalent]) - AC_CACHE_VAL([gl_cv_gl_cv_socklen_t_equiv], - [# Systems have either "struct sockaddr *" or - # "void *" as the second argument to getpeername - gl_cv_socklen_t_equiv= - for arg2 in "struct sockaddr" void; do - for t in int size_t "unsigned int" "long int" "unsigned long int"; do - AC_TRY_COMPILE( - [#include <sys/types.h> - #include <sys/socket.h> - - int getpeername (int, $arg2 *, $t *);], - [$t len; - getpeername (0, 0, &len);], - [gl_cv_socklen_t_equiv="$t"]) - test "$gl_cv_socklen_t_equiv" != "" && break - done - test "$gl_cv_socklen_t_equiv" != "" && break - done - ]) - if test "$gl_cv_socklen_t_equiv" = ""; then - AC_MSG_ERROR([Cannot find a type to use in place of socklen_t]) - fi - AC_MSG_RESULT([$gl_cv_socklen_t_equiv]) - AC_DEFINE_UNQUOTED([socklen_t], [$gl_cv_socklen_t_equiv], - [type to use in place of socklen_t if not defined])], - [#include <sys/types.h> - #if HAVE_SYS_SOCKET_H - # include <sys/socket.h> - #elif HAVE_WS2TCPIP_H - # include <ws2tcpip.h> - #endif])]) diff --git a/m4/sockpfaf.m4 b/m4/sockpfaf.m4 deleted file mode 100644 index 391abea24..000000000 --- a/m4/sockpfaf.m4 +++ /dev/null @@ -1,56 +0,0 @@ -# sockpfaf.m4 serial 4 -dnl Copyright (C) 2004, 2006 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl Test for some common socket protocol families (PF_INET, PF_INET6, ...) -dnl and some common address families (AF_INET, AF_INET6, ...). -dnl This test assumes that a system supports an address family if and only if -dnl it supports the corresponding protocol family. - -dnl From Bruno Haible. - -AC_DEFUN([gl_SOCKET_FAMILIES], -[ - AC_REQUIRE([gl_HEADER_SYS_SOCKET]) - AC_CHECK_HEADERS_ONCE([netinet/in.h]) - - AC_MSG_CHECKING(for IPv4 sockets) - AC_CACHE_VAL(gl_cv_socket_ipv4, - [AC_TRY_COMPILE([#include <sys/types.h> -#ifdef HAVE_SYS_SOCKET_H -#include <sys/socket.h> -#endif -#ifdef HAVE_NETINET_IN_H -#include <netinet/in.h> -#endif -#ifdef HAVE_WINSOCK2_H -#include <winsock2.h> -#endif], -[int x = AF_INET; struct in_addr y; struct sockaddr_in z;], - gl_cv_socket_ipv4=yes, gl_cv_socket_ipv4=no)]) - AC_MSG_RESULT($gl_cv_socket_ipv4) - if test $gl_cv_socket_ipv4 = yes; then - AC_DEFINE(HAVE_IPV4, 1, [Define to 1 if <sys/socket.h> defines AF_INET.]) - fi - - AC_MSG_CHECKING(for IPv6 sockets) - AC_CACHE_VAL(gl_cv_socket_ipv6, - [AC_TRY_COMPILE([#include <sys/types.h> -#ifdef HAVE_SYS_SOCKET_H -#include <sys/socket.h> -#endif -#ifdef HAVE_NETINET_IN_H -#include <netinet/in.h> -#endif -#ifdef HAVE_WINSOCK2_H -#include <winsock2.h> -#endif], -[int x = AF_INET6; struct in6_addr y; struct sockaddr_in6 z;], - gl_cv_socket_ipv6=yes, gl_cv_socket_ipv6=no)]) - AC_MSG_RESULT($gl_cv_socket_ipv6) - if test $gl_cv_socket_ipv6 = yes; then - AC_DEFINE(HAVE_IPV6, 1, [Define to 1 if <sys/socket.h> defines AF_INET6.]) - fi -]) diff --git a/m4/ssize_t.m4 b/m4/ssize_t.m4 deleted file mode 100644 index 4eaef93ce..000000000 --- a/m4/ssize_t.m4 +++ /dev/null @@ -1,21 +0,0 @@ -# ssize_t.m4 serial 4 (gettext-0.15) -dnl Copyright (C) 2001-2003, 2006 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Bruno Haible. -dnl Test whether ssize_t is defined. - -AC_DEFUN([gt_TYPE_SSIZE_T], -[ - AC_CACHE_CHECK([for ssize_t], [gt_cv_ssize_t], - [AC_TRY_COMPILE([#include <sys/types.h>], - [int x = sizeof (ssize_t *) + sizeof (ssize_t); - return !x;], - [gt_cv_ssize_t=yes], [gt_cv_ssize_t=no])]) - if test $gt_cv_ssize_t = no; then - AC_DEFINE([ssize_t], [int], - [Define as a signed type of the same size as size_t.]) - fi -]) diff --git a/m4/st_dm_mode.m4 b/m4/st_dm_mode.m4 deleted file mode 100644 index c1da15439..000000000 --- a/m4/st_dm_mode.m4 +++ /dev/null @@ -1,22 +0,0 @@ -#serial 4 - -# Copyright (C) 1998, 1999, 2001 Free Software Foundation, Inc. -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# Define HAVE_ST_DM_MODE if struct stat has an st_dm_mode member. - -AC_DEFUN([AC_STRUCT_ST_DM_MODE], - [AC_CACHE_CHECK([for st_dm_mode in struct stat], ac_cv_struct_st_dm_mode, - [AC_TRY_COMPILE([#include <sys/types.h> -#include <sys/stat.h>], [struct stat s; s.st_dm_mode;], - ac_cv_struct_st_dm_mode=yes, - ac_cv_struct_st_dm_mode=no)]) - - if test $ac_cv_struct_st_dm_mode = yes; then - AC_DEFINE(HAVE_ST_DM_MODE, 1, - [Define if struct stat has an st_dm_mode member. ]) - fi - ] -) diff --git a/m4/stat-macros.m4 b/m4/stat-macros.m4 deleted file mode 100644 index b01218a9b..000000000 --- a/m4/stat-macros.m4 +++ /dev/null @@ -1,14 +0,0 @@ -#serial 2 - -# Copyright (C) 2005 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_STAT_MACROS], -[ - AC_LIBSOURCES([stat-macros.h]) - - AC_REQUIRE([AC_HEADER_STAT]) -]) diff --git a/m4/stat-time.m4 b/m4/stat-time.m4 deleted file mode 100644 index 89a7aa4b8..000000000 --- a/m4/stat-time.m4 +++ /dev/null @@ -1,68 +0,0 @@ -# Checks for stat-related time functions. - -# Copyright (C) 1998, 1999, 2001, 2003, 2005 Free Software Foundation, Inc. -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -dnl From Paul Eggert. - -# st_atim.tv_nsec - Linux, Solaris -# st_atimespec.tv_nsec - FreeBSD, if ! defined _POSIX_SOURCE -# st_atimensec - FreeBSD, if defined _POSIX_SOURCE -# st_atim.st__tim.tv_nsec - UnixWare (at least 2.1.2 through 7.1) -# st_spare1 - Cygwin? - -AC_DEFUN([gl_STAT_TIME], -[ - AC_LIBSOURCES([stat-time.h]) - - AC_REQUIRE([AC_C_INLINE]) - AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) - - AC_CHECK_MEMBERS([struct stat.st_atim.tv_nsec], - [AC_CACHE_CHECK([whether struct stat.st_atim is of type struct timespec], - [ac_cv_typeof_struct_stat_st_atim_is_struct_timespec], - [AC_TRY_COMPILE( - [ - #include <sys/types.h> - #if TIME_WITH_SYS_TIME - # include <sys/time.h> - # include <time.h> - #else - # if HAVE_SYS_TIME_H - # include <sys/time.h> - # else - # include <time.h> - # endif - #endif - #include <sys/stat.h> - struct timespec ts; - struct stat st; - ], - [ - st.st_atim = ts; - ], - [ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=yes], - [ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=no])]) - if test $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec = yes; then - AC_DEFINE([TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC], 1, - [Define to 1 if the type of the st_atim member of a struct stat is - struct timespec.]) - fi], - [AC_CHECK_MEMBERS([struct stat.st_atimespec.tv_nsec], [], - [AC_CHECK_MEMBERS([struct stat.st_atimensec], [], - [AC_CHECK_MEMBERS([struct stat.st_atim.st__tim.tv_nsec], [], - [AC_CHECK_MEMBERS([struct stat.st_spare1], [], - [], - [#include <sys/types.h> - #include <sys/stat.h>])], - [#include <sys/types.h> - #include <sys/stat.h>])], - [#include <sys/types.h> - #include <sys/stat.h>])], - [#include <sys/types.h> - #include <sys/stat.h>])], - [#include <sys/types.h> - #include <sys/stat.h>]) -]) diff --git a/m4/stdarg.m4 b/m4/stdarg.m4 deleted file mode 100644 index e8e680a5c..000000000 --- a/m4/stdarg.m4 +++ /dev/null @@ -1,40 +0,0 @@ -# stdarg.m4 serial 1 -dnl Copyright (C) 2006 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Bruno Haible. -dnl Provide a working va_copy in combination with <stdarg.h>. - -AC_DEFUN([gl_STDARG_H], -[ - AC_MSG_CHECKING([for va_copy]) - AC_CACHE_VAL([gl_cv_func_va_copy], [ - AC_TRY_COMPILE([#include <stdarg.h>], [ -#ifndef va_copy -void (*func) (va_list, va_list) = va_copy; -#endif -], - [gl_cv_func_va_copy=yes], [gl_cv_func_va_copy=no])]) - AC_MSG_RESULT([$gl_cv_func_va_copy]) - if test $gl_cv_func_va_copy = no; then - # Provide a substitute, either __va_copy or as a simple assignment. - AC_CACHE_VAL([gl_cv_func___va_copy], [ - AC_TRY_COMPILE([#include <stdarg.h>], [ -#ifndef __va_copy -error, bail out -#endif -], - [gl_cv_func___va_copy=yes], [gl_cv_func___va_copy=no])]) - if test $gl_cv_func___va_copy = yes; then - AC_DEFINE([va_copy], [__va_copy], - [Define as a macro for copying va_list variables.]) - else - AH_VERBATIM([gl_VA_COPY], [/* A replacement for va_copy, if needed. */ -#define gl_va_copy(a,b) ((a) = (b))]) - AC_DEFINE([va_copy], [gl_va_copy], - [Define as a macro for copying va_list variables.]) - fi - fi -]) diff --git a/m4/stdbool.m4 b/m4/stdbool.m4 deleted file mode 100644 index 2204ecd98..000000000 --- a/m4/stdbool.m4 +++ /dev/null @@ -1,115 +0,0 @@ -# Check for stdbool.h that conforms to C99. - -dnl Copyright (C) 2002-2006 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -# Prepare for substituting <stdbool.h> if it is not supported. - -AC_DEFUN([AM_STDBOOL_H], -[ - AC_REQUIRE([AC_HEADER_STDBOOL]) - - # Define two additional variables used in the Makefile substitution. - - if test "$ac_cv_header_stdbool_h" = yes; then - STDBOOL_H='' - else - STDBOOL_H='stdbool.h' - fi - AC_SUBST([STDBOOL_H]) - - if test "$ac_cv_type__Bool" = yes; then - HAVE__BOOL=1 - else - HAVE__BOOL=0 - fi - AC_SUBST([HAVE__BOOL]) -]) - -# AM_STDBOOL_H will be renamed to gl_STDBOOL_H in the future. -AC_DEFUN([gl_STDBOOL_H], [AM_STDBOOL_H]) - -# This macro is only needed in autoconf <= 2.59. Newer versions of autoconf -# have this macro built-in. - -AC_DEFUN([AC_HEADER_STDBOOL], - [AC_CACHE_CHECK([for stdbool.h that conforms to C99], - [ac_cv_header_stdbool_h], - [AC_TRY_COMPILE( - [ - #include <stdbool.h> - #ifndef bool - "error: bool is not defined" - #endif - #ifndef false - "error: false is not defined" - #endif - #if false - "error: false is not 0" - #endif - #ifndef true - "error: true is not defined" - #endif - #if true != 1 - "error: true is not 1" - #endif - #ifndef __bool_true_false_are_defined - "error: __bool_true_false_are_defined is not defined" - #endif - - struct s { _Bool s: 1; _Bool t; } s; - - char a[true == 1 ? 1 : -1]; - char b[false == 0 ? 1 : -1]; - char c[__bool_true_false_are_defined == 1 ? 1 : -1]; - char d[(bool) 0.5 == true ? 1 : -1]; - bool e = &s; - char f[(_Bool) 0.0 == false ? 1 : -1]; - char g[true]; - char h[sizeof (_Bool)]; - char i[sizeof s.t]; - enum { j = false, k = true, l = false * true, m = true * 256 }; - _Bool n[m]; - char o[sizeof n == m * sizeof n[0] ? 1 : -1]; - char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1]; - #if defined __xlc__ || defined __GNUC__ - /* Catch a bug in IBM AIX xlc compiler version 6.0.0.0 - reported by James Lemley on 2005-10-05; see - http://lists.gnu.org/archive/html/bug-coreutils/2005-10/msg00086.html - This test is not quite right, since xlc is allowed to - reject this program, as the initializer for xlcbug is - not one of the forms that C requires support for. - However, doing the test right would require a run-time - test, and that would make cross-compilation harder. - Let us hope that IBM fixes the xlc bug, and also adds - support for this kind of constant expression. In the - meantime, this test will reject xlc, which is OK, since - our stdbool.h substitute should suffice. We also test - this with GCC, where it should work, to detect more - quickly whether someone messes up the test in the - future. */ - char digs[] = "0123456789"; - int xlcbug = 1 / (&(digs + 5)[-2 + (bool) 1] == &digs[4] ? 1 : -1); - #endif - /* Catch a bug in an HP-UX C compiler. See - http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html - http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html - */ - _Bool q = true; - _Bool *pq = &q; - ], - [ - *pq |= q; - *pq |= ! q; - /* Refer to every declared value, to avoid compiler optimizations. */ - return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l - + !m + !n + !o + !p + !q + !pq); - ], - [ac_cv_header_stdbool_h=yes], - [ac_cv_header_stdbool_h=no])]) - AC_CHECK_TYPES([_Bool]) - if test $ac_cv_header_stdbool_h = yes; then - AC_DEFINE(HAVE_STDBOOL_H, 1, [Define to 1 if stdbool.h conforms to C99.]) - fi]) diff --git a/m4/stdint.m4 b/m4/stdint.m4 deleted file mode 100644 index 48748c613..000000000 --- a/m4/stdint.m4 +++ /dev/null @@ -1,361 +0,0 @@ -# stdint.m4 serial 18 -dnl Copyright (C) 2001-2002, 2004-2006 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Paul Eggert and Bruno Haible. -dnl Test whether <stdint.h> is supported or must be substituted. - -AC_DEFUN([gl_STDINT_H], -[ - AC_PREREQ(2.59)dnl - - dnl Check for long long int. - AC_REQUIRE([AC_TYPE_LONG_LONG_INT]) - if test $ac_cv_type_long_long_int = yes; then - HAVE_LONG_LONG_INT=1 - else - HAVE_LONG_LONG_INT=0 - fi - AC_SUBST([HAVE_LONG_LONG_INT]) - - dnl Check for <wchar.h>. - AC_CHECK_HEADERS_ONCE([wchar.h]) - if test $ac_cv_header_wchar_h = yes; then - HAVE_WCHAR_H=1 - else - HAVE_WCHAR_H=0 - fi - AC_SUBST([HAVE_WCHAR_H]) - - dnl Check for <inttypes.h>. - dnl AC_INCLUDES_DEFAULT defines $ac_cv_header_inttypes_h. - if test $ac_cv_header_inttypes_h = yes; then - HAVE_INTTYPES_H=1 - else - HAVE_INTTYPES_H=0 - fi - AC_SUBST([HAVE_INTTYPES_H]) - - dnl Check for <sys/types.h>. - dnl AC_INCLUDES_DEFAULT defines $ac_cv_header_sys_types_h. - if test $ac_cv_header_sys_types_h = yes; then - HAVE_SYS_TYPES_H=1 - else - HAVE_SYS_TYPES_H=0 - fi - AC_SUBST([HAVE_SYS_TYPES_H]) - - dnl AC_INCLUDES_DEFAULT defines $ac_cv_header_stdint_h. - if test $ac_cv_header_stdint_h = yes; then - gl_ABSOLUTE_HEADER([stdint.h]) - ABSOLUTE_STDINT_H=\"$gl_cv_absolute_stdint_h\" - HAVE_STDINT_H=1 - else - ABSOLUTE_STDINT_H=\"no/such/file/stdint.h\" - HAVE_STDINT_H=0 - fi - AC_SUBST([ABSOLUTE_STDINT_H]) - AC_SUBST([HAVE_STDINT_H]) - - dnl Now see whether we need a substitute <stdint.h>. Use - dnl ABSOLUTE_STDINT_H, not <stdint.h>, so that it also works during - dnl a "config.status --recheck" if a stdint.h has been - dnl created in the build directory. - if test $ac_cv_header_stdint_h = yes; then - AC_CACHE_CHECK([whether stdint.h conforms to C99], - [gl_cv_header_working_stdint_h], - [gl_cv_header_working_stdint_h=no - AC_COMPILE_IFELSE([ - AC_LANG_PROGRAM([[ -#include <stddef.h> -#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */ -#define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */ -#include ABSOLUTE_STDINT_H -#ifdef INT8_MAX -int8_t a1 = INT8_MAX; -int8_t a1min = INT8_MIN; -#endif -#ifdef INT16_MAX -int16_t a2 = INT16_MAX; -int16_t a2min = INT16_MIN; -#endif -#ifdef INT32_MAX -int32_t a3 = INT32_MAX; -int32_t a3min = INT32_MIN; -#endif -#ifdef INT64_MAX -int64_t a4 = INT64_MAX; -int64_t a4min = INT64_MIN; -#endif -#ifdef UINT8_MAX -uint8_t b1 = UINT8_MAX; -#else -typedef int b1[(unsigned char) -1 != 255 ? 1 : -1]; -#endif -#ifdef UINT16_MAX -uint16_t b2 = UINT16_MAX; -#endif -#ifdef UINT32_MAX -uint32_t b3 = UINT32_MAX; -#endif -#ifdef UINT64_MAX -uint64_t b4 = UINT64_MAX; -#endif -int_least8_t c1 = INT8_C (0x7f); -int_least8_t c1max = INT_LEAST8_MAX; -int_least8_t c1min = INT_LEAST8_MIN; -int_least16_t c2 = INT16_C (0x7fff); -int_least16_t c2max = INT_LEAST16_MAX; -int_least16_t c2min = INT_LEAST16_MIN; -int_least32_t c3 = INT32_C (0x7fffffff); -int_least32_t c3max = INT_LEAST32_MAX; -int_least32_t c3min = INT_LEAST32_MIN; -int_least64_t c4 = INT64_C (0x7fffffffffffffff); -int_least64_t c4max = INT_LEAST64_MAX; -int_least64_t c4min = INT_LEAST64_MIN; -uint_least8_t d1 = UINT8_C (0xff); -uint_least8_t d1max = UINT_LEAST8_MAX; -uint_least16_t d2 = UINT16_C (0xffff); -uint_least16_t d2max = UINT_LEAST16_MAX; -uint_least32_t d3 = UINT32_C (0xffffffff); -uint_least32_t d3max = UINT_LEAST32_MAX; -uint_least64_t d4 = UINT64_C (0xffffffffffffffff); -uint_least64_t d4max = UINT_LEAST64_MAX; -int_fast8_t e1 = INT_FAST8_MAX; -int_fast8_t e1min = INT_FAST8_MIN; -int_fast16_t e2 = INT_FAST16_MAX; -int_fast16_t e2min = INT_FAST16_MIN; -int_fast32_t e3 = INT_FAST32_MAX; -int_fast32_t e3min = INT_FAST32_MIN; -int_fast64_t e4 = INT_FAST64_MAX; -int_fast64_t e4min = INT_FAST64_MIN; -uint_fast8_t f1 = UINT_FAST8_MAX; -uint_fast16_t f2 = UINT_FAST16_MAX; -uint_fast32_t f3 = UINT_FAST32_MAX; -uint_fast64_t f4 = UINT_FAST64_MAX; -#ifdef INTPTR_MAX -intptr_t g = INTPTR_MAX; -intptr_t gmin = INTPTR_MIN; -#endif -#ifdef UINTPTR_MAX -uintptr_t h = UINTPTR_MAX; -#endif -intmax_t i = INTMAX_MAX; -uintmax_t j = UINTMAX_MAX; -struct s { - int check_PTRDIFF: PTRDIFF_MIN < 0 && 0 < PTRDIFF_MAX ? 1 : -1; - int check_SIG_ATOMIC: SIG_ATOMIC_MIN <= 0 && 0 < SIG_ATOMIC_MAX ? 1 : -1; - int check_SIZE: 0 < SIZE_MAX ? 1 : -1; - int check_WCHAR: WCHAR_MIN <= 0 && 0 < WCHAR_MAX ? 1 : -1; - int check_WINT: WINT_MIN <= 0 && 0 < WINT_MAX ? 1 : -1; - - /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */ - int check_UINT8_C: - (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1; - int check_UINT16_C: - (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1; - - /* Detect bugs in OpenBSD 3.9 stdint.h. */ -#ifdef UINT8_MAX - int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1; -#endif -#ifdef UINT16_MAX - int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1; -#endif -#ifdef UINT32_MAX - int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1; -#endif -#ifdef UINT64_MAX - int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1; -#endif - int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1; - int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1; - int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1; - int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1; - int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1; - int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1; - int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1; - int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1; - int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1; - int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1; - int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1; -}; - ]])], - [gl_cv_header_working_stdint_h=yes])]) - fi - if test "$gl_cv_header_working_stdint_h" != yes; then - - dnl Check for <sys/inttypes.h>, and for - dnl <sys/bitypes.h> (used in Linux libc4 >= 4.6.7 and libc5). - AC_CHECK_HEADERS([sys/inttypes.h sys/bitypes.h]) - if test $ac_cv_header_sys_inttypes_h = yes; then - HAVE_SYS_INTTYPES_H=1 - else - HAVE_SYS_INTTYPES_H=0 - fi - AC_SUBST([HAVE_SYS_INTTYPES_H]) - if test $ac_cv_header_sys_bitypes_h = yes; then - HAVE_SYS_BITYPES_H=1 - else - HAVE_SYS_BITYPES_H=0 - fi - AC_SUBST([HAVE_SYS_BITYPES_H]) - - gl_STDINT_TYPE_PROPERTIES - STDINT_H=stdint.h - fi - AC_SUBST(STDINT_H) -]) - -dnl gl_STDINT_BITSIZEOF(TYPES, INCLUDES) -dnl Determine the size of each of the given types in bits. -AC_DEFUN([gl_STDINT_BITSIZEOF], -[ - dnl Use a shell loop, to avoid bloating configure, and - dnl - extra AH_TEMPLATE calls, so that autoheader knows what to put into - dnl config.h.in, - dnl - extra AC_SUBST calls, so that the right substitutions are made. - AC_FOREACH([gltype], [$1], - [AH_TEMPLATE([BITSIZEOF_]translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]), - [Define to the number of bits in type ']gltype['.])]) - for gltype in $1 ; do - AC_CACHE_CHECK([for bit size of $gltype], [gl_cv_bitsizeof_${gltype}], - [_AC_COMPUTE_INT([sizeof ($gltype) * CHAR_BIT], result, - [$2 -#include <limits.h>], [result=unknown]) - eval gl_cv_bitsizeof_${gltype}=\$result - ]) - eval result=\$gl_cv_bitsizeof_${gltype} - if test $result = unknown; then - dnl Use a nonempty default, because some compilers, such as IRIX 5 cc, - dnl do a syntax check even on unused #if conditions and give an error - dnl on valid C code like this: - dnl #if 0 - dnl # if > 32 - dnl # endif - dnl #endif - result=0 - fi - GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` - AC_DEFINE_UNQUOTED([BITSIZEOF_${GLTYPE}], [$result]) - eval BITSIZEOF_${GLTYPE}=\$result - done - AC_FOREACH([gltype], [$1], - [AC_SUBST([BITSIZEOF_]translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]))]) -]) - -dnl gl_CHECK_TYPES_SIGNED(TYPES, INCLUDES) -dnl Determine the signedness of each of the given types. -dnl Define HAVE_SIGNED_TYPE if type is signed. -AC_DEFUN([gl_CHECK_TYPES_SIGNED], -[ - dnl Use a shell loop, to avoid bloating configure, and - dnl - extra AH_TEMPLATE calls, so that autoheader knows what to put into - dnl config.h.in, - dnl - extra AC_SUBST calls, so that the right substitutions are made. - AC_FOREACH([gltype], [$1], - [AH_TEMPLATE([HAVE_SIGNED_]translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]), - [Define to 1 if ']gltype[' is a signed integer type.])]) - for gltype in $1 ; do - AC_CACHE_CHECK([whether $gltype is signed], [gl_cv_type_${gltype}_signed], - [AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM([$2[ - int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];]])], - result=yes, result=no) - eval gl_cv_type_${gltype}_signed=\$result - ]) - eval result=\$gl_cv_type_${gltype}_signed - GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` - if test "$result" = yes; then - AC_DEFINE_UNQUOTED([HAVE_SIGNED_${GLTYPE}], 1) - eval HAVE_SIGNED_${GLTYPE}=1 - else - eval HAVE_SIGNED_${GLTYPE}=0 - fi - done - AC_FOREACH([gltype], [$1], - [AC_SUBST([HAVE_SIGNED_]translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]))]) -]) - -dnl gl_INTEGER_TYPE_SUFFIX(TYPES, INCLUDES) -dnl Determine the suffix to use for integer constants of the given types. -dnl Define t_SUFFIX for each such type. -AC_DEFUN([gl_INTEGER_TYPE_SUFFIX], -[ - dnl Use a shell loop, to avoid bloating configure, and - dnl - extra AH_TEMPLATE calls, so that autoheader knows what to put into - dnl config.h.in, - dnl - extra AC_SUBST calls, so that the right substitutions are made. - AC_FOREACH([gltype], [$1], - [AH_TEMPLATE(translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_])[_SUFFIX], - [Define to l, ll, u, ul, ull, etc., as suitable for - constants of type ']gltype['.])]) - for gltype in $1 ; do - AC_CACHE_CHECK([for $gltype integer literal suffix], - [gl_cv_type_${gltype}_suffix], - [eval gl_cv_type_${gltype}_suffix=no - eval result=\$gl_cv_type_${gltype}_signed - if test "$result" = yes; then - glsufu= - else - glsufu=u - fi - for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do - case $glsuf in - '') gltype1='int';; - l) gltype1='long int';; - ll) gltype1='long long int';; - i64) gltype1='__int64';; - u) gltype1='unsigned int';; - ul) gltype1='unsigned long int';; - ull) gltype1='unsigned long long int';; - ui64)gltype1='unsigned __int64';; - esac - AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM([$2 - extern $gltype foo; - extern $gltype1 foo;])], - [eval gl_cv_type_${gltype}_suffix=\$glsuf]) - eval result=\$gl_cv_type_${gltype}_suffix - test "$result" != no && break - done]) - GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` - eval result=\$gl_cv_type_${gltype}_suffix - test "$result" = no && result= - eval ${GLTYPE}_SUFFIX=\$result - AC_DEFINE_UNQUOTED([${GLTYPE}_SUFFIX], $result) - done - AC_FOREACH([gltype], [$1], - [AC_SUBST(translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_])[_SUFFIX])]) -]) - -dnl gl_STDINT_INCLUDES -AC_DEFUN([gl_STDINT_INCLUDES], -[[ - #include <stddef.h> - #include <signal.h> - #if HAVE_WCHAR_H - /* BSD/OS 4.1 has a bug: <stdio.h> and <time.h> must be included before - <wchar.h>. */ - # include <stdio.h> - # include <time.h> - # include <wchar.h> - #endif -]]) - -dnl gl_STDINT_TYPE_PROPERTIES -dnl Compute HAVE_SIGNED_t, BITSIZEOF_t and t_SUFFIX, for all the types t -dnl of interest to stdint_.h. -AC_DEFUN([gl_STDINT_TYPE_PROPERTIES], -[ - gl_STDINT_BITSIZEOF([ptrdiff_t sig_atomic_t size_t wchar_t wint_t], - [gl_STDINT_INCLUDES]) - gl_CHECK_TYPES_SIGNED([sig_atomic_t wchar_t wint_t], - [gl_STDINT_INCLUDES]) - gl_cv_type_ptrdiff_t_signed=yes - gl_cv_type_size_t_signed=no - gl_INTEGER_TYPE_SUFFIX([ptrdiff_t sig_atomic_t size_t wchar_t wint_t], - [gl_STDINT_INCLUDES]) -]) diff --git a/m4/stdint_h.m4 b/m4/stdint_h.m4 deleted file mode 100644 index 3355f35aa..000000000 --- a/m4/stdint_h.m4 +++ /dev/null @@ -1,26 +0,0 @@ -# stdint_h.m4 serial 5 -dnl Copyright (C) 1997-2004 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Paul Eggert. - -# Define HAVE_STDINT_H_WITH_UINTMAX if <stdint.h> exists, -# doesn't clash with <sys/types.h>, and declares uintmax_t. - -AC_DEFUN([gl_AC_HEADER_STDINT_H], -[ - AC_CACHE_CHECK([for stdint.h], gl_cv_header_stdint_h, - [AC_TRY_COMPILE( - [#include <sys/types.h> -#include <stdint.h>], - [uintmax_t i = (uintmax_t) -1;], - gl_cv_header_stdint_h=yes, - gl_cv_header_stdint_h=no)]) - if test $gl_cv_header_stdint_h = yes; then - AC_DEFINE_UNQUOTED(HAVE_STDINT_H_WITH_UINTMAX, 1, - [Define if <stdint.h> exists, doesn't clash with <sys/types.h>, - and declares uintmax_t. ]) - fi -]) diff --git a/m4/stdio-safer.m4 b/m4/stdio-safer.m4 deleted file mode 100644 index 40be1ad47..000000000 --- a/m4/stdio-safer.m4 +++ /dev/null @@ -1,17 +0,0 @@ -#serial 7 -dnl Copyright (C) 2002, 2005, 2006 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_FOPEN_SAFER], -[ - AC_LIBSOURCES([fopen-safer.c, stdio-safer.h, stdio--.h]) - AC_LIBOBJ([fopen-safer]) -]) - -AC_DEFUN([gl_TMPFILE_SAFER], -[ - AC_LIBSOURCES([tmpfile-safer.c, stdio-safer.h, stdio--.h]) - AC_LIBOBJ([tmpfile-safer]) -]) diff --git a/m4/stdlib-safer.m4 b/m4/stdlib-safer.m4 deleted file mode 100644 index f9cc00036..000000000 --- a/m4/stdlib-safer.m4 +++ /dev/null @@ -1,11 +0,0 @@ -# stdlib-safer.m4 serial 1 -dnl Copyright (C) 2005 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_STDLIB_SAFER], -[ - AC_LIBSOURCES([mkstemp-safer.c, stdlib-safer.h, stdlib--.h]) - AC_LIBOBJ([mkstemp-safer]) -]) diff --git a/m4/stpcpy.m4 b/m4/stpcpy.m4 deleted file mode 100644 index ce8d92fb1..000000000 --- a/m4/stpcpy.m4 +++ /dev/null @@ -1,22 +0,0 @@ -# stpcpy.m4 serial 1 -dnl Copyright (C) 2002 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_FUNC_STPCPY], -[ - dnl Persuade glibc <string.h> to declare stpcpy(). - AC_REQUIRE([AC_GNU_SOURCE]) - - AC_REPLACE_FUNCS(stpcpy) - if test $ac_cv_func_stpcpy = no; then - gl_PREREQ_STPCPY - fi -]) - -# Prerequisites of lib/stpcpy.c. -AC_DEFUN([gl_PREREQ_STPCPY], [ - : -]) - diff --git a/m4/strcase.m4 b/m4/strcase.m4 deleted file mode 100644 index 6db401bb1..000000000 --- a/m4/strcase.m4 +++ /dev/null @@ -1,39 +0,0 @@ -# strcase.m4 serial 3 -dnl Copyright (C) 2002, 2005 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_STRCASE], -[ - gl_FUNC_STRCASECMP - gl_FUNC_STRNCASECMP -]) - -AC_DEFUN([gl_FUNC_STRCASECMP], -[ - dnl No known system has a strcasecmp() function that works correctly in - dnl multibyte locales. Therefore we use our version always. - AC_LIBOBJ(strcasecmp) - AC_DEFINE(strcasecmp, rpl_strcasecmp, [Define to rpl_strcasecmp always.]) - gl_PREREQ_STRCASECMP -]) - -AC_DEFUN([gl_FUNC_STRNCASECMP], -[ - AC_REPLACE_FUNCS(strncasecmp) - if test $ac_cv_func_strncasecmp = no; then - gl_PREREQ_STRNCASECMP - fi -]) - -# Prerequisites of lib/strcasecmp.c. -AC_DEFUN([gl_PREREQ_STRCASECMP], [ - AC_REQUIRE([gl_FUNC_MBRTOWC]) - : -]) - -# Prerequisites of lib/strncasecmp.c. -AC_DEFUN([gl_PREREQ_STRNCASECMP], [ - : -]) diff --git a/m4/strcspn.m4 b/m4/strcspn.m4 deleted file mode 100644 index 95650040b..000000000 --- a/m4/strcspn.m4 +++ /dev/null @@ -1,16 +0,0 @@ -# strcspn.m4 serial 2 -dnl Copyright (C) 2002-2003 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_FUNC_STRCSPN], -[ - AC_REPLACE_FUNCS(strcspn) - if test $ac_cv_func_strcspn = no; then - gl_PREREQ_STRCSPN - fi -]) - -# Prerequisites of lib/strcspn.c. -AC_DEFUN([gl_PREREQ_STRCSPN], [:]) diff --git a/m4/strdup.m4 b/m4/strdup.m4 deleted file mode 100644 index 42325ab9e..000000000 --- a/m4/strdup.m4 +++ /dev/null @@ -1,17 +0,0 @@ -# strdup.m4 serial 6 -dnl Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_FUNC_STRDUP], -[ - AC_LIBSOURCES([strdup.c, strdup.h]) - - AC_REPLACE_FUNCS(strdup) - AC_CHECK_DECLS_ONCE(strdup) - gl_PREREQ_STRDUP -]) - -# Prerequisites of lib/strdup.c. -AC_DEFUN([gl_PREREQ_STRDUP], [:]) diff --git a/m4/strftime.m4 b/m4/strftime.m4 deleted file mode 100644 index ea93042db..000000000 --- a/m4/strftime.m4 +++ /dev/null @@ -1,34 +0,0 @@ -#serial 27 - -# Copyright (C) 1996, 1997, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# Written by Jim Meyering and Paul Eggert. - -AC_DEFUN([gl_FUNC_GNU_STRFTIME], -[AC_REQUIRE([gl_FUNC_STRFTIME])dnl -]) - -# These are the prerequisite macros for GNU's strftime.c replacement. -AC_DEFUN([gl_FUNC_STRFTIME], -[ - AC_LIBSOURCES([strftime.c, strftime.h]) - AC_LIBOBJ([strftime]) - - # This defines (or not) HAVE_TZNAME and HAVE_TM_ZONE. - AC_REQUIRE([AC_STRUCT_TIMEZONE]) - - AC_REQUIRE([AC_HEADER_TIME]) - AC_REQUIRE([AC_TYPE_MBSTATE_T]) - AC_REQUIRE([gl_TM_GMTOFF]) - - AC_CHECK_FUNCS_ONCE(mblen mbrlen mempcpy tzset) - AC_CHECK_HEADERS_ONCE(sys/time.h wchar.h) - - AC_DEFINE([my_strftime], [nstrftime], - [Define to the name of the strftime replacement function.]) -]) diff --git a/m4/stripslash.m4 b/m4/stripslash.m4 deleted file mode 100644 index c6c4acbbd..000000000 --- a/m4/stripslash.m4 +++ /dev/null @@ -1,14 +0,0 @@ -# serial 1 -dnl Copyright (C) 2005 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_STRIPSLASH], -[ - AC_LIBSOURCES([stripslash.c, dirname.h]) - AC_LIBOBJ([stripslash]) - - dnl prerequisites - AC_REQUIRE([gl_AC_DOS]) -]) diff --git a/m4/strndup.m4 b/m4/strndup.m4 deleted file mode 100644 index e333f5cfd..000000000 --- a/m4/strndup.m4 +++ /dev/null @@ -1,51 +0,0 @@ -# strndup.m4 serial 7 -dnl Copyright (C) 2002-2003, 2005-2006 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_FUNC_STRNDUP], -[ - AC_LIBSOURCES([strndup.c, strndup.h]) - - dnl Persuade glibc <string.h> to declare strndup(). - AC_REQUIRE([AC_GNU_SOURCE]) - - AC_CHECK_DECLS_ONCE([strndup]) - - # AIX 4.3.3, AIX 5.1 have a function that fails to add the terminating '\0'. - AC_CACHE_CHECK([for working strndup], gl_cv_func_strndup, - [AC_RUN_IFELSE([ - AC_LANG_PROGRAM([#include <string.h>], [[ -#ifndef HAVE_DECL_STRNDUP - extern char *strndup (const char *, size_t); -#endif - char *s; - s = strndup ("some longer string", 15); - free (s); - s = strndup ("shorter string", 13); - return s[13] != '\0';]])], - [gl_cv_func_strndup=yes], - [gl_cv_func_strndup=no], - [AC_CHECK_FUNC([strndup], - [AC_EGREP_CPP([too risky], [ -#ifdef _AIX - too risky -#endif - ], - [gl_cv_func_strndup=no], - [gl_cv_func_strndup=yes])], - [gl_cv_func_strndup=no])])]) - if test $gl_cv_func_strndup = yes; then - AC_DEFINE([HAVE_STRNDUP], 1, - [Define if you have the strndup() function and it works.]) - else - AC_LIBOBJ([strndup]) - AC_DEFINE(strndup, rpl_strndup, - [Define to rpl_strndup if the replacement function should be used,]) - gl_PREREQ_STRNDUP - fi -]) - -# Prerequisites of lib/strndup.c. -AC_DEFUN([gl_PREREQ_STRNDUP], [:]) diff --git a/m4/strnlen.m4 b/m4/strnlen.m4 deleted file mode 100644 index 67964c8d7..000000000 --- a/m4/strnlen.m4 +++ /dev/null @@ -1,29 +0,0 @@ -# strnlen.m4 serial 5 -dnl Copyright (C) 2002-2003, 2005 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_FUNC_STRNLEN], -[ - AC_LIBSOURCES([strnlen.c, strnlen.h]) - - dnl Persuade glibc <string.h> to declare strnlen(). - AC_REQUIRE([AC_GNU_SOURCE]) - - AC_FUNC_STRNLEN - if test $ac_cv_func_strnlen_working = no; then - # This is necessary because automake-1.6.1 doens't understand - # that the above use of AC_FUNC_STRNLEN means we may have to use - # lib/strnlen.c. - #AC_LIBOBJ(strnlen) - AC_DEFINE(strnlen, rpl_strnlen, - [Define to rpl_strnlen if the replacement function should be used.]) - gl_PREREQ_STRNLEN - fi -]) - -# Prerequisites of lib/strnlen.c. -AC_DEFUN([gl_PREREQ_STRNLEN], [ - AC_CHECK_DECLS_ONCE(strnlen) -]) diff --git a/m4/strpbrk.m4 b/m4/strpbrk.m4 deleted file mode 100644 index 68360684e..000000000 --- a/m4/strpbrk.m4 +++ /dev/null @@ -1,16 +0,0 @@ -# strpbrk.m4 serial 2 -dnl Copyright (C) 2002-2003 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_FUNC_STRPBRK], -[ - AC_REPLACE_FUNCS(strpbrk) - if test $ac_cv_func_strpbrk = no; then - gl_PREREQ_STRPBRK - fi -]) - -# Prerequisites of lib/strpbrk.c. -AC_DEFUN([gl_PREREQ_STRPBRK], [:]) diff --git a/m4/strstr.m4 b/m4/strstr.m4 deleted file mode 100644 index a785d4286..000000000 --- a/m4/strstr.m4 +++ /dev/null @@ -1,19 +0,0 @@ -# strstr.m4 serial 5 -dnl Copyright (C) 2002-2003, 2005 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_FUNC_STRSTR], -[ - dnl No known system has a strstr() function that works correctly in - dnl multibyte locales. Therefore we use our version always. - AC_LIBOBJ(strstr) - gl_PREREQ_STRSTR -]) - -# Prerequisites of lib/strstr.c. -AC_DEFUN([gl_PREREQ_STRSTR], [ - AC_REQUIRE([gl_FUNC_MBRTOWC]) - : -]) diff --git a/m4/strtod.m4 b/m4/strtod.m4 deleted file mode 100644 index 80a1d7dff..000000000 --- a/m4/strtod.m4 +++ /dev/null @@ -1,19 +0,0 @@ -# strtod.m4 serial 5 -dnl Copyright (C) 2002, 2003, 2006 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_FUNC_STRTOD], -[ - AC_REQUIRE([AC_FUNC_STRTOD]) - if test $ac_cv_func_strtod = no; then - AC_DEFINE(strtod, rpl_strtod, - [Define to rpl_strtod if the replacement function should be used.]) - gl_PREREQ_STRTOD - fi -]) - -# Prerequisites of lib/strtod.c. -# The need for pow() is already handled by AC_FUNC_STRTOD. -AC_DEFUN([gl_PREREQ_STRTOD], [:]) diff --git a/m4/strtoimax.m4 b/m4/strtoimax.m4 deleted file mode 100644 index 914e180bc..000000000 --- a/m4/strtoimax.m4 +++ /dev/null @@ -1,35 +0,0 @@ -# strtoimax.m4 serial 5 -dnl Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_FUNC_STRTOIMAX], -[ - dnl Work around a bug of AC_EGREP_CPP in autoconf-2.57. - AC_REQUIRE([AC_PROG_CPP]) - AC_REQUIRE([AC_PROG_EGREP]) - - AC_CACHE_CHECK([whether <inttypes.h> defines strtoimax as a macro], - jm_cv_func_strtoimax_macro, - [AC_EGREP_CPP([inttypes_h_defines_strtoimax], [#include <inttypes.h> -#ifdef strtoimax - inttypes_h_defines_strtoimax -#endif], - jm_cv_func_strtoimax_macro=yes, - jm_cv_func_strtoimax_macro=no)]) - - if test "$jm_cv_func_strtoimax_macro" != yes; then - AC_REPLACE_FUNCS(strtoimax) - if test $ac_cv_func_strtoimax = no; then - gl_PREREQ_STRTOIMAX - fi - fi -]) - -# Prerequisites of lib/strtoimax.c. -AC_DEFUN([gl_PREREQ_STRTOIMAX], [ - gl_AC_TYPE_INTMAX_T - AC_CHECK_DECLS(strtoll) - AC_REQUIRE([gl_AC_TYPE_LONG_LONG]) -]) diff --git a/m4/strtol.m4 b/m4/strtol.m4 deleted file mode 100644 index 7fbae60eb..000000000 --- a/m4/strtol.m4 +++ /dev/null @@ -1,10 +0,0 @@ -# strtol.m4 serial 4 -dnl Copyright (C) 2002, 2003, 2006 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_FUNC_STRTOL], -[ - AC_REPLACE_FUNCS(strtol) -]) diff --git a/m4/strtoll.m4 b/m4/strtoll.m4 deleted file mode 100644 index 76f806549..000000000 --- a/m4/strtoll.m4 +++ /dev/null @@ -1,23 +0,0 @@ -# strtoll.m4 serial 3 -dnl Copyright (C) 2002, 2004 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_FUNC_STRTOLL], -[ - dnl We don't need (and can't compile) the replacement strtoll - dnl unless the type 'long long' exists. - AC_REQUIRE([gl_AC_TYPE_LONG_LONG]) - if test "$ac_cv_type_long_long" = yes; then - AC_REPLACE_FUNCS(strtoll) - if test $ac_cv_func_strtoll = no; then - gl_PREREQ_STRTOLL - fi - fi -]) - -# Prerequisites of lib/strtoll.c. -AC_DEFUN([gl_PREREQ_STRTOLL], [ - : -]) diff --git a/m4/strtoul.m4 b/m4/strtoul.m4 deleted file mode 100644 index 5ec54aa2e..000000000 --- a/m4/strtoul.m4 +++ /dev/null @@ -1,10 +0,0 @@ -# strtoul.m4 serial 3 -dnl Copyright (C) 2002, 2006 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_FUNC_STRTOUL], -[ - AC_REPLACE_FUNCS(strtoul) -]) diff --git a/m4/strtoull.m4 b/m4/strtoull.m4 deleted file mode 100644 index 398a86d18..000000000 --- a/m4/strtoull.m4 +++ /dev/null @@ -1,23 +0,0 @@ -# strtoull.m4 serial 3 -dnl Copyright (C) 2002, 2004 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_FUNC_STRTOULL], -[ - dnl We don't need (and can't compile) the replacement strtoull - dnl unless the type 'unsigned long long' exists. - AC_REQUIRE([gl_AC_TYPE_UNSIGNED_LONG_LONG]) - if test "$ac_cv_type_unsigned_long_long" = yes; then - AC_REPLACE_FUNCS(strtoull) - if test $ac_cv_func_strtoull = no; then - gl_PREREQ_STRTOULL - fi - fi -]) - -# Prerequisites of lib/strtoull.c. -AC_DEFUN([gl_PREREQ_STRTOULL], [ - : -]) diff --git a/m4/strtoumax.m4 b/m4/strtoumax.m4 deleted file mode 100644 index 197858712..000000000 --- a/m4/strtoumax.m4 +++ /dev/null @@ -1,35 +0,0 @@ -# strtoumax.m4 serial 5 -dnl Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_FUNC_STRTOUMAX], -[ - dnl Work around a bug of AC_EGREP_CPP in autoconf-2.57. - AC_REQUIRE([AC_PROG_CPP]) - AC_REQUIRE([AC_PROG_EGREP]) - - AC_CACHE_CHECK([whether <inttypes.h> defines strtoumax as a macro], - jm_cv_func_strtoumax_macro, - [AC_EGREP_CPP([inttypes_h_defines_strtoumax], [#include <inttypes.h> -#ifdef strtoumax - inttypes_h_defines_strtoumax -#endif], - jm_cv_func_strtoumax_macro=yes, - jm_cv_func_strtoumax_macro=no)]) - - if test "$jm_cv_func_strtoumax_macro" != yes; then - AC_REPLACE_FUNCS(strtoumax) - if test $ac_cv_func_strtoumax = no; then - gl_PREREQ_STRTOUMAX - fi - fi -]) - -# Prerequisites of lib/strtoumax.c. -AC_DEFUN([gl_PREREQ_STRTOUMAX], [ - gl_AC_TYPE_UINTMAX_T - AC_CHECK_DECLS(strtoull) - AC_REQUIRE([gl_AC_TYPE_UNSIGNED_LONG_LONG]) -]) diff --git a/m4/strverscmp.m4 b/m4/strverscmp.m4 deleted file mode 100644 index 46e178beb..000000000 --- a/m4/strverscmp.m4 +++ /dev/null @@ -1,23 +0,0 @@ -# strverscmp.m4 serial 3 -dnl Copyright (C) 2002, 2005 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_FUNC_STRVERSCMP], -[ - AC_LIBSOURCES([strverscmp.c, strverscmp.h]) - - dnl Persuade glibc <string.h> to declare strverscmp(). - AC_REQUIRE([AC_GNU_SOURCE]) - - AC_REPLACE_FUNCS(strverscmp) - if test $ac_cv_func_strverscmp = no; then - gl_PREREQ_STRVERSCMP - fi -]) - -# Prerequisites of lib/strverscmp.c. -AC_DEFUN([gl_PREREQ_STRVERSCMP], [ - : -]) diff --git a/m4/sys_socket_h.m4 b/m4/sys_socket_h.m4 deleted file mode 100644 index d3e45b48c..000000000 --- a/m4/sys_socket_h.m4 +++ /dev/null @@ -1,23 +0,0 @@ -# sys_socket_h.m4 serial 2 -dnl Copyright (C) 2005, 2006 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Simon Josefsson. - -AC_DEFUN([gl_HEADER_SYS_SOCKET], -[ - AC_CHECK_HEADERS_ONCE([sys/socket.h]) - if test $ac_cv_header_sys_socket_h = yes; then - SYS_SOCKET_H='' - else - dnl We cannot use AC_CHECK_HEADERS_ONCE here, because that would make - dnl the check for those headers unconditional; yet cygwin reports - dnl that the headers are present but cannot be compiled (since on - dnl cygwin, all socket information should come from sys/socket.h). - AC_CHECK_HEADERS([winsock2.h ws2tcpip.h]) - SYS_SOCKET_H='sys/socket.h' - fi - AC_SUBST(SYS_SOCKET_H) -]) diff --git a/m4/time_r.m4 b/m4/time_r.m4 deleted file mode 100644 index 204c424dd..000000000 --- a/m4/time_r.m4 +++ /dev/null @@ -1,39 +0,0 @@ -dnl Reentrant time functions like localtime_r. - -dnl Copyright (C) 2003, 2006 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl Written by Paul Eggert. - -AC_DEFUN([gl_TIME_R], -[ - AC_LIBSOURCES([time_r.c, time_r.h]) - AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) - AC_REQUIRE([AC_C_RESTRICT]) - - AC_CACHE_CHECK([whether localtime_r is compatible with its POSIX signature], - [gl_cv_time_r_posix], - [AC_TRY_COMPILE( - [#include <time.h>], - [/* We don't need to append 'restrict's to the argument types, - even though the POSIX signature has the 'restrict's, - since C99 says they can't affect type compatibility. */ - struct tm * (*ptr) (time_t const *, struct tm *) = localtime_r;], - [gl_cv_time_r_posix=yes], - [gl_cv_time_r_posix=no])]) - if test $gl_cv_time_r_posix = yes; then - AC_DEFINE([HAVE_TIME_R_POSIX], 1, - [Define to 1 if localtime_r, etc. have the type signatures that - POSIX requires.]) - else - AC_LIBOBJ([time_r]) - gl_PREREQ_TIME_R - fi -]) - -# Prerequisites of lib/time_r.c. -AC_DEFUN([gl_PREREQ_TIME_R], [ - : -]) diff --git a/m4/timespec.m4 b/m4/timespec.m4 deleted file mode 100644 index a500a3e71..000000000 --- a/m4/timespec.m4 +++ /dev/null @@ -1,61 +0,0 @@ -#serial 12 - -# Copyright (C) 2000, 2001, 2003, 2004, 2005, 2006 Free Software -# Foundation, Inc. - -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -dnl From Jim Meyering - -AC_DEFUN([gl_TIMESPEC], -[ - AC_LIBSOURCES([timespec.h]) - - dnl Prerequisites of lib/timespec.h. - AC_REQUIRE([AC_C_INLINE]) - AC_REQUIRE([AC_HEADER_TIME]) - AC_CHECK_HEADERS_ONCE(sys/time.h) - gl_CHECK_TYPE_STRUCT_TIMESPEC - - dnl Persuade glibc and Solaris <time.h> to declare nanosleep. - AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) - - AC_CHECK_DECLS(nanosleep, , , [#include <time.h>]) -]) - -dnl Define HAVE_STRUCT_TIMESPEC if `struct timespec' is declared -dnl in time.h or sys/time.h. - -AC_DEFUN([gl_CHECK_TYPE_STRUCT_TIMESPEC], -[ - dnl Persuade pedantic Solaris to declare struct timespec. - AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) - - AC_REQUIRE([AC_HEADER_TIME]) - AC_CHECK_HEADERS_ONCE(sys/time.h) - AC_CACHE_CHECK([for struct timespec], fu_cv_sys_struct_timespec, - [AC_TRY_COMPILE( - [ -# if TIME_WITH_SYS_TIME -# include <sys/time.h> -# include <time.h> -# else -# if HAVE_SYS_TIME_H -# include <sys/time.h> -# else -# include <time.h> -# endif -# endif - ], - [static struct timespec x; x.tv_sec = x.tv_nsec;], - fu_cv_sys_struct_timespec=yes, - fu_cv_sys_struct_timespec=no) - ]) - - if test $fu_cv_sys_struct_timespec = yes; then - AC_DEFINE(HAVE_STRUCT_TIMESPEC, 1, - [Define if struct timespec is declared in <time.h>. ]) - fi -]) diff --git a/m4/tm_gmtoff.m4 b/m4/tm_gmtoff.m4 deleted file mode 100644 index cb0b3c884..000000000 --- a/m4/tm_gmtoff.m4 +++ /dev/null @@ -1,14 +0,0 @@ -# tm_gmtoff.m4 serial 2 -dnl Copyright (C) 2002 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_TM_GMTOFF], -[ - AC_CHECK_MEMBER([struct tm.tm_gmtoff], - [AC_DEFINE(HAVE_TM_GMTOFF, 1, - [Define if struct tm has the tm_gmtoff member.])], - , - [#include <time.h>]) -]) diff --git a/m4/tzset.m4 b/m4/tzset.m4 deleted file mode 100644 index 134080c54..000000000 --- a/m4/tzset.m4 +++ /dev/null @@ -1,68 +0,0 @@ -#serial 2 - -# Copyright (C) 2003 Free Software Foundation, Inc. -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# See if we have a working tzset function. -# If so, arrange to compile the wrapper function. -# For at least Solaris 2.5.1 and 2.6, this is necessary -# because tzset can clobber the contents of the buffer -# used by localtime. - -# Written by Paul Eggert and Jim Meyering. - -AC_DEFUN([gl_FUNC_TZSET_CLOBBER], -[ - AC_REQUIRE([AC_HEADER_TIME]) - AC_CACHE_CHECK([whether tzset clobbers localtime buffer], - gl_cv_func_tzset_clobber, - [ - AC_RUN_IFELSE([AC_LANG_SOURCE([[ -#if TIME_WITH_SYS_TIME -# include <sys/time.h> -# include <time.h> -#else -# if HAVE_SYS_TIME_H -# include <sys/time.h> -# else -# include <time.h> -# endif -#endif -#include <stdlib.h> - -int -main () -{ - time_t t1 = 853958121; - struct tm *p, s; - putenv ("TZ=GMT0"); - p = localtime (&t1); - s = *p; - putenv ("TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00"); - tzset (); - exit (p->tm_year != s.tm_year - || p->tm_mon != s.tm_mon - || p->tm_mday != s.tm_mday - || p->tm_hour != s.tm_hour - || p->tm_min != s.tm_min - || p->tm_sec != s.tm_sec); -} - ]])], - [gl_cv_func_tzset_clobber=no], - [gl_cv_func_tzset_clobber=yes], - [gl_cv_func_tzset_clobber=yes])]) - - AC_DEFINE(HAVE_RUN_TZSET_TEST, 1, - [Define to 1 if you have run the test for working tzset.]) - - if test $gl_cv_func_tzset_clobber = yes; then - gl_GETTIMEOFDAY_REPLACE_LOCALTIME - - AC_DEFINE(tzset, rpl_tzset, - [Define to rpl_tzset if the wrapper function should be used.]) - AC_DEFINE(TZSET_CLOBBERS_LOCALTIME_BUFFER, 1, - [Define if tzset clobbers localtime's static buffer.]) - fi -]) diff --git a/m4/uint32_t.m4 b/m4/uint32_t.m4 deleted file mode 100644 index 1fb5e668f..000000000 --- a/m4/uint32_t.m4 +++ /dev/null @@ -1,53 +0,0 @@ -# uint32_t.m4 serial 4 - -# Copyright (C) 2004 Free Software Foundation, Inc. -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# Written by Paul Eggert. - -AC_DEFUN([gl_AC_TYPE_UINT32_T], -[ - AC_CACHE_CHECK([for uint32_t], gl_cv_c_uint32_t, - [gl_cv_c_uint32_t=no - for ac_type in "uint32_t" "unsigned int" \ - "unsigned long int" "unsigned short int"; do - AC_COMPILE_IFELSE( - [AC_LANG_BOOL_COMPILE_TRY( - [AC_INCLUDES_DEFAULT], - [[($ac_type) -1 == 4294967295U]])], - [gl_cv_c_uint32_t=$ac_type]) - test "$gl_cv_c_uint32_t" != no && break - done]) - case "$gl_cv_c_uint32_t" in - no|uint32_t) ;; - *) - AC_DEFINE(_UINT32_T, 1, - [Define for Solaris 2.5.1 so uint32_t typedef from <sys/synch.h>, - <pthread.h>, or <semaphore.h> is not used. If the typedef was - allowed, the #define below would cause a syntax error.]) - AC_DEFINE_UNQUOTED(uint32_t, $gl_cv_c_uint32_t, - [Define to the type of a unsigned integer type of width exactly 32 bits - if such a type exists and the standard includes do not define it.]) - ;; - esac - - AC_CACHE_CHECK([for UINT32_MAX], gl_cv_c_uint32_max, - [AC_COMPILE_IFELSE( - [AC_LANG_BOOL_COMPILE_TRY( - [AC_INCLUDES_DEFAULT], - [[UINT32_MAX == 4294967295U]])], - [gl_cv_c_uint32_max=yes], - [gl_cv_c_uint32_max=no])]) - case $gl_cv_c_uint32_max,$gl_cv_c_uint32_t in - yes,*) ;; - *,no) ;; - *) - AC_DEFINE(UINT32_MAX, 4294967295U, - [Define to its maximum value if an unsigned integer type of width - exactly 32 bits exists and the standard includes do not define - UINT32_MAX.]) - ;; - esac -]) diff --git a/m4/uintmax_t.m4 b/m4/uintmax_t.m4 deleted file mode 100644 index bf83ed746..000000000 --- a/m4/uintmax_t.m4 +++ /dev/null @@ -1,30 +0,0 @@ -# uintmax_t.m4 serial 9 -dnl Copyright (C) 1997-2004 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Paul Eggert. - -AC_PREREQ(2.13) - -# Define uintmax_t to 'unsigned long' or 'unsigned long long' -# if it is not already defined in <stdint.h> or <inttypes.h>. - -AC_DEFUN([gl_AC_TYPE_UINTMAX_T], -[ - AC_REQUIRE([gl_AC_HEADER_INTTYPES_H]) - AC_REQUIRE([gl_AC_HEADER_STDINT_H]) - if test $gl_cv_header_inttypes_h = no && test $gl_cv_header_stdint_h = no; then - AC_REQUIRE([gl_AC_TYPE_UNSIGNED_LONG_LONG]) - test $ac_cv_type_unsigned_long_long = yes \ - && ac_type='unsigned long long' \ - || ac_type='unsigned long' - AC_DEFINE_UNQUOTED(uintmax_t, $ac_type, - [Define to unsigned long or unsigned long long - if <stdint.h> and <inttypes.h> don't define.]) - else - AC_DEFINE(HAVE_UINTMAX_T, 1, - [Define if you have the 'uintmax_t' type in <stdint.h> or <inttypes.h>.]) - fi -]) diff --git a/m4/uintptr_t.m4 b/m4/uintptr_t.m4 deleted file mode 100644 index 65264a58a..000000000 --- a/m4/uintptr_t.m4 +++ /dev/null @@ -1,54 +0,0 @@ -# uintptr_t.m4 serial 3 - -# Copyright (C) 2004 Free Software Foundation, Inc. -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# Written by Paul Eggert. - -AC_DEFUN([gl_AC_TYPE_UINTPTR_T], -[ - AC_CACHE_CHECK([for uintptr_t], gl_cv_c_uintptr_t, - [gl_cv_c_uintptr_t=no - for ac_type in "uintptr_t" "unsigned int" \ - "unsigned long int" "unsigned long long int"; do - AC_COMPILE_IFELSE( - [AC_LANG_BOOL_COMPILE_TRY( - [AC_INCLUDES_DEFAULT], - [[sizeof (void *) <= sizeof (uintptr_t)]])], - [gl_cv_c_uintptr_t=$ac_type]) - test $gl_cv_c_uintptr_t != no && break - done]) - case $gl_cv_c_uintptr_t in - no|uintptr_t) ;; - *) - AC_DEFINE_UNQUOTED(uintptr_t, $gl_cv_c_uintptr_t, - [Define to the type of a unsigned integer type wide enough to - hold a pointer, if such a type exists.]) - ;; - esac - - dnl Check whether UINTPTR_MAX is defined, not whether it has the - dnl right value. Alas, Solaris 8 defines it to empty! - dnl Applications should use (uintptr_t) -1 rather than UINTPTR_MAX. - AC_CACHE_CHECK([for UINTPTR_MAX], gl_cv_c_uintptr_max, - [AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [AC_INCLUDES_DEFAULT], - [[#ifndef UINTPTR_MAX - error: UINTPTR_MAX is not defined. - #endif]])], - [gl_cv_c_uintptr_max=yes], - [gl_cv_c_uintptr_max=no])]) - case $gl_cv_c_uintptr_max,$gl_cv_c_uintptr_t in - yes,*) ;; - *,no) ;; - *) - AC_DEFINE(UINTPTR_MAX, ((uintptr_t) -1), - [Define to its maximum value if an unsigned integer type wide enough - to hold a pointer exists and the standard includes do not define - UINTPTR_MAX.]) - ;; - esac -]) diff --git a/m4/ullong_max.m4 b/m4/ullong_max.m4 deleted file mode 100644 index 61fdce25e..000000000 --- a/m4/ullong_max.m4 +++ /dev/null @@ -1,27 +0,0 @@ -# ullong_max.m4 - define ULLONG_MAX if necessary - -dnl Copyright (C) 2005 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -# Written by Paul Eggert. - -AC_DEFUN([gl_ULLONG_MAX], -[ - dnl Avoid _AC_COMPUTE_INT-related macros, as they may not work with - dnl types wider than long int, due to problems with expr. - AC_CACHE_CHECK([whether ULONG_MAX < ULLONG_MAX], - [gl_cv_ulong_max_lt_ullong_max], - [AC_COMPILE_IFELSE( - [AC_LANG_BOOL_COMPILE_TRY( - [AC_INCLUDES_DEFAULT], - [[(unsigned long int) -1 < (unsigned long long int) -1]])], - [gl_cv_ulong_max_lt_ullong_max=yes], - [gl_cv_ulong_max_lt_ullong_max=no])]) - if test $gl_cv_ulong_max_lt_ullong_max = yes; then - AC_DEFINE([ULONG_MAX_LT_ULLONG_MAX], 1, - [Define if ULONG_MAX < ULLONG_MAX, even if your compiler does not - support ULLONG_MAX.]) - fi -]) diff --git a/m4/ulonglong.m4 b/m4/ulonglong.m4 deleted file mode 100644 index 15fab9f46..000000000 --- a/m4/ulonglong.m4 +++ /dev/null @@ -1,43 +0,0 @@ -# ulonglong.m4 serial 5 -dnl Copyright (C) 1999-2006 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Paul Eggert. - -# Define HAVE_UNSIGNED_LONG_LONG_INT if 'unsigned long long int' works. -# This fixes a bug in Autoconf 2.60, but can be removed once we -# assume 2.61 everywhere. - -AC_DEFUN([AC_TYPE_UNSIGNED_LONG_LONG_INT], -[ - AC_CACHE_CHECK([for unsigned long long int], - [ac_cv_type_unsigned_long_long_int], - [AC_LINK_IFELSE( - [AC_LANG_PROGRAM( - [[unsigned long long int ull = 18446744073709551615ULL; - typedef int a[(18446744073709551615ULL <= (unsigned long long int) -1 - ? 1 : -1)]; - int i = 63;]], - [[unsigned long long int ullmax = 18446744073709551615ull; - return (ull << 63 | ull >> 63 | ull << i | ull >> i - | ullmax / ull | ullmax % ull);]])], - [ac_cv_type_unsigned_long_long_int=yes], - [ac_cv_type_unsigned_long_long_int=no])]) - if test $ac_cv_type_unsigned_long_long_int = yes; then - AC_DEFINE([HAVE_UNSIGNED_LONG_LONG_INT], 1, - [Define to 1 if the system has the type `unsigned long long int'.]) - fi -]) - -# This macro is obsolescent and should go away soon. -AC_DEFUN([gl_AC_TYPE_UNSIGNED_LONG_LONG], -[ - AC_REQUIRE([AC_TYPE_UNSIGNED_LONG_LONG_INT]) - ac_cv_type_unsigned_long_long=$ac_cv_type_unsigned_long_long_int - if test $ac_cv_type_unsigned_long_long = yes; then - AC_DEFINE(HAVE_UNSIGNED_LONG_LONG, 1, - [Define if you have the 'unsigned long long' type.]) - fi -]) diff --git a/m4/unicodeio.m4 b/m4/unicodeio.m4 deleted file mode 100644 index 9edd52774..000000000 --- a/m4/unicodeio.m4 +++ /dev/null @@ -1,11 +0,0 @@ -# unicodeio.m4 serial 2 -dnl Copyright (C) 2002-2003 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_UNICODEIO], -[ - dnl No prerequisites of lib/unicodeio.c. - : -]) diff --git a/m4/unistd-safer.m4 b/m4/unistd-safer.m4 deleted file mode 100644 index 30526405d..000000000 --- a/m4/unistd-safer.m4 +++ /dev/null @@ -1,14 +0,0 @@ -#serial 8 -dnl Copyright (C) 2002, 2005, 2006 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_UNISTD_SAFER], -[ - AC_CHECK_FUNCS_ONCE([pipe]) - AC_LIBSOURCES([dup-safer.c, fd-safer.c, pipe-safer.c, unistd-safer.h, unistd--.h]) - AC_LIBOBJ([dup-safer]) - AC_LIBOBJ([fd-safer]) - AC_LIBOBJ([pipe-safer]) -]) diff --git a/m4/unlink-busy.m4 b/m4/unlink-busy.m4 deleted file mode 100644 index cdc5f74a0..000000000 --- a/m4/unlink-busy.m4 +++ /dev/null @@ -1,35 +0,0 @@ -#serial 10 - -dnl From J. David Anglin. - -dnl HPUX and other systems can't unlink shared text that is being executed. - -# Copyright (C) 2000, 2001, 2004, 2006 Free Software Foundation, Inc. -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_FUNC_UNLINK_BUSY_TEXT], -[dnl - AC_CACHE_CHECK([whether a running program can be unlinked], - jm_cv_func_unlink_busy_text, - [ - AC_RUN_IFELSE( - [AC_LANG_SOURCE( - [AC_INCLUDES_DEFAULT - int - main (int argc, char **argv) - { - return !argc || unlink (argv[0]) != 0; - }])], - jm_cv_func_unlink_busy_text=yes, - jm_cv_func_unlink_busy_text=no, - jm_cv_func_unlink_busy_text=no - ) - ] - ) - - if test $jm_cv_func_unlink_busy_text = no; then - INSTALL=$ac_install_sh - fi -]) diff --git a/m4/unlinkdir.m4 b/m4/unlinkdir.m4 deleted file mode 100644 index fd5ee7c9d..000000000 --- a/m4/unlinkdir.m4 +++ /dev/null @@ -1,34 +0,0 @@ -#serial 3 - -# Copyright (C) 2005 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# Written by Paul Eggert. - -AC_DEFUN([gl_UNLINKDIR], -[ - AC_REQUIRE([AC_CANONICAL_HOST]) - AC_CHECK_HEADERS_ONCE(priv.h) - - AC_LIBSOURCES([unlinkdir.c, unlinkdir.h]) - AC_LIBOBJ([unlinkdir]) - - # The Hurd, the Linux kernel, the FreeBSD kernel version 2.2 and later, - # and Cygwin never let anyone (even root) unlink directories. - # If anyone knows of another system for which unlink can never - # remove a directory, please report it to <bug-coreutils@gnu.org>. - # Unfortunately this is difficult to test for, since it requires root access - # and might create garbage in the file system, - # so the code below simply relies on the kernel name and version number. - case $host in - *-*-gnu[0-9]* | \ - *-*-linux-* | *-*-linux | \ - *-*-freebsd2.2* | *-*-freebsd[3-9]* | *-*-freebsd[1-9][0-9]* | \ - *-cygwin) - AC_DEFINE([UNLINK_CANNOT_UNLINK_DIR], 1, - [Define to 1 if unlink (dir) cannot possibly succeed.]);; - esac -]) diff --git a/m4/unlocked-io.m4 b/m4/unlocked-io.m4 deleted file mode 100644 index f58e96015..000000000 --- a/m4/unlocked-io.m4 +++ /dev/null @@ -1,44 +0,0 @@ -# unlocked-io.m4 serial 13 - -# Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -dnl From Jim Meyering. -dnl -dnl See if the glibc *_unlocked I/O macros or functions are available. -dnl Use only those *_unlocked macros or functions that are declared -dnl (because some of them were declared in Solaris 2.5.1 but were removed -dnl in Solaris 2.6, whereas we want binaries built on Solaris 2.5.1 to run -dnl on Solaris 2.6). - -AC_DEFUN([gl_FUNC_GLIBC_UNLOCKED_IO], -[ - AC_LIBSOURCES([unlocked-io.h]) - - AC_DEFINE([USE_UNLOCKED_IO], 1, - [Define to 1 if you want getc etc. to use unlocked I/O if available. - Unlocked I/O can improve performance in unithreaded apps, - but it is not safe for multithreaded apps.]) - - dnl Persuade glibc and Solaris <stdio.h> to declare - dnl fgets_unlocked(), fputs_unlocked() etc. - AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) - - AC_CHECK_DECLS_ONCE([clearerr_unlocked]) - AC_CHECK_DECLS_ONCE([feof_unlocked]) - AC_CHECK_DECLS_ONCE([ferror_unlocked]) - AC_CHECK_DECLS_ONCE([fflush_unlocked]) - AC_CHECK_DECLS_ONCE([fgets_unlocked]) - AC_CHECK_DECLS_ONCE([fputc_unlocked]) - AC_CHECK_DECLS_ONCE([fputs_unlocked]) - AC_CHECK_DECLS_ONCE([fread_unlocked]) - AC_CHECK_DECLS_ONCE([fwrite_unlocked]) - AC_CHECK_DECLS_ONCE([getc_unlocked]) - AC_CHECK_DECLS_ONCE([getchar_unlocked]) - AC_CHECK_DECLS_ONCE([putc_unlocked]) - AC_CHECK_DECLS_ONCE([putchar_unlocked]) -]) diff --git a/m4/uptime.m4 b/m4/uptime.m4 deleted file mode 100644 index 680e30fdb..000000000 --- a/m4/uptime.m4 +++ /dev/null @@ -1,23 +0,0 @@ -#serial 7 - -# Copyright (C) 1996, 1999, 2000, 2001, 2004 Free Software Foundation, Inc. -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -AC_PREREQ(2.13) - -AC_DEFUN([gl_SYS_PROC_UPTIME], -[ dnl Require AC_PROG_CC to see if we're cross compiling. - AC_REQUIRE([AC_PROG_CC]) - AC_CACHE_CHECK([for /proc/uptime], jm_cv_have_proc_uptime, - [jm_cv_have_proc_uptime=no - test -f /proc/uptime \ - && test "$cross_compiling" = no \ - && cat < /proc/uptime >/dev/null 2>/dev/null \ - && jm_cv_have_proc_uptime=yes]) - if test $jm_cv_have_proc_uptime = yes; then - AC_DEFINE(HAVE_PROC_UPTIME, 1, - [ Define if your system has the /proc/uptime special file.]) - fi -]) diff --git a/m4/userspec.m4 b/m4/userspec.m4 deleted file mode 100644 index 92a22d605..000000000 --- a/m4/userspec.m4 +++ /dev/null @@ -1,14 +0,0 @@ -#serial 8 -dnl Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_USERSPEC], -[ - AC_LIBSOURCES([userspec.c, userspec.h, intprops.h]) - AC_LIBOBJ([userspec]) - - dnl Prerequisites of lib/userspec.c. - AC_CHECK_HEADERS_ONCE(sys/param.h) -]) diff --git a/m4/utimbuf.m4 b/m4/utimbuf.m4 deleted file mode 100644 index 56f1bce66..000000000 --- a/m4/utimbuf.m4 +++ /dev/null @@ -1,47 +0,0 @@ -#serial 7 - -# Copyright (C) 1998, 1999, 2000, 2001, 2003, 2004 Free Software -# Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -dnl From Jim Meyering - -dnl Define HAVE_STRUCT_UTIMBUF if `struct utimbuf' is declared -- -dnl usually in <utime.h>. -dnl Some systems have utime.h but don't declare the struct anywhere. - -AC_DEFUN([gl_CHECK_TYPE_STRUCT_UTIMBUF], -[ - AC_CHECK_HEADERS_ONCE(sys/time.h utime.h) - AC_REQUIRE([AC_HEADER_TIME]) - AC_CACHE_CHECK([for struct utimbuf], fu_cv_sys_struct_utimbuf, - [AC_TRY_COMPILE( - [ -#ifdef TIME_WITH_SYS_TIME -# include <sys/time.h> -# include <time.h> -#else -# ifdef HAVE_SYS_TIME_H -# include <sys/time.h> -# else -# include <time.h> -# endif -#endif -#ifdef HAVE_UTIME_H -# include <utime.h> -#endif - ], - [static struct utimbuf x; x.actime = x.modtime;], - fu_cv_sys_struct_utimbuf=yes, - fu_cv_sys_struct_utimbuf=no) - ]) - - if test $fu_cv_sys_struct_utimbuf = yes; then - AC_DEFINE(HAVE_STRUCT_UTIMBUF, 1, - [Define if struct utimbuf is declared -- usually in <utime.h>. - Some systems have utime.h but don't declare the struct anywhere. ]) - fi -]) diff --git a/m4/utime.m4 b/m4/utime.m4 deleted file mode 100644 index 967faa253..000000000 --- a/m4/utime.m4 +++ /dev/null @@ -1,30 +0,0 @@ -#serial 7 - -dnl From Jim Meyering -dnl Replace the utime function on systems that need it. - -# Copyright (C) 1998, 2000, 2001, 2003, 2004 Free Software Foundation, Inc. -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -dnl FIXME - -AC_DEFUN([gl_FUNC_UTIME], -[ - AC_REQUIRE([AC_FUNC_UTIME_NULL]) - if test $ac_cv_func_utime_null = no; then - AC_LIBOBJ(utime) - AC_DEFINE(utime, rpl_utime, - [Define to rpl_utime if the replacement function should be used.]) - gl_PREREQ_UTIME - fi -]) - -# Prerequisites of lib/utime.c. -AC_DEFUN([gl_PREREQ_UTIME], -[ - AC_CHECK_HEADERS_ONCE(utime.h) - AC_REQUIRE([gl_CHECK_TYPE_STRUCT_UTIMBUF]) - gl_FUNC_UTIMES_NULL -]) diff --git a/m4/utimecmp.m4 b/m4/utimecmp.m4 deleted file mode 100644 index ba02d53a6..000000000 --- a/m4/utimecmp.m4 +++ /dev/null @@ -1,16 +0,0 @@ -#serial 1 -dnl Copyright (C) 2004, 2005 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_UTIMECMP], -[ - AC_LIBSOURCES([utimecmp.c, utimecmp.h, intprops.h]) - AC_LIBOBJ([utimecmp]) - - dnl Prerequisites of lib/utimecmp.c. - AC_REQUIRE([gl_TIMESPEC]) - AC_REQUIRE([gl_FUNC_UTIMES]) - : -]) diff --git a/m4/utimens.m4 b/m4/utimens.m4 deleted file mode 100644 index 10f682191..000000000 --- a/m4/utimens.m4 +++ /dev/null @@ -1,17 +0,0 @@ -dnl Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_UTIMENS], -[ - AC_LIBSOURCES([utimens.c, utimens.h]) - AC_LIBOBJ([utimens]) - - dnl Prerequisites of lib/utimens.c. - AC_REQUIRE([gl_TIMESPEC]) - AC_REQUIRE([gl_FUNC_UTIMES]) - AC_REQUIRE([gl_CHECK_TYPE_STRUCT_TIMESPEC]) - AC_REQUIRE([gl_CHECK_TYPE_STRUCT_UTIMBUF]) - AC_CHECK_FUNCS_ONCE([futimes futimesat]) -]) diff --git a/m4/utimes-null.m4 b/m4/utimes-null.m4 deleted file mode 100644 index 8d5c8aef7..000000000 --- a/m4/utimes-null.m4 +++ /dev/null @@ -1,41 +0,0 @@ -#serial 7 - -# Copyright (C) 1998, 1999, 2001, 2003, 2004, 2006 Free Software -# Foundation, Inc. - -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -dnl Shamelessly cloned from acspecific.m4's AC_FUNC_UTIME_NULL, -dnl then do case-insensitive s/utime/utimes/. - -AC_DEFUN([gl_FUNC_UTIMES_NULL], -[AC_CACHE_CHECK(whether utimes accepts a null argument, ac_cv_func_utimes_null, -[rm -f conftest.data; > conftest.data -AC_TRY_RUN([ -/* In case stat has been defined to rpl_stat, undef it here. */ -#undef stat -#include <sys/types.h> -#include <sys/stat.h> -#include <sys/time.h> -int -main () { -struct stat s, t; -return ! (stat ("conftest.data", &s) == 0 - && utimes ("conftest.data", 0) == 0 - && stat ("conftest.data", &t) == 0 - && t.st_mtime >= s.st_mtime - && t.st_mtime - s.st_mtime < 120)); -}], - ac_cv_func_utimes_null=yes, - ac_cv_func_utimes_null=no, - ac_cv_func_utimes_null=no) -rm -f core core.* *.core]) - - if test $ac_cv_func_utimes_null = yes; then - AC_DEFINE(HAVE_UTIMES_NULL, 1, - [Define if utimes accepts a null argument]) - fi - ] -) diff --git a/m4/utimes.m4 b/m4/utimes.m4 deleted file mode 100644 index 7efb2b026..000000000 --- a/m4/utimes.m4 +++ /dev/null @@ -1,83 +0,0 @@ -# Detect some bugs in glibc's implementation of utimes. - -dnl Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -# See if we need to work around bugs in glibc's implementation of -# utimes from 2003-07-12 to 2003-09-17. -# First, there was a bug that would make utimes set mtime -# and atime to zero (1970-01-01) unconditionally. -# Then, there was code to round rather than truncate. -# Then, there was an implementation (sparc64, Linux-2.4.28, glibc-2.3.3) -# that didn't honor the NULL-means-set-to-current-time semantics. -# Finally, there was also a version of utimes that failed on read-only -# files, while utime worked fine (linux-2.2.20, glibc-2.2.5). -# -# From Jim Meyering, with suggestions from Paul Eggert. - -AC_DEFUN([gl_FUNC_UTIMES], -[ - AC_CACHE_CHECK([determine whether the utimes function works], - gl_cv_func_working_utimes, - [ - AC_RUN_IFELSE([AC_LANG_SOURCE([[ -#include <sys/types.h> -#include <sys/stat.h> -#include <fcntl.h> -#include <sys/time.h> -#include <time.h> -#include <unistd.h> -#include <stdlib.h> -#include <stdio.h> -#include <utime.h> - -int -main () -{ - static struct timeval timeval[2] = {{9, 10}, {999999, 999999}}; - struct stat sbuf; - char const *file = "conftest.utimes"; - FILE *f; - time_t now; - int fd; - - int ok = ((f = fopen (file, "w")) - && fclose (f) == 0 - && utimes (file, timeval) == 0 - && lstat (file, &sbuf) == 0 - && sbuf.st_atime == timeval[0].tv_sec - && sbuf.st_mtime == timeval[1].tv_sec); - unlink (file); - if (!ok) - exit (1); - - ok = - ((f = fopen (file, "w")) - && fclose (f) == 0 - && time (&now) != (time_t)-1 - && utimes (file, NULL) == 0 - && lstat (file, &sbuf) == 0 - && now - sbuf.st_atime <= 2 - && now - sbuf.st_mtime <= 2); - unlink (file); - if (!ok) - exit (1); - - ok = (0 <= (fd = open (file, O_WRONLY|O_CREAT, 0444)) - && close (fd) == 0 - && utimes (file, NULL) == 0); - unlink (file); - - exit (!ok); -} - ]])], - [gl_cv_func_working_utimes=yes], - [gl_cv_func_working_utimes=no], - [gl_cv_func_working_utimes=no])]) - - if test $gl_cv_func_working_utimes = yes; then - AC_DEFINE([HAVE_WORKING_UTIMES], 1, [Define if utimes works properly. ]) - fi -]) diff --git a/m4/vasnprintf.m4 b/m4/vasnprintf.m4 deleted file mode 100644 index 7ff343035..000000000 --- a/m4/vasnprintf.m4 +++ /dev/null @@ -1,58 +0,0 @@ -# vasnprintf.m4 serial 5 -dnl Copyright (C) 2002-2004 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_FUNC_VASNPRINTF], -[ - AC_REQUIRE([gl_EOVERFLOW]) - AC_REPLACE_FUNCS(vasnprintf) - if test $ac_cv_func_vasnprintf = no; then - AC_LIBOBJ(printf-args) - AC_LIBOBJ(printf-parse) - AC_LIBOBJ(asnprintf) - gl_PREREQ_PRINTF_ARGS - gl_PREREQ_PRINTF_PARSE - gl_PREREQ_VASNPRINTF - gl_PREREQ_ASNPRINTF - fi -]) - -# Prequisites of lib/printf-args.h, lib/printf-args.c. -AC_DEFUN([gl_PREREQ_PRINTF_ARGS], -[ - AC_REQUIRE([bh_C_SIGNED]) - AC_REQUIRE([gl_AC_TYPE_LONG_LONG]) - AC_REQUIRE([gt_TYPE_LONGDOUBLE]) - AC_REQUIRE([gt_TYPE_WCHAR_T]) - AC_REQUIRE([gt_TYPE_WINT_T]) -]) - -# Prequisites of lib/printf-parse.h, lib/printf-parse.c. -AC_DEFUN([gl_PREREQ_PRINTF_PARSE], -[ - AC_REQUIRE([gl_AC_TYPE_LONG_LONG]) - AC_REQUIRE([gt_TYPE_LONGDOUBLE]) - AC_REQUIRE([gt_TYPE_WCHAR_T]) - AC_REQUIRE([gt_TYPE_WINT_T]) - AC_REQUIRE([AC_TYPE_SIZE_T]) - AC_CHECK_TYPES(ptrdiff_t) - AC_REQUIRE([gt_AC_TYPE_INTMAX_T]) -]) - -# Prerequisites of lib/vasnprintf.c. -AC_DEFUN([gl_PREREQ_VASNPRINTF], -[ - AC_REQUIRE([AC_FUNC_ALLOCA]) - AC_REQUIRE([gl_AC_TYPE_LONG_LONG]) - AC_REQUIRE([gt_TYPE_LONGDOUBLE]) - AC_REQUIRE([gt_TYPE_WCHAR_T]) - AC_REQUIRE([gt_TYPE_WINT_T]) - AC_CHECK_FUNCS(snprintf wcslen) -]) - -# Prerequisites of lib/asnprintf.c. -AC_DEFUN([gl_PREREQ_ASNPRINTF], -[ -]) diff --git a/m4/vasprintf.m4 b/m4/vasprintf.m4 deleted file mode 100644 index 385e92edd..000000000 --- a/m4/vasprintf.m4 +++ /dev/null @@ -1,25 +0,0 @@ -# vasprintf.m4 serial 1 -dnl Copyright (C) 2002-2003 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_FUNC_VASPRINTF], -[ - AC_REPLACE_FUNCS(vasprintf) - if test $ac_cv_func_vasprintf = no; then - AC_LIBOBJ(asprintf) - gl_PREREQ_VASPRINTF - gl_PREREQ_ASPRINTF - fi -]) - -# Prerequisites of lib/vasprintf.c. -AC_DEFUN([gl_PREREQ_VASPRINTF], -[ -]) - -# Prerequisites of lib/asprintf.c. -AC_DEFUN([gl_PREREQ_ASPRINTF], -[ -]) diff --git a/m4/version-etc.m4 b/m4/version-etc.m4 deleted file mode 100644 index 21a37df06..000000000 --- a/m4/version-etc.m4 +++ /dev/null @@ -1,17 +0,0 @@ -#serial 1 -dnl Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_VERSION_ETC], -[ - dnl FIXME: if/when this becomes a gnulib macro, make version-etc-fsf.c - dnl be merely `suggested' or `recommended', not required. - AC_LIBSOURCES([version-etc.c, version-etc.h, version-etc-fsf.c]) - AC_LIBOBJ([version-etc-fsf]) - AC_LIBOBJ([version-etc]) - - dnl Prerequisites. - : -]) diff --git a/m4/wchar_t.m4 b/m4/wchar_t.m4 deleted file mode 100644 index cde2129a9..000000000 --- a/m4/wchar_t.m4 +++ /dev/null @@ -1,20 +0,0 @@ -# wchar_t.m4 serial 1 (gettext-0.12) -dnl Copyright (C) 2002-2003 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Bruno Haible. -dnl Test whether <stddef.h> has the 'wchar_t' type. -dnl Prerequisite: AC_PROG_CC - -AC_DEFUN([gt_TYPE_WCHAR_T], -[ - AC_CACHE_CHECK([for wchar_t], gt_cv_c_wchar_t, - [AC_TRY_COMPILE([#include <stddef.h> - wchar_t foo = (wchar_t)'\0';], , - gt_cv_c_wchar_t=yes, gt_cv_c_wchar_t=no)]) - if test $gt_cv_c_wchar_t = yes; then - AC_DEFINE(HAVE_WCHAR_T, 1, [Define if you have the 'wchar_t' type.]) - fi -]) diff --git a/m4/wcwidth.m4 b/m4/wcwidth.m4 deleted file mode 100644 index 06a12a1b2..000000000 --- a/m4/wcwidth.m4 +++ /dev/null @@ -1,24 +0,0 @@ -# wcwidth.m4 serial 4 -dnl Copyright (C) 2006 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_FUNC_WCWIDTH], -[ - dnl Persuade glibc <wchar.h> to declare wcwidth(). - AC_REQUIRE([AC_GNU_SOURCE]) - - AC_REQUIRE([AC_C_INLINE]) - AC_REQUIRE([gt_TYPE_WCHAR_T]) - - AC_CHECK_HEADERS_ONCE([wchar.h wctype.h]) - AC_CHECK_FUNCS_ONCE([iswprint wcwidth]) - - AC_CHECK_DECLS([wcwidth], [], [], [ -/* AIX 3.2.5 declares wcwidth in <string.h>. */ -#include <string.h> -#if HAVE_WCHAR_H -# include <wchar.h> -#endif -])]) diff --git a/m4/wint_t.m4 b/m4/wint_t.m4 deleted file mode 100644 index b8fff9c86..000000000 --- a/m4/wint_t.m4 +++ /dev/null @@ -1,20 +0,0 @@ -# wint_t.m4 serial 1 (gettext-0.12) -dnl Copyright (C) 2003 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Bruno Haible. -dnl Test whether <wchar.h> has the 'wint_t' type. -dnl Prerequisite: AC_PROG_CC - -AC_DEFUN([gt_TYPE_WINT_T], -[ - AC_CACHE_CHECK([for wint_t], gt_cv_c_wint_t, - [AC_TRY_COMPILE([#include <wchar.h> - wint_t foo = (wchar_t)'\0';], , - gt_cv_c_wint_t=yes, gt_cv_c_wint_t=no)]) - if test $gt_cv_c_wint_t = yes; then - AC_DEFINE(HAVE_WINT_T, 1, [Define if you have the 'wint_t' type.]) - fi -]) diff --git a/m4/xalloc.m4 b/m4/xalloc.m4 deleted file mode 100644 index c0847dd37..000000000 --- a/m4/xalloc.m4 +++ /dev/null @@ -1,25 +0,0 @@ -# xalloc.m4 serial 12 -dnl Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_XALLOC], -[ - AC_LIBSOURCES([xmalloc.c, xalloc.h]) - AC_LIBOBJ([xmalloc]) - - gl_PREREQ_XALLOC - gl_PREREQ_XMALLOC -]) - -# Prerequisites of lib/xalloc.h. -AC_DEFUN([gl_PREREQ_XALLOC], [ - : -]) - -# Prerequisites of lib/xmalloc.c. -AC_DEFUN([gl_PREREQ_XMALLOC], [ - AC_REQUIRE([AC_C_INLINE]) - : -]) diff --git a/m4/xgetcwd.m4 b/m4/xgetcwd.m4 deleted file mode 100644 index 025b51c94..000000000 --- a/m4/xgetcwd.m4 +++ /dev/null @@ -1,13 +0,0 @@ -#serial 5 -dnl Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_XGETCWD], -[ - AC_LIBSOURCES([xgetcwd.c, xgetcwd.h]) - AC_LIBOBJ([xgetcwd]) - - AC_REQUIRE([gl_FUNC_GETCWD]) -]) diff --git a/m4/xnanosleep.m4 b/m4/xnanosleep.m4 deleted file mode 100644 index 360a4f5cb..000000000 --- a/m4/xnanosleep.m4 +++ /dev/null @@ -1,13 +0,0 @@ -#serial 3 -dnl Copyright (C) 2005 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl Written by Paul Eggert. - -AC_DEFUN([gl_XNANOSLEEP], -[ - AC_LIBSOURCES([xnanosleep.c, xnanosleep.h, intprops.h]) - AC_LIBOBJ([xnanosleep]) -]) diff --git a/m4/xreadlink.m4 b/m4/xreadlink.m4 deleted file mode 100644 index c59b4a734..000000000 --- a/m4/xreadlink.m4 +++ /dev/null @@ -1,14 +0,0 @@ -#serial 7 -dnl Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_XREADLINK], -[ - AC_LIBSOURCES([xreadlink.c, xreadlink.h]) - AC_LIBOBJ([xreadlink]) - - dnl Prerequisites of lib/xreadlink.c. - AC_REQUIRE([gt_TYPE_SSIZE_T]) -]) diff --git a/m4/xstrtod.m4 b/m4/xstrtod.m4 deleted file mode 100644 index e9c94ca68..000000000 --- a/m4/xstrtod.m4 +++ /dev/null @@ -1,19 +0,0 @@ -#serial 5 -dnl Copyright (C) 2002, 2003, 2005, 2006 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -# Prerequisites of lib/xstrtod.c. -AC_DEFUN([gl_XSTRTOD], -[ - AC_LIBSOURCES([xstrtod.c, xstrtod.h]) - AC_LIBOBJ([xstrtod]) -]) - -# Prerequisites of lib/xstrtold.c. -AC_DEFUN([gl_XSTRTOLD], -[ - AC_LIBSOURCES([xstrtold.c, xstrtod.c, xstrtod.h]) - AC_LIBOBJ([xstrtold]) -]) diff --git a/m4/xstrtoimax.m4 b/m4/xstrtoimax.m4 deleted file mode 100644 index ca1d2d57c..000000000 --- a/m4/xstrtoimax.m4 +++ /dev/null @@ -1,14 +0,0 @@ -#serial 5 -dnl Cloned from xstrtoumax.m4. Keep these files in sync. - -dnl Copyright (C) 2001, 2003, 2004 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_XSTRTOIMAX], -[ - dnl Prerequisites of lib/xstrtoimax.c. - AC_REQUIRE([gl_AC_TYPE_INTMAX_T]) - AC_REQUIRE([gl_PREREQ_XSTRTOL]) -]) diff --git a/m4/xstrtol.m4 b/m4/xstrtol.m4 deleted file mode 100644 index fa6e5c407..000000000 --- a/m4/xstrtol.m4 +++ /dev/null @@ -1,36 +0,0 @@ -#serial 8 -dnl Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_XSTRTOL], -[ - AC_LIBSOURCES([xstrtol.c, xstrtol.h, xstrtoul.c, intprops.h]) - AC_LIBOBJ([xstrtol]) - AC_LIBOBJ([xstrtoul]) - - AC_REQUIRE([gl_PREREQ_XSTRTOL]) - AC_REQUIRE([gl_PREREQ_XSTRTOUL]) -]) - -# Prerequisites of lib/xstrtol.h. -AC_DEFUN([gl_PREREQ_XSTRTOL_H], -[ - AC_REQUIRE([gl_AC_TYPE_INTMAX_T]) - AC_REQUIRE([gl_AC_TYPE_UINTMAX_T]) -]) - -# Prerequisites of lib/xstrtol.c. -AC_DEFUN([gl_PREREQ_XSTRTOL], -[ - AC_REQUIRE([gl_PREREQ_XSTRTOL_H]) - AC_CHECK_DECLS_ONCE([strtoimax]) - AC_CHECK_DECLS_ONCE([strtoumax]) -]) - -# Prerequisites of lib/xstrtoul.c. -AC_DEFUN([gl_PREREQ_XSTRTOUL], -[ - AC_REQUIRE([gl_PREREQ_XSTRTOL]) -]) diff --git a/m4/xstrtoumax.m4 b/m4/xstrtoumax.m4 deleted file mode 100644 index afac77b38..000000000 --- a/m4/xstrtoumax.m4 +++ /dev/null @@ -1,14 +0,0 @@ -#serial 7 -dnl Cloned from xstrtoimax.m4. Keep these files in sync. - -dnl Copyright (C) 1999, 2000, 2001, 2003, 2004 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_XSTRTOUMAX], -[ - dnl Prerequisites of lib/xstrtoumax.c. - AC_REQUIRE([gl_AC_TYPE_UINTMAX_T]) - AC_REQUIRE([gl_PREREQ_XSTRTOL]) -]) diff --git a/m4/yesno.m4 b/m4/yesno.m4 deleted file mode 100644 index 6e8078df4..000000000 --- a/m4/yesno.m4 +++ /dev/null @@ -1,14 +0,0 @@ -# yesno.m4 serial 4 -dnl Copyright (C) 2002-2003, 2005 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_YESNO], -[ - AC_LIBSOURCES([yesno.c, yesno.h]) - AC_LIBOBJ([yesno]) - - dnl No prerequisites of lib/yesno.c. - : -]) |