aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorLasse Collin <lasse.collin@tukaani.org>2019-09-24 23:02:40 +0300
committerLasse Collin <lasse.collin@tukaani.org>2019-09-24 23:02:40 +0300
commit43ce4ea7c762238d3df9717b34126d3e0d7cd51c (patch)
tree2aa9175333e45998536742c059ec4319f9457e6d /configure.ac
parentFix comment typos in tuklib_mbstr* files. (diff)
downloadxz-43ce4ea7c762238d3df9717b34126d3e0d7cd51c.tar.xz
Scripts: Put /usr/xpg4/bin to the beginning of PATH on Solaris.
This adds a configure option --enable-path-for-scripts=PREFIX which defaults to empty except on Solaris it is /usr/xpg4/bin to make POSIX grep and others available. The Solaris case had been documented in INSTALL with a manual fix but it's better to do this automatically since it is needed on most Solaris systems anyway. Thanks to Daniel Richard G.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac26
1 files changed, 26 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 5cd9ca6e..d14fa40d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -516,6 +516,32 @@ case $enable_sandbox in
esac
+###########################
+# PATH prefix for scripts #
+###########################
+
+# The scripts can add a prefix to the search PATH so that POSIX tools
+# or the xz binary is always in the PATH.
+AC_ARG_ENABLE([path-for-scripts],
+ [AS_HELP_STRING([--enable-path-for-scripts=PREFIX],
+ [If PREFIX isn't empty, PATH=PREFIX:$PATH will be set in
+ the beginning of the scripts (xzgrep and others).
+ The default is empty except on Solaris the default is
+ /usr/xpg4/bin.])],
+ [], [
+ case $host_os in
+ solaris*) enable_path_for_scripts=/usr/xpg4/bin ;;
+ *) enable_path_for_scripts= ;;
+ esac
+ ])
+if test -n "$enable_path_for_scripts" && test "x$enable_path_for_scripts" != xno ; then
+ enable_path_for_scripts="PATH=$enable_path_for_scripts:\$PATH"
+else
+ enable_path_for_scripts=
+fi
+AC_SUBST([enable_path_for_scripts])
+
+
###############################################################################
# Checks for programs.
###############################################################################