From 43ce4ea7c762238d3df9717b34126d3e0d7cd51c Mon Sep 17 00:00:00 2001 From: Lasse Collin Date: Tue, 24 Sep 2019 23:02:40 +0300 Subject: 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. --- configure.ac | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'configure.ac') 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. ############################################################################### -- cgit v1.2.3