summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2014-01-10 10:07:41 -0500
committerAndreas Gruenbacher <agruen@linbit.com>2014-01-13 13:18:39 +0100
commitc8f23c92177c5a82ab3699b1b0d4acbee9afb770 (patch)
tree72b6c7cf7a006babd2177055d8c61d1f6bd15375
parent2d13383b7fbcc04fc16681caa4f43d9d9083cca1 (diff)
downloadacl-c8f23c92177c5a82ab3699b1b0d4acbee9afb770.tar.gz
modernize build system
This deletes the hand rolled build system and replaces it entirely with autotools. The overall diffstat shows that this is a clear win, and it makes the package build/install like every other autotool package out there which makes the lives of distro maintainers a lot easier. This should also be faster by virtue of using a non-recursive build. Things to note: - to generate autotools: ./autogen.sh - to see full compile output: make V=1 - to build specific targets: make attr getfattr ... - to run tests: make check - to create a release: make distcheck -j Other non-developer things: - man pages are no longer compressed as this is uncommon in the autotools world and distros don't need it anyways (they already handle it automatically for most pakages) - the minor # of the shared library is now based on the package version so it'll be much bigger ... this isn't a problem, and is actually a bugfix (older releases didn't change when they should have) (Again, this is all using the standard autotool targets.)
-rw-r--r--.gitignore48
-rw-r--r--Makefile115
-rw-r--r--Makefile.am32
-rwxr-xr-xMakepkgs80
-rw-r--r--VERSION7
-rwxr-xr-xautogen.sh4
-rw-r--r--chacl/Makefile35
-rw-r--r--configure.ac60
-rw-r--r--doc/Makefile42
-rw-r--r--doc/Makemodule.am10
-rw-r--r--doc/TODO2
-rw-r--r--examples/Makefile30
-rw-r--r--examples/Makefile.examples9
-rw-r--r--examples/Makemodule.am7
-rw-r--r--getfacl/Makefile36
-rw-r--r--include/Makefile40
-rw-r--r--include/Makemodule.am10
-rw-r--r--include/builddefs.in94
-rw-r--r--include/buildmacros160
-rw-r--r--include/buildrules104
-rw-r--r--include/config.h.in46
-rwxr-xr-xinclude/install-sh365
-rw-r--r--libacl/Makefile68
-rw-r--r--libacl/Makemodule.am81
-rw-r--r--libmisc/Makefile31
-rw-r--r--libmisc/Makemodule.am8
-rw-r--r--m4/.gitignore3
-rw-r--r--m4/Makefile34
-rw-r--r--m4/manual_format.m431
-rw-r--r--m4/multilib.m443
-rw-r--r--m4/package_globals.m461
-rw-r--r--m4/package_utilies.m495
-rw-r--r--man/Makefile41
-rw-r--r--man/Makemodule.am3
-rw-r--r--man/man1/Makefile35
-rw-r--r--man/man1/Makemodule.am4
-rw-r--r--man/man3/Makefile35
-rw-r--r--man/man3/Makemodule.am40
-rw-r--r--man/man5/Makefile35
-rw-r--r--man/man5/Makemodule.am2
-rw-r--r--package/Makefile60
-rw-r--r--package/tar/Makefile36
-rw-r--r--po/.gitignore12
-rw-r--r--po/LINGUAS3
-rw-r--r--po/Makefile42
-rw-r--r--po/Makevars41
-rwxr-xr-xpo/update-potfiles13
-rw-r--r--setfacl/Makefile36
-rw-r--r--test/.gitignore1
-rw-r--r--test/Makefile50
-rw-r--r--test/Makemodule.am27
-rw-r--r--test/root/getfacl.test4
-rw-r--r--test/root/permissions.test3
-rw-r--r--test/root/restore.test4
-rw-r--r--test/root/setfacl.test4
-rwxr-xr-xtest/run8
-rw-r--r--tools/Makemodule.am23
-rw-r--r--tools/chacl.c (renamed from chacl/chacl.c)0
-rw-r--r--tools/do_set.c (renamed from setfacl/do_set.c)0
-rw-r--r--tools/do_set.h (renamed from setfacl/do_set.h)0
-rw-r--r--tools/getfacl.c (renamed from getfacl/getfacl.c)0
-rw-r--r--tools/parse.c (renamed from setfacl/parse.c)0
-rw-r--r--tools/parse.h (renamed from setfacl/parse.h)0
-rw-r--r--tools/sequence.c (renamed from setfacl/sequence.c)0
-rw-r--r--tools/sequence.h (renamed from setfacl/sequence.h)0
-rw-r--r--tools/setfacl.c (renamed from setfacl/setfacl.c)0
-rw-r--r--tools/user_group.c (renamed from getfacl/user_group.c)0
-rw-r--r--tools/user_group.h (renamed from getfacl/user_group.h)0
68 files changed, 418 insertions, 1935 deletions
diff --git a/.gitignore b/.gitignore
index 71009b9..d907d15 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,36 +1,46 @@
+*~
*.la
*.lo
*.mo
*.o
-*[-.]manifest
+.dirstamp
+.deps/
.libs/
-/.census
+
/Logs/
+
/acl-*
+/chacl
+/getfacl
+/setfacl
+
+/ABOUT-NLS
/aclocal.m4
/autom4te.cache/
-/chacl/chacl
+/ar-lib
+/config.cache
/config.guess
/config.log
+/config.rpath
/config.status
/config.sub
/configure
-/doc/CHANGES.gz
-/getfacl/getfacl
+/compile
+/depcomp
+/install-sh
+/libtool
+/ltmain.sh
+/m4/
+/missing
+/test-driver
+Makefile
+Makefile.in
+stamp-h1
+
+*.log
+*.trs
+
/include/acl
-/include/builddefs
/include/config.h
+/include/config.h.in
/include/sys
-/libtool
-/ltmain.sh
-/po/acl.pot
-/setfacl/setfacl
-acl-*.tar.gz
-install-sh
-m4/libtool.m4
-m4/ltoptions.m4
-m4/ltsugar.m4
-m4/ltversion.m4
-m4/lt~obsolete.m4
-config.h.in
-*~
diff --git a/Makefile b/Makefile
deleted file mode 100644
index 235736e..0000000
--- a/Makefile
+++ /dev/null
@@ -1,115 +0,0 @@
-#
-# Copyright (c) 2000-2006 Silicon Graphics, Inc. All Rights Reserved.
-#
-# 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 of the License, 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
-#
-
-TOPDIR = .
-HAVE_BUILDDEFS = $(shell test -f $(TOPDIR)/include/builddefs && echo yes || echo no)
-
-ifeq ($(HAVE_BUILDDEFS), yes)
-include $(TOPDIR)/include/builddefs
-endif
-
-CONFIGURE = \
- aclocal.m4 \
- configure config.guess config.sub \
- ltmain.sh m4/libtool.m4 m4/ltoptions.m4 m4/ltsugar.m4 \
- m4/ltversion.m4 m4/lt~obsolete.m4
-LSRCFILES = \
- configure.ac Makepkgs install-sh exports README VERSION \
- $(CONFIGURE)
-
-LDIRT = config.log .dep config.status config.cache confdefs.h conftest* \
- Logs/* built .census install.* install-dev.* install-lib.* *.gz
-
-LIB_SUBDIRS = include libmisc libacl
-TOOL_SUBDIRS = getfacl setfacl chacl m4 man doc po test examples package
-
-SUBDIRS = $(LIB_SUBDIRS) $(TOOL_SUBDIRS)
-
-default: include/builddefs include/config.h
-ifeq ($(HAVE_BUILDDEFS), no)
- $(MAKE) -C . $@
-else
- $(MAKE) $(SUBDIRS)
-endif
-
-# tool/lib dependencies
-libacl: libmisc
-getfacl setfacl chacl: libacl
-
-ifeq ($(HAVE_BUILDDEFS), yes)
-include $(BUILDRULES)
-else
-clean: # if configure hasn't run, nothing to clean
-endif
-
-# Recent versions of libtool require the -i option for copying auxiliary
-# files (config.sub, config.guess, install-sh, ltmain.sh), while older
-# versions will copy those files anyway, and don't understand -i.
-LIBTOOLIZE_INSTALL = `libtoolize -n -i >/dev/null 2>/dev/null && echo -i`
-
-configure include/builddefs:
- libtoolize -c $(LIBTOOLIZE_INSTALL) -f
- cp include/install-sh .
- aclocal -I m4
- autoconf
- ./configure \
- --prefix=/ \
- --exec-prefix=/ \
- --sbindir=/bin \
- --bindir=/usr/bin \
- --libdir=/lib \
- --libexecdir=/usr/lib \
- --enable-lib64=yes \
- --includedir=/usr/include \
- --mandir=/usr/share/man \
- --datadir=/usr/share \
- $$LOCAL_CONFIGURE_OPTIONS
- touch .census
-
-include/config.h: include/builddefs
-## Recover from the removal of $@
- @if test -f $@; then :; else \
- rm -f include/builddefs; \
- $(MAKE) $(AM_MAKEFLAGS) include/builddefs; \
- fi
-
-install: default $(addsuffix -install,$(SUBDIRS))
- $(INSTALL) -m 755 -d $(PKG_DOC_DIR)
- $(INSTALL) -m 644 README $(PKG_DOC_DIR)
-
-install-dev: default $(addsuffix -install-dev,$(SUBDIRS))
-
-install-lib: default $(addsuffix -install-lib,$(SUBDIRS))
-
-%-install:
- $(MAKE) -C $* install
-
-%-install-lib:
- $(MAKE) -C $* install-lib
-
-%-install-dev:
- $(MAKE) -C $* install-dev
-
-realclean distclean: clean
- rm -f $(LDIRT) $(CONFIGURE)
- rm -f include/builddefs include/config.h install-sh libtool
- rm -rf autom4te.cache Logs
-
-.PHONY: tests root-tests nfs-tests
-tests root-tests nfs-tests: default
- $(MAKE) -C test/ $@
diff --git a/Makefile.am b/Makefile.am
new file mode 100644
index 0000000..40d6ae5
--- /dev/null
+++ b/Makefile.am
@@ -0,0 +1,32 @@
+ACLOCAL_AMFLAGS = -I m4
+
+EXTRA_DIST = \
+ exports
+
+SUBDIRS = po
+
+AM_CPPFLAGS = \
+ -I$(top_builddir)/include \
+ -I$(top_srcdir)/include \
+ -DLOCALEDIR=\"$(localedir)\"
+
+aclincludedir = $(includedir)/acl
+sysincludedir = $(includedir)/sys
+
+aclinclude_HEADERS =
+sysinclude_HEADERS =
+bin_PROGRAMS =
+lib_LTLIBRARIES =
+noinst_HEADERS =
+noinst_LTLIBRARIES =
+dist_doc_DATA =
+dist_man_MANS =
+
+include doc/Makemodule.am
+include examples/Makemodule.am
+include include/Makemodule.am
+include libacl/Makemodule.am
+include libmisc/Makemodule.am
+include man/Makemodule.am
+include test/Makemodule.am
+include tools/Makemodule.am
diff --git a/Makepkgs b/Makepkgs
deleted file mode 100755
index 52368f4..0000000
--- a/Makepkgs
+++ /dev/null
@@ -1,80 +0,0 @@
-#! /bin/sh
-#
-# Copyright (C) 2001, 2002, 2003 Silicon Graphics, Inc. All rights reserved.
-#
-# 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 of the License, 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, see <http://www.gnu.org/licenses/>.
-#
-LOGDIR=Logs
-
-verbose=false
-
-MAKE=${MAKE:-make}
-test ! -z "$MAKE" && make=$MAKE
-
-for opt in $*
-do
- case "$opt" in
- clean)
- ;; # ignored, kept for backward compatibility
- verbose)
- verbose=true ;;
- *)
- echo "Usage: Makepkgs [verbose]"; exit 1 ;;
- esac
-done
-
-# start with a clean manifest
-test ! -d $LOGDIR && mkdir $LOGDIR
-rm -rf $LOGDIR/* > /dev/null 2>&1
-
-# build Debian packages, cleans itself before starting
-SUDO=${SUDO:-sudo}
-test ! -z "$SUDO" && sudo=$SUDO
-
-# build packages - manual clean before starting
-echo "== clean, log is $LOGDIR/clean"
-if $verbose ; then
- $MAKE clean 2>&1 | tee $LOGDIR/clean
-else
- $MAKE clean > $LOGDIR/clean 2>&1 || exit 1
-fi
-
-echo
-echo "== configure, log is $LOGDIR/configure"
-rm -f .census # force configure to run here
-if $verbose ; then
- $MAKE configure 2>&1 | tee $LOGDIR/configure
-else
- $MAKE configure > $LOGDIR/configure 2>&1 || exit 1
-fi
-
-echo
-echo "== default, log is $LOGDIR/default"
-if $verbose ; then
- $MAKE default 2>&1 | tee $LOGDIR/default
-else
- $MAKE default > $LOGDIR/default 2>&1 || exit 1
-fi
-
-echo
-echo "== dist, log is $LOGDIR/dist"
-[ ! -f .census ] && touch .census
-if $verbose ; then
- $MAKE -C package dist 2>&1 | tee $LOGDIR/dist
-else
- $MAKE -C package dist > $LOGDIR/dist 2>&1 || exit 1
- grep '^Wrote:' $LOGDIR/dist | sed -e 's/\.\.\/\.\.\///'
-fi
-
-exit 0
diff --git a/VERSION b/VERSION
deleted file mode 100644
index 245aaf4..0000000
--- a/VERSION
+++ /dev/null
@@ -1,7 +0,0 @@
-#
-# This file is used by configure to get version information
-#
-PKG_MAJOR=2
-PKG_MINOR=2
-PKG_REVISION=52
-PKG_BUILD=1
diff --git a/autogen.sh b/autogen.sh
new file mode 100755
index 0000000..a98a3c5
--- /dev/null
+++ b/autogen.sh
@@ -0,0 +1,4 @@
+#!/bin/sh -ex
+po/update-potfiles
+autopoint --force
+exec autoreconf -f -i
diff --git a/chacl/Makefile b/chacl/Makefile
deleted file mode 100644
index 33858d6..0000000
--- a/chacl/Makefile
+++ /dev/null
@@ -1,35 +0,0 @@
-#
-# Copyright (c) 2000-2002 Silicon Graphics, Inc. All Rights Reserved.
-#
-# 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 of the License, 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
-#
-
-TOPDIR = ..
-include $(TOPDIR)/include/builddefs
-
-LTCOMMAND = chacl
-CFILES = chacl.c
-
-LLDLIBS = $(LIBACL) $(LIBATTR)
-LTDEPENDENCIES = $(LIBACL)
-
-default: $(LTCOMMAND)
-
-include $(BUILDRULES)
-
-install: default
- $(INSTALL) -m 755 -d $(PKG_BIN_DIR)
- $(LTINSTALL) -m 755 $(LTCOMMAND) $(PKG_BIN_DIR)
-install-dev install-lib:
diff --git a/configure.ac b/configure.ac
index 7af2e8d..1ca2a3c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -13,37 +13,53 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
-AC_INIT(include/acl.h)
+
+AC_INIT([acl], [2.2.53], [acl-devel@nongnu.org])
AC_CONFIG_AUX_DIR([.])
AC_CONFIG_MACRO_DIR([m4])
-AC_CONFIG_HEADER(include/config.h)
+AC_CONFIG_HEADER([include/config.h])
AC_PREFIX_DEFAULT(/usr)
-AC_PROG_LIBTOOL
+AM_INIT_AUTOMAKE([-Wall foreign 1.11 dist-xz subdir-objects])
+AM_SILENT_RULES([yes])
+
+AC_PROG_CC
+AM_PROG_CC_C_O
+AC_USE_SYSTEM_EXTENSIONS
+AC_FUNC_GCC_VISIBILITY
+
+AM_PROG_AR
+LT_INIT
-AC_ARG_ENABLE(shared,
-[ --enable-shared=[yes/no] Enable use of shared libraries [default=yes]],,
- enable_shared=yes)
-AC_SUBST(enable_shared)
+AM_GNU_GETTEXT_VERSION([0.18.2])
+AM_GNU_GETTEXT([external])
-AC_ARG_ENABLE(gettext,
-[ --enable-gettext=[yes/no] Enable alternate language support [default=yes]],,
- enable_gettext=yes)
-AC_SUBST(enable_gettext)
+AC_ARG_ENABLE([debug],
+ [AS_HELP_STRING([--enable-debug], [Enable extra debugging])])
+AS_IF([test "x$enable_debug" = "xyes"],
+ [CPPFLAGS="$CPPFLAGS -DDEBUG"],
+ [CPPFLAGS="$CPPFLAGS -DNDEBUG"])
-AC_ARG_ENABLE(lib64,
-[ --enable-lib64=[yes/no] Enable lib64 support [default=no]],,
- enable_lib64=no)
-AC_SUBST(enable_lib64)
+dnl Automatically increment the revision for every release.
+LT_REVISION=$(echo "${PACKAGE_VERSION}" | tr -d .)
+AC_SUBST(LT_REVISION)
-AC_PACKAGE_GLOBALS(acl)
-AC_PACKAGE_UTILITIES(acl)
AC_PACKAGE_NEED_ATTR_XATTR_H
AC_PACKAGE_NEED_ATTR_ERROR_H
-AC_MULTILIB($enable_lib64)
AC_PACKAGE_NEED_GETXATTR_LIBATTR
-AC_MANUAL_FORMAT
-
-AC_FUNC_GCC_VISIBILITY
-AC_OUTPUT(include/builddefs)
+AC_CONFIG_COMMANDS([include/acl],
+ [dnl
+ rm -rf include/acl
+ $as_ln_s "$ac_abs_top_srcdir/include" include/acl
+ ])
+AC_CONFIG_COMMANDS([include/sys],
+ [dnl
+ rm -rf include/sys
+ $as_ln_s "$ac_abs_top_srcdir/include" include/sys
+ ])
+AC_CONFIG_FILES([
+ Makefile
+ po/Makefile.in
+])
+AC_OUTPUT
diff --git a/doc/Makefile b/doc/Makefile
deleted file mode 100644
index a08e403..0000000
--- a/doc/Makefile
+++ /dev/null
@@ -1,42 +0,0 @@
-#
-# Copyright (c) 2000-2002 Silicon Graphics, Inc. All Rights Reserved.
-#
-# 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 of the License, 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
-#
-
-TOPDIR = ..
-include $(TOPDIR)/include/builddefs
-
-LSRCFILES = extensions.txt libacl.txt TODO PORTING CHANGES COPYING COPYING.LGPL INSTALL \
- old-acl.5
-LDIRT = *.gz
-
-default: CHANGES.gz
-
-include $(BUILDRULES)
-
-CHANGES.gz:
- $(ZIP) --best -c < CHANGES > $@
-
-install: default
- $(INSTALL) -m 755 -d $(PKG_DOC_DIR)
- $(INSTALL) -m 644 PORTING CHANGES.gz $(PKG_DOC_DIR)
-ifeq ($(PKG_DISTRIBUTION), debian)
- $(INSTALL) -S CHANGES.gz $(PKG_DOC_DIR)/changelog.gz
-else
- $(INSTALL) -m 644 COPYING COPYING.LGPL $(PKG_DOC_DIR)
-endif
-
-install-dev install-lib:
diff --git a/doc/Makemodule.am b/doc/Makemodule.am
new file mode 100644
index 0000000..1b9c165
--- /dev/null
+++ b/doc/Makemodule.am
@@ -0,0 +1,10 @@
+dist_doc_DATA += \
+ doc/extensions.txt \
+ doc/CHANGES \
+ doc/COPYING \
+ doc/COPYING.LGPL \
+ doc/libacl.txt \
+ doc/PORTING
+
+EXTRA_DIST += \
+ doc/TODO
diff --git a/doc/TODO b/doc/TODO
index 9c23d69..b376a65 100644
--- a/doc/TODO
+++ b/doc/TODO
@@ -1,4 +1,2 @@
-- include po (gettext stuff) in packages and build process
-- fix build process
- check documentation
- add manual pages for POSIX functions
diff --git a/examples/Makefile b/examples/Makefile
index c6aa124..74642ca 100644
--- a/examples/Makefile
+++ b/examples/Makefile
@@ -1,27 +1,9 @@
-#
-# Copyright (c) 2001-2002 Silicon Graphics, Inc. All Rights Reserved.
-#
-# 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 of the License, 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
-#
+CFLAGS = -g -Wall -I../include
+LDFLAGS = -lacl
-TOPDIR = ..
-include $(TOPDIR)/include/builddefs
+PROGS = get-acl copy-acl set-acl copyperm
-LSRCFILES = README Makefile.examples get-acl.c set-acl.c copy-acl.c copyperm.c
-LDIRT = get-acl set-acl copy-acl
+all: $(PROGS)
-include $(BUILDRULES)
-
-default install install-dev install-lib:
+clean:
+ rm -f $(PROGS)
diff --git a/examples/Makefile.examples b/examples/Makefile.examples
deleted file mode 100644
index b33c2a5..0000000
--- a/examples/Makefile.examples
+++ /dev/null
@@ -1,9 +0,0 @@
-CFLAGS = -g -Wall
-LDFLAGS = -lacl
-
-PROGS = get-acl copy-acl set-acl copyperm
-
-all: $(PROGS)
-
-clean:
- rm -f $(PROGS)
diff --git a/examples/Makemodule.am b/examples/Makemodule.am
new file mode 100644
index 0000000..e18991a
--- /dev/null
+++ b/examples/Makemodule.am
@@ -0,0 +1,7 @@
+EXTRA_DIST += \
+ examples/copy-acl.c \
+ examples/copyperm.c \
+ examples/get-acl.c \
+ examples/Makefile \
+ examples/README \
+ examples/set-acl.c
diff --git a/getfacl/Makefile b/getfacl/Makefile
deleted file mode 100644
index 7fbafda..0000000
--- a/getfacl/Makefile
+++ /dev/null
@@ -1,36 +0,0 @@
-#
-# Copyright (c) 2000, 2002 Silicon Graphics, Inc. All Rights Reserved.
-#
-# 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 of the License, 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
-#
-
-TOPDIR = ..
-include $(TOPDIR)/include/builddefs
-
-LTCOMMAND = getfacl
-CFILES = getfacl.c user_group.c
-HFILES = user_group.h
-
-LLDLIBS = $(LIBMISC) $(LIBACL) $(LIBATTR)
-LTDEPENDENCIES = $(LIBMISC) $(LIBACL)
-
-default: $(LTCOMMAND)
-
-include $(BUILDRULES)
-
-install: default
- $(INSTALL) -m 755 -d $(PKG_BIN_DIR)
- $(LTINSTALL) -m 755 $(LTCOMMAND) $(PKG_BIN_DIR)
-install-dev install-lib:
diff --git a/include/Makefile b/include/Makefile
deleted file mode 100644
index 328a61d..0000000
--- a/include/Makefile
+++ /dev/null
@@ -1,40 +0,0 @@
-#
-# Copyright (c) 2001-2002 Silicon Graphics, Inc. All Rights Reserved.
-#
-# 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 of the License, 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
-#
-
-TOPDIR = ..
-include $(TOPDIR)/include/builddefs
-
-HFILES = acl.h libacl.h acl_ea.h misc.h walk_tree.h
-LSRCFILES = builddefs.in buildmacros buildrules config.h.in install-sh
-LDIRT = sys acl
-
-default: sys acl
-
-sys acl:
- $(LN_S) . $@
-
-include $(BUILDRULES)
-
-install-dev: default
- $(INSTALL) -m 755 -d $(PKG_INC_DIR)
- $(INSTALL) -m 755 -d $(PKG_INC_DIR)/sys
- $(INSTALL) -m 644 acl.h $(PKG_INC_DIR)/sys/acl.h
- $(INSTALL) -m 755 -d $(PKG_INC_DIR)/acl
- $(INSTALL) -m 644 libacl.h $(PKG_INC_DIR)/acl/libacl.h
-
-install install-lib:
diff --git a/include/Makemodule.am b/include/Makemodule.am
new file mode 100644
index 0000000..2596f5e
--- /dev/null
+++ b/include/Makemodule.am
@@ -0,0 +1,10 @@
+aclinclude_HEADERS += \
+ include/libacl.h
+
+sysinclude_HEADERS += \
+ include/acl.h
+
+noinst_HEADERS += \
+ include/acl_ea.h \
+ include/misc.h \
+ include/walk_tree.h
diff --git a/include/builddefs.in b/include/builddefs.in
deleted file mode 100644
index 9ed15b4..0000000
--- a/include/builddefs.in
+++ /dev/null
@@ -1,94 +0,0 @@
-#
-# Copyright (c) 2002-2006 Silicon Graphics, Inc. All Rights Reserved.
-#
-# @configure_input@
-#
-
-ifndef _BUILDDEFS_INCLUDED_
-_BUILDDEFS_INCLUDED_ = 1
-
-DEBUG = @debug_build@
-OPTIMIZER = @opt_build@
-MALLOCLIB = @malloc_lib@
-LOADERFLAGS = @LDFLAGS@
-
-LIBACL = $(TOPDIR)/libacl/libacl.la
-LIBATTR = @libattr@
-LIBMISC = $(TOPDIR)/libmisc/libmisc.la
-
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-top_builddir = @top_builddir@
-datarootdir = @datarootdir@
-
-PKG_NAME = @pkg_name@
-PKG_USER = @pkg_user@
-PKG_GROUP = @pkg_group@
-PKG_RELEASE = @pkg_release@
-PKG_VERSION = @pkg_version@
-PKG_PLATFORM = @pkg_platform@
-PKG_DISTRIBUTION= @pkg_distribution@
-PKG_BIN_DIR = @bindir@
-PKG_SBIN_DIR = @sbindir@
-PKG_LIB_DIR = @libdir@@libdirsuffix@
-PKG_DEVLIB_DIR = @libdir@@libdirsuffix@
-PKG_INC_DIR = @includedir@
-PKG_MAN_DIR = @mandir@
-PKG_DOC_DIR = @datadir@/doc/@pkg_name@
-PKG_LOCALE_DIR = @datadir@/locale
-
-CC = @cc@
-AWK = @awk@
-SED = @sed@
-TAR = @tar@
-ZIP = @zip@
-MAKE = @make@
-ECHO = @echo@
-SORT = @sort@
-LN_S = @LN_S@
-SHELL = @SHELL@
-LIBTOOL = @LIBTOOL@
-MAKEDEPEND = @makedepend@
-
-MSGFMT = @msgfmt@
-MSGMERGE = @msgmerge@
-XGETTEXT = @xgettext@
-
-ENABLE_SHARED = @enable_shared@
-ENABLE_GETTEXT = @enable_gettext@
-
-HAVE_ZIPPED_MANPAGES = @have_zipped_manpages@
-
-ifneq "$(findstring $(PKG_PLATFORM), linux gnu gnu/kfreebsd gnu/knetbsd)" ""
-PCFLAGS = -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64
-endif
-
-ifeq ($(PKG_PLATFORM),linux)
-DEPENDFLAGS = -D__linux__
-endif
-ifeq ($(PKG_PLATFORM),darwin)
-DEPENDFLAGS = -D__APPLE__
-endif
-ifeq ($(PKG_PLATFORM),irix)
-DEPENDFLAGS = -D__sgi__
-endif
-ifeq ($(PKG_PLATFORM),freebsd)
-DEPENDFLAGS = -D__FreeBSD__
-endif
-
-GCFLAGS = $(OPTIMIZER) $(DEBUG) -funsigned-char -fno-strict-aliasing -Wall \
- -DVERSION=\"$(PKG_VERSION)\" -DLOCALEDIR=\"$(PKG_LOCALE_DIR)\" \
- -DPACKAGE=\"$(PKG_NAME)\" -I$(TOPDIR)/include
-
-# Global, Platform, Local CFLAGS
-CFLAGS += $(GCFLAGS) $(PCFLAGS) $(LCFLAGS)
-
-include $(TOPDIR)/include/buildmacros
-
-endif
-
-#
-# For targets that should always be rebuilt,
-# define a target that is never up-to-date.
-# Targets needing this should depend on $(_FORCE)
-_FORCE = __force_build
diff --git a/include/buildmacros b/include/buildmacros
deleted file mode 100644
index 9e81bb8..0000000
--- a/include/buildmacros
+++ /dev/null
@@ -1,160 +0,0 @@
-#
-# Copyright (c) 2002-2003 Silicon Graphics, Inc. All Rights Reserved.
-#
-# 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 of the License, 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, see <http://www.gnu.org/licenses/>.
-#
-
-BUILDRULES = $(TOPDIR)/include/buildrules
-
-# LCFLAGS, LLDFLAGS, LLDLIBS, LSRCFILES and LDIRT may be specified in
-# user Makefiles. Note: LSRCFILES is anything other than Makefile, $(CFILES)
-# $(CXXFILES), or $(HFILES) and is used to construct the manifest list
-# during the "dist" phase (packaging).
-
-LDFLAGS += $(LOADERFLAGS) $(LLDFLAGS)
-LTLDFLAGS += $(LOADERFLAGS)
-LDLIBS = $(LLDLIBS) $(PLDLIBS) $(MALLOCLIB)
-
-MAKEOPTS = --no-print-directory
-SRCFILES = Makefile $(HFILES) $(CFILES) $(LSRCFILES) $(LFILES) $(YFILES)
-
-DEPDIRT = dep dep.bak
-MANDIRT = *.[1-9].gz
-PODIRT = *.tmpo *.mo
-CDIRT = $(OBJECTS) $(LTOBJECTS) $(LTCOMMAND) $(LTLIBRARY)
-DIRT = $(LDIRT) $(DEPDIRT) $(MANDIRT) $(PODIRT) $(CDIRT)
-
-OBJECTS = $(ASFILES:.s=.o) \
- $(CFILES:.c=.o) \
- $(LFILES:.l=.o) \
- $(YFILES:%.y=%.tab.o)
-
-INSTALL = $(TOPDIR)/include/install-sh -o $(PKG_USER) -g $(PKG_GROUP)
-
-IMAGES_DIR = $(TOPDIR)/all-images
-DIST_DIR = $(TOPDIR)/dist
-
-CCF = $(CC) $(CFLAGS) $(CPPFLAGS)
-MAKEF = $(MAKE) $(MAKEOPTS)
-CXXF = $(CXX) $(CXXFLAGS)
-
-# For libtool.
-LIBNAME = $(basename $(LTLIBRARY))
-LTOBJECTS = $(OBJECTS:.o=.lo)
-LTVERSION = $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
-
-LTLINK = $(LIBTOOL) --mode=link $(CC)
-LTEXEC = $(LIBTOOL) --mode=execute
-LTINSTALL = $(LIBTOOL) --mode=install $(INSTALL)
-LTCOMPILE = $(LIBTOOL) --mode=compile $(CCF)
-
-ifeq ($(ENABLE_SHARED),yes)
-LTLDFLAGS += -rpath $(PKG_LIB_DIR)
-LTLDFLAGS += -version-info $(LTVERSION)
-endif
-
-ifeq ($(ENABLE_SHARED),yes)
-INSTALL_LTLIB = \
- cd $(TOPDIR)/$(LIBNAME)/.libs; \
- ../$(INSTALL) -m 755 -d $(PKG_LIB_DIR); \
- ../$(INSTALL) -m 644 -T so_dot_version $(LIBNAME).lai $(PKG_LIB_DIR); \
- ../$(INSTALL) -T so_dot_current $(LIBNAME).lai $(PKG_LIB_DIR)
-endif
-
-# Libtool thinks the static and shared libs should be in the same dir, so
-# make the static lib appear in the place we chose as rpath (using the two
-# symlinks below).
-# Other things want the shared libs to appear in /usr/lib, else they'll
-# link with the static libs there. So, another symlink to get the .so into
-# /usr/lib.
-ifeq ($(ENABLE_SHARED),yes)
-INSTALL_LTLIB_DEV = \
- cd $(TOPDIR)/$(LIBNAME)/.libs; \
- ../$(INSTALL) -m 755 -d $(PKG_DEVLIB_DIR); \
- ../$(INSTALL) -m 644 -T old_lib $(LIBNAME).lai $(PKG_DEVLIB_DIR); \
- ../$(INSTALL) -m 644 $(LIBNAME).lai $(PKG_DEVLIB_DIR)/$(LIBNAME).la ; \
- ../$(INSTALL) -m 755 -d $(PKG_LIB_DIR); \
- ../$(INSTALL) -T so_base $(LIBNAME).lai $(PKG_LIB_DIR); \
- if test "x$(PKG_DEVLIB_DIR)" != "x$(PKG_LIB_DIR)" ; then \
- ../$(INSTALL) -S $(PKG_DEVLIB_DIR)/$(LIBNAME).a $(PKG_LIB_DIR)/$(LIBNAME).a; \
- ../$(INSTALL) -S $(PKG_DEVLIB_DIR)/$(LIBNAME).la $(PKG_LIB_DIR)/$(LIBNAME).la; \
- ../$(INSTALL) -S $(PKG_LIB_DIR)/$(LIBNAME).so $(PKG_DEVLIB_DIR)/$(LIBNAME).so; \
- fi
-else
-INSTALL_LTLIB_DEV = $(INSTALL_LTLIB_STATIC)
-endif
-
-INSTALL_LTLIB_STATIC = \
- cd $(TOPDIR)/$(LIBNAME)/.libs; \
- ../$(INSTALL) -m 755 -d $(PKG_DEVLIB_DIR);
-
-INSTALL_MAN = \
- @for d in $(MAN_PAGES); do \
- first=true; \
- for m in `$(AWK) \
- '/^\.S[h|H] NAME/ {ok=1; next} ok {print; exit}' $$d \
- | $(SED) \
- -e 's/^\.Nm //' -e 's/,/ /g' -e 's/\\-.*//' \
- -e 's/\\\f[0-9]//g' -e 's/ / /g;q'`; \
- do \
- [ -z "$$m" -o "$$m" = "\\" ] && continue; \
- t=$(MAN_DEST)/$$m.$(MAN_SECTION); \
- if $$first; then \
- if $(HAVE_ZIPPED_MANPAGES); then \
- $(ZIP) -9 -c $$d > $$d.gz; _sfx=.gz; \
- fi; \
- u=$$m.$(MAN_SECTION)$$_sfx; \
- echo $(INSTALL) -m 644 $${d}$$_sfx $${t}$$_sfx;\
- $(INSTALL) -m 644 $${d}$$_sfx $${t}$$_sfx; \
- else \
- echo $(INSTALL) -S $$u $${t}$$_sfx; \
- $(INSTALL) -S $$u $${t}$$_sfx; \
- fi; \
- first=false; \
- done; \
- done
-
-ifeq ($(ENABLE_GETTEXT),yes)
-INSTALL_LINGUAS = \
- @for l in $(LINGUAS) ""; do \
- if test -f "$$l.mo" ; then \
- ldir=$(PKG_LOCALE_DIR)/$$l/LC_MESSAGES; \
- $(INSTALL) -m 755 -d $$ldir; \
- $(INSTALL) -m 644 $$l.mo $$ldir/$(PKG_NAME).mo; \
- fi; \
- done
-endif
-
-MAN_MAKERULE = \
- @for f in *.[12345678] ""; do \
- if test ! -z "$$f"; then \
- $(ZIP) --best -c < $$f > $$f.gz; \
- fi; \
- done
-
-DIST_MAKERULE = \
- $(MAKEF) -C build dist
-
-SOURCE_MAKERULE = \
- @test -z "$$DIR" && DIR="."; \
- for f in $(SRCFILES) ""; do \
- test -z "$$f" && break; \
- test -L "$$f" || $(ECHO) $$DIR/$$f; \
- done; \
- for d in `echo $(SUBDIRS)` ""; do \
- test -z "$$d" && break; \
- if test -d "$$d"; then \
- $(MAKEF) DIR=$$DIR/$$d -C $$d $@ || exit $$?; \
- fi; \
- done
diff --git a/include/buildrules b/include/buildrules
deleted file mode 100644
index 159d70c..0000000
--- a/include/buildrules
+++ /dev/null
@@ -1,104 +0,0 @@
-#
-# Copyright (c) 1999, 2001-2003 Silicon Graphics, Inc. All Rights Reserved.
-#
-# 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 of the License, 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, see <http://www.gnu.org/licenses/>.
-#
-ifndef _BUILDRULES_INCLUDED_
-_BUILDRULES_INCLUDED_ = 1
-
-include $(TOPDIR)/include/builddefs
-
-clean clobber : $(addsuffix -clean,$(SUBDIRS))
- rm -f $(DIRT)
- @rm -fr .libs
-
-%-clean:
- $(MAKE) -C $* clean
-
-# Never blow away subdirs
-ifdef SUBDIRS
-.PRECIOUS: $(SUBDIRS)
-.PHONY: $(SUBDIRS)
-
-$(SUBDIRS):
- $(MAKE) -C $@
-endif
-
-#
-# Standard targets
-#
-
-ifdef LTCOMMAND
-$(LTCOMMAND) : $(SUBDIRS) $(OBJECTS) $(LTDEPENDENCIES)
- $(LTLINK) -o $@ $(LDFLAGS) $(OBJECTS) $(LDLIBS)
-endif
-
-ifdef LTLIBRARY
-$(LTLIBRARY) : $(SUBDIRS) $(LTOBJECTS)
- $(LTLINK) $(LTLDFLAGS) -o $(LTLIBRARY) $(LTOBJECTS) $(LTLIBS)
-
-%.lo: %.c
- $(LTCOMPILE) -c $<
-endif
-
-ifdef POTHEAD
-%.pot: $(XGETTEXTFILES)
- $(XGETTEXT) --language=C --keyword=_ -o $@ $(XGETTEXTFILES)
-
-# Generate temp .po files, to check whether translations need updating.
-# Not by default, due to gettext output differences between versions.
-%.po: $(POTHEAD)
-# $(MSGMERGE) -o $@.tmpo $@ $(POTHEAD)
-# if ! diff $@.tmpo $@ >/dev/null; then echo "$@ dated, see $@.tmpo"; fi
-
-%.mo: %.po
- $(MSGFMT) -o $@ $<
-endif
-
-source :
- $(SOURCE_MAKERULE)
-
-endif # _BUILDRULES_INCLUDED_
-
-$(_FORCE):
-
-.PHONY : depend
-
-DEPENDSCRIPT := $(MAKEDEPEND) $(DEPENDFLAGS) -f - -- $(CFLAGS) -- $(CFILES) | \
- $(SED) -e 's,`pwd`,$(TOPDIR),g' \
- -e 's, */[^ ]*,,g' \
- -e '/^[^ ]*: *$$/d' \
- -e '/^ *$$/d'
-
-ifdef LTLIBRARY
-DEPENDSCRIPT := $(DEPENDSCRIPT) | $(SED) -e 's,^\([^:]*\)\.o,\1.lo,'
-endif
-
-depend : $(CFILES) $(HFILES) $(addsuffix -depend,$(SUBDIRS))
- $(DEPENDSCRIPT) > .dep
- test -s .dep || rm -f .dep
-
-%-depend:
- $(MAKE) -C $* depend
-
-# Include dep, but only if it exists
-ifeq ($(shell test -f .dep && echo .dep), .dep)
-include .dep
-else
-ifdef LTLIBRARY
-$(LTOBJECTS): $(HFILES)
-else
-$(OBJECTS): $(HFILES)
-endif
-endif
diff --git a/include/config.h.in b/include/config.h.in
deleted file mode 100644
index 6a720ac..0000000
--- a/include/config.h.in
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright (c) 2002 Silicon Graphics, Inc. All Rights Reserved.
- *
- * 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 of the License, 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, see <http://www.gnu.org/licenses/>.
- *
- * @configure_input@
- */
-
-/* Define if you have the attr/error_context.h header */
-#undef HAVE_ATTR_ERROR_CONTEXT_H
-
-/* Define if you want Posix compliant getfacl and setfacl utilities
- without extensions */
-#undef POSIXLY_CORRECT
-
-/* The number of bytes in a int. */
-#undef SIZEOF_INT
-
-/* The number of bytes in a long. */
-#undef SIZEOF_LONG
-
-/* The number of bytes in a short. */
-#undef SIZEOF_SHORT
-
-/* Define if you have attribute((visibility(hidden))) in gcc. */
-#undef HAVE_VISIBILITY_ATTRIBUTE
-
-/* Define if you want gettext (I18N) support */
-#undef ENABLE_GETTEXT
-
-/* On GNU/kFreeBSD, ENODATA is not defined in the system headers */
-#include <errno.h>
-#ifndef ENODATA
-# define ENODATA ENOATTR
-#endif
diff --git a/include/install-sh b/include/install-sh
deleted file mode 100755
index 3c9d49b..0000000
--- a/include/install-sh
+++ /dev/null
@@ -1,365 +0,0 @@
-#! /bin/sh
-#
-# Copyright (c) 2000-2001 Silicon Graphics, Inc. All Rights Reserved.
-#
-# 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 of the License, 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
-#
-# This script emulates bsd install and also recognises
-# two environment variables, with the following semantics :-
-#
-# $DIST_MANIFEST - if set, the name of the file to append manifest
-# information in the following format:
-# File : f mode owner group src target
-# Directory: d mode owner group target
-# Symlink : l linkval target
-#
-# $DIST_ROOT - if set, prepend to target
-#
-# The sematics of all combinations of these two variables
-# are as follows:
-#
-# $DIST_MANIFEST? $DIST_ROOT? | Copy? Append Manifest?
-# -----------------------------+--------------------------
-# not set not set | yes no
-# not set set | yes no
-# set not set | no yes
-# set set | yes yes
-#
-_usage() {
- echo "Usage: $prog [-o owner] [-g group] [-m mode] -d directory"
- echo "or $prog [-D] [-o owner] [-g group] [-m mode] file directory/file"
- echo "or $prog [-o owner] [-g group] [-m mode] file [file ...] directory"
- echo "or $prog -S file target (creates \"target\" symlink)"
- echo "or $prog -T lt_arg [-o owner] [-g group] [-m mode] libtool.lai directory"
- echo ""
- echo "The \$DIST_MANIFEST and \$DIST_ROOT environment variables affect the"
- echo "behaviour of this command - see comments in the script."
- echo "The -D flag is only available for the second usage, and causes"
- echo "the target directory to be created before installing the file."
- echo ""
- exit 1
-}
-
-_chown ()
-{
- _st=255
- if [ $# -eq 3 ] ; then
- chown $1:$2 $3
- _st=$?
- if [ $_st -ne 0 ] ; then
- if [ $REAL_UID != '0' ] ; then
- if [ ! -f $DIST_ROOT/.chown.quiet ] ; then
- echo '==============================================='
- echo Ownership of files under ${DIST_ROOT:-/}
- echo cannot be changed
- echo '==============================================='
- if [ -n "$DIST_ROOT" ] ; then
- touch $DIST_ROOT/.chown.quiet
- fi
- fi
- _st=0
- fi
- fi
- fi
-
- return $_st
-}
-
-
-_manifest ()
-{
- echo $* | sed -e 's/\/\//\//g' >>${DIST_MANIFEST:-/dev/null}
-}
-
-prog=`basename $0`
-HERE=`pwd`
-dflag=false
-Dflag=false
-Sflag=false
-Tflag=false
-DIRMODE=755
-FILEMODE=644
-OWNER=`id -u`
-GROUP=`id -g`
-REAL_UID=$OWNER
-
-# default is to install and don't append manifest
-INSTALL=true
-MANIFEST=:
-
-: ${DIST_ROOT:=${DESTDIR}}
-
-[ -n "$DIST_MANIFEST" -a -z "$DIST_ROOT" ] && INSTALL=false
-[ -n "$DIST_MANIFEST" ] && MANIFEST="_manifest"
-
-[ $# -eq 0 ] && _usage
-
-if $INSTALL
-then
- CP=cp; LN=ln; MKDIR=mkdir; CHMOD=chmod; CHOWN=_chown
-else
- CP=true; LN=true; MKDIR=true; CHMOD=true; CHOWN=true
-fi
-
-[ -n "$DIST_ROOT" -a $REAL_UID -ne 0 ] && CHOWN=true
-
-while getopts "Dcm:d:S:o:g:T:" c $*
-do
- case $c in
- c)
- ;;
- g)
- GROUP=$OPTARG
- ;;
- o)
- OWNER=$OPTARG
- ;;
- m)
- DIRMODE=`expr $OPTARG`
- FILEMODE=$DIRMODE
- ;;
- D)
- Dflag=true
- ;;
- S)
- symlink=$OPTARG
- Sflag=true
- ;;
- d)
- dir=$DIST_ROOT/$OPTARG
- dflag=true
- ;;
- T)
- lt_install=$OPTARG
- Tflag=true
- ;;
- *)
- _usage
- ;;
- esac
-done
-
-shift `expr $OPTIND - 1`
-
-status=0
-if $dflag
-then
- #
- # first usage
- #
- $MKDIR -p $dir
- status=$?
- if [ $status -eq 0 ]
- then
- $CHMOD $DIRMODE $dir
- status=$?
- fi
- if [ $status -eq 0 ]
- then
- $CHOWN $OWNER $GROUP $dir
- status=$?
- fi
- $MANIFEST d $DIRMODE $OWNER $GROUP ${dir#$DIST_ROOT}
-elif $Sflag
-then
- #
- # fourth usage (symlink)
- #
- if [ $# -ne 1 ]
- then
- _usage
- else
- target=$DIST_ROOT/$1
- fi
- $LN -s -f $symlink $target
- status=$?
- $MANIFEST l $symlink ${target#$DIST_ROOT}
-elif $Tflag
-then
- #
- # -T (install libs built by libtool)
- #
- if [ $# -ne 2 ]
- then
- _usage
- else
- libtool_lai=$1
- # source the libtool variables
- if [ ! -f $libtool_lai ]
- then
- echo "$prog: Unable to find libtool library file $libtool_lai"
- exit 2
- fi
- . ./$libtool_lai
- target=$DIST_ROOT/$2
- fi
- case $lt_install in
- so_dot_version)
- # Loop until we find libfoo.so.x.y.z, then break out.
- for solib in $library_names
- do
- # does it have enough parts? libfoo.so.x.y.z == 5
- cnt=`echo "$solib" | sed -e 's/\./ /g' | wc -w`
- if [ $cnt -eq 5 ]
- then
- install_name=$target/$solib
- $CP $solib $install_name
- status=$?
- $MANIFEST f $FILEMODE $OWNER $GROUP $HERE/$solib ${install_name#$DIST_ROOT}
- break
- fi
- done
- ;;
-
- so_*)
- case $lt_install in
- so_dot_current)
- # ln -s libfoo.so.x.y.z to libfoo.so.x
- from_parts=5 # libfoo.so.x.y.z
- to_parts=3 # libfoo.so.x
- ;;
- so_base)
- # ln -s libfoo.so.x to libfoo.so
- from_parts=3 # libfoo.so.x
- to_parts=2 # libfoo.so
- ;;
- *)
- echo "$prog: -T $lt_install invalid"
- exit 2
- ;;
- esac
-
- # Loop until we find the names, then break out.
- for solib in $library_names
- do
- # does it have enough parts?
- cnt=`echo "$solib" | sed -e 's/\./ /g' | wc -w`
- if [ $cnt -eq $from_parts ]
- then
- from_name=$solib
- elif [ $cnt -eq $to_parts ]
- then
- to_name=$solib
- fi
-
- if [ -n "$from_name" ] && [ -n "$to_name" ]
- then
- install_name=$target/$to_name
- $LN -s -f $from_name $install_name
- status=$?
- $MANIFEST l $from_name ${install_name#$DIST_ROOT}
- break
- fi
- done
- ;;
- old_lib)
- install_name=$target/$old_library
- $CP $old_library $install_name
- status=$?
- $MANIFEST f $FILEMODE $OWNER $GROUP $HERE/$old_library ${install_name#$DIST_ROOT}
- ;;
- *)
- echo "$prog: -T $lt_install invalid"
- exit 2
- ;;
- esac
-
- case $lt_install in
- old_lib|so_dot_version)
- if [ $status -eq 0 ]
- then
- $CHMOD $FILEMODE $install_name
- $CHOWN $OWNER $GROUP $install_name
- fi
- ;;
- esac
-
-else
- list=""
- dir=""
- if [ $# -eq 2 ]
- then
- #
- # second usage
- #
- f=$1
- dir=$DIST_ROOT/$2
- if $Dflag
- then
- mkdir -p `dirname $dir`
- fi
- $CP $f $dir
- status=$?
- if [ $status -eq 0 ]
- then
- if [ -f $dir/$f ]
- then
- $CHMOD $FILEMODE $dir/$f
- status=$?
- if [ $status -eq 0 ]
- then
- $CHOWN $OWNER $GROUP $dir/$f
- status=$?
- fi
- $MANIFEST f $FILEMODE $OWNER $GROUP $HERE/$f ${dir#$DIST_ROOT}/$f
- else
- $CHMOD $FILEMODE $dir
- status=$?
- if [ $status -eq 0 ]
- then
- $CHOWN $OWNER $GROUP $dir
- status=$?
- fi
- $MANIFEST f $FILEMODE $OWNER $GROUP $HERE/$dir ${dir#$DIST_ROOT}
- fi
- fi
- else
- #
- # third usage
- #
- n=1
- while [ $# -gt 0 ]
- do
- if [ $# -gt 1 ]
- then
- list="$list $1"
- else
- dir=$DIST_ROOT/$1
- fi
- shift
- done
-
- # echo DIR=$dir list=\"$list\"
- for f in $list
- do
- $CP $f $dir
- status=$?
- if [ $status -eq 0 ]
- then
- $CHMOD $FILEMODE $dir/$f
- status=$?
- if [ $status -eq 0 ]
- then
- $CHOWN $OWNER $GROUP $dir/$f
- status=$?
- fi
- $MANIFEST f $FILEMODE $OWNER $GROUP $HERE/$f ${dir#$DIST_ROOT}/$f
- fi
- [ $status -ne 0 ] && break
- done
- fi
-fi
-
-exit $status
diff --git a/libacl/Makefile b/libacl/Makefile
deleted file mode 100644
index 6befcd4..0000000
--- a/libacl/Makefile
+++ /dev/null
@@ -1,68 +0,0 @@
-#
-# Copyright (c) 2000-2002 Silicon Graphics, Inc. All Rights Reserved.
-#
-# 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 of the License, 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
-#
-
-TOPDIR = ..
-
-LTLDFLAGS += -Wl,--version-script,$(TOPDIR)/exports
-include $(TOPDIR)/include/builddefs
-
-LTLIBRARY = libacl.la
-LTLIBS = -lattr $(LIBMISC)
-LTDEPENDENCIES = $(LIBMISC)
-LT_CURRENT = 2
-LT_REVISION = 0
-LT_AGE = 1
-
-CFILES = $(POSIX_CFILES) $(LIBACL_CFILES) $(INTERNAL_CFILES) \
- perm_copy_fd.c perm_copy_file.c
-HFILES = libobj.h libacl.h byteorder.h __acl_from_xattr.h __acl_to_xattr.h \
- perm_copy.h __acl_extended_file.h
-
-LCFLAGS = -include perm_copy.h
-
-POSIX_CFILES = \
- acl_add_perm.c acl_calc_mask.c acl_clear_perms.c acl_copy_entry.c \
- acl_copy_ext.c acl_copy_int.c acl_create_entry.c acl_delete_def_file.c \
- acl_delete_entry.c acl_delete_perm.c acl_dup.c acl_free.c \
- acl_from_text.c acl_get_entry.c acl_get_fd.c acl_get_file.c \
- acl_get_perm.c acl_get_permset.c acl_get_qualifier.c \
- acl_get_tag_type.c acl_init.c acl_set_fd.c acl_set_file.c \
- acl_set_permset.c acl_set_qualifier.c acl_set_tag_type.c acl_to_text.c \
- acl_valid.c acl_size.c
-
-LIBACL_CFILES = \
- acl_to_any_text.c acl_entries.c acl_check.c acl_error.c acl_cmp.c \
- acl_extended_fd.c acl_extended_file.c acl_equiv_mode.c acl_from_mode.c \
- acl_extended_file_nofollow.c __acl_extended_file.c
-
-INTERNAL_CFILES = \
- __acl_to_any_text.c __acl_to_xattr.c __acl_from_xattr.c \
- __acl_reorder_obj_p.c __libobj.c __apply_mask_to_mode.c
-
-
-default: $(LTLIBRARY)
-
-include $(BUILDRULES)
-
-install:
-
-install-dev: default
- $(INSTALL_LTLIB_DEV)
-
-install-lib: default
- $(INSTALL_LTLIB)
diff --git a/libacl/Makemodule.am b/libacl/Makemodule.am
new file mode 100644
index 0000000..c35214c
--- /dev/null
+++ b/libacl/Makemodule.am
@@ -0,0 +1,81 @@
+lib_LTLIBRARIES += libacl.la
+
+# No other library exports version info, otherwise we'd have to add
+# "libacl_" prefix to all these variables.
+LT_CURRENT = 2
+# The configure script will set this for us automatically.
+#LT_REVISION =
+LT_AGE = 1
+LTVERSION = $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
+
+CFILES = $(POSIX_CFILES) $(LIBACL_CFILES) $(INTERNAL_CFILES) \
+ libacl/perm_copy_fd.c \
+ libacl/perm_copy_file.c
+HFILES = \
+ libacl/libobj.h \
+ libacl/libacl.h \
+ libacl/byteorder.h \
+ libacl/__acl_from_xattr.h \
+ libacl/__acl_to_xattr.h \
+ libacl/perm_copy.h \
+ libacl/__acl_extended_file.h
+
+POSIX_CFILES = \
+ libacl/acl_add_perm.c \
+ libacl/acl_calc_mask.c \
+ libacl/acl_clear_perms.c \
+ libacl/acl_copy_entry.c \
+ libacl/acl_copy_ext.c \
+ libacl/acl_copy_int.c \
+ libacl/acl_create_entry.c \
+ libacl/acl_delete_def_file.c \
+ libacl/acl_delete_entry.c \
+ libacl/acl_delete_perm.c \
+ libacl/acl_dup.c \
+ libacl/acl_free.c \
+ libacl/acl_from_text.c \
+ libacl/acl_get_entry.c \
+ libacl/acl_get_fd.c \
+ libacl/acl_get_file.c \
+ libacl/acl_get_perm.c \
+ libacl/acl_get_permset.c \
+ libacl/acl_get_qualifier.c \
+ libacl/acl_get_tag_type.c \
+ libacl/acl_init.c \
+ libacl/acl_set_fd.c \
+ libacl/acl_set_file.c \
+ libacl/acl_set_permset.c \
+ libacl/acl_set_qualifier.c \
+ libacl/acl_set_tag_type.c \
+ libacl/acl_size.c \
+ libacl/acl_to_text.c \
+ libacl/acl_valid.c
+
+LIBACL_CFILES = \
+ libacl/acl_check.c \
+ libacl/acl_cmp.c \
+ libacl/acl_entries.c \
+ libacl/acl_equiv_mode.c \
+ libacl/acl_error.c \
+ libacl/acl_extended_fd.c \
+ libacl/acl_extended_file.c \
+ libacl/acl_extended_file_nofollow.c \
+ libacl/acl_from_mode.c \
+ libacl/acl_to_any_text.c \
+ libacl/__acl_extended_file.c
+
+INTERNAL_CFILES = \
+ libacl/__acl_from_xattr.c \
+ libacl/__acl_reorder_obj_p.c \
+ libacl/__acl_to_any_text.c \
+ libacl/__acl_to_xattr.c \
+ libacl/__apply_mask_to_mode.c \
+ libacl/__libobj.c
+
+libacl_la_DEPENDENCIES = exports libmisc.la
+libacl_la_SOURCES = $(CFILES) $(HFILES)
+libacl_la_LIBADD = -lattr libmisc.la
+libacl_la_CFLAGS = $(AM_CFLAGS) -include $(srcdir)/libacl/perm_copy.h
+libacl_la_LDFLAGS = \
+ -Wl,--version-script,$(top_srcdir)/exports \
+ -version-info $(LTVERSION)
diff --git a/libmisc/Makefile b/libmisc/Makefile
deleted file mode 100644
index e64a287..0000000
--- a/libmisc/Makefile
+++ /dev/null
@@ -1,31 +0,0 @@
-#
-# Copyright (c) 2000, 2002 Silicon Graphics, Inc. All Rights Reserved.
-# Copyright (C) 2009 Andreas Gruenbacher <agruen@suse.de>
-#
-# 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 of the License, 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, see <http://www.gnu.org/licenses/>.
-#
-
-TOPDIR = ..
-include $(TOPDIR)/include/builddefs
-
-LTLIBRARY = libmisc.la
-LTLDFLAGS =
-
-CFILES = quote.c unquote.c high_water_alloc.c next_line.c walk_tree.c
-
-default: $(LTLIBRARY)
-install install-dev install-lib:
-
-include $(BUILDRULES)
-
diff --git a/libmisc/Makemodule.am b/libmisc/Makemodule.am
new file mode 100644
index 0000000..d784622
--- /dev/null
+++ b/libmisc/Makemodule.am
@@ -0,0 +1,8 @@
+noinst_LTLIBRARIES += libmisc.la
+
+libmisc_la_SOURCES = \
+ libmisc/high_water_alloc.c \
+ libmisc/next_line.c \
+ libmisc/quote.c \
+ libmisc/unquote.c \
+ libmisc/walk_tree.c
diff --git a/m4/.gitignore b/m4/.gitignore
new file mode 100644
index 0000000..73d27ec
--- /dev/null
+++ b/m4/.gitignore
@@ -0,0 +1,3 @@
+!.gitignore
+!package_attrdev.m4
+!visibility_hidden.m4
diff --git a/m4/Makefile b/m4/Makefile
deleted file mode 100644
index 9748f11..0000000
--- a/m4/Makefile
+++ /dev/null
@@ -1,34 +0,0 @@
-#
-# Copyright (c) 2003-2006 Silicon Graphics, Inc. All Rights Reserved.
-#
-# 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 of the License, 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
-#
-
-TOPDIR = ..
-include $(TOPDIR)/include/builddefs
-
-LSRCFILES = \
- manual_format.m4 \
- package_attrdev.m4 \
- package_globals.m4 \
- package_utilies.m4 \
- visibility_hidden.m4 \
- multilib.m4
-
-default:
-
-include $(BUILDRULES)
-
-install install-dev install-lib: default
diff --git a/m4/manual_format.m4 b/m4/manual_format.m4
deleted file mode 100644
index 34aa466..0000000
--- a/m4/manual_format.m4
+++ /dev/null
@@ -1,31 +0,0 @@
-dnl Copyright (C) 2003 Silicon Graphics, Inc.
-dnl
-dnl This program is free software: you can redistribute it and/or modify it
-dnl under the terms of the GNU General Public License as published by
-dnl the Free Software Foundation, either version 2 of the License, or
-dnl (at your option) any later version.
-dnl
-dnl This program is distributed in the hope that it will be useful,
-dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
-dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-dnl GNU General Public License for more details.
-dnl
-dnl You should have received a copy of the GNU General Public License
-dnl along with this program. If not, see <http://www.gnu.org/licenses/>.
-#
-# Find format of installed man pages.
-# Always gzipped on Debian, but not Redhat pre-7.0.
-# We don't deal with bzip2'd man pages, which Mandrake uses,
-# someone will send us a patch sometime hopefully. :-)
-#
-AC_DEFUN([AC_MANUAL_FORMAT],
- [ have_zipped_manpages=false
- for d in ${prefix}/share/man ${prefix}/man ; do
- if test -f $d/man1/man.1.gz
- then
- have_zipped_manpages=true
- break
- fi
- done
- AC_SUBST(have_zipped_manpages)
- ])
diff --git a/m4/multilib.m4 b/m4/multilib.m4
deleted file mode 100644
index 8d991d8..0000000
--- a/m4/multilib.m4
+++ /dev/null
@@ -1,43 +0,0 @@
-# The AC_MULTILIB macro was extracted and modified from
-# gettext-0.15's AC_LIB_PREPARE_MULTILIB macro in the lib-prefix.m4 file
-# so that the correct paths can be used for 64-bit libraries.
-#
-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_MULTILIB creates a variable libdirsuffix, containing
-dnl the suffix of the libdir, either "" or "64".
-dnl Only do this if the given enable parameter is "yes".
-AC_DEFUN([AC_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".
- enable_lib64="$1"
- libdirsuffix=""
- searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
- if test "$enable_lib64" = "yes" -a -n "$searchpath"; then
- save_IFS="${IFS= }"; IFS=":"
- for searchdir in $searchpath; do
- if test -d "$searchdir"; then
- case "$searchdir" in
- */lib64/ | */lib64 ) libdirsuffix=64 ;;
- *) searchdir=`cd "$searchdir" && pwd`
- case "$searchdir" in
- */lib64 ) libdirsuffix=64 ;;
- esac ;;
- esac
- fi
- done
- IFS="$save_IFS"
- fi
- AC_SUBST(libdirsuffix)
-])
diff --git a/m4/package_globals.m4 b/m4/package_globals.m4
deleted file mode 100644
index e5c2418..0000000
--- a/m4/package_globals.m4
+++ /dev/null
@@ -1,61 +0,0 @@
-dnl Copyright (C) 2003, 2005, 2006, 2007 Silicon Graphics, Inc.
-dnl
-dnl This program is free software: you can redistribute it and/or modify it
-dnl under the terms of the GNU General Public License as published by
-dnl the Free Software Foundation, either version 2 of the License, or
-dnl (at your option) any later version.
-dnl
-dnl This program is distributed in the hope that it will be useful,
-dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
-dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-dnl GNU General Public License for more details.
-dnl
-dnl You should have received a copy of the GNU General Public License
-dnl along with this program. If not, see <http://www.gnu.org/licenses/>.
-#
-# Generic macro, sets up all of the global packaging variables.
-# The following environment variables may be set to override defaults:
-# DEBUG OPTIMIZER MALLOCLIB PLATFORM DISTRIBUTION INSTALL_USER INSTALL_GROUP
-# BUILD_VERSION
-#
-AC_DEFUN([AC_PACKAGE_GLOBALS],
- [ pkg_name="$1"
- AC_SUBST(pkg_name)
-
- AC_PROG_CC
-
- . ./VERSION
- pkg_version=${PKG_MAJOR}.${PKG_MINOR}.${PKG_REVISION}
- AC_SUBST(pkg_version)
- pkg_release=$PKG_BUILD
- test -z "$BUILD_VERSION" || pkg_release="$BUILD_VERSION"
- AC_SUBST(pkg_release)
-
- DEBUG=${DEBUG:-'-DDEBUG'} dnl -DNDEBUG
- debug_build="$DEBUG"
- AC_SUBST(debug_build)
-
- OPTIMIZER=${OPTIMIZER:-'-g -O2'}
- opt_build="$OPTIMIZER"
- AC_SUBST(opt_build)
-
- MALLOCLIB=${MALLOCLIB:-''} dnl /usr/lib/libefence.a
- malloc_lib="$MALLOCLIB"
- AC_SUBST(malloc_lib)
-
- pkg_user=`id -u -n`
- test -z "$INSTALL_USER" || pkg_user="$INSTALL_USER"
- AC_SUBST(pkg_user)
-
- pkg_group=`id -g -n`
- test -z "$INSTALL_GROUP" || pkg_group="$INSTALL_GROUP"
- AC_SUBST(pkg_group)
-
- pkg_distribution=`uname -s`
- test -z "$DISTRIBUTION" || pkg_distribution="$DISTRIBUTION"
- AC_SUBST(pkg_distribution)
-
- pkg_platform=`uname -s | tr 'A-Z' 'a-z' | sed -e 's/irix64/irix/'`
- test -z "$PLATFORM" || pkg_platform="$PLATFORM"
- AC_SUBST(pkg_platform)
- ])
diff --git a/m4/package_utilies.m4 b/m4/package_utilies.m4
deleted file mode 100644
index e372a6b..0000000
--- a/m4/package_utilies.m4
+++ /dev/null
@@ -1,95 +0,0 @@
-dnl Copyright (C) 2003, 2004, 2005, 2006, 2007 Silicon Graphics, Inc.
-dnl
-dnl This program is free software: you can redistribute it and/or modify it
-dnl under the terms of the GNU General Public License as published by
-dnl the Free Software Foundation, either version 2 of the License, or
-dnl (at your option) any later version.
-dnl
-dnl This program is distributed in the hope that it will be useful,
-dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
-dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-dnl GNU General Public License for more details.
-dnl
-dnl You should have received a copy of the GNU General Public License
-dnl along with this program. If not, see <http://www.gnu.org/licenses/>.
-#
-# Check for specified utility (env var) - if unset, fail.
-#
-AC_DEFUN([AC_PACKAGE_NEED_UTILITY],
- [ if test -z "$2"; then
- echo
- echo FATAL ERROR: $3 does not seem to be installed.
- echo $1 cannot be built without a working $4 installation.
- exit 1
- fi
- ])
-
-#
-# Generic macro, sets up all of the global build variables.
-# The following environment variables may be set to override defaults:
-# CC MAKE LIBTOOL TAR ZIP MAKEDEPEND AWK SED ECHO SORT
-# MSGFMT MSGMERGE XGETTEXT
-#
-AC_DEFUN([AC_PACKAGE_UTILITIES],
- [ AC_PROG_CC
- cc="$CC"
- AC_SUBST(cc)
- AC_PACKAGE_NEED_UTILITY($1, "$cc", cc, [C compiler])
-
- search_path="$PATH$PATH_SEPARATOR/usr/freeware/bin$PATH_SEPARATOR/bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR/usr/local/bin"
-
- AC_PATH_PROGS(MAKE, gmake make,, $search_path)
- make=$MAKE
- AC_SUBST(make)
- AC_PACKAGE_NEED_UTILITY($1, "$make", make, [GNU make])
-
- AC_PATH_PROG(TAR, tar,, $search_path)
- tar=$TAR
- AC_SUBST(tar)
-
- AC_PATH_PROG(ZIP, gzip,, $search_path)
- zip=$ZIP
- AC_SUBST(zip)
-
- AC_PATH_PROG(MAKEDEPEND, makedepend, /bin/true)
- makedepend=$MAKEDEPEND
- AC_SUBST(makedepend)
-
- AC_PATH_PROG(AWK, awk,, $search_path)
- awk=$AWK
- AC_SUBST(awk)
-
- AC_PATH_PROG(SED, sed,, $search_path)
- sed=$SED
- AC_SUBST(sed)
-
- AC_PATH_PROG(ECHO, echo,, $search_path)
- echo=$ECHO
- AC_SUBST(echo)
-
- AC_PATH_PROG(SORT, sort,, $search_path)
- sort=$SORT
- AC_SUBST(sort)
-
- dnl check if symbolic links are supported
- AC_PROG_LN_S
-
- if test "$enable_gettext" = yes; then
- AC_PATH_PROG(MSGFMT, msgfmt,, $search_path)
- msgfmt=$MSGFMT
- AC_SUBST(msgfmt)
- AC_PACKAGE_NEED_UTILITY($1, "$msgfmt", msgfmt, gettext)
-
- AC_PATH_PROG(MSGMERGE, msgmerge,, $search_path)
- msgmerge=$MSGMERGE
- AC_SUBST(msgmerge)
- AC_PACKAGE_NEED_UTILITY($1, "$msgmerge", msgmerge, gettext)
-
- AC_PATH_PROG(XGETTEXT, xgettext,, $search_path)
- xgettext=$XGETTEXT
- AC_SUBST(xgettext)
- AC_PACKAGE_NEED_UTILITY($1, "$xgettext", xgettext, gettext)
-
- AC_DEFINE([ENABLE_GETTEXT], 1, [enable gettext])
- fi
- ])
diff --git a/man/Makefile b/man/Makefile
deleted file mode 100644
index a2e7546..0000000
--- a/man/Makefile
+++ /dev/null
@@ -1,41 +0,0 @@
-#
-# Copyright (c) 2000-2002 Silicon Graphics, Inc. All Rights Reserved.
-#
-# 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 of the License, 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
-#
-
-TOPDIR = ..
-include $(TOPDIR)/include/builddefs
-
-SUBDIRS = man1 man3 man5
-
-default : $(SUBDIRS)
-
-install : $(addsuffix -install,$(SUBDIRS))
-
-install-dev : $(addsuffix -install-dev,$(SUBDIRS))
-
-install-lib: $(addsuffix -install-lib,$(SUBDIRS))
-
-%-install:
- $(MAKE) -C $* install
-
-%-install-dev:
- $(MAKE) -C $* install-dev
-
-%-install-lib:
- $(MAKE) -C $* install-lib
-
-include $(BUILDRULES)
diff --git a/man/Makemodule.am b/man/Makemodule.am
new file mode 100644
index 0000000..c18576c
--- /dev/null
+++ b/man/Makemodule.am
@@ -0,0 +1,3 @@
+include man/man1/Makemodule.am
+include man/man3/Makemodule.am
+include man/man5/Makemodule.am
diff --git a/man/man1/Makefile b/man/man1/Makefile
deleted file mode 100644
index 2fd48eb..0000000
--- a/man/man1/Makefile
+++ /dev/null
@@ -1,35 +0,0 @@
-#
-# Copyright (c) 2000-2002 Silicon Graphics, Inc. All Rights Reserved.
-#
-# 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 of the License, 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
-#
-
-TOPDIR = ../..
-include $(TOPDIR)/include/builddefs
-
-MAN_SECTION = 1
-
-MAN_PAGES = $(shell echo *.$(MAN_SECTION))
-MAN_DEST = $(PKG_MAN_DIR)/man$(MAN_SECTION)
-LSRCFILES = $(MAN_PAGES)
-
-default : $(MAN_PAGES)
-
-include $(BUILDRULES)
-
-install : default
- $(INSTALL) -m 755 -d $(MAN_DEST)
- $(INSTALL_MAN)
-install-dev install-lib:
diff --git a/man/man1/Makemodule.am b/man/man1/Makemodule.am
new file mode 100644
index 0000000..f80e26a
--- /dev/null
+++ b/man/man1/Makemodule.am
@@ -0,0 +1,4 @@
+dist_man_MANS += \
+ man/man1/chacl.1 \
+ man/man1/getfacl.1 \
+ man/man1/setfacl.1
diff --git a/man/man3/Makefile b/man/man3/Makefile
deleted file mode 100644
index c00f02d..0000000
--- a/man/man3/Makefile
+++ /dev/null
@@ -1,35 +0,0 @@
-#
-# Copyright (c) 2000-2002 Silicon Graphics, Inc. All Rights Reserved.
-#
-# 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 of the License, 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
-#
-
-TOPDIR = ../..
-include $(TOPDIR)/include/builddefs
-
-MAN_SECTION = 3
-
-MAN_PAGES = $(shell echo *.$(MAN_SECTION))
-MAN_DEST = $(PKG_MAN_DIR)/man$(MAN_SECTION)
-LSRCFILES = $(MAN_PAGES)
-
-default : $(MAN_PAGES)
-
-include $(BUILDRULES)
-
-install-dev : default
- $(INSTALL) -m 755 -d $(MAN_DEST)
- $(INSTALL_MAN)
-install install-lib:
diff --git a/man/man3/Makemodule.am b/man/man3/Makemodule.am
new file mode 100644
index 0000000..c0c4825
--- /dev/null
+++ b/man/man3/Makemodule.am
@@ -0,0 +1,40 @@
+dist_man_MANS += \
+ man/man3/acl_add_perm.3 \
+ man/man3/acl_calc_mask.3 \
+ man/man3/acl_check.3 \
+ man/man3/acl_clear_perms.3 \
+ man/man3/acl_cmp.3 \
+ man/man3/acl_copy_entry.3 \
+ man/man3/acl_copy_ext.3 \
+ man/man3/acl_copy_int.3 \
+ man/man3/acl_create_entry.3 \
+ man/man3/acl_delete_def_file.3 \
+ man/man3/acl_delete_entry.3 \
+ man/man3/acl_delete_perm.3 \
+ man/man3/acl_dup.3 \
+ man/man3/acl_entries.3 \
+ man/man3/acl_equiv_mode.3 \
+ man/man3/acl_error.3 \
+ man/man3/acl_extended_fd.3 \
+ man/man3/acl_extended_file.3 \
+ man/man3/acl_extended_file_nofollow.3 \
+ man/man3/acl_free.3 \
+ man/man3/acl_from_mode.3 \
+ man/man3/acl_from_text.3 \
+ man/man3/acl_get_entry.3 \
+ man/man3/acl_get_fd.3 \
+ man/man3/acl_get_file.3 \
+ man/man3/acl_get_perm.3 \
+ man/man3/acl_get_permset.3 \
+ man/man3/acl_get_qualifier.3 \
+ man/man3/acl_get_tag_type.3 \
+ man/man3/acl_init.3 \
+ man/man3/acl_set_fd.3 \
+ man/man3/acl_set_file.3 \
+ man/man3/acl_set_permset.3 \
+ man/man3/acl_set_qualifier.3 \
+ man/man3/acl_set_tag_type.3 \
+ man/man3/acl_size.3 \
+ man/man3/acl_to_any_text.3 \
+ man/man3/acl_to_text.3 \
+ man/man3/acl_valid.3
diff --git a/man/man5/Makefile b/man/man5/Makefile
deleted file mode 100644
index 51de8d9..0000000
--- a/man/man5/Makefile
+++ /dev/null
@@ -1,35 +0,0 @@
-#
-# Copyright (c) 2000-2002 Silicon Graphics, Inc. All Rights Reserved.
-#
-# 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 of the License, 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
-#
-
-TOPDIR = ../..
-include $(TOPDIR)/include/builddefs
-
-MAN_SECTION = 5
-
-MAN_PAGES = $(shell echo *.$(MAN_SECTION))
-MAN_DEST = $(PKG_MAN_DIR)/man$(MAN_SECTION)
-LSRCFILES = $(MAN_PAGES)
-
-default : $(MAN_PAGES)
-
-include $(BUILDRULES)
-
-install : default
- $(INSTALL) -m 755 -d $(MAN_DEST)
- $(INSTALL_MAN)
-install-dev install-lib:
diff --git a/man/man5/Makemodule.am b/man/man5/Makemodule.am
new file mode 100644
index 0000000..7d053b8
--- /dev/null
+++ b/man/man5/Makemodule.am
@@ -0,0 +1,2 @@
+dist_man_MANS += \
+ man/man5/acl.5
diff --git a/package/Makefile b/package/Makefile
deleted file mode 100644
index 6f5aa69..0000000
--- a/package/Makefile
+++ /dev/null
@@ -1,60 +0,0 @@
-#
-# Copyright (c) 2000-2002 Silicon Graphics, Inc. All Rights Reserved.
-#
-# 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 of the License, 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
-#
-
-TOPDIR = ..
-include $(TOPDIR)/include/builddefs
-
-MANIFEST=src-manifest
-SRCTAR=$(PKG_NAME)-$(PKG_VERSION).src.tar.gz
-
-LDIRT = *-manifest *.gz $(TOPDIR)/$(PKG_NAME)-*
-
-# for clean and clobber
-SUBDIRS = tar
-
-# nothing to build here (it's all packaging)
-default install install-dev install-lib:
-
-include $(BUILDRULES)
-
-# Symlink in the TOPDIR is used to pack files relative to
-# product-version directory.
-$(MANIFEST) : $(_FORCE)
- @if [ ! -L $(TOPDIR)/$(PKG_NAME)-$(PKG_VERSION) ] ; then \
- $(LN_S) . $(TOPDIR)/$(PKG_NAME)-$(PKG_VERSION) ; \
- fi
- @CDIR=`pwd`; cd $(TOPDIR); \
- $(MAKE) --no-print-directory source | \
- sed -e 's/^\./$(PKG_NAME)-$(PKG_VERSION)/' > $$CDIR/$@ ;\
- if [ $$? -ne 0 ] ; then \
- exit 1; \
- else \
- unset TAPE; \
- $(TAR) -T $$CDIR/$@ -cf - | $(ZIP) --best > $$CDIR/$(SRCTAR); \
- echo Wrote: $$CDIR/$(SRCTAR); \
- fi
-
-dist : default $(MANIFEST)
- @DIST_MANIFEST=`pwd`/bin-manifest; DIST_ROOT=/tmp/$$$$; \
- export DIST_MANIFEST DIST_ROOT; \
- rm -f $$DIST_MANIFEST; \
- echo === install === && $(MAKE) -C $(TOPDIR) install || exit $$?; \
- if [ -x $(TAR) ]; then \
- ( echo "=== tar ===" && $(MAKEF) -C tar $@ || exit $$? ); \
- fi; \
- test -z "$$KEEP_DIST_ROOT" || rm -rf $$DIST_ROOT; echo Done
diff --git a/package/tar/Makefile b/package/tar/Makefile
deleted file mode 100644
index 31c8f92..0000000
--- a/package/tar/Makefile
+++ /dev/null
@@ -1,36 +0,0 @@
-#
-# Copyright (c) 2000-2003 Silicon Graphics, Inc. All Rights Reserved.
-#
-# 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 of the License, 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
-#
-
-TOPDIR = ../..
-include $(TOPDIR)/include/builddefs
-
-BINTAR=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-LDIRT = *.gz
-
-default install install-dev install-lib:
-
-include $(BUILDRULES)
-
-dist : default
- @HERE=`pwd`; cd $${DIST_ROOT:-/}; \
- $(SORT) -u $$HERE/../bin-manifest | $(AWK) ' \
- $$1 == "f" { printf (".%s\n", $$6); } \
- $$1 == "d" { next; } \
- $$1 == "l" { printf (".%s\n", $$3); }' \
- | $(TAR) -T - -cf - | $(ZIP) --best > $$HERE/$(BINTAR)
- @echo Wrote: `pwd`/$(BINTAR)
diff --git a/po/.gitignore b/po/.gitignore
new file mode 100644
index 0000000..8fe225b
--- /dev/null
+++ b/po/.gitignore
@@ -0,0 +1,12 @@
+*.gmo
+*.sed
+*.sin
+acl.pot
+Makefile.in.in
+Makevars.template
+POTFILES
+POTFILES.in
+Rules-quot
+en@boldquot.*
+en@quot.*
+stamp-po
diff --git a/po/LINGUAS b/po/LINGUAS
new file mode 100644
index 0000000..a1950c5
--- /dev/null
+++ b/po/LINGUAS
@@ -0,0 +1,3 @@
+de es fr gl pl sv
+en@boldquot
+en@quot
diff --git a/po/Makefile b/po/Makefile
deleted file mode 100644
index 7cd5b61..0000000
--- a/po/Makefile
+++ /dev/null
@@ -1,42 +0,0 @@
-#
-# Copyright (c) 2001-2002 Silicon Graphics, Inc. All Rights Reserved.
-#
-# 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 of the License, 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
-#
-
-TOPDIR = ..
-include $(TOPDIR)/include/builddefs
-
-POTHEAD = $(PKG_NAME).pot
-LINGUAS ?= de es fr gl pl sv
-LSRCFILES = $(LINGUAS:%=%.po) $(POTHEAD)
-LDIRT = $(POTHEAD)
-
-XGETTEXTFILES = $(TOPDIR)/chacl/chacl.c \
- $(TOPDIR)/setfacl/do_set.c \
- $(TOPDIR)/setfacl/setfacl.c \
- $(TOPDIR)/getfacl/getfacl.c \
- $(TOPDIR)/libacl/acl_error.c \
- $(TOPDIR)/libacl/perm_copy_fd.c \
- $(TOPDIR)/libacl/perm_copy_file.c
-
-default: $(POTHEAD) $(LINGUAS:%=%.mo)
-
-include $(BUILDRULES)
-
-install: default
- $(INSTALL_LINGUAS)
-
-install-dev install-lib:
diff --git a/po/Makevars b/po/Makevars
new file mode 100644
index 0000000..4b17ab3
--- /dev/null
+++ b/po/Makevars
@@ -0,0 +1,41 @@
+# Makefile variables for PO directory in any package using GNU gettext.
+
+# Usually the message domain is the same as the package name.
+DOMAIN = $(PACKAGE)
+
+# These two variables depend on the location of this directory.
+subdir = po
+top_builddir = ..
+
+# These options get passed to xgettext.
+XGETTEXT_OPTIONS = --keyword=_ --keyword=N_
+
+# This is the copyright holder that gets inserted into the header of the
+# $(DOMAIN).pot file. Set this to the copyright holder of the surrounding
+# package. (Note that the msgstr strings, extracted from the package's
+# sources, belong to the copyright holder of the package.) Translators are
+# expected to transfer the copyright for their translations to this person
+# or entity, or to disclaim their copyright. The empty string stands for
+# the public domain; in this case the translators are expected to disclaim
+# their copyright.
+COPYRIGHT_HOLDER = Silicon Graphics, Inc.
+
+# This is the email address or URL to which the translators shall report
+# bugs in the untranslated strings:
+# - Strings which are not entire sentences, see the maintainer guidelines
+# in the GNU gettext documentation, section 'Preparing Strings'.
+# - Strings which use unclear terms or require additional context to be
+# understood.
+# - Strings which make invalid assumptions about notation of date, time or
+# money.
+# - Pluralisation problems.
+# - Incorrect English spelling.
+# - Incorrect formatting.
+# It can be your email address, or a mailing list address where translators
+# can write to without being subscribed, or the URL of a web page through
+# which the translators can contact you.
+MSGID_BUGS_ADDRESS = $(PACKAGE_BUGREPORT)
+
+# This is the list of locale categories, beyond LC_MESSAGES, for which the
+# message catalogs shall be used. It is usually empty.
+EXTRA_LOCALE_CATEGORIES =
diff --git a/po/update-potfiles b/po/update-potfiles
new file mode 100755
index 0000000..271da7e
--- /dev/null
+++ b/po/update-potfiles
@@ -0,0 +1,13 @@
+#!/bin/sh -e
+
+(
+echo "# updated automatically by $0"
+echo
+find \
+ include \
+ libacl \
+ libmisc \
+ tools \
+ -name '*.[ch]' \
+ | grep -v include/config.h
+) > po/POTFILES.in
diff --git a/setfacl/Makefile b/setfacl/Makefile
deleted file mode 100644
index c44e7c0..0000000
--- a/setfacl/Makefile
+++ /dev/null
@@ -1,36 +0,0 @@
-#
-# Copyright (c) 2000, 2002 Silicon Graphics, Inc. All Rights Reserved.
-#
-# 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 of the License, 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
-#
-
-TOPDIR = ..
-include $(TOPDIR)/include/builddefs
-
-LTCOMMAND = setfacl
-CFILES = setfacl.c do_set.c sequence.c parse.c
-HFILES = sequence.h parse.h do_set.h
-
-LLDLIBS = $(LIBMISC) $(LIBACL) $(LIBATTR)
-LTDEPENDENCIES = $(LIBMISC) $(LIBACL)
-
-default: $(LTCOMMAND)
-
-include $(BUILDRULES)
-
-install: default
- $(INSTALL) -m 755 -d $(PKG_BIN_DIR)
- $(LTINSTALL) -m 755 $(LTCOMMAND) $(PKG_BIN_DIR)
-install-dev install-lib:
diff --git a/test/.gitignore b/test/.gitignore
new file mode 100644
index 0000000..e6e5019
--- /dev/null
+++ b/test/.gitignore
@@ -0,0 +1 @@
+*.dir/
diff --git a/test/Makefile b/test/Makefile
deleted file mode 100644
index d2baac8..0000000
--- a/test/Makefile
+++ /dev/null
@@ -1,50 +0,0 @@
-#
-# Copyright (c) 2001-2002 Silicon Graphics, Inc. All Rights Reserved.
-#
-# 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 of the License, 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
-#
-
-TOPDIR = ..
-include $(TOPDIR)/include/builddefs
-
-TESTS = $(wildcard *.test)
-ROOT = $(wildcard root/*.test)
-NFS = $(wildcard nfs/*.test)
-LSRCFILES = sort-getfacl-output run make-tree $(TESTS) $(ROOT) $(NFS) \
- malformed-restore-double-owner.acl
-
-include $(BUILDRULES)
-
-default install install-dev install-lib:
-
-PATH := $(abspath ../getfacl/):$(abspath ../setfacl/):$(abspath ../chacl/):$(PATH)
-
-tests: $(TESTS)
-root-tests: $(ROOT)
-nfs-tests: $(NFS)
-
-$(TESTS):
- @echo "*** $@ ***"; perl run $@
-
-$(NFS):
- @echo "NFS specific tests"; echo "*** $@ ***"; perl run $@
-
-$(ROOT):
- @echo "Note: Tests must run as root"; echo "*** $@ ***"; perl run $@
-
-.PHONY: $(TESTS) $(NFS) $(ROOT)
-.NOTPARALLEL:
-
-
diff --git a/test/Makemodule.am b/test/Makemodule.am
new file mode 100644
index 0000000..7b8dafe
--- /dev/null
+++ b/test/Makemodule.am
@@ -0,0 +1,27 @@
+XFAIL_TESTS = \
+ test/nfs/nfsacl.test \
+ test/nfs/nfs-dir.test
+TESTS = \
+ test/cp.test \
+ test/getfacl-noacl.test \
+ test/getfacl-recursive.test \
+ test/malformed-restore.test \
+ test/misc.test \
+ test/sbits-restore.test \
+ test/setfacl-X.test \
+ test/utf8-filenames.test \
+ test/root/getfacl.test \
+ test/root/permissions.test \
+ test/root/restore.test \
+ test/root/setfacl.test \
+ $(XFAIL_TESTS)
+
+EXTRA_DIST += \
+ test/make-tree \
+ test/malformed-restore-double-owner.acl \
+ test/run \
+ test/sort-getfacl-output \
+ $(TESTS)
+
+AM_TESTS_ENVIRONMENT = PATH="$(abs_top_builddir):$$PATH";
+TEST_LOG_COMPILER = $(srcdir)/test/run
diff --git a/test/root/getfacl.test b/test/root/getfacl.test
index f84e25d..649ebae 100644
--- a/test/root/getfacl.test
+++ b/test/root/getfacl.test
@@ -1,6 +1,10 @@
Make sure that getfacl always adds at least one space between the permissions
in an acl entry and the effective permissions comment.
+Cry immediately if we are not running as root.
+
+ $ require_root
+
$ umask 022
$ mkdir d
$ groupadd loooooooooooooooooooooooonggroup
diff --git a/test/root/permissions.test b/test/root/permissions.test
index afaf5f0..9b9e3de 100644
--- a/test/root/permissions.test
+++ b/test/root/permissions.test
@@ -9,8 +9,7 @@ listed in parentheses.
Cry immediately if we are not running as root.
- $ id -u
- > 0
+ $ require_root
First, set up a temporary directory and create a regular file with
diff --git a/test/root/restore.test b/test/root/restore.test
index 6003cd4..63a9d01 100644
--- a/test/root/restore.test
+++ b/test/root/restore.test
@@ -1,6 +1,10 @@
Ensure setuid bit is restored when the owner changes
https://bugzilla.redhat.com/show_bug.cgi?id=467936#c7
+Cry immediately if we are not running as root.
+
+ $ require_root
+
$ touch passwd
$ chmod 755 passwd
$ chmod u+s passwd
diff --git a/test/root/setfacl.test b/test/root/setfacl.test
index 630e9fb..a46a9f4 100644
--- a/test/root/setfacl.test
+++ b/test/root/setfacl.test
@@ -1,5 +1,9 @@
Setfacl utility tests. Run these tests on a filesystem with ACL support.
+Cry immediately if we are not running as root.
+
+ $ require_root
+
$ mkdir d
$ chown bin:bin d
$ cd d
diff --git a/test/run b/test/run
index 0a12be6..fcbcf29 100755
--- a/test/run
+++ b/test/run
@@ -268,6 +268,14 @@ sub exec_test($$) {
return su($prog->[1]);
} elsif ($prog->[0] eq "sg") {
return sg($prog->[1]);
+ } elsif ($prog->[0] eq "require_root") {
+ my $ret = su("root");
+ if ($! != 0) {
+ print $ret->[0];
+ warn "required root failed; skipping test";
+ exit 77;
+ }
+ return [];
} elsif ($prog->[0] eq "export") {
my ($name, $value) = split /=/, $prog->[1];
# FIXME: need to evaluate $value, so that things like this will work:
diff --git a/tools/Makemodule.am b/tools/Makemodule.am
new file mode 100644
index 0000000..60a9a2d
--- /dev/null
+++ b/tools/Makemodule.am
@@ -0,0 +1,23 @@
+tools_ldadd = $(LDADD) libacl.la libmisc.la
+
+bin_PROGRAMS += chacl
+chacl_SOURCES = tools/chacl.c
+chacl_LDADD = $(tools_ldadd)
+
+bin_PROGRAMS += getfacl
+getfacl_SOURCES = \
+ tools/getfacl.c \
+ tools/user_group.c \
+ tools/user_group.h
+getfacl_LDADD = $(tools_ldadd)
+
+bin_PROGRAMS += setfacl
+setfacl_SOURCES = \
+ tools/do_set.c \
+ tools/do_set.h \
+ tools/parse.c \
+ tools/parse.h \
+ tools/sequence.c \
+ tools/sequence.h \
+ tools/setfacl.c
+setfacl_LDADD = $(tools_ldadd)
diff --git a/chacl/chacl.c b/tools/chacl.c
index 525a7ff..525a7ff 100644
--- a/chacl/chacl.c
+++ b/tools/chacl.c
diff --git a/setfacl/do_set.c b/tools/do_set.c
index 60da837..60da837 100644
--- a/setfacl/do_set.c
+++ b/tools/do_set.c
diff --git a/setfacl/do_set.h b/tools/do_set.h
index 2ea25a8..2ea25a8 100644
--- a/setfacl/do_set.h
+++ b/tools/do_set.h
diff --git a/getfacl/getfacl.c b/tools/getfacl.c
index 22cc1c7..22cc1c7 100644
--- a/getfacl/getfacl.c
+++ b/tools/getfacl.c
diff --git a/setfacl/parse.c b/tools/parse.c
index e7e6add..e7e6add 100644
--- a/setfacl/parse.c
+++ b/tools/parse.c
diff --git a/setfacl/parse.h b/tools/parse.h
index b2e68b4..b2e68b4 100644
--- a/setfacl/parse.h
+++ b/tools/parse.h
diff --git a/setfacl/sequence.c b/tools/sequence.c
index a418b23..a418b23 100644
--- a/setfacl/sequence.c
+++ b/tools/sequence.c
diff --git a/setfacl/sequence.h b/tools/sequence.h
index c5d7403..c5d7403 100644
--- a/setfacl/sequence.h
+++ b/tools/sequence.h
diff --git a/setfacl/setfacl.c b/tools/setfacl.c
index f6135b7..f6135b7 100644
--- a/setfacl/setfacl.c
+++ b/tools/setfacl.c
diff --git a/getfacl/user_group.c b/tools/user_group.c
index 61fa0c3..61fa0c3 100644
--- a/getfacl/user_group.c
+++ b/tools/user_group.c
diff --git a/getfacl/user_group.h b/tools/user_group.h
index aad5846..aad5846 100644
--- a/getfacl/user_group.h
+++ b/tools/user_group.h