]> git.ipfire.org Git - people/ms/libloc.git/blame - configure.ac
Fix evaluation that always is true
[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
2bb7d64e
MT
32IT_PROG_INTLTOOL([0.40.0])
33GETTEXT_PACKAGE=${PACKAGE_TARNAME}
34AC_SUBST(GETTEXT_PACKAGE)
35
46aded9a
MT
36AC_PROG_SED
37AC_PROG_MKDIR_P
38
39AC_ARG_ENABLE([debug],
40 AS_HELP_STRING([--enable-debug], [enable debug messages @<:@default=disabled@:>@]),
41 [], [enable_debug=no])
42AS_IF([test "x$enable_debug" = "xyes"], [
43 AC_DEFINE(ENABLE_DEBUG, [1], [Debug messages.])
44])
45
dda7cfb5
MT
46AC_CHECK_HEADERS_ONCE([
47 arpa/inet.h \
48 endian.h \
49 netinet/in.h \
50 string.h \
51])
52
46aded9a 53AC_CHECK_FUNCS([ \
0676cd80
MT
54 be16toh \
55 be32toh \
56 be64toh \
57 htobe16 \
58 htobe32 \
59 htobe64 \
6809d5ac
MT
60 mmap \
61 munmap \
46aded9a 62 __secure_getenv \
a5db3e49
MT
63 secure_getenv \
64 qsort \
46aded9a
MT
65])
66
67my_CFLAGS="\
68-Wall \
69-Wchar-subscripts \
70-Wformat-security \
71-Wmissing-declarations \
72-Wmissing-prototypes \
73-Wnested-externs \
74-Wpointer-arith \
75-Wshadow \
76-Wsign-compare \
77-Wstrict-prototypes \
78-Wtype-limits \
79"
80AC_SUBST([my_CFLAGS])
81
18e2b14c
MT
82# Python
83AM_PATH_PYTHON([3.4])
84PKG_CHECK_MODULES([PYTHON], [python-${PYTHON_VERSION}])
85
46aded9a
MT
86AC_CONFIG_HEADERS(config.h)
87AC_CONFIG_FILES([
88 Makefile
2bb7d64e 89 po/Makefile.in
46aded9a
MT
90])
91
92AC_OUTPUT
93AC_MSG_RESULT([
94 $PACKAGE $VERSION
95 =====
96
97 prefix: ${prefix}
98 sysconfdir: ${sysconfdir}
99 libdir: ${libdir}
100 includedir: ${includedir}
101
102 compiler: ${CC}
103 cflags: ${CFLAGS}
104 ldflags: ${LDFLAGS}
105
46aded9a
MT
106 debug: ${enable_debug}
107])