/
configure.ac
274 lines (228 loc) · 8.59 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
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
# copy-pasted from libreport
# ABRT_PARSE_WITH(PACKAGE)
# -----------------------
# For use in AC_ARG_WITH action-if-found, for packages default ON.
# * Set NO_PACKAGE=YesPlease for --without-PACKAGE
# * Unset NO_PACKAGE for --with-PACKAGE without ARG
AC_DEFUN([ABRT_PARSE_WITH],
[m4_pushdef([ABRT_UC_PACKAGE], m4_toupper([$1]))dnl
if test "$withval" = "no"; then
NO_[]ABRT_UC_PACKAGE=YesPlease
elif test "$withval" = "yes"; then
NO_[]ABRT_UC_PACKAGE=
else
NO_[]ABRT_UC_PACKAGE=
fi
m4_popdef([ABRT_UC_PACKAGE])])
AC_INIT([abrt],
m4_esyscmd([cat ./abrt-version]),
[crash-catcher@fedorahosted.org])
AC_CONFIG_MACRO_DIR([m4])
AM_INIT_AUTOMAKE([-Wall foreign])
# Support silent build rules. Disable by either passing --disable-silent-rules
# to ./configure or passing V=1 to make
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES])
# The 'yes' argument is undocumented but it is common knowledge that it works.
AM_SILENT_RULES([yes])
AC_DISABLE_STATIC
AC_PROG_LIBTOOL
AC_PROG_CC
AC_PROG_LN_S
AC_SYS_LARGEFILE
CFLAGS="$CFLAGS -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE \
-D_FILE_OFFSET_BITS=64 -fno-strict-aliasing -std=gnu99 -Wall -Wwrite-strings"
AC_ARG_ENABLE(debug,
[AC_HELP_STRING([--enable-debug],
[Enable debug information])],
[CFLAGS="$CFLAGS -DDEBUG -ggdb -g -O0"])
dnl ****** INTERNATIONALIZATION **********************
GETTEXT_PACKAGE=abrt
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [Package name for gettext])
AM_GNU_GETTEXT([external])
AM_GNU_GETTEXT_VERSION([0.17])
IT_PROG_INTLTOOL([0.35.0])
dnl ****** END ****************************************
AM_PATH_PYTHON
if test -z "$PYTHON"; then
echo "*** Essential program python not found" 1>&2
exit 1
fi
AC_PATH_PROG([ASCIIDOC], [asciidoc], [no])
[if test "$ASCIIDOC" = "no"]
[then]
[echo "The asciidoc program was not found in the search path. Please ensure"]
[echo "that it is installed and its directory is included in the search path."]
[echo "Then run configure again before attempting to build ABRT."]
[exit 1]
[fi]
AC_PATH_PROG([XMLTO], [xmlto], [no])
[if test "$XMLTO" = "no"]
[then]
[echo "The xmlto program was not found in the search path. Please ensure"]
[echo "that it is installed and its directory is included in the search path."]
[echo "Then run configure again before attempting to build ABRT."]
[exit 1]
[fi]
AC_PATH_PROG([PYTHON_CONFIG], [python-config], [no])
[if test "$PYTHON_CONFIG" = "no"]
[then]
[echo "The python-config program was not found in the search path. Please ensure"]
[echo "that it is installed and its directory is included in the search path."]
[echo "Then run configure again before attempting to build libreport."]
[exit 1]
[fi]
PYTHON_CFLAGS=`python-config --cflags 2> /dev/null`
PYTHON_LIBS=`python-config --libs 2> /dev/null`
AC_SUBST(PYTHON_CFLAGS)
AC_SUBST(PYTHON_LIBS)
PKG_CHECK_MODULES([XICE], [ice])
PKG_CHECK_MODULES([XSMP], [sm])
PKG_CHECK_MODULES([GTK], [gtk+-3.0])
PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.21])
PKG_CHECK_MODULES([DBUS], [dbus-1])
PKG_CHECK_MODULES([LIBXML], [libxml-2.0])
PKG_CHECK_MODULES([RPM], [rpm])
PKG_CHECK_MODULES([LIBNOTIFY], [libnotify])
PKG_CHECK_MODULES([NSS], [nss])
PKG_CHECK_MODULES([LIBREPORT], [libreport])
PKG_CHECK_MODULES([LIBREPORT_GTK], [libreport-gtk])
PKG_CHECK_MODULES([LIBREPORT_WEB], [libreport-web])
PKG_CHECK_MODULES([POLKIT], [polkit-gobject-1])
PKG_CHECK_MODULES([GIO], [gio-2.0])
PKG_CHECK_MODULES([SATYR], [satyr])
PKG_PROG_PKG_CONFIG
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])
AM_CONDITIONAL(HAVE_SYSTEMD, [test -n "$with_systemdsystemunitdir"])
AC_ARG_WITH([dbusinterfacedir],
AS_HELP_STRING([--with-dbusinterfacedir=DIR], [Directory for dbus interface files]),
[], [with_dbusinterfacedir=${datadir}/dbus-1/interfaces])
AC_SUBST([dbusinterfacedir], [$with_dbusinterfacedir])
AC_ARG_WITH(largedatatmpdir,
[AS_HELP_STRING([--with-largedatatmpdir=DIR],
[Directory where potentially large data are created (default: /var/tmp)])],
[], [with_largedatatmpdir="/var/tmp"])
AC_SUBST([LARGE_DATA_TMP_DIR], [$with_largedatatmpdir])
AC_CHECK_HEADER([sys/inotify.h], [],
[AC_MSG_ERROR([sys/inotify.h is needed to build abrt])])
AC_CHECK_HEADERS([locale.h])
CONF_DIR='${sysconfdir}/${PACKAGE_NAME}'
DEFAULT_CONF_DIR='${datadir}/${PACKAGE_NAME}/conf.d'
VAR_RUN='${localstatedir}/run'
PLUGINS_CONF_DIR='${sysconfdir}/${PACKAGE_NAME}/plugins'
DEFAULT_PLUGINS_CONF_DIR='${datadir}/${PACKAGE_NAME}/conf.d/plugins'
EVENTS_DIR='${datadir}/libreport/events'
EVENTS_CONF_DIR='${sysconfdir}/libreport/events.d'
ENABLE_SOCKET_OR_DBUS='-DENABLE_DBUS=1'
DEFAULT_DUMP_DIR_MODE=$($PKG_CONFIG --variable=dd_mode libreport)
AC_ARG_WITH([defaultdumplocation],
AS_HELP_STRING([--with-defaultdumplocation=DIR],
[Default dump location ('LOCALSTATEDIR/tmp/abrt')]),
[], [with_defaultdumplocation=${localstatedir}/tmp/abrt])
AC_SUBST([DEFAULT_DUMP_LOCATION], [$with_defaultdumplocation])
AC_ARG_WITH(augeaslenslibdir,
[AS_HELP_STRING([--with-augeaslenslibdir=DIR],
[Directory for librepor lens (default: /usr/share/augeas/lenses)])],
[], [with_augeaslenslibdir="/usr/share/augeas/lenses"])
AC_SUBST([AUGEAS_LENS_LIB_DIR], [$with_augeaslenslibdir])
AC_PATH_PROG(AUGPARSE, augparse, no)
[if test "$ARGPARSE" = "no"]
[then]
[echo "The argparse program was not found in the search path. Please ensure"]
[echo "that it is installed and its directory is included in the search path."]
[echo "Then run configure again before attempting to build ABRT."]
[exit 1]
[fi]
AC_ARG_ENABLE(doxygen-docs,
AS_HELP_STRING([--enable-doxygen-docs],
[build DOXYGEN documentation (requires Doxygen)]),
[enable_doxygen_docs=$enableval],
[enable_doxygen_docs=no]
)
# Doxygen Documentation
AC_PATH_PROG(DOXYGEN, doxygen, no)
AC_MSG_CHECKING([whether to build Doxygen documentation])
if test "$DOXYGEN" = "no" ; then
have_doxygen=no
else
have_doxygen=yes
fi
if test "$enable_doxygen_docs" = "yes" ; then
if test "$have_doxygen" = "no"; then
AC_MSG_ERROR([Building Doxygen docs explicitly required, but Doxygen not found])
fi
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
fi
AM_CONDITIONAL(DBUS_DOXYGEN_DOCS_ENABLED, test "$enable_doxygen_docs" = "yes")
# Make satyr use GDB or elfutils/libunwind for unwinding?
AC_ARG_ENABLE([native-unwinder],
AS_HELP_STRING([--enable-native-unwinder],
[use native unwinder (libunwind or elfutils) instead of GDB (default is no)]),
[], [enable_native_unwinder=no])
[if test "$enable_native_unwinder" = "yes"]
[then]
AC_DEFINE([ENABLE_NATIVE_UNWINDER], [1], [Use elfutils/libunwind for unwinding instead of GDB.])
[fi]
AC_SUBST(CONF_DIR)
AC_SUBST(DEFAULT_CONF_DIR)
AC_SUBST(VAR_RUN)
AC_SUBST(PLUGINS_CONF_DIR)
AC_SUBST(DEFAULT_PLUGINS_CONF_DIR)
AC_SUBST(EVENTS_CONF_DIR)
AC_SUBST(EVENTS_DIR)
AC_SUBST(DEFAULT_DUMP_LOCATION)
AC_SUBST(DEFAULT_DUMP_DIR_MODE)
AC_ARG_WITH(bodhi,
AS_HELP_STRING([--with-bodhi],[use Bodhi plugin (default is YES)]),
ABRT_PARSE_WITH([bodhi]))
if test -z "$NO_BODHI"
then
PKG_CHECK_MODULES([JSON_C], [json])
AM_CONDITIONAL(BUILD_BODHI, true)
else
AM_CONDITIONAL(BUILD_BODHI, false)
fi dnl end NO_BODHI
# Initialize the test suite.
AC_CONFIG_TESTDIR(tests)
AC_CONFIG_FILES([tests/Makefile tests/atlocal])
AM_MISSING_PROG([AUTOM4TE], [autom4te])
# Needed by tests/atlocal.in.
AC_SUBST([O0CFLAGS], [`echo $CFLAGS | sed 's/-O[[0-9]] *//' | sed 's/-Werror//'`])
AC_CONFIG_HEADERS([config.h])
AC_CHECK_PROGS([VALGRIND], [valgrind])
AC_CONFIG_FILES([
Makefile
abrt.pc
apidoc/Makefile
apidoc/Doxyfile
apidoc/html/Makefile
doc/Makefile
doc/problems-service/Makefile
src/include/Makefile
src/lib/Makefile
src/plugins/Makefile
src/Makefile
src/daemon/Makefile
src/daemon/abrt-handle-upload
src/hooks/Makefile
src/applet/Makefile
src/cli/Makefile
src/configuration-gui/Makefile
src/configuration-gui/abrt_gui.pc
src/dbus/Makefile
src/plugins/abrt-action-install-debuginfo
src/plugins/abrt-action-analyze-vmcore
src/python-problem/Makefile
src/python-problem/doc/Makefile
src/python-problem/tests/Makefile
src/python-problem/problem/Makefile
src/python-problem/examples/Makefile
po/Makefile.in
icons/Makefile
])
AC_OUTPUT