configure
上传用户:zm130024
上传日期:2007-01-04
资源大小:432k
文件大小:240k
- fi
- failure="$failure ${_func} (${_arg}): (`cat ${_param}`)"
- else
- cat >> confdefs.h <<EOF
- #define HAVE_PROT_${_ucfunc}_${_arg} ${val}
- EOF
- fi
- #second argument
-
- _arg=2
- _param=conftest.out_param_2
- _func=$func
- _ucfunc=$ucfunc
- unset _nofunc
- for val in "const void *" "__const void *" "const char *"
- do
- cat ${_param} | egrep "^${val}" > /dev/null
- test $? -eq 0 && _nofunc="" && break
- _nofunc=t
- done
- if test "x${_nofunc}" = xt; then
- if test "x$failure" != x; then
- failure="$failure|"
- fi
- failure="$failure ${_func} (${_arg}): (`cat ${_param}`)"
- else
- cat >> confdefs.h <<EOF
- #define HAVE_PROT_${_ucfunc}_${_arg} ${val}
- EOF
- fi
- #third argument
-
- _arg=3
- _param=conftest.out_param_3
- _func=$func
- _ucfunc=$ucfunc
- unset _nofunc
- for val in "size_t" "int"
- do
- cat ${_param} | egrep "^${val}" > /dev/null
- test $? -eq 0 && _nofunc="" && break
- _nofunc=t
- done
- if test "x${_nofunc}" = xt; then
- if test "x$failure" != x; then
- failure="$failure|"
- fi
- failure="$failure ${_func} (${_arg}): (`cat ${_param}`)"
- else
- cat >> confdefs.h <<EOF
- #define HAVE_PROT_${_ucfunc}_${_arg} ${val}
- EOF
- fi
- #fourth argument
-
- _arg=4
- _param=conftest.out_param_4
- _func=$func
- _ucfunc=$ucfunc
- unset _nofunc
- for val in "int" "unsigned int"
- do
- cat ${_param} | egrep "^${val}" > /dev/null
- test $? -eq 0 && _nofunc="" && break
- _nofunc=t
- done
- if test "x${_nofunc}" = xt; then
- if test "x$failure" != x; then
- failure="$failure|"
- fi
- failure="$failure ${_func} (${_arg}): (`cat ${_param}`)"
- else
- cat >> confdefs.h <<EOF
- #define HAVE_PROT_${_ucfunc}_${_arg} ${val}
- EOF
- fi
- #failure
- if test "x$failure" != x; then
- echo "$ac_t""failure" 1>&6
- echo "$failure" | tr '|' 'n'
- failproto=t
- else
- echo "$ac_t""ok" 1>&6
- fi
- rm -f conftest.*
-
- nargs=9
- paramcnt=7
- func=sendto
- ucfunc=SENDTO
- echo $ac_n "checking prototypes for $func""... $ac_c" 1>&6
- echo "configure:5079: checking prototypes for $func" >&5
- unset failure
- cat > conftest.$ac_ext <<EOF
- #include "confdefs.h"
- #include <sys/types.h>
- #include <sys/socket.h>
- #include <sys/uio.h>
- #include <unistd.h>
- EOF
- ${CPP} ${CPPFLAGS} ${CPPFLAG_STDC} conftest.$ac_ext | $AWK "{ if (/[^a-z0-9]${func}[^a-z0-9]/) { s=10 }; if ( s > 0 ) { s -= 1; print; } }" | egrep -v '^#' | tr 'n' ' ' | tr -s '/' | tr ';' 'n' | grep -v "__${func}" | egrep "[^a-z0-9]${func}[^a-z0-9]" | tr -s '[:blank:]' | sed -e 's/extern//' > conftest.out_proto
- cnt=0
- while test $cnt -lt $paramcnt; do
- if test $cnt -eq 0; then
- cat conftest.out_proto | sed -e "s/${func}.*//" | sed -e 's/^[ ]*//' | sed -e 's/[ ]*$//g' > conftest.out_param
- else
- cat conftest.out_proto | sed -e "s/.*${func}//" | sed -e "s/[()]//g" | cut -d, -f $cnt | sed -e 's/^[ ]*//' | sed -e 's/[ ]*$//g' > conftest.out_param
- fi
- cat conftest.out_param | tr -s '[:blank:]' > conftest.out_nospace
- if test -s conftest.out_nospace; then
- cp -f conftest.out_param conftest.out_param_${cnt}
- else
- echo "not found" > conftest.out_param_${cnt}
- echo "warning: found no argument"
- fi
- #XXX avoid subshell
- case $cnt in
- 0) cnt=1;;
- 1) cnt=2;;
- 2) cnt=3;;
- 3) cnt=4;;
- 4) cnt=5;;
- 5) cnt=6;;
- 6) cnt=7;;
- 7) cnt=8;;
- 8) cnt=9;;
- 9) cnt=10;;
- 10) cnt=11;;
- esac
- done
- #return value
-
- _arg=0
- _param=conftest.out_param_0
- _func=$func
- _ucfunc=$ucfunc
- unset _nofunc
- for val in "ssize_t" "int"
- do
- cat ${_param} | egrep "^${val}" > /dev/null
- test $? -eq 0 && _nofunc="" && break
- _nofunc=t
- done
- if test "x${_nofunc}" = xt; then
- if test "x$failure" != x; then
- failure="$failure|"
- fi
- failure="$failure ${_func} (${_arg}): (`cat ${_param}`)"
- else
- cat >> confdefs.h <<EOF
- #define HAVE_PROT_${_ucfunc}_${_arg} ${val}
- EOF
- fi
- #first argument
-
- _arg=1
- _param=conftest.out_param_1
- _func=$func
- _ucfunc=$ucfunc
- unset _nofunc
- for val in "int"
- do
- cat ${_param} | egrep "^${val}" > /dev/null
- test $? -eq 0 && _nofunc="" && break
- _nofunc=t
- done
- if test "x${_nofunc}" = xt; then
- if test "x$failure" != x; then
- failure="$failure|"
- fi
- failure="$failure ${_func} (${_arg}): (`cat ${_param}`)"
- else
- cat >> confdefs.h <<EOF
- #define HAVE_PROT_${_ucfunc}_${_arg} ${val}
- EOF
- fi
- #second argument
-
- _arg=2
- _param=conftest.out_param_2
- _func=$func
- _ucfunc=$ucfunc
- unset _nofunc
- for val in "const void *" "__const void *" "const char *"
- do
- cat ${_param} | egrep "^${val}" > /dev/null
- test $? -eq 0 && _nofunc="" && break
- _nofunc=t
- done
- if test "x${_nofunc}" = xt; then
- if test "x$failure" != x; then
- failure="$failure|"
- fi
- failure="$failure ${_func} (${_arg}): (`cat ${_param}`)"
- else
- cat >> confdefs.h <<EOF
- #define HAVE_PROT_${_ucfunc}_${_arg} ${val}
- EOF
- fi
- #third argument
-
- _arg=3
- _param=conftest.out_param_3
- _func=$func
- _ucfunc=$ucfunc
- unset _nofunc
- for val in "size_t" "int"
- do
- cat ${_param} | egrep "^${val}" > /dev/null
- test $? -eq 0 && _nofunc="" && break
- _nofunc=t
- done
- if test "x${_nofunc}" = xt; then
- if test "x$failure" != x; then
- failure="$failure|"
- fi
- failure="$failure ${_func} (${_arg}): (`cat ${_param}`)"
- else
- cat >> confdefs.h <<EOF
- #define HAVE_PROT_${_ucfunc}_${_arg} ${val}
- EOF
- fi
- #fourth argument
-
- _arg=4
- _param=conftest.out_param_4
- _func=$func
- _ucfunc=$ucfunc
- unset _nofunc
- for val in "int" "unsigned int"
- do
- cat ${_param} | egrep "^${val}" > /dev/null
- test $? -eq 0 && _nofunc="" && break
- _nofunc=t
- done
- if test "x${_nofunc}" = xt; then
- if test "x$failure" != x; then
- failure="$failure|"
- fi
- failure="$failure ${_func} (${_arg}): (`cat ${_param}`)"
- else
- cat >> confdefs.h <<EOF
- #define HAVE_PROT_${_ucfunc}_${_arg} ${val}
- EOF
- fi
- #fifth argument
-
- _arg=5
- _param=conftest.out_param_5
- _func=$func
- _ucfunc=$ucfunc
- unset _nofunc
- for val in "const struct sockaddr *" "__CONST_SOCKADDR_ARG" "const void *" "__const struct sockaddr *"
- do
- cat ${_param} | egrep "^${val}" > /dev/null
- test $? -eq 0 && _nofunc="" && break
- _nofunc=t
- done
- if test "x${_nofunc}" = xt; then
- if test "x$failure" != x; then
- failure="$failure|"
- fi
- failure="$failure ${_func} (${_arg}): (`cat ${_param}`)"
- else
- cat >> confdefs.h <<EOF
- #define HAVE_PROT_${_ucfunc}_${_arg} ${val}
- EOF
- fi
- #sixth argument
-
- _arg=6
- _param=conftest.out_param_6
- _func=$func
- _ucfunc=$ucfunc
- unset _nofunc
- for val in "socklen_t" "int" "size_t"
- do
- cat ${_param} | egrep "^${val}" > /dev/null
- test $? -eq 0 && _nofunc="" && break
- _nofunc=t
- done
- if test "x${_nofunc}" = xt; then
- if test "x$failure" != x; then
- failure="$failure|"
- fi
- failure="$failure ${_func} (${_arg}): (`cat ${_param}`)"
- else
- cat >> confdefs.h <<EOF
- #define HAVE_PROT_${_ucfunc}_${_arg} ${val}
- EOF
- fi
- #failure
- if test "x$failure" != x; then
- echo "$ac_t""failure" 1>&6
- echo "$failure" | tr '|' 'n'
- failproto=t
- else
- echo "$ac_t""ok" 1>&6
- fi
- rm -f conftest.*
-
- nargs=7
- paramcnt=5
- func=recv
- ucfunc=RECV
- echo $ac_n "checking prototypes for $func""... $ac_c" 1>&6
- echo "configure:5341: checking prototypes for $func" >&5
- unset failure
- cat > conftest.$ac_ext <<EOF
- #include "confdefs.h"
- #include <sys/types.h>
- #include <sys/socket.h>
- #include <sys/uio.h>
- #include <unistd.h>
- EOF
- ${CPP} ${CPPFLAGS} ${CPPFLAG_STDC} conftest.$ac_ext | $AWK "{ if (/[^a-z0-9]${func}[^a-z0-9]/) { s=10 }; if ( s > 0 ) { s -= 1; print; } }" | egrep -v '^#' | tr 'n' ' ' | tr -s '/' | tr ';' 'n' | grep -v "__${func}" | egrep "[^a-z0-9]${func}[^a-z0-9]" | tr -s '[:blank:]' | sed -e 's/extern//' > conftest.out_proto
- cnt=0
- while test $cnt -lt $paramcnt; do
- if test $cnt -eq 0; then
- cat conftest.out_proto | sed -e "s/${func}.*//" | sed -e 's/^[ ]*//' | sed -e 's/[ ]*$//g' > conftest.out_param
- else
- cat conftest.out_proto | sed -e "s/.*${func}//" | sed -e "s/[()]//g" | cut -d, -f $cnt | sed -e 's/^[ ]*//' | sed -e 's/[ ]*$//g' > conftest.out_param
- fi
- cat conftest.out_param | tr -s '[:blank:]' > conftest.out_nospace
- if test -s conftest.out_nospace; then
- cp -f conftest.out_param conftest.out_param_${cnt}
- else
- echo "not found" > conftest.out_param_${cnt}
- echo "warning: found no argument"
- fi
- #XXX avoid subshell
- case $cnt in
- 0) cnt=1;;
- 1) cnt=2;;
- 2) cnt=3;;
- 3) cnt=4;;
- 4) cnt=5;;
- 5) cnt=6;;
- 6) cnt=7;;
- 7) cnt=8;;
- 8) cnt=9;;
- 9) cnt=10;;
- 10) cnt=11;;
- esac
- done
- #return value
-
- _arg=0
- _param=conftest.out_param_0
- _func=$func
- _ucfunc=$ucfunc
- unset _nofunc
- for val in "ssize_t" "int"
- do
- cat ${_param} | egrep "^${val}" > /dev/null
- test $? -eq 0 && _nofunc="" && break
- _nofunc=t
- done
- if test "x${_nofunc}" = xt; then
- if test "x$failure" != x; then
- failure="$failure|"
- fi
- failure="$failure ${_func} (${_arg}): (`cat ${_param}`)"
- else
- cat >> confdefs.h <<EOF
- #define HAVE_PROT_${_ucfunc}_${_arg} ${val}
- EOF
- fi
- #first argument
-
- _arg=1
- _param=conftest.out_param_1
- _func=$func
- _ucfunc=$ucfunc
- unset _nofunc
- for val in "int"
- do
- cat ${_param} | egrep "^${val}" > /dev/null
- test $? -eq 0 && _nofunc="" && break
- _nofunc=t
- done
- if test "x${_nofunc}" = xt; then
- if test "x$failure" != x; then
- failure="$failure|"
- fi
- failure="$failure ${_func} (${_arg}): (`cat ${_param}`)"
- else
- cat >> confdefs.h <<EOF
- #define HAVE_PROT_${_ucfunc}_${_arg} ${val}
- EOF
- fi
- #second argument
-
- _arg=2
- _param=conftest.out_param_2
- _func=$func
- _ucfunc=$ucfunc
- unset _nofunc
- for val in "void *" "char *"
- do
- cat ${_param} | egrep "^${val}" > /dev/null
- test $? -eq 0 && _nofunc="" && break
- _nofunc=t
- done
- if test "x${_nofunc}" = xt; then
- if test "x$failure" != x; then
- failure="$failure|"
- fi
- failure="$failure ${_func} (${_arg}): (`cat ${_param}`)"
- else
- cat >> confdefs.h <<EOF
- #define HAVE_PROT_${_ucfunc}_${_arg} ${val}
- EOF
- fi
- #third argument
-
- _arg=3
- _param=conftest.out_param_3
- _func=$func
- _ucfunc=$ucfunc
- unset _nofunc
- for val in "size_t" "int"
- do
- cat ${_param} | egrep "^${val}" > /dev/null
- test $? -eq 0 && _nofunc="" && break
- _nofunc=t
- done
- if test "x${_nofunc}" = xt; then
- if test "x$failure" != x; then
- failure="$failure|"
- fi
- failure="$failure ${_func} (${_arg}): (`cat ${_param}`)"
- else
- cat >> confdefs.h <<EOF
- #define HAVE_PROT_${_ucfunc}_${_arg} ${val}
- EOF
- fi
- #fourth argument
-
- _arg=4
- _param=conftest.out_param_4
- _func=$func
- _ucfunc=$ucfunc
- unset _nofunc
- for val in "int" "unsigned int"
- do
- cat ${_param} | egrep "^${val}" > /dev/null
- test $? -eq 0 && _nofunc="" && break
- _nofunc=t
- done
- if test "x${_nofunc}" = xt; then
- if test "x$failure" != x; then
- failure="$failure|"
- fi
- failure="$failure ${_func} (${_arg}): (`cat ${_param}`)"
- else
- cat >> confdefs.h <<EOF
- #define HAVE_PROT_${_ucfunc}_${_arg} ${val}
- EOF
- fi
- #failure
- if test "x$failure" != x; then
- echo "$ac_t""failure" 1>&6
- echo "$failure" | tr '|' 'n'
- failproto=t
- else
- echo "$ac_t""ok" 1>&6
- fi
- rm -f conftest.*
-
- nargs=6
- paramcnt=4
- func=readv
- ucfunc=READV
- echo $ac_n "checking prototypes for $func""... $ac_c" 1>&6
- echo "configure:5551: checking prototypes for $func" >&5
- unset failure
- cat > conftest.$ac_ext <<EOF
- #include "confdefs.h"
- #include <sys/types.h>
- #include <sys/socket.h>
- #include <sys/uio.h>
- #include <unistd.h>
- EOF
- ${CPP} ${CPPFLAGS} ${CPPFLAG_STDC} conftest.$ac_ext | $AWK "{ if (/[^a-z0-9]${func}[^a-z0-9]/) { s=10 }; if ( s > 0 ) { s -= 1; print; } }" | egrep -v '^#' | tr 'n' ' ' | tr -s '/' | tr ';' 'n' | grep -v "__${func}" | egrep "[^a-z0-9]${func}[^a-z0-9]" | tr -s '[:blank:]' | sed -e 's/extern//' > conftest.out_proto
- cnt=0
- while test $cnt -lt $paramcnt; do
- if test $cnt -eq 0; then
- cat conftest.out_proto | sed -e "s/${func}.*//" | sed -e 's/^[ ]*//' | sed -e 's/[ ]*$//g' > conftest.out_param
- else
- cat conftest.out_proto | sed -e "s/.*${func}//" | sed -e "s/[()]//g" | cut -d, -f $cnt | sed -e 's/^[ ]*//' | sed -e 's/[ ]*$//g' > conftest.out_param
- fi
- cat conftest.out_param | tr -s '[:blank:]' > conftest.out_nospace
- if test -s conftest.out_nospace; then
- cp -f conftest.out_param conftest.out_param_${cnt}
- else
- echo "not found" > conftest.out_param_${cnt}
- echo "warning: found no argument"
- fi
- #XXX avoid subshell
- case $cnt in
- 0) cnt=1;;
- 1) cnt=2;;
- 2) cnt=3;;
- 3) cnt=4;;
- 4) cnt=5;;
- 5) cnt=6;;
- 6) cnt=7;;
- 7) cnt=8;;
- 8) cnt=9;;
- 9) cnt=10;;
- 10) cnt=11;;
- esac
- done
- #return value
-
- _arg=0
- _param=conftest.out_param_0
- _func=$func
- _ucfunc=$ucfunc
- unset _nofunc
- for val in "ssize_t" "int"
- do
- cat ${_param} | egrep "^${val}" > /dev/null
- test $? -eq 0 && _nofunc="" && break
- _nofunc=t
- done
- if test "x${_nofunc}" = xt; then
- if test "x$failure" != x; then
- failure="$failure|"
- fi
- failure="$failure ${_func} (${_arg}): (`cat ${_param}`)"
- else
- cat >> confdefs.h <<EOF
- #define HAVE_PROT_${_ucfunc}_${_arg} ${val}
- EOF
- fi
- #first argument
-
- _arg=1
- _param=conftest.out_param_1
- _func=$func
- _ucfunc=$ucfunc
- unset _nofunc
- for val in "int"
- do
- cat ${_param} | egrep "^${val}" > /dev/null
- test $? -eq 0 && _nofunc="" && break
- _nofunc=t
- done
- if test "x${_nofunc}" = xt; then
- if test "x$failure" != x; then
- failure="$failure|"
- fi
- failure="$failure ${_func} (${_arg}): (`cat ${_param}`)"
- else
- cat >> confdefs.h <<EOF
- #define HAVE_PROT_${_ucfunc}_${_arg} ${val}
- EOF
- fi
- #second argument
-
- _arg=2
- _param=conftest.out_param_2
- _func=$func
- _ucfunc=$ucfunc
- unset _nofunc
- for val in "const struct iovec *" "__const struct iovec *" "struct iovec *"
- do
- cat ${_param} | egrep "^${val}" > /dev/null
- test $? -eq 0 && _nofunc="" && break
- _nofunc=t
- done
- if test "x${_nofunc}" = xt; then
- if test "x$failure" != x; then
- failure="$failure|"
- fi
- failure="$failure ${_func} (${_arg}): (`cat ${_param}`)"
- else
- cat >> confdefs.h <<EOF
- #define HAVE_PROT_${_ucfunc}_${_arg} ${val}
- EOF
- fi
- #third argument
-
- _arg=3
- _param=conftest.out_param_3
- _func=$func
- _ucfunc=$ucfunc
- unset _nofunc
- for val in "int" "size_t"
- do
- cat ${_param} | egrep "^${val}" > /dev/null
- test $? -eq 0 && _nofunc="" && break
- _nofunc=t
- done
- if test "x${_nofunc}" = xt; then
- if test "x$failure" != x; then
- failure="$failure|"
- fi
- failure="$failure ${_func} (${_arg}): (`cat ${_param}`)"
- else
- cat >> confdefs.h <<EOF
- #define HAVE_PROT_${_ucfunc}_${_arg} ${val}
- EOF
- fi
- #failure
- if test "x$failure" != x; then
- echo "$ac_t""failure" 1>&6
- echo "$failure" | tr '|' 'n'
- failproto=t
- else
- echo "$ac_t""ok" 1>&6
- fi
- rm -f conftest.*
-
- nargs=6
- paramcnt=4
- func=recvmsg
- ucfunc=RECVMSG
- echo $ac_n "checking prototypes for $func""... $ac_c" 1>&6
- echo "configure:5735: checking prototypes for $func" >&5
- unset failure
- cat > conftest.$ac_ext <<EOF
- #include "confdefs.h"
- #include <sys/types.h>
- #include <sys/socket.h>
- #include <sys/uio.h>
- #include <unistd.h>
- EOF
- ${CPP} ${CPPFLAGS} ${CPPFLAG_STDC} conftest.$ac_ext | $AWK "{ if (/[^a-z0-9]${func}[^a-z0-9]/) { s=10 }; if ( s > 0 ) { s -= 1; print; } }" | egrep -v '^#' | tr 'n' ' ' | tr -s '/' | tr ';' 'n' | grep -v "__${func}" | egrep "[^a-z0-9]${func}[^a-z0-9]" | tr -s '[:blank:]' | sed -e 's/extern//' > conftest.out_proto
- cnt=0
- while test $cnt -lt $paramcnt; do
- if test $cnt -eq 0; then
- cat conftest.out_proto | sed -e "s/${func}.*//" | sed -e 's/^[ ]*//' | sed -e 's/[ ]*$//g' > conftest.out_param
- else
- cat conftest.out_proto | sed -e "s/.*${func}//" | sed -e "s/[()]//g" | cut -d, -f $cnt | sed -e 's/^[ ]*//' | sed -e 's/[ ]*$//g' > conftest.out_param
- fi
- cat conftest.out_param | tr -s '[:blank:]' > conftest.out_nospace
- if test -s conftest.out_nospace; then
- cp -f conftest.out_param conftest.out_param_${cnt}
- else
- echo "not found" > conftest.out_param_${cnt}
- echo "warning: found no argument"
- fi
- #XXX avoid subshell
- case $cnt in
- 0) cnt=1;;
- 1) cnt=2;;
- 2) cnt=3;;
- 3) cnt=4;;
- 4) cnt=5;;
- 5) cnt=6;;
- 6) cnt=7;;
- 7) cnt=8;;
- 8) cnt=9;;
- 9) cnt=10;;
- 10) cnt=11;;
- esac
- done
- #return value
-
- _arg=0
- _param=conftest.out_param_0
- _func=$func
- _ucfunc=$ucfunc
- unset _nofunc
- for val in "ssize_t" "int"
- do
- cat ${_param} | egrep "^${val}" > /dev/null
- test $? -eq 0 && _nofunc="" && break
- _nofunc=t
- done
- if test "x${_nofunc}" = xt; then
- if test "x$failure" != x; then
- failure="$failure|"
- fi
- failure="$failure ${_func} (${_arg}): (`cat ${_param}`)"
- else
- cat >> confdefs.h <<EOF
- #define HAVE_PROT_${_ucfunc}_${_arg} ${val}
- EOF
- fi
- #first argument
-
- _arg=1
- _param=conftest.out_param_1
- _func=$func
- _ucfunc=$ucfunc
- unset _nofunc
- for val in "int"
- do
- cat ${_param} | egrep "^${val}" > /dev/null
- test $? -eq 0 && _nofunc="" && break
- _nofunc=t
- done
- if test "x${_nofunc}" = xt; then
- if test "x$failure" != x; then
- failure="$failure|"
- fi
- failure="$failure ${_func} (${_arg}): (`cat ${_param}`)"
- else
- cat >> confdefs.h <<EOF
- #define HAVE_PROT_${_ucfunc}_${_arg} ${val}
- EOF
- fi
- #second argument
-
- _arg=2
- _param=conftest.out_param_2
- _func=$func
- _ucfunc=$ucfunc
- unset _nofunc
- for val in "struct msghdr *"
- do
- cat ${_param} | egrep "^${val}" > /dev/null
- test $? -eq 0 && _nofunc="" && break
- _nofunc=t
- done
- if test "x${_nofunc}" = xt; then
- if test "x$failure" != x; then
- failure="$failure|"
- fi
- failure="$failure ${_func} (${_arg}): (`cat ${_param}`)"
- else
- cat >> confdefs.h <<EOF
- #define HAVE_PROT_${_ucfunc}_${_arg} ${val}
- EOF
- fi
- #third argument
-
- _arg=3
- _param=conftest.out_param_3
- _func=$func
- _ucfunc=$ucfunc
- unset _nofunc
- for val in "int" "unsigned int"
- do
- cat ${_param} | egrep "^${val}" > /dev/null
- test $? -eq 0 && _nofunc="" && break
- _nofunc=t
- done
- if test "x${_nofunc}" = xt; then
- if test "x$failure" != x; then
- failure="$failure|"
- fi
- failure="$failure ${_func} (${_arg}): (`cat ${_param}`)"
- else
- cat >> confdefs.h <<EOF
- #define HAVE_PROT_${_ucfunc}_${_arg} ${val}
- EOF
- fi
- #failure
- if test "x$failure" != x; then
- echo "$ac_t""failure" 1>&6
- echo "$failure" | tr '|' 'n'
- failproto=t
- else
- echo "$ac_t""ok" 1>&6
- fi
- rm -f conftest.*
-
- nargs=6
- paramcnt=4
- func=writev
- ucfunc=WRITEV
- echo $ac_n "checking prototypes for $func""... $ac_c" 1>&6
- echo "configure:5919: checking prototypes for $func" >&5
- unset failure
- cat > conftest.$ac_ext <<EOF
- #include "confdefs.h"
- #include <sys/types.h>
- #include <sys/socket.h>
- #include <sys/uio.h>
- #include <unistd.h>
- EOF
- ${CPP} ${CPPFLAGS} ${CPPFLAG_STDC} conftest.$ac_ext | $AWK "{ if (/[^a-z0-9]${func}[^a-z0-9]/) { s=10 }; if ( s > 0 ) { s -= 1; print; } }" | egrep -v '^#' | tr 'n' ' ' | tr -s '/' | tr ';' 'n' | grep -v "__${func}" | egrep "[^a-z0-9]${func}[^a-z0-9]" | tr -s '[:blank:]' | sed -e 's/extern//' > conftest.out_proto
- cnt=0
- while test $cnt -lt $paramcnt; do
- if test $cnt -eq 0; then
- cat conftest.out_proto | sed -e "s/${func}.*//" | sed -e 's/^[ ]*//' | sed -e 's/[ ]*$//g' > conftest.out_param
- else
- cat conftest.out_proto | sed -e "s/.*${func}//" | sed -e "s/[()]//g" | cut -d, -f $cnt | sed -e 's/^[ ]*//' | sed -e 's/[ ]*$//g' > conftest.out_param
- fi
- cat conftest.out_param | tr -s '[:blank:]' > conftest.out_nospace
- if test -s conftest.out_nospace; then
- cp -f conftest.out_param conftest.out_param_${cnt}
- else
- echo "not found" > conftest.out_param_${cnt}
- echo "warning: found no argument"
- fi
- #XXX avoid subshell
- case $cnt in
- 0) cnt=1;;
- 1) cnt=2;;
- 2) cnt=3;;
- 3) cnt=4;;
- 4) cnt=5;;
- 5) cnt=6;;
- 6) cnt=7;;
- 7) cnt=8;;
- 8) cnt=9;;
- 9) cnt=10;;
- 10) cnt=11;;
- esac
- done
- #return value
-
- _arg=0
- _param=conftest.out_param_0
- _func=$func
- _ucfunc=$ucfunc
- unset _nofunc
- for val in "ssize_t" "int"
- do
- cat ${_param} | egrep "^${val}" > /dev/null
- test $? -eq 0 && _nofunc="" && break
- _nofunc=t
- done
- if test "x${_nofunc}" = xt; then
- if test "x$failure" != x; then
- failure="$failure|"
- fi
- failure="$failure ${_func} (${_arg}): (`cat ${_param}`)"
- else
- cat >> confdefs.h <<EOF
- #define HAVE_PROT_${_ucfunc}_${_arg} ${val}
- EOF
- fi
- #first argument
-
- _arg=1
- _param=conftest.out_param_1
- _func=$func
- _ucfunc=$ucfunc
- unset _nofunc
- for val in "int"
- do
- cat ${_param} | egrep "^${val}" > /dev/null
- test $? -eq 0 && _nofunc="" && break
- _nofunc=t
- done
- if test "x${_nofunc}" = xt; then
- if test "x$failure" != x; then
- failure="$failure|"
- fi
- failure="$failure ${_func} (${_arg}): (`cat ${_param}`)"
- else
- cat >> confdefs.h <<EOF
- #define HAVE_PROT_${_ucfunc}_${_arg} ${val}
- EOF
- fi
- #second argument
-
- _arg=2
- _param=conftest.out_param_2
- _func=$func
- _ucfunc=$ucfunc
- unset _nofunc
- for val in "const struct iovec *" "__const struct iovec *"
- do
- cat ${_param} | egrep "^${val}" > /dev/null
- test $? -eq 0 && _nofunc="" && break
- _nofunc=t
- done
- if test "x${_nofunc}" = xt; then
- if test "x$failure" != x; then
- failure="$failure|"
- fi
- failure="$failure ${_func} (${_arg}): (`cat ${_param}`)"
- else
- cat >> confdefs.h <<EOF
- #define HAVE_PROT_${_ucfunc}_${_arg} ${val}
- EOF
- fi
- #third argument
-
- _arg=3
- _param=conftest.out_param_3
- _func=$func
- _ucfunc=$ucfunc
- unset _nofunc
- for val in "int" "size_t"
- do
- cat ${_param} | egrep "^${val}" > /dev/null
- test $? -eq 0 && _nofunc="" && break
- _nofunc=t
- done
- if test "x${_nofunc}" = xt; then
- if test "x$failure" != x; then
- failure="$failure|"
- fi
- failure="$failure ${_func} (${_arg}): (`cat ${_param}`)"
- else
- cat >> confdefs.h <<EOF
- #define HAVE_PROT_${_ucfunc}_${_arg} ${val}
- EOF
- fi
- #failure
- if test "x$failure" != x; then
- echo "$ac_t""failure" 1>&6
- echo "$failure" | tr '|' 'n'
- failproto=t
- else
- echo "$ac_t""ok" 1>&6
- fi
- rm -f conftest.*
-
- nargs=6
- paramcnt=4
- func=sendmsg
- ucfunc=SENDMSG
- echo $ac_n "checking prototypes for $func""... $ac_c" 1>&6
- echo "configure:6103: checking prototypes for $func" >&5
- unset failure
- cat > conftest.$ac_ext <<EOF
- #include "confdefs.h"
- #include <sys/types.h>
- #include <sys/socket.h>
- #include <sys/uio.h>
- #include <unistd.h>
- EOF
- ${CPP} ${CPPFLAGS} ${CPPFLAG_STDC} conftest.$ac_ext | $AWK "{ if (/[^a-z0-9]${func}[^a-z0-9]/) { s=10 }; if ( s > 0 ) { s -= 1; print; } }" | egrep -v '^#' | tr 'n' ' ' | tr -s '/' | tr ';' 'n' | grep -v "__${func}" | egrep "[^a-z0-9]${func}[^a-z0-9]" | tr -s '[:blank:]' | sed -e 's/extern//' > conftest.out_proto
- cnt=0
- while test $cnt -lt $paramcnt; do
- if test $cnt -eq 0; then
- cat conftest.out_proto | sed -e "s/${func}.*//" | sed -e 's/^[ ]*//' | sed -e 's/[ ]*$//g' > conftest.out_param
- else
- cat conftest.out_proto | sed -e "s/.*${func}//" | sed -e "s/[()]//g" | cut -d, -f $cnt | sed -e 's/^[ ]*//' | sed -e 's/[ ]*$//g' > conftest.out_param
- fi
- cat conftest.out_param | tr -s '[:blank:]' > conftest.out_nospace
- if test -s conftest.out_nospace; then
- cp -f conftest.out_param conftest.out_param_${cnt}
- else
- echo "not found" > conftest.out_param_${cnt}
- echo "warning: found no argument"
- fi
- #XXX avoid subshell
- case $cnt in
- 0) cnt=1;;
- 1) cnt=2;;
- 2) cnt=3;;
- 3) cnt=4;;
- 4) cnt=5;;
- 5) cnt=6;;
- 6) cnt=7;;
- 7) cnt=8;;
- 8) cnt=9;;
- 9) cnt=10;;
- 10) cnt=11;;
- esac
- done
- #return value
-
- _arg=0
- _param=conftest.out_param_0
- _func=$func
- _ucfunc=$ucfunc
- unset _nofunc
- for val in "ssize_t" "int"
- do
- cat ${_param} | egrep "^${val}" > /dev/null
- test $? -eq 0 && _nofunc="" && break
- _nofunc=t
- done
- if test "x${_nofunc}" = xt; then
- if test "x$failure" != x; then
- failure="$failure|"
- fi
- failure="$failure ${_func} (${_arg}): (`cat ${_param}`)"
- else
- cat >> confdefs.h <<EOF
- #define HAVE_PROT_${_ucfunc}_${_arg} ${val}
- EOF
- fi
- #first argument
-
- _arg=1
- _param=conftest.out_param_1
- _func=$func
- _ucfunc=$ucfunc
- unset _nofunc
- for val in "int"
- do
- cat ${_param} | egrep "^${val}" > /dev/null
- test $? -eq 0 && _nofunc="" && break
- _nofunc=t
- done
- if test "x${_nofunc}" = xt; then
- if test "x$failure" != x; then
- failure="$failure|"
- fi
- failure="$failure ${_func} (${_arg}): (`cat ${_param}`)"
- else
- cat >> confdefs.h <<EOF
- #define HAVE_PROT_${_ucfunc}_${_arg} ${val}
- EOF
- fi
- #second argument
-
- _arg=2
- _param=conftest.out_param_2
- _func=$func
- _ucfunc=$ucfunc
- unset _nofunc
- for val in "const struct msghdr *" "__const struct msghdr *"
- do
- cat ${_param} | egrep "^${val}" > /dev/null
- test $? -eq 0 && _nofunc="" && break
- _nofunc=t
- done
- if test "x${_nofunc}" = xt; then
- if test "x$failure" != x; then
- failure="$failure|"
- fi
- failure="$failure ${_func} (${_arg}): (`cat ${_param}`)"
- else
- cat >> confdefs.h <<EOF
- #define HAVE_PROT_${_ucfunc}_${_arg} ${val}
- EOF
- fi
- #third argument
-
- _arg=3
- _param=conftest.out_param_3
- _func=$func
- _ucfunc=$ucfunc
- unset _nofunc
- for val in "int" "unsigned int"
- do
- cat ${_param} | egrep "^${val}" > /dev/null
- test $? -eq 0 && _nofunc="" && break
- _nofunc=t
- done
- if test "x${_nofunc}" = xt; then
- if test "x$failure" != x; then
- failure="$failure|"
- fi
- failure="$failure ${_func} (${_arg}): (`cat ${_param}`)"
- else
- cat >> confdefs.h <<EOF
- #define HAVE_PROT_${_ucfunc}_${_arg} ${val}
- EOF
- fi
- #failure
- if test "x$failure" != x; then
- echo "$ac_t""failure" 1>&6
- echo "$failure" | tr '|' 'n'
- failproto=t
- else
- echo "$ac_t""ok" 1>&6
- fi
- rm -f conftest.*
-
- nargs=6
- paramcnt=4
- func=write
- ucfunc=WRITE
- echo $ac_n "checking prototypes for $func""... $ac_c" 1>&6
- echo "configure:6287: checking prototypes for $func" >&5
- unset failure
- cat > conftest.$ac_ext <<EOF
- #include "confdefs.h"
- #include <sys/types.h>
- #include <sys/socket.h>
- #include <sys/uio.h>
- #include <unistd.h>
- EOF
- ${CPP} ${CPPFLAGS} ${CPPFLAG_STDC} conftest.$ac_ext | $AWK "{ if (/[^a-z0-9]${func}[^a-z0-9]/) { s=10 }; if ( s > 0 ) { s -= 1; print; } }" | egrep -v '^#' | tr 'n' ' ' | tr -s '/' | tr ';' 'n' | grep -v "__${func}" | egrep "[^a-z0-9]${func}[^a-z0-9]" | tr -s '[:blank:]' | sed -e 's/extern//' > conftest.out_proto
- cnt=0
- while test $cnt -lt $paramcnt; do
- if test $cnt -eq 0; then
- cat conftest.out_proto | sed -e "s/${func}.*//" | sed -e 's/^[ ]*//' | sed -e 's/[ ]*$//g' > conftest.out_param
- else
- cat conftest.out_proto | sed -e "s/.*${func}//" | sed -e "s/[()]//g" | cut -d, -f $cnt | sed -e 's/^[ ]*//' | sed -e 's/[ ]*$//g' > conftest.out_param
- fi
- cat conftest.out_param | tr -s '[:blank:]' > conftest.out_nospace
- if test -s conftest.out_nospace; then
- cp -f conftest.out_param conftest.out_param_${cnt}
- else
- echo "not found" > conftest.out_param_${cnt}
- echo "warning: found no argument"
- fi
- #XXX avoid subshell
- case $cnt in
- 0) cnt=1;;
- 1) cnt=2;;
- 2) cnt=3;;
- 3) cnt=4;;
- 4) cnt=5;;
- 5) cnt=6;;
- 6) cnt=7;;
- 7) cnt=8;;
- 8) cnt=9;;
- 9) cnt=10;;
- 10) cnt=11;;
- esac
- done
- #return value
-
- _arg=0
- _param=conftest.out_param_0
- _func=$func
- _ucfunc=$ucfunc
- unset _nofunc
- for val in "ssize_t"
- do
- cat ${_param} | egrep "^${val}" > /dev/null
- test $? -eq 0 && _nofunc="" && break
- _nofunc=t
- done
- if test "x${_nofunc}" = xt; then
- if test "x$failure" != x; then
- failure="$failure|"
- fi
- failure="$failure ${_func} (${_arg}): (`cat ${_param}`)"
- else
- cat >> confdefs.h <<EOF
- #define HAVE_PROT_${_ucfunc}_${_arg} ${val}
- EOF
- fi
- #first argument
-
- _arg=1
- _param=conftest.out_param_1
- _func=$func
- _ucfunc=$ucfunc
- unset _nofunc
- for val in "int"
- do
- cat ${_param} | egrep "^${val}" > /dev/null
- test $? -eq 0 && _nofunc="" && break
- _nofunc=t
- done
- if test "x${_nofunc}" = xt; then
- if test "x$failure" != x; then
- failure="$failure|"
- fi
- failure="$failure ${_func} (${_arg}): (`cat ${_param}`)"
- else
- cat >> confdefs.h <<EOF
- #define HAVE_PROT_${_ucfunc}_${_arg} ${val}
- EOF
- fi
- #second argument
-
- _arg=2
- _param=conftest.out_param_2
- _func=$func
- _ucfunc=$ucfunc
- unset _nofunc
- for val in "const void *" "__const void *"
- do
- cat ${_param} | egrep "^${val}" > /dev/null
- test $? -eq 0 && _nofunc="" && break
- _nofunc=t
- done
- if test "x${_nofunc}" = xt; then
- if test "x$failure" != x; then
- failure="$failure|"
- fi
- failure="$failure ${_func} (${_arg}): (`cat ${_param}`)"
- else
- cat >> confdefs.h <<EOF
- #define HAVE_PROT_${_ucfunc}_${_arg} ${val}
- EOF
- fi
- #third argument
-
- _arg=3
- _param=conftest.out_param_3
- _func=$func
- _ucfunc=$ucfunc
- unset _nofunc
- for val in "size_t" "unsigned"
- do
- cat ${_param} | egrep "^${val}" > /dev/null
- test $? -eq 0 && _nofunc="" && break
- _nofunc=t
- done
- if test "x${_nofunc}" = xt; then
- if test "x$failure" != x; then
- failure="$failure|"
- fi
- failure="$failure ${_func} (${_arg}): (`cat ${_param}`)"
- else
- cat >> confdefs.h <<EOF
- #define HAVE_PROT_${_ucfunc}_${_arg} ${val}
- EOF
- fi
- #failure
- if test "x$failure" != x; then
- echo "$ac_t""failure" 1>&6
- echo "$failure" | tr '|' 'n'
- failproto=t
- else
- echo "$ac_t""ok" 1>&6
- fi
- rm -f conftest.*
-
- nargs=6
- paramcnt=4
- func=read
- ucfunc=READ
- echo $ac_n "checking prototypes for $func""... $ac_c" 1>&6
- echo "configure:6471: checking prototypes for $func" >&5
- unset failure
- cat > conftest.$ac_ext <<EOF
- #include "confdefs.h"
- #include <sys/types.h>
- #include <sys/socket.h>
- #include <sys/uio.h>
- #include <unistd.h>
- EOF
- ${CPP} ${CPPFLAGS} ${CPPFLAG_STDC} conftest.$ac_ext | $AWK "{ if (/[^a-z0-9]${func}[^a-z0-9]/) { s=10 }; if ( s > 0 ) { s -= 1; print; } }" | egrep -v '^#' | tr 'n' ' ' | tr -s '/' | tr ';' 'n' | grep -v "__${func}" | egrep "[^a-z0-9]${func}[^a-z0-9]" | tr -s '[:blank:]' | sed -e 's/extern//' > conftest.out_proto
- cnt=0
- while test $cnt -lt $paramcnt; do
- if test $cnt -eq 0; then
- cat conftest.out_proto | sed -e "s/${func}.*//" | sed -e 's/^[ ]*//' | sed -e 's/[ ]*$//g' > conftest.out_param
- else
- cat conftest.out_proto | sed -e "s/.*${func}//" | sed -e "s/[()]//g" | cut -d, -f $cnt | sed -e 's/^[ ]*//' | sed -e 's/[ ]*$//g' > conftest.out_param
- fi
- cat conftest.out_param | tr -s '[:blank:]' > conftest.out_nospace
- if test -s conftest.out_nospace; then
- cp -f conftest.out_param conftest.out_param_${cnt}
- else
- echo "not found" > conftest.out_param_${cnt}
- echo "warning: found no argument"
- fi
- #XXX avoid subshell
- case $cnt in
- 0) cnt=1;;
- 1) cnt=2;;
- 2) cnt=3;;
- 3) cnt=4;;
- 4) cnt=5;;
- 5) cnt=6;;
- 6) cnt=7;;
- 7) cnt=8;;
- 8) cnt=9;;
- 9) cnt=10;;
- 10) cnt=11;;
- esac
- done
- #return value
-
- _arg=0
- _param=conftest.out_param_0
- _func=$func
- _ucfunc=$ucfunc
- unset _nofunc
- for val in "ssize_t"
- do
- cat ${_param} | egrep "^${val}" > /dev/null
- test $? -eq 0 && _nofunc="" && break
- _nofunc=t
- done
- if test "x${_nofunc}" = xt; then
- if test "x$failure" != x; then
- failure="$failure|"
- fi
- failure="$failure ${_func} (${_arg}): (`cat ${_param}`)"
- else
- cat >> confdefs.h <<EOF
- #define HAVE_PROT_${_ucfunc}_${_arg} ${val}
- EOF
- fi
- #first argument
-
- _arg=1
- _param=conftest.out_param_1
- _func=$func
- _ucfunc=$ucfunc
- unset _nofunc
- for val in "int"
- do
- cat ${_param} | egrep "^${val}" > /dev/null
- test $? -eq 0 && _nofunc="" && break
- _nofunc=t
- done
- if test "x${_nofunc}" = xt; then
- if test "x$failure" != x; then
- failure="$failure|"
- fi
- failure="$failure ${_func} (${_arg}): (`cat ${_param}`)"
- else
- cat >> confdefs.h <<EOF
- #define HAVE_PROT_${_ucfunc}_${_arg} ${val}
- EOF
- fi
- #second argument
-
- _arg=2
- _param=conftest.out_param_2
- _func=$func
- _ucfunc=$ucfunc
- unset _nofunc
- for val in "void *"
- do
- cat ${_param} | egrep "^${val}" > /dev/null
- test $? -eq 0 && _nofunc="" && break
- _nofunc=t
- done
- if test "x${_nofunc}" = xt; then
- if test "x$failure" != x; then
- failure="$failure|"
- fi
- failure="$failure ${_func} (${_arg}): (`cat ${_param}`)"
- else
- cat >> confdefs.h <<EOF
- #define HAVE_PROT_${_ucfunc}_${_arg} ${val}
- EOF
- fi
- #third argument
-
- _arg=3
- _param=conftest.out_param_3
- _func=$func
- _ucfunc=$ucfunc
- unset _nofunc
- for val in "size_t" "unsigned"
- do
- cat ${_param} | egrep "^${val}" > /dev/null
- test $? -eq 0 && _nofunc="" && break
- _nofunc=t
- done
- if test "x${_nofunc}" = xt; then
- if test "x$failure" != x; then
- failure="$failure|"
- fi
- failure="$failure ${_func} (${_arg}): (`cat ${_param}`)"
- else
- cat >> confdefs.h <<EOF
- #define HAVE_PROT_${_ucfunc}_${_arg} ${val}
- EOF
- fi
- #failure
- if test "x$failure" != x; then
- echo "$ac_t""failure" 1>&6
- echo "$failure" | tr '|' 'n'
- failproto=t
- else
- echo "$ac_t""ok" 1>&6
- fi
- rm -f conftest.*
- if test x$failproto != x; then
- echo ""
- echo "error: some unfamiliar function prototypes were found,"
- echo " and will probably mean that building of libdsocks,"
- echo " which allows on-the-fly socksification of dynamic"
- echo " binaries will not work."
- echo ""
- echo " You have several options:"
- echo ""
- echo " 1. If you do not need libdsocks, run configure with the"
- echo " option --disable-preload."
- echo " 2. Send the output from configure to dante-bugs@inet.no"
- echo " and if possible you'll get a patch fixing the problem."
- echo " If you think this might be a generic problem, sending"
- echo " the output might allow the problem to be solved for all"
- echo " users of your platform in the next release."
- echo " 3. Fix the problem yourself. If you have autoconf installed,"
- echo " using the output above to modify configure.in should"
- echo " enable you to compile without problems."
- exit 1
- fi
- else
- #defaults
- cat >> confdefs.h <<EOF
- #define HAVE_PROT_CONNECT_0 int
- EOF
- cat >> confdefs.h <<EOF
- #define HAVE_PROT_CONNECT_1 int
- EOF
- cat >> confdefs.h <<EOF
- #define HAVE_PROT_CONNECT_2 const struct sockaddr *
- EOF
- cat >> confdefs.h <<EOF
- #define HAVE_PROT_CONNECT_3 socklen_t
- EOF
- cat >> confdefs.h <<EOF
- #define HAVE_PROT_ACCEPT_0 int
- EOF
- cat >> confdefs.h <<EOF
- #define HAVE_PROT_ACCEPT_1 int
- EOF
- cat >> confdefs.h <<EOF
- #define HAVE_PROT_ACCEPT_2 struct sockaddr *
- EOF
- cat >> confdefs.h <<EOF
- #define HAVE_PROT_ACCEPT_3 socklen_t *
- EOF
- cat >> confdefs.h <<EOF
- #define HAVE_PROT_BIND_0 int
- EOF
- cat >> confdefs.h <<EOF
- #define HAVE_PROT_BIND_1 int
- EOF
- cat >> confdefs.h <<EOF
- #define HAVE_PROT_BIND_2 const struct sockaddr *
- EOF
- cat >> confdefs.h <<EOF
- #define HAVE_PROT_BIND_3 socklen_t
- EOF
- cat >> confdefs.h <<EOF
- #define HAVE_PROT_GETPEERNAME_0 int
- EOF
- cat >> confdefs.h <<EOF
- #define HAVE_PROT_GETPEERNAME_1 int
- EOF
- cat >> confdefs.h <<EOF
- #define HAVE_PROT_GETPEERNAME_2 struct sockaddr *
- EOF
- cat >> confdefs.h <<EOF
- #define HAVE_PROT_GETPEERNAME_3 socklen_t *
- EOF
- cat >> confdefs.h <<EOF
- #define HAVE_PROT_GETSOCKNAME_0 int
- EOF
- cat >> confdefs.h <<EOF
- #define HAVE_PROT_GETSOCKNAME_1 int
- EOF
- cat >> confdefs.h <<EOF
- #define HAVE_PROT_GETSOCKNAME_2 struct sockaddr *
- EOF
- cat >> confdefs.h <<EOF
- #define HAVE_PROT_GETSOCKNAME_3 socklen_t *
- EOF
- cat >> confdefs.h <<EOF
- #define HAVE_PROT_RECVFROM_0 ssize_t
- EOF
- cat >> confdefs.h <<EOF
- #define HAVE_PROT_RECVFROM_1 int
- EOF
- cat >> confdefs.h <<EOF
- #define HAVE_PROT_RECVFROM_2 void *
- EOF
- cat >> confdefs.h <<EOF
- #define HAVE_PROT_RECVFROM_3 size_t
- EOF
- cat >> confdefs.h <<EOF
- #define HAVE_PROT_RECVFROM_4 int
- EOF
- cat >> confdefs.h <<EOF
- #define HAVE_PROT_RECVFROM_5 struct sockaddr *
- EOF
- cat >> confdefs.h <<EOF
- #define HAVE_PROT_RECVFROM_6 socklen_t *
- EOF
- cat >> confdefs.h <<EOF
- #define HAVE_PROT_SEND_0 ssize_t
- EOF
- cat >> confdefs.h <<EOF
- #define HAVE_PROT_SEND_1 int
- EOF
- cat >> confdefs.h <<EOF
- #define HAVE_PROT_SEND_2 const void *
- EOF
- cat >> confdefs.h <<EOF
- #define HAVE_PROT_SEND_3 size_t
- EOF
- cat >> confdefs.h <<EOF
- #define HAVE_PROT_SEND_4 int
- EOF
- cat >> confdefs.h <<EOF
- #define HAVE_PROT_RECV_0 ssize_t
- EOF
- cat >> confdefs.h <<EOF
- #define HAVE_PROT_RECV_1 int
- EOF
- cat >> confdefs.h <<EOF
- #define HAVE_PROT_RECV_2 void *
- EOF
- cat >> confdefs.h <<EOF
- #define HAVE_PROT_RECV_3 size_t
- EOF
- cat >> confdefs.h <<EOF
- #define HAVE_PROT_RECV_4 int
- EOF
- cat >> confdefs.h <<EOF
- #define HAVE_PROT_SENDTO_0 ssize_t
- EOF
- cat >> confdefs.h <<EOF
- #define HAVE_PROT_SENDTO_1 int
- EOF
- cat >> confdefs.h <<EOF
- #define HAVE_PROT_SENDTO_2 const void *
- EOF
- cat >> confdefs.h <<EOF
- #define HAVE_PROT_SENDTO_3 size_t
- EOF
- cat >> confdefs.h <<EOF
- #define HAVE_PROT_SENDTO_4 int
- EOF
- cat >> confdefs.h <<EOF
- #define HAVE_PROT_SENDTO_5 const struct sockaddr *
- EOF
- cat >> confdefs.h <<EOF
- #define HAVE_PROT_SENDTO_6 socklen_t
- EOF
- cat >> confdefs.h <<EOF
- #define HAVE_PROT_READV_0 ssize_t
- EOF
- cat >> confdefs.h <<EOF
- #define HAVE_PROT_READV_1 int
- EOF
- cat >> confdefs.h <<EOF
- #define HAVE_PROT_READV_2 const struct iovec *
- EOF
- cat >> confdefs.h <<EOF
- #define HAVE_PROT_READV_3 int
- EOF
- cat >> confdefs.h <<EOF
- #define HAVE_PROT_WRITEV_0 ssize_t
- EOF
- cat >> confdefs.h <<EOF
- #define HAVE_PROT_WRITEV_1 int
- EOF
- cat >> confdefs.h <<EOF
- #define HAVE_PROT_WRITEV_2 const struct iovec *
- EOF
- cat >> confdefs.h <<EOF
- #define HAVE_PROT_WRITEV_3 int
- EOF
- cat >> confdefs.h <<EOF
- #define HAVE_PROT_RECVMSG_0 ssize_t
- EOF
- cat >> confdefs.h <<EOF
- #define HAVE_PROT_RECVMSG_1 int
- EOF
- cat >> confdefs.h <<EOF
- #define HAVE_PROT_RECVMSG_2 struct msghdr *
- EOF
- cat >> confdefs.h <<EOF
- #define HAVE_PROT_RECVMSG_3 int
- EOF
- cat >> confdefs.h <<EOF
- #define HAVE_PROT_SENDMSG_0 ssize_t
- EOF
- cat >> confdefs.h <<EOF
- #define HAVE_PROT_SENDMSG_1 int
- EOF
- cat >> confdefs.h <<EOF
- #define HAVE_PROT_SENDMSG_2 const struct msghdr *
- EOF
- cat >> confdefs.h <<EOF
- #define HAVE_PROT_SENDMSG_3 int
- EOF
- cat >> confdefs.h <<EOF
- #define HAVE_PROT_WRITE_0 ssize_t
- EOF
- cat >> confdefs.h <<EOF
- #define HAVE_PROT_WRITE_1 int
- EOF
- cat >> confdefs.h <<EOF
- #define HAVE_PROT_WRITE_2 const void *
- EOF
- cat >> confdefs.h <<EOF
- #define HAVE_PROT_WRITE_3 size_t
- EOF
- cat >> confdefs.h <<EOF
- #define HAVE_PROT_READ_0 ssize_t
- EOF
- cat >> confdefs.h <<EOF
- #define HAVE_PROT_READ_1 int
- EOF
- cat >> confdefs.h <<EOF
- #define HAVE_PROT_READ_2 void *
- EOF
- cat >> confdefs.h <<EOF
- #define HAVE_PROT_READ_3 size_t
- EOF
- fi #stdc_headers
- fi #no preload
- echo $ac_n "checking if getsockopt needs cast""... $ac_c" 1>&6
- echo "configure:6960: checking if getsockopt needs cast" >&5
- cat > conftest.$ac_ext <<EOF
- #line 6962 "configure"
- #include "confdefs.h"
- #include <sys/types.h>
- #include <sys/socket.h>
- int getsockopt(int, int, int, char *, int *);
- int main() {
- 1
- ; return 0; }
- EOF
- if { (eval echo configure:6973: "$ac_compile") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- cat >> confdefs.h <<EOF
- #define NEED_GETSOCKOPT_CAST 1
- EOF
- echo "$ac_t""yes" 1>&6
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- echo "$ac_t""no" 1>&6
- fi
- rm -f conftest*
- #include both <sys/ioctl.h> and <sys/sockio.h>?
- if test x$have_sys_sockio_h = xt; then
- echo $ac_n "checking to see if <sys/sockio.h> should be included""... $ac_c" 1>&6
- echo "configure:6991: checking to see if <sys/sockio.h> should be included" >&5
- cat > conftest.$ac_ext <<EOF
- #line 6993 "configure"
- #include "confdefs.h"
- #include <sys/ioctl.h>
- #ifdef SIOCATMARK
- #else
- #include <sys/sockio.h>
- #ifdef SIOCATMARK
- yes
- #endif
- #endif
- EOF
- if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "yes" >/dev/null 2>&1; then
- rm -rf conftest*
- cat >> confdefs.h <<EOF
- #define NEED_SYS_SOCKIO_H 1
- EOF
- echo "$ac_t""yes" 1>&6
- else
- rm -rf conftest*
- echo "$ac_t""no" 1>&6
- fi
- rm -f conftest*
- fi
- #XXX should be more generic, check if nonexistent
- echo $ac_n "checking to see if dlopen param has DL_ and not RTLD_ prefix""... $ac_c" 1>&6
- echo "configure:7024: checking to see if dlopen param has DL_ and not RTLD_ prefix" >&5
- cat > conftest.$ac_ext <<EOF
- #line 7026 "configure"
- #include "confdefs.h"
- #include <dlfcn.h>
- #ifdef DL_LAZY
- #else
- # ifdef RTLD_LAZY
- yes
- # endif
- #endif
- EOF
- if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "yes" >/dev/null 2>&1; then
- rm -rf conftest*
- cat >> confdefs.h <<EOF
- #define NEED_DYNA_RTLD 1
- EOF
- echo "$ac_t""yes" 1>&6
- else
- rm -rf conftest*
- echo "$ac_t""no" 1>&6
- fi
- rm -f conftest*
- #XXX should be more generic, check if nonexistent
- #SV_INTERRUPT, but not SA_RESTART defined?
- echo $ac_n "checking to see if SV_INTERRUPT should be used""... $ac_c" 1>&6
- echo "configure:7056: checking to see if SV_INTERRUPT should be used" >&5
- cat > conftest.$ac_ext <<EOF
- #line 7058 "configure"
- #include "confdefs.h"
- #include <signal.h>
- #ifdef SA_RESTART
- #else
- # ifdef SV_INTERRUPT
- yes
- # endif
- #endif
- EOF
- if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "yes" >/dev/null 2>&1; then
- rm -rf conftest*
- cat >> confdefs.h <<EOF
- #define NEED_SA_RESTART 1
- EOF
- echo "$ac_t""yes" 1>&6
- else
- rm -rf conftest*
- echo "$ac_t""no" 1>&6
- fi
- rm -f conftest*
- #XXXseems to be supported on solaris2.6, but there might be some
- #defines that need to be set (should _XOPEN_SOURCE be defined on all
- #platforms?)
- echo $ac_n "checking if cmsghdr exists in <sys/socket.h>""... $ac_c" 1>&6
- echo "configure:7089: checking if cmsghdr exists in <sys/socket.h>" >&5
- case $host in
- *-*-hpux*)
- echo "$ac_t""no" 1>&6 #disable test
- ;;
- *)
- cat > conftest.$ac_ext <<EOF
- #line 7096 "configure"
- #include "confdefs.h"
- #include <sys/types.h>
- #include <sys/socket.h>
- int main() {
- struct cmsghdr foo = {1,1,1};
- struct msghdr bar;
- foo.cmsg_len = 0;
- foo.cmsg_type = SCM_RIGHTS;
- foo.cmsg_level = SOL_SOCKET;
- bar.msg_controllen = 1;
- ; return 0; }
- EOF
- if { (eval echo configure:7112: "$ac_compile") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- cat >> confdefs.h <<EOF
- #define HAVE_CMSGHDR 1
- EOF
- echo "$ac_t""yes" 1>&6
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- echo "$ac_t""no" 1>&6
- fi
- rm -f conftest*
- ;;
- esac
- echo $ac_n "checking to see if malloc_options exists""... $ac_c" 1>&6
- echo "configure:7130: checking to see if malloc_options exists" >&5
- cat > conftest.$ac_ext <<EOF
- #line 7132 "configure"
- #include "confdefs.h"
- extern char *malloc_options;
- int main() {
- malloc_options = 0;
- ; return 0; }
- EOF
- if { (eval echo configure:7139: "$ac_link") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- cat >> confdefs.h <<EOF
- #define HAVE_MALLOC_OPTIONS 1
- EOF
- echo "$ac_t""yes" 1>&6
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- echo "$ac_t""no" 1>&6
- fi
- rm -f conftest*
- echo $ac_n "checking to see if __progname exists""... $ac_c" 1>&6
- echo "configure:7155: checking to see if __progname exists" >&5
- cat > conftest.$ac_ext <<EOF
- #line 7157 "configure"
- #include "confdefs.h"
- extern char *__progname;
- int main() {
- __progname = 0;
- ; return 0; }
- EOF
- if { (eval echo configure:7164: "$ac_link") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- cat >> confdefs.h <<EOF
- #define HAVE_PROGNAME 1
- EOF
- echo "$ac_t""yes" 1>&6
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- echo "$ac_t""no" 1>&6
- fi
- rm -f conftest*
- echo $ac_n "checking for library containing crypt""... $ac_c" 1>&6
- echo "configure:7181: checking for library containing crypt" >&5
- if eval "test "`echo '$''{'ac_cv_search_crypt'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- ac_func_search_save_LIBS="$LIBS"
- ac_cv_search_crypt="no"
- cat > conftest.$ac_ext <<EOF
- #line 7188 "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
- builtin and then its argument prototype would still apply. */
- char crypt();
- int main() {
- crypt()
- ; return 0; }
- EOF
- if { (eval echo configure:7199: "$ac_link") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- ac_cv_search_crypt="none required"
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- fi
- rm -f conftest*
- test "$ac_cv_search_crypt" = "no" && for i in crypt; do
- LIBS="-l$i $ac_func_search_save_LIBS"
- cat > conftest.$ac_ext <<EOF
- #line 7210 "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
- builtin and then its argument prototype would still apply. */
- char crypt();
- int main() {
- crypt()
- ; return 0; }
- EOF
- if { (eval echo configure:7221: "$ac_link") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- ac_cv_search_crypt="-l$i"
- break
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- fi
- rm -f conftest*
- done
- LIBS="$ac_func_search_save_LIBS"
- fi
- echo "$ac_t""$ac_cv_search_crypt" 1>&6
- if test "$ac_cv_search_crypt" != "no"; then
- test "$ac_cv_search_crypt" = "none required" || LIBS="$ac_cv_search_crypt $LIBS"
-
- else :
-
- fi
- #FreeBSD has setproctitle in -lutil (Per Hedeland <per@erix.ericsson.se>)
- echo $ac_n "checking for library containing setproctitle""... $ac_c" 1>&6
- echo "configure:7245: checking for library containing setproctitle" >&5
- if eval "test "`echo '$''{'ac_cv_search_setproctitle'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- ac_func_search_save_LIBS="$LIBS"
- ac_cv_search_setproctitle="no"
- cat > conftest.$ac_ext <<EOF
- #line 7252 "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
- builtin and then its argument prototype would still apply. */
- char setproctitle();
- int main() {
- setproctitle()
- ; return 0; }
- EOF
- if { (eval echo configure:7263: "$ac_link") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- ac_cv_search_setproctitle="none required"
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- fi
- rm -f conftest*
- test "$ac_cv_search_setproctitle" = "no" && for i in util; do
- LIBS="-l$i $ac_func_search_save_LIBS"
- cat > conftest.$ac_ext <<EOF
- #line 7274 "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
- builtin and then its argument prototype would still apply. */
- char setproctitle();
- int main() {
- setproctitle()
- ; return 0; }
- EOF
- if { (eval echo configure:7285: "$ac_link") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- ac_cv_search_setproctitle="-l$i"
- break
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- fi
- rm -f conftest*
- done
- LIBS="$ac_func_search_save_LIBS"
- fi
- echo "$ac_t""$ac_cv_search_setproctitle" 1>&6
- if test "$ac_cv_search_setproctitle" != "no"; then
- test "$ac_cv_search_setproctitle" = "none required" || LIBS="$ac_cv_search_setproctitle $LIBS"
-
- else :
-
- fi
- #Look for functions needed for socksify located in other places than libc
- SOCKSIFY_PRELOAD_LIBS=""
- oLIBS=$LIBS
- LIBS=""
- echo $ac_n "checking for library containing connect""... $ac_c" 1>&6
- echo "configure:7314: checking for library containing connect" >&5
- if eval "test "`echo '$''{'ac_cv_search_connect'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- ac_func_search_save_LIBS="$LIBS"
- ac_cv_search_connect="no"
- cat > conftest.$ac_ext <<EOF
- #line 7321 "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
- builtin and then its argument prototype would still apply. */
- char connect();
- int main() {
- connect()
- ; return 0; }
- EOF
- if { (eval echo configure:7332: "$ac_link") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- ac_cv_search_connect="none required"
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- fi
- rm -f conftest*
- test "$ac_cv_search_connect" = "no" && for i in socket; do
- LIBS="-l$i $ac_func_search_save_LIBS"
- cat > conftest.$ac_ext <<EOF
- #line 7343 "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
- builtin and then its argument prototype would still apply. */
- char connect();
- int main() {
- connect()
- ; return 0; }
- EOF
- if { (eval echo configure:7354: "$ac_link") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- ac_cv_search_connect="-l$i"
- break
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- fi
- rm -f conftest*
- done
- LIBS="$ac_func_search_save_LIBS"
- fi
- echo "$ac_t""$ac_cv_search_connect" 1>&6
- if test "$ac_cv_search_connect" != "no"; then
- test "$ac_cv_search_connect" = "none required" || LIBS="$ac_cv_search_connect $LIBS"
-
- else :
-
- fi
- NLIBS="${NLIBS}${NLIBS:+ }$LIBS"
- LIBS=""
- #XXX can be ignored when preloading is disabled (only the AC_SEARCH_LIBS test
- #is needed)
- if test "x${ac_cv_search_connect}" = "x-lsocket"; then
- cat >> confdefs.h <<EOF
- #define LIBRARY_LIBSOCKET "${base_library_path}libsocket.so"
- EOF
- SOCKSIFY_PRELOAD_LIBS="${SOCKSIFY_PRELOAD_LIBS}${SOCKSIFY_PRELOAD_LIBS:+${PRELOAD_SEPERATOR}}${base_library_path}libsocket.so"
- cat >> confdefs.h <<EOF
- #define LIBRARY_CONNECT LIBRARY_LIBSOCKET
- EOF
- echo $ac_n "checking for accept in -lsocket""... $ac_c" 1>&6
- echo "configure:7393: checking for accept in -lsocket" >&5
- ac_lib_var=`echo socket'_'accept | sed 'y%./+-%__p_%'`
- if eval "test "`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- ac_save_LIBS="$LIBS"
- LIBS="-lsocket $LIBS"
- cat > conftest.$ac_ext <<EOF
- #line 7401 "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
- builtin and then its argument prototype would still apply. */
- char accept();
- int main() {
- accept()
- ; return 0; }
- EOF
- if { (eval echo configure:7412: "$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
- fi
- rm -f conftest*
- LIBS="$ac_save_LIBS"
- fi
- if eval "test "`echo '$ac_cv_lib_'$ac_lib_var`" = yes"; then
- echo "$ac_t""yes" 1>&6
- cat >> confdefs.h <<EOF
- #define LIBRARY_ACCEPT LIBRARY_LIBSOCKET
- EOF
- else
- echo "$ac_t""no" 1>&6
- fi
- echo $ac_n "checking for bind in -lsocket""... $ac_c" 1>&6
- echo "configure:7437: checking for bind in -lsocket" >&5
- ac_lib_var=`echo socket'_'bind | sed 'y%./+-%__p_%'`
- if eval "test "`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- ac_save_LIBS="$LIBS"
- LIBS="-lsocket $LIBS"
- cat > conftest.$ac_ext <<EOF
- #line 7445 "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
- builtin and then its argument prototype would still apply. */
- char bind();
- int main() {
- bind()
- ; return 0; }
- EOF
- if { (eval echo configure:7456: "$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
- fi
- rm -f conftest*
- LIBS="$ac_save_LIBS"
- fi
- if eval "test "`echo '$ac_cv_lib_'$ac_lib_var`" = yes"; then
- echo "$ac_t""yes" 1>&6
- cat >> confdefs.h <<EOF
- #define LIBRARY_BIND LIBRARY_LIBSOCKET
- EOF
- else
- echo "$ac_t""no" 1>&6
- fi
- echo $ac_n "checking for bindresvport in -lsocket""... $ac_c" 1>&6
- echo "configure:7481: checking for bindresvport in -lsocket" >&5
- ac_lib_var=`echo socket'_'bindresvport | sed 'y%./+-%__p_%'`
- if eval "test "`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- ac_save_LIBS="$LIBS"
- LIBS="-lsocket $LIBS"
- cat > conftest.$ac_ext <<EOF
- #line 7489 "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
- builtin and then its argument prototype would still apply. */
- char bindresvport();
- int main() {
- bindresvport()
- ; return 0; }
- EOF
- if { (eval echo configure:7500: "$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
- fi
- rm -f conftest*
- LIBS="$ac_save_LIBS"
- fi
- if eval "test "`echo '$ac_cv_lib_'$ac_lib_var`" = yes"; then
- echo "$ac_t""yes" 1>&6
- cat >> confdefs.h <<EOF
- #define LIBRARY_BINDRESVPORT LIBRARY_LIBSOCKET
- EOF
- else
- echo "$ac_t""no" 1>&6
- fi
- echo $ac_n "checking for getpeername in -lsocket""... $ac_c" 1>&6
- echo "configure:7525: checking for getpeername in -lsocket" >&5
- ac_lib_var=`echo socket'_'getpeername | sed 'y%./+-%__p_%'`
- if eval "test "`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- ac_save_LIBS="$LIBS"
- LIBS="-lsocket $LIBS"
- cat > conftest.$ac_ext <<EOF
- #line 7533 "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
- builtin and then its argument prototype would still apply. */
- char getpeername();
- int main() {
- getpeername()
- ; return 0; }
- EOF
- if { (eval echo configure:7544: "$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
- fi
- rm -f conftest*
- LIBS="$ac_save_LIBS"
- fi
- if eval "test "`echo '$ac_cv_lib_'$ac_lib_var`" = yes"; then
- echo "$ac_t""yes" 1>&6
- cat >> confdefs.h <<EOF
- #define LIBRARY_GETPEERNAME LIBRARY_LIBSOCKET
- EOF
- else
- echo "$ac_t""no" 1>&6
- fi
- echo $ac_n "checking for getsockname in -lsocket""... $ac_c" 1>&6
- echo "configure:7569: checking for getsockname in -lsocket" >&5
- ac_lib_var=`echo socket'_'getsockname | sed 'y%./+-%__p_%'`
- if eval "test "`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- ac_save_LIBS="$LIBS"
- LIBS="-lsocket $LIBS"
- cat > conftest.$ac_ext <<EOF
- #line 7577 "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
- builtin and then its argument prototype would still apply. */
- char getsockname();
- int main() {
- getsockname()
- ; return 0; }
- EOF
- if { (eval echo configure:7588: "$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
- fi
- rm -f conftest*
- LIBS="$ac_save_LIBS"
- fi
- if eval "test "`echo '$ac_cv_lib_'$ac_lib_var`" = yes"; then
- echo "$ac_t""yes" 1>&6
- cat >> confdefs.h <<EOF
- #define LIBRARY_GETSOCKNAME LIBRARY_LIBSOCKET
- EOF
- else
- echo "$ac_t""no" 1>&6
- fi
- echo $ac_n "checking for recvfrom in -lsocket""... $ac_c" 1>&6
- echo "configure:7613: checking for recvfrom in -lsocket" >&5
- ac_lib_var=`echo socket'_'recvfrom | sed 'y%./+-%__p_%'`
- if eval "test "`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- ac_save_LIBS="$LIBS"
- LIBS="-lsocket $LIBS"
- cat > conftest.$ac_ext <<EOF
- #line 7621 "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
- builtin and then its argument prototype would still apply. */
- char recvfrom();
- int main() {
- recvfrom()
- ; return 0; }
- EOF
- if { (eval echo configure:7632: "$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
- fi
- rm -f conftest*
- LIBS="$ac_save_LIBS"
- fi
- if eval "test "`echo '$ac_cv_lib_'$ac_lib_var`" = yes"; then
- echo "$ac_t""yes" 1>&6
- cat >> confdefs.h <<EOF
- #define LIBRARY_RECVFROM LIBRARY_LIBSOCKET
- EOF
- else
- echo "$ac_t""no" 1>&6
- fi
- echo $ac_n "checking for rresvport in -lsocket""... $ac_c" 1>&6
- echo "configure:7657: checking for rresvport in -lsocket" >&5
- ac_lib_var=`echo socket'_'rresvport | sed 'y%./+-%__p_%'`
- if eval "test "`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- ac_save_LIBS="$LIBS"
- LIBS="-lsocket $LIBS"
- cat > conftest.$ac_ext <<EOF
- #line 7665 "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
- builtin and then its argument prototype would still apply. */
- char rresvport();
- int main() {
- rresvport()
- ; return 0; }
- EOF
- if { (eval echo configure:7676: "$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
- fi
- rm -f conftest*
- LIBS="$ac_save_LIBS"
- fi
- if eval "test "`echo '$ac_cv_lib_'$ac_lib_var`" = yes"; then
- echo "$ac_t""yes" 1>&6
- cat >> confdefs.h <<EOF
- #define LIBRARY_RRESVPORT LIBRARY_LIBSOCKET
- EOF
- else
- echo "$ac_t""no" 1>&6
- fi
- echo $ac_n "checking for recvmsg in -lsocket""... $ac_c" 1>&6
- echo "configure:7701: checking for recvmsg in -lsocket" >&5
- ac_lib_var=`echo socket'_'recvmsg | sed 'y%./+-%__p_%'`
- if eval "test "`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- ac_save_LIBS="$LIBS"
- LIBS="-lsocket $LIBS"
- cat > conftest.$ac_ext <<EOF
- #line 7709 "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
- builtin and then its argument prototype would still apply. */
- char recvmsg();
- int main() {
- recvmsg()
- ; return 0; }
- EOF
- if { (eval echo configure:7720: "$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
- fi
- rm -f conftest*
- LIBS="$ac_save_LIBS"
- fi
- if eval "test "`echo '$ac_cv_lib_'$ac_lib_var`" = yes"; then
- echo "$ac_t""yes" 1>&6
- cat >> confdefs.h <<EOF
- #define LIBRARY_RECVMSG LIBRARY_LIBSOCKET
- EOF
- else
- echo "$ac_t""no" 1>&6
- fi
- echo $ac_n "checking for sendmsg in -lsocket""... $ac_c" 1>&6
- echo "configure:7745: checking for sendmsg in -lsocket" >&5
- ac_lib_var=`echo socket'_'sendmsg | sed 'y%./+-%__p_%'`
- if eval "test "`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- ac_save_LIBS="$LIBS"
- LIBS="-lsocket $LIBS"
- cat > conftest.$ac_ext <<EOF
- #line 7753 "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
- builtin and then its argument prototype would still apply. */
- char sendmsg();
- int main() {
- sendmsg()
- ; return 0; }
- EOF
- if { (eval echo configure:7764: "$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
- fi
- rm -f conftest*
- LIBS="$ac_save_LIBS"
- fi
- if eval "test "`echo '$ac_cv_lib_'$ac_lib_var`" = yes"; then
- echo "$ac_t""yes" 1>&6
- cat >> confdefs.h <<EOF
- #define LIBRARY_SENDMSG LIBRARY_LIBSOCKET
- EOF
- else
- echo "$ac_t""no" 1>&6
- fi
- echo $ac_n "checking for send in -lsocket""... $ac_c" 1>&6
- echo "configure:7789: checking for send in -lsocket" >&5
- ac_lib_var=`echo socket'_'send | sed 'y%./+-%__p_%'`
- if eval "test "`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- ac_save_LIBS="$LIBS"
- LIBS="-lsocket $LIBS"
- cat > conftest.$ac_ext <<EOF
- #line 7797 "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
- builtin and then its argument prototype would still apply. */
- char send();
- int main() {
- send()
- ; return 0; }
- EOF
- if { (eval echo configure:7808: "$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
- fi
- rm -f conftest*
- LIBS="$ac_save_LIBS"
- fi
- if eval "test "`echo '$ac_cv_lib_'$ac_lib_var`" = yes"; then
- echo "$ac_t""yes" 1>&6
- cat >> confdefs.h <<EOF
- #define LIBRARY_SEND LIBRARY_LIBSOCKET
- EOF
- else
- echo "$ac_t""no" 1>&6
- fi
- echo $ac_n "checking for recv in -lsocket""... $ac_c" 1>&6
- echo "configure:7833: checking for recv in -lsocket" >&5
- ac_lib_var=`echo socket'_'recv | sed 'y%./+-%__p_%'`
- if eval "test "`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- ac_save_LIBS="$LIBS"
- LIBS="-lsocket $LIBS"
- cat > conftest.$ac_ext <<EOF
- #line 7841 "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
- builtin and then its argument prototype would still apply. */
- char recv();
- int main() {
- recv()
- ; return 0; }
- EOF
- if { (eval echo configure:7852: "$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
- fi
- rm -f conftest*
- LIBS="$ac_save_LIBS"
- fi
- if eval "test "`echo '$ac_cv_lib_'$ac_lib_var`" = yes"; then
- echo "$ac_t""yes" 1>&6
- cat >> confdefs.h <<EOF
- #define LIBRARY_RECV LIBRARY_LIBSOCKET
- EOF
- else
- echo "$ac_t""no" 1>&6
- fi
- echo $ac_n "checking for sendto in -lsocket""... $ac_c" 1>&6
- echo "configure:7877: checking for sendto in -lsocket" >&5
- ac_lib_var=`echo socket'_'sendto | sed 'y%./+-%__p_%'`
- if eval "test "`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- ac_save_LIBS="$LIBS"
- LIBS="-lsocket $LIBS"
- cat > conftest.$ac_ext <<EOF
- #line 7885 "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
- builtin and then its argument prototype would still apply. */
- char sendto();
- int main() {
- sendto()
- ; return 0; }
- EOF
- if { (eval echo configure:7896: "$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
- fi
- rm -f conftest*
- LIBS="$ac_save_LIBS"
- fi
- if eval "test "`echo '$ac_cv_lib_'$ac_lib_var`" = yes"; then
- echo "$ac_t""yes" 1>&6
- cat >> confdefs.h <<EOF
- #define LIBRARY_SENDTO LIBRARY_LIBSOCKET
- EOF
- else
- echo "$ac_t""no" 1>&6
- fi
- fi
- #doesn't work if test links with -lsocket (solaris)
- echo $ac_n "checking for library containing inet_addr""... $ac_c" 1>&6
- echo "configure:7924: checking for library containing inet_addr" >&5
- if eval "test "`echo '$''{'ac_cv_search_inet_addr'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- ac_func_search_save_LIBS="$LIBS"
- ac_cv_search_inet_addr="no"
- cat > conftest.$ac_ext <<EOF
- #line 7931 "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
- builtin and then its argument prototype would still apply. */
- char inet_addr();
- int main() {
- inet_addr()
- ; return 0; }
- EOF
- if { (eval echo configure:7942: "$ac_link") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- ac_cv_search_inet_addr="none required"
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- fi
- rm -f conftest*
- test "$ac_cv_search_inet_addr" = "no" && for i in nsl; do
- LIBS="-l$i $ac_func_search_save_LIBS"
- cat > conftest.$ac_ext <<EOF
- #line 7953 "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
- builtin and then its argument prototype would still apply. */
- char inet_addr();
- int main() {
- inet_addr()
- ; return 0; }
- EOF
- if { (eval echo configure:7964: "$ac_link") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- ac_cv_search_inet_addr="-l$i"
- break
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- fi
- rm -f conftest*
- done
- LIBS="$ac_func_search_save_LIBS"
- fi
- echo "$ac_t""$ac_cv_search_inet_addr" 1>&6
- if test "$ac_cv_search_inet_addr" != "no"; then
- test "$ac_cv_search_inet_addr" = "none required" || LIBS="$ac_cv_search_inet_addr $LIBS"
-
- else :
-
- fi
- NLIBS="${NLIBS}${NLIBS:+ }$LIBS"
- LIBS=""
- if test "x${ac_cv_search_inet_addr}" = "x-lnsl"; then
- cat >> confdefs.h <<EOF
- #define LIBRARY_LIBNSL "${base_library_path}libnsl.so"
- EOF
- SOCKSIFY_PRELOAD_LIBS="${SOCKSIFY_PRELOAD_LIBS}${SOCKSIFY_PRELOAD_LIBS:+${PRELOAD_SEPERATOR}}${base_library_path}libnsl.so"
- echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
- echo "configure:7997: 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
- else
- ac_save_LIBS="$LIBS"
- LIBS="-lnsl $LIBS"
- cat > conftest.$ac_ext <<EOF
- #line 8005 "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
- builtin and then its argument prototype would still apply. */
- char gethostbyname();
- int main() {
- gethostbyname()
- ; return 0; }
- EOF
- if { (eval echo configure:8016: "$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
- fi
- rm -f conftest*
- LIBS="$ac_save_LIBS"
- fi
- if eval "test "`echo '$ac_cv_lib_'$ac_lib_var`" = yes"; then
- echo "$ac_t""yes" 1>&6
- cat >> confdefs.h <<EOF
- #define LIBRARY_GETHOSTBYNAME LIBRARY_LIBNSL
- EOF
- else
- echo "$ac_t""no" 1>&6
- fi
- fi
- #XXX used for anything but gethostbyname2? consider testing for it
- # on solaris (atleast 2.6, gcc)
- #linking with -lresolv results in error unless -shared is included
- #since gcc insists on linking statically with libresolv for which
- #no static version exists
- echo $ac_n "checking for library containing inet_aton""... $ac_c" 1>&6
- echo "configure:8048: checking for library containing inet_aton" >&5
- if eval "test "`echo '$''{'ac_cv_search_inet_aton'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- ac_func_search_save_LIBS="$LIBS"
- ac_cv_search_inet_aton="no"
- cat > conftest.$ac_ext <<EOF
- #line 8055 "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
- builtin and then its argument prototype would still apply. */
- char inet_aton();
- int main() {
- inet_aton()
- ; return 0; }
- EOF
- if { (eval echo configure:8066: "$ac_link") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- ac_cv_search_inet_aton="none required"
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- fi
- rm -f conftest*
- test "$ac_cv_search_inet_aton" = "no" && for i in resolv; do
- LIBS="-l$i $ac_func_search_save_LIBS"
- cat > conftest.$ac_ext <<EOF
- #line 8077 "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
- builtin and then its argument prototype would still apply. */
- char inet_aton();
- int main() {
- inet_aton()
- ; return 0; }
- EOF
- if { (eval echo configure:8088: "$ac_link") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- ac_cv_search_inet_aton="-l$i"
- break
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- fi
- rm -f conftest*
- done
- LIBS="$ac_func_search_save_LIBS"
- fi
- echo "$ac_t""$ac_cv_search_inet_aton" 1>&6
- if test "$ac_cv_search_inet_aton" != "no"; then
- test "$ac_cv_search_inet_aton" = "none required" || LIBS="$ac_cv_search_inet_aton $LIBS"
-
- else :
-
- fi
- NLIBS="${NLIBS}${NLIBS:+ }$LIBS"
- LIBS=""
- if test "x${ac_cv_search_inet_aton}" = "x-lresolv"; then
- cat >> confdefs.h <<EOF
- #define LIBRARY_LIBRESOLV "${base_library_path}libresolv.so"
- EOF
- SOCKSIFY_PRELOAD_LIBS="${SOCKSIFY_PRELOAD_LIBS}${SOCKSIFY_PRELOAD_LIBS:+${PRELOAD_SEPERATOR}}${base_library_path}libresolv.so"
- echo $ac_n "checking for gethostbyname2 in -lresolv""... $ac_c" 1>&6
- echo "configure:8121: checking for gethostbyname2 in -lresolv" >&5
- ac_lib_var=`echo resolv'_'gethostbyname2 | sed 'y%./+-%__p_%'`
- if eval "test "`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- ac_save_LIBS="$LIBS"
- LIBS="-lresolv $LIBS"
- cat > conftest.$ac_ext <<EOF
- #line 8129 "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
- builtin and then its argument prototype would still apply. */
- char gethostbyname2();
- int main() {
- gethostbyname2()
- ; return 0; }
- EOF
- if { (eval echo configure:8140: "$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
- fi
- rm -f conftest*
- LIBS="$ac_save_LIBS"
- fi
- if eval "test "`echo '$ac_cv_lib_'$ac_lib_var`" = yes"; then
- echo "$ac_t""yes" 1>&6
- cat >> confdefs.h <<EOF
- #define LIBRARY_GETHOSTBYNAME2 LIBRARY_LIBRESOLV
- EOF
- cat >> confdefs.h <<EOF
- #define HAVE_GETHOSTBYNAME2 1
- EOF
- else
- echo "$ac_t""no" 1>&6
- fi
- fi
- #XXX gcc on solaris (using gnu ld) doesn't seems to implicitly link
- #with libdl in this test, which means that libdl will not be included
- #in socksify.
- echo $ac_n "checking for library containing dlopen""... $ac_c" 1>&6
- echo "configure:8175: checking for library containing dlopen" >&5
- if eval "test "`echo '$''{'ac_cv_search_dlopen'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- ac_func_search_save_LIBS="$LIBS"
- ac_cv_search_dlopen="no"
- cat > conftest.$ac_ext <<EOF
- #line 8182 "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
- builtin and then its argument prototype would still apply. */
- char dlopen();
- int main() {
- dlopen()
- ; return 0; }
- EOF
- if { (eval echo configure:8193: "$ac_link") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- ac_cv_search_dlopen="none required"
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- fi
- rm -f conftest*
- test "$ac_cv_search_dlopen" = "no" && for i in dl; do
- LIBS="-l$i $ac_func_search_save_LIBS"
- cat > conftest.$ac_ext <<EOF
- #line 8204 "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
- builtin and then its argument prototype would still apply. */
- char dlopen();
- int main() {
- dlopen()
- ; return 0; }
- EOF
- if { (eval echo configure:8215: "$ac_link") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- ac_cv_search_dlopen="-l$i"
- break
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- fi
- rm -f conftest*
- done
- LIBS="$ac_func_search_save_LIBS"
- fi
- echo "$ac_t""$ac_cv_search_dlopen" 1>&6
- if test "$ac_cv_search_dlopen" != "no"; then
- test "$ac_cv_search_dlopen" = "none required" || LIBS="$ac_cv_search_dlopen $LIBS"
-
- else :
-
- fi
- NLIBS="${NLIBS}${NLIBS:+ }$LIBS"
- LIBS=""
- if test "x${ac_cv_search_dlopen}" = "x-ldl"; then
- case $host in
- *-*-sunos4*) #XXX attemtpt to get libdl name
- libdl=`ls ${base_library_path}libdl.so* | sed -e 's/.*///' | sort -nr | head -1`
- if test x$libdl = x; then
- echo "configure: warning: unable to locate libdl" 1>&2
- else
- LIBRARY_DLOPEN=${base_library_path}${libdl}
- echo "configure: warning: hardcoding libdl to $LIBRARY_DLOPEN" 1>&2
- fi
- ;;
- *)
- LIBRARY_DLOPEN="${base_library_path}libdl.so"
- ;;
- esac
- SOCKSIFY_PRELOAD_LIBS="${SOCKSIFY_PRELOAD_LIBS}${LIBRARY_DLOPEN:+${PRELOAD_SEPERATOR}}${LIBRARY_DLOPEN}"
- fi
- LIBS="$oLIBS $NLIBS"
- #specify location of the socks library in socksify too
- #NOTE: exec_prefix and prefix have the value NONE here if they are unset
- o_exec_prefix=${exec_prefix}
- o_prefix=${prefix}
- if test x${prefix} = xNONE; then
- prefix=$ac_default_prefix
- fi
- if test x${exec_prefix} = xNONE; then
- exec_prefix=$prefix
- fi
- LIBRARY_PREFIX=`eval echo $libdir`
- LIBRARY_PREFIX=`eval echo $LIBRARY_PREFIX`
- exec_prefix=${o_exec_prefix}
- prefix=${o_prefix}
- #allow user to specify libc name, use default value otherwise
- echo $ac_n "checking for libc name""... $ac_c" 1>&6
- echo "configure:8278: checking for libc name" >&5
- # Check whether --with-libc or --without-libc was given.
- if test "${with_libc+set}" = set; then
- withval="$with_libc"
- LIBC_NAME=$withval
- fi
- #set default?
- if test "x${LIBC_NAME}" = x; then
- case $host in
- *-*-linux-*)
- #XXX attempt to find latest c library
- #can't set it to libc.so directly, might be ld script
- LIBC_NAME=`ls /usr/lib/libc.so* /lib/libc.so* | sed -e 's/.*///' | sort -nr | head -1`
- if test "x${LIBC_NAME}" = x; then
- #nothing found, set libc.so anyway
- LIBC_NAME="${base_library_path}libc.so"
- fi
- ;;
- *)
- LIBC_NAME="${base_library_path}libc.so"
- ;;
- esac
- fi
- echo "$ac_t""${LIBC_NAME}" 1>&6
- cat >> confdefs.h <<EOF
- #define LIBRARY_LIBC "${LIBC_NAME}"
- EOF
- if test "x${ac_cv_header_tcpd_h}" = "xyes"; then
- echo $ac_n "checking for libwrap""... $ac_c" 1>&6
- echo "configure:8312: checking for libwrap" >&5
- if test x$no_libwrap = xt; then
- echo "disabled"
- else
- oLIBS=$LIBS
- LIBS="$LIBS -lwrap"
- cat > conftest.$ac_ext <<EOF
- #line 8319 "configure"
- #include "confdefs.h"
- int allow_severity;
- int deny_severity;
- int main() {
- hosts_access(0);
- ; return 0; }
- EOF
- if { (eval echo configure:8329: "$ac_link") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- echo "$ac_t""yes" 1>&6
- cat >> confdefs.h <<EOF
- #define HAVE_LIBWRAP 1
- EOF
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- echo "$ac_t""no" 1>&6
- LIBS="$oLIBS"
- fi
- rm -f conftest*
- fi
- fi
- #XXX should be more generic
- case $host in
- *-*-freebsdelf* | *-*-solaris* | *-*-linux-* | *-*-irix* |
- alpha-dec-osf*)
- cat >> confdefs.h <<EOF
- #define HAVE_NO_SYMBOL_UNDERSCORE 1
- EOF
- esac
- #try to detect gcc bug (irix 64 problem, affects among others inet_ntoa)
- echo $ac_n "checking for incorrect inet_ntoa behaviour""... $ac_c" 1>&6
- echo "configure:8359: checking for incorrect inet_ntoa behaviour" >&5
- if test "$cross_compiling" = yes; then
- { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
- else
- cat > conftest.$ac_ext <<EOF
- #line 8364 "configure"
- #include "confdefs.h"
- #include <sys/types.h>
- #include <netinet/in.h>
- #include <arpa/inet.h>
- #include <sys/socket.h>
- int main(void)
- {
- struct sockaddr_in addr;
- char *a, *b = "195.195.195.195";
- addr.sin_addr.s_addr = inet_addr(b);
- a = inet_ntoa(addr.sin_addr);
- if (strcmp(a, b) == 0)
- return 1;
- else
- return 0;
- }
- EOF
- if { (eval echo configure:8385: "$ac_link") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
- then
- cat >> confdefs.h <<EOF
- #define HAVE_BROKEN_INET_NTOA 1
- EOF
- echo "$ac_t""yes" 1>&6
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- echo "$ac_t""no" 1>&6
- fi
- rm -fr conftest*
- fi
- #solaris2.6
- echo $ac_n "checking whether an in_port_t typedef exists in <netinet/in.h>""... $ac_c" 1>&6
- echo "configure:8404: checking whether an in_port_t typedef exists in <netinet/in.h>" >&5
- cat > conftest.$ac_ext <<EOF
- #line 8406 "configure"
- #include "confdefs.h"
- #include <netinet/in.h>
- EOF
- if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "in_port_t" >/dev/null 2>&1; then
- rm -rf conftest*
- echo "$ac_t""yes" 1>&6
- else
- rm -rf conftest*
-
- echo "$ac_t""no" 1>&6
- echo $ac_n "checking for in_port_t""... $ac_c" 1>&6
- echo "configure:8421: checking for in_port_t" >&5
- if eval "test "`echo '$''{'ac_cv_type_in_port_t'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- cat > conftest.$ac_ext <<EOF
- #line 8426 "configure"
- #include "confdefs.h"
- #include <sys/types.h>
- #if STDC_HEADERS
- #include <stdlib.h>
- #include <stddef.h>
- #endif
- EOF
- if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "(^|[^a-zA-Z_0-9])in_port_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
- rm -rf conftest*
- ac_cv_type_in_port_t=yes
- else
- rm -rf conftest*
- ac_cv_type_in_port_t=no
- fi
- rm -f conftest*
- fi
- echo "$ac_t""$ac_cv_type_in_port_t" 1>&6
- if test $ac_cv_type_in_port_t = no; then
- cat >> confdefs.h <<EOF
- #define in_port_t ubits_16
- EOF
- fi
- echo $ac_n "checking for in_addr_t""... $ac_c" 1>&6
- echo "configure:8454: checking for in_addr_t" >&5
- if eval "test "`echo '$''{'ac_cv_type_in_addr_t'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- cat > conftest.$ac_ext <<EOF
- #line 8459 "configure"
- #include "confdefs.h"
- #include <sys/types.h>
- #if STDC_HEADERS
- #include <stdlib.h>
- #include <stddef.h>
- #endif
- EOF
- if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "(^|[^a-zA-Z_0-9])in_addr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
- rm -rf conftest*
- ac_cv_type_in_addr_t=yes
- else
- rm -rf conftest*
- ac_cv_type_in_addr_t=no
- fi
- rm -f conftest*
- fi
- echo "$ac_t""$ac_cv_type_in_addr_t" 1>&6
- if test $ac_cv_type_in_addr_t = no; then
- cat >> confdefs.h <<EOF
- #define in_addr_t ubits_32
- EOF
- fi
- echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
- echo "configure:8487: checking for ssize_t" >&5
- if eval "test "`echo '$''{'ac_cv_type_ssize_t'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- cat > conftest.$ac_ext <<EOF
- #line 8492 "configure"
- #include "confdefs.h"
- #include <sys/types.h>
- #if STDC_HEADERS
- #include <stdlib.h>
- #include <stddef.h>
- #endif
- EOF
- if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
- rm -rf conftest*
- ac_cv_type_ssize_t=yes
- else
- rm -rf conftest*
- ac_cv_type_ssize_t=no
- fi
- rm -f conftest*
- fi
- echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
- if test $ac_cv_type_ssize_t = no; then
- cat >> confdefs.h <<EOF
- #define ssize_t int
- EOF
- fi
- fi
- rm -f conftest*
- #linux (redhat 5.2) defines socklen_t in <socketbits.h>, which is
- #included by <sys/socket.h>. check for this first.
- echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
- echo "configure:8526: checking for socklen_t" >&5
- cat > conftest.$ac_ext <<EOF
- #line 8528 "configure"
- #include "confdefs.h"
- #include <sys/types.h>
- #include <sys/socket.h>
- int main() {
- socklen_t foo = 1;
- ; return 0; }
- EOF
- if { (eval echo configure:8538: "$ac_compile") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- echo "$ac_t""yes" 1>&6
- socklen_found=t
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- echo "$ac_t""no" 1>&6
- socklen_found=""
- fi
- rm -f conftest*
- if test x"$socklen_found" = x; then
- case $host in
- alpha-dec-osf*)
- cat >> confdefs.h <<EOF
- #define socklen_t size_t
- EOF
- ;;
- *)
- cat >> confdefs.h <<EOF
- #define socklen_t int
- EOF
- ;;
- esac
- fi
- #sig_atomic_t
- echo $ac_n "checking for sig_atomic_t in <signal.h>""... $ac_c" 1>&6
- echo "configure:8570: checking for sig_atomic_t in <signal.h>" >&5
- cat > conftest.$ac_ext <<EOF
- #line 8572 "configure"
- #include "confdefs.h"
- #include <signal.h>
- EOF
- if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "sig_atomic_t" >/dev/null 2>&1; then
- rm -rf conftest*
- cat >> confdefs.h <<EOF
- #define HAVE_SIG_ATOMIC_T 1
- EOF
- echo "$ac_t""yes" 1>&6
- else
- rm -rf conftest*
- echo "$ac_t""no" 1>&6
- fi
- rm -f conftest*
- echo $ac_n "checking for int32_t""... $ac_c" 1>&6
- echo "configure:8594: checking for int32_t" >&5
- if eval "test "`echo '$''{'ac_cv_type_int32_t'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- cat > conftest.$ac_ext <<EOF
- #line 8599 "configure"
- #include "confdefs.h"
- #include <sys/types.h>
- #if STDC_HEADERS
- #include <stdlib.h>
- #include <stddef.h>
- #endif
- EOF
- if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "(^|[^a-zA-Z_0-9])int32_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
- rm -rf conftest*
- ac_cv_type_int32_t=yes
- else
- rm -rf conftest*
- ac_cv_type_int32_t=no
- fi
- rm -f conftest*
- fi
- echo "$ac_t""$ac_cv_type_int32_t" 1>&6
- if test $ac_cv_type_int32_t = no; then
- cat >> confdefs.h <<EOF
- #define int32_t sbits_32
- EOF
- fi
- echo $ac_n "checking for int16_t""... $ac_c" 1>&6
- echo "configure:8627: checking for int16_t" >&5
- if eval "test "`echo '$''{'ac_cv_type_int16_t'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- cat > conftest.$ac_ext <<EOF
- #line 8632 "configure"
- #include "confdefs.h"
- #include <sys/types.h>
- #if STDC_HEADERS
- #include <stdlib.h>
- #include <stddef.h>
- #endif
- EOF
- if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "(^|[^a-zA-Z_0-9])int16_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
- rm -rf conftest*
- ac_cv_type_int16_t=yes
- else
- rm -rf conftest*
- ac_cv_type_int16_t=no
- fi
- rm -f conftest*
- fi
- echo "$ac_t""$ac_cv_type_int16_t" 1>&6
- if test $ac_cv_type_int16_t = no; then
- cat >> confdefs.h <<EOF
- #define int16_t sbits_16
- EOF
- fi
- if test $ac_cv_prog_gcc = yes; then
- echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
- echo "configure:8662: checking whether ${CC-cc} needs -traditional" >&5
- if eval "test "`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- ac_pattern="Autoconf.*'x'"
- cat > conftest.$ac_ext <<EOF
- #line 8668 "configure"
- #include "confdefs.h"
- #include <sgtty.h>
- Autoconf TIOCGETP
- EOF
- if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "$ac_pattern" >/dev/null 2>&1; then
- rm -rf conftest*
- ac_cv_prog_gcc_traditional=yes
- else
- rm -rf conftest*
- ac_cv_prog_gcc_traditional=no
- fi
- rm -f conftest*
- if test $ac_cv_prog_gcc_traditional = no; then
- cat > conftest.$ac_ext <<EOF
- #line 8686 "configure"
- #include "confdefs.h"
- #include <termio.h>
- Autoconf TCGETA
- EOF
- if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- egrep "$ac_pattern" >/dev/null 2>&1; then
- rm -rf conftest*
- ac_cv_prog_gcc_traditional=yes
- fi
- rm -f conftest*
- fi
- fi
- echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6
- if test $ac_cv_prog_gcc_traditional = yes; then
- CC="$CC -traditional"
- fi
- fi
- echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
- echo "configure:8708: checking for 8-bit clean memcmp" >&5
- if eval "test "`echo '$''{'ac_cv_func_memcmp_clean'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- if test "$cross_compiling" = yes; then
- ac_cv_func_memcmp_clean=no
- else
- cat > conftest.$ac_ext <<EOF
- #line 8716 "configure"
- #include "confdefs.h"
- main()
- {
- char c0 = 0x40, c1 = 0x80, c2 = 0x81;
- exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
- }
- EOF
- if { (eval echo configure:8726: "$ac_link") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
- then
- ac_cv_func_memcmp_clean=yes
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- ac_cv_func_memcmp_clean=no
- fi
- rm -fr conftest*
- fi
- fi
- echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
- test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
- echo $ac_n "checking whether setvbuf arguments are reversed""... $ac_c" 1>&6
- echo "configure:8744: checking whether setvbuf arguments are reversed" >&5
- if eval "test "`echo '$''{'ac_cv_func_setvbuf_reversed'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- if test "$cross_compiling" = yes; then
- { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
- else
- cat > conftest.$ac_ext <<EOF
- #line 8752 "configure"
- #include "confdefs.h"
- #include <stdio.h>
- /* If setvbuf has the reversed format, exit 0. */
- main () {
- /* This call has the arguments reversed.
- A reversed system may check and see that the address of main
- is not _IOLBF, _IONBF, or _IOFBF, and return nonzero. */
- if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
- exit(1);
- putc('r', stdout);
- exit(0); /* Non-reversed systems segv here. */
- }
- EOF
- if { (eval echo configure:8766: "$ac_link") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
- then
- ac_cv_func_setvbuf_reversed=yes
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- ac_cv_func_setvbuf_reversed=no
- fi
- rm -fr conftest*
- fi
- rm -f core core.* *.core
- fi
- echo "$ac_t""$ac_cv_func_setvbuf_reversed" 1>&6
- if test $ac_cv_func_setvbuf_reversed = yes; then
- cat >> confdefs.h <<EOF
- #define SETVBUF_REVERSED 1
- EOF
- fi
- echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
- echo "configure:8790: 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 8795 "configure"
- #include "confdefs.h"
- #include <sys/types.h>
- #include <signal.h>
- #ifdef signal
- #undef signal
- #endif
- #ifdef __cplusplus
- extern "C" void (*signal (int, void (*)(int)))(int);
- #else
- void (*signal ()) ();
- #endif
- int main() {
- int i;
- ; return 0; }
- EOF
- if { (eval echo configure:8812: "$ac_compile") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- ac_cv_type_signal=void
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_type_signal=int
- fi
- rm -f conftest*
- fi
- echo "$ac_t""$ac_cv_type_signal" 1>&6
- cat >> confdefs.h <<EOF
- #define RETSIGTYPE $ac_cv_type_signal
- EOF
- echo $ac_n "checking for strftime""... $ac_c" 1>&6
- echo "configure:8831: checking for strftime" >&5
- if eval "test "`echo '$''{'ac_cv_func_strftime'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- cat > conftest.$ac_ext <<EOF
- #line 8836 "configure"
- #include "confdefs.h"
- /* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char strftime(); below. */
- #include <assert.h>
- /* Override any gcc2 internal prototype to avoid an error. */
- /* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
- char strftime();
- int main() {
- /* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
- #if defined (__stub_strftime) || defined (__stub___strftime)
- choke me
- #else
- strftime();
- #endif
- ; return 0; }
- EOF
- if { (eval echo configure:8859: "$ac_link") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_strftime=yes"
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_strftime=no"
- fi
- rm -f conftest*
- fi
- if eval "test "`echo '$ac_cv_func_'strftime`" = yes"; then
- echo "$ac_t""yes" 1>&6
- cat >> confdefs.h <<EOF
- #define HAVE_STRFTIME 1
- EOF
- else
- echo "$ac_t""no" 1>&6
- # strftime is in -lintl on SCO UNIX.
- echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
- echo "configure:8881: checking for strftime in -lintl" >&5
- ac_lib_var=`echo intl'_'strftime | sed 'y%./+-%__p_%'`
- if eval "test "`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- ac_save_LIBS="$LIBS"
- LIBS="-lintl $LIBS"
- cat > conftest.$ac_ext <<EOF
- #line 8889 "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
- builtin and then its argument prototype would still apply. */
- char strftime();
- int main() {
- strftime()
- ; return 0; }
- EOF
- if { (eval echo configure:8900: "$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
- fi
- rm -f conftest*
- LIBS="$ac_save_LIBS"
- fi
- if eval "test "`echo '$ac_cv_lib_'$ac_lib_var`" = yes"; then
- echo "$ac_t""yes" 1>&6
- cat >> confdefs.h <<EOF
- #define HAVE_STRFTIME 1
- EOF
- LIBS="-lintl $LIBS"
- else
- echo "$ac_t""no" 1>&6
- fi
- fi
- echo $ac_n "checking whether utime accepts a null argument""... $ac_c" 1>&6
- echo "configure:8927: checking whether utime accepts a null argument" >&5
- if eval "test "`echo '$''{'ac_cv_func_utime_null'+set}'`" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- rm -f conftestdata; > conftestdata
- # Sequent interprets utime(file, 0) to mean use start of epoch. Wrong.
- if test "$cross_compiling" = yes; then
- ac_cv_func_utime_null=no
- else
- cat > conftest.$ac_ext <<EOF
- #line 8937 "configure"
- #include "confdefs.h"
- #include <sys/types.h>
- #include <sys/stat.h>
- main() {
- struct stat s, t;
- exit(!(stat ("conftestdata", &s) == 0 && utime("conftestdata", (long *)0) == 0
- && stat("conftestdata", &t) == 0 && t.st_mtime >= s.st_mtime
- && t.st_mtime - s.st_mtime < 120));
- }
- EOF
- if { (eval echo configure:8948: "$ac_link") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
- then
- ac_cv_func_utime_null=yes
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -fr conftest*
- ac_cv_func_utime_null=no
- fi
- rm -fr conftest*
- fi
- rm -f core core.* *.core
- fi
- echo "$ac_t""$ac_cv_func_utime_null" 1>&6
- if test $ac_cv_func_utime_null = yes; then
- cat >> confdefs.h <<EOF
- #define HAVE_UTIME_NULL 1
- EOF
- fi
- echo $ac_n "checking for vprintf""... $ac_c" 1>&6
- echo "configure:8972: 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 8977 "configure"
- #include "confdefs.h"
- /* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char vprintf(); below. */
- #include <assert.h>
- /* Override any gcc2 internal prototype to avoid an error. */
- /* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
- char vprintf();
- int main() {
- /* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
- #if defined (__stub_vprintf) || defined (__stub___vprintf)
- choke me
- #else
- vprintf();
- #endif
- ; return 0; }
- EOF
- if { (eval echo configure:9000: "$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_vprintf=no"
- fi
- rm -f conftest*
- fi
- if eval "test "`echo '$ac_cv_func_'vprintf`" = yes"; then
- echo "$ac_t""yes" 1>&6
- cat >> confdefs.h <<EOF
- #define HAVE_VPRINTF 1
- EOF
- else
- echo "$ac_t""no" 1>&6
- fi
- if test "$ac_cv_func_vprintf" != yes; then
- echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
- echo "configure:9024: 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 9029 "configure"
- #include "confdefs.h"
- /* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char _doprnt(); below. */
- #include <assert.h>
- /* Override any gcc2 internal prototype to avoid an error. */
- /* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
- char _doprnt();
- int main() {
- /* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
- #if defined (__stub__doprnt) || defined (__stub____doprnt)
- choke me
- #else
- _doprnt();
- #endif
- ; return 0; }
- EOF
- if { (eval echo configure:9052: "$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func__doprnt=no"
- fi
- rm -f conftest*
- fi
- if eval "test "`echo '$ac_cv_func_'_doprnt`" = yes"; then
- echo "$ac_t""yes" 1>&6
- cat >> confdefs.h <<EOF
- #define HAVE_DOPRNT 1
- EOF
- else
- echo "$ac_t""no" 1>&6
- fi
- fi
- for ac_func in select socket strcspn strdup strspn hstrerror issetugid
- do
- echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
- echo "configure:9079: 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 9084 "configure"
- #include "confdefs.h"
- /* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
- #include <assert.h>
- /* Override any gcc2 internal prototype to avoid an error. */
- /* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
- char $ac_func();
- int main() {
- /* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
- #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
- choke me
- #else
- $ac_func();
- #endif
- ; return 0; }
- EOF
- if { (eval echo configure:9107: "$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
- fi
- rm -f conftest*
- fi
- if eval "test "`echo '$ac_cv_func_'$ac_func`" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
- #define $ac_tr_func 1
- EOF
-
- else
- echo "$ac_t""no" 1>&6
- fi
- done
- for ac_func in strvis snprintf getdtablesize sysconf inet_pton vsyslog
- do
- echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
- echo "configure:9134: 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 9139 "configure"
- #include "confdefs.h"
- /* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
- #include <assert.h>
- /* Override any gcc2 internal prototype to avoid an error. */
- /* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
- char $ac_func();
- int main() {
- /* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
- #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
- choke me
- #else
- $ac_func();
- #endif
- ; return 0; }
- EOF
- if { (eval echo configure:9162: "$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
- fi
- rm -f conftest*
- fi
- if eval "test "`echo '$ac_cv_func_'$ac_func`" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
- #define $ac_tr_func 1
- EOF
-
- else
- echo "$ac_t""no" 1>&6
- fi
- done
- for ac_func in daemon bzero sockatmark difftime memmove seteuid setproctitle
- do
- echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
- echo "configure:9189: 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 9194 "configure"
- #include "confdefs.h"
- /* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
- #include <assert.h>
- /* Override any gcc2 internal prototype to avoid an error. */
- /* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
- char $ac_func();
- int main() {
- /* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
- #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
- choke me
- #else
- $ac_func();
- #endif
- ; return 0; }
- EOF
- if { (eval echo configure:9217: "$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
- fi
- rm -f conftest*
- fi
- if eval "test "`echo '$ac_cv_func_'$ac_func`" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
- #define $ac_tr_func 1
- EOF
-
- else
- echo "$ac_t""no" 1>&6
- fi
- done
- for ac_func in inet_aton
- do
- echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
- echo "configure:9244: 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 9249 "configure"
- #include "confdefs.h"
- /* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
- #include <assert.h>
- /* Override any gcc2 internal prototype to avoid an error. */
- /* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
- char $ac_func();
- int main() {
- /* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
- #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
- choke me
- #else
- $ac_func();
- #endif
- ; return 0; }
- EOF
- if { (eval echo configure:9272: "$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
- fi
- rm -f conftest*
- fi
- if eval "test "`echo '$ac_cv_func_'$ac_func`" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
- #define $ac_tr_func 1
- EOF
-
- else
- echo "$ac_t""no" 1>&6
- fi
- done
- #sun4 seems to have a profiled libc missing strerror
- if test x$s_profiling = x; then
- for ac_func in strerror
- do
- echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
- echo "configure:9302: 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 9307 "configure"
- #include "confdefs.h"
- /* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
- #include <assert.h>
- /* Override any gcc2 internal prototype to avoid an error. */
- /* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
- char $ac_func();
- int main() {
- /* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
- #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
- choke me
- #else
- $ac_func();
- #endif
- ; return 0; }
- EOF
- if { (eval echo configure:9330: "$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
- fi
- rm -f conftest*
- fi
- if eval "test "`echo '$ac_cv_func_'$ac_func`" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
- #define $ac_tr_func 1
- EOF
-
- else
- echo "$ac_t""no" 1>&6
- fi
- done
- else
- case $host in
- *-*-sunos4*)
- echo "configure: warning: omitting strerror test on sunos4 with profiling enabled" 1>&2
- ;;
- *)
- for ac_func in strerror
- do
- echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
- echo "configure:9365: 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 9370 "configure"
- #include "confdefs.h"
- /* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
- #include <assert.h>
- /* Override any gcc2 internal prototype to avoid an error. */
- /* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
- char $ac_func();
- int main() {
- /* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
- #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
- choke me
- #else
- $ac_func();
- #endif
- ; return 0; }
- EOF
- if { (eval echo configure:9393: "$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
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
- fi
- rm -f conftest*
- fi
- if eval "test "`echo '$ac_cv_func_'$ac_func`" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
- #define $ac_tr_func 1
- EOF
-
- else
- echo "$ac_t""no" 1>&6
- fi
- done
- ;;
- esac
- fi
- #add any warning flags (value set above)
- CFLAGS="$CFLAGS $warn"
- #XXXslow
- #The dlib directory is for building a shared library with preloading
- #support (SOCKSLIBRARY_DYNAMIC is defined), when dlopen support is
- #available and requested.
- trap '' 1 2 15
- cat > confcache <<EOF
- # This file is a shell script that caches the results of configure
- # tests run on this system so they can be shared between configure
- # scripts and configure runs. It is not useful on other systems.
- # If it contains results you don't want to keep, you may remove or edit it.
- #
- # By default, configure uses ./config.cache as the cache file,
- # creating it if it does not exist already. You can give configure
- # the --cache-file=FILE option to use a different cache file; that is
- # what configure does when it calls configure scripts in
- # subdirectories, so they share the cache.
- # Giving --cache-file=/dev/null disables caching, for debugging configure.
- # config.status only pays attention to the cache file if you give it the
- # --recheck option to rerun configure.
- #
- EOF
- # The following way of writing the cache mishandles newlines in values,
- # but we know of no workaround that is simple, portable, and efficient.
- # So, don't put newlines in cache variables' values.
- # Ultrix sh set writes to stderr and can't be redirected directly,
- # and sets the high bit in the cache file unless we assign to the vars.
- (set) 2>&1 |
- case `(ac_space=' '; set | grep ac_space) 2>&1` in
- *ac_space= *)
- # `set' does not quote correctly, so add quotes (double-quote substitution
- # turns \\ into \, and sed turns \ into ).
- sed -n
- -e "s/'/'\\''/g"
- -e "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1='\2'}/p"
- ;;
- *)
- # `set' quotes correctly as required by POSIX, so do not add quotes.
- sed -n -e 's/^([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*)=(.*)/1=${1=2}/p'
- ;;
- esac >> confcache
- if cmp -s $cache_file confcache; then
- :
- else
- if test -w $cache_file; then
- echo "updating cache $cache_file"
- cat confcache > $cache_file
- else
- echo "not updating unwritable cache $cache_file"
- fi
- fi
- rm -f confcache
- trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
- test "x$prefix" = xNONE && prefix=$ac_default_prefix
- # Let make expand exec_prefix.
- test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
- # Any assignment to VPATH causes Sun make to only execute
- # the first set of double-colon rules, so remove it if not needed.
- # If there is a colon in the path, we need to keep it.
- if test "x$srcdir" = x.; then
- ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
- fi
- trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
- DEFS=-DHAVE_CONFIG_H
- # Without the "./", some shells look in PATH for config.status.
- : ${CONFIG_STATUS=./config.status}
- echo creating $CONFIG_STATUS
- rm -f $CONFIG_STATUS
- cat > $CONFIG_STATUS <<EOF
- #! /bin/sh
- # Generated automatically by configure.
- # Run this file to recreate the current configuration.
- # This directory was configured as follows,
- # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
- #
- # $0 $ac_configure_args
- #
- # Compiler output produced by configure, useful for debugging
- # configure, is in ./config.log if it exists.
- ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
- for ac_option
- do
- case "$ac_option" in
- -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
- echo "running ${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
- exec ${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
- -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
- echo "$CONFIG_STATUS generated by autoconf version 2.13"
- exit 0 ;;
- -help | --help | --hel | --he | --h)
- echo "$ac_cs_usage"; exit 0 ;;
- *) echo "$ac_cs_usage"; exit 1 ;;
- esac
- done
- ac_given_srcdir=$srcdir
- ac_given_INSTALL="$INSTALL"
- trap 'rm -fr `echo "sockd/Makefile include/Makefile lib/Makefile dlib/Makefile
- Makefile example/Makefile doc/Makefile bin/Makefile
- SPECS/Makefile SPECS/dante.spec bin/socksify
- libscompat/Makefile VERSION include/autoconf.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
- EOF
- cat >> $CONFIG_STATUS <<EOF
- # Protect against being on the right side of a sed subst in config.status.
- sed 's/%@/@@/; s/@%/@@/; s/%g$/@g/; /@g$/s/[\\&%]/\\&/g;
- s/@@/%@/; s/@@/@%/; s/@g$/%g/' > conftest.subs <<\CEOF
- $ac_vpsub
- $extrasub
- s%@SHELL@%$SHELL%g
- s%@CFLAGS@%$CFLAGS%g
- s%@CPPFLAGS@%$CPPFLAGS%g
- s%@CXXFLAGS@%$CXXFLAGS%g
- s%@FFLAGS@%$FFLAGS%g
- s%@DEFS@%$DEFS%g
- s%@LDFLAGS@%$LDFLAGS%g
- s%@LIBS@%$LIBS%g
- s%@exec_prefix@%$exec_prefix%g
- s%@prefix@%$prefix%g
- s%@program_transform_name@%$program_transform_name%g
- s%@bindir@%$bindir%g
- s%@sbindir@%$sbindir%g
- s%@libexecdir@%$libexecdir%g
- s%@datadir@%$datadir%g
- s%@sysconfdir@%$sysconfdir%g
- s%@sharedstatedir@%$sharedstatedir%g
- s%@localstatedir@%$localstatedir%g
- s%@libdir@%$libdir%g
- s%@includedir@%$includedir%g
- s%@oldincludedir@%$oldincludedir%g
- s%@infodir@%$infodir%g
- s%@mandir@%$mandir%g
- s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
- s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
- s%@INSTALL_DATA@%$INSTALL_DATA%g
- s%@PACKAGE@%$PACKAGE%g
- s%@VERSION@%$VERSION%g
- s%@ACLOCAL@%$ACLOCAL%g
- s%@AUTOCONF@%$AUTOCONF%g
- s%@AUTOMAKE@%$AUTOMAKE%g
- s%@AUTOHEADER@%$AUTOHEADER%g
- s%@MAKEINFO@%$MAKEINFO%g
- s%@SET_MAKE@%$SET_MAKE%g
- s%@host@%$host%g
- s%@host_alias@%$host_alias%g
- s%@host_cpu@%$host_cpu%g
- s%@host_vendor@%$host_vendor%g
- s%@host_os@%$host_os%g
- s%@RANLIB@%$RANLIB%g
- s%@CC@%$CC%g
- s%@LD@%$LD%g
- s%@NM@%$NM%g
- s%@LN_S@%$LN_S%g
- s%@LIBTOOL@%$LIBTOOL%g
- s%@PRERELEASE_TRUE@%$PRERELEASE_TRUE%g
- s%@PRERELEASE_FALSE@%$PRERELEASE_FALSE%g
- s%@PRELOAD_SEPERATOR@%$PRELOAD_SEPERATOR%g
- s%@PRELOAD_VARIABLE@%$PRELOAD_VARIABLE%g
- s%@PRELOAD_POSTFIX@%$PRELOAD_POSTFIX%g
- s%@SPROFIL_TRUE@%$SPROFIL_TRUE%g
- s%@SPROFIL_FALSE@%$SPROFIL_FALSE%g
- s%@STATIC_SOCKD_TRUE@%$STATIC_SOCKD_TRUE%g
- s%@STATIC_SOCKD_FALSE@%$STATIC_SOCKD_FALSE%g
- s%@LINT_TRUE@%$LINT_TRUE%g
- s%@LINT_FALSE@%$LINT_FALSE%g
- s%@YACC@%$YACC%g
- s%@AWK@%$AWK%g
- s%@LEX@%$LEX%g
- s%@LEXLIB@%$LEXLIB%g
- s%@CPP@%$CPP%g
- s%@LEX_OUTPUT_ROOT@%$LEX_OUTPUT_ROOT%g
- s%@BUILD_PRELOAD_LIB_TRUE@%$BUILD_PRELOAD_LIB_TRUE%g
- s%@BUILD_PRELOAD_LIB_FALSE@%$BUILD_PRELOAD_LIB_FALSE%g
- s%@SOCKSIFY_PRELOAD_LIBS@%$SOCKSIFY_PRELOAD_LIBS%g
- s%@LIBRARY_PREFIX@%$LIBRARY_PREFIX%g
- s%@LIBOBJS@%$LIBOBJS%g
- CEOF
- EOF
- cat >> $CONFIG_STATUS <<EOF
- # Split the substitutions into bite-sized pieces for seds with
- # small command number limits, like on Digital OSF/1 and HP-UX.
- ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
- ac_file=1 # Number of current file.
- ac_beg=1 # First line for current file.
- ac_end=$ac_max_sed_cmds # Line after last line for current file.
- ac_more_lines=:
- ac_sed_cmds=""
- while $ac_more_lines; do
- if test $ac_beg -gt 1; then
- sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
- else
- sed "${ac_end}q" conftest.subs > conftest.s$ac_file
- fi
- if test ! -s conftest.s$ac_file; then
- ac_more_lines=false
- rm -f conftest.s$ac_file
- else
- if test -z "$ac_sed_cmds"; then
- ac_sed_cmds="sed -f conftest.s$ac_file"
- else
- ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
- fi
- ac_file=`expr $ac_file + 1`
- ac_beg=$ac_end
- ac_end=`expr $ac_end + $ac_max_sed_cmds`
- fi
- done
- if test -z "$ac_sed_cmds"; then
- ac_sed_cmds=cat
- fi
- EOF
- cat >> $CONFIG_STATUS <<EOF
- CONFIG_FILES=${CONFIG_FILES-"sockd/Makefile include/Makefile lib/Makefile dlib/Makefile
- Makefile example/Makefile doc/Makefile bin/Makefile
- SPECS/Makefile SPECS/dante.spec bin/socksify
- libscompat/Makefile VERSION"}
- EOF
- cat >> $CONFIG_STATUS <<EOF
- for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
- # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
- case "$ac_file" in
- *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
- ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
- *) ac_file_in="${ac_file}.in" ;;
- esac
- # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
- # Remove last slash and all that follows it. Not all systems have dirname.
- ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
- if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
- # The file is in a subdirectory.
- test ! -d "$ac_dir" && mkdir "$ac_dir"
- ac_dir_suffix="/`echo $ac_dir|sed 's%^./%%'`"
- # A "../" for each directory in $ac_dir_suffix.
- ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
- else
- ac_dir_suffix= ac_dots=
- fi
- case "$ac_given_srcdir" in
- .) srcdir=.
- if test -z "$ac_dots"; then top_srcdir=.
- else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
- /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
- *) # Relative path.
- srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
- top_srcdir="$ac_dots$ac_given_srcdir" ;;
- esac
- case "$ac_given_INSTALL" in
- [/$]*) INSTALL="$ac_given_INSTALL" ;;
- *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
- esac
- echo creating "$ac_file"
- rm -f "$ac_file"
- configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
- case "$ac_file" in
- *Makefile*) ac_comsub="1i\
- # $configure_input" ;;
- *) ac_comsub= ;;
- esac
- ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
- sed -e "$ac_comsub
- s%@configure_input@%$configure_input%g
- s%@srcdir@%$srcdir%g
- s%@top_srcdir@%$top_srcdir%g
- s%@INSTALL@%$INSTALL%g
- " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
- fi; done
- rm -f conftest.s*
- # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
- # NAME is the cpp macro being defined and VALUE is the value it is being given.
- #
- # ac_d sets the value in "#define NAME VALUE" lines.
- ac_dA='s%^([ ]*)#([ ]*define[ ][ ]*)'
- ac_dB='([ ][ ]*)[^ ]*%1#2'
- ac_dC='3'
- ac_dD='%g'
- # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
- ac_uA='s%^([ ]*)#([ ]*)undef([ ][ ]*)'
- ac_uB='([ ])%1#2define3'
- ac_uC=' '
- ac_uD='4%g'
- # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
- ac_eA='s%^([ ]*)#([ ]*)undef([ ][ ]*)'
- ac_eB='$%1#2define3'
- ac_eC=' '
- ac_eD='%g'
- if test "${CONFIG_HEADERS+set}" != set; then
- EOF
- cat >> $CONFIG_STATUS <<EOF
- CONFIG_HEADERS="include/autoconf.h"
- EOF
- cat >> $CONFIG_STATUS <<EOF
- fi
- for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
- # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
- case "$ac_file" in
- *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
- ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
- *) ac_file_in="${ac_file}.in" ;;
- esac
- echo creating $ac_file
- rm -f conftest.frag conftest.in conftest.out
- ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
- cat $ac_file_inputs > conftest.in
- EOF
- # Transform confdefs.h into a sed script conftest.vals that substitutes
- # the proper values into config.h.in to produce config.h. And first:
- # Protect against being on the right side of a sed subst in config.status.
- # Protect against being in an unquoted here document in config.status.
- rm -f conftest.vals
- cat > conftest.hdr <<EOF
- s/[\&%]/\&/g
- s%[\$`]%\&%g
- s%#define ([A-Za-z_][A-Za-z0-9_]*) *(.*)%${ac_dA}1${ac_dB}1${ac_dC}2${ac_dD}%gp
- s%ac_d%ac_u%gp
- s%ac_u%ac_e%gp
- EOF
- sed -n -f conftest.hdr confdefs.h > conftest.vals
- rm -f conftest.hdr
- # This sed command replaces #undef with comments. This is necessary, for
- # example, in the case of _POSIX_SOURCE, which is predefined and required
- # on some systems where configure will not decide to define it.
- cat >> conftest.vals <<EOF
- s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
- EOF
- # Break up conftest.vals because some shells have a limit on
- # the size of here documents, and old seds have small limits too.
- rm -f conftest.tail
- while :
- do
- ac_lines=`grep -c . conftest.vals`
- # grep -c gives empty output for an empty file on some AIX systems.
- if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
- # Write a limited-size here document to conftest.frag.
- echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
- sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
- echo 'CEOF
- sed -f conftest.frag conftest.in > conftest.out
- rm -f conftest.in
- mv conftest.out conftest.in
- ' >> $CONFIG_STATUS
- sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
- rm -f conftest.vals
- mv conftest.tail conftest.vals
- done
- rm -f conftest.vals
- cat >> $CONFIG_STATUS <<EOF
- rm -f conftest.frag conftest.h
- echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
- cat conftest.in >> conftest.h
- rm -f conftest.in
- if cmp -s $ac_file conftest.h 2>/dev/null; then
- echo "$ac_file is unchanged"
- rm -f conftest.h
- else
- # Remove last slash and all that follows it. Not all systems have dirname.
- ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
- if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
- # The file is in a subdirectory.
- test ! -d "$ac_dir" && mkdir "$ac_dir"
- fi
- rm -f $ac_file
- mv conftest.h $ac_file
- fi
- fi; done
- EOF
- cat >> $CONFIG_STATUS <<EOF
- ac_sources="lib/config.c lib/config_parse.y lib/config_scan.l lib/io.c lib/log.c lib/protocol.c lib/socket.c lib/util.c lib/udp_util.c lib/debug.c lib/hostcache.c lib/Raccept.c lib/Rbind.c lib/Rbindresvport.c lib/Rconnect.c lib/Rgethostbyname.c lib/Rgetpeername.c lib/Rgetsockname.c lib/Rrresvport.c lib/Rcompat.c lib/address.c lib/authneg.c lib/client.c lib/clientconfig.c lib/clientprotocol.c lib/msproxy_clientprotocol.c lib/config.c lib/config_parse.y lib/config_scan.l lib/debug.c lib/io.c lib/log.c lib/method_uname.c lib/protocol.c lib/socket.c lib/connectchild.c lib/udp.c lib/udp_util.c lib/userio.c lib/util.c lib/hostcache.c"
- ac_dests="sockd/config.c sockd/config_parse.y sockd/config_scan.l sockd/io.c sockd/log.c sockd/lib_protocol.c sockd/socket.c sockd/util.c sockd/udp_util.c sockd/debug.c sockd/hostcache.c dlib/Raccept.c dlib/Rbind.c dlib/Rbindresvport.c dlib/Rconnect.c dlib/Rgethostbyname.c dlib/Rgetpeername.c dlib/Rgetsockname.c dlib/Rrresvport.c dlib/Rcompat.c dlib/address.c dlib/authneg.c dlib/client.c dlib/clientconfig.c dlib/clientprotocol.c dlib/msproxy_clientprotocol.c dlib/config.c dlib/config_parse.y dlib/config_scan.l dlib/debug.c dlib/io.c dlib/log.c dlib/method_uname.c dlib/protocol.c dlib/socket.c dlib/connectchild.c dlib/udp.c dlib/udp_util.c dlib/userio.c dlib/util.c dlib/hostcache.c"
- EOF
- cat >> $CONFIG_STATUS <<EOF
- srcdir=$ac_given_srcdir
- while test -n "$ac_sources"; do
- set $ac_dests; ac_dest=$1; shift; ac_dests=$*
- set $ac_sources; ac_source=$1; shift; ac_sources=$*
- echo "linking $srcdir/$ac_source to $ac_dest"
- if test ! -r $srcdir/$ac_source; then
- { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; }
- fi
- rm -f $ac_dest
- # Make relative symlinks.
- # Remove last slash and all that follows it. Not all systems have dirname.
- ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'`
- if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
- # The dest file is in a subdirectory.
- test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
- ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^./%%'`"
- # A "../" for each directory in $ac_dest_dir_suffix.
- ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
- else
- ac_dest_dir_suffix= ac_dots=
- fi
- case "$srcdir" in
- [/$]*) ac_rel_source="$srcdir/$ac_source" ;;
- *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
- esac
- # Make a symlink if possible; otherwise try a hard link.
- if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
- ln $srcdir/$ac_source $ac_dest; then :
- else
- { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; }
- fi
- done
- EOF
- cat >> $CONFIG_STATUS <<EOF
- EOF
- cat >> $CONFIG_STATUS <<EOF
- test -z "$CONFIG_HEADERS" || echo timestamp > include/stamp-h
- exit 0
- EOF
- chmod +x $CONFIG_STATUS
- rm -fr confdefs* $ac_clean_files
- test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1