mirror of
https://github.com/yarrick/iodine.git
synced 2024-11-22 16:19:20 +02:00
52 lines
874 B
Bash
Executable File
52 lines
874 B
Bash
Executable File
#!/bin/sh
|
|
|
|
case $2 in
|
|
link)
|
|
|
|
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 $(pkg-config --libs libsystemd-daemon)";
|
|
echo $FLAGS;
|
|
;;
|
|
esac
|
|
;;
|
|
cflags)
|
|
case $1 in
|
|
windows32)
|
|
echo '-DWINVER=0x0501';
|
|
;;
|
|
BeOS)
|
|
echo '-Dsocklen_t=int';
|
|
;;
|
|
Darwin)
|
|
echo '-D__APPLE_USE_RFC_3542';
|
|
;;
|
|
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;
|
|
;;
|
|
GNU/kFreeBSD|GNU)
|
|
echo '-D_GNU_SOURCE'
|
|
;;
|
|
esac
|
|
;;
|
|
*)
|
|
;;
|
|
esac
|