]> git.meshlink.io Git - catta/commitdiff
split of libavahi-gobject, since people already starting complaining about the additi...
authorLennart Poettering <lennart@poettering.net>
Sun, 28 Oct 2007 00:00:36 +0000 (00:00 +0000)
committerLennart Poettering <lennart@poettering.net>
Sun, 28 Oct 2007 00:00:36 +0000 (00:00 +0000)
git-svn-id: file:///home/lennart/svn/public/avahi/trunk@1563 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe

Makefile.am
avahi-glib/Makefile.am
avahi-gobject.pc.in [new file with mode: 0644]
configure.ac

index 77040918c738426801829037b58b7a5d16c06ebb..b1e47d0afca0eed9d5b40af3df024125f0c18e85 100644 (file)
@@ -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
index c4e2a09260be664b970ff313dc096a95afbc2547..7931bd9e3d122dc93b5b98a04413ff956b7771cd 100644 (file)
@@ -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 (file)
index 0000000..17f1bd6
--- /dev/null
@@ -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}
index 97c64a5e93a370d99fc64401211c0beed81c5bda..7aca721ce77a1e8b2080d31be06a65c74cffb7fa 100644 (file)
@@ -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,12 +419,31 @@ 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
 #
@@ -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}