Build fixes.
authorPatrick Welche <prlw1@cam.ac.uk>
Sat, 14 May 2011 16:57:42 +0000 (17:57 +0100)
committerPatrick Welche <prlw1@cam.ac.uk>
Sat, 14 May 2011 16:57:42 +0000 (17:57 +0100)
- 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
atspi/atspi-application.h
configure.ac
dbind/Makefile.am
registryd/Makefile.am

index c02981a..8a26430 100644 (file)
@@ -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) \
index 1e0dd79..bb15978 100644 (file)
@@ -25,7 +25,7 @@
 #ifndef _ATSPI_APPLICATION_H_
 #define _ATSPI_APPLICATION_H_
 
-#include "glib-object.h"
+#include <dbus/dbus.h>
 
 #include "atspi-accessible.h"
 
index 9e920c6..b3374be 100644 (file)
@@ -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
index 0ca43c0..debea20 100644 (file)
@@ -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 \
index 688e045..a327658 100644 (file)
@@ -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 \