blob: 3283b5f5a44f80201ed6cb9f512a57e257f7b7d7 [file] [log] [blame]
Lucas De Marchiecd40ee2011-11-21 12:35:15 -02001AC_PREREQ(2.60)
Lucas De Marchi586fc302011-11-21 14:35:35 -02002AC_INIT([libkmod],
3 [0.1],
4 [],
5 [libkmod],
6 [http://git.profusion.mobi/cgit.cgi/lucas/libkmod/])
7
8AC_CONFIG_SRCDIR([libkmod/libkmod.c])
Lucas De Marchiecd40ee2011-11-21 12:35:15 -02009AC_CONFIG_AUX_DIR([build-aux])
10AM_INIT_AUTOMAKE([check-news foreign 1.11 -Wall -Wno-portability silent-rules tar-pax dist-bzip2 subdir-objects])
11AC_PROG_CC_STDC
12AC_USE_SYSTEM_EXTENSIONS
13AC_SYS_LARGEFILE
14AC_CONFIG_MACRO_DIR([m4])
15AM_SILENT_RULES([yes])
16LT_INIT([disable-static pic-only])
17AC_PREFIX_DEFAULT([/usr])
18
Lucas De Marchi648a8422011-11-22 17:46:19 -020019AC_PROG_CC
20AC_PROG_CC_C99
21AC_C_TYPEOF
22AM_PROG_CC_C_O
23AC_PROG_GCC_TRADITIONAL
24
Lucas De Marchiecd40ee2011-11-21 12:35:15 -020025AC_ARG_ENABLE([logging],
26 AS_HELP_STRING([--disable-logging], [disable system logging @<:@default=enabled@:>@]),
27 [], enable_logging=yes)
28AS_IF([test "x$enable_logging" = "xyes"], [
29 AC_DEFINE(ENABLE_LOGGING, [1], [System logging.])
30])
31
32AC_ARG_ENABLE([debug],
33 AS_HELP_STRING([--enable-debug], [enable debug messages @<:@default=disabled@:>@]),
34 [], [enable_debug=no])
35AS_IF([test "x$enable_debug" = "xyes"], [
36 AC_DEFINE(ENABLE_DEBUG, [1], [Debug messages.])
37])
38
39AC_CONFIG_HEADERS(config.h)
40AC_CONFIG_FILES([
41 Makefile
Lucas De Marchi586fc302011-11-21 14:35:35 -020042 libkmod/libkmod.pc
Lucas De Marchiecd40ee2011-11-21 12:35:15 -020043])
44
45AC_OUTPUT
46AC_MSG_RESULT([
47 $PACKAGE $VERSION
48 ========
49
50 prefix: ${prefix}
51 sysconfdir: ${sysconfdir}
52 libdir: ${libdir}
53 includedir: ${includedir}
54
55 compiler: ${CC}
56 cflags: ${CFLAGS}
57 ldflags: ${LDFLAGS}
58
59 logging: ${enable_logging}
60 debug: ${enable_debug}
61])