[PATCH] autoconf: add error message when check lib usb and confuse failed. And prompts user to install the lib.

ZhangJieJing kzjeef at gmail.com
Tue Aug 4 20:09:27 EDT 2009

Signed-off-by: JieJing.Zhang <kzjeef at gmail.com>
 usbboot/configure.ac |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/usbboot/configure.ac b/usbboot/configure.ac
index 97e171e..ded38b0 100644
--- a/usbboot/configure.ac
+++ b/usbboot/configure.ac
@@ -15,10 +15,16 @@ AC_PROG_CXX

 # Checks for libraries.
 AC_CHECK_LIB([c], [main])
-AC_CHECK_LIB([confuse], [main])
+AC_CHECK_LIB([confuse], [main], [], [
+echo "Error! You need to have libconfuse."
+echo "Maybe run 'sudo apt-get install libconfuse-dev' under debian"
+exit -1 ])
 AC_CHECK_LIB([gcc], [main])
 AC_CHECK_LIB([m], [main])
-AC_CHECK_LIB([usb], [main])
+AC_CHECK_LIB([usb], [main], [], [
+echo "Error! You need to have libconfuse. \n"
+echo "Maybe run 'sudo apt-get install libusb-dev' under debian"
+exit -1 ])


Best regards,
Zhang Jiejing
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.en.qi-hardware.com/pipermail/discussion/attachments/20090805/12626783/attachment.htm>

More information about the discussion mailing list