From 68c706da8c9ed5d7bc32d41d7cce86531eb2a673 Mon Sep 17 00:00:00 2001 From: Brody Kenrick Date: Thu, 12 Dec 2013 17:48:55 +1100 Subject: Fix check_dependencies for Ubuntu 12.10 and ... ... and other platforms that report a different arch triplet than where they store their libraries) check-dependencies.sh doesn't find glib2 on Ubuntu 12.10 since glib is installed in /usr/lib/i386-linux-gnu/glib-2.0/include/glibconfig.h while gcc -dumpmachine reports the arch as i686-linux-gnu diff --git a/scripts/check-dependencies.sh b/scripts/check-dependencies.sh index e587198..c431255 100755 --- a/scripts/check-dependencies.sh +++ b/scripts/check-dependencies.sh @@ -74,7 +74,19 @@ glib2_sysver() glib2archtriplet=`dpkg-architecture -qDEB_HOST_MULTIARCH 2>/dev/null` fi glib2path=$1/lib/$glib2archtriplet/glib-2.0/include/glibconfig.h - if [ ! -e $glib2path ]; then return; fi + if [ ! -e $glib2path ]; then + #No glib found + #glib can be installed in /usr/lib/i386-linux-gnu/glib-2.0/ on arch i686-linux-gnu (sometimes?) + if [ $glib2archtriplet = "i686-linux-gnu" ]; then + glib2archtriplet=i386-linux-gnu + glib2path=$1/lib/$glib2archtriplet/glib-2.0/include/glibconfig.h + if [ ! -e $glib2path ]; then + return; + fi + else + return; + fi + fi glib2major=`grep "define *GLIB_MAJOR_VERSION *[0-9.]*" $glib2path | awk '{print $3}'` glib2minor=`grep "define *GLIB_MINOR_VERSION *[0-9.]*" $glib2path | awk '{print $3}'` glib2micro=`grep "define *GLIB_MICRO_VERSION *[0-9.]*" $glib2path | awk '{print $3}'` -- cgit v0.10.1