iodine/src/osflags

43 lines
697 B
Plaintext
Raw Normal View History

2008-07-12 12:42:19 +00:00
#!/bin/sh
2009-01-25 16:28:17 +00:00
case $2 in
2008-07-12 12:42:19 +00:00
link)
2009-01-25 16:28:17 +00:00
case $1 in
2008-07-12 12:42:19 +00:00
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;
;;
2008-07-12 12:42:19 +00:00
esac
;;
cflags)
2009-01-25 16:28:17 +00:00
case $1 in
BeOS)
echo '-Dsocklen_t=int';
;;
Linux)
FLAGS="";
[ -e /usr/include/selinux/selinux.h ] && FLAGS="$FLAGS -DHAVE_SETCON";
[ -e /usr/include/systemd/sd-daemon.h ] && FLAGS="$FLAGS -DHAVE_SYSTEMD";
echo $FLAGS;
;;
esac
;;
2008-07-12 12:42:19 +00:00
*)
;;
esac