]> pilppa.com Git - lib1wire.git/commitdiff
add support for lib64 directory
authorMika Laitio <lamikr@pilppa.org>
Sat, 14 Jul 2012 15:30:05 +0000 (18:30 +0300)
committerMika Laitio <lamikr@pilppa.org>
Sat, 14 Jul 2012 15:30:05 +0000 (18:30 +0300)
Install files by default to /usr/local/lib64
instead of /usr/local/lib if the system is 64 bit
and has /lib64 dir.

Signed-off-by: Mika Laitio <lamikr@pilppa.org>
autobuild.sh

index bb273c027f4c435866b6b09880be8ecb6902bb3c..81ccb79a204820edbe945cd73fc65181d76c82b0 100755 (executable)
@@ -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