Rename to libusb-1.0
[platform/upstream/libusb.git] / configure.ac
1 AC_INIT([libusb], [0.9.0])
2 AM_INIT_AUTOMAKE
3 AC_CONFIG_SRCDIR([libusb/core.c])
4 AM_CONFIG_HEADER([config.h])
5
6 AC_PREREQ([2.50])
7 AC_PROG_CC
8 AC_PROG_LIBTOOL
9 AC_C_INLINE
10 AM_PROG_CC_C_O
11
12 # Library versioning
13 lt_major="0"
14 lt_revision="0"
15 lt_age="0"
16 AC_SUBST(lt_major)
17 AC_SUBST(lt_revision)
18 AC_SUBST(lt_age)
19
20 # Message logging
21 AC_ARG_ENABLE([log], [AS_HELP_STRING([--disable-log], [disable all logging])],
22         [log_enabled=$enableval],
23         [log_enabled='yes'])
24 if test "x$log_enabled" != "xno"; then
25         AC_DEFINE([ENABLE_LOGGING], 1, [Message logging])
26 fi
27
28 AC_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'])
32 if test "x$debug_log_enabled" != "xno"; then
33         AC_DEFINE([ENABLE_DEBUG_LOGGING], 1, [Debug message logging])
34 fi
35
36 # Examples build
37 AC_ARG_ENABLE([examples-build], [AS_HELP_STRING([--enable-examples-build],
38         [build example applications (default n)])],
39         [build_examples=$enableval],
40         [build_examples='no'])
41 AM_CONDITIONAL([BUILD_EXAMPLES], [test "x$build_examples" != "xno"])
42
43 AC_DEFINE([API_EXPORTED], [__attribute__((visibility("default")))], [Default visibility])
44 AM_CFLAGS="-std=gnu99 -fgnu89-inline -Wall -Wundef -Wunused -Wstrict-prototypes -Werror-implicit-function-declaration -Wno-pointer-sign -Wshadow"
45 AC_SUBST(AM_CFLAGS)
46
47 AC_CONFIG_FILES([libusb-1.0.pc] [Makefile] [libusb/Makefile] [examples/Makefile])
48 AC_OUTPUT
49