From 4d4837484aaf20de156270a9f2bb0b65fb8c01ad Mon Sep 17 00:00:00 2001 From: ZhangJieJing Date: Wed, 5 Aug 2009 08:09:27 +0800 Subject: [PATCH] autoconf: add error message when check lib usb and confuse failed. And prompts user to install the lib. Signed-off-by: JieJing.Zhang --- usbboot/configure.ac | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/usbboot/configure.ac b/usbboot/configure.ac index 97e171e..cca8fb6 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 ]) LIBS="$LIBS $USB_LIBS" CFLAGS="$CFLAGS $USB_CFLAGS"