src/idmapped-mounts: use renameat instead of renameat2
[xfstests-dev.git] / m4 / package_globals.m4
index 25b387d32bde76c16d1cd2b00c47b28f2c954748..ce7a8c51384e767cc51b91aacfcb5df9c4ffaba2 100644 (file)
@@ -1,4 +1,4 @@
-# 
+#
 # 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
 # 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
@@ -19,7 +19,7 @@ AC_DEFUN([AC_PACKAGE_GLOBALS],
     debug_build="$DEBUG"
     AC_SUBST(debug_build)
 
     debug_build="$DEBUG"
     AC_SUBST(debug_build)
 
-    OPTIMIZER=${OPTIMIZER:-'-g'}       dnl  -O2
+    OPTIMIZER=${OPTIMIZER:-'-g -O2'}
     opt_build="$OPTIMIZER"
     AC_SUBST(opt_build)
 
     opt_build="$OPTIMIZER"
     AC_SUBST(opt_build)
 
@@ -27,19 +27,19 @@ AC_DEFUN([AC_PACKAGE_GLOBALS],
     malloc_lib="$MALLOCLIB"
     AC_SUBST(malloc_lib)
 
     malloc_lib="$MALLOCLIB"
     AC_SUBST(malloc_lib)
 
-    PKG_USER=${INSTALL_USER:-'root'}
-    pkg_user="$PKG_USER"
+    pkg_user=`id -u -n`
+    test -z "$INSTALL_USER" || pkg_user="$INSTALL_USER"
     AC_SUBST(pkg_user)
 
     AC_SUBST(pkg_user)
 
-    PKG_GROUP=${INSTALL_GROUP:-'root'}
-    pkg_group="$PKG_GROUP"
+    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)
 
     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/'`
+    pkg_platform=`uname -s | tr 'A-Z' 'a-z'`
     test -z "$PLATFORM" || pkg_platform="$PLATFORM"
     AC_SUBST(pkg_platform)
   ])
     test -z "$PLATFORM" || pkg_platform="$PLATFORM"
     AC_SUBST(pkg_platform)
   ])