summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2016-03-10 22:18:27 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2016-03-10 22:18:27 +0000
commit6cd13aba0d95ccc8ebd244cb68389694acf33b1d (patch)
tree1818b95d944379bd70b9e9a40b6c42536eee5753
parentffb631dff6b850648b7421f692301a7033a13d55 (diff)
downloadskalibs-6cd13aba0d95ccc8ebd244cb68389694acf33b1d.tar.xz
Change default SKALIBS_DEFAULTPATH to /usr/bin:/usr/sbin:/bin:/sbin to accommodate s6-linux-init.
Also add /command on slashpackage installations.
-rwxr-xr-xconfigure15
-rw-r--r--doc/flags.html14
2 files changed, 23 insertions, 6 deletions
diff --git a/configure b/configure
index 04eab09..dfaa30d 100755
--- a/configure
+++ b/configure
@@ -46,7 +46,7 @@ $package options:
--enable-clock use clock_gettime() instead of gettimeofday() [disabled]
--enable-monotonic count time with CLOCK_MONOTONIC instead of CLOCK_REALTIME
--enable-force-devr assume /dev/random exists and is valid [autodetection takes time]
- --with-default-path=PATH default executable search path [/usr/bin:/bin]
+ --with-default-path=PATH default executable search path [/usr/bin:/usr/sbin:/bin:/sbin]
EOF
exit 0
@@ -191,7 +191,9 @@ taiclock=false
clockrt=false
clockmon=false
forcedevr=false
-defaultpath=/usr/bin:/bin
+ddefaultpath=/usr/bin:/usr/sbin:/bin:/sbin
+defaultpath=$ddefaultpath
+dpathorig=true
sproot=
home=
exthome=
@@ -242,8 +244,8 @@ for arg ; do
--disable-monotonic|--enable-monotonic=no) clockmon=false ;;
--enable-force-devr|--enable-force-devr=yes) forcedevr=true ;;
--disable-force-devr|--enable-force-devr=no) forcedevr=false ;;
- --with-default-path=*) defaultpath=${arg#*=} ;;
- --without-default-path) defaultpath=/usr/bin:/bin ;;
+ --with-default-path=*) defaultpath=${arg#*=} ; dpathorig=false ;;
+ --without-default-path) defaultpath=$ddefaultpath ; dpathorig=true ;;
--enable-*|--disable-*|--with-*|--without-*|--*dir=*|--build=*) ;;
--host=*|--target=*) target=${arg#*=} ;;
-* ) echo "$0: unknown option $arg" ;;
@@ -298,6 +300,11 @@ if $slashpackage ; then
dynlibdir=${home}/library.so
libdir=${home}/library
includedir=${home}/include
+ if $dpathorig ; then
+ if echo $defaultpath | tr : '\n' | grep -q '^/command$' ; then : ; else
+ defaultpath="/command:$defaultpath"
+ fi
+ fi
fi
# Find a C compiler to use
diff --git a/doc/flags.html b/doc/flags.html
index e2db5ba..5dfcffd 100644
--- a/doc/flags.html
+++ b/doc/flags.html
@@ -34,7 +34,17 @@ If you enable it, and $v is the version of skalibs you're compiling,
<tt>/package/prog/skalibs-$v/library</tt>, the dynamic libraries in
<tt>/package/prog/skalibs-$v/library.so</tt> and the data files in
<tt>/package/prog/skalibs-$v/etc</tt>, all prefixed by <em>sproot</em>
-if present. It will also add two more "make" targets:
+if present.
+</p>
+
+<p>
+ It will also prepend the default path with <tt>/command</tt>, unless an
+explicit default path has been given via the
+<a href="#defaultpath"><tt>--with-default-path</tt></a> option.
+</p>
+
+<p>
+ Additionally, it will add two more "make" targets:
</p>
<ul>
@@ -273,7 +283,7 @@ the value of the PATH environment variable as its executable search path.
Specifying this option to configure tells execvep() what executable
search path to use when PATH is undefined (which should not happen
often anyway).
- The default is <tt>/usr/bin:/bin</tt>, which is usually safe.
+ The default is <tt>/usr/bin:/usr/sbin:/bin:/sbin</tt>, which is usually safe.
</p>
</body>