From b3aeac1deb4a0aa645f144ace4c4688f4655489b Mon Sep 17 00:00:00 2001 From: Sebastien Estienne Date: Thu, 20 Oct 2005 15:51:29 +0000 Subject: * bug fix in run_versioned * bug fix in socket.c and cosmectic change * use uname instead of MACHTYPE in bootstrap.sh git-svn-id: file:///home/lennart/svn/public/avahi/trunk@830 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe --- autogen.sh | 6 +++--- avahi-core/socket.c | 8 ++++---- bootstrap.sh | 17 ++++++++++++++--- 3 files changed, 21 insertions(+), 10 deletions(-) diff --git a/autogen.sh b/autogen.sh index b0568e5..902181d 100755 --- a/autogen.sh +++ b/autogen.sh @@ -24,7 +24,7 @@ run_versioned() { local P local V - V=$(echo "$VERSION" | sed -e 's,\.,,g') + V=$(echo "$2" | sed -e 's,\.,,g') if type -p "$1$V" &> /dev/null ; then P="$1$V" @@ -51,8 +51,8 @@ else "$LIBTOOLIZE" -c --force run_versioned aclocal "$VERSION" -I common - autoconf -Wall - autoheader + run_versioned autoconf 2.59 -Wall + run_versioned autoheader 2.59 run_versioned automake "$VERSION" -a -c --foreign if test "x$NOCONFIGURE" = "x"; then diff --git a/avahi-core/socket.c b/avahi-core/socket.c index 12a8605..497f061 100644 --- a/avahi-core/socket.c +++ b/avahi-core/socket.c @@ -505,18 +505,18 @@ int avahi_send_dns_packet_ipv4(int fd, int interface, AvahiDnsPacket *p, const A } #elif IP_RECVIF { - struct sockaddr_dl *pkti; + struct sockaddr_dl *sdl; cmsg->cmsg_type = IP_RECVIF; - pkti = (struct sockaddr_dl*) (cmsg_data + sizeof(struct cmsghdr)); - pkti->sdl_index = interface; + sdl = (struct sockaddr_dl*) (cmsg_data + sizeof(struct cmsghdr)); + sdl->sdl_index = interface; } #elif IP_RECVINTERFACE { u_short *i; cmsg->cmsg_type = IP_RECVINTERFACE; - i = (u_short *) (cmsg_data + sizeof(u_short)); + i = (u_short *) (cmsg_data + sizeof(struct cmsghdr)); memcpy(&i, CMSG_DATA (cmsg), sizeof(u_short)); } #endif diff --git a/bootstrap.sh b/bootstrap.sh index 4c34566..e632373 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -22,13 +22,24 @@ FLAGS="--sysconfdir=/etc --localstatedir=/var --enable-tests --enable-compat-how # Feel free to add your own custom flags in here -Lathiat -case "$MACHTYPE" in - powerpc-apple-darwin8.0) +case `uname -s` in + Darwin) export LIBTOOLIZE=/opt/local/bin/glibtoolize export CFLAGS="-I/opt/local/include" export LDFLAGS="-L/opt/local/lib" export PKG_CONFIG_PATH="/opt/local/lib/pkgconfig" - FLAGS="$FLAGS --disable-monodoc --disable-mono --disable-qt3 --disable-qt4 --disable-xmltoman --prefix=/opt --with-distro=none --disable-python" + FLAGS="$FLAGS --disable-monodoc --disable-mono --disable-qt3 --disable-qt4 --disable-xmltoman --prefix=/opt --with-distro=none --disable-python --disable-manpages" + ;; + FreeBSD) + cp /usr/local/share/aclocal/libtool15.m4 common + cp /usr/local/share/aclocal/pkg.m4 common + export LIBTOOLIZE=/usr/local/bin/libtoolize15 + export CFLAGS="-I/usr/local/include" + export LDFLAGS="-L/usr/local/lib" + export PKG_CONFIG_PATH="/usr/local/lib/pkgconfig" + FLAGS="$FLAGS --disable-monodoc --disable-mono --disable-qt3 --disable-qt4 --disable-xmltoman --prefix=/opt --with-distro=none --disable-python --disable-dbus --disable-glib --disable-gtk --disable-manpages" + ;; + Linux) ;; esac -- cgit