Remove trailing whitespace from debian/*.
[debian/iodine.git] / src / osflags
old mode 100644 (file)
new mode 100755 (executable)
index 0f8665d..9eda8f0
@@ -1,14 +1,45 @@
 #!/bin/sh
 
-case $1 in
+case $2 in
 link)
 
-       case `uname` in
+       case $1 in
                SunOS | solaris)
                        echo '-lsocket -lnsl';
                ;;
+               BeOS)
+                       echo '-lsocket -lbind -lbsd';
+               ;;
+               Haiku)
+                       echo '-lnetwork';
+               ;;
+               windows32)
+                       echo '-lws2_32 -liphlpapi';
+               ;;
+               Linux)
+                       FLAGS="";
+                       [ -e /usr/include/selinux/selinux.h ] && FLAGS="$FLAGS -lselinux";
+                       [ -e /usr/include/systemd/sd-daemon.h ] && FLAGS="$FLAGS -lsystemd-daemon";
+                       echo $FLAGS;
+               ;;
        esac
        ;;
+cflags)
+       case $1 in
+               windows32)
+                       echo '-DWINVER=0x0501';
+               ;;
+               BeOS)
+                       echo '-Dsocklen_t=int';
+               ;;
+               Linux)
+                       FLAGS="-D_GNU_SOURCE"
+                       [ -e /usr/include/selinux/selinux.h ] && FLAGS="$FLAGS -DHAVE_SETCON";
+                       [ -e /usr/include/systemd/sd-daemon.h ] && FLAGS="$FLAGS -DHAVE_SYSTEMD";
+                       echo $FLAGS;
+               ;;
+       esac
+;;
 *)
 ;;
 esac