2 # Process this file with autoconf to produce a configure script.
5 AC_INIT([barry], [0.6], [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 PKG_CHECK_MODULES([OPENSSL], [openssl])
40 pkgconfigdir=${libdir}/pkgconfig
41 AC_SUBST(pkgconfigdir)
43 AC_SUBST(BOOST_LIB_PATH)
44 AC_SUBST(BOOST_INC_PATH)
46 AM_CONDITIONAL([WITH_BOOST], [test "$BOOST_ENABLED" = "true"])
48 # Checks for libraries.
49 #AC_CHECK_LIB([IOKit], [main])
50 AC_CHECK_LIB([pthread], [main])
51 #AC_CHECK_LIB([libusb], [libusb_init])
53 # Checks for header files.
56 AC_CHECK_HEADERS([assert.h stdint.h time.h])
58 # Checks for typedefs, structures, and compiler characteristics.
63 # Checks for library functions.
65 AC_PROG_GCC_TRADITIONAL
69 AC_FUNC_SELECT_ARGTYPES
71 AC_CHECK_FUNCS([bzero gettimeofday memset select strcasecmp strchr strerror strtol strtoul])
74 AC_CONFIG_FILES([Makefile