summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile.am13
-rw-r--r--avahi-glib/Makefile.am77
-rw-r--r--avahi-gobject.pc.in11
-rw-r--r--configure.ac24
4 files changed, 91 insertions, 34 deletions
diff --git a/Makefile.am b/Makefile.am
index 7704091..b1e47d0 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -42,6 +42,7 @@ EXTRA_DIST = \
avahi-core.pc.in \
avahi-client.pc.in \
avahi-glib.pc.in \
+ avahi-gobject.pc.in \
avahi-qt3.pc.in \
avahi-qt4.pc.in \
avahi-sharp.pc.in \
@@ -212,6 +213,18 @@ avahi-glib.pc: avahi-glib.pc.in
CLEANFILES += avahi-glib.pc
+if HAVE_GOBJECT
+
+pkgconfig_DATA += avahi-gobject.pc
+
+avahi-gobject.pc: avahi-gobject.pc.in
+ sed -e 's,@prefix\@,$(prefix),g' \
+ -e 's,@libdir\@,$(libdir),g' \
+ -e 's,@PACKAGE_VERSION\@,$(PACKAGE_VERSION),g' $< > $@
+
+CLEANFILES += avahi-gobject.pc
+
+endif
endif
if HAVE_GTK
diff --git a/avahi-glib/Makefile.am b/avahi-glib/Makefile.am
index c4e2a09..7931bd9 100644
--- a/avahi-glib/Makefile.am
+++ b/avahi-glib/Makefile.am
@@ -28,36 +28,54 @@ avahiincludedir=$(includedir)/avahi-glib
avahiinclude_HEADERS = \
glib-watch.h \
- glib-malloc.h \
- ga-client.h \
- ga-entry-group.h \
- ga-enums.h \
- ga-errors.h \
- ga-record-browser.h \
- ga-service-browser.h \
- ga-service-resolver.h
+ glib-malloc.h
lib_LTLIBRARIES = \
libavahi-glib.la
if ENABLE_TESTS
-
noinst_PROGRAMS = \
glib-watch-test
-
endif
-BUILT_SOURCES = \
- signals-marshal.list \
- signals-marshal.h \
- signals-marshal.c \
- ga-client-enumtypes.h \
- ga-client-enumtypes.c \
- ga-entry-group-enumtypes.h \
- ga-entry-group-enumtypes.c \
- ga-enums-enumtypes.h \
- ga-enums-enumtypes.c
+libavahi_glib_la_SOURCES = \
+ glib-watch.c glib-watch.h \
+ glib-malloc.h glib-malloc.c
+libavahi_glib_la_CFLAGS = $(AM_CFLAGS) $(GLIB20_CFLAGS)
+libavahi_glib_la_LIBADD = $(AM_LDADD) ../avahi-common/libavahi-common.la $(GLIB20_LIBS)
+libavahi_glib_la_LDFLAGS = $(AM_LDFLAGS) -export-dynamic -version-info $(LIBAVAHI_GLIB_VERSION_INFO)
+
+glib_watch_test_SOURCES = \
+ glib-watch.c glib-watch.h \
+ glib-watch-test.c
+glib_watch_test_CFLAGS = $(AM_CFLAGS) $(GLIB20_CFLAGS)
+glib_watch_test_LDADD = $(AM_LDADD) ../avahi-common/libavahi-common.la $(GLIB20_LIBS)
+
+if HAVE_GOBJECT
+
+avahiinclude_HEADERS += \
+ ga-client.h \
+ ga-entry-group.h \
+ ga-enums.h \
+ ga-errors.h \
+ ga-record-browser.h \
+ ga-service-browser.h \
+ ga-service-resolver.h
+
+lib_LTLIBRARIES += \
+ libavahi-gobject.la
+
+BUILT_SOURCES = \
+ signals-marshal.list \
+ signals-marshal.h \
+ signals-marshal.c \
+ ga-client-enumtypes.h \
+ ga-client-enumtypes.c \
+ ga-entry-group-enumtypes.h \
+ ga-entry-group-enumtypes.c \
+ ga-enums-enumtypes.h \
+ ga-enums-enumtypes.c
CORE_SOURCES = \
ga-client.c ga-client.h \
@@ -68,22 +86,13 @@ CORE_SOURCES = \
ga-service-browser.c ga-service-browser.h \
ga-service-resolver.c ga-service-resolver.h
-libavahi_glib_la_SOURCES = \
- glib-watch.c glib-watch.h \
- glib-malloc.h glib-malloc.c \
+libavahi_gobject_la_SOURCES = \
$(CORE_SOURCES) \
$(BUILT_SOURCES)
-libavahi_glib_la_CFLAGS = $(AM_CFLAGS) $(GLIB20_CFLAGS)
-libavahi_glib_la_LIBADD = $(AM_LDADD) ../avahi-common/libavahi-common.la ../avahi-client/libavahi-client.la $(GLIB20_LIBS)
-libavahi_glib_la_LDFLAGS = $(AM_LDFLAGS) -export-dynamic -version-info $(LIBAVAHI_GLIB_VERSION_INFO)
-
-glib_watch_test_SOURCES = \
- glib-watch.c glib-watch.h \
- glib-watch-test.c
-glib_watch_test_CFLAGS = $(AM_CFLAGS) $(GLIB20_CFLAGS)
-glib_watch_test_LDADD = $(AM_LDADD) ../avahi-common/libavahi-common.la $(GLIB20_LIBS)
-
+libavahi_gobject_la_CFLAGS = $(AM_CFLAGS) $(GOBJECT_CFLAGS)
+libavahi_gobject_la_LIBADD = $(AM_LDADD) ../avahi-common/libavahi-common.la ../avahi-client/libavahi-client.la libavahi-glib.la $(GOJECT_LIBS)
+libavahi_gobject_la_LDFLAGS = $(AM_LDFLAGS) -export-dynamic -version-info $(LIBAVAHI_GOBJECT_VERSION_INFO)
# correctly clean the generated source files
CLEANFILES = $(BUILT_SOURCES)
@@ -129,5 +138,7 @@ signals-marshal.c: signals-marshal.list
endif
+endif
+
indent:
indent -brf -nbbo -nbc -ip0 -cs -nbfde -npsl -br -brs -bap -i4 -bs -cdw -ce -npcs -hnl -cli4 -nut -ci8 ga-*.[ch]
diff --git a/avahi-gobject.pc.in b/avahi-gobject.pc.in
new file mode 100644
index 0000000..17f1bd6
--- /dev/null
+++ b/avahi-gobject.pc.in
@@ -0,0 +1,11 @@
+prefix=@prefix@
+exec_prefix=${prefix}
+libdir=@libdir@
+includedir=${prefix}/include
+
+Name: avahi-gobject
+Description: Avahi Multicast DNS Responder (GLib GObject Support)
+Version: @PACKAGE_VERSION@
+Requires: glib-2.0 gobject-2.0 avahi-glib
+Libs: -L${libdir} -lavahi-gobject
+Cflags: -D_REENTRANT -I${includedir}
diff --git a/configure.ac b/configure.ac
index 97c64a5..7aca721 100644
--- a/configure.ac
+++ b/configure.ac
@@ -32,6 +32,7 @@ AC_SUBST(LIBAVAHI_COMMON_VERSION_INFO, [7:5:4])
AC_SUBST(LIBAVAHI_CORE_VERSION_INFO, [5:3:0])
AC_SUBST(LIBAVAHI_CLIENT_VERSION_INFO, [5:3:2])
AC_SUBST(LIBAVAHI_GLIB_VERSION_INFO, [1:1:0])
+AC_SUBST(LIBAVAHI_GOBJECT_VERSION_INFO, [0:0:0])
AC_SUBST(LIBAVAHI_QT3_VERSION_INFO, [1:1:0])
AC_SUBST(LIBAVAHI_QT4_VERSION_INFO, [1:1:0])
AC_SUBST(LIBAVAHI_UI_VERSION_INFO, [0:2:0])
@@ -418,13 +419,32 @@ AC_ARG_ENABLE(glib,
[HAVE_GLIB=yes])
if test "x$HAVE_GLIB" = "xyes" ; then
- PKG_CHECK_MODULES(GLIB20, [ glib-2.0 >= 2.4.0 gobject-2.0 ])
+ PKG_CHECK_MODULES(GLIB20, [ glib-2.0 >= 2.4.0 ])
AC_SUBST(GLIB20_CFLAGS)
AC_SUBST(GLIB20_LIBS)
fi
AM_CONDITIONAL(HAVE_GLIB, test "x$HAVE_GLIB" = "xyes")
#
+# Check for GLIB's gobject 2.0
+#
+AC_ARG_ENABLE(gobject,
+ AS_HELP_STRING([--disable-gobject],[Disable use of GLib GObject]),
+ [case "${enableval}" in
+ yes) HAVE_GOBJECT=yes ;;
+ no) HAVE_GOBJECT=no ;;
+ *) AC_MSG_ERROR(bad value ${enableval} for --enable-gobject) ;;
+ esac],
+ [HAVE_GOBJECT=yes])
+
+if test "x$HAVE_GOBJECT" = "xyes" ; then
+ PKG_CHECK_MODULES(GOBJECT, [ glib-2.0 >= 2.4.0 gobject-2.0 ])
+ AC_SUBST(GOBJECT_CFLAGS)
+ AC_SUBST(GOBJECT_LIBS)
+fi
+AM_CONDITIONAL(HAVE_GOBJECT, test "x$HAVE_GOBJECT" = "xyes")
+
+#
# Check for Qt 3
#
AC_ARG_ENABLE(qt3,
@@ -1029,6 +1049,7 @@ echo "
C Compiler: ${CC}
CFLAGS: ${CFLAGS}
Enable GLIB: ${HAVE_GLIB}
+ Enable GLIB GObject: ${HAVE_GOBJECT}
Enable GTK: ${HAVE_GTK}
Enable D-Bus: ${HAVE_DBUS}
Enable Expat: ${HAVE_EXPAT}
@@ -1094,6 +1115,7 @@ echo "\
Building avahi-utils: ${BUILD_CLIENT}
Building avahi-python: ${BUILD_PYTHON}
Building libavahi-glib: ${HAVE_GLIB}
+ Building libavahi-gobject: ${HAVE_GOBJECT}
Building avahi-discover-standalone: ${HAVE_GTK}
Building libavahi-qt3: ${HAVE_QT3}
Building libavahi-qt4: ${HAVE_QT4}