-
Notifications
You must be signed in to change notification settings - Fork 14
/
configure.ac
124 lines (99 loc) · 3.92 KB
/
configure.ac
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
###############################################################################
# #
# Pakfire - The IPFire package management system #
# Copyright (C) 2013 Pakfire development team #
# #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
# the Free Software Foundation, either version 3 of the License, or #
# (at your option) any later version. #
# #
# This program is distributed in the hope that it will be useful, #
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
# GNU General Public License for more details. #
# #
# You should have received a copy of the GNU General Public License #
# along with this program. If not, see <http://www.gnu.org/licenses/>. #
# #
###############################################################################
AC_PREREQ([2.64])
AC_INIT([ddns],
[015],
[info@ipfire.org],
[ddns],
[http://git.ipfire.org/?p=oddments/ddns.git;a=summary])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_AUX_DIR([build-aux])
AC_PREFIX_DEFAULT([/usr])
AM_INIT_AUTOMAKE([
foreign
1.11
-Wall
-Wno-portability
silent-rules
tar-pax
subdir-objects
])
AM_SILENT_RULES([yes])
IT_PROG_INTLTOOL([0.40.0])
GETTEXT_PACKAGE=ddns
AC_SUBST(GETTEXT_PACKAGE)
AC_PROG_LN_S
AC_PROG_MKDIR_P
AC_PROG_SED
AC_PATH_PROG([XSLTPROC], [xsltproc])
# Python
AM_PATH_PYTHON([3.6])
save_LIBS="$LIBS"
# pkg-config
PKG_PROG_PKG_CONFIG
# This makes sure pkg.m4 is available.
m4_pattern_forbid([^_?PKG_[A-Z_]+$],[*** pkg.m4 missing, please install pkg-config])
# ------------------------------------------------------------------------------
have_manpages=no
AC_ARG_ENABLE(manpages, AS_HELP_STRING([--disable-man-pages],
[do not install man pages]))
AS_IF([test "x$enable_manpages" != xno], [have_manpages=yes])
AM_CONDITIONAL(ENABLE_MANPAGES, [test "x$have_manpages" = "xyes"])
# ------------------------------------------------------------------------------
AC_ARG_WITH([systemd],
AS_HELP_STRING([--with-systemd], [Enable systemd support.])
)
AS_IF([test "x$with_systemd" != "xno"],
[PKG_CHECK_MODULES(systemd, [libsystemd],
[have_systemd=yes], [have_systemd=no])],
[have_systemd=no]
)
AS_IF([test "x$have_systemd" = "xyes"],
[AC_MSG_CHECKING([for systemd system unit directory])
AC_ARG_WITH([systemdsystemunitdir],
AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for systemd service files]),
[], [with_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)]
)
AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir])
if test -n "$systemdsystemunitdir" -a "x$systemdsystemunitdir" != xno; then
AC_MSG_RESULT([$systemdsystemunitdir])
else
AC_MSG_ERROR([not found (try --with-systemdsystemunitdir)])
fi
],
[AS_IF([test "x$with_systemd" = "xyes"],
[AC_MSG_ERROR([Systemd support is enabled but no systemd has been found.])
])
])
AM_CONDITIONAL(HAVE_SYSTEMD, [test "x$have_systemd" = "xyes"])
# ------------------------------------------------------------------------------
AC_CONFIG_FILES([
Makefile
po/Makefile.in
src/ddns/__version__.py
])
AC_OUTPUT
AC_MSG_RESULT([
${PACKAGE_NAME} ${VERSION}
prefix: ${prefix}
sysconfdir: ${sysconfdir}
Systemd support ${have_systemd}
Generate man-pages: ${have_manpages}
])