6 AM_INIT_AUTOMAKE(dbus, 0.1)
8 AM_CONFIG_HEADER(config.h)
11 ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
13 GETTEXT_PACKAGE=dbus-1
14 AC_SUBST(GETTEXT_PACKAGE)
15 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",[The name of the gettext domain])
24 AC_ARG_ENABLE(qt, [ --enable-qt enable Qt-friendly client library],enable_qt=$enableval,enable_qt=no)
25 AC_ARG_ENABLE(glib, [ --enable-glib enable GLib-friendly client library],enable_glib=$enableval,enable_glib=auto)
26 AC_ARG_ENABLE(tests, [ --enable-tests enable unit test code],enable_tests=yes,enable_tests=no)
27 AC_ARG_ENABLE(ansi, [ --enable-ansi enable -ansi -pedantic gcc flags],enable_ansi=yes,enable_ansi=no)
29 dnl DBUS_BUILD_TESTS controls unit tests built in to .c files
30 dnl and also some stuff in the test/ subdir
31 AM_CONDITIONAL(DBUS_BUILD_TESTS, test x$enable_tests = xyes)
32 if test x$enable_tests = xyes; then
33 AC_DEFINE(DBUS_BUILD_TESTS,1,[Build test code])
37 if test "x$GCC" = "xyes"; then
39 *[\ \ ]-Wall[\ \ ]*) ;;
40 *) CFLAGS="$CFLAGS -Wall" ;;
44 *[\ \ ]-Wchar-subscripts[\ \ ]*) ;;
45 *) CFLAGS="$CFLAGS -Wchar-subscripts" ;;
49 *[\ \ ]-Wmissing-declarations[\ \ ]*) ;;
50 *) CFLAGS="$CFLAGS -Wmissing-declarations" ;;
54 *[\ \ ]-Wmissing-prototypes[\ \ ]*) ;;
55 *) CFLAGS="$CFLAGS -Wmissing-prototypes" ;;
59 *[\ \ ]-Wnested-externs[\ \ ]*) ;;
60 *) CFLAGS="$CFLAGS -Wnested-externs" ;;
64 *[\ \ ]-Wpointer-arith[\ \ ]*) ;;
65 *) CFLAGS="$CFLAGS -Wpointer-arith" ;;
69 *[\ \ ]-Wcast-align[\ \ ]*) ;;
70 *) CFLAGS="$CFLAGS -Wcast-align" ;;
74 *[\ \ ]-Wsign-compare[\ \ ]*) ;;
75 *) CFLAGS="$CFLAGS -Wsign-compare" ;;
78 if test "x$enable_ansi" = "xyes"; then
80 *[\ \ ]-ansi[\ \ ]*) ;;
81 *) CFLAGS="$CFLAGS -ansi" ;;
85 *[\ \ ]-pedantic[\ \ ]*) ;;
86 *) CFLAGS="$CFLAGS -pedantic" ;;
93 AC_CHECK_SIZEOF(short)
96 AC_CHECK_SIZEOF(void *)
97 AC_CHECK_SIZEOF(long long)
98 AC_CHECK_SIZEOF(__int64)
103 AC_CHECK_FUNCS(vsnprintf vasprintf)
105 dnl check for writev header and writev function so we're
106 dnl good to go if HAVE_WRITEV gets defined.
107 AC_CHECK_HEADERS(sys/uio.h, [AC_CHECK_FUNCS(writev)])
111 AC_SUBST(DBUS_CLIENT_CFLAGS)
112 AC_SUBST(DBUS_CLIENT_LIBS)
116 AC_SUBST(DBUS_BUS_CFLAGS)
117 AC_SUBST(DBUS_BUS_LIBS)
121 AC_SUBST(DBUS_TEST_CFLAGS)
122 AC_SUBST(DBUS_TEST_LIBS)
125 PKG_CHECK_MODULES(DBUS_GLIB, glib-2.0, have_glib=yes, have_glib=no)
127 if test x$have_glib = xno ; then
128 AC_MSG_WARN([GLib development libraries not found])
131 if test x$enable_glib = xyes; then
132 if test x$have_glib = xno; then
133 AC_MSG_ERROR([GLib explicitly required, and GLib development libraries not found])
137 if test x$enable_glib = xno; then
141 AM_CONDITIONAL(HAVE_GLIB, test x$have_glib = xyes)
144 AC_SUBST(DBUS_GLIB_CFLAGS)
145 AC_SUBST(DBUS_GLIB_LIBS)
159 dnl ==========================================================================
165 source code location: ${srcdir}
168 Building unit tests: ${enable_tests}
169 Building Qt bindings: ${enable_qt}
170 Building GLib bindings: ${have_glib}
173 if test x$enable_tests = xyes; then
174 echo "NOTE: building with unit tests increases the size of the installed library"
176 if test x$enable_qt = xyes; then
177 echo "NOTE: Qt bindings don't actually exist yet"