resource: cope with NULL reqset in mrp_resource_lua_veto()
[profile/ivi/murphy.git] / configure.ac
1
2 #                                               -*- Autoconf -*-
3 # Process this file with autoconf to produce a configure script.
4
5 AC_PREREQ(2.59)
6
7 AC_INIT([murphy],
8         m4_esyscmd([build-aux/git-version-gen .tarball-version]),
9         [krisztian.litkey at intel.com])
10
11 AC_CONFIG_SRCDIR([src])
12 AC_CONFIG_MACRO_DIR([m4])
13 AC_CONFIG_HEADER([src/config.h])
14 AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
15
16 AC_SUBST(ACLOCAL_AMFLAGS, "-I m4")
17
18 m4_define(version_major, `echo $VERSION | cut -d. -f1 | cut -d- -f1`)
19 m4_define(version_minor, `echo $VERSION | cut -d. -f2 | cut -d- -f1`)
20 m4_define(version_patch, `echo $VERSION | cut -d. -f3 | cut -d- -f1`)
21
22 AC_SUBST(VERSION)
23 AC_SUBST(VERSION_MAJOR, version_major)
24 AC_SUBST(VERSION_MINOR, version_minor)
25 AC_SUBST(VERSION_PATCH, version_patch)
26 AC_SUBST(VERSION_FULL, version_major.version_minor.version_patch)
27
28 MURPHY_VERSION_INFO="0:0:0"
29 AC_SUBST(MURPHY_VERSION_INFO)
30
31 # Disable static libraries.
32 AC_DISABLE_STATIC
33
34 # Checks for programs.
35 AC_PROG_CC
36 AC_PROG_CC_C99
37 # We need AC_PROG_CXX if Qt support is enabled but (at least some
38 # versions of autotools) cannot handle conditional use of this.
39 AC_PROG_CXX
40 AC_PROG_AWK
41 AC_PROG_INSTALL
42 AM_PROG_CC_C_O
43 AM_PROG_LIBTOOL
44 AC_PROG_LEX
45 AC_PROG_YACC
46 AM_PROG_LEX
47 AC_SUBST(LEXLIB)
48
49 # Don't require ctags (we keep linker scripts and debug files in the repo now).
50 #AC_CHECK_PROG(CTAGS, ctags, "ctags")
51 #if test "$CTAGS" != "ctags" ; then
52 #   AC_MSG_ERROR([ctags is required])
53 #fi
54
55 if test "$LEX" != "flex" ; then
56    AC_MSG_ERROR([flex is required])
57 fi
58
59 if test "$YACC" != "bison -y" ; then
60    AC_MSG_ERROR([bison is required])
61 fi
62
63 # Checks for libraries.
64 AC_CHECK_LIB([dl], [dlopen dlclose dlsym dlerror])
65
66 # Checks for header files.
67 AC_PATH_X
68 AC_CHECK_HEADERS([fcntl.h stddef.h stdint.h stdlib.h string.h sys/statvfs.h sys/vfs.h syslog.h unistd.h])
69
70 # Checks for typedefs, structures, and compiler characteristics.
71 AC_HEADER_STDBOOL
72 AC_C_INLINE
73 AC_TYPE_INT16_T
74 AC_TYPE_INT32_T
75 AC_TYPE_INT64_T
76 AC_TYPE_MODE_T
77 AC_TYPE_PID_T
78 AC_TYPE_SIZE_T
79 AC_TYPE_SSIZE_T
80 AC_CHECK_MEMBERS([struct stat.st_rdev])
81 AC_TYPE_UINT16_T
82 AC_TYPE_UINT32_T
83 AC_TYPE_UINT64_T
84 AC_TYPE_UINT8_T
85 AC_CHECK_TYPES([ptrdiff_t])
86
87 # Checks for library functions.
88 AC_FUNC_ERROR_AT_LINE
89 AC_HEADER_MAJOR
90 AC_FUNC_MALLOC
91 AC_FUNC_STRTOD
92 AC_CHECK_FUNCS([clock_gettime memmove memset regcomp strcasecmp strchr strdup strrchr strtol strtoul])
93
94 # Check and enable extra compiler warnings if they are supported.
95 AC_ARG_ENABLE(extra-warnings,
96               [  --enable-extra-warnings enable extra compiler warnings],
97               [extra_warnings=$enableval], [extra_warnings=auto])
98
99 WARNING_CFLAGS=""
100 warncflags="-Wall -Wextra"
101 if test "$extra_warnings" != "no"; then
102     save_CPPFLAGS="$CPPFLAGS"
103     for opt in $warncflags; do
104         AC_PREPROC_IFELSE([AC_LANG_PROGRAM([])],
105                           [WARNING_CFLAGS="$WARNING_CFLAGS $opt"])
106     done
107     CPPFLAGS="$save_CPPFLAGS"
108 fi
109
110 AC_SUBST(WARNING_CFLAGS)
111
112 # check for Lua
113 PKG_CHECK_MODULES(LUA, lua >= 5.1.1, [try_lua51=no], [try_lua51=yes])
114
115 # At least Ubuntu packages lua 5.1 as lua5.1... try that if needed.
116 if test "$try_lua51" = "yes"; then
117     PKG_CHECK_MODULES(LUA, lua5.1 >= 5.1.1)
118 fi
119 AC_SUBST(LUA_CFLAGS)
120 AC_SUBST(LUA_LIBS)
121
122 # Check if potentially GPL bits are allowed to be enabled.
123 AC_ARG_ENABLE(gpl,
124               [  --enable-gpl            enable linking against GPL code],
125               [enable_gpl=$enableval], [enable_gpl=no])
126
127 # Check if original libdbus-based DBUS support was enabled.
128 AC_ARG_ENABLE(libdbus,
129               [  --enable-libdbus        enable libdbus-based D-BUS support],
130               [enable_libdbus=$enableval], [enable_libdbus=no])
131
132 if test "$enable_libdbus" = "yes"; then
133     if test "$enable_gpl" = "no"; then
134         AC_MSG_ERROR([libdbus D-Bus support requires the --enable-gpl option.])
135     fi
136     PKG_CHECK_MODULES(LIBDBUS, dbus-1 >= 0.70)
137
138     DBUS_SESSION_DIR="`pkg-config --variable session_bus_services_dir dbus-1`"
139     AC_SUBST(DBUS_SESSION_DIR)
140
141     AC_DEFINE([LIBDBUS_ENABLED], 1, [Enable libdbus D-Bus support ?])
142 else
143     AC_MSG_NOTICE([libdbus-based D-Bus support is disabled.])
144 fi
145
146 AM_CONDITIONAL(LIBDBUS_ENABLED, [test "$enable_libdbus" = "yes"])
147 AC_SUBST(LIBDBUS_ENABLED)
148 AC_SUBST(LIBDBUS_CFLAGS)
149 AC_SUBST(LIBDBUS_LIBS)
150
151 # Check if systemd-bus-based D-Bus support was enabled.
152 AC_ARG_ENABLE(sdbus,
153               [  --enable-sdbus         enable systemd-based D-BUS support],
154               [enable_sdbus=$enableval], [enable_sdbus=no])
155
156 if test "$enable_sdbus" = "yes"; then
157     PKG_CHECK_MODULES(SDBUS, libsystemd-bus)
158     AC_DEFINE([SDBUS_ENABLED], 1, [Enable systemd-bus support ?])
159
160     if test -z "$DBUS_SESSION_DIR"; then
161         # Try to determine the session bus service directory.
162         DBUS_SESSION_DIR="`pkg-config --variable \
163                                session_bus_services_dir dbus-1`"
164         if test "$?" != "0" -o -z "$DBUS_SESSION_DIR"; then
165             DBUS_SESSION_DIR="/usr/share/dbus-1/services"
166         fi
167         AC_SUBST(DBUS_SESSION_DIR)
168     fi
169 else
170     AC_MSG_NOTICE([libsystemd-bus based D-Bus support is disabled.])
171 fi
172
173 AM_CONDITIONAL(SDBUS_ENABLED, [test "$enable_sdbus" = "yes"])
174 AC_SUBST(SDBUS_ENABLED)
175 AC_SUBST(SDBUS_CFLAGS)
176 AC_SUBST(SDBUS_LIBS)
177
178 # Check if PulseAudio mainloop support was enabled.
179 AC_ARG_ENABLE(pulse,
180               [  --enable-pulse          enable PulseAudio mainloop support],
181               [enable_pulse=$enableval], [enable_pulse=auto])
182
183 if test "$enable_pulse" != "no"; then
184     PKG_CHECK_MODULES(PULSE, libpulse >= 0.9.22,
185                              [have_pulse=yes], [have_pulse=no])
186     if test "$have_pulse" = "no" -a "$enable_pulse" = "yes"; then
187         AC_MSG_ERROR([PulseAudio development libraries not found.])
188     fi
189
190     if test "$enable_gpl" = "no"; then
191         if test "$enable_pulse" = "yes"; then
192            AC_MSG_ERROR([PulseAudio support requires the --enable-gpl option.])
193         else
194            enable_pulse="no"
195         fi
196     else
197         enable_pulse="$have_pulse"
198     fi
199 else
200     AC_MSG_NOTICE([PulseAudio mainloop support is disabled.])
201 fi
202
203 if test "$enable_pulse" = "yes"; then
204     AC_DEFINE([PULSE_ENABLED], 1, [Enable PulseAudio mainloop support ?])
205 fi
206 AM_CONDITIONAL(PULSE_ENABLED, [test "$enable_pulse" = "yes"])
207 AC_SUBST(PULSE_ENABLED)
208 AC_SUBST(PULSE_CFLAGS)
209 AC_SUBST(PULSE_LIBS)
210
211 # Check if EFL/ecore mainloop support was enabled.
212 AC_ARG_ENABLE(ecore,
213               [  --enable-ecore          enable EFL/ecore mainloop support],
214               [enable_ecore=$enableval], [enable_ecore=auto])
215
216
217 if test "$enable_ecore" != "no"; then
218     # We are using features which are present only at ecore 1.2 onwards.
219     PKG_CHECK_MODULES(ECORE, ecore >= 1.2,
220                       [have_ecore=yes], [have_ecore=no])
221     if test "$have_ecore" = "no" -a "$enable_ecore" = "yes"; then
222         AC_MSG_ERROR([EFL/ecore development libraries not found.])
223     fi
224
225     enable_ecore="$have_ecore"
226 else
227     AC_MSG_NOTICE([EFL/ecore mainloop support is disabled.])
228 fi
229
230 if test "$enable_ecore" = "yes"; then
231     AC_DEFINE([ECORE_ENABLED], 1, [Enable EFL/ecore mainloop support ?])
232 fi
233 AM_CONDITIONAL(ECORE_ENABLED, [test "$enable_ecore" = "yes"])
234 AC_SUBST(ECORE_ENABLED)
235 AC_SUBST(ECORE_CFLAGS)
236 AC_SUBST(ECORE_LIBS)
237
238 # Check if glib mainloop support was enabled.
239 AC_ARG_ENABLE(glib,
240               [  --enable-glib           enable glib mainloop support],
241               [enable_glib=$enableval], [enable_glib=auto])
242
243 if test "$enable_glib" != "no"; then
244     PKG_CHECK_MODULES(GLIB, glib-2.0,
245                       [have_glib=yes], [have_glib=no])
246     if test "$have_glib" = "no" -a "$enable_glib" = "yes"; then
247         AC_MSG_ERROR([glib development libraries not found.])
248     fi
249
250     enable_glib="$have_glib"
251 else
252     AC_MSG_NOTICE([glib mainloop support is disabled.])
253 fi
254
255 if test "$enable_glib" = "yes"; then
256     AC_DEFINE([GLIB_ENABLED], 1, [Enable glib mainloop support ?])
257 fi
258 AM_CONDITIONAL(GLIB_ENABLED, [test "$enable_glib" = "yes"])
259 AC_SUBST(GLIB_ENABLED)
260 AC_SUBST(GLIB_CFLAGS)
261 AC_SUBST(GLIB_LIBS)
262
263 # Check if qt mainloop support was enabled.
264 AC_ARG_ENABLE(qt,
265               [  --enable-qt             enable qt mainloop support],
266               [enable_qt=$enableval], [enable_qt=auto])
267
268 if test "$enable_qt" != "no"; then
269     PKG_CHECK_MODULES(QTCORE, QtCore,
270                       [have_qt=yes], [have_qt=no])
271     if test "$have_qt" = "no" -a "$enable_qt" = "yes"; then
272         AC_MSG_ERROR([Qt(Core) development libraries not found.])
273     fi
274
275     enable_qt="$have_qt"
276 else
277     AC_MSG_NOTICE([Qt mainloop support is disabled.])
278 fi
279
280 if test "$enable_qt" = "yes"; then
281     AC_DEFINE([QT_ENABLED], 1, [Enable qt mainloop support ?])
282     QT_MOC="`pkg-config --variable moc_location QtCore`"
283     AC_SUBST(QT_MOC)
284 fi
285 AM_CONDITIONAL(QT_ENABLED, [test "$enable_qt" = "yes"])
286 AC_SUBST(QT_ENABLED)
287 AC_SUBST(QTCORE_CFLAGS)
288 AC_SUBST(QTCORE_LIBS)
289
290 # Check if building murphy-console was enabled.
291 AC_ARG_ENABLE(console,
292               [  --enable-console        build Murphy console],
293               [enable_console=$enableval], [enable_console=yes])
294
295 if test "$enable_console" = "no"; then
296     AC_MSG_NOTICE([Murphy console binary is disabled.])
297 else
298     AC_MSG_NOTICE([Murphy console binary is enabled.])
299 fi
300
301 if test "$enable_console" = "yes"; then
302     AC_DEFINE([CONSOLE_ENABLED], 1, [Build Murphy console ?])
303 fi
304 AM_CONDITIONAL(CONSOLE_ENABLED, [test "$enable_console" = "yes"])
305 AC_SUBST(CONSOLE_ENABLED)
306 AC_SUBST(READLINE_CFLAGS)
307 AC_SUBST(READLINE_LIBS)
308
309 # Check for json(-c).
310 PKG_CHECK_MODULES(JSON, [json], [have_json=yes], [have_json=no])
311
312 if test "$have_json" = "no"; then
313     PKG_CHECK_MODULES(JSON, [json-c >= 0.11])
314 fi
315
316 AC_MSG_CHECKING([for json_tokener_get_error()])
317 saved_CFLAGS="$CFLAGS"
318 saved_LIBS="$LIBS"
319 CFLAGS="${JSON_CFLAGS}"
320 LIBS="${JSON_LIBS}"
321 AC_LINK_IFELSE(
322    [AC_LANG_PROGRAM(
323          [[#include <json.h>]],
324          [[json_tokener *tok = NULL;
325            if (json_tokener_get_error(tok) != json_tokener_success)
326               return 0;
327            else
328                return 1;]])],
329     [have_json_tokener_get_error=yes],
330     [have_json_tokener_get_error=no])
331 AC_MSG_RESULT([$have_json_tokener_get_error])
332 CFLAGS="$saved_CFLAGS"
333 LIBS="$saved_LIBS"
334
335 if test "$have_json_tokener_get_error" = "yes"; then
336     AC_DEFINE([HAVE_JSON_TOKENER_GET_ERROR], 1, [json_tokener_get_error ?])
337 fi
338
339 # Check if websocket support was/can be enabled.
340 CHECK_WEBSOCKETS()
341
342 # Check if SMACK support should be enabled.
343 AC_ARG_ENABLE(smack,
344               [  --enable-smack          enable SMACK support],
345               [enable_smack=$enableval], [enable_smack=auto])
346
347 if test "$enable_smack" != "no"; then
348     PKG_CHECK_MODULES(SMACK, libsmack, [have_smack=yes], [have_smack=no])
349     if test "$have_smack" = "no" -a "$enable_smack" = "yes"; then
350         AC_MSG_ERROR([SMACK development libraries not found.])
351     fi
352
353     enable_smack="$have_smack"
354 else
355     AC_MSG_NOTICE([SMACK support is disabled.])
356 fi
357
358 if test "$enable_smack" = "yes"; then
359     AC_DEFINE([SMACK_ENABLED], 1, [Enable SMACK support ?])
360 fi
361 AM_CONDITIONAL(SMACK_ENABLED, [test "$enable_smack" = "yes"])
362 AC_SUBST(SMACK_ENABLED)
363 AC_SUBST(SMACK_CFLAGS)
364 AC_SUBST(SMACK_LIBS)
365
366 # Check if systemd support should be enabled.
367 AC_ARG_ENABLE(systemd,
368               [  --enable-systemd          enable systemd support],
369               [enable_systemd=$enableval], [enable_systemd=auto])
370
371 if test "$enable_systemd" != "no"; then
372     PKG_CHECK_MODULES(SYSTEMD, libsystemd-journal libsystemd-daemon,
373                       [have_systemd=yes], [have_systemd=no])
374     if test "$have_systemd" = "no" -a "$enable_systemd" = "yes"; then
375         AC_MSG_ERROR([systemd development libraries not found.])
376     fi
377
378     enable_systemd="$have_systemd"
379 else
380     AC_MSG_NOTICE([systemd support is disabled.])
381 fi
382
383 if test "$enable_systemd" = "yes"; then
384     AC_DEFINE([SYSTEMD_ENABLED], 1, [Enable systemd support ?])
385 fi
386 AM_CONDITIONAL(SYSTEMD_ENABLED, [test "$enable_systemd" = "yes"])
387 AC_SUBST(SYSTEMD_ENABLED)
388 AC_SUBST(SYSTEMD_CFLAGS)
389 AC_SUBST(SYSTEMD_LIBS)
390
391 # Set up murphy CFLAGS and LIBS.
392 MURPHY_CFLAGS=""
393 MURPHY_LIBS=""
394 AC_SUBST(MURPHY_CFLAGS)
395 AC_SUBST(MURPHY_LIBS)
396
397 # Add LIBDIR to config.h.
398 AC_MSG_CHECKING([libdir])
399 AC_MSG_RESULT([$libdir])
400 AC_SUBST(LIBDIR, [$libdir])
401
402 #Check whether we build resources or not
403 AC_ARG_WITH(resources,
404             [  --with-resources wheter to build resource management support],
405             [with_resources=$withval],[with_resources=yes])
406
407 AM_CONDITIONAL(BUILD_RESOURCES,  [ test x$with_resources = "xyes" ])
408
409
410 # Check which plugins should be disabled.
411 AC_ARG_WITH(disabled-plugins,
412             [  --with-disabled-plugins=<plugin-list> specify which plugins to disable],
413             [disabled_plugins=$withval],[disabled_plugins=none])
414
415 # Check which plugins should be compiled as standalone DSOs.
416 AC_ARG_WITH(dynamic-plugins,
417             [  --with-dynamic-plugins=<plugin-list>  specify which plugins compile as DSOs],
418             [dynamic_plugins=$withval],[dynamic_plugins=none])
419
420 all_plugins=$(find src/plugins/. -name plugin-*.c 2>/dev/null | \
421               sed 's#^.*/plugin-##g;s#\.c$##g' | tr '\n' ' ')
422
423 #echo "all plugins: [$all_plugins]"
424
425 case $dynamic_plugins in
426     all)  dynamic_plugins="$all_plugins";;
427     none) dynamic_plugins="";;
428 esac
429
430 internal=""; it=""
431 external=""; et=""
432 disabled=""; dt=""
433 for plugin in $all_plugins; do 
434     type=internal
435
436     for p in ${dynamic_plugins//,/ }; do
437         if test "$plugin" = "$p"; then
438             type=external
439         fi
440     done
441
442     for p in ${disabled_plugins//,/ }; do
443         if test "$plugin" = "$p"; then
444             type=disabled
445         fi
446     done
447
448     case $type in
449         internal) internal="$internal$it$plugin"; it=" ";;
450         external) external="$external$et$plugin"; et=" ";;
451         disabled) disabled="$disabled$dt$plugin"; dt=" ";;
452     esac
453 done
454
455 DISABLED_PLUGINS="$disabled"
456 INTERNAL_PLUGINS="$internal"
457 EXTERNAL_PLUGINS="$external"
458
459
460 function check_if_disabled() {
461     for p in $DISABLED_PLUGINS; do
462         if test "$1" = "$p"; then
463             return 0
464         fi
465     done
466
467     return 1
468 }
469
470 function check_if_internal() {
471     for p in $INTERNAL_PLUGINS; do
472         if test "$1" = "$p"; then
473             return 0
474         fi
475     done
476
477     return 1
478 }
479
480 AM_CONDITIONAL(DISABLED_PLUGIN_TEST,     [check_if_disabled test])
481 AM_CONDITIONAL(DISABLED_PLUGIN_DBUS,     [check_if_disabled dbus])
482 AM_CONDITIONAL(DISABLED_PLUGIN_GLIB,     [check_if_disabled glib])
483 AM_CONDITIONAL(DISABLED_PLUGIN_CONSOLE,  [check_if_disabled console])
484 AM_CONDITIONAL(DISABLED_PLUGIN_RESOURCE_DBUS, [check_if_disabled resource-dbus])
485 AM_CONDITIONAL(DISABLED_PLUGIN_RESOURCE_WRT, [check_if_disabled resource-wrt])
486 AM_CONDITIONAL(DISABLED_PLUGIN_DOMAIN_CONTROL,
487                [check_if_disabled domain-control])
488 AM_CONDITIONAL(DISABLED_PLUGIN_SYSTEMD,  [check_if_disabled systemd])
489
490 AM_CONDITIONAL(BUILTIN_PLUGIN_TEST,     [check_if_internal test])
491 AM_CONDITIONAL(BUILTIN_PLUGIN_DBUS,     [check_if_internal dbus])
492 AM_CONDITIONAL(BUILTIN_PLUGIN_GLIB,     [check_if_internal glib])
493 AM_CONDITIONAL(BUILTIN_PLUGIN_CONSOLE,  [check_if_internal console])
494 AM_CONDITIONAL(BUILTIN_PLUGIN_RESOURCE_DBUS, [check_if_internal resource-dbus])
495 AM_CONDITIONAL(BUILTIN_PLUGIN_RESOURCE_WRT, [check_if_internal resource-wrt])
496 AM_CONDITIONAL(BUILTIN_PLUGIN_DOMAIN_CONTROL,
497                [check_if_internal domain-control])
498 AM_CONDITIONAL(BUILTIN_PLUGIN_LUA,      [check_if_internal lua])
499 AM_CONDITIONAL(BUILTIN_PLUGIN_SYSTEMD,  [check_if_internal systemd])
500
501 # Check for Check (unit test framework).
502 PKG_CHECK_MODULES(CHECK, 
503                   check >= 0.9.4,
504                   [has_check="yes"], [has_check="no"])
505 AM_CONDITIONAL(HAVE_CHECK, test "x$has_check" = "xyes")
506
507 AC_SUBST(CHECK_CFLAGS)
508 AC_SUBST(CHECK_LIBS)
509
510 if test "x$has_check" = "xno"; then
511     AC_MSG_WARN([Check framework not found, unit tests are DISABLED.])
512 fi
513
514 # Check for documentation tools
515 AC_ARG_WITH([documentation],
516             [AS_HELP_STRING([--with-documentation],
517                             [generate pdf, html and other doc files])],
518             [],
519             [with_documentation=auto]
520 )
521
522 AS_IF( [ test x$with_documentation = xno ],
523        [ has_doc_tools="no" ],
524        [ AC_PATH_TOOL([MRP_DOXYGEN], doxygen)
525          AC_PATH_TOOL([MRP_LYX], lyx)
526          AC_PATH_TOOL([MRP_INKSCAPE], inkscape)
527          AC_PATH_TOOL([MRP_PYTHON], python)
528          AC_PATH_TOOL([MRP_TOUCH], touch)
529          AC_PATH_TOOL([MRP_DBLATEX], dblatex)
530          AC_PATH_TOOL([MRP_XMLTO], xmlto)
531
532          AS_IF( [ test x$MRP_DOXYGEN = x -o x$MRP_LYX = x -o \
533                        x$MRP_INKSCAPE = x -o x$MRP_PYTHON = x -o \
534                        x$MRP_TOUCH = x],
535                 [ has_doc_tools="no";
536                   AC_MSG_WARN([Some essential doc-tool is missing]) ],
537                 [ has_doc_tools="yes";
538                   MRP_DOCINIT() ]
539          ) ]
540 )
541
542 AS_IF( [ test x$has_doc_tools == "xno" -o x$MRP_DBLATEX = x ],
543        [ can_make_pdfs="no";
544          AC_WARN([No PDF documentation will be generated]) ],
545        [ can_make_pdfs="yes"]
546 )
547
548 AS_IF([ test x$has_doc_tools == "xno" -o x$MRP_XMLTO = x ],
549       [ can_make_html="no";
550         AC_WARN([No HTML documentation will be generated]) ],
551       [ can_make_html="yes" ]
552 )
553
554
555 AM_CONDITIONAL(BUILD_DOCUMENTATION,  [ test x$has_doc_tools = "xyes" ])
556 AM_CONDITIONAL(BUILD_PDF_DOCUMENTS,  [ test x$can_make_pdfs = "xyes" ])
557 AM_CONDITIONAL(BUILD_HTML_DOCUMENTS, [ test x$can_make_html = "xyes" ])
558
559 AC_SUBST(MRP_DOCDIR, [`pwd`/doc])
560 AC_SUBST(MRP_FIGDIR, [$MRP_DOCDIR/common/figures])
561 AC_SUBST(MRP_MAKE_DOCRULES, [$MRP_DOCDIR/Makefile.rules])
562 AC_SUBST(MRP_DOCSCRIPT_DIR, [$MRP_DOCDIR/scripts])
563 AC_SUBST(MRP_ABNF, [$MRP_DOCSCRIPT_DIR/abnf.py])
564 AC_SUBST(MRP_DBLYXFIX, [$MRP_DOCSCRIPT_DIR/dblyxfix.py])
565 AC_SUBST(MRP_DOXML2DB, [$MRP_DOCSCRIPT_DIR/doxml2db.py])
566 AC_SUBST(MRP_DOXYDEPS, [$MRP_DOCSCRIPT_DIR/doxydeps.py])
567
568
569 # Shave by default.
570 SHAVE_INIT([build-aux], [enable])
571
572 # Create murphy symlink to src.
573 if test ! -L murphy; then
574     AC_MSG_NOTICE([Symlinking src to murphy...])
575     ln -s src murphy
576 fi
577
578 # Generate output.
579 AC_CONFIG_FILES([build-aux/shave
580                  build-aux/shave-libtool
581                  Makefile
582                  utils/Makefile
583                  src/Makefile
584                  src/common/tests/Makefile
585                  src/core/tests/Makefile
586                  src/core/lua-decision/tests/Makefile
587                  src/daemon/tests/Makefile
588                  src/plugins/tests/Makefile
589                  src/common/murphy-common.pc
590                  src/common/murphy-libdbus.pc
591                  src/common/murphy-dbus-libdbus.pc
592                  src/common/murphy-dbus-sdbus.pc
593                  src/common/murphy-pulse.pc
594                  src/common/murphy-ecore.pc
595                  src/common/murphy-glib.pc
596                  src/common/murphy-qt.pc
597                  src/core/murphy-core.pc
598                  src/core/lua-utils/murphy-lua-utils.pc
599                  src/core/lua-decision/murphy-lua-decision.pc
600                  src/breedline/breedline.pc
601                  src/breedline/breedline-murphy.pc
602                  src/breedline/breedline-glib.pc
603                  src/breedline/tests/Makefile
604                  src/murphy-db/Makefile
605                  src/murphy-db/mdb/Makefile
606                  src/murphy-db/mqi/Makefile
607                  src/murphy-db/mql/Makefile
608                  src/murphy-db/include/Makefile
609                  src/murphy-db/tests/Makefile
610                  src/resolver/murphy-resolver.pc
611                  src/resolver/tests/Makefile
612                  src/plugins/domain-control/murphy-domain-controller.pc
613                  doc/Makefile
614                  doc/plugin-developer-guide/Makefile
615                  doc/plugin-developer-guide/db/Makefile
616                  doc/plugin-developer-guide/doxml/Makefile
617                  src/plugins/resource-native/libmurphy-resource/murphy-resource.pc
618                  ])
619 AC_OUTPUT
620
621
622 # Display the configuration.
623 echo "----- configuration -----"
624 echo "Extra C warnings flags: $WARNING_CFLAGS"
625 echo "D-Bus (libdbus) support: $enable_libdbus"
626 echo "D-Bus (systemd-bus) support: $enable_sdbus"
627 echo "PulseAudio mainloop support: $enable_pulse"
628 echo "EFL/ecore mainloop support: $enable_ecore"
629 echo "glib mainloop support: $enable_glib"
630 echo "Qt mainloop support: $enable_qt"
631 echo "Murphy console plugin and client: $enable_console"
632 echo "Resource management support: $with_resources"
633 echo "Websockets support: $enable_websockets"
634 echo "systemd support: $enable_systemd"
635 echo "Plugins:"
636 echo "  - linked-in:"
637 for plugin in ${INTERNAL_PLUGINS:-none}; do
638     echo "      $plugin"
639 done
640 echo "  - dynamic:"
641 for plugin in ${EXTERNAL_PLUGINS:-none}; do
642     echo "      $plugin"
643 done
644 echo "  - disabled:"
645 for plugin in ${DISABLED_PLUGINS:-none}; do
646     echo "      $plugin"
647 done