]> git.ipfire.org Git - people/ms/libloc.git/blame - configure.ac
man: Add location-query.8
[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
161ac92d
MT
39# - man ------------------------------------------------------------------------
40
41have_manpages=no
42AC_ARG_ENABLE(manpages, AS_HELP_STRING([--disable-man-pages],
43 [do not install man pages]))
44AS_IF([test "x$enable_manpages" != xno], [have_manpages=yes])
45AM_CONDITIONAL(ENABLE_MANPAGES, [test "x$have_manpages" = "xyes"])
46
47AC_PATH_PROG([XSLTPROC], [xsltproc])
48
49AC_CHECK_PROGS(ASCIIDOC, [asciidoc])
50if test "${have_manpages}" = "yes" && test -z "${ASCIIDOC}"; then
51 AC_MSG_ERROR([Required program 'asciidoc' not found])
52fi
53# - debug ----------------------------------------------------------------------
54
46aded9a
MT
55AC_ARG_ENABLE([debug],
56 AS_HELP_STRING([--enable-debug], [enable debug messages @<:@default=disabled@:>@]),
57 [], [enable_debug=no])
58AS_IF([test "x$enable_debug" = "xyes"], [
59 AC_DEFINE(ENABLE_DEBUG, [1], [Debug messages.])
60])
61
dda7cfb5
MT
62AC_CHECK_HEADERS_ONCE([
63 arpa/inet.h \
64 endian.h \
65 netinet/in.h \
66 string.h \
67])
68
46aded9a 69AC_CHECK_FUNCS([ \
0676cd80
MT
70 be16toh \
71 be32toh \
72 be64toh \
73 htobe16 \
74 htobe32 \
75 htobe64 \
6809d5ac
MT
76 mmap \
77 munmap \
46aded9a 78 __secure_getenv \
a5db3e49
MT
79 secure_getenv \
80 qsort \
46aded9a
MT
81])
82
83my_CFLAGS="\
84-Wall \
85-Wchar-subscripts \
86-Wformat-security \
87-Wmissing-declarations \
88-Wmissing-prototypes \
89-Wnested-externs \
90-Wpointer-arith \
91-Wshadow \
92-Wsign-compare \
93-Wstrict-prototypes \
94-Wtype-limits \
95"
96AC_SUBST([my_CFLAGS])
97
18e2b14c
MT
98# Python
99AM_PATH_PYTHON([3.4])
100PKG_CHECK_MODULES([PYTHON], [python-${PYTHON_VERSION}])
101
747cbcb1
MT
102# Perl
103AC_PATH_PROG(PERL, perl, no)
104AC_SUBST(PERL)
105
106AX_PROG_PERL_MODULES(ExtUtils::MakeMaker,, AC_MSG_WARN(Need some Perl modules))
107
108AC_ARG_ENABLE(perl, AS_HELP_STRING([--disable-perl], [do not build the perl modules]), [],[enable_perl=yes])
109AM_CONDITIONAL(ENABLE_PERL, test "$enable_perl" = "yes")
110
46aded9a
MT
111AC_CONFIG_HEADERS(config.h)
112AC_CONFIG_FILES([
113 Makefile
2bb7d64e 114 po/Makefile.in
46aded9a
MT
115])
116
117AC_OUTPUT
118AC_MSG_RESULT([
119 $PACKAGE $VERSION
120 =====
121
122 prefix: ${prefix}
123 sysconfdir: ${sysconfdir}
124 libdir: ${libdir}
125 includedir: ${includedir}
126
127 compiler: ${CC}
128 cflags: ${CFLAGS}
129 ldflags: ${LDFLAGS}
130
46aded9a 131 debug: ${enable_debug}
747cbcb1
MT
132
133 Bindings:
134 perl: ${enable_perl}
46aded9a 135])