2 # Process this file with autoconf to produce a configure script.
5 AC_INIT([barry], [0.8], [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 AC_HELP_STRING(--with-boost[=path],
32 [root path of boost installation (no arg defaults to 'yes' and uses system path]),
33 use_boost=$withval, use_boost=no )
35 if test x"$use_boost" != "xyes" ; then
36 if test x"$use_boost" != "xno" ; then
37 BOOST_LIB_PATH=$use_boost/lib
38 BOOST_INC_PATH=$use_boost/include
42 BOOST_LIB_PATH="/usr/lib"
43 BOOST_INC_PATH="/usr/include"
47 PKG_CHECK_MODULES([OPENSSL], [openssl])
49 pkgconfigdir=${libdir}/pkgconfig
50 AC_SUBST(pkgconfigdir)
52 AC_SUBST(BOOST_LIB_PATH)
53 AC_SUBST(BOOST_INC_PATH)
54 AC_SUBST(LIBUSB_CFLAGS)
57 AM_CONDITIONAL([WITH_BOOST], [test "$BOOST_ENABLED" = "true"])
59 # Checks for libraries.
60 #AC_CHECK_LIB([IOKit], [main])
61 AC_CHECK_LIB([pthread], [main])
62 #AC_CHECK_LIB([libusb], [libusb_init])
64 # Checks for header files.
67 AC_CHECK_HEADERS([assert.h stdint.h time.h])
69 # Checks for typedefs, structures, and compiler characteristics.
74 # Checks for library functions.
76 AC_PROG_GCC_TRADITIONAL
80 AC_FUNC_SELECT_ARGTYPES
82 AC_CHECK_FUNCS([bzero gettimeofday memset select strcasecmp strchr strerror strtol strtoul])
85 AC_CONFIG_FILES([Makefile