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';
|
|
|
|
;;
|
2008-08-07 16:53:59 +00:00
|
|
|
BeOS)
|
|
|
|
echo '-lsocket -lbind -lbsd';
|
|
|
|
;;
|
|
|
|
Haiku)
|
|
|
|
echo '-lnetwork';
|
|
|
|
;;
|
2009-01-24 22:19:11 +00:00
|
|
|
windows32)
|
2009-02-22 14:27:10 +00:00
|
|
|
echo '-lws2_32 -liphlpapi';
|
2009-01-24 22:19:11 +00:00
|
|
|
;;
|
2009-06-24 17:28:13 +00:00
|
|
|
Linux)
|
2013-12-23 09:48:46 +00:00
|
|
|
FLAGS="";
|
|
|
|
[ -e /usr/include/selinux/selinux.h ] && FLAGS="$FLAGS -lselinux";
|
|
|
|
[ -e /usr/include/systemd/sd-daemon.h ] && FLAGS="$FLAGS -lsystemd-daemon";
|
|
|
|
echo $FLAGS;
|
2009-06-24 17:28:13 +00:00
|
|
|
;;
|
2008-07-12 12:42:19 +00:00
|
|
|
esac
|
|
|
|
;;
|
2008-08-07 16:53:59 +00:00
|
|
|
cflags)
|
2009-01-25 16:28:17 +00:00
|
|
|
case $1 in
|
2014-02-06 21:50:23 +00:00
|
|
|
windows32)
|
|
|
|
echo '-DWINVER=0x0501';
|
|
|
|
;;
|
2009-03-07 00:00:58 +00:00
|
|
|
BeOS)
|
2008-08-07 16:53:59 +00:00
|
|
|
echo '-Dsocklen_t=int';
|
|
|
|
;;
|
2009-06-24 17:28:13 +00:00
|
|
|
Linux)
|
2014-05-29 16:37:40 +00:00
|
|
|
FLAGS="-D_GNU_SOURCE"
|
2013-12-23 09:48:46 +00:00
|
|
|
[ -e /usr/include/selinux/selinux.h ] && FLAGS="$FLAGS -DHAVE_SETCON";
|
|
|
|
[ -e /usr/include/systemd/sd-daemon.h ] && FLAGS="$FLAGS -DHAVE_SYSTEMD";
|
|
|
|
echo $FLAGS;
|
2009-06-24 17:28:13 +00:00
|
|
|
;;
|
2008-08-07 16:53:59 +00:00
|
|
|
esac
|
|
|
|
;;
|
2008-07-12 12:42:19 +00:00
|
|
|
*)
|
|
|
|
;;
|
|
|
|
esac
|