2 # Process this file with autoconf to produce a configure script.
5 AC_INIT([barry], [0.7], [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";LIBUSB_CFLAGS="-I/usr/include" LIBUSB_LIBS="-lusb"])
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)
45 AC_SUBST(LIBUSB_CFLAGS)
48 AM_CONDITIONAL([WITH_BOOST], [test "$BOOST_ENABLED" = "true"])
50 # Checks for libraries.
51 #AC_CHECK_LIB([IOKit], [main])
52 AC_CHECK_LIB([pthread], [main])
53 #AC_CHECK_LIB([libusb], [libusb_init])
55 # Checks for header files.
58 AC_CHECK_HEADERS([assert.h stdint.h time.h])
60 # Checks for typedefs, structures, and compiler characteristics.
65 # Checks for library functions.
67 AC_PROG_GCC_TRADITIONAL
71 AC_FUNC_SELECT_ARGTYPES
73 AC_CHECK_FUNCS([bzero gettimeofday memset select strcasecmp strchr strerror strtol strtoul])
76 AC_CONFIG_FILES([Makefile