]>
Commit | Line | Data |
---|---|---|
46aded9a MT |
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 | ||
2bb7d64e MT |
32 | IT_PROG_INTLTOOL([0.40.0]) |
33 | GETTEXT_PACKAGE=${PACKAGE_TARNAME} | |
34 | AC_SUBST(GETTEXT_PACKAGE) | |
35 | ||
46aded9a MT |
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 | ||
dda7cfb5 MT |
46 | AC_CHECK_HEADERS_ONCE([ |
47 | arpa/inet.h \ | |
48 | endian.h \ | |
49 | netinet/in.h \ | |
50 | string.h \ | |
51 | ]) | |
52 | ||
46aded9a | 53 | AC_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 | ||
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 | ||
18e2b14c MT |
82 | # Python |
83 | AM_PATH_PYTHON([3.4]) | |
84 | PKG_CHECK_MODULES([PYTHON], [python-${PYTHON_VERSION}]) | |
85 | ||
46aded9a MT |
86 | AC_CONFIG_HEADERS(config.h) |
87 | AC_CONFIG_FILES([ | |
88 | Makefile | |
2bb7d64e | 89 | po/Makefile.in |
46aded9a MT |
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 | ||
46aded9a MT |
106 | debug: ${enable_debug} |
107 | ]) |