summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure47
1 files changed, 19 insertions, 28 deletions
diff --git a/configure b/configure
index 6ff8675..c941f85 100755
--- a/configure
+++ b/configure
@@ -18,12 +18,11 @@ Installation directories:
Fine tuning of the installation directories:
--dynlibdir=DIR shared library files [PREFIX/lib]
- --bindir=DIR user executables [EPREFIX/bin]
- --sbindir=DIR admin executables [EPREFIX/sbin]
+ --bindir=BINDIR user executables [EPREFIX/bin]
--libexecdir=DIR package-scoped executables [EPREFIX/libexec]
--libdir=DIR static library files [PREFIX/lib/$package]
--includedir=DIR C header files [PREFIX/include]
- --datadir=DATADIR global configuration files [PREFIX/etc]
+ --livedir=DIR default live directory [/run/s6-rc]
If no --prefix option is given, by default libdir (but not dynlibdir) will be
/usr/lib/$package, and includedir will be /usr/include.
@@ -43,7 +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]
- --livedir=DIR default live directory [/run/s6-rc]
+ --enable-absolute-paths do not rely on PATH to access this package's binaries,
+ hardcode absolute BINDIR/foobar paths instead [disabled]
EOF
exit 0
@@ -131,15 +131,15 @@ 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'
-datadir='$prefix/etc'
+livedir=/run/s6-rc
sysdeps='$prefix/lib/skalibs/sysdeps'
manualsysdeps=false
shared=false
static=true
slashpackage=false
+abspath=false
sproot=
home=
exthome=
@@ -151,7 +151,6 @@ addlibdpath=''
vpaths=''
vpathd=''
build=
-livedir=/run/s6-rc
for arg ; do
case "$arg" in
@@ -161,10 +160,9 @@ for arg ; do
--dynlibdir=*) dynlibdir=${arg#*=} ;;
--libexecdir=*) libexecdir=${arg#*=} ;;
--bindir=*) bindir=${arg#*=} ;;
- --sbindir=*) sbindir=${arg#*=} ;;
--libdir=*) libdir=${arg#*=} ;;
--includedir=*) includedir=${arg#*=} ;;
- --datadir=*) datadir=${arg#*=} ;;
+ --livedir=*) livedir=${arg#*=} ;;
--with-sysdeps=*) sysdeps=${arg#*=} manualsysdeps=true ;;
--with-include=*) var=${arg#*=} ; stripdir var ; addincpath="$addincpath -I$var" ;;
--with-lib=*) var=${arg#*=} ; stripdir var ; addlibspath="$addlibspath -L$var" ; vpaths="$vpaths $var" ;;
@@ -180,10 +178,8 @@ for arg ; do
--enable-slashpackage=*) sproot=${arg#*=} ; slashpackage=true ; ;;
--enable-slashpackage) sproot= ; slashpackage=true ;;
--disable-slashpackage) sproot= ; slashpackage=false ;;
- --enable-cross=*) cross=${arg#*=} ;;
- --enable-cross) ;;
- --disable-cross) cross= ;;
- --livedir=*) livedir=${arg#*=} ;;
+ --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#*=} ;;
@@ -208,7 +204,7 @@ fi
# Expand installation directories
stripdir prefix
-for i in exec_prefix dynlibdir libexecdir bindir sbindir libdir includedir datadir sysdeps sproot livedir ; do
+for i in exec_prefix dynlibdir libexecdir bindir libdir includedir sysdeps sproot livedir ; do
eval tmp=\${$i}
eval $i=$tmp
stripdir $i
@@ -237,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"
@@ -318,6 +312,8 @@ tryflag CFLAGS_AUTO -fdata-sections
tryldflag LDFLAGS_AUTO -Wl,--sort-section=alignment
tryldflag LDFLAGS_AUTO -Wl,--sort-common
+CPPFLAGS_AUTO="${CPPFLAGS_AUTO}${addincpath}"
+
if $evenmorestatic ; then
LDFLAGS_NOSHARED=-static
fi
@@ -343,8 +339,6 @@ if test -z "$vpaths" ; then
done < package/deps-build
fi
-CPPFLAGS_AUTO="$CPPFLAGS_AUTO $addincpath"
-
echo "creating config.mak..."
cmdline=$(quote "$0")
for i ; do cmdline="$cmdline $(quote "$i")" ; done
@@ -361,10 +355,8 @@ exec_prefix := $exec_prefix
dynlibdir := $dynlibdir
libexecdir := $libexecdir
bindir := $bindir
-sbindir := $sbindir
libdir := $libdir
includedir := $includedir
-datadir := $datadir
sysdeps := $sysdeps
slashpackage := $slashpackage
sproot := $sproot
@@ -420,20 +412,19 @@ cat <<EOF
#define ${package_macro_name}_CONFIG_H
#define ${package_macro_name}_VERSION "$version"
-#define ${package_macro_name}_ETC "$datadir"
#define ${package_macro_name}_LIVE_BASE "$livedir"
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}_EXTLIBEXECPREFIX \"$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}_EXTLIBEXECPREFIX \"$libexecdir/\""
fi
+echo "#define ${package_macro_name}_LIBEXECPREFIX \"$libexecdir/\""
echo
echo "#endif"
exec 1>&3 3>&-