4 [michael.tremer@ipfire.org],
6 [https://www.ipfire.org/])
8 AC_CONFIG_SRCDIR([src/libloc.c])
9 AC_CONFIG_AUX_DIR([build-aux])
22 AC_USE_SYSTEM_EXTENSIONS
24 AC_CONFIG_MACRO_DIR([m4])
25 AM_SILENT_RULES([yes])
30 AC_PREFIX_DEFAULT([/usr])
33 IT_PROG_INTLTOOL([0.40.0])
35 # Interpret embedded Python in HTML files
36 XGETTEXT="${XGETTEXT} -L Python --keyword=_:1,2 --keyword=N_:1,2 --no-location"
38 GETTEXT_PACKAGE=${PACKAGE_TARNAME}
39 AC_SUBST(GETTEXT_PACKAGE)
44 # - man ------------------------------------------------------------------------
47 AC_ARG_ENABLE(manpages, AS_HELP_STRING([--disable-man-pages],
48 [do not install man pages]))
49 AS_IF([test "x$enable_manpages" != xno], [have_manpages=yes])
50 AM_CONDITIONAL(ENABLE_MANPAGES, [test "x$have_manpages" = "xyes"])
52 AC_PATH_PROG([XSLTPROC], [xsltproc])
54 AC_CHECK_PROGS(ASCIIDOC, [asciidoc])
55 if test "${have_manpages}" = "yes" && test -z "${ASCIIDOC}"; then
56 AC_MSG_ERROR([Required program 'asciidoc' not found])
58 # - debug ----------------------------------------------------------------------
60 AC_ARG_ENABLE([debug],
61 AS_HELP_STRING([--enable-debug], [enable debug messages @<:@default=disabled@:>@]),
62 [], [enable_debug=no])
63 AS_IF([test "x$enable_debug" = "xyes"], [
64 AC_DEFINE(ENABLE_DEBUG, [1], [Debug messages.])
67 AC_CHECK_HEADERS_ONCE([
70 arpa/nameser_compat.h \
96 -Wmissing-declarations \
97 -Wmissing-prototypes \
102 -Wstrict-prototypes \
105 AC_SUBST([my_CFLAGS])
107 # ------------------------------------------------------------------------------
109 AC_ARG_WITH([systemd],
110 AS_HELP_STRING([--with-systemd], [Enable systemd support.])
113 AS_IF([test "x$with_systemd" != "xno"],
114 [PKG_CHECK_MODULES(systemd, [libsystemd],
115 [have_systemd=yes], [have_systemd=no])],
119 AS_IF([test "x$have_systemd" = "xyes"],
120 [AC_MSG_CHECKING([for systemd system unit directory])
121 AC_ARG_WITH([systemdsystemunitdir],
122 AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for systemd service files]),
123 [], [with_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)]
126 AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir])
128 if test -n "$systemdsystemunitdir" -a "x$systemdsystemunitdir" != xno; then
129 AC_MSG_RESULT([$systemdsystemunitdir])
131 AC_MSG_ERROR([not found (try --with-systemdsystemunitdir)])
134 [AS_IF([test "x$with_systemd" = "xyes"],
135 [AC_MSG_ERROR([Systemd support is enabled but no systemd has been found.])
139 AM_CONDITIONAL(HAVE_SYSTEMD, [test "x$have_systemd" = "xyes"])
141 # ------------------------------------------------------------------------------
144 AM_PATH_PYTHON([3.4])
145 PKG_CHECK_MODULES([PYTHON], [python-${PYTHON_VERSION}])
148 AC_PATH_PROG(PERL, perl, no)
151 AX_PROG_PERL_MODULES(ExtUtils::MakeMaker,, AC_MSG_WARN(Need some Perl modules))
153 AC_ARG_ENABLE(perl, AS_HELP_STRING([--disable-perl], [do not build the perl modules]), [],[enable_perl=yes])
154 AM_CONDITIONAL(ENABLE_PERL, test "$enable_perl" = "yes")
156 dnl Checking for libresolv
159 AC_CHECK_LIB(resolv, ns_msg_getflag, [LIBS="-lresolv $LIBS"], AC_MSG_ERROR([libresolv has not been found]), -lresolv)
162 AC_CHECK_LIB(resolv, res_init, [LIBS="-lresolv $LIBS"], AC_MSG_ERROR([libresolv has not been found]), -lresolv)
165 RESOLV_LIBS="${LIBS}"
166 AC_SUBST(RESOLV_LIBS)
168 dnl Checking for OpenSSL
170 AC_CHECK_LIB(crypto, EVP_EncryptInit,, AC_MSG_ERROR([libcrypto has not been found]))
171 OPENSSL_LIBS="${LIBS}"
172 AC_SUBST(OPENSSL_LIBS)
174 AC_CONFIG_HEADERS(config.h)
186 sysconfdir: ${sysconfdir}
188 includedir: ${includedir}
194 debug: ${enable_debug}
195 systemd support: ${have_systemd}