Use be*toh and htobe* to convert to big-endian
[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
42AC_CHECK_FUNCS([ \
0676cd80
MT
43 be16toh \
44 be32toh \
45 be64toh \
46 htobe16 \
47 htobe32 \
48 htobe64 \
6809d5ac
MT
49 mmap \
50 munmap \
46aded9a 51 __secure_getenv \
a5db3e49
MT
52 secure_getenv \
53 qsort \
46aded9a
MT
54])
55
56my_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"
69AC_SUBST([my_CFLAGS])
70
71AC_CONFIG_HEADERS(config.h)
72AC_CONFIG_FILES([
73 Makefile
74])
75
76AC_OUTPUT
77AC_MSG_RESULT([
78 $PACKAGE $VERSION
79 =====
80
81 prefix: ${prefix}
82 sysconfdir: ${sysconfdir}
83 libdir: ${libdir}
84 includedir: ${includedir}
85
86 compiler: ${CC}
87 cflags: ${CFLAGS}
88 ldflags: ${LDFLAGS}
89
46aded9a
MT
90 debug: ${enable_debug}
91])