?RCS: $Id: d_iptos.U 170 2013-08-30 16:47:47Z rmanfredi $ ?RCS: ?RCS: Copyright (c) 2006, Christian Biere ?RCS: ?RCS: You may redistribute only under the terms of the Artistic License, ?RCS: as specified in the README file that comes with the distribution. ?RCS: You may reuse parts of this distribution only within the terms of ?RCS: that same Artistic License; a copy of which may be found at the root ?RCS: of the source tree for dist 4.0. ?RCS: ?MAKE:d_iptos: cat rm contains cppstdin cppflags cppminus d_windows \ i_niin i_sysin i_niip i_syssock i_winsock2 i_ws2tcpip test Setvar ?MAKE: -pick add $@ %< ?S:d_iptos: ?S: This variable conditionally defines the USE_IP_TOS symbol, which ?S: indicates to the C program that the IP TOS services are available. ?S:. ?C:USE_IP_TOS: ?C: This symbol, if defined, indicates that the IP TOS services are ?C: available and can be used. Be prepared to include , ?C: either or , and when ?C: I_NETINET_IP is defined. ?C:. ?H:#$d_iptos USE_IP_TOS /**/ ?H:. ?F:!iptos !iptos.h ?T:inh ?LINT:set d_iptos ?LINT:usefile iptos.h : check for IP TOS support echo " " echo "Checking whether IP TOS (Type of Service) support is available..." >&4 case "$i_niin" in "$define") inh=netinet/in.h;; *) case "$i_sysin" in "$define") inh=sys/in.h;; *) case "$i_ws2tcpip" in "$define") inh=Ws2tcpip.h;; esac ;; esac ;; esac $cat >iptos < #endif #ifdef I_WINSOCK2 #include #endif #include <$inh> #if defined(IP_TOS) && defined(IPTOS_LOWDELAY) && defined(IPTOS_THROUGHPUT) YES #endif EOM $cppstdin $cppflags $cppminus iptos.h 2>/dev/null val="$undef" if $contains YES iptos.h >/dev/null 2>&1; then val="$define" echo "You have IP TOS support in <$inh>." >&4 elif $test "x$i_niip" = "x$define"; then $cat >iptos < #endif #include <$inh> #include #if defined(IP_TOS) && defined(IPTOS_LOWDELAY) && defined(IPTOS_THROUGHPUT) YES #endif EOM $cppstdin $cppflags $cppminus iptos.h 2>/dev/null if $contains YES iptos.h >/dev/null 2>&1; then val="$define" echo "You have IP TOS support in ." >&4 fi fi case "$val" in "$define") ;; *) echo "Sorry, you seem to be lacking IP TOS support." >&4;; esac set d_iptos eval $setvar $rm -f iptos iptos.h