man \
tests \
service-type-database \
- avahi-compat-libdns_sd
+ avahi-compat-libdns_sd \
+ avahi-compat-howl
DX_INPUT = \
--- /dev/null
+# $Id$
+
+# This file is part of avahi.
+#
+# avahi is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as
+# published by the Free Software Foundation; either version 2 of the
+# License, or (at your option) any later version.
+#
+# avahi is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
+# License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with avahi; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+# USA.
+
+AM_CFLAGS=-I$(top_srcdir)
+
+# This cool debug trap works on i386/gcc only
+AM_CFLAGS+='-DDEBUG_TRAP=__asm__("int $$3")'
+
+if HAVE_DBUS
+
+avahi_compat_howldir=$(includedir)/avahi-compat-howl
+
+avahi_compat_howl_HEADERS = \
+ include/howl.h \
+ include/rendezvous/rendezvous.h \
+ include/rendezvous/text_record.h \
+ include/corby/message.h \
+ include/corby/object.h \
+ include/corby/orb.h \
+ include/corby/corby.h \
+ include/corby/channel.h \
+ include/corby/buffer.h \
+ include/discovery/discovery.h \
+ include/discovery/text_record.h \
+ include/salt/socket.h \
+ include/salt/address.h \
+ include/salt/platform.h \
+ include/salt/signal.h \
+ include/salt/interface.h \
+ include/salt/salt.h \
+ include/salt/time.h \
+ include/salt/debug.h
+
+lib_LTLIBRARIES = libavahi-compat-howl.la
+
+#noinst_PROGRAMS = txt-test
+
+libavahi_compat_howl_la_SOURCES = \
+ $(avahi_compat_howl_HEADERS) \
+ warn.c warn.h
+libavahi_compat_howl_la_CFLAGS = $(AM_CFLAGS) $(PTHREAD_CFLAGS)
+libavahi_compat_howl_la_LDFLAGS = $(AM_LDFLAGS) -export-dynamic -version-info $(LIBAVAHI_COMPAT_HOWL_VERSION_INFO) $(PTHREAD_LIBS) ../avahi-common/libavahi-common.la ../avahi-client/libavahi-client.la
+
+#txt_test_SOURCES = \
+# dns_sd.h \
+# txt.c \
+# txt-test.c \
+# warn.c warn.h
+#txt_test_CFLAGS = $(AM_CFLAGS) $(PTHREAD_CFLAGS)
+#txt_test_LDADD = $(AM_LDADD) ../avahi-common/libavahi-common.la
+
+# You can test the compatibility layer by sticking in mDNSResponder's
+# dns-sd.c source here, naming it "libdns_sd-test.c" and running "make
+# libdns_sd-test" manually. We do not distribute that file due to
+# licensing restrictions.
+
+#libdns_sd-test: libdns_sd-test.c libavahi-compat-libdns_sd.la
+# $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) $(PTHREAD_CFLAGS) -o libdns_sd-test.o -c libdns_sd-test.c
+# $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(PTHREAD_CFLAGS) -o libdns_sd-test libdns_sd-test.o $(PTHREAD_LIBS) ../avahi-common/libavahi-common.la libavahi-compat-libdns_sd.la
+
+#CLEANFILES = libdns_sd-test.o libdns_sd-test
+
+endif
--- /dev/null
+/* $Id$ */
+
+/***
+ This file is part of avahi.
+
+ avahi is free software; you can redistribute it and/or modify it
+ under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation; either version 2.1 of the
+ License, or (at your option) any later version.
+
+ avahi is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General
+ Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with avahi; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ USA.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "warn.h"
+
+#define COMPAT_LAYER "HOWL"
+
+#include "../avahi-compat-libdns_sd/warn.c"
--- /dev/null
+#ifndef foowarnhhowlfoo
+#define foowarnhhowlfoo
+
+/* $Id$ */
+
+/***
+ This file is part of avahi.
+
+ avahi is free software; you can redistribute it and/or modify it
+ under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation; either version 2.1 of the
+ License, or (at your option) any later version.
+
+ avahi is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General
+ Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with avahi; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ USA.
+***/
+
+#define avahi_warn_unsupported avahi_warn_unsupported_HOWL
+#define avahi_warn_linkage avahi_warn_linkage_HOWL
+
+#include "../avahi-compat-libdns_sd/warn.h"
+
+#endif
#include <string.h>
#include <stdlib.h>
#include <assert.h>
+#include <stdarg.h>
+#include <syslog.h>
#include "warn.h"
+#ifndef COMPAT_LAYER
+#define COMPAT_LAYER "Apple Bonjour"
+#endif
+
static pthread_mutex_t linkage_mutex = PTHREAD_MUTEX_INITIALIZER;
static int linkage_warning = 0;
}
}
+static void warning(const char *ident, const char *fmt, ...) {
+ va_list ap, ap2;
+
+ assert(ident);
+ assert(fmt);
+
+ va_start(ap, fmt);
+ va_copy(ap2, ap);
+
+ vfprintf(stderr, fmt, ap);
+ va_end(ap);
+
+ openlog(ident, LOG_PID, LOG_USER);
+ vsyslog(LOG_WARNING, fmt, ap2);
+ closelog();
+ va_end(ap2);
+}
+
void avahi_warn_linkage(void) {
int w;
linkage_warning = 1;
pthread_mutex_unlock(&linkage_mutex);
- if (!w && !getenv("AVAHI_BONJOUR_NOWARN")) {
+ if (!w && !getenv("AVAHI_COMPAT_NOWARN")) {
char exename[256];
+
get_exe_name(exename, sizeof(exename));
-
- fprintf(stderr, "*** WARNING: The application '%s' uses the Bonjour compatiblity layer of Avahi. Please fix it to use the native API! ***\n", exename);
+
+ warning(exename, "*** WARNING: The application '%s' uses the "COMPAT_LAYER" compatiblity layer of Avahi. Please fix it to use the native API! ***\n", exename);
}
}
char exename[256];
get_exe_name(exename, sizeof(exename));
- fprintf(stderr, "*** WARNING: The application '%s' called '%s()' which is not supported (or only supported partially) in the Bonjour compatiblity layer of Avahi. Please fix it to use the native API! ***\n", exename, function);
+ warning(exename, "*** WARNING: The application '%s' called '%s()' which is not supported (or only supported partially) in the "COMPAT_LAYER" compatiblity layer of Avahi. Please fix it to use the native API! ***\n", exename, function);
}
AC_SUBST(LIBAVAHI_QT3_VERSION_INFO, [0:0:0])
AC_SUBST(LIBAVAHI_QT4_VERSION_INFO, [0:0:0])
AC_SUBST(LIBAVAHI_COMPAT_LIBDNS_SD_VERSION_INFO, [1:0:0])
+AC_SUBST(LIBAVAHI_COMPAT_HOWL_VERSION_INFO, [0:0:0])
if type -p stow > /dev/null && test -d /usr/local/stow ; then
AC_MSG_NOTICE([*** Found /usr/local/stow: default install prefix set to /usr/local/stow/${PACKAGE_NAME}-${PACKAGE_VERSION} ***])
service-type-database/Makefile
avahi-sharp/Makefile
avahi-compat-libdns_sd/Makefile
+avahi-compat-howl/Makefile
])
AC_OUTPUT
Building libavahi-qt4: ${HAVE_QT4}
Building avahi-sharp: ${HAVE_MONO}
Building avahi-compat-libdns_sd: ${BUILD_CLIENT}
+ Building avahi-compat-howl: ${BUILD_CLIENT}
"