[PATCH] autogen: added glibtool and pkg-config checks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



OSX MacPorts has libtool named as glibtool, with libtoolize
named as glibtoolize.  This patch adds support for this, and also
adds a check for pkg-config, to warn when it is missing.
---
 autogen.sh |   25 ++++++++++++++++++++-----
 1 files changed, 20 insertions(+), 5 deletions(-)

diff --git a/autogen.sh b/autogen.sh
index 01ba59c..810a189 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -25,11 +25,18 @@ DIE=0
 }
 
 (libtool --version) < /dev/null > /dev/null 2>&1 || {
-	echo
-	echo "You must have libtool installed to compile libvirt."
-	echo "Download the appropriate package for your distribution,"
-	echo "or see http://www.gnu.org/software/libtool";
-	DIE=1
+	# GNU libtool wasn't found as "libtool",
+	# so we check if it's known as "glibtool"
+	(glibtool --version) < /dev/null > /dev/null 2>&1 || {
+		echo
+		echo "You must have libtool installed to compile libvirt."
+		echo "Download the appropriate package for your distribution,"
+		echo "or see http://www.gnu.org/software/libtool";
+		DIE=1
+	}
+	# These are only used if glibtool is what we want
+	export LIBTOOL=glibtool
+	export LIBTOOLIZE=glibtoolize
 }
 
 (automake --version) < /dev/null > /dev/null 2>&1 || {
@@ -40,6 +47,14 @@ DIE=0
 	echo "or see http://www.gnu.org/software/automake";
 }
 
+(pkg-config --version) < /dev/null > /dev/null 2>&1 || {
+	echo
+	DIE=1
+	echo "You must have pkg-config installed to compile libvirt."
+	echo "Download the appropriate package for your distribution,"
+	echo "or see http://pkg-config.freedesktop.org";
+}
+
 if test "$DIE" -eq 1; then
 	exit 1
 fi
-- 
1.7.2.2

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]