summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2002-09-12 13:15:07 +0000
committerJim Meyering <jim@meyering.net>2002-09-12 13:15:07 +0000
commit96bd9415dc85b2adad94a019b22103d63b94c2e4 (patch)
tree35613621659c830a3ba76416635a4e3b1712c8de
parenta4d28ef1454c92113fc4edf11eed79eab9a0c23e (diff)
downloadcoreutils-96bd9415dc85b2adad94a019b22103d63b94c2e4.tar.xz
.
-rw-r--r--Makefile.in2
-rw-r--r--aclocal.m4250
-rw-r--r--config.hin3
-rw-r--r--src/Makefile.in11
4 files changed, 14 insertions, 252 deletions
diff --git a/Makefile.in b/Makefile.in
index ae306eff0..69e0eaac2 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -200,7 +200,7 @@ $(top_builddir)/config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
$(srcdir)/configure: $(srcdir)/configure.ac $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
cd $(srcdir) && $(AUTOCONF)
-$(ACLOCAL_M4): configure.ac m4/acl.m4 m4/afs.m4 m4/assert.m4 m4/bison.m4 m4/boottime.m4 m4/c-stack.m4 m4/check-decl.m4 m4/chown.m4 m4/codeset.m4 m4/d-ino.m4 m4/d-type.m4 m4/dirfd.m4 m4/dos.m4 m4/error.m4 m4/fnmatch.m4 m4/fpending.m4 m4/fstypename.m4 m4/fsusage.m4 m4/ftruncate.m4 m4/getcwd.m4 m4/getgroups.m4 m4/getline.m4 m4/getloadavg.m4 m4/gettext.m4 m4/gettimeofday.m4 m4/glibc.m4 m4/glibc21.m4 m4/gnu-source.m4 m4/group-member.m4 m4/host-os.m4 m4/iconv.m4 m4/intdiv0.m4 m4/inttypes.m4 m4/isc-posix.m4 m4/jm-glibc-io.m4 m4/jm-macros.m4 m4/jm-mktime.m4 m4/jm-winsz1.m4 m4/jm-winsz2.m4 m4/lchown.m4 m4/lcmessage.m4 m4/lib-check.m4 m4/lib-ld.m4 m4/lib-link.m4 m4/lib-prefix.m4 m4/link-follow.m4 m4/longlong.m4 m4/ls-mntd-fs.m4 m4/lstat.m4 m4/mbrtowc.m4 m4/mbstate_t.m4 m4/mbswidth.m4 m4/memcmp.m4 m4/mkdir-slash.m4 m4/mkstemp.m4 m4/nanosleep.m4 m4/perl.m4 m4/prereq.m4 m4/progtest.m4 m4/putenv.m4 m4/regex.m4 m4/rename.m4 m4/rmdir-errno.m4 m4/search-libs.m4 m4/st_dm_mode.m4 m4/st_mtim.m4 m4/stat.m4 m4/stdbool.m4 m4/strerror_r.m4 m4/strftime.m4 m4/timespec.m4 m4/unlink-busy.m4 m4/uptime.m4 m4/utimbuf.m4 m4/utime.m4 m4/utimes.m4 m4/xstrtoimax.m4 m4/xstrtoumax.m4
+$(ACLOCAL_M4): configure.ac m4/acl.m4 m4/afs.m4 m4/assert.m4 m4/bison.m4 m4/boottime.m4 m4/c-stack.m4 m4/check-decl.m4 m4/chown.m4 m4/codeset.m4 m4/d-ino.m4 m4/d-type.m4 m4/dirfd.m4 m4/dos.m4 m4/error.m4 m4/fpending.m4 m4/fstypename.m4 m4/fsusage.m4 m4/ftruncate.m4 m4/getcwd.m4 m4/getgroups.m4 m4/getline.m4 m4/gettext.m4 m4/gettimeofday.m4 m4/glibc.m4 m4/glibc21.m4 m4/group-member.m4 m4/host-os.m4 m4/iconv.m4 m4/intdiv0.m4 m4/inttypes.m4 m4/isc-posix.m4 m4/jm-glibc-io.m4 m4/jm-macros.m4 m4/jm-mktime.m4 m4/jm-winsz1.m4 m4/jm-winsz2.m4 m4/lchown.m4 m4/lcmessage.m4 m4/lib-check.m4 m4/lib-ld.m4 m4/lib-link.m4 m4/lib-prefix.m4 m4/link-follow.m4 m4/longlong.m4 m4/ls-mntd-fs.m4 m4/lstat.m4 m4/mbrtowc.m4 m4/mbswidth.m4 m4/memcmp.m4 m4/mkdir-slash.m4 m4/mkstemp.m4 m4/nanosleep.m4 m4/perl.m4 m4/prereq.m4 m4/progtest.m4 m4/putenv.m4 m4/regex.m4 m4/rename.m4 m4/rmdir-errno.m4 m4/search-libs.m4 m4/st_dm_mode.m4 m4/st_mtim.m4 m4/stat.m4 m4/stdbool.m4 m4/strerror_r.m4 m4/strftime.m4 m4/timespec.m4 m4/unlink-busy.m4 m4/uptime.m4 m4/utimbuf.m4 m4/utime.m4 m4/utimes.m4 m4/xstrtoimax.m4 m4/xstrtoumax.m4
cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
config.h: stamp-h1
diff --git a/aclocal.m4 b/aclocal.m4
index cb36cdef7..eb8443be4 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -799,19 +799,6 @@ AC_CONFIG_COMMANDS_PRE(
Usually this means the macro was only invoked conditionally.])
fi])])
-# 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])
-])
-
#serial 4
dnl From Jim Meyering.
@@ -854,7 +841,7 @@ WARNING: You don't seem to have perl5.003 or newer installed, or you lack
] )
])
-#serial 49 -*- autoconf -*-
+#serial 50 -*- autoconf -*-
dnl Misc type-related macros for fileutils, sh-utils, textutils.
@@ -923,7 +910,10 @@ AC_DEFUN([jm_MACROS],
AC_REQUIRE([AC_FUNC_FSEEKO])
AC_REQUIRE([AC_FUNC_VPRINTF])
AC_REQUIRE([AC_FUNC_ALLOCA])
- AC_FUNC_GETLOADAVG([lib])
+
+ AC_CONFIG_LIBOBJ_DIR([lib])
+ AC_FUNC_GETLOADAVG
+
AC_REQUIRE([jm_SYS_PROC_UPTIME])
AC_REQUIRE([jm_FUNC_FTRUNCATE])
AC_REQUIRE([vb_FUNC_RENAME])
@@ -2135,39 +2125,6 @@ AC_DEFUN([jm_FUNC_MBRTOWC],
fi
])
-# 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])
-
#serial 5
dnl A replacement for autoconf's macro by the same name. This version
@@ -2211,94 +2168,6 @@ AC_DEFUN([AC_SEARCH_LIBS],
fi
])
-# 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
-
# Check for stdbool.h that conforms to C99.
# Copyright (C) 2002 Free Software Foundation, Inc.
@@ -3422,115 +3291,6 @@ AC_DEFUN([jm_FUNC_GETGROUPS],
fi
])
-#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
-
#serial 5
AC_PREREQ(2.13)
diff --git a/config.hin b/config.hin
index 7b83c670a..229506471 100644
--- a/config.hin
+++ b/config.hin
@@ -65,7 +65,8 @@
this is either `int' or `gid_t'. */
#undef GETGROUPS_T
-/* Define if the `getloadavg' function needs to be run setuid or setgid. */
+/* Define to 1 if the `getloadavg' function needs to be run setuid or setgid.
+ */
#undef GETLOADAVG_PRIVILEGED
/* Define if gettimeofday clobbers localtime's static buffer. */
diff --git a/src/Makefile.in b/src/Makefile.in
index 37f6b0579..35d2c7696 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -209,10 +209,12 @@ printf_LDADD = $(LDADD) @POW_LIB@ @LIBICONV@
seq_LDADD = $(LDADD) @SEQ_LIBM@
# If necessary, add -lm to resolve the `pow' reference in lib/strtod.c
-# or for the fesetround reference in sleep.c.
-sleep_LDADD = $(LDADD) @FESETROUND_LIBM@ @POW_LIB@ \
- @LIB_CLOCK_GETTIME@ @LIB_NANOSLEEP@
+# or for the fesetround reference in programs using nanosec.c.
+nanosec_libs = \
+ $(LDADD) @FESETROUND_LIBM@ @POW_LIB@ @LIB_CLOCK_GETTIME@ @LIB_NANOSLEEP@
+sleep_LDADD = $(nanosec_libs)
+tail_LDADD = $(nanosec_libs)
uptime_LDADD = $(LDADD) @GETLOADAVG_LIBS@
@@ -621,7 +623,6 @@ tac_DEPENDENCIES = ../lib/libfetish.a ../lib/libfetish.a
tac_LDFLAGS =
tail_SOURCES = tail.c
tail_OBJECTS = tail$U.$(OBJEXT)
-tail_LDADD = $(LDADD)
tail_DEPENDENCIES = ../lib/libfetish.a ../lib/libfetish.a
tail_LDFLAGS =
tee_SOURCES = tee.c
@@ -820,7 +821,7 @@ uninstall-binPROGRAMS:
done
clean-binPROGRAMS:
- -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
+ -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) > /dev/null 2>&1 || /bin/rm -f $(bin_PROGRAMS)
installcheck-binPROGRAMS: $(bin_PROGRAMS)
bad=0; pid=$$$$; list="$(bin_PROGRAMS)"; for p in $$list; do \