From: Mika Laitio Date: Sat, 14 Jul 2012 13:29:34 +0000 (+0300) Subject: add support for building in 64 bit systems X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=2f6f82c25955b30fcc88ea2e5c3e075a39129d8b;p=libplp.git add support for building in 64 bit systems If /lib64 dir exist, assume that system is 64 bit and use /usr/local/lib64 instead of /usr/local/lib as an installation dir. Signed-off-by: Mika Laitio --- diff --git a/autobuild.sh b/autobuild.sh index abb7d1c..81ccb79 100755 --- a/autobuild.sh +++ b/autobuild.sh @@ -1,12 +1,21 @@ #!/bin/sh -export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig +PREFIX=${PREFIX:=/usr/local} + +if ! [ -d /lib64 ] ; +then + LIBDIR=${LIBDIR:=$PREFIX/lib} +else + LIBDIR=${LIBDIR:=$PREFIX/lib64} +fi +export PKG_CONFIG_PATH=$LIBDIR/pkgconfig:$PKG_CONFIG_PATH + if ! [ -e Makefile ] ; then echo "No Makefile available, generating it." libtoolize --automake --force --copy - autoreconf --force --install - ./configure --prefix=/usr/local + autoreconf --install + ./configure --prefix=$PREFIX --libdir=$LIBDIR else echo "Makefile found, no need to generate it." fi