From 5c0f7327451ba44f43aaaf28816c7ed172128ccc Mon Sep 17 00:00:00 2001 From: Sebastien Estienne Date: Mon, 24 Oct 2005 23:44:05 +0000 Subject: [PATCH] * use which in autogen.sh instead of type -p * add NetBSD support in bootstrap.sh * Netbsd doesn t have RLIMIT_AS -> ifdef * reorder an include in dnsconfd/main.c git-svn-id: file:///home/lennart/svn/public/avahi/trunk@862 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe --- autogen.sh | 10 ++++++---- avahi-daemon/main.c | 4 +++- avahi-dnsconfd/main.c | 2 +- bootstrap.sh | 7 +++++++ 4 files changed, 17 insertions(+), 6 deletions(-) diff --git a/autogen.sh b/autogen.sh index 902181d..f75ad60 100755 --- a/autogen.sh +++ b/autogen.sh @@ -26,12 +26,14 @@ run_versioned() { V=$(echo "$2" | sed -e 's,\.,,g') - if type -p "$1$V" &> /dev/null ; then + if [ -e "`which $1$V`" ] ; then P="$1$V" - elif type -p "$1-$2" &> /dev/null ; then - P="$1-$2" else - P="$1" + if [ -e "`which $1-$2`" ] ; then + P="$1-$2" + else + P="$1" + fi fi shift 2 diff --git a/avahi-daemon/main.c b/avahi-daemon/main.c index f64524a..0e7bbf4 100644 --- a/avahi-daemon/main.c +++ b/avahi-daemon/main.c @@ -39,6 +39,7 @@ #include #include #include +#include #include #include @@ -842,9 +843,10 @@ static void set_one_rlimit(int resource, rlim_t limit, const char *name) { } static void enforce_rlimits(void) { - +#ifdef RLIMIT_AS if (config.rlimit_as_set) set_one_rlimit(RLIMIT_AS, config.rlimit_as, "RLIMIT_AS"); +#endif if (config.rlimit_core_set) set_one_rlimit(RLIMIT_CORE, config.rlimit_core, "RLIMIT_CORE"); if (config.rlimit_data_set) diff --git a/avahi-dnsconfd/main.c b/avahi-dnsconfd/main.c index 84b0f68..faf0490 100644 --- a/avahi-dnsconfd/main.c +++ b/avahi-dnsconfd/main.c @@ -23,11 +23,11 @@ #include #endif -#include #include #include #include #include +#include #include #include #include diff --git a/bootstrap.sh b/bootstrap.sh index e632373..987e36b 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -39,6 +39,13 @@ case `uname -s` in 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" ;; + NetBSD) + export LIBTOOLIZE=libtoolize + export CFLAGS="-I/usr/pkg/include" + export LDFLAGS="-L/usr/pkg/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 --disable-dbus" + ;; Linux) ;; esac -- 2.39.5