about summary refs log tree commit diff
path: root/configure
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2015-08-12 13:06:39 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2015-08-12 13:06:39 +0000
commit8895415c53ba7a3c8db187266e3b9dee225a3b6d (patch)
treeeba58b4c9eb3c2a2d626760c765ddd16249d8d71 /configure
parent01396a1a038c254535d25c1145e5cf3054241a6a (diff)
downloads6-8895415c53ba7a3c8db187266e3b9dee225a3b6d.tar.gz
s6-8895415c53ba7a3c8db187266e3b9dee225a3b6d.tar.xz
s6-8895415c53ba7a3c8db187266e3b9dee225a3b6d.zip
xyzzy fix (fixes https://bugs.gentoo.org/show_bug.cgi?id=541092)
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure14
1 files changed, 10 insertions, 4 deletions
diff --git a/configure b/configure
index d8d62e8..23bef2c 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]
+  --datadir=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.
@@ -132,6 +133,7 @@ bindir='$exec_prefix/bin'
 sbindir='$exec_prefix/sbin'
 libdir='$prefix/lib/$package'
 includedir='$prefix/include'
+datadir='$prefix/etc'
 sysdeps='$prefix/lib/skalibs/sysdeps'
 manualsysdeps=false
 shared=false
@@ -160,6 +162,7 @@ for arg ; do
     --sbindir=*) sbindir=${arg#*=} ;;
     --libdir=*) libdir=${arg#*=} ;;
     --includedir=*) includedir=${arg#*=} ;;
+    --datadir=*) datadir=${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" ;;
@@ -201,7 +204,7 @@ fi
 
 # Expand installation directories
 stripdir prefix
-for i in exec_prefix dynlibdir libexecdir bindir sbindir libdir includedir sysdeps sproot skalibs ; do
+for i in exec_prefix dynlibdir libexecdir bindir sbindir libdir includedir datadir sysdeps sproot skalibs ; do
   eval tmp=\${$i}
   eval $i=$tmp
   stripdir $i
@@ -335,6 +338,7 @@ bindir := $bindir
 sbindir := $sbindir
 libdir := $libdir
 includedir := $includedir
+datadir := $datadir
 sysdeps := $sysdeps
 slashpackage := $slashpackage
 sproot := $sproot
@@ -354,14 +358,15 @@ LDFLAGS := $LDFLAGS_AUTO
 LDFLAGS_NOSHARED := $LDFLAGS_NOSHARED
 CROSS_COMPILE := $cross
 
-vpath lib%a$vpaths
+vpath lib%.a$vpaths
+vpath lib%.so$vpathd
 EOF
 if $allstatic ; then
   echo ".LIBPATTERNS := lib%.a"
   echo "DO_ALLSTATIC := 1"
-  vpathd=
+else
+  echo ".LIBPATTERNS := lib%.so"
 fi
-  echo "vpath lib%.so$vpathd"
 if $static ; then
   echo "DO_STATIC := 1"
 else
@@ -388,6 +393,7 @@ cat <<EOF
 #define ${package_macro_name}_CONFIG_H
 
 #define ${package_macro_name}_VERSION "$version"
+#define ${package_macro_name}_ETC "$datadir"
 EOF
 if $slashpackage ; then
   echo "#define ${package_macro_name}_BINPREFIX \"$binprefix/\""