X-Git-Url: http://pilppa.org/gitweb/?a=blobdiff_plain;f=autobuild.sh;h=81ccb79a204820edbe945cd73fc65181d76c82b0;hb=4af5efbcb117bb22bdba861a5ca784cd2f9d6d24;hp=c3185915ac8428cf8424c807c6ca7e17772ba447;hpb=561391b3405e5742124b21cf0af3d68347fd6221;p=libplpha.git diff --git a/autobuild.sh b/autobuild.sh index c318591..81ccb79 100755 --- a/autobuild.sh +++ b/autobuild.sh @@ -1,11 +1,21 @@ #!/bin/sh +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 - PKG_CONFIG_PATH=/usr/local/lib/pkgconfig ./configure --prefix=/usr/local + autoreconf --install + ./configure --prefix=$PREFIX --libdir=$LIBDIR else echo "Makefile found, no need to generate it." fi