Root/configure.ac

1# -*- Autoconf -*-
2# Process this file with autoconf to produce a configure script.
3
4AC_PREREQ(2.63)
5AC_INIT([xburst-tools], [0.1])
6AC_CONFIG_AUX_DIR(m4)
7AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
8AM_CONFIG_HEADER([config.h])
9
10AM_MAINTAINER_MODE
11
12AC_ARG_ENABLE([firmware],
13 [AS_HELP_STRING([--disable-firmware],
14  [Do not build initialization code]
15  [(for example, because some other package contains it).])],
16 [
17case "$enableval" in
18yes) firmware=true ;;
19no) firmware=false ;;
20*) AC_MSG_ERROR([bad value $enableval for --enable-firmware]) ;;
21esac],[firmware=false])
22AM_CONDITIONAL([COND_FIRMWARE], [test "$firmware" = true])
23
24# Checks for programs.
25AC_PROG_CC
26AC_PROG_CXX
27
28# Checks for libraries.
29AC_CHECK_LIB([c], [main])
30AC_CHECK_LIB([confuse], [main], [], [
31echo "Error! You need to have libconfuse."
32echo "Maybe run 'sudo apt-get install libconfuse-dev' under debian"
33exit -1 ])
34AC_CHECK_LIB([gcc], [main])
35AC_CHECK_LIB([m], [main])
36AC_CHECK_LIB([usb], [main], [], [
37echo "Error! You need to have libusb. \n"
38echo "Maybe run 'sudo apt-get install libusb-dev' under debian"
39exit -1 ])
40
41LIBS="$LIBS $USB_LIBS"
42CFLAGS="$CFLAGS $USB_CFLAGS"
43
44# Checks for header files.
45AC_HEADER_STDC
46AC_CHECK_HEADERS([fcntl.h stdint.h stdlib.h string.h unistd.h])
47
48# Checks for typedefs, structures, and compiler characteristics.
49AC_C_INLINE
50AC_TYPE_SIZE_T
51AC_TYPE_UINT8_T
52
53# Checks for library functions.
54AC_FUNC_MALLOC
55AC_FUNC_MEMCMP
56AC_CHECK_FUNCS([memset strerror])
57
58AC_CONFIG_FILES(Makefile \
59        usbboot/Makefile usbboot/src/Makefile \
60        xbboot/Makefile xbboot/host-app/Makefile)
61AC_OUTPUT
62

Archive Download this file



interactive