]> pilppa.com Git - libcharencoding.git/commitdiff
support for /usr/local/lib64 dir
authorMika Laitio <lamikr@pilppa.org>
Sat, 14 Jul 2012 16:20:48 +0000 (19:20 +0300)
committerMika Laitio <lamikr@pilppa.org>
Sat, 14 Jul 2012 16:20:48 +0000 (19:20 +0300)
Signed-off-by: Mika Laitio <lamikr@pilppa.org>
autobuild.sh

index 97c69a9e3326999b844d0aea71f4fb69b83e2592..81ccb79a204820edbe945cd73fc65181d76c82b0 100755 (executable)
@@ -1,16 +1,22 @@
 #!/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 "generating build system files for target platform"
+       echo "No Makefile available, generating it."
        libtoolize --automake --force --copy
-       aclocal
-       autoheader
-       touch stamp-h
-       autoconf
-       automake -a -c
-        ./configure --prefix=/usr/local
+       autoreconf --install
+        ./configure --prefix=$PREFIX --libdir=$LIBDIR
 else
-       echo "no need to generate makefiles"
+       echo "Makefile found, no need to generate it."
 fi
 make