summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorAlastair Hughes <hobbitalastair@gmail.com>2017-08-12 09:15:33 +1200
committerAllan McRae <allan@archlinux.org>2017-09-14 13:03:44 +1000
commit62bfba53dbb33d12f3a4beaf9044a04b40c6b537 (patch)
tree0f0179a8c8abe4d7709771c36820c5b85b9e08c8 /configure.ac
parent2ddbc6964b31f65678ed8e7c2cf1e80f0a7d4a0f (diff)
downloadpacman-62bfba53dbb33d12f3a4beaf9044a04b40c6b537.tar.xz
Make the flags used for sed -i configurable
Not all sed implementations on linux accept the --follow-symlinks argument, so let the user configure the arguments passed to sed if required. Signed-off-by: Alastair Hughes <hobbitalastair@gmail.com> [Allan: fixed configure summary output] Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac16
1 files changed, 11 insertions, 5 deletions
diff --git a/configure.ac b/configure.ac
index 57f068d3..86f5bb6e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -339,10 +339,10 @@ GCC_VISIBILITY_CC
# Host-dependant definitions
DEFAULT_DUFLAGS=" -sk --apparent-size"
+DEFAULT_SEDINPLACEFLAGS=" --follow-symlinks -i"
INODECMD="stat -c '%i %n'"
OWNERCMD="stat -c '%u:%g'"
MODECMD="stat -c '%a'"
-SEDINPLACE="sed --follow-symlinks -i"
STRIP_BINARIES="--strip-all"
STRIP_SHARED="--strip-unneeded"
STRIP_STATIC="--strip-debug"
@@ -351,7 +351,7 @@ case "${host_os}" in
INODECMD="stat -f '%i %N'"
OWNERCMD="stat -f '%u:%g'"
MODECMD="stat -f '%Lp'"
- SEDINPLACE="sed -i \"\""
+ DEFAULT_SEDINPLACEFLAGS=" -i \"\""
DEFAULT_DUFLAGS=" -sk"
;;
darwin*)
@@ -359,7 +359,7 @@ case "${host_os}" in
INODECMD="/usr/bin/stat -f '%i %N'"
OWNERCMD="/usr/bin/stat -f '%u:%g'"
MODECMD="/usr/bin/stat -f '%Lp'"
- SEDINPLACE="/usr/bin/sed -i ''"
+ DEFAULT_SEDINPLACEFLAGS=" -i ''"
DEFAULT_DUFLAGS=" -sk"
STRIP_BINARIES=""
STRIP_SHARED="-S"
@@ -368,10 +368,10 @@ case "${host_os}" in
esac
AM_CONDITIONAL([DARWIN], test "x$host_os_darwin" = "xyes")
AC_PATH_PROGS([DUPATH], [du], [du], [/usr/bin$PATH_SEPARATOR/bin] )
+AC_PATH_PROGS([SEDPATH], [sed], [sed], [/usr/bin$PATH_SEPARATOR/bin] )
AC_SUBST(INODECMD)
AC_SUBST(OWNERCMD)
AC_SUBST(MODECMD)
-AC_SUBST(SEDINPLACE)
AC_SUBST(STRIP_BINARIES)
AC_SUBST(STRIP_SHARED)
AC_SUBST(STRIP_STATIC)
@@ -382,6 +382,12 @@ if test "${DUFLAGS+set}" != "set"; then
fi
AC_ARG_VAR(DUFLAGS, [flags for du, overriding the default])
+# Flags for sed in place
+if test "${SEDINPLACEFLAGS+set}" != "set"; then
+ SEDINPLACEFLAGS="${DEFAULT_SEDINPLACEFLAGS}"
+fi
+AC_ARG_VAR(SEDINPLACEFLAGS, [flags for sed, overriding the default])
+
# Variables plugged into makepkg.conf
CARCH="${host%%-*}"
CHOST="${host}"
@@ -557,7 +563,7 @@ ${PACKAGE_NAME}:
File inode command : ${INODECMD}
File owner command : ${OWNERCMD}
File mode command : ${MODECMD}
- In-place sed command : ${SEDINPLACE}
+ In-place sed command : ${SEDPATH} ${SEDINPLACEFLAGS}
libalpm version : ${LIB_VERSION}
libalpm version info : ${LIB_VERSION_INFO}