diff options
author | Nathan Scott <nathans@sgi.com> | 2005-11-07 02:48:13 +0000 |
---|---|---|
committer | Nathan Scott <nathans@sgi.com> | 2005-11-07 02:48:13 +0000 |
commit | 998dd5de3d0767df5c0a60155aebe613939a5152 (patch) | |
tree | 69456c52762afe9735e2f6d60cccd49b1d88ae1e /m4 | |
parent | 9993e8cbaaa24d1d97eb506c99aa5898c720504e (diff) |
Keep packaging scripts in sync across all of the packages were maintaining here
Merge of master-melb:xfs-cmds:24301a by kenmcd.
Diffstat (limited to 'm4')
-rw-r--r-- | m4/package_globals.m4 | 8 | ||||
-rw-r--r-- | m4/package_libcdev.m4 | 33 | ||||
-rw-r--r-- | m4/package_utilies.m4 | 2 |
3 files changed, 38 insertions, 5 deletions
diff --git a/m4/package_globals.m4 b/m4/package_globals.m4 index 25b387d3..c28e1a17 100644 --- a/m4/package_globals.m4 +++ b/m4/package_globals.m4 @@ -27,12 +27,12 @@ AC_DEFUN([AC_PACKAGE_GLOBALS], malloc_lib="$MALLOCLIB" AC_SUBST(malloc_lib) - PKG_USER=${INSTALL_USER:-'root'} - pkg_user="$PKG_USER" + pkg_user=`id -u` + test -z "$INSTALL_USER" || pkg_user="$INSTALL_USER" AC_SUBST(pkg_user) - PKG_GROUP=${INSTALL_GROUP:-'root'} - pkg_group="$PKG_GROUP" + pkg_group=`id -g` + test -z "$INSTALL_GROUP" || pkg_group="$INSTALL_GROUP" AC_SUBST(pkg_group) pkg_distribution=`uname -s` diff --git a/m4/package_libcdev.m4 b/m4/package_libcdev.m4 index a66ae479..5156ced6 100644 --- a/m4/package_libcdev.m4 +++ b/m4/package_libcdev.m4 @@ -65,3 +65,36 @@ AC_DEFUN([AC_HAVE_SENDFILE], AC_MSG_RESULT(no)) AC_SUBST(have_sendfile) ]) + +# +# Check if we have a getmntent libc call (IRIX, Linux) +# +AC_DEFUN([AC_HAVE_GETMNTENT], + [ AC_MSG_CHECKING([for getmntent ]) + AC_TRY_COMPILE([ +#include <stdio.h> +#include <mntent.h> + ], [ + getmntent(0); + ], have_getmntent=yes + AC_MSG_RESULT(yes), + AC_MSG_RESULT(no)) + AC_SUBST(have_getmntent) + ]) + +# +# Check if we have a getmntinfo libc call (FreeBSD, Mac OS X) +# +AC_DEFUN([AC_HAVE_GETMNTINFO], + [ AC_MSG_CHECKING([for getmntinfo ]) + AC_TRY_COMPILE([ +#include <sys/param.h> +#include <sys/ucred.h> +#include <sys/mount.h> + ], [ + getmntinfo(0, 0); + ], have_getmntinfo=yes + AC_MSG_RESULT(yes), + AC_MSG_RESULT(no)) + AC_SUBST(have_getmntinfo) + ]) diff --git a/m4/package_utilies.m4 b/m4/package_utilies.m4 index efcc0a10..c034a7c6 100644 --- a/m4/package_utilies.m4 +++ b/m4/package_utilies.m4 @@ -111,7 +111,7 @@ AC_DEFUN([AC_PACKAGE_UTILITIES], dnl .. and what version is rpm rpm_version=0 - test -x "$RPM" && rpm_version=`$RPM --version \ + test -n "$RPM" && test -x "$RPM" && rpm_version=`$RPM --version \ | awk '{print $NF}' | awk -F. '{V=1; print $V}'` AC_SUBST(rpm_version) dnl At some point in rpm 4.0, rpm can no longer build rpms, and |