- added initial, incomplete prototype header for the C API
[barry.git] / configure.ac
blobda6f4755b0f2646f52e53b897bffe92cb5a5d050
1 #                                               -*- Autoconf -*-
2 # Process this file with autoconf to produce a configure script.
4 AC_PREREQ(2.59)
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])
9 AM_INIT_AUTOMAKE
11 # Checks for programs.
12 AC_PROG_CC
13 AC_PROG_CXX
14 AC_PROG_MAKE_SET
15 AC_PROG_LIBTOOL
17 AC_LANG([C++])
19 # generates LIBUSB_CFLAGS and LIBUSB_LIBS for us
20 PKG_CHECK_MODULES([LIBUSB], [libusb],
21         [],
22         [echo "ERROR: Libusb not found automatically... build may fail if you don't specify --with-libusb"])
24 AC_ARG_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"],
28         [])
30 AC_ARG_WITH(boost,
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.
54 AC_HEADER_DIRENT
55 AC_HEADER_STDC
56 AC_CHECK_HEADERS([assert.h stdint.h time.h])
58 # Checks for typedefs, structures, and compiler characteristics.
59 #AC_TYPE_SIZE_T
60 AC_HEADER_TIME
61 AC_STRUCT_TM
63 # Checks for library functions.
64 AC_FUNC_CLOSEDIR_VOID
65 AC_PROG_GCC_TRADITIONAL
66 AC_FUNC_MALLOC
67 AC_FUNC_MKTIME
68 AC_FUNC_REALLOC
69 AC_FUNC_SELECT_ARGTYPES
70 AC_FUNC_STAT
71 AC_CHECK_FUNCS([bzero gettimeofday memset select strcasecmp strchr strerror strtol strtoul])
72 AC_C_BIGENDIAN
74 AC_CONFIG_FILES([Makefile
75                  src/Makefile
76                  tools/Makefile
77                  examples/Makefile
78                  man/Makefile
79                  libbarry-0.pc])
80 AC_OUTPUT