summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2002-09-10 13:10:02 +0000
committerJim Meyering <jim@meyering.net>2002-09-10 13:10:02 +0000
commit867d0d0403d9390f729e0f6a147f8e948ccbaefb (patch)
tree1b40fcbba99d574445affc1143db16787774376f /m4
parent5d5cef3277be81d1bc04ecdcc9313e5cc2708c20 (diff)
downloadcoreutils-867d0d0403d9390f729e0f6a147f8e948ccbaefb.tar.xz
Remove file -- now it's part of autoconf-2.53c.
Diffstat (limited to 'm4')
-rw-r--r--m4/fnmatch.m487
-rw-r--r--m4/getloadavg.m4108
-rw-r--r--m4/gnu-source.m412
-rw-r--r--m4/mbstate_t.m432
4 files changed, 0 insertions, 239 deletions
diff --git a/m4/fnmatch.m4 b/m4/fnmatch.m4
deleted file mode 100644
index 708f9e6d4..000000000
--- a/m4/fnmatch.m4
+++ /dev/null
@@ -1,87 +0,0 @@
-# Check for fnmatch.
-
-# This is a modified version of autoconf's AC_FUNC_FNMATCH.
-# This file should be removed after Autoconf 2.54 is required.
-
-# Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-# 02111-1307, USA.
-
-# _AC_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],
- [# Some versions of Solaris, SCO, and the GNU C Library
- # have a broken or incompatible fnmatch.
- # So we run a test program. If we are cross-compiling, take no chance.
- # Thanks to John Oleynick, Franc,ois Pinard, and Paul Eggert for this test.
- AC_RUN_IFELSE(
- [AC_LANG_PROGRAM(
- [#include <fnmatch.h>
-# define y(a, b, c) (fnmatch (a, b, c) == 0)
-# define n(a, b, c) (fnmatch (a, b, c) == FNM_NOMATCH)
- ],
- [exit
- (!(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_C_CONST])dnl
-AC_REQUIRE([AC_FUNC_ALLOCA])dnl
-AC_REQUIRE([AC_TYPE_MBSTATE_T])dnl
-AC_CHECK_DECLS([getenv])
-AC_CHECK_FUNCS([btowc mbsrtowcs mempcpy wmempcpy])
-AC_CHECK_HEADERS([wchar.h wctype.h])
-AC_LIBOBJ([fnmatch])
-AC_CONFIG_LINKS([lib/fnmatch.h:lib/fnmatch_.h])
-AC_DEFINE(fnmatch, rpl_fnmatch,
- [Define to rpl_fnmatch if the replacement function should be used.])
-])# _AC_LIBOBJ_FNMATCH
-
-
-# AC_FUNC_FNMATCH_GNU
-# -------------------
-AC_DEFUN([AC_FUNC_FNMATCH_GNU],
-[AC_REQUIRE([AC_GNU_SOURCE])
-_AC_FUNC_FNMATCH_IF([GNU], [ac_cv_func_fnmatch_gnu],
- [rm -f lib/fnmatch.h],
- [_AC_LIBOBJ_FNMATCH])
-])# AC_FUNC_FNMATCH_GNU
diff --git a/m4/getloadavg.m4 b/m4/getloadavg.m4
deleted file mode 100644
index ff8cf309b..000000000
--- a/m4/getloadavg.m4
+++ /dev/null
@@ -1,108 +0,0 @@
-#serial 9
-
-# A replacement for autoconf's macro by the same name. This version
-# accepts an optional argument specifying the name of the $srcdir-relative
-# directory in which the file getloadavg.c may be found. It is unusual
-# (but justified, imho) that this file is required at ./configure time.
-
-undefine([AC_FUNC_GETLOADAVG])
-
-# AC_FUNC_GETLOADAVG
-# ------------------
-AC_DEFUN([AC_FUNC_GETLOADAVG],
-[ac_have_func=no # yes means we've found a way to get the load average.
-
-AC_CHECK_HEADERS(locale.h unistd.h mach/mach.h fcntl.h)
-AC_CHECK_FUNCS(setlocale)
-
-# By default, expect to find getloadavg.c in $srcdir/.
-ac_lib_dir_getloadavg=$srcdir
-# But if there's an argument, DIR, expect to find getloadavg.c in $srcdir/DIR.
-m4_ifval([$1], [ac_lib_dir_getloadavg=$srcdir/$1])
-# Make sure getloadavg.c is where it belongs, at ./configure-time.
-test -f $ac_lib_dir_getloadavg/getloadavg.c \
- || AC_MSG_ERROR([getloadavg.c is not in $ac_lib_dir_getloadavg])
-# FIXME: Add an autoconf-time test, too?
-
-ac_save_LIBS=$LIBS
-
-# Check for getloadavg, but be sure not to touch the cache variable.
-(AC_CHECK_FUNC(getloadavg, exit 0, exit 1)) && ac_have_func=yes
-
-# On HPUX9, an unprivileged user can get load averages through this function.
-AC_CHECK_FUNCS(pstat_getdynamic)
-
-# Solaris has libkstat which does not require root.
-AC_CHECK_LIB(kstat, kstat_open)
-test $ac_cv_lib_kstat_kstat_open = yes && ac_have_func=yes
-
-# Some systems with -lutil have (and need) -lkvm as well, some do not.
-# On Solaris, -lkvm requires nlist from -lelf, so check that first
-# to get the right answer into the cache.
-# For kstat on solaris, we need libelf to force the definition of SVR4 below.
-if test $ac_have_func = no; then
- AC_CHECK_LIB(elf, elf_begin, LIBS="-lelf $LIBS")
-fi
-if test $ac_have_func = no; then
- AC_CHECK_LIB(kvm, kvm_open, LIBS="-lkvm $LIBS")
- # Check for the 4.4BSD definition of getloadavg.
- AC_CHECK_LIB(util, getloadavg,
- [LIBS="-lutil $LIBS" ac_have_func=yes ac_cv_func_getloadavg_setgid=yes])
-fi
-
-if test $ac_have_func = no; then
- # There is a commonly available library for RS/6000 AIX.
- # Since it is not a standard part of AIX, it might be installed locally.
- ac_getloadavg_LIBS=$LIBS
- LIBS="-L/usr/local/lib $LIBS"
- AC_CHECK_LIB(getloadavg, getloadavg,
- [LIBS="-lgetloadavg $LIBS"], [LIBS=$ac_getloadavg_LIBS])
-fi
-
-# Make sure it is really in the library, if we think we found it,
-# otherwise set up the replacement function.
-AC_CHECK_FUNCS(getloadavg, [],
- [_AC_LIBOBJ_GETLOADAVG])
-
-# Some definitions of getloadavg require that the program be installed setgid.
-AC_CACHE_CHECK(whether getloadavg requires setgid,
- ac_cv_func_getloadavg_setgid,
-[AC_EGREP_CPP([Yowza Am I SETGID yet],
-[#include "$ac_lib_dir_getloadavg/getloadavg.c"
-#ifdef LDAV_PRIVILEGED
-Yowza Am I SETGID yet
-@%:@endif],
- ac_cv_func_getloadavg_setgid=yes,
- ac_cv_func_getloadavg_setgid=no)])
-if test $ac_cv_func_getloadavg_setgid = yes; then
- NEED_SETGID=true
- AC_DEFINE(GETLOADAVG_PRIVILEGED, 1,
- [Define if the `getloadavg' function needs to be run setuid
- or setgid.])
-else
- NEED_SETGID=false
-fi
-AC_SUBST(NEED_SETGID)dnl
-
-if test $ac_cv_func_getloadavg_setgid = yes; then
- AC_CACHE_CHECK(group of /dev/kmem, ac_cv_group_kmem,
-[ # On Solaris, /dev/kmem is a symlink. Get info on the real file.
- ac_ls_output=`ls -lgL /dev/kmem 2>/dev/null`
- # If we got an error (system does not support symlinks), try without -L.
- test -z "$ac_ls_output" && ac_ls_output=`ls -lg /dev/kmem`
- ac_cv_group_kmem=`echo $ac_ls_output \
- | sed -ne ['s/[ ][ ]*/ /g;
- s/^.[sSrwx-]* *[0-9]* *\([^0-9]*\) *.*/\1/;
- / /s/.* //;p;']`
-])
- AC_SUBST(KMEM_GROUP, $ac_cv_group_kmem)dnl
-fi
-if test "x$ac_save_LIBS" = x; then
- GETLOADAVG_LIBS=$LIBS
-else
- GETLOADAVG_LIBS=`echo "$LIBS" | sed "s!$ac_save_LIBS!!"`
-fi
-LIBS=$ac_save_LIBS
-
-AC_SUBST(GETLOADAVG_LIBS)dnl
-])# AC_FUNC_GETLOADAVG
diff --git a/m4/gnu-source.m4 b/m4/gnu-source.m4
deleted file mode 100644
index edecf5ddb..000000000
--- a/m4/gnu-source.m4
+++ /dev/null
@@ -1,12 +0,0 @@
-# AC_GNU_SOURCE
-# --------------
-AC_DEFUN([AC_GNU_SOURCE],
-[AH_VERBATIM([_GNU_SOURCE],
-[/* Enable GNU extensions on systems that have them. */
-#ifndef _GNU_SOURCE
-# undef _GNU_SOURCE
-#endif])dnl
-AC_BEFORE([$0], [AC_COMPILE_IFELSE])dnl
-AC_BEFORE([$0], [AC_RUN_IFELSE])dnl
-AC_DEFINE([_GNU_SOURCE])
-])
diff --git a/m4/mbstate_t.m4 b/m4/mbstate_t.m4
deleted file mode 100644
index a07f51bc1..000000000
--- a/m4/mbstate_t.m4
+++ /dev/null
@@ -1,32 +0,0 @@
-# mbstate_t.m4 serial 9
-dnl Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc.
-dnl This file is free software, distributed under the terms of the GNU
-dnl General Public License. As a special exception to the GNU General
-dnl Public License, this file may be distributed as part of a program
-dnl that contains a configuration script generated by Autoconf, under
-dnl the same distribution terms as the rest of that program.
-
-# 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])