]> git.meshlink.io Git - catta/commitdiff
* use which in autogen.sh instead of type -p
authorSebastien Estienne <sebastien.estienne@gmail.com>
Mon, 24 Oct 2005 23:44:05 +0000 (23:44 +0000)
committerSebastien Estienne <sebastien.estienne@gmail.com>
Mon, 24 Oct 2005 23:44:05 +0000 (23:44 +0000)
* 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
avahi-daemon/main.c
avahi-dnsconfd/main.c
bootstrap.sh

index 902181d8209f452e45ad632324626ac21154a749..f75ad605a66f2474943afb8fdc78fffa1d12f6e9 100755 (executable)
@@ -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
index f64524a730e85bcaf1c4289135197b52cd5f2033..0e7bbf4db8fdf3d3cd26a1da7b6140a6e7ce3fc5 100644 (file)
@@ -39,6 +39,7 @@
 #include <stdlib.h>
 #include <sys/time.h>
 #include <sys/resource.h>
+#include <sys/socket.h>
 
 #include <libdaemon/dfork.h>
 #include <libdaemon/dsignal.h>
@@ -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)
index 84b0f6873cd076696c689ba85d504ecf57794084..faf049044d855420f37b0b5596d9efcc6223d14a 100644 (file)
 #include <config.h>
 #endif
 
-#include <sys/un.h>
 #include <fcntl.h>
 #include <unistd.h>
 #include <sys/select.h>
 #include <sys/socket.h>
+#include <sys/un.h>
 #include <errno.h>
 #include <string.h>
 #include <stdio.h>
index e6323730dc13167a82aa5ad3ac2c73f4b51e0f0f..987e36b018a27f4126999a28adc2a76a86377197 100755 (executable)
@@ -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