From c26a0ce1da3bde5a48d8919372a7b647277dd1eb Mon Sep 17 00:00:00 2001 From: Peter Zotov Date: Tue, 5 Apr 2011 19:56:25 +0400 Subject: [PATCH] Adjusted configure.ac to search for libraries required for jzboot. --- configure.ac | 29 ++++++++++++++++++++++++++--- jzboot | 2 +- 2 files changed, 27 insertions(+), 4 deletions(-) diff --git a/configure.ac b/configure.ac index 80451e5..f1e6600 100644 --- a/configure.ac +++ b/configure.ac @@ -46,11 +46,34 @@ exit -1 ]) AC_CHECK_LIB([gcc], [main]) AC_CHECK_LIB([m], [main]) AC_CHECK_LIB([usb], [main], [], [ -echo "Error! You need to have libusb. \n" +echo "Error! You need to have libusb-0.1. \n" echo "Maybe run 'sudo apt-get install libusb-dev' under debian" exit -1 ]) +AC_CHECK_LIB([usb-1.0], [main], [], [ +echo "Error! You need to have libusb-1.0. \n" +echo "Maybe run 'sudo apt-get install libusb1.0-0-dev' under debian" +exit -1 ]) -LIBS="$LIBS $USB_LIBS" +AC_ARG_WITH([readline], + [AS_HELP_STRING([--with-readline], + [support fancy command line editing @<:@default=check@:>@])], + [], + [with_readline=check]) + +READLINE_LIBS= +AS_IF([test "x$with_readline" != xno], + [AC_CHECK_LIB([readline], [main], + [AC_SUBST([READLINE_LIBS], ["-lreadline -lncurses"]) + AC_DEFINE([HAVE_READLINE], [1], + [Define if you have libreadline]) + ], + [if test "x$with_readline" != xcheck; then + AC_MSG_FAILURE( + [--with-readline was given, but test for readline failed]) + fi + ], -lncurses)]) + +LIBS="$LIBS $USB_LIBS $READLINE_LIBS" CFLAGS="$CFLAGS $USB_CFLAGS" # Checks for header files. @@ -70,5 +93,5 @@ AC_CHECK_FUNCS([memset strerror]) AC_CONFIG_FILES(Makefile \ usbboot/Makefile usbboot/src/Makefile \ xbboot/Makefile xbboot/host-app/Makefile \ - jzboot/Makefile) + jzboot/Makefile jzboot/src/Makefile) AC_OUTPUT diff --git a/jzboot b/jzboot index ce7446f..8b4338f 160000 --- a/jzboot +++ b/jzboot @@ -1 +1 @@ -Subproject commit ce7446fd4c4743a685aa1d85b852743874c034c3 +Subproject commit 8b4338fc90376ed10d814f8ae2ca1a0a4436c049