From 483d354468121beea4daf80ca42a357b4eaaab40 Mon Sep 17 00:00:00 2001 From: Ron Pedde Date: Wed, 2 Jun 2004 05:28:52 +0000 Subject: [PATCH] Fix gdbm for debian stable, configure problem with new howl --- configure.in | 18 +++++++++++++----- contrib/mt-daapd.spec | 5 ++++- debian/changelog | 2 +- debian/postinst | 2 ++ src/db-gdbm.c | 9 +++++++++ 5 files changed, 29 insertions(+), 7 deletions(-) diff --git a/configure.in b/configure.in index dd5fe2de..5fd6d8fc 100644 --- a/configure.in +++ b/configure.in @@ -4,7 +4,7 @@ dnl Process this file with autoconf to produce a configure script. AC_INIT(config.h.in) AM_CONFIG_HEADER(config.h) -AM_INIT_AUTOMAKE(mt-daapd,0.2.0-pre2) +AM_INIT_AUTOMAKE(mt-daapd,0.2.0) dnl Checks for programs. AC_PROG_CC @@ -18,9 +18,21 @@ AM_CONDITIONAL(COND_REND_OSX,false) STATIC_LIBS=no CPPFLAGS="${CPPFLAGS} -g" +LDFLAGS="${LDFLAGS} -lz" + +AC_CHECK_LIB(z,compress,LDFLAGS="$LDFLAGS -lz",echo "Must have zlib";exit) + AC_ARG_ENABLE(debug,Enable debugging features,CPPFLAGS="${CPPFLAGS} -Wall") AC_ARG_ENABLE(debug-memory,Enable mem leak debugging,CPPFLAGS="${CPPFLAGS} -DDEBUG_MEMORY") AC_ARG_ENABLE(efence,Enable electric fence,LDFLAGS="${LDFLAGS} -lefence") +AC_ARG_ENABLE(new-howl,[ --enable-new-howl Use howl 0.9.2 or later], + [ case "${enableval}" in + yes) rend_howl=true; LDFLAGS="${LDFLAGS} -lhowl"; + CPPFLAGS="${CPPFLAGS} -DWITH_HOWL";; + no) rend_howl=false;; + *) AC_MSG_ERROR(bad value ${enableval} for --enable-howl);; + esac ],[rend_howl=false]) + AC_ARG_ENABLE(howl,[ --enable-howl Use the howl mDNS library], [ case "${enableval}" in @@ -143,10 +155,6 @@ fi AC_REPLACE_FUNCS(strcasestr) AC_REPLACE_FUNCS(strsep) -LDFLAGS="${LDFLAGS} -lz" - -AC_CHECK_LIB(z,compress,LDFLAGS="$LDFLAGS -lz",echo "Must have zlib";exit) - dnl Checks for header files. AC_HEADER_STDC AC_HEADER_SYS_WAIT diff --git a/contrib/mt-daapd.spec b/contrib/mt-daapd.spec index 3cebd5e1..3d67001e 100644 --- a/contrib/mt-daapd.spec +++ b/contrib/mt-daapd.spec @@ -1,6 +1,6 @@ Summary: A multi-threaded implementation of Apple's DAAP server Name: mt-daapd -Version: 0.2.0-pre1 +Version: 0.2.0 Release: 1 License: GPL Group: Development/Networking @@ -50,6 +50,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Tue Jun 01 2004 ron +- Update to 0.2.0 + * Mon Apr 06 2004 ron - Update to 0.2.0-pre1 - Add /var/cache/mt-daapd diff --git a/debian/changelog b/debian/changelog index ee4b8b9b..9636c6c2 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -mt-daapd (0.2.0-pre1) unstable; urgency=low +mt-daapd (0.2.0) unstable; urgency=low * Add gdbm database * Add support for .m4a and .m4p * Various bug fixes diff --git a/debian/postinst b/debian/postinst index a0e4f102..8fe481e0 100644 --- a/debian/postinst +++ b/debian/postinst @@ -3,10 +3,12 @@ action="$1" CONF=/etc/mt-daapd.conf PLAY=/etc/mt-daapd.playlist +CACHE=/var/cache/mt-daapd case "$1" in configure) if [ ! -f $CONF ] ; then cp /usr/share/doc/mt-daapd/mt-daapd.conf $CONF; fi if [ ! -f $PLAY ] ; then cp /usr/share/doc/mt-daapd/mt-daapd.playlist $PLAY; fi + if [ ! -d $CACHE ] ; then mkdir -p $CACHE; fi ;; esac diff --git a/src/db-gdbm.c b/src/db-gdbm.c index 2410739c..3a8e7b37 100644 --- a/src/db-gdbm.c +++ b/src/db-gdbm.c @@ -48,6 +48,15 @@ #define STRLEN(a) (a) ? strlen((a)) + 1 : 1 #define MAYBEFREE(a) { if((a)) free((a)); }; +/* For old version of gdbm */ +#ifndef GDBM_SYNC +# define GDBM_SYNC 0 +#endif + +#ifndef GDBM_NOLOCK +# define GDBM_NOLOCK 0 +#endif + /* * Typedefs