X-Git-Url: http://pilppa.org/gitweb/?p=libplp.git;a=blobdiff_plain;f=autobuild.sh;fp=autobuild.sh;h=81ccb79a204820edbe945cd73fc65181d76c82b0;hp=abb7d1c508e2e89b43e1fbdf38b1b7285ecc1cff;hb=2f6f82c25955b30fcc88ea2e5c3e075a39129d8b;hpb=1b7094dbd40c5d645e473f2a179d01df6ecced52 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