From 36bb0d4bef08f35be2462b4b0789415d898a0644 Mon Sep 17 00:00:00 2001 From: xiangfu Date: Tue, 9 Jun 2009 19:19:32 +0000 Subject: [PATCH] [flash-tool] add configure.ac --- flash-tool/configure.ac | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 flash-tool/configure.ac diff --git a/flash-tool/configure.ac b/flash-tool/configure.ac new file mode 100644 index 0000000..7ec91ae --- /dev/null +++ b/flash-tool/configure.ac @@ -0,0 +1,39 @@ +# -*- Autoconf -*- +# Process this file with autoconf to produce a configure script. + +AC_PREREQ(2.59) +AC_INIT([inflash],[0.1]) +AC_CONFIG_AUX_DIR(m4) +AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION) +#AC_CONFIG_SRCDIR([src/atmel.c]) +AM_CONFIG_HEADER([config.h]) + +AM_MAINTAINER_MODE + +# Checks for programs. +AC_PROG_CC + +# Checks for libraries. + +PKG_CHECK_MODULES(USB, libusb >= 0.1.4,, + AC_MSG_ERROR([*** Required libusb >= 0.1.4 not installed ***])) +AC_CHECK_LIB([usbpath],[usb_path2devnum],,,-lusb) + +LIBS="$LIBS $USB_LIBS" +CFLAGS="$CFLAGS $USB_CFLAGS" + +# Checks for header files. +AC_HEADER_STDC +AC_CHECK_HEADERS([stdlib.h string.h stdio.h usbpath.h]) + +# Checks for typedefs, structures, and compiler characteristics. +AC_C_CONST +AC_TYPE_SIZE_T + +# Checks for library functions. +AC_FUNC_MALLOC +AC_FUNC_MEMCMP +AC_CHECK_FUNCS([memset]) + +AC_CONFIG_FILES(Makefile src/Makefile ) +AC_OUTPUT