2005-01-20 Havoc Pennington <hp@redhat.com>
[platform/upstream/dbus.git] / configure.in
1 dnl -*- mode: m4 -*-
2 AC_PREREQ(2.52)
3
4 AC_INIT(dbus/dbus.h)
5
6 AM_INIT_AUTOMAKE(dbus, 0.23)
7
8 AM_CONFIG_HEADER(config.h)
9
10 # Honor aclocal flags
11 ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
12
13 GETTEXT_PACKAGE=dbus-1
14 AC_SUBST(GETTEXT_PACKAGE)
15 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",[The name of the gettext domain])
16
17  ## must come before we use the $USE_MAINTAINER_MODE variable later
18 AM_MAINTAINER_MODE
19
20 AC_PROG_CC
21 AC_PROG_CXX
22 AC_ISC_POSIX
23 AC_HEADER_STDC
24
25 AC_ARG_ENABLE(qt,               [  --enable-qt           enable Qt-friendly client library],enable_qt=$enableval,enable_qt=auto)
26 AC_ARG_ENABLE(glib,             [  --enable-glib         enable GLib-friendly client library],enable_glib=$enableval,enable_glib=auto)
27 AC_ARG_ENABLE(gtk,              [  --enable-gtk          enable GTK-requiring executables],enable_gtk=$enableval,enable_gtk=auto)
28 AC_ARG_ENABLE(tests,            [  --enable-tests        enable unit test code],enable_tests=$enableval,enable_tests=$USE_MAINTAINER_MODE)
29 AC_ARG_ENABLE(ansi,             [  --enable-ansi         enable -ansi -pedantic gcc flags],enable_ansi=$enableval,enable_ansi=no)
30 AC_ARG_ENABLE(verbose-mode,     [  --enable-verbose-mode support verbose debug mode],enable_verbose_mode=$enableval,enable_verbose_mode=$USE_MAINTAINER_MODE)
31 AC_ARG_ENABLE(asserts,          [  --enable-asserts      include assertion checks],enable_asserts=$enableval,enable_asserts=$USE_MAINTAINER_MODE)
32 AC_ARG_ENABLE(checks,           [  --enable-checks       include sanity checks on public API],enable_checks=$enableval,enable_checks=yes)
33 AC_ARG_ENABLE(xml-docs,         [  --enable-xml-docs     build XML documentation (requires xmlto)],enable_xml_docs=$enableval,enable_xml_docs=auto)
34 AC_ARG_ENABLE(doxygen-docs,     [  --enable-doxygen-docs     build DOXYGEN documentation (requires Doxygen)],enable_doxygen_docs=$enableval,enable_doxygen_docs=auto)
35 AC_ARG_ENABLE(gcov,             [  --enable-gcov         compile with coverage profiling instrumentation (gcc only)],enable_gcov=$enableval,enable_gcov=no)
36 AC_ARG_ENABLE(abstract-sockets, [  --enable-abstract-sockets  use abstract socket namespace (linux only)],enable_abstract_sockets=$enableval,enable_abstract_sockets=auto)
37 AC_ARG_ENABLE(gcj,              [  --enable-gcj          build gcj bindings],enable_gcj=$enableval,enable_gcj=no)
38 AC_ARG_ENABLE(mono,             [  --enable-mono         build mono bindings],enable_mono=$enableval,enable_mono=auto)
39 AC_ARG_ENABLE(mono_docs,        [  --enable-mono-docs    build mono docs],enable_mono_docs=$enableval,enable_mono_docs=auto)
40 AC_ARG_ENABLE(python,           [  --enable-python       build python bindings],enable_python=$enableval,enable_python=auto)
41 AC_ARG_ENABLE(selinux,          [  --enable-selinux      build with SELinux support],enable_selinux=$enableval,enable_selinux=auto)
42
43 AC_ARG_WITH(xml,                [  --with-xml=[libxml/expat]           XML library to use])
44 AC_ARG_WITH(init-scripts,       [  --with-init-scripts=[redhat]        Style of init scripts to install])
45 AC_ARG_WITH(session-socket-dir, [  --with-session-socket-dir=[dirname] Where to put sockets for the per-login-session message bus])
46 AC_ARG_WITH(test-socket-dir,    [  --with-test-socket-dir=[dirname]    Where to put sockets for make check])
47 AC_ARG_WITH(system-pid-file,    [  --with-system-pid-file=[pidfile]    PID file for systemwide daemon])
48 AC_ARG_WITH(system-socket,      [  --with-system-socket=[filename]     UNIX domain socket for systemwide daemon])
49
50 dnl DBUS_BUILD_TESTS controls unit tests built in to .c files 
51 dnl and also some stuff in the test/ subdir
52 AM_CONDITIONAL(DBUS_BUILD_TESTS, test x$enable_tests = xyes)
53 if test x$enable_tests = xyes; then
54     AC_DEFINE(DBUS_BUILD_TESTS,1,[Build test code])
55 fi
56
57 if test x$enable_verbose_mode = xyes; then
58     AC_DEFINE(DBUS_ENABLE_VERBOSE_MODE,1,[Support a verbose mode])
59 fi
60 if test x$enable_asserts = xno; then
61     AC_DEFINE(DBUS_DISABLE_ASSERT,1,[Disable assertion checking])
62     AC_DEFINE(G_DISABLE_ASSERT,1,[Disable GLib assertion macros])
63 fi
64 if test x$enable_checks = xno; then
65     AC_DEFINE(DBUS_DISABLE_CHECKS,1,[Disable public API sanity checking])
66     AC_DEFINE(G_DISABLE_CHECKS,1,[Disable GLib public API sanity checking])
67 fi
68
69 #### gcc warning flags
70
71 if test "x$GCC" = "xyes"; then
72   changequote(,)dnl
73   case " $CFLAGS " in
74   *[\ \ ]-Wall[\ \      ]*) ;;
75   *) CFLAGS="$CFLAGS -Wall" ;;
76   esac
77
78   case " $CFLAGS " in
79   *[\ \ ]-Wchar-subscripts[\ \  ]*) ;;
80   *) CFLAGS="$CFLAGS -Wchar-subscripts" ;;
81   esac
82
83   case " $CFLAGS " in
84   *[\ \ ]-Wmissing-declarations[\ \     ]*) ;;
85   *) CFLAGS="$CFLAGS -Wmissing-declarations" ;;
86   esac
87
88   case " $CFLAGS " in
89   *[\ \ ]-Wmissing-prototypes[\ \       ]*) ;;
90   *) CFLAGS="$CFLAGS -Wmissing-prototypes" ;;
91   esac
92
93   case " $CFLAGS " in
94   *[\ \ ]-Wnested-externs[\ \   ]*) ;;
95   *) CFLAGS="$CFLAGS -Wnested-externs" ;;
96   esac
97
98   case " $CFLAGS " in
99   *[\ \ ]-Wpointer-arith[\ \    ]*) ;;
100   *) CFLAGS="$CFLAGS -Wpointer-arith" ;;
101   esac
102
103   case " $CFLAGS " in
104   *[\ \ ]-Wcast-align[\ \       ]*) ;;
105   *) CFLAGS="$CFLAGS -Wcast-align" ;;
106   esac
107
108   case " $CFLAGS " in
109   *[\ \ ]-Wfloat-equal[\ \      ]*) ;;
110   *) CFLAGS="$CFLAGS -Wfloat-equal" ;;
111   esac
112
113   case " $CFLAGS " in
114   *[\ \ ]-Wsign-compare[\ \     ]*) ;;
115   *) CFLAGS="$CFLAGS -Wsign-compare" ;;
116   esac
117
118   if test "x$enable_ansi" = "xyes"; then
119     case " $CFLAGS " in
120     *[\ \       ]-ansi[\ \      ]*) ;;
121     *) CFLAGS="$CFLAGS -ansi" ;;
122     esac
123
124     case " $CFLAGS " in
125     *[\ \       ]-D_POSIX_C_SOURCE*) ;;
126     *) CFLAGS="$CFLAGS -D_POSIX_C_SOURCE=199309L" ;;
127     esac
128
129     case " $CFLAGS " in
130     *[\ \       ]-D_BSD_SOURCE[\ \      ]*) ;;
131     *) CFLAGS="$CFLAGS -D_BSD_SOURCE" ;;
132     esac
133
134     case " $CFLAGS " in
135     *[\ \       ]-pedantic[\ \  ]*) ;;
136     *) CFLAGS="$CFLAGS -pedantic" ;;
137     esac
138   fi
139   if test x$enable_gcov = xyes; then
140     case " $CFLAGS " in
141     *[\ \       ]-fprofile-arcs[\ \     ]*) ;;
142     *) CFLAGS="$CFLAGS -fprofile-arcs" ;;
143     esac
144     case " $CFLAGS " in
145     *[\ \       ]-ftest-coverage[\ \    ]*) ;;
146     *) CFLAGS="$CFLAGS -ftest-coverage" ;;
147     esac
148
149     ## remove optimization
150     CFLAGS=`echo "$CFLAGS" | sed -e 's/-O[0-9]*//g'`
151   fi
152   changequote([,])dnl
153 else
154   if test x$enable_gcov = xyes; then
155     AC_MSG_ERROR([--enable-gcov can only be used with gcc])
156   fi
157 fi
158
159 #### can't use AM_PROG_GCJ since it fails fatally if no gcj found
160 AC_CHECK_PROGS(GCJ, gcj, gcj)
161 if test -z "$GCJ" ; then
162      have_gcj=no
163 else
164      # Needs to be here so libtool wont get confused
165      AM_PROG_GCJ
166
167      have_gcj=yes
168      if test "x${GCJFLAGS-unset}" = xunset; then
169         GCJFLAGS="-g -O2 -Wall"
170      fi
171      AC_SUBST(GCJFLAGS)
172 fi
173
174 if test x$enable_gcj = xauto ; then
175     if test x$have_gcj = xno ; then
176         enable_gcj=no
177     else
178         enable_gcj=yes
179     fi
180 fi
181
182 if test x$enable_gcj = xyes; then
183     if test x$have_gcj = xno ; then
184         AC_MSG_ERROR([Building gcj explicitly required, but gcj not found])
185     fi
186 fi
187
188 AM_CONDITIONAL(DBUS_USE_GCJ, test x$enable_gcj = xyes)
189
190 AM_PROG_LIBTOOL
191
192 #### Look for mono
193 MONO_REQUIRED_VERSION=0.95
194 AC_SUBST(MONO_REQUIRED_VERSION)
195 PKG_CHECK_MODULES(MONO_DEPENDENCY, mono >= $MONO_REQUIRED_VERSION, have_mono=true, have_mono=false)
196
197 if test "x$enable_mono" = "xyes"; then
198         if test "x$have_mono" = "xfalse"; then
199                 AC_MSG_ERROR([Mono was not found])
200         fi
201 fi
202
203 if test "x$have_mono" = "xtrue"; then
204         if test `uname -s` = "Darwin"; then
205                 AC_PATH_PROG(RUNTIME, mint, no)
206                 AC_PATH_PROG(CSC, mcs, no)
207                 LIB_PREFIX=
208                 LIB_SUFFIX=.dylib
209         else
210                 AC_PATH_PROG(RUNTIME, mono, no)
211                 AC_PATH_PROG(CSC, mcs, no)
212                 LIB_PREFIX=.so
213                 LIB_SUFFIX=
214         fi
215 else
216         AC_PATH_PROG(CSC, csc.exe, no)
217         RUNTIME=
218         LIB_PREFIX=
219         LIB_SUFFIX=.dylib
220 fi
221
222 if test x$enable_mono = xyes; then
223     if test x$have_mcs = xno ; then
224         AC_MSG_ERROR([Building Mono bindings explicitly required, but mcs compiler not found])
225     fi
226
227     ### Test for GACUTIL
228     AC_PATH_PROG(GACUTIL, gacutil, no)
229     if test "x$GACUTIL" = "xno" ; then
230         AC_MSG_ERROR([No gacutil tool found])
231     fi
232
233     AC_SUBST(GACUTIL)
234 fi
235
236 if test x$enable_mono = xauto ; then
237     if test x$CSC = xno ; then
238         enable_mono=no
239     else
240         ### Test for GACUTIL
241         AC_PATH_PROG(GACUTIL, gacutil, no)
242         if test "x$GACUTIL" = "xno" ; then
243            enable_mono=no
244         else
245            enable_mono=yes
246         fi
247     fi
248 fi
249
250 AC_SUBST(RUNTIME)
251 AC_SUBST(CSC)
252 AC_SUBST(GACUTIL)
253 AC_SUBST(LIB_PREFIX)
254 AC_SUBST(LIB_SUFFIX)
255
256 AM_CONDITIONAL(DBUS_USE_CSC, test x$enable_mono = xyes)
257
258 #### Look for monodoc
259 MONODOC_REQUIRED_VERSION=0.16
260 AC_SUBST(MONODOC_REQUIRED_VERSION)
261 PKG_CHECK_MODULES(MONODOC_DEPENDENCY, monodoc >= $MONODOC_REQUIRED_VERSION, have_monodoc=yes, have_monodoc=no)
262
263 if test x$enable_mono_docs = xyes; then
264     if test x$have_monodoc = xno ; then
265         AC_MSG_ERROR([Building Mono docs explicitly required, but monodoc not found])
266     else
267         AC_PATH_PROG(MONODOC, monodoc, no)
268         if test x$MONODOC = xno; then
269            AC_MSG_ERROR([Building Mono docs explicitly required, but monodoc not found])        
270         fi
271     fi
272 fi
273
274 if test x$enable_mono_docs = xauto ; then
275     if test x$have_monodoc = xno ; then
276         enable_mono_docs=no
277         MONODOC=
278     else
279         AC_PATH_PROG(MONODOC, monodoc, no)
280         if test x$MONODOC = xno; then
281            enable_mono_docs=no
282            MONODOC=
283         else
284            enable_mono_docs=yes
285         fi
286     fi
287 fi
288
289 AC_SUBST(MONODOC)
290
291 AM_CONDITIONAL(ENABLE_MONODOC, test "x$enable_mono_docs" = "xyes")
292
293 changequote(,)dnl
294 # let ourselves use our own unstable API
295 CPPFLAGS="-DDBUS_API_SUBJECT_TO_CHANGE=1 $CPPFLAGS"
296 # compress spaces in flags
297 CFLAGS=`echo "$CFLAGS" | sed -e 's/ +/ /g'`
298 CXXFLAGS=`echo "$CXXFLAGS" | sed -e 's/ +/ /g'`
299 CPPFLAGS=`echo "$CPPFLAGS" | sed -e 's/ +/ /g'`
300 changequote([,])dnl
301
302 if test x$enable_gcov = xyes; then
303      ## so that config.h changes when you toggle gcov support
304      AC_DEFINE_UNQUOTED(DBUS_GCOV_ENABLED, 1, [Defined if gcov is enabled to force a rebuild due to config.h changing])
305
306      AC_MSG_CHECKING([for gcc 3.3 version of gcov file format])
307      have_gcc33_gcov=no
308      AC_RUN_IFELSE( [AC_LANG_PROGRAM( , [[ if (__GNUC__ >=3 && __GNUC_MINOR__ >= 3) exit (0); else exit (1); ]])],  
309                    have_gcc33_gcov=yes)
310      if test x$have_gcc33_gcov = xyes ; then
311          AC_DEFINE_UNQUOTED(DBUS_HAVE_GCC33_GCOV, 1, [Defined if we have gcc 3.3 and thus the new gcov format])
312      fi
313      AC_MSG_RESULT($have_gcc33_gcov)
314 fi
315 AM_CONDITIONAL(DBUS_GCOV_ENABLED, test x$enable_gcov = xyes)
316
317 #### Integer sizes 
318
319 AC_CHECK_SIZEOF(char)
320 AC_CHECK_SIZEOF(short)
321 AC_CHECK_SIZEOF(long)
322 AC_CHECK_SIZEOF(int)
323 AC_CHECK_SIZEOF(void *)
324 AC_CHECK_SIZEOF(long long)
325 AC_CHECK_SIZEOF(__int64)
326
327 ### See what our 64 bit type is called
328 AC_MSG_CHECKING([64-bit integer type])
329
330 case 8 in
331 $ac_cv_sizeof_int)
332   dbusint64=int
333   dbusint64_constant='(val)'
334   dbusuint64_constant='(val)'
335   ;;
336 $ac_cv_sizeof_long)
337   dbusint64=long
338   dbusint64_constant='(val##L)'
339   dbusuint64_constant='(val##UL)'
340   ;;
341 $ac_cv_sizeof_long_long)
342   dbusint64='long long'
343   dbusint64_constant='(val##LL)'
344   dbusuint64_constant='(val##ULL)'
345   ;;
346 $ac_cv_sizeof___int64)
347   dbusint64=__int64
348   dbusint64_constant='(val##i64)'
349   dbusuint64_constant='(val##ui64)'
350   ;;
351 esac
352
353 if test -z "$dbusint64" ; then
354         DBUS_INT64_TYPE="no_int64_type_detected"
355         DBUS_HAVE_INT64=0
356         DBUS_INT64_CONSTANT=
357         DBUS_UINT64_CONSTANT=
358         AC_MSG_RESULT([none found])
359 else
360         DBUS_INT64_TYPE="$dbusint64"
361         DBUS_HAVE_INT64=1
362         DBUS_INT64_CONSTANT="$dbusint64_constant"
363         DBUS_UINT64_CONSTANT="$dbusuint64_constant"
364         AC_MSG_RESULT($DBUS_INT64_TYPE)
365 fi
366
367 AC_SUBST(DBUS_INT64_TYPE)
368 AC_SUBST(DBUS_INT64_CONSTANT)
369 AC_SUBST(DBUS_UINT64_CONSTANT)
370 AC_SUBST(DBUS_HAVE_INT64)
371
372 ## byte order
373 AC_C_BIGENDIAN
374
375
376 dnl **********************************
377 dnl *** va_copy checks (from GLib) ***
378 dnl **********************************
379 dnl we currently check for all three va_copy possibilities, so we get
380 dnl all results in config.log for bug reports.
381 AC_CACHE_CHECK([for an implementation of va_copy()],dbus_cv_va_copy,[
382         AC_LINK_IFELSE([#include <stdarg.h>
383         void f (int i, ...) {
384         va_list args1, args2;
385         va_start (args1, i);
386         va_copy (args2, args1);
387         if (va_arg (args2, int) != 42 || va_arg (args1, int) != 42)
388           exit (1);
389         va_end (args1); va_end (args2);
390         }
391         int main() {
392           f (0, 42);
393           return 0;
394         }],
395         [dbus_cv_va_copy=yes],
396         [dbus_cv_va_copy=no])
397 ])
398 AC_CACHE_CHECK([for an implementation of __va_copy()],dbus_cv___va_copy,[
399         AC_LINK_IFELSE([#include <stdarg.h>
400         void f (int i, ...) {
401         va_list args1, args2;
402         va_start (args1, i);
403         __va_copy (args2, args1);
404         if (va_arg (args2, int) != 42 || va_arg (args1, int) != 42)
405           exit (1);
406         va_end (args1); va_end (args2);
407         }
408         int main() {
409           f (0, 42);
410           return 0;
411         }],
412         [dbus_cv___va_copy=yes],
413         [dbus_cv___va_copy=no])
414 ])
415
416 if test "x$dbus_cv_va_copy" = "xyes"; then
417   dbus_va_copy_func=va_copy
418 else if test "x$dbus_cv___va_copy" = "xyes"; then
419   dbus_va_copy_func=__va_copy
420 fi
421 fi
422
423 if test -n "$dbus_va_copy_func"; then
424   AC_DEFINE_UNQUOTED(DBUS_VA_COPY,$dbus_va_copy_func,[A 'va_copy' style function])
425 fi
426
427 AC_CACHE_CHECK([whether va_lists can be copied by value],dbus_cv_va_val_copy,[
428         AC_TRY_RUN([#include <stdarg.h>
429         void f (int i, ...) {
430         va_list args1, args2;
431         va_start (args1, i);
432         args2 = args1;
433         if (va_arg (args2, int) != 42 || va_arg (args1, int) != 42)
434           exit (1);
435         va_end (args1); va_end (args2);
436         }
437         int main() {
438           f (0, 42);
439           return 0;
440         }],
441         [dbus_cv_va_val_copy=yes],
442         [dbus_cv_va_val_copy=no],
443         [dbus_cv_va_val_copy=yes])
444 ])
445
446 if test "x$dbus_cv_va_val_copy" = "xno"; then
447   AC_DEFINE(DBUS_VA_COPY_AS_ARRAY,1, ['va_lists' cannot be copies as values])
448 fi
449
450
451 #### Atomic integers (checks by Sebastian Wilhelmi for GLib)
452 AC_MSG_CHECKING([whether to use inline assembler routines for atomic integers])
453 have_atomic_inc=no
454 if test x"$GCC" = xyes; then
455   if test "x$enable_ansi" = "xyes"; then
456     AC_MSG_RESULT([no])
457   else
458     case $host_cpu in
459       i386)
460         AC_MSG_RESULT([no])
461         ;;
462       i?86)
463         AC_MSG_RESULT([i486])
464         AC_DEFINE_UNQUOTED(DBUS_USE_ATOMIC_INT_486, 1, [Use atomic integer implementation for 486])
465         have_atomic_inc=yes
466         ;;
467       *)
468         AC_MSG_RESULT([no])
469         ;;
470     esac
471   fi
472 fi
473 if test x$have_atomic_inc = xyes ; then
474   AC_DEFINE_UNQUOTED(DBUS_HAVE_ATOMIC_INT, 1, [Some atomic integer implementation present])
475 fi
476
477 #### Various functions
478 AC_CHECK_LIB(socket,socket)
479 AC_CHECK_LIB(nsl,gethostbyname)
480
481 AC_CHECK_FUNCS(vsnprintf vasprintf nanosleep usleep poll setenv unsetenv socketpair getgrouplist)
482
483 AC_CHECK_HEADERS(execinfo.h, [AC_CHECK_FUNCS(backtrace)])
484
485 AC_CACHE_CHECK([for posix getpwnam_r],
486                 ac_cv_func_posix_getpwnam_r,
487                 [AC_TRY_RUN([
488 #include <errno.h>
489 #include <pwd.h>
490 int main () { 
491     char buffer[10000];
492     struct passwd pwd, *pwptr = &pwd;
493     int error;
494     errno = 0;
495     error = getpwnam_r ("", &pwd, buffer, 
496                         sizeof (buffer), &pwptr);
497    return (error < 0 && errno == ENOSYS) 
498            || error == ENOSYS; 
499 }               ],
500         [ac_cv_func_posix_getpwnam_r=yes],
501         [ac_cv_func_posix_getpwnam_r=no])])
502 if test "$ac_cv_func_posix_getpwnam_r" = yes; then
503         AC_DEFINE(HAVE_POSIX_GETPWNAM_R,1,
504                 [Have POSIX function getpwnam_r])
505 else
506         AC_CACHE_CHECK([for nonposix getpwnam_r],
507                 ac_cv_func_nonposix_getpwnam_r,
508                 [AC_TRY_LINK([#include <pwd.h>],
509                         [char buffer[10000];
510                         struct passwd pwd;
511                         getpwnam_r ("", &pwd, buffer, 
512                                         sizeof (buffer));],
513                         [ac_cv_func_nonposix_getpwnam_r=yes],
514                         [ac_cv_func_nonposix_getpwnam_r=no])])
515                 if test "$ac_cv_func_nonposix_getpwnam_r" = yes; then
516                 AC_DEFINE(HAVE_NONPOSIX_GETPWNAM_R,1,
517                         [Have non-POSIX function getpwnam_r])
518         fi
519 fi
520
521 dnl check for socklen_t
522 AC_MSG_CHECKING(whether socklen_t is defined)
523 AC_TRY_COMPILE([
524 #include <sys/types.h>
525 #include <sys/socket.h>
526 #include <netdb.h>
527 ],[
528 socklen_t foo;
529 foo = 1;
530 ],dbus_have_socklen_t=yes,dbus_have_socklen_t=no)
531 AC_MSG_RESULT($dbus_have_socklen_t)
532
533 if test "x$dbus_have_socklen_t" = "xyes"; then
534     AC_DEFINE(HAVE_SOCKLEN_T,1,[Have socklen_t type])
535 fi
536
537 dnl check for writev header and writev function so we're 
538 dnl good to go if HAVE_WRITEV gets defined.
539 AC_CHECK_HEADERS(sys/uio.h, [AC_CHECK_FUNCS(writev)])
540
541 dnl check for flavours of varargs macros (test from GLib)
542 AC_MSG_CHECKING(for ISO C99 varargs macros in C)
543 AC_TRY_COMPILE([],[
544 int a(int p1, int p2, int p3);
545 #define call_a(...) a(1,__VA_ARGS__)
546 call_a(2,3);
547 ],dbus_have_iso_c_varargs=yes,dbus_have_iso_c_varargs=no)
548 AC_MSG_RESULT($dbus_have_iso_c_varargs)
549
550 AC_MSG_CHECKING(for GNUC varargs macros)
551 AC_TRY_COMPILE([],[
552 int a(int p1, int p2, int p3);
553 #define call_a(params...) a(1,params)
554 call_a(2,3);
555 ],dbus_have_gnuc_varargs=yes,dbus_have_gnuc_varargs=no)
556 AC_MSG_RESULT($dbus_have_gnuc_varargs)
557
558 dnl Output varargs tests
559 if test x$dbus_have_iso_c_varargs = xyes; then
560     AC_DEFINE(HAVE_ISO_VARARGS,1,[Have ISO C99 varargs macros])
561 fi
562 if test x$dbus_have_gnuc_varargs = xyes; then
563     AC_DEFINE(HAVE_GNUC_VARARGS,1,[Have GNU-style varargs macros])
564 fi
565
566 dnl Check for various credentials.
567 AC_MSG_CHECKING(for struct cmsgcred)
568 AC_TRY_COMPILE([
569 #include <sys/types.h>
570 #include <sys/socket.h>
571 ],[
572 struct cmsgcred cred;
573
574 cred.cmcred_pid = 0;
575 ],dbus_have_struct_cmsgcred=yes,dbus_have_struct_cmsgcred=no)
576 AC_MSG_RESULT($dbus_have_struct_cmsgcred)
577
578 if test x$dbus_have_struct_cmsgcred = xyes; then
579     AC_DEFINE(HAVE_CMSGCRED,1,[Have cmsgcred structure])
580 fi
581
582
583 #### Abstract sockets
584
585 AC_MSG_CHECKING(abstract socket namespace)
586 AC_LANG_PUSH(C)
587 AC_RUN_IFELSE([AC_LANG_PROGRAM(
588 [[
589 #include <sys/types.h>
590 #include <stdlib.h>
591 #include <string.h>
592 #include <stdio.h>
593 #include <sys/socket.h>
594 #include <sys/un.h>
595 #include <errno.h>
596 ]],
597 [[
598   int listen_fd;
599   struct sockaddr_un addr;
600   
601   listen_fd = socket (PF_UNIX, SOCK_STREAM, 0);
602   
603   if (listen_fd < 0)
604     {
605       fprintf (stderr, "socket() failed: %s\n", strerror (errno));
606       exit (1);
607     }
608
609   memset (&addr, '\0', sizeof (addr));
610   addr.sun_family = AF_UNIX;
611   strcpy (addr.sun_path, "X/tmp/dbus-fake-socket-path-used-in-configure-test");
612   addr.sun_path[0] = '\0'; /* this is what makes it abstract */
613   
614   if (bind (listen_fd, (struct sockaddr*) &addr, SUN_LEN (&addr)) < 0)
615     {
616        fprintf (stderr, "Abstract socket namespace bind() failed: %s\n", 
617                 strerror (errno));
618        exit (1);
619     }
620   else 
621     exit (0);
622 ]])],
623               [have_abstract_sockets=yes],
624               [have_abstract_sockets=no])
625 AC_LANG_POP(C)
626 AC_MSG_RESULT($have_abstract_sockets)
627
628 if test x$enable_abstract_sockets = xyes; then
629     if test x$have_abstract_sockets = xno; then
630         AC_MSG_ERROR([Abstract sockets explicitly required, and support not detected.])
631     fi
632 fi
633
634 if test x$enable_abstract_sockets = xno; then
635    have_abstract_sockets=no;
636 fi
637
638 if test x$have_abstract_sockets = xyes ; then
639    DBUS_PATH_OR_ABSTRACT=abstract
640    AC_DEFINE(HAVE_ABSTRACT_SOCKETS,1,[Have abstract socket namespace])
641 else
642    DBUS_PATH_OR_ABSTRACT=path
643 fi
644
645 # this is used in addresses to prefer abstract, e.g. 
646 # unix:path=/foo or unix:abstract=/foo 
647 AC_SUBST(DBUS_PATH_OR_ABSTRACT)
648
649 #### Sort out XML library
650
651 # see what we have
652 AC_CHECK_LIB(expat, XML_ParserCreate_MM, 
653              [ AC_CHECK_HEADERS(expat.h, have_expat=true, have_expat=false) ],
654              have_expat=false)
655
656 PKG_CHECK_MODULES(LIBXML, libxml-2.0, have_libxml=true, have_libxml=false)
657
658 # see what we want to use
659 dbus_use_libxml=false
660 dbus_use_expat=false
661 if test x$with_xml = xexpat; then
662         dbus_use_expat=true
663         if ! $have_expat ; then
664            AC_MSG_ERROR([Explicitly requested expat but expat not found])
665         fi
666 elif test x$with_xml = xlibxml; then
667         dbus_use_libxml=true
668         if ! $have_libxml ; then
669            AC_MSG_ERROR([Explicitly requested libxml but libxml not found])
670         fi
671 else
672         ### expat is the default because libxml can't currently survive 
673         ### our brutal OOM-handling unit test setup.
674         ### http://bugzilla.gnome.org/show_bug.cgi?id=109368
675         if $have_expat ; then
676                 with_xml=expat
677                 dbus_use_expat=true
678         elif $have_libxml ; then
679                 with_xml=libxml
680                 dbus_use_libxml=true
681         else
682                 AC_MSG_ERROR([No XML library found, check config.log for failed attempts])
683         fi
684 fi
685
686 AM_CONDITIONAL(DBUS_USE_EXPAT, $dbus_use_expat)
687 AM_CONDITIONAL(DBUS_USE_LIBXML, $dbus_use_libxml)
688
689 if $dbus_use_expat; then
690    XML_LIBS=-lexpat
691    XML_CFLAGS=
692 fi
693 if $dbus_use_libxml; then
694    XML_LIBS=$LIBXML_LIBS
695    XML_CFLAGS=$LIBXML_CFLAGS
696 fi
697
698 # SELinux detection
699 if test x$enable_selinux = xno ; then
700     have_selinux=no;
701 else
702     # See if we have SELinux library
703     AC_CHECK_LIB(selinux, is_selinux_enabled, 
704                  have_selinux=yes, have_selinux=no)
705
706     # see if we have the SELinux header with the new D-BUS stuff in it
707     if test x$have_selinux = xyes ; then
708         AC_MSG_CHECKING([for DBUS Flask permissions in selinux/av_permissions.h])
709         AC_TRY_COMPILE([#include <selinux/av_permissions.h>],
710                         [#ifdef DBUS__ACQUIRE_SVC return 0;
711                          #else
712                          #error DBUS__ACQUIRE_SVC not defined
713                          #endif],
714                         have_selinux=yes, have_selinux=no)
715         AC_MSG_RESULT($have_selinux)
716     fi
717
718     if test x$enable_selinux = xauto ; then
719         if test x$have_selinux = xno ; then
720                 AC_MSG_WARN([Sufficiently new SELinux library not found])
721         fi
722     else 
723         if test x$have_selinux = xno ; then
724                 AC_MSG_ERROR([SElinux explicitly required, and SELinux library not found])
725         fi
726     fi
727 fi
728
729 AM_CONDITIONAL(HAVE_SELINUX, test x$have_selinux = xyes)
730
731 if test x$have_selinux = xyes ; then
732     SELINUX_LIBS="-lselinux -lpthread"
733     AC_DEFINE(HAVE_SELINUX,1,[SELinux support])
734 else
735     SELINUX_LIBS=
736 fi
737
738 #### Set up final flags
739 DBUS_CLIENT_CFLAGS=
740 DBUS_CLIENT_LIBS=
741 AC_SUBST(DBUS_CLIENT_CFLAGS)
742 AC_SUBST(DBUS_CLIENT_LIBS)
743
744 DBUS_BUS_CFLAGS=$XML_CFLAGS
745 DBUS_BUS_LIBS="$XML_LIBS $SELINUX_LIBS"
746 AC_SUBST(DBUS_BUS_CFLAGS)
747 AC_SUBST(DBUS_BUS_LIBS)
748
749 DBUS_TEST_CFLAGS=
750 DBUS_TEST_LIBS=
751 AC_SUBST(DBUS_TEST_CFLAGS)
752 AC_SUBST(DBUS_TEST_LIBS)
753
754 # Glib detection
755 PKG_CHECK_MODULES(DBUS_GLIB, gobject-2.0, have_glib=yes, have_glib=no)
756 PKG_CHECK_MODULES(DBUS_GLIB_THREADS, glib-2.0 gthread-2.0, have_glib_threads=yes, have_glib_threads=no)
757
758 if test x$have_glib = xno ; then
759     AC_MSG_WARN([GLib development libraries not found])
760 fi
761
762 if test x$enable_glib = xyes; then
763     if test x$have_glib = xno; then
764         AC_MSG_ERROR([GLib explicitly required, and GLib development libraries not found])
765     fi
766 fi
767
768 if test x$enable_glib = xno; then
769    have_glib=no;
770 fi
771
772 AM_CONDITIONAL(HAVE_GLIB, test x$have_glib = xyes)
773 AM_CONDITIONAL(HAVE_GLIB_THREADS, test x$have_glib_threads = xyes)
774
775 dnl GLib flags
776 AC_SUBST(DBUS_GLIB_CFLAGS)
777 AC_SUBST(DBUS_GLIB_LIBS)
778 AC_SUBST(DBUS_GLIB_THREADS_LIBS)
779
780 DBUS_GLIB_TOOL_CFLAGS=$XML_CFLAGS
781 DBUS_GLIB_TOOL_LIBS=$XML_LIBS
782 AC_SUBST(DBUS_GLIB_TOOL_CFLAGS)
783 AC_SUBST(DBUS_GLIB_TOOL_LIBS)
784
785 # GTK detection
786 if test x$have_glib = xno ; then
787     AC_MSG_WARN([Can't use GTK+ since GLib not enabled])
788     have_gtk=no
789 else
790     PKG_CHECK_MODULES(DBUS_GTK, gtk+-2.0, have_gtk=yes, have_gtk=no)
791 fi
792
793 if test x$have_gtk = xno ; then
794     AC_MSG_WARN([GTK+ development libraries not found])
795 fi
796
797 if test x$enable_gtk = xyes; then
798     if test x$have_gtk = xno; then
799         AC_MSG_ERROR([GTK+ explicitly required, and GTK+ development libraries not found])
800     fi
801 fi
802
803 if test x$enable_gtk = xno; then
804    have_gtk=no;
805 fi
806
807 AM_CONDITIONAL(HAVE_GTK, test x$have_gtk = xyes)
808
809 dnl Gtk flags
810 AC_SUBST(DBUS_GTK_CFLAGS)
811 AC_SUBST(DBUS_GTK_LIBS)
812
813 # Qt detection
814 AC_PATH_PROG(QT_MOC, moc, no)
815
816 have_qt=no
817 AC_MSG_CHECKING([for qglobal.h])
818 if test -n "$QTDIR" -a -f "$QTDIR/include/qglobal.h"; then
819     have_qt=yes
820     DBUS_QT_CXXFLAGS="-I$QTDIR/include"
821 else
822     for dir in "${prefix}/include/qt" "/usr/include/qt-3.1" "/usr/include/qt3" "/usr/include/qt" "/usr/lib/qt/include" "/usr/lib/qt-3.1/include"; do
823         if test -f "$dir/qglobal.h"; then
824             have_qt=yes
825             DBUS_QT_CXXFLAGS="-I$dir"
826        fi
827     done
828 fi
829 if test x"$have_qt" = x"yes"; then
830    AC_MSG_RESULT([found])
831 else
832    AC_MSG_RESULT([not found])
833 fi
834
835 dnl linking to kdecore will give us a bit of help from libtool
836 if (! kde-config >& /dev/null); then
837     have_qt=no
838 else
839     kdelibs=`kde-config --install lib --expandvars 2>/dev/null`
840     if test -z $kdelibs -o ! -f $kdelibs/libkdecore.la; then
841         have_qt=no
842     else
843         DBUS_QT_LIBS="$kdelibs/libkdecore.la"
844     fi
845 fi
846
847 if test x$have_qt = xno ; then
848     AC_MSG_WARN([Qt development libraries not found])
849 fi
850
851 if test x$enable_qt = xyes; then
852     if test x$have_qt = xno; then
853         AC_MSG_ERROR([Qt integration explicitly required, and Qt libraries not found])
854     fi
855 fi
856
857 if test x$enable_qt = xno; then
858    have_qt=no;
859 fi
860
861 AM_CONDITIONAL(HAVE_QT, test x$have_qt = xyes)
862
863 dnl Qt flags
864 AC_SUBST(DBUS_QT_CXXFLAGS)
865 AC_SUBST(DBUS_QT_LIBS)
866
867 ### X11 detection
868 AC_PATH_XTRA
869
870 ## for now enable_x11 just tracks have_x11, 
871 ## there's no --enable-x11
872 if test x$no_x = xyes ; then
873    have_x11=no
874    enable_x11=no
875 else
876    have_x11=yes
877    enable_x11=yes
878 fi
879
880 if test x$enable_x11 = xyes ; then
881    AC_DEFINE(DBUS_BUILD_X11,1,[Build X11-dependent code])
882    DBUS_X_LIBS="$X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS"
883    DBUS_X_CFLAGS="$X_CFLAGS"
884 else
885    DBUS_X_LIBS=
886    DBUS_X_CFLAGS=
887 fi
888
889 AC_SUBST(DBUS_X_CFLAGS)
890 AC_SUBST(DBUS_X_LIBS)
891
892 ### Doxygen Documentation
893
894 AC_PATH_PROG(DOXYGEN, doxygen, no)
895
896 AC_MSG_CHECKING([whether to build Doxygen documentation])
897
898 if test x$DOXYGEN = xno ; then
899     have_doxygen=no
900 else
901     have_doxygen=yes
902 fi
903
904 if test x$enable_doxygen_docs = xauto ; then
905     if test x$have_doxygen = xno ; then
906         enable_doxygen_docs=no
907     else
908         enable_doxygen_docs=yes
909     fi
910 fi
911
912 if test x$enable_doxygen_docs = xyes; then
913     if test x$have_doxygen = xno; then
914         AC_MSG_ERROR([Building Doxygen docs explicitly required, but Doxygen not found])
915     fi
916 fi
917
918 AM_CONDITIONAL(DBUS_DOXYGEN_DOCS_ENABLED, test x$enable_doxygen_docs = xyes)
919 AC_MSG_RESULT(yes)
920
921 ### XML Documentation
922
923 AC_PATH_PROG(XMLTO, xmlto, no)
924
925 AC_MSG_CHECKING([whether to build XML documentation])
926
927 if test x$XMLTO = xno ; then
928     have_xmlto=no
929 else
930     have_xmlto=yes
931 fi
932
933 if test x$enable_xml_docs = xauto ; then
934     if test x$have_xmlto = xno ; then
935         enable_xml_docs=no
936     else
937         enable_xml_docs=yes
938     fi
939 fi
940
941 if test x$enable_xml_docs = xyes; then
942     if test x$have_xmlto = xno; then
943         AC_MSG_ERROR([Building XML docs explicitly required, but xmlto not found])
944     fi
945 fi
946
947 AM_CONDITIONAL(DBUS_XML_DOCS_ENABLED, test x$enable_xml_docs = xyes)
948 AC_MSG_RESULT(yes)
949
950 #### Have to go $localstatedir->$prefix/var->/usr/local/var   
951 #### someone please fix this a better way...
952
953 #### find the actual value for $prefix that we'll end up with
954 ##   (I know this is broken and should be done in the Makefile, but
955 ##    that's a major pain and almost nobody actually seems to care)
956 REAL_PREFIX=
957 if test "x$prefix" = "xNONE"; then
958   REAL_PREFIX=$ac_default_prefix
959 else
960   REAL_PREFIX=$prefix
961 fi
962
963 ## temporarily change prefix and exec_prefix
964 old_prefix=$prefix
965 prefix=$REAL_PREFIX
966
967 if test "x$exec_prefix" = xNONE ; then
968    REAL_EXEC_PREFIX=$REAL_PREFIX
969 else
970    REAL_EXEC_PREFIX=$exec_prefix
971 fi
972 old_exec_prefix=$exec_prefix
973 exec_prefix=$REAL_EXEC_PREFIX
974
975 ## eval everything
976 LOCALSTATEDIR_TMP="$localstatedir"
977 EXPANDED_LOCALSTATEDIR=`eval echo $LOCALSTATEDIR_TMP`
978 AC_SUBST(EXPANDED_LOCALSTATEDIR)
979
980 SYSCONFDIR_TMP="$sysconfdir"
981 EXPANDED_SYSCONFDIR=`eval echo $SYSCONFDIR_TMP`
982 AC_SUBST(EXPANDED_SYSCONFDIR)
983
984 BINDIR_TMP="$bindir"
985 EXPANDED_BINDIR=`eval echo $BINDIR_TMP`
986 AC_SUBST(EXPANDED_BINDIR)
987
988 LIBDIR_TMP="$libdir"
989 EXPANDED_LIBDIR=`eval echo $LIBDIR_TMP`
990 AC_SUBST(EXPANDED_LIBDIR)
991
992 DATADIR_TMP="$datadir"
993 EXPANDED_DATADIR=`eval echo $DATADIR_TMP`
994 AC_SUBST(EXPANDED_DATADIR)
995
996 ## put prefix and exec_prefix back
997 prefix=$old_prefix
998 exec_prefix=$old_exec_prefix
999
1000 #### Check our operating system
1001 operating_system=unknown
1002 if test -f /etc/redhat-release || test -f $EXPANDED_SYSCONFDIR/redhat-release ; then
1003    operating_system=redhat
1004 fi
1005
1006 if test -f /etc/slackware-version || test -f $EXPANDED_SYSCONFDIR/slackware-version ; then
1007    operating_system=slackware
1008 fi
1009
1010 #### Sort out init scripts
1011
1012 if test x$with_init_scripts = x; then
1013     if test xredhat = x$operating_system ; then
1014         with_init_scripts=redhat
1015     else
1016         if test xslackware = x$operating_system ; then
1017                 with_init_scripts=slackware
1018             else
1019                 with_init_scripts=none
1020         fi
1021     fi
1022 fi
1023
1024 AM_CONDITIONAL(DBUS_INIT_SCRIPTS_RED_HAT, test x$with_init_scripts = xredhat)
1025
1026 AM_CONDITIONAL(DBUS_INIT_SCRIPTS_SLACKWARE, test x$with_init_scripts = xslackware)
1027
1028 ##### Set up location for system bus socket
1029 if ! test -z "$with_system_socket"; then
1030    DBUS_SYSTEM_SOCKET=$with_system_socket
1031 else
1032    DBUS_SYSTEM_SOCKET=${EXPANDED_LOCALSTATEDIR}/run/dbus/system_bus_socket
1033 fi
1034
1035 AC_SUBST(DBUS_SYSTEM_SOCKET)
1036 AC_DEFINE_UNQUOTED(DBUS_SYSTEM_SOCKET,"$DBUS_SYSTEM_SOCKET",[The name of the socket the system bus listens on by default])
1037
1038 ## system bus only listens on local domain sockets, and never 
1039 ## on an abstract socket (so only root can create the socket)
1040 DBUS_SYSTEM_BUS_DEFAULT_ADDRESS="unix:path=$DBUS_SYSTEM_SOCKET"
1041 AC_SUBST(DBUS_SYSTEM_BUS_DEFAULT_ADDRESS)
1042 AC_DEFINE_UNQUOTED(DBUS_SYSTEM_BUS_DEFAULT_ADDRESS, "$DBUS_SYSTEM_BUS_DEFAULT_ADDRESS",[The default D-BUS address of the system bus])
1043
1044 #### Set up the pid file
1045 if ! test -z "$with_system_pid_file"; then
1046    DBUS_SYSTEM_PID_FILE=$with_system_pid_file
1047 elif test x$operating_system = xredhat ; then
1048    DBUS_SYSTEM_PID_FILE=${EXPANDED_LOCALSTATEDIR}/run/messagebus.pid
1049 else
1050    DBUS_SYSTEM_PID_FILE=${EXPANDED_LOCALSTATEDIR}/run/dbus/pid
1051 fi
1052
1053 AC_SUBST(DBUS_SYSTEM_PID_FILE)
1054
1055 #### Tell tests where to find certain stuff in builddir
1056 ABSOLUTE_TOP_BUILDDIR=`cd ${ac_top_builddir}. && pwd`
1057
1058 AC_DEFUN(TEST_PATH, [
1059 TEST_$1=${ABSOLUTE_TOP_BUILDDIR}/test/$2
1060 AC_DEFINE_UNQUOTED(TEST_$1, "$TEST_$1",
1061                    [Full path to test file test/$2 in builddir])
1062 AC_SUBST(TEST_$1)
1063 ])
1064
1065 TEST_PATH(SERVICE_DIR, data/valid-service-files)
1066 TEST_PATH(SERVICE_BINARY, test-service)
1067 TEST_PATH(GLIB_SERVICE_BINARY, test-service-glib)
1068 TEST_PATH(EXIT_BINARY, test-exit)
1069 TEST_PATH(SEGFAULT_BINARY, test-segfault)
1070 TEST_PATH(SLEEP_FOREVER_BINARY, test-sleep-forever)
1071 AC_SUBST(ABSOLUTE_TOP_BUILDDIR)
1072
1073 #### Find socket directories
1074 if ! test -z "$TMPDIR" ; then
1075    DEFAULT_SOCKET_DIR=$TMPDIR
1076 elif ! test -z "$TEMP" ; then
1077    DEFAULT_SOCKET_DIR=$TEMP
1078 elif ! test -z "$TMP" ; then
1079    DEFAULT_SOCKET_DIR=$TMP
1080 else
1081    DEFAULT_SOCKET_DIR=/tmp
1082 fi
1083
1084 if ! test -z "$with_test_socket_dir" ; then
1085    TEST_SOCKET_DIR="$with_test_socket_dir"
1086 else
1087    TEST_SOCKET_DIR=$DEFAULT_SOCKET_DIR
1088 fi
1089 AC_SUBST(TEST_SOCKET_DIR)
1090 AC_DEFINE_UNQUOTED(DBUS_TEST_SOCKET_DIR, "$TEST_SOCKET_DIR", [Where to put test sockets])
1091
1092 if ! test -z "$with_session_socket_dir" ; then
1093    DBUS_SESSION_SOCKET_DIR="$with_session_socket_dir"
1094 else
1095    DBUS_SESSION_SOCKET_DIR=$DEFAULT_SOCKET_DIR
1096 fi
1097 AC_DEFINE_UNQUOTED(DBUS_SESSION_SOCKET_DIR, "$DBUS_SESSION_SOCKET_DIR", [Where per-session bus puts its sockets])
1098 AC_SUBST(DBUS_SESSION_SOCKET_DIR)
1099
1100 # Detect if we can build Python bindings (need python, python headers, and pyrex)
1101 if test x$enable_python = xno; then
1102     have_python=no
1103 else
1104     AC_MSG_NOTICE([Checking to see if we can build Python bindings])
1105     have_python=no
1106     AM_PATH_PYTHON(2.2)
1107
1108     if test -z "$PYTHON" ; then
1109         AC_MSG_WARN([Python not found])
1110     else
1111         AC_CHECK_PROGS(PYREX, pyrexc)
1112
1113         if test -z "$PYREX" ; then
1114             have_pyrex=no
1115         else
1116             have_pyrex=yes
1117         fi
1118
1119         AM_CHECK_PYTHON_HEADERS(have_python_headers=yes,have_python_headers=no)
1120
1121         if test x$have_pyrex = xyes -a x$have_python_headers = xyes ; then
1122             have_python=yes
1123         fi
1124     fi
1125
1126     if test x$have_python = xno ; then
1127         if test x$enable_python = xyes ; then
1128             AC_MSG_ERROR([Building python explicitly requested, but can't build python bindings])
1129         else
1130             AC_MSG_WARN([Couldn't find either Pyrex or the Python headers, not building Python bindings])
1131         fi
1132     fi               
1133 fi
1134
1135 AM_CONDITIONAL(HAVE_PYTHON, test x$have_python = xyes)
1136
1137 AC_OUTPUT([
1138 Doxyfile
1139 dbus/dbus-arch-deps.h
1140 bus/system.conf
1141 bus/session.conf
1142 bus/messagebus
1143 bus/rc.messagebus
1144 bus/dbus-daemon.1
1145 Makefile
1146 dbus/Makefile
1147 glib/Makefile
1148 python/Makefile
1149 python/examples/Makefile
1150 qt/Makefile
1151 gcj/Makefile
1152 gcj/org/Makefile
1153 gcj/org/freedesktop/Makefile
1154 gcj/org/freedesktop/dbus/Makefile
1155 mono/Makefile
1156 mono/AssemblyInfo.cs
1157 mono/dbus-sharp.dll.config
1158 mono/example/Makefile
1159 mono/doc/Makefile
1160 bus/Makefile
1161 tools/Makefile
1162 test/Makefile
1163 test/glib/Makefile
1164 doc/Makefile
1165 dbus-1.pc
1166 dbus-glib-1.pc
1167 dbus-sharp.pc
1168 test/data/valid-config-files/debug-allow-all.conf
1169 test/data/valid-config-files/debug-allow-all-sha1.conf
1170 test/data/valid-service-files/debug-echo.service
1171 test/data/valid-service-files/debug-segfault.service
1172 ])
1173
1174 ### FIXME it's bizarre that have_qt and have_glib are used
1175 ### instead of enable_ - should fix things so that enable 
1176 ### is always whether it's enabled, and have is always whether 
1177 ### it was found.
1178
1179 dnl ==========================================================================
1180 echo "
1181                     D-BUS $VERSION
1182                   ==============
1183
1184         prefix:                   ${prefix}
1185         exec_prefix:              ${exec_prefix}
1186         libdir:                   ${EXPANDED_LIBDIR}
1187         bindir:                   ${EXPANDED_BINDIR}
1188         sysconfdir:               ${EXPANDED_SYSCONFDIR}
1189         localstatedir:            ${EXPANDED_LOCALSTATEDIR}
1190         datadir:              ${EXPANDED_DATADIR}
1191         source code location:     ${srcdir}
1192         compiler:                 ${CC}
1193         cflags:                   ${CFLAGS}
1194         cppflags:                 ${CPPFLAGS}
1195         cxxflags:                 ${CXXFLAGS}
1196         64-bit int:               ${DBUS_INT64_TYPE}
1197         Doxygen:                  ${DOXYGEN}
1198         xmlto:                    ${XMLTO}"
1199
1200 if test x$enable_gcj = xyes ; then
1201 echo \
1202 "        gcj:                     ${GCJ}
1203         gcjflags:                 ${GCJFLAGS}"
1204 else
1205 echo \
1206 "        gcj:                      (not enabled)"
1207 fi
1208
1209 if test x$enable_mono = xyes ; then
1210 echo \
1211 "        csc:                     ${CSC}
1212 "
1213 else
1214 echo \
1215 "        csc:                      (not enabled)
1216 "
1217 fi
1218
1219 echo "
1220         Maintainer mode:          ${USE_MAINTAINER_MODE}
1221         gcc coverage profiling:   ${enable_gcov}
1222         Building unit tests:      ${enable_tests}
1223         Building verbose mode:    ${enable_verbose_mode}
1224         Building assertions:      ${enable_asserts}
1225         Building checks:          ${enable_checks}
1226         Building Qt bindings:     ${have_qt}
1227         Building GLib bindings:   ${have_glib}
1228         Building Python bindings: ${have_python}
1229         Building SELinux support: ${have_selinux}
1230         Building Mono bindings:   ${enable_mono}
1231         Building Mono docs:       ${enable_mono_docs}
1232         Building GTK+ tools:      ${have_gtk}
1233         Building X11 code:        ${enable_x11}
1234         Building Doxygen docs:    ${enable_doxygen_docs}
1235         Building XML docs:        ${enable_xml_docs}
1236         Using XML parser:         ${with_xml}
1237         Init scripts style:       ${with_init_scripts}
1238         Abstract socket names:    ${have_abstract_sockets}
1239         System bus socket:        ${DBUS_SYSTEM_SOCKET}
1240         System bus address:       ${DBUS_SYSTEM_BUS_DEFAULT_ADDRESS}
1241         System bus PID file:      ${DBUS_SYSTEM_PID_FILE}
1242         Session bus socket dir:   ${DBUS_SESSION_SOCKET_DIR}
1243         'make check' socket dir:  ${TEST_SOCKET_DIR}
1244 "
1245
1246 if test x$enable_tests = xyes; then
1247         echo "NOTE: building with unit tests increases the size of the installed library and renders it insecure."
1248 fi
1249 if test x$enable_tests = xyes -a x$enable_asserts = xno; then
1250         echo "NOTE: building with unit tests but without assertions means tests may not properly report failures (this configuration is only useful when doing something like profiling the tests)"
1251 fi
1252 if test x$enable_gcov = xyes; then
1253         echo "NOTE: building with coverage profiling is definitely for developers only."
1254 fi
1255 if test x$enable_verbose_mode = xyes; then
1256         echo "NOTE: building with verbose mode increases library size, may slightly increase security risk, and decreases performance."
1257 fi
1258 if test x$enable_asserts = xyes; then
1259         echo "NOTE: building with assertions increases library size and decreases performance."
1260 fi
1261 if test x$enable_checks = xno; then
1262         echo "NOTE: building without checks for arguments passed to public API makes it harder to debug apps using D-BUS, but will slightly decrease D-BUS library size and _very_ slightly improve performance."
1263 fi