configure.ac |
46 | 46 | AC_CHECK_LIB([gcc], [main]) |
47 | 47 | AC_CHECK_LIB([m], [main]) |
48 | 48 | AC_CHECK_LIB([usb], [main], [], [ |
49 | | echo "Error! You need to have libusb. \n" |
| 49 | echo "Error! You need to have libusb-0.1. \n" |
50 | 50 | echo "Maybe run 'sudo apt-get install libusb-dev' under debian" |
51 | 51 | exit -1 ]) |
| 52 | AC_CHECK_LIB([usb-1.0], [main], [], [ |
| 53 | echo "Error! You need to have libusb-1.0. \n" |
| 54 | echo "Maybe run 'sudo apt-get install libusb1.0-0-dev' under debian" |
| 55 | exit -1 ]) |
| 56 | |
| 57 | AC_ARG_WITH([readline], |
| 58 | [AS_HELP_STRING([--with-readline], |
| 59 | [support fancy command line editing @<:@default=check@:>@])], |
| 60 | [], |
| 61 | [with_readline=check]) |
| 62 | |
| 63 | READLINE_LIBS= |
| 64 | AS_IF([test "x$with_readline" != xno], |
| 65 | [AC_CHECK_LIB([readline], [main], |
| 66 | [AC_SUBST([READLINE_LIBS], ["-lreadline -lncurses"]) |
| 67 | AC_DEFINE([HAVE_READLINE], [1], |
| 68 | [Define if you have libreadline]) |
| 69 | ], |
| 70 | [if test "x$with_readline" != xcheck; then |
| 71 | AC_MSG_FAILURE( |
| 72 | [--with-readline was given, but test for readline failed]) |
| 73 | fi |
| 74 | ], -lncurses)]) |
52 | 75 | |
53 | | LIBS="$LIBS $USB_LIBS" |
| 76 | LIBS="$LIBS $USB_LIBS $READLINE_LIBS" |
54 | 77 | CFLAGS="$CFLAGS $USB_CFLAGS" |
55 | 78 | |
56 | 79 | # Checks for header files. |
... | ... | |
70 | 93 | AC_CONFIG_FILES(Makefile \ |
71 | 94 | usbboot/Makefile usbboot/src/Makefile \ |
72 | 95 | xbboot/Makefile xbboot/host-app/Makefile \ |
73 | | jzboot/Makefile) |
| 96 | jzboot/Makefile jzboot/src/Makefile) |
74 | 97 | AC_OUTPUT |