summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure27
1 files changed, 24 insertions, 3 deletions
diff --git a/configure b/configure
index efee0c9..bbc68e7 100755
--- a/configure
+++ b/configure
@@ -23,6 +23,7 @@ Fine tuning of the installation directories:
--libexecdir=DIR package-scoped executables [EPREFIX/libexec]
--libdir=DIR static library files [PREFIX/lib/$package]
--includedir=DIR C header files [PREFIX/include]
+ --sysconfdir=DIR global configuration files [PREFIX/etc]
If no --prefix option is given, by default libdir (but not dynlibdir) will be
/usr/lib/$package, and includedir will be /usr/include.
@@ -133,13 +134,14 @@ LDFLAGS_POST="$LDFLAGS"
LDFLAGS=
LDFLAGS_NOSHARED=
LDFLAGS_SHARED=-shared
-prefix=/usr
+prefix=
exec_prefix='$prefix'
dynlibdir='$prefix/lib'
libexecdir='$exec_prefix/libexec'
bindir='$exec_prefix/bin'
libdir='$prefix/lib/$package'
includedir='$prefix/include'
+sysconfdir='$prefix/etc'
sysdeps='$prefix/lib/skalibs/sysdeps'
manualsysdeps=false
shared=false
@@ -169,6 +171,7 @@ for arg ; do
--bindir=*) bindir=${arg#*=} ;;
--libdir=*) libdir=${arg#*=} ;;
--includedir=*) includedir=${arg#*=} ;;
+ --sysconfdir=*) sysconfdir=${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" ;;
@@ -197,9 +200,25 @@ for arg ; do
esac
done
+# Add /usr in the default default case
+if test -z "$prefix" ; then
+ if test "$libdir" = '$prefix/lib/$package' ; then
+ libdir=/usr/lib/$package
+ fi
+ if test "$dynlibdir" = '$prefix/lib' ; then
+ dynlibdir=/usr/lib
+ fi
+ if test "$includedir" = '$prefix/include' ; then
+ includedir=/usr/include
+ fi
+ if test "$sysdeps" = '$prefix/lib/skalibs/sysdeps' ; then
+ sysdeps=/usr/lib/skalibs/sysdeps
+ fi
+fi
+
# Expand installation directories
stripdir prefix
-for i in exec_prefix dynlibdir libexecdir bindir libdir includedir sysdeps sproot ; do
+for i in exec_prefix dynlibdir libexecdir bindir libdir includedir sysconfdir sysdeps sproot ; do
eval tmp=\${$i}
eval $i=$tmp
stripdir $i
@@ -230,7 +249,6 @@ if $slashpackage ; then
else
sysdeps=${DESTDIR}${sproot}/package/prog/skalibs/sysdeps
fi
- prefix=
extbinprefix=${exthome}/command
dynlibdir=${home}/library.so
bindir=${home}/command
@@ -378,6 +396,7 @@ libexecdir := $libexecdir
bindir := $bindir
libdir := $libdir
includedir := $includedir
+sysconfdir := $sysconfdir
sysdeps := $sysdeps
slashpackage := $slashpackage
sproot := $sproot
@@ -453,6 +472,8 @@ else
echo "#define ${package_macro_name}_EXTBINPREFIX \"\""
fi
echo "#define ${package_macro_name}_LIBEXECPREFIX \"$libexecdir/\""
+echo "#define ${package_macro_name}_SYSCONFPREFIX \"$sysconfdir/\""
+
echo
echo "#endif"
exec 1>&3 3>&-