f8bc41e689c3717d0da588d2e089df476b350f6b
[people/ms/libloc.git] / configure.ac
1 AC_PREREQ(2.60)
2 AC_INIT([libloc],
3         [0],
4         [michael.tremer@ipfire.org],
5         [libloc],
6         [https://www.ipfire.org/])
7
8 AC_CONFIG_SRCDIR([src/libloc.c])
9 AC_CONFIG_AUX_DIR([build-aux])
10 AM_INIT_AUTOMAKE([
11         foreign
12         1.11
13         -Wall
14         -Wno-portability
15         silent-rules
16         tar-pax
17         no-dist-gzip
18         dist-xz
19         subdir-objects
20 ])
21 AC_PROG_CC_STDC
22 AC_USE_SYSTEM_EXTENSIONS
23 AC_SYS_LARGEFILE
24 AC_CONFIG_MACRO_DIR([m4])
25 AM_SILENT_RULES([yes])
26 LT_INIT([
27         disable-static
28         pic-only
29 ])
30 AC_PREFIX_DEFAULT([/usr])
31
32 AC_PROG_SED
33 AC_PROG_MKDIR_P
34
35 AC_ARG_ENABLE([debug],
36         AS_HELP_STRING([--enable-debug], [enable debug messages @<:@default=disabled@:>@]),
37         [], [enable_debug=no])
38 AS_IF([test "x$enable_debug" = "xyes"], [
39         AC_DEFINE(ENABLE_DEBUG, [1], [Debug messages.])
40 ])
41
42 AC_CHECK_FUNCS([ \
43         mmap \
44         munmap \
45         __secure_getenv \
46         secure_getenv \
47         qsort \
48 ])
49
50 my_CFLAGS="\
51 -Wall \
52 -Wchar-subscripts \
53 -Wformat-security \
54 -Wmissing-declarations \
55 -Wmissing-prototypes \
56 -Wnested-externs \
57 -Wpointer-arith \
58 -Wshadow \
59 -Wsign-compare \
60 -Wstrict-prototypes \
61 -Wtype-limits \
62 "
63 AC_SUBST([my_CFLAGS])
64
65 AC_CONFIG_HEADERS(config.h)
66 AC_CONFIG_FILES([
67         Makefile
68 ])
69
70 AC_OUTPUT
71 AC_MSG_RESULT([
72         $PACKAGE $VERSION
73         =====
74
75         prefix:                 ${prefix}
76         sysconfdir:             ${sysconfdir}
77         libdir:                 ${libdir}
78         includedir:             ${includedir}
79
80         compiler:               ${CC}
81         cflags:                 ${CFLAGS}
82         ldflags:                ${LDFLAGS}
83
84         logging:                ${enable_logging}
85         debug:                  ${enable_debug}
86 ])