X-Git-Url: https://git.toastfreeware.priv.at/debian/iodine.git/blobdiff_plain/6235fca1d72ece180338b30bb26afa938618cf26..9f5e4e5c1cf6959b8c243fd1f10597786b6bc81e:/src/osflags diff --git a/src/osflags b/src/osflags old mode 100644 new mode 100755 index 2e28ee8..9eda8f0 --- a/src/osflags +++ b/src/osflags @@ -1,9 +1,9 @@ #!/bin/sh -case $1 in +case $2 in link) - case `uname` in + case $1 in SunOS | solaris) echo '-lsocket -lnsl'; ;; @@ -13,13 +13,31 @@ link) 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 `uname` in + 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 ;; *)