Skip to content

Commit

Permalink
As bonjour is pretty Macosx specific, all of the bonjour related
Browse files Browse the repository at this point in the history
files have been moved to the macosx folder. The configure.in now
detects when compiling on OSX, and uses the bonjour files only on
that platform. The generic case will link against a locally included
copy of Avahi (which will reside in the compat/ directory)
  • Loading branch information
eviltwinskippy committed Apr 25, 2014
1 parent 4720ea5 commit bede935
Show file tree
Hide file tree
Showing 10 changed files with 27 additions and 22 deletions.
41 changes: 23 additions & 18 deletions Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
# RCS: @(#) $Id: Makefile.in,v 1.69 2010/08/17 00:38:28 hobbs Exp $
# RCS: @(#) $Id: Makefile.in,v 1.59 2005/07/26 19:17:02 mdejong Exp $

#========================================================================
# Add additional lines to handle any additional AC_SUBST cases that
Expand Down Expand Up @@ -73,10 +73,9 @@ exec_prefix = @exec_prefix@

bindir = @bindir@
libdir = @libdir@
includedir = @includedir@
datarootdir = @datarootdir@
datadir = @datadir@
mandir = @mandir@
includedir = @includedir@

DESTDIR =

Expand All @@ -89,7 +88,6 @@ top_builddir = .

INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_LIBRARY = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_SCRIPT = @INSTALL_SCRIPT@

Expand All @@ -98,6 +96,7 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
CC = @CC@
CFLAGS_DEFAULT = @CFLAGS_DEFAULT@
CFLAGS_WARNING = @CFLAGS_WARNING@
CLEANFILES = @CLEANFILES@
EXEEXT = @EXEEXT@
LDFLAGS_DEFAULT = @LDFLAGS_DEFAULT@
MAKE_LIB = @MAKE_LIB@
Expand All @@ -117,6 +116,8 @@ TCL_SRC_DIR = @TCL_SRC_DIR@
#TK_BIN_DIR = @TK_BIN_DIR@
#TK_SRC_DIR = @TK_SRC_DIR@

# This is no longer necessary even for packages that use private Tcl headers
#TCL_TOP_DIR_NATIVE = @TCL_TOP_DIR_NATIVE@
# Not used, but retained for reference of what libs Tcl required
#TCL_LIBS = @TCL_LIBS@

Expand All @@ -130,21 +131,22 @@ TCL_SRC_DIR = @TCL_SRC_DIR@
EXTRA_PATH = $(top_builddir):$(TCL_BIN_DIR)
#EXTRA_PATH = $(top_builddir):$(TCL_BIN_DIR):$(TK_BIN_DIR)
TCLLIBPATH = $(top_builddir)
TCLSH_ENV = TCL_LIBRARY=`@CYGPATH@ $(TCL_SRC_DIR)/library`
PKG_ENV = @LD_LIBRARY_PATH_VAR@="$(EXTRA_PATH):$(@LD_LIBRARY_PATH_VAR@)" \
TCLSH_ENV = TCL_LIBRARY=`@CYGPATH@ $(TCL_SRC_DIR)/library` \
@LD_LIBRARY_PATH_VAR@="$(EXTRA_PATH):$(@LD_LIBRARY_PATH_VAR@)" \
PATH="$(EXTRA_PATH):$(PATH)" \
TCLLIBPATH="$(TCLLIBPATH)"
# TK_LIBRARY=`@CYGPATH@ $(TK_SRC_DIR)/library`

TCLSH_PROG = @TCLSH_PROG@
TCLSH = $(PKG_ENV) $(TCLSH_ENV) $(TCLSH_PROG)
TCLSH = $(TCLSH_ENV) $(TCLSH_PROG)

#WISH_ENV = TK_LIBRARY=`@CYGPATH@ $(TK_SRC_DIR)/library`
#WISH_PROG = @WISH_PROG@
#WISH = $(PKG_ENV) $(TCLSH_ENV) $(WISH_ENV) $(WISH_PROG)
#WISH = $(TCLSH_ENV) $(WISH_PROG)


SHARED_BUILD = @SHARED_BUILD@

INCLUDES = @PKG_INCLUDES@ @TCL_INCLUDES@
INCLUDES = @PKG_INCLUDES@ @TCL_INCLUDES@ -I$(srcdir)/..
#INCLUDES = @PKG_INCLUDES@ @TCL_INCLUDES@ @TK_INCLUDES@ @TK_XINCLUDES@

PKG_CFLAGS = @PKG_CFLAGS@
Expand All @@ -157,9 +159,7 @@ PKG_CFLAGS = @PKG_CFLAGS@
#DEFS = $(TCL_DEFS) @DEFS@ $(PKG_CFLAGS)
DEFS = @DEFS@ $(PKG_CFLAGS)

# Move pkgIndex.tcl to 'BINARIES' var if it is generated in the Makefile
CONFIG_CLEAN_FILES = Makefile pkgIndex.tcl
CLEANFILES = @CLEANFILES@

CPPFLAGS = @CPPFLAGS@
LIBS = @PKG_LIBS@ @LIBS@
Expand Down Expand Up @@ -192,14 +192,18 @@ binaries: $(BINARIES)

libraries:


#========================================================================
# Your doc target should differentiate from doc builds (by the developer)
# and doc installs (see install-doc), which just install the docs on the
# end user machine when building from source.
#========================================================================

doc: doc/bonjour.man
$(TCLSH) make_doc.tcl nroff < doc/bonjour.man > doc/bonjour.n
doc:
@echo "If you have documentation to create, place the commands to"
@echo "build the docs in the 'doc:' target. For example:"
@echo " xml2nroff sample.xml > sample.n"
@echo " xml2html sample.xml > sample.html"

install: all install-binaries install-libraries install-doc

Expand Down Expand Up @@ -228,11 +232,12 @@ install-doc: doc
@echo "Installing documentation in $(DESTDIR)$(mandir)"
@list='$(srcdir)/doc/*.n'; for i in $$list; do \
echo "Installing $$i"; \
rm -f $(DESTDIR)$(mandir)/mann/`basename $$i`; \
$(INSTALL_DATA) $$i $(DESTDIR)$(mandir)/mann ; \
done

test: binaries libraries
$(TCLSH) `@CYGPATH@ $(srcdir)/tests/all.tcl` $(TESTFLAGS)
@echo "SQLite TEA distribution does not include tests"

shell: binaries libraries
@$(TCLSH) $(SCRIPT)
Expand Down Expand Up @@ -297,7 +302,7 @@ dist-clean:

dist: dist-clean
mkdir -p $(DIST_DIR)
cp -p $(srcdir)/ChangeLog $(srcdir)/README* $(srcdir)/license* \
cp -p $(srcdir)/README* $(srcdir)/license* \
$(srcdir)/aclocal.m4 $(srcdir)/configure $(srcdir)/*.in \
$(DIST_DIR)/
chmod 664 $(DIST_DIR)/Makefile.in $(DIST_DIR)/aclocal.m4
Expand Down Expand Up @@ -359,8 +364,8 @@ install-lib-binaries: binaries
@mkdir -p $(DESTDIR)$(pkglibdir)
@list='$(lib_BINARIES)'; for p in $$list; do \
if test -f $$p; then \
echo " $(INSTALL_LIBRARY) $$p $(DESTDIR)$(pkglibdir)/$$p"; \
$(INSTALL_LIBRARY) $$p $(DESTDIR)$(pkglibdir)/$$p; \
echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(pkglibdir)/$$p"; \
$(INSTALL_PROGRAM) $$p $(DESTDIR)$(pkglibdir)/$$p; \
stub=`echo $$p|sed -e "s/.*\(stub\).*/\1/"`; \
if test "x$$stub" = "xstub"; then \
echo " $(RANLIB_STUB) $(DESTDIR)$(pkglibdir)/$$p"; \
Expand Down
4 changes: 2 additions & 2 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -4804,7 +4804,7 @@ if test "`uname -s`" = "Darwin"; then
# On Macosx, Use Bonjour
###
vars="bonjour/bonjour.c bonjour/browse.c bonjour/register.c bonjour/resolve.c bonjour/txt_record.c"
vars="bonjour.c browse.c register.c resolve.c txt_record.c"
for i in $vars; do
case $i in
\$*)
Expand Down Expand Up @@ -4843,7 +4843,7 @@ else
# On other platforms, use avahi
###
vars="avahi/avahi.c avahi/browse.c avahi/register.c avahi/resolve.c avahi/txt_record.c"
vars="generic/avahi.c generic/browse.c generic/register.c generic/resolve.c generic/txt_record.c"
for i in $vars; do
case $i in
\$*)
Expand Down
4 changes: 2 additions & 2 deletions configure.in
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,12 @@ if test "`uname -s`" = "Darwin"; then
###
# On Macosx, Use Bonjour
###
TEA_ADD_SOURCES([bonjour/bonjour.c bonjour/browse.c bonjour/register.c bonjour/resolve.c bonjour/txt_record.c])
TEA_ADD_SOURCES([bonjour.c browse.c register.c resolve.c txt_record.c])
else
###
# On other platforms, use avahi
###
TEA_ADD_SOURCES([avahi/avahi.c avahi/browse.c avahi/register.c avahi/resolve.c avahi/txt_record.c])
TEA_ADD_SOURCES([generic/avahi.c generic/browse.c generic/register.c generic/resolve.c generic/txt_record.c])
fi

TEA_ADD_HEADERS([])
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit bede935

Please sign in to comment.