endif
pkgconfigdir = $(libdir)/pkgconfig
-pkgconfig_DATA = avahi-core.pc
-avahi-core.pc: avahi-core.pc.in
- sed -e 's,@prefix\@,$(prefix),g' \
+%.pc: %.pc.in
+ $(AM_V_GEN)sed -e 's,@prefix\@,$(prefix),g' \
-e 's,@libdir\@,$(libdir),g' \
-e 's,@PACKAGE_VERSION\@,$(PACKAGE_VERSION),g' $< > $@
+pkgconfig_DATA = avahi-core.pc
CLEANFILES = avahi-core.pc
if HAVE_DBUS
-
pkgconfig_DATA += avahi-client.pc
-
-avahi-client.pc: avahi-client.pc.in
- sed -e 's,@prefix\@,$(prefix),g' \
- -e 's,@libdir\@,$(libdir),g' \
- -e 's,@PACKAGE_VERSION\@,$(PACKAGE_VERSION),g' $< > $@
-
CLEANFILES += avahi-client.pc
if ENABLE_COMPAT_HOWL
-
pkgconfig_DATA += avahi-compat-howl.pc
-
-avahi-compat-howl.pc: avahi-compat-howl.pc.in
- sed -e 's,@prefix\@,$(prefix),g' \
- -e 's,@libdir\@,$(libdir),g' \
- -e 's,@HOWL_COMPAT_VERSION\@,$(HOWL_COMPAT_VERSION),g' $< > $@
-
CLEANFILES += avahi-compat-howl.pc
-
endif
if ENABLE_COMPAT_LIBDNS_SD
-
pkgconfig_DATA += avahi-compat-libdns_sd.pc
-
-avahi-compat-libdns_sd.pc: avahi-compat-libdns_sd.pc.in
- sed -e 's,@prefix\@,$(prefix),g' \
- -e 's,@libdir\@,$(libdir),g' \
- -e 's,@PACKAGE_VERSION\@,$(PACKAGE_VERSION),g' $< > $@
-
CLEANFILES += avahi-compat-libdns_sd.pc
-
endif
if HAVE_MONO
-
pkgconfig_DATA += avahi-sharp.pc avahi-ui-sharp.pc
-
-avahi-sharp.pc: avahi-sharp.pc.in
- sed -e 's,@prefix\@,$(prefix),g' \
- -e 's,@PACKAGE_VERSION\@,$(PACKAGE_VERSION),g' \
- -e 's,@libdir\@,$(libdir),g' $< > $@
-
-avahi-ui-sharp.pc: avahi-ui-sharp.pc.in
- sed -e 's,@prefix\@,$(prefix),g' \
- -e 's,@PACKAGE_VERSION\@,$(PACKAGE_VERSION),g' \
- -e 's,@libdir\@,$(libdir),g' $< > $@
-
CLEANFILES += avahi-sharp.pc avahi-ui-sharp.pc
-
endif
endif
if HAVE_GLIB
-
pkgconfig_DATA += avahi-glib.pc
-
-avahi-glib.pc: avahi-glib.pc.in
- sed -e 's,@prefix\@,$(prefix),g' \
- -e 's,@libdir\@,$(libdir),g' \
- -e 's,@PACKAGE_VERSION\@,$(PACKAGE_VERSION),g' $< > $@
-
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
if HAVE_DBUS
-
pkgconfig_DATA += avahi-ui.pc
-
-avahi-ui.pc: avahi-ui.pc.in
- sed -e 's,@prefix\@,$(prefix),g' \
- -e 's,@libdir\@,$(libdir),g' \
- -e 's,@PACKAGE_VERSION\@,$(PACKAGE_VERSION),g' $< > $@
-
CLEANFILES += avahi-ui.pc
-
endif
endif
if HAVE_QT3
-
pkgconfig_DATA += avahi-qt3.pc
-
-avahi-qt3.pc: avahi-qt3.pc.in
- sed -e 's,@prefix\@,$(prefix),g' \
- -e 's,@libdir\@,$(libdir),g' \
- -e 's,@PACKAGE_VERSION\@,$(PACKAGE_VERSION),g' $< > $@
-
CLEANFILES += avahi-qt3.pc
-
endif
if HAVE_QT4
-
pkgconfig_DATA += avahi-qt4.pc
-
-avahi-qt4.pc: avahi-qt4.pc.in
- sed -e 's,@prefix\@,$(prefix),g' \
- -e 's,@libdir\@,$(libdir),g' \
- -e 's,@PACKAGE_VERSION\@,$(PACKAGE_VERSION),g' $< > $@
-
CLEANFILES += avahi-qt4.pc
-
endif
CLEANFILES += avahi.devhelp
if (b && name)
{
- sr = avahi_service_resolver_new (avahi_service_browser_get_client (b), interface, protocol, name, type, domain, AVAHI_PROTO_UNSPEC, 0, avahi_service_resolver_callback, "xxXXxx");
+ sr = avahi_service_resolver_new (avahi_service_browser_get_client (b), interface, protocol, name, type, domain, AVAHI_PROTO_UNSPEC, 0, avahi_service_resolver_callback, (char*) "xxXXxx");
printf("New service resolver %p\n", (void*) sr);
}
}
return;
}
client = avahi_host_name_resolver_get_client (r);
- ar = avahi_address_resolver_new(client, interface, protocol, a, 0, avahi_address_resolver_callback, "omghai6u");
+ar = avahi_address_resolver_new(client, interface, protocol, a, 0, avahi_address_resolver_callback, (char*) "omghai6u");
if (ar)
{
printf ("Succesfully created address resolver object\n");
simple_poll = avahi_simple_poll_new();
poll_api = avahi_simple_poll_get(simple_poll);
- if (!(avahi = avahi_client_new(poll_api, 0, avahi_client_callback, "omghai2u", &error))) {
+ if (!(avahi = avahi_client_new(poll_api, 0, avahi_client_callback, (char*) "omghai2u", &error))) {
fprintf(stderr, "Client failed: %s\n", avahi_strerror(error));
goto fail;
}
cookie = avahi_client_get_local_service_cookie(avahi);
printf("Local service cookie: %u (Error Return: %s)\n", cookie, cookie != AVAHI_SERVICE_COOKIE_INVALID ? "OK" : avahi_strerror(avahi_client_errno(avahi)));
- group = avahi_entry_group_new(avahi, avahi_entry_group_callback, "omghai");
+ group = avahi_entry_group_new(avahi, avahi_entry_group_callback, (char*) "omghai");
printf("Creating entry group: %s\n", group ? "OK" : avahi_strerror(avahi_client_errno (avahi)));
assert(group);
avahi_entry_group_commit (group);
- domain = avahi_domain_browser_new (avahi, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, NULL, AVAHI_DOMAIN_BROWSER_BROWSE, 0, avahi_domain_browser_callback, "omghai3u");
+ domain = avahi_domain_browser_new (avahi, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, NULL, AVAHI_DOMAIN_BROWSER_BROWSE, 0, avahi_domain_browser_callback, (char*) "omghai3u");
if (domain == NULL)
printf ("Failed to create domain browser object\n");
else
printf ("Sucessfully created domain browser %p\n", (void*) domain);
- st = avahi_service_type_browser_new (avahi, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, NULL, 0, avahi_service_type_browser_callback, "omghai3u");
+ st = avahi_service_type_browser_new (avahi, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, NULL, 0, avahi_service_type_browser_callback, (char*) "omghai3u");
if (st == NULL)
printf ("Failed to create service type browser object\n");
else
printf ("Sucessfully created service type browser %p\n", (void*) st);
- sb = avahi_service_browser_new (avahi, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, "_http._tcp", NULL, 0, avahi_service_browser_callback, "omghai3u");
+ sb = avahi_service_browser_new (avahi, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, "_http._tcp", NULL, 0, avahi_service_browser_callback, (char*) "omghai3u");
if (sb == NULL)
printf ("Failed to create service browser object\n");
else
printf ("Sucessfully created service browser %p\n", (void*) sb);
- hnr = avahi_host_name_resolver_new (avahi, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, "ecstasy.local", AVAHI_PROTO_UNSPEC, 0, avahi_host_name_resolver_callback, "omghai4u");
+ hnr = avahi_host_name_resolver_new (avahi, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, "ecstasy.local", AVAHI_PROTO_UNSPEC, 0, avahi_host_name_resolver_callback, (char*) "omghai4u");
if (hnr == NULL)
printf ("Failed to create hostname resolver object\n");
else
if (aar == NULL) {
printf ("failed to create address object\n");
} else {
- group2 = avahi_entry_group_new (avahi, avahi_entry_group2_callback, "omghai222");
+ group2 = avahi_entry_group_new (avahi, avahi_entry_group2_callback, (char*) "omghai222");
if ((error = avahi_entry_group_add_address (group2, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, 0, "test-mdns.local.", aar)) < 0)
{
printf ("*** failed to add address to entry group: %s\n", avahi_strerror (error));
#include "prioq.h"
-#define POINTER_TO_INT(p) ((int) (p))
-#define INT_TO_POINTER(i) ((void*) (i))
+#define POINTER_TO_INT(p) ((int) (long) (p))
+#define INT_TO_POINTER(i) ((void*) (long) (i))
static int compare_int(const void* a, const void* b) {
int i = POINTER_TO_INT(a), j = POINTER_TO_INT(b);
#include "timeeventq.h"
#include "log.h"
-#define POINTER_TO_INT(p) ((int) (p))
-#define INT_TO_POINTER(i) ((void*) (i))
+#define POINTER_TO_INT(p) ((int) (long) (p))
+#define INT_TO_POINTER(i) ((void*) (long) (i))
static AvahiTimeEventQueue *q = NULL;
$(shell for x in $(BUILT_SOURCES); do rm -f $(distdir)/$$x ; done)
signals-marshal.list: $(CORE_SOURCES) Makefile.am
- ( cd $(srcdir) && \
+ $(AM_V_GEN)( cd $(srcdir) && \
sed -n -e 's/.*_ga_signals_marshal_\([A-Z]*__[A-Z_]*\).*/\1/p' \
$(CORE_SOURCES) ) \
- | sed -e 's/__/:/' -e 'y/_/,/' | sort -u > $@.tmp
+ | sed -e 's/__/:/' -e 'y/_/,/' | sort -u > $@.tmp && \
if cmp -s $@.tmp $@; then \
rm $@.tmp; \
else \
fi
signals-marshal.h: signals-marshal.list
- glib-genmarshal --header --prefix=_ga_signals_marshal $< > $@
+ $(AM_V_GEN)glib-genmarshal --header --prefix=_ga_signals_marshal $< > $@
signals-marshal.c: signals-marshal.list
- glib-genmarshal --body --prefix=_ga_signals_marshal $< > $@
+ $(AM_V_GEN)glib-genmarshal --body --prefix=_ga_signals_marshal $< > $@
# rules for making the glib enum objects
%-enumtypes.h: %.h Makefile.in
- glib-mkenums \
+ $(AM_V_GEN)glib-mkenums \
--fhead "#ifndef __$(shell echo $* | tr [:lower:]- [:upper:]_)_ENUM_TYPES_H__\n#define __$(shell echo $* | tr [:lower:]- [:upper:]_)_ENUM_TYPES_H__\n\n#include <glib-object.h>\n\nG_BEGIN_DECLS\n" \
--fprod "/* enumerations from \"@filename@\" */\n" \
--vhead "GType @enum_name@_get_type (void);\n#define $(shell echo $* | tr [:lower:]- [:upper:]_ | sed 's/_.*//')_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n" \
$< > $@
%-enumtypes.c: %.h Makefile.in
- glib-mkenums \
+ $(AM_V_GEN)glib-mkenums \
--fhead "#include <$*.h>" \
--fprod "\n/* enumerations from \"@filename@\" */" \
--vhead "GType\n@enum_name@_get_type (void)\n{\n static GType etype = 0;\n if (etype == 0) {\n static const G@Type@Value values[] = {" \
avahi-bookmarks
avahi-bookmarks: avahi-bookmarks.in
- sed -e 's,@PYTHON\@,$(PYTHON),g' $< > $@
+ $(AM_V_GEN)sed -e 's,@PYTHON\@,$(PYTHON),g' $< > $@ && \
chmod +x $@
bin_SCRIPTS = $(pythonscripts)
nodist_avahi_SCRIPTS = ServiceTypeDatabase.py
ServiceTypeDatabase.py: ServiceTypeDatabase.py.in
- sed -e 's,@PYTHON\@,$(PYTHON),g' \
+ $(AM_V_GEN)sed -e 's,@PYTHON\@,$(PYTHON),g' \
-e 's,@DBM\@,gdbm,g' \
-e 's,@FIRST_KEY\@,key = self.db.firstkey(),g' \
-e 's,@CHECK_KEY\@,while key is not None:,g' \
-e 's,@NEXT_KEY\@,key = self.db.nextkey(key),g' \
- -e 's,@pkglibdir\@,$(pkglibdir),g' $< > $@
+ -e 's,@pkglibdir\@,$(pkglibdir),g' $< > $@ && \
chmod +x $@
endif
nodist_avahi_SCRIPTS = ServiceTypeDatabase.py
ServiceTypeDatabase.py: ServiceTypeDatabase.py.in
- sed -e 's,@PYTHON\@,$(PYTHON),g' \
+ $(AM_V_GEN)sed -e 's,@PYTHON\@,$(PYTHON),g' \
-e 's,@DBM\@,dbm,g' \
-e 's,@FIRST_KEY\@,keys = self.db.keys(),g' \
-e 's,@CHECK_KEY\@,for key in keys:,g' \
-e 's,@NEXT_KEY\@,,g' \
- -e 's,@pkglibdir\@,$(pkglibdir),g' $< > $@
+ -e 's,@pkglibdir\@,$(pkglibdir),g' $< > $@ && \
chmod +x $@
endif
qt-watch.cpp
qt-watch.moc3: qt-watch.cpp
- $(MOC_QT3) $^ > $@
+ $(AM_V_GEN)$(MOC_QT3) $^ > $@
libavahi_qt3_la_CPPFLAGS = $(AM_CFLAGS) $(QT3_CFLAGS) $(VISIBILITY_HIDDEN_CFLAGS)
libavahi_qt3_la_LIBADD = $(AM_LDADD) ../avahi-common/libavahi-common.la $(QT3_LIBS)
qt-watch.cpp
qt-watch.moc4: qt-watch.cpp
- $(MOC_QT4) $^ > $@
+ $(AM_V_GEN)$(MOC_QT4) $^ > $@
libavahi_qt4_la_CPPFLAGS = $(AM_CFLAGS) $(QT4_CFLAGS) -DQT4 $(VISIBILITY_HIDDEN_CFLAGS)
libavahi_qt4_la_LIBADD = $(AM_LDADD) ../avahi-common/libavahi-common.la $(QT4_LIBS)
AM_SILENT_RULES([yes])
-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} ***])
- ac_default_prefix="/usr/local/stow/${PACKAGE_NAME}-${PACKAGE_VERSION}"
-fi
+AC_CHECK_PROG([STOW], [stow], [yes], [no])
+
+AS_IF([test "x$STOW" = "xyes" && test -d /usr/local/stow], [
+ AC_MSG_NOTICE([*** Found /usr/local/stow: default install prefix set to /usr/local/stow/${PACKAGE_NAME}-${PACKAGE_VERSION} ***])
+ ac_default_prefix="/usr/local/stow/${PACKAGE_NAME}-${PACKAGE_VERSION}"
+])
# Checks for programs.
AC_PROG_CC
+AC_PROG_CC_C99
AC_PROG_CXX
AM_PROG_CC_C_O
AC_USE_SYSTEM_EXTENSIONS
# If using GCC specify some additional parameters
if test "x$GCC" = "xyes" ; then
- DESIRED_FLAGS="-Wall -W -Wextra -pedantic -pipe -Wformat -Wold-style-definition -Wdeclaration-after-statement -Wfloat-equal -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls -Wmissing-noreturn -Wshadow -Wendif-labels -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wcast-align -Wwrite-strings -Winline"
+ DESIRED_FLAGS="-Wall -W -Wextra -pedantic -pipe -Wformat -Wold-style-definition -Wdeclaration-after-statement -Wfloat-equal -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls -Wmissing-noreturn -Wshadow -Wendif-labels -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wcast-align -Wwrite-strings -Winline -fdiagnostics-show-option -Wno-cast-qual"
if test "x$HAVE_NETLINK" = "xyes" ; then
# Test whether rtnetlink.h can be included when compiled with -std=c99
avahilocaledir='${prefix}/${DATADIRNAME}/locale'
AC_SUBST(avahilocaledir)
-
# Check for pkg-config manually first, as if its not installed the
# PKG_PROG_PKG_CONFIG macro won't be defined.
AC_CHECK_PROG(have_pkg_config, pkg-config, yes, no)
CLEANFILES = avahi-daemon avahi-dnsconfd
avahi-daemon: avahi-daemon.in
- sed -e 's,@sbindir\@,$(sbindir),g' $< > $@
+ $(AM_V_GEN)sed -e 's,@sbindir\@,$(sbindir),g' $< > $@ && \
chmod +x $@
avahi-dnsconfd: avahi-dnsconfd.in
- sed -e 's,@sbindir\@,$(sbindir),g' $< > $@
+ $(AM_V_GEN)sed -e 's,@sbindir\@,$(sbindir),g' $< > $@ && \
chmod +x $@
endif
%.xml: %.xml.in Makefile
- sed -e 's,@pkgsysconfdir\@,$(pkgsysconfdir),g' \
+ $(AM_V_GEN) sed -e 's,@pkgsysconfdir\@,$(pkgsysconfdir),g' \
-e 's,@servicedir\@,$(servicedir),g' \
-e 's,@PACKAGE_BUGREPORT\@,$(PACKAGE_BUGREPORT),g' \
-e 's,@PACKAGE_URL\@,$(PACKAGE_URL),g' $< > $@
CLEANFILES += $(man_MANS)
%.1: %.1.xml Makefile
- xmltoman $< > $@
+ $(AM_V_GEN)xmltoman $< > $@
%.5: %.5.xml Makefile
- xmltoman $< > $@
+ $(AM_V_GEN)xmltoman $< > $@
%.8: %.8.xml Makefile
- xmltoman $< > $@
+ $(AM_V_GEN)xmltoman $< > $@
xmllint: $(noinst_DATA)
for f in $(noinst_DATA) ; do \