Proper detection of TOS (standard) and socket priority (Linux-specific)

GETADDRINFO
Stephane Bortzmeyer 24 years ago
parent 31694611fc
commit 63f2806a9d

@ -9,6 +9,9 @@
/* Do we have TOS? */
#undef HAVE_TOS
/* Do we have socket priority? */
#undef HAVE_SOCKET_PRIORITY
/* Is sys_errlist declared? */
#undef DECL_SYS_ERRLIST

@ -55,6 +55,9 @@
/* Do we have TOS? */
#undef HAVE_TOS
/* Do we have socket priority? */
#undef HAVE_SOCKET_PRIORITY
/* Is sys_errlist declared? */
#undef DECL_SYS_ERRLIST

254
SRC/configure vendored

@ -22,7 +22,9 @@ ac_help="$ac_help
ac_help="$ac_help
--enable-ttcp T/TCP (Transaction TCP) support"
ac_help="$ac_help
--enable-tos TOS (Type Of Service - and socket priority) support"
--enable-tos TOS (Type Of Service) support"
ac_help="$ac_help
--enable-priority PRIORITY (socket priority) support"
# Initialize some variables set by options.
# The variables have the same names as the options, with
@ -564,7 +566,7 @@ ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
echo "configure:568: checking for a BSD compatible install" >&5
echo "configure:570: checking for a BSD compatible install" >&5
if test -z "$INSTALL"; then
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@ -617,7 +619,7 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
echo "configure:621: checking whether build environment is sane" >&5
echo "configure:623: checking whether build environment is sane" >&5
# Just in case
sleep 1
echo timestamp > conftestfile
@ -674,7 +676,7 @@ test "$program_suffix" != NONE &&
test "$program_transform_name" = "" && program_transform_name="s,x,x,"
echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
echo "configure:678: checking whether ${MAKE-make} sets \${MAKE}" >&5
echo "configure:680: checking whether ${MAKE-make} sets \${MAKE}" >&5
set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@ -720,7 +722,7 @@ EOF
missing_dir=`cd $ac_aux_dir && pwd`
echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
echo "configure:724: checking for working aclocal" >&5
echo "configure:726: checking for working aclocal" >&5
# Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf. Sigh.
@ -733,7 +735,7 @@ else
fi
echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
echo "configure:737: checking for working autoconf" >&5
echo "configure:739: checking for working autoconf" >&5
# Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf. Sigh.
@ -746,7 +748,7 @@ else
fi
echo $ac_n "checking for working automake""... $ac_c" 1>&6
echo "configure:750: checking for working automake" >&5
echo "configure:752: checking for working automake" >&5
# Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf. Sigh.
@ -759,7 +761,7 @@ else
fi
echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
echo "configure:763: checking for working autoheader" >&5
echo "configure:765: checking for working autoheader" >&5
# Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf. Sigh.
@ -772,7 +774,7 @@ else
fi
echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
echo "configure:776: checking for working makeinfo" >&5
echo "configure:778: checking for working makeinfo" >&5
# Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf. Sigh.
@ -859,7 +861,7 @@ fi
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:863: checking for $ac_word" >&5
echo "configure:865: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -889,7 +891,7 @@ if test -z "$CC"; then
# Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:893: checking for $ac_word" >&5
echo "configure:895: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -940,7 +942,7 @@ fi
# Extract the first word of "cl", so it can be a program name with args.
set dummy cl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:944: checking for $ac_word" >&5
echo "configure:946: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -972,7 +974,7 @@ fi
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
echo "configure:976: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
echo "configure:978: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
@ -983,12 +985,12 @@ cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext << EOF
#line 987 "configure"
#line 989 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
if { (eval echo configure:992: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:994: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ac_cv_prog_cc_works=yes
# If we can't run a trivial program, we are probably using a cross compiler.
if (./conftest; exit) 2>/dev/null; then
@ -1014,12 +1016,12 @@ if test $ac_cv_prog_cc_works = no; then
{ echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
echo "configure:1018: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "configure:1020: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
cross_compiling=$ac_cv_prog_cc_cross
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
echo "configure:1023: checking whether we are using GNU C" >&5
echo "configure:1025: checking whether we are using GNU C" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -1028,7 +1030,7 @@ else
yes;
#endif
EOF
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1032: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1034: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gcc=yes
else
ac_cv_prog_gcc=no
@ -1047,7 +1049,7 @@ ac_test_CFLAGS="${CFLAGS+set}"
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
echo "configure:1051: checking whether ${CC-cc} accepts -g" >&5
echo "configure:1053: checking whether ${CC-cc} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -1090,7 +1092,7 @@ fi
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
echo "configure:1094: checking for a BSD compatible install" >&5
echo "configure:1096: checking for a BSD compatible install" >&5
if test -z "$INSTALL"; then
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@ -1145,7 +1147,7 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
echo "configure:1149: checking how to run the C preprocessor" >&5
echo "configure:1151: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
@ -1160,13 +1162,13 @@ else
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp.
cat > conftest.$ac_ext <<EOF
#line 1164 "configure"
#line 1166 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1170: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:1172: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
@ -1177,13 +1179,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
#line 1181 "configure"
#line 1183 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1187: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:1189: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
@ -1194,13 +1196,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -nologo -E"
cat > conftest.$ac_ext <<EOF
#line 1198 "configure"
#line 1200 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1204: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:1206: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
@ -1225,12 +1227,12 @@ fi
echo "$ac_t""$CPP" 1>&6
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
echo "configure:1229: checking for ANSI C header files" >&5
echo "configure:1231: checking for ANSI C header files" >&5
if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1234 "configure"
#line 1236 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
@ -1238,7 +1240,7 @@ else
#include <float.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1242: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:1244: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@ -1255,7 +1257,7 @@ rm -f conftest*
if test $ac_cv_header_stdc = yes; then
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
#line 1259 "configure"
#line 1261 "configure"
#include "confdefs.h"
#include <string.h>
EOF
@ -1273,7 +1275,7 @@ fi
if test $ac_cv_header_stdc = yes; then
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
#line 1277 "configure"
#line 1279 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
@ -1294,7 +1296,7 @@ if test "$cross_compiling" = yes; then
:
else
cat > conftest.$ac_ext <<EOF
#line 1298 "configure"
#line 1300 "configure"
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@ -1305,7 +1307,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
exit (0); }
EOF
if { (eval echo configure:1309: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
if { (eval echo configure:1311: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
:
else
@ -1332,17 +1334,17 @@ for ac_hdr in sys/time.h unistd.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:1336: checking for $ac_hdr" >&5
echo "configure:1338: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1341 "configure"
#line 1343 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1346: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:1348: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@ -1373,13 +1375,13 @@ for cf_name in sys_nerr sys_errlist
do
echo $ac_n "checking if external $cf_name is declared""... $ac_c" 1>&6
echo "configure:1377: checking if external $cf_name is declared" >&5
echo "configure:1379: checking if external $cf_name is declared" >&5
if eval "test \"`echo '$''{'cf_cv_dcl_$cf_name'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1383 "configure"
#line 1385 "configure"
#include "confdefs.h"
#ifdef HAVE_STDLIB_H
@ -1392,7 +1394,7 @@ int main() {
long x = (long) $cf_name
; return 0; }
EOF
if { (eval echo configure:1396: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:1398: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
eval 'cf_cv_dcl_'$cf_name'=yes'
else
@ -1422,13 +1424,13 @@ fi
# It's possible (for near-UNIX clones) that the data doesn't exist
echo $ac_n "checking if external $cf_name exists""... $ac_c" 1>&6
echo "configure:1426: checking if external $cf_name exists" >&5
echo "configure:1428: checking if external $cf_name exists" >&5
if eval "test \"`echo '$''{'cf_cv_have_$cf_name'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1432 "configure"
#line 1434 "configure"
#include "confdefs.h"
#undef $cf_name
@ -1438,7 +1440,7 @@ int main() {
$cf_name = 2
; return 0; }
EOF
if { (eval echo configure:1442: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:1444: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval 'cf_cv_have_'$cf_name'=yes'
else
@ -1471,12 +1473,12 @@ done
echo $ac_n "checking for working const""... $ac_c" 1>&6
echo "configure:1475: checking for working const" >&5
echo "configure:1477: checking for working const" >&5
if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1480 "configure"
#line 1482 "configure"
#include "confdefs.h"
int main() {
@ -1525,7 +1527,7 @@ ccp = (char const *const *) p;
; return 0; }
EOF
if { (eval echo configure:1529: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:1531: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_const=yes
else
@ -1546,12 +1548,12 @@ EOF
fi
echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
echo "configure:1550: checking whether time.h and sys/time.h may both be included" >&5
echo "configure:1552: checking whether time.h and sys/time.h may both be included" >&5
if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1555 "configure"
#line 1557 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/time.h>
@ -1560,7 +1562,7 @@ int main() {
struct tm *tp;
; return 0; }
EOF
if { (eval echo configure:1564: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:1566: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_header_time=yes
else
@ -1583,7 +1585,7 @@ fi
echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
echo "configure:1587: checking for socket in -lsocket" >&5
echo "configure:1589: checking for socket in -lsocket" >&5
ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@ -1591,7 +1593,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lsocket $LIBS"
cat > conftest.$ac_ext <<EOF
#line 1595 "configure"
#line 1597 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@ -1602,7 +1604,7 @@ int main() {
socket()
; return 0; }
EOF
if { (eval echo configure:1606: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:1608: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@ -1619,9 +1621,9 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
echo "$ac_t""yes" 1>&6
echo $ac_n "checking if libsocket is mandatory""... $ac_c" 1>&6
echo "configure:1623: checking if libsocket is mandatory" >&5
echo "configure:1625: checking if libsocket is mandatory" >&5
cat > conftest.$ac_ext <<EOF
#line 1625 "configure"
#line 1627 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <netinet/in.h>
@ -1637,7 +1639,7 @@ int main() {
socket (AF_INET, SOCK_STREAM, 0)
; return 0; }
EOF
if { (eval echo configure:1641: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:1643: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
echo "$ac_t""no" 1>&6
else
@ -1655,7 +1657,7 @@ fi
echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
echo "configure:1659: checking for gethostbyname in -lnsl" >&5
echo "configure:1661: checking for gethostbyname in -lnsl" >&5
ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@ -1663,7 +1665,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lnsl $LIBS"
cat > conftest.$ac_ext <<EOF
#line 1667 "configure"
#line 1669 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@ -1674,7 +1676,7 @@ int main() {
gethostbyname()
; return 0; }
EOF
if { (eval echo configure:1678: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:1680: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@ -1691,9 +1693,9 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
echo "$ac_t""yes" 1>&6
echo $ac_n "checking if libnsl is mandatory""... $ac_c" 1>&6
echo "configure:1695: checking if libnsl is mandatory" >&5
echo "configure:1697: checking if libnsl is mandatory" >&5
cat > conftest.$ac_ext <<EOF
#line 1697 "configure"
#line 1699 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <netinet/in.h>
@ -1702,7 +1704,7 @@ int main() {
gethostbyname(domain)
; return 0; }
EOF
if { (eval echo configure:1706: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:1708: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
echo "$ac_t""no" 1>&6
else
@ -1719,12 +1721,12 @@ fi
echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
echo "configure:1723: checking return type of signal handlers" >&5
echo "configure:1725: checking return type of signal handlers" >&5
if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1728 "configure"
#line 1730 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <signal.h>
@ -1741,7 +1743,7 @@ int main() {
int i;
; return 0; }
EOF
if { (eval echo configure:1745: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:1747: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_type_signal=void
else
@ -1760,12 +1762,12 @@ EOF
echo $ac_n "checking for vprintf""... $ac_c" 1>&6
echo "configure:1764: checking for vprintf" >&5
echo "configure:1766: checking for vprintf" >&5
if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1769 "configure"
#line 1771 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char vprintf(); below. */
@ -1788,7 +1790,7 @@ vprintf();
; return 0; }
EOF
if { (eval echo configure:1792: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:1794: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_vprintf=yes"
else
@ -1812,12 +1814,12 @@ fi
if test "$ac_cv_func_vprintf" != yes; then
echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
echo "configure:1816: checking for _doprnt" >&5
echo "configure:1818: checking for _doprnt" >&5
if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1821 "configure"
#line 1823 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char _doprnt(); below. */
@ -1840,7 +1842,7 @@ _doprnt();
; return 0; }
EOF
if { (eval echo configure:1844: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:1846: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func__doprnt=yes"
else
@ -1867,12 +1869,12 @@ fi
for ac_func in gettimeofday socket gethostbyname sigaction
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:1871: checking for $ac_func" >&5
echo "configure:1873: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1876 "configure"
#line 1878 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@ -1895,7 +1897,7 @@ $ac_func();
; return 0; }
EOF
if { (eval echo configure:1899: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:1901: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@ -1923,12 +1925,12 @@ done
for ac_func in usleep
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:1927: checking for $ac_func" >&5
echo "configure:1929: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1932 "configure"
#line 1934 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@ -1951,7 +1953,7 @@ $ac_func();
; return 0; }
EOF
if { (eval echo configure:1955: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:1957: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@ -1979,7 +1981,7 @@ done
if test "$OPENSSL" = "1"; then
echo $ac_n "checking for SSL_CTX_new in -lssl""... $ac_c" 1>&6
echo "configure:1983: checking for SSL_CTX_new in -lssl" >&5
echo "configure:1985: checking for SSL_CTX_new in -lssl" >&5
ac_lib_var=`echo ssl'_'SSL_CTX_new | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@ -1988,7 +1990,7 @@ else
LIBS="-lssl -lcrypto
$LIBS"
cat > conftest.$ac_ext <<EOF
#line 1992 "configure"
#line 1994 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@ -1999,7 +2001,7 @@ int main() {
SSL_CTX_new()
; return 0; }
EOF
if { (eval echo configure:2003: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:2005: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@ -2023,9 +2025,9 @@ fi
fi
echo $ac_n "checking T/TCP""... $ac_c" 1>&6
echo "configure:2027: checking T/TCP" >&5
echo "configure:2029: checking T/TCP" >&5
cat > conftest.$ac_ext <<EOF
#line 2029 "configure"
#line 2031 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/socket.h>
@ -2034,7 +2036,7 @@ int main() {
int foobar = MSG_EOF;
; return 0; }
EOF
if { (eval echo configure:2038: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:2040: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
cat >> confdefs.h <<\EOF
#define TTCP 1
@ -2075,21 +2077,21 @@ fi
echo $ac_n "checking Type Of Service""... $ac_c" 1>&6
echo "configure:2079: checking Type Of Service" >&5
echo "configure:2081: checking Type Of Service" >&5
cat > conftest.$ac_ext <<EOF
#line 2081 "configure"
#line 2083 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
int main() {
int foobar = SO_PRIORITY;
int foobar = IP_TOS;
; return 0; }
EOF
if { (eval echo configure:2090: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:2092: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
cat >> confdefs.h <<\EOF
#define TOS 1
#define HAVE_TOS 1
EOF
ac_have_tos="yes"
@ -2097,7 +2099,7 @@ else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
ac_have_tos=no
ac_have_tos="no"
fi
rm -f conftest*
echo "$ac_t""$ac_have_tos" 1>&6
@ -2126,6 +2128,58 @@ EOF
fi
echo $ac_n "checking Socket priority""... $ac_c" 1>&6
echo "configure:2133: checking Socket priority" >&5
cat > conftest.$ac_ext <<EOF
#line 2135 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/socket.h>
int main() {
int foobar = SO_PRIORITY;
; return 0; }
EOF
if { (eval echo configure:2144: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
cat >> confdefs.h <<\EOF
#define HAVE_SOCKET_PRIORITY 1
EOF
ac_have_priority="yes"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
ac_have_priority="no"
fi
rm -f conftest*
echo "$ac_t""$ac_have_priority" 1>&6
# Check whether --enable-priority or --disable-priority was given.
if test "${enable_priority+set}" = set; then
enableval="$enable_priority"
if test "$enableval" = "yes"; then
if test $ac_have_priority = "yes"; then
cat >> confdefs.h <<\EOF
#define HAVE_SOCKET_PRIORITY 1
EOF
PRIORITY=1
else
echo "configure: warning: No socket priority support on this system, request ignored" 1>&2
fi
fi
else
if test $ac_have_priority = "yes"; then
cat >> confdefs.h <<\EOF
#define HAVE_SOCKET_PRIORITY 1
EOF
PRIORITY=1
fi
fi
if test "$GCC" = yes; then
CFLAGS="$CFLAGS -Wall"
fi
@ -2503,7 +2557,7 @@ echo "Configuration of echoping:"
echo $ac_n "checking HTTP""... $ac_c" 1>&6
echo "configure:2507: checking HTTP" >&5
echo "configure:2561: checking HTTP" >&5
if eval 'test "$HTTP" = "1"' > /dev/null; then
echo "$ac_t""enabled" 1>&6
else
@ -2512,7 +2566,7 @@ fi
echo $ac_n "checking ICP""... $ac_c" 1>&6
echo "configure:2516: checking ICP" >&5
echo "configure:2570: checking ICP" >&5
if eval 'test "$ICP" = "1"' > /dev/null; then
echo "$ac_t""enabled" 1>&6
else
@ -2521,7 +2575,7 @@ fi
echo $ac_n "checking OPENSSL""... $ac_c" 1>&6
echo "configure:2525: checking OPENSSL" >&5
echo "configure:2579: checking OPENSSL" >&5
if eval 'test "$OPENSSL" = "1"' > /dev/null; then
echo "$ac_t""enabled" 1>&6
else
@ -2530,7 +2584,7 @@ fi
echo $ac_n "checking SMTP""... $ac_c" 1>&6
echo "configure:2534: checking SMTP" >&5
echo "configure:2588: checking SMTP" >&5
if eval 'test "$SMTP" = "1"' > /dev/null; then
echo "$ac_t""enabled" 1>&6
else
@ -2539,7 +2593,7 @@ fi
echo $ac_n "checking TTCP""... $ac_c" 1>&6
echo "configure:2543: checking TTCP" >&5
echo "configure:2597: checking TTCP" >&5
if eval 'test "$TTCP" = "1"' > /dev/null; then
echo "$ac_t""enabled" 1>&6
else
@ -2548,7 +2602,7 @@ fi
echo $ac_n "checking TOS""... $ac_c" 1>&6
echo "configure:2552: checking TOS" >&5
echo "configure:2606: checking TOS" >&5
if eval 'test "$TOS" = "1"' > /dev/null; then
echo "$ac_t""enabled" 1>&6
else
@ -2556,6 +2610,16 @@ else
fi
echo $ac_n "checking PRIORITY""... $ac_c" 1>&6
echo "configure:2615: checking PRIORITY" >&5
if eval 'test "$PRIORITY" = "1"' > /dev/null; then
echo "$ac_t""enabled" 1>&6
else
echo "$ac_t""disabled" 1>&6
fi

@ -102,19 +102,18 @@ AC_ARG_ENABLE(ttcp,
fi)
dnl Type Of Service
dnl Linux only, it seems. Anyone knows a standard way to do so?
AC_MSG_CHECKING([Type Of Service])
AC_TRY_COMPILE(
[#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
],
[int foobar = SO_PRIORITY;],
[AC_DEFINE(TOS)
[int foobar = IP_TOS;],
[AC_DEFINE(HAVE_TOS)
ac_have_tos="yes"],
ac_have_tos=no)
ac_have_tos="no")
AC_MSG_RESULT($ac_have_tos)
AC_ARG_ENABLE(tos,
[--enable-tos TOS (Type Of Service - and socket priority) support],
[--enable-tos TOS (Type Of Service) support],
[if test "$enableval" = "yes"; then
if test $ac_have_tos = "yes"; then
AC_DEFINE(HAVE_TOS)
@ -129,6 +128,34 @@ AC_ARG_ENABLE(tos,
TOS=1
fi)
dnl Socket priority
dnl Linux only, it seems. Anyone knows a standard way to do so?
AC_MSG_CHECKING([Socket priority])
AC_TRY_COMPILE(
[#include <sys/types.h>
#include <sys/socket.h>
],
[int foobar = SO_PRIORITY;],
[AC_DEFINE(HAVE_SOCKET_PRIORITY)
ac_have_priority="yes"],
ac_have_priority="no")
AC_MSG_RESULT($ac_have_priority)
AC_ARG_ENABLE(priority,
[--enable-priority PRIORITY (socket priority) support],
[if test "$enableval" = "yes"; then
if test $ac_have_priority = "yes"; then
AC_DEFINE(HAVE_SOCKET_PRIORITY)
PRIORITY=1
else
AC_MSG_WARN([No socket priority support on this system, request ignored])
fi
fi],
dnl Default: enable it if supported
if test $ac_have_priority = "yes"; then
AC_DEFINE(HAVE_SOCKET_PRIORITY)
PRIORITY=1
fi)
if test "$GCC" = yes; then
CFLAGS="$CFLAGS -Wall"
fi
@ -153,6 +180,8 @@ DISPLAY_SETTING(OPENSSL)
DISPLAY_SETTING(SMTP)
DISPLAY_SETTING(TTCP)
DISPLAY_SETTING(TOS)
DISPLAY_SETTING(PRIORITY)

@ -366,13 +366,22 @@ main (argc, argv)
port_name = DEFAULT_HTTPS_TCP_PORT;
}
#ifndef USE_TOS
if (priority_requested || tos_requested)
if (tos_requested)
{
(void) fprintf (stderr,
"%s: Not compiled with Type Of Service support.\n",
progname);
exit (1);
}
#endif
#ifndef USE_PRIORITY
if (priority_requested)
{
(void) fprintf (stderr,
"%s: Not compiled with socket priority support.\n",
progname);
exit (1);
}
#endif
if (!udp && !ttcp)
{
@ -553,7 +562,7 @@ main (argc, argv)
err_sys ("bind error");
}
}
#ifdef USE_TOS
#ifdef USE_PRIORITY
if (priority_requested)
{
if (verbose)
@ -569,6 +578,8 @@ main (argc, argv)
err_sys ("Failed setting socket priority");
}
}
#endif
#if USE_TOS
if (tos_requested)
{
if (verbose)

@ -62,6 +62,10 @@
#define INADDR_NONE (-1)
#endif
#ifndef SOL_IP
#define SOL_IP (getprotobyname("ip")->p_proto)
#endif
/* These entities should be in errno.h but some systems do not define
them. */
#ifdef DECL_SYS_ERRLIST
@ -81,6 +85,9 @@ extern int sys_nerr;
#ifdef HAVE_TOS
#define USE_TOS 1
#endif
#ifdef HAVE_SOCKET_PRIORITY
#define USE_PRIORITY 1
#endif
#ifndef HEADER_INCLUDED

Loading…
Cancel
Save