]> git.ipfire.org Git - people/ms/libloc.git/blame - configure.ac
writer: Move alignment into each section writer
[people/ms/libloc.git] / configure.ac
CommitLineData
46aded9a
MT
1AC_PREREQ(2.60)
2AC_INIT([libloc],
3 [0],
4 [michael.tremer@ipfire.org],
5 [libloc],
6 [https://www.ipfire.org/])
7
8AC_CONFIG_SRCDIR([src/libloc.c])
9AC_CONFIG_AUX_DIR([build-aux])
10AM_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])
21AC_PROG_CC_STDC
22AC_USE_SYSTEM_EXTENSIONS
23AC_SYS_LARGEFILE
24AC_CONFIG_MACRO_DIR([m4])
25AM_SILENT_RULES([yes])
26LT_INIT([
27 disable-static
28 pic-only
29])
30AC_PREFIX_DEFAULT([/usr])
31
32AC_PROG_SED
33AC_PROG_MKDIR_P
34
35AC_ARG_ENABLE([debug],
36 AS_HELP_STRING([--enable-debug], [enable debug messages @<:@default=disabled@:>@]),
37 [], [enable_debug=no])
38AS_IF([test "x$enable_debug" = "xyes"], [
39 AC_DEFINE(ENABLE_DEBUG, [1], [Debug messages.])
40])
41
dda7cfb5
MT
42AC_CHECK_HEADERS_ONCE([
43 arpa/inet.h \
44 endian.h \
45 netinet/in.h \
46 string.h \
47])
48
46aded9a 49AC_CHECK_FUNCS([ \
0676cd80
MT
50 be16toh \
51 be32toh \
52 be64toh \
53 htobe16 \
54 htobe32 \
55 htobe64 \
6809d5ac
MT
56 mmap \
57 munmap \
46aded9a 58 __secure_getenv \
a5db3e49
MT
59 secure_getenv \
60 qsort \
46aded9a
MT
61])
62
63my_CFLAGS="\
64-Wall \
65-Wchar-subscripts \
66-Wformat-security \
67-Wmissing-declarations \
68-Wmissing-prototypes \
69-Wnested-externs \
70-Wpointer-arith \
71-Wshadow \
72-Wsign-compare \
73-Wstrict-prototypes \
74-Wtype-limits \
75"
76AC_SUBST([my_CFLAGS])
77
18e2b14c
MT
78# Python
79AM_PATH_PYTHON([3.4])
80PKG_CHECK_MODULES([PYTHON], [python-${PYTHON_VERSION}])
81
46aded9a
MT
82AC_CONFIG_HEADERS(config.h)
83AC_CONFIG_FILES([
84 Makefile
85])
86
87AC_OUTPUT
88AC_MSG_RESULT([
89 $PACKAGE $VERSION
90 =====
91
92 prefix: ${prefix}
93 sysconfdir: ${sysconfdir}
94 libdir: ${libdir}
95 includedir: ${includedir}
96
97 compiler: ${CC}
98 cflags: ${CFLAGS}
99 ldflags: ${LDFLAGS}
100
46aded9a
MT
101 debug: ${enable_debug}
102])