blob: 191f8e96af3a56f751d83ac2ccdbf4ba8a502854 [file] [log] [blame]
Daniel Drakee9364d72008-01-04 00:40:49 +00001AC_INIT([libusb], [0.9.0])
Daniel Drake852bba42007-11-28 13:48:45 +00002AM_INIT_AUTOMAKE
Daniel Drakee9364d72008-01-04 00:40:49 +00003AC_CONFIG_SRCDIR([libusb/core.c])
Daniel Drake852bba42007-11-28 13:48:45 +00004AM_CONFIG_HEADER([config.h])
5
6AC_PREREQ([2.50])
7AC_PROG_CC
8AC_PROG_LIBTOOL
9AC_C_INLINE
10AM_PROG_CC_C_O
11
12# Library versioning
13lt_major="0"
14lt_revision="0"
15lt_age="0"
16AC_SUBST(lt_major)
17AC_SUBST(lt_revision)
18AC_SUBST(lt_age)
19
20# Message logging
21AC_ARG_ENABLE([log], [AS_HELP_STRING([--disable-log], [disable all logging])],
22 [log_enabled=$enableval],
23 [log_enabled='yes'])
24if test "x$log_enabled" != "xno"; then
25 AC_DEFINE([ENABLE_LOGGING], 1, [Message logging])
26fi
27
28AC_ARG_ENABLE([debug-log], [AS_HELP_STRING([--enable-debug-log],
29 [enable debug logging (default n)])],
30 [debug_log_enabled=$enableval],
31 [debug_log_enabled='no'])
32if test "x$debug_log_enabled" != "xno"; then
33 AC_DEFINE([ENABLE_DEBUG_LOGGING], 1, [Debug message logging])
34fi
35
36# Examples build
37AC_ARG_ENABLE([examples-build], [AS_HELP_STRING([--enable-examples-build],
38 [build example applications (default n)])],
39 [build_examples=$enableval],
40 [build_examples='no'])
41AM_CONDITIONAL([BUILD_EXAMPLES], [test "x$build_examples" != "xno"])
42
43AC_DEFINE([API_EXPORTED], [__attribute__((visibility("default")))], [Default visibility])
Daniel Drakef4ed0b62007-12-30 22:09:50 +000044AM_CFLAGS="-std=gnu99 -fgnu89-inline -Wall -Wundef -Wunused -Wstrict-prototypes -Werror-implicit-function-declaration -Wno-pointer-sign -Wshadow"
Daniel Drake852bba42007-11-28 13:48:45 +000045AC_SUBST(AM_CFLAGS)
46
Daniel Drakee9364d72008-01-04 00:40:49 +000047AC_CONFIG_FILES([libusb-1.0.pc] [Makefile] [libusb/Makefile] [examples/Makefile])
Daniel Drake852bba42007-11-28 13:48:45 +000048AC_OUTPUT
49