headers: Don't make private structures public
[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         be16toh \
44         be32toh \
45         be64toh \
46         htobe16 \
47         htobe32 \
48         htobe64 \
49         mmap \
50         munmap \
51         __secure_getenv \
52         secure_getenv \
53         qsort \
54 ])
55
56 my_CFLAGS="\
57 -Wall \
58 -Wchar-subscripts \
59 -Wformat-security \
60 -Wmissing-declarations \
61 -Wmissing-prototypes \
62 -Wnested-externs \
63 -Wpointer-arith \
64 -Wshadow \
65 -Wsign-compare \
66 -Wstrict-prototypes \
67 -Wtype-limits \
68 "
69 AC_SUBST([my_CFLAGS])
70
71 # Python
72 AM_PATH_PYTHON([3.4])
73 PKG_CHECK_MODULES([PYTHON], [python-${PYTHON_VERSION}])
74
75 AC_CONFIG_HEADERS(config.h)
76 AC_CONFIG_FILES([
77         Makefile
78 ])
79
80 AC_OUTPUT
81 AC_MSG_RESULT([
82         $PACKAGE $VERSION
83         =====
84
85         prefix:                 ${prefix}
86         sysconfdir:             ${sysconfdir}
87         libdir:                 ${libdir}
88         includedir:             ${includedir}
89
90         compiler:               ${CC}
91         cflags:                 ${CFLAGS}
92         ldflags:                ${LDFLAGS}
93
94         debug:                  ${enable_debug}
95 ])