2 # Process this file with autoconf to produce a configure script.
5 AC_INIT([barry], [0.5], [barry-devel@lists.sourceforge.net])
6 #AM_CONFIG_HEADER(config.h)
7 AC_CONFIG_SRCDIR([src/barry.h])
8 AC_CONFIG_HEADERS([config.h:config.h.in])
11 # Checks for programs.
19 # generates LIBUSB_CFLAGS and LIBUSB_LIBS for us
20 PKG_CHECK_MODULES([LIBUSB], [libusb],
22 [echo "ERROR: Libusb not found automatically... build may fail if you don't specify --with-libusb"])
25 [ --with-libusb=<path> root path of libusb installation],
26 [LIBUSB_CFLAGS="-I$with_libusb/include"
27 LIBUSB_LIBS="-L$with_libusb/lib -lusb"],
31 [ --with-boost=<path> root path of boost installation (default=no boost)],
32 [BOOST_LIB_PATH="$with_boost/lib"
33 BOOST_INC_PATH="$with_boost/include"
34 BOOST_ENABLED="true"],
35 [BOOST_LIB_PATH="/usr/lib"
36 BOOST_INC_PATH="/usr/include"])
38 pkgconfigdir=${libdir}/pkgconfig
39 AC_SUBST(pkgconfigdir)
41 AC_SUBST(BOOST_LIB_PATH)
42 AC_SUBST(BOOST_INC_PATH)
44 AM_CONDITIONAL([WITH_BOOST], [test "$BOOST_ENABLED" = "true"])
46 # Checks for libraries.
47 #AC_CHECK_LIB([IOKit], [main])
48 AC_CHECK_LIB([pthread], [main])
49 #AC_CHECK_LIB([libusb], [libusb_init])
51 # Checks for header files.
54 AC_CHECK_HEADERS([assert.h stdint.h time.h])
56 # Checks for typedefs, structures, and compiler characteristics.
61 # Checks for library functions.
63 AC_PROG_GCC_TRADITIONAL
67 AC_FUNC_SELECT_ARGTYPES
69 AC_CHECK_FUNCS([bzero gettimeofday memset select strcasecmp strchr strerror strtol strtoul])
72 AC_CONFIG_FILES([Makefile