X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=autogen.sh;h=4c834b6d6132ffdadf0e22cba15bff3b42070f15;hp=55a115d4e3b3d3fa814301908dc11855cbc6ca0f;hb=b8079ae19b41c9b61850c796dddc601b826850e0;hpb=1c7dde3e475978c569a982d65fd86d4b4e3caad8 diff --git a/autogen.sh b/autogen.sh index 55a115d4e..4c834b6d6 100755 --- a/autogen.sh +++ b/autogen.sh @@ -52,6 +52,10 @@ if type -p colorgcc > /dev/null ; then export CC=colorgcc fi +libdir() { + echo $(cd $1/$(gcc -print-multi-os-directory); pwd) +} + if [ "x$1" = "xam" ] ; then run_versioned automake "$AM_VERSION" -a -c --foreign ./config.status @@ -67,7 +71,13 @@ else run_versioned automake "$AM_VERSION" --copy --foreign --add-missing if [ "x$1" != "xac" ]; then - CFLAGS="$CFLAGS -g -O0" ./configure --sysconfdir=/etc --localstatedir=/var --with-rootdir= --libexecdir=/usr/lib "$@" + CFLAGS="$CFLAGS -g -O0" ./configure \ + --sysconfdir=/etc \ + --localstatedir=/var \ + --libexecdir=/usr/lib \ + --libdir=$(libdir /usr/local/lib) \ + --with-rootprefix= \ + "$@" make clean fi fi