about summary refs log tree commit diff
path: root/configure
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2016-10-16 21:15:25 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2016-10-16 21:15:25 +0000
commit6f66618a9530bc7ac741217913b682d553b920a5 (patch)
tree190470d540c036d7f82f8e3ce41bb81b7ade7da7 /configure
parenta4a4cc2f1c546915fbb9efe8e21a1189d235b18c (diff)
downloadexecline-6f66618a9530bc7ac741217913b682d553b920a5.tar.gz
execline-6f66618a9530bc7ac741217913b682d553b920a5.tar.xz
execline-6f66618a9530bc7ac741217913b682d553b920a5.zip
Implement --enable-absolute-paths
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure28
1 files changed, 14 insertions, 14 deletions
diff --git a/configure b/configure
index f315069..780384a 100755
--- a/configure
+++ b/configure
@@ -19,7 +19,6 @@ Installation directories:
 Fine tuning of the installation directories:
   --dynlibdir=DIR               shared library files [PREFIX/lib]
   --bindir=BINDIR               user executables [EPREFIX/bin]
-  --sbindir=DIR                 admin executables [EPREFIX/sbin]
   --libexecdir=DIR              package-scoped executables [EPREFIX/libexec]
   --libdir=DIR                  static library files [PREFIX/lib/$package]
   --includedir=DIR              C header files [PREFIX/include]
@@ -43,6 +42,8 @@ Optional features:
   --disable-allstatic           do not prefer linking against static libraries [enabled]
   --enable-static-libc          make entirely static binaries [disabled]
   --enable-slashpackage[=ROOT]  assume /package installation at ROOT [disabled]
+  --enable-absolute-paths       do not rely on PATH to access this package's binaries,
+                                  hardcode absolute BINDIR/foobar paths instead [disabled]
 
 EOF
 exit 0
@@ -130,7 +131,6 @@ exec_prefix='$prefix'
 dynlibdir='$prefix/lib'
 libexecdir='$exec_prefix/libexec'
 bindir='$exec_prefix/bin'
-sbindir='$exec_prefix/sbin'
 libdir='$prefix/lib/$package'
 includedir='$prefix/include'
 shebangdir='$bindir'
@@ -139,6 +139,7 @@ manualsysdeps=false
 shared=false
 static=true
 slashpackage=false
+abspath=false
 sproot=
 home=
 exthome=
@@ -159,7 +160,6 @@ for arg ; do
     --dynlibdir=*) dynlibdir=${arg#*=} ;;
     --libexecdir=*) libexecdir=${arg#*=} ;;
     --bindir=*) bindir=${arg#*=} ;;
-    --sbindir=*) sbindir=${arg#*=} ;;
     --libdir=*) libdir=${arg#*=} ;;
     --includedir=*) includedir=${arg#*=} ;;
     --shebangdir=*) shebangdir=${arg#*=} ;;
@@ -178,6 +178,8 @@ for arg ; do
     --enable-slashpackage=*) sproot=${arg#*=} ; slashpackage=true ; ;;
     --enable-slashpackage) sproot= ; slashpackage=true ;;
     --disable-slashpackage) sproot= ; slashpackage=false ;;
+    --enable-absolute-paths|--enable-absolute-paths=yes) abspath=true ;;
+    --disable-absolute-paths|--enable-absolute-paths=no) abspath=false ;;
     --enable-*|--disable-*|--with-*|--without-*|--*dir=*) ;;
     --host=*|--target=*) target=${arg#*=} ;;
     --build=*) build=${arg#*=} ;;
@@ -202,7 +204,7 @@ fi
 
 # Expand installation directories
 stripdir prefix
-for i in exec_prefix dynlibdir libexecdir bindir sbindir libdir includedir shebangdir sysdeps sproot ; do
+for i in exec_prefix dynlibdir libexecdir bindir libdir includedir shebangdir sysdeps sproot ; do
   eval tmp=\${$i}
   eval $i=$tmp
   stripdir $i
@@ -231,13 +233,11 @@ if $slashpackage ; then
   else
     sysdeps=${sproot}/package/prog/skalibs/sysdeps
   fi
-  binprefix=${home}/command
   extbinprefix=${exthome}/command
   dynlibdir=${home}/library.so
-  libexecdir=$binprefix
-  bindir=$binprefix
-  sbindir=$binprefix
+  bindir=${home}/command
   libdir=${home}/library
+  libexecdir=$bindir
   includedir=${home}/include
   while read dep ; do
     addincpath="$addincpath -I${sproot}${dep}/include"
@@ -355,7 +355,6 @@ exec_prefix := $exec_prefix
 dynlibdir := $dynlibdir
 libexecdir := $libexecdir
 bindir := $bindir
-sbindir := $sbindir
 libdir := $libdir
 includedir := $includedir
 sysdeps := $sysdeps
@@ -415,16 +414,17 @@ cat <<EOF
 #define ${package_macro_name}_VERSION "$version"
 EOF
 if $slashpackage ; then
-  echo "#define ${package_macro_name}_BINPREFIX \"$binprefix/\""
+  echo "#define ${package_macro_name}_BINPREFIX \"$bindir/\""
   echo "#define ${package_macro_name}_EXTBINPREFIX \"$extbinprefix/\""
-  echo "#define ${package_macro_name}_LIBEXECPREFIX \"$binprefix/\""
-  echo "#define ${package_macro_name}_SHEBANGPREFIX \"$extbinprefix/\""
+elif $abspath ; then
+  echo "#define ${package_macro_name}_BINPREFIX \"$bindir/\""
+  echo "#define ${package_macro_name}_EXTBINPREFIX \"$bindir/\""
 else
   echo "#define ${package_macro_name}_BINPREFIX \"\""
   echo "#define ${package_macro_name}_EXTBINPREFIX \"\""
-  echo "#define ${package_macro_name}_LIBEXECPREFIX \"$libexecdir/\""
-  echo "#define ${package_macro_name}_SHEBANGPREFIX \"$shebangdir/\""
 fi
+echo "#define ${package_macro_name}_LIBEXECPREFIX \"$libexecdir/\""
+echo "#define ${package_macro_name}_SHEBANGPREFIX \"$shebangdir/\""
 echo
 echo "#endif"
 exec 1>&3 3>&-