From 377ef7c311a5a3b1718bf4474612c5a47db11fd0 Mon Sep 17 00:00:00 2001 From: Patrick Welche Date: Sat, 14 May 2011 17:57:42 +0100 Subject: [PATCH] Build fixes. - atspi-application.h makes use of DBusConnection* . - -Werror-implicit-function-declaration doesn't contain an equal sign in my copy of gcc, and is gcc specific. - The default behaviour of AC_CHECK_LIB glib-2.0 is to add -lglib-2.0 to LIBS which can then cause the search for a dlopen function to fail because the flags to find libglib aren't included. Solution is to tell AC_CHECK_LIB to do nothing(!) --- atspi/Makefile.am | 3 +-- atspi/atspi-application.h | 2 +- configure.ac | 5 ++++- dbind/Makefile.am | 3 +-- registryd/Makefile.am | 3 +-- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/atspi/Makefile.am b/atspi/Makefile.am index c02981a..8a26430 100644 --- a/atspi/Makefile.am +++ b/atspi/Makefile.am @@ -6,8 +6,7 @@ libatspi_la_CFLAGS = $(DBUS_CFLAGS) \ $(DBIND_CFLAGS) \ $(GLIB_CFLAGS) \ -I$(top_srcdir)/registryd \ - -I$(top_srcdir) \ - -Werror=implicit-function-declaration + -I$(top_srcdir) libatspi_la_LIBADD = $(DBUS_LIBS) \ $(GOBJ_LIBS) \ diff --git a/atspi/atspi-application.h b/atspi/atspi-application.h index 1e0dd79..bb15978 100644 --- a/atspi/atspi-application.h +++ b/atspi/atspi-application.h @@ -25,7 +25,7 @@ #ifndef _ATSPI_APPLICATION_H_ #define _ATSPI_APPLICATION_H_ -#include "glib-object.h" +#include #include "atspi-accessible.h" diff --git a/configure.ac b/configure.ac index 9e920c6..b3374be 100644 --- a/configure.ac +++ b/configure.ac @@ -42,7 +42,7 @@ AC_SUBST(DBUS_CFLAGS) PKG_CHECK_MODULES(GLIB, [glib-2.0 >= 2.26.0]) AC_SUBST(GLIB_LIBS) AC_SUBST(GLIB_CFLAGS) -AC_CHECK_LIB([glib-2.0], [g_ptr_array_new_with_free_func], [], +AC_CHECK_LIB([glib-2.0], [g_ptr_array_new_with_free_func], [:], [AC_MSG_ERROR([The version of glib-2.0 found does not define ] [g_ptr_array_new_with_free_func. Please upgrade glib.])], [$GLIB_LIBS]) @@ -189,6 +189,9 @@ DBIND_CHECK_ALIGNOF(dbind_struct) GTK_DOC_CHECK([1.09]) +if test "x$GCC" = xyes; then + CFLAGS="$CFLAGS -Werror-implicit-function-declaration" +fi CPPFLAGS=$orig_CPPFLAGS AC_CONFIG_FILES([Makefile po/Makefile.in xml/Makefile diff --git a/dbind/Makefile.am b/dbind/Makefile.am index 0ca43c0..debea20 100644 --- a/dbind/Makefile.am +++ b/dbind/Makefile.am @@ -5,8 +5,7 @@ AM_CPPFLAGS = \ -I$(top_srcdir) \ $(WARN_CFLAGS) \ $(DBUS_CFLAGS) \ - $(GLIB_CFLAGS) \ - -Werror=implicit-function-declaration + $(GLIB_CFLAGS) libdbind_la_SOURCES = \ dbind-config.h \ diff --git a/registryd/Makefile.am b/registryd/Makefile.am index 688e045..a327658 100644 --- a/registryd/Makefile.am +++ b/registryd/Makefile.am @@ -7,8 +7,7 @@ at_spi2_registryd_CFLAGS = \ $(GOBJ_CFLAGS) \ $(ATK_CFLAGS) \ -I$(top_srcdir) \ - -DATSPI_INTROSPECTION_PATH=\"$(pkgdatadir)/$(DEFAULT_ATSPI_INTROSPECTION_PATH)\" \ - -Werror=implicit-function-declaration + -DATSPI_INTROSPECTION_PATH=\"$(pkgdatadir)/$(DEFAULT_ATSPI_INTROSPECTION_PATH)\" at_spi2_registryd_LDADD = \ ../atspi/libatspi.la \ -- 2.7.4