]> git.ipfire.org Git - people/ms/libloc.git/blob - configure.ac
Fix searching for ASes
[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 IT_PROG_INTLTOOL([0.40.0])
33 GETTEXT_PACKAGE=${PACKAGE_TARNAME}
34 AC_SUBST(GETTEXT_PACKAGE)
35
36 AC_PROG_SED
37 AC_PROG_MKDIR_P
38
39 AC_ARG_ENABLE([debug],
40 AS_HELP_STRING([--enable-debug], [enable debug messages @<:@default=disabled@:>@]),
41 [], [enable_debug=no])
42 AS_IF([test "x$enable_debug" = "xyes"], [
43 AC_DEFINE(ENABLE_DEBUG, [1], [Debug messages.])
44 ])
45
46 AC_CHECK_HEADERS_ONCE([
47 arpa/inet.h \
48 endian.h \
49 netinet/in.h \
50 string.h \
51 ])
52
53 AC_CHECK_FUNCS([ \
54 be16toh \
55 be32toh \
56 be64toh \
57 htobe16 \
58 htobe32 \
59 htobe64 \
60 mmap \
61 munmap \
62 __secure_getenv \
63 secure_getenv \
64 qsort \
65 ])
66
67 my_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 "
80 AC_SUBST([my_CFLAGS])
81
82 # Python
83 AM_PATH_PYTHON([3.4])
84 PKG_CHECK_MODULES([PYTHON], [python-${PYTHON_VERSION}])
85
86 AC_CONFIG_HEADERS(config.h)
87 AC_CONFIG_FILES([
88 Makefile
89 po/Makefile.in
90 ])
91
92 AC_OUTPUT
93 AC_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
106 debug: ${enable_debug}
107 ])