configure
上传用户:awang829
上传日期:2019-07-14
资源大小:2356k
文件大小:565k
- IFS=$as_save_IFS
- fi
- EGREP="$ac_cv_path_EGREP"
- if test -z "$EGREP"; then
- { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
- echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
- { (exit 1); exit 1; }; }
- fi
- else
- ac_cv_path_EGREP=$EGREP
- fi
- fi
- fi
- { echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
- echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
- EGREP="$ac_cv_path_EGREP"
- { echo "$as_me:$LINENO: checking for ANSI C header files" >&5
- echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
- if test "${ac_cv_header_stdc+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- cat >conftest.$ac_ext <<_ACEOF
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
- cat >>conftest.$ac_ext <<_ACEOF
- /* end confdefs.h. */
- #include <stdlib.h>
- #include <stdarg.h>
- #include <string.h>
- #include <float.h>
- int
- main ()
- {
- ;
- return 0;
- }
- _ACEOF
- rm -f conftest.$ac_objext
- if { (ac_try="$ac_compile"
- case "(($ac_try" in
- *"* | *`* | *\*) ac_try_echo=$ac_try;;
- *) ac_try_echo=$ac_try;;
- esac
- eval "echo "$as_me:$LINENO: $ac_try_echo"") >&5
- (eval "$ac_compile") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: $? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
- ac_cv_header_stdc=yes
- else
- echo "$as_me: failed program was:" >&5
- sed 's/^/| /' conftest.$ac_ext >&5
- ac_cv_header_stdc=no
- fi
- rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- if test $ac_cv_header_stdc = yes; then
- # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
- cat >conftest.$ac_ext <<_ACEOF
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
- cat >>conftest.$ac_ext <<_ACEOF
- /* end confdefs.h. */
- #include <string.h>
- _ACEOF
- if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "memchr" >/dev/null 2>&1; then
- :
- else
- ac_cv_header_stdc=no
- fi
- rm -f conftest*
- fi
- if test $ac_cv_header_stdc = yes; then
- # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
- cat >conftest.$ac_ext <<_ACEOF
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
- cat >>conftest.$ac_ext <<_ACEOF
- /* end confdefs.h. */
- #include <stdlib.h>
- _ACEOF
- if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "free" >/dev/null 2>&1; then
- :
- else
- ac_cv_header_stdc=no
- fi
- rm -f conftest*
- fi
- if test $ac_cv_header_stdc = yes; then
- # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
- if test "$cross_compiling" = yes; then
- :
- else
- cat >conftest.$ac_ext <<_ACEOF
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
- cat >>conftest.$ac_ext <<_ACEOF
- /* end confdefs.h. */
- #include <ctype.h>
- #include <stdlib.h>
- #if ((' ' & 0x0FF) == 0x020)
- # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
- # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
- #else
- # define ISLOWER(c)
- (('a' <= (c) && (c) <= 'i')
- || ('j' <= (c) && (c) <= 'r')
- || ('s' <= (c) && (c) <= 'z'))
- # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
- #endif
- #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
- int
- main ()
- {
- int i;
- for (i = 0; i < 256; i++)
- if (XOR (islower (i), ISLOWER (i))
- || toupper (i) != TOUPPER (i))
- return 2;
- return 0;
- }
- _ACEOF
- rm -f conftest$ac_exeext
- if { (ac_try="$ac_link"
- case "(($ac_try" in
- *"* | *`* | *\*) ac_try_echo=$ac_try;;
- *) ac_try_echo=$ac_try;;
- esac
- eval "echo "$as_me:$LINENO: $ac_try_echo"") >&5
- (eval "$ac_link") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: $? = $ac_status" >&5
- (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (case "(($ac_try" in
- *"* | *`* | *\*) ac_try_echo=$ac_try;;
- *) ac_try_echo=$ac_try;;
- esac
- eval "echo "$as_me:$LINENO: $ac_try_echo"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: $? = $ac_status" >&5
- (exit $ac_status); }; }; then
- :
- else
- echo "$as_me: program exited with status $ac_status" >&5
- echo "$as_me: failed program was:" >&5
- sed 's/^/| /' conftest.$ac_ext >&5
- ( exit $ac_status )
- ac_cv_header_stdc=no
- fi
- rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
- fi
- fi
- fi
- { echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
- echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
- if test $ac_cv_header_stdc = yes; then
- cat >>confdefs.h <<_ACEOF
- #define STDC_HEADERS 1
- _ACEOF
- fi
- # On IRIX 5.3, sys/types and inttypes.h are conflicting.
- for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h
- inttypes.h stdint.h unistd.h
- do
- as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
- { echo "$as_me:$LINENO: checking for $ac_header" >&5
- echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
- if { as_var=$as_ac_Header; eval "test "${$as_var+set}" = set"; }; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- cat >conftest.$ac_ext <<_ACEOF
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
- cat >>conftest.$ac_ext <<_ACEOF
- /* end confdefs.h. */
- $ac_includes_default
- #include <$ac_header>
- _ACEOF
- rm -f conftest.$ac_objext
- if { (ac_try="$ac_compile"
- case "(($ac_try" in
- *"* | *`* | *\*) ac_try_echo=$ac_try;;
- *) ac_try_echo=$ac_try;;
- esac
- eval "echo "$as_me:$LINENO: $ac_try_echo"") >&5
- (eval "$ac_compile") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: $? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
- eval "$as_ac_Header=yes"
- else
- echo "$as_me: failed program was:" >&5
- sed 's/^/| /' conftest.$ac_ext >&5
- eval "$as_ac_Header=no"
- fi
- rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- ac_res=`eval echo '${'$as_ac_Header'}'`
- { echo "$as_me:$LINENO: result: $ac_res" >&5
- echo "${ECHO_T}$ac_res" >&6; }
- if test `eval echo '${'$as_ac_Header'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
- #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
- _ACEOF
- fi
- done
- { echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
- echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; }
- if test "${ac_cv_c_bigendian+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- # See if sys/param.h defines the BYTE_ORDER macro.
- cat >conftest.$ac_ext <<_ACEOF
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
- cat >>conftest.$ac_ext <<_ACEOF
- /* end confdefs.h. */
- #include <sys/types.h>
- #include <sys/param.h>
- int
- main ()
- {
- #if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN
- && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN)
- bogus endian macros
- #endif
- ;
- return 0;
- }
- _ACEOF
- rm -f conftest.$ac_objext
- if { (ac_try="$ac_compile"
- case "(($ac_try" in
- *"* | *`* | *\*) ac_try_echo=$ac_try;;
- *) ac_try_echo=$ac_try;;
- esac
- eval "echo "$as_me:$LINENO: $ac_try_echo"") >&5
- (eval "$ac_compile") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: $? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
- # It does; now see whether it defined to BIG_ENDIAN or not.
- cat >conftest.$ac_ext <<_ACEOF
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
- cat >>conftest.$ac_ext <<_ACEOF
- /* end confdefs.h. */
- #include <sys/types.h>
- #include <sys/param.h>
- int
- main ()
- {
- #if BYTE_ORDER != BIG_ENDIAN
- not big endian
- #endif
- ;
- return 0;
- }
- _ACEOF
- rm -f conftest.$ac_objext
- if { (ac_try="$ac_compile"
- case "(($ac_try" in
- *"* | *`* | *\*) ac_try_echo=$ac_try;;
- *) ac_try_echo=$ac_try;;
- esac
- eval "echo "$as_me:$LINENO: $ac_try_echo"") >&5
- (eval "$ac_compile") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: $? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
- ac_cv_c_bigendian=yes
- else
- echo "$as_me: failed program was:" >&5
- sed 's/^/| /' conftest.$ac_ext >&5
- ac_cv_c_bigendian=no
- fi
- rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- else
- echo "$as_me: failed program was:" >&5
- sed 's/^/| /' conftest.$ac_ext >&5
- # It does not; compile a test program.
- if test "$cross_compiling" = yes; then
- # try to guess the endianness by grepping values into an object file
- ac_cv_c_bigendian=unknown
- cat >conftest.$ac_ext <<_ACEOF
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
- cat >>conftest.$ac_ext <<_ACEOF
- /* end confdefs.h. */
- short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
- short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
- void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
- short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
- short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
- void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
- int
- main ()
- {
- _ascii (); _ebcdic ();
- ;
- return 0;
- }
- _ACEOF
- rm -f conftest.$ac_objext
- if { (ac_try="$ac_compile"
- case "(($ac_try" in
- *"* | *`* | *\*) ac_try_echo=$ac_try;;
- *) ac_try_echo=$ac_try;;
- esac
- eval "echo "$as_me:$LINENO: $ac_try_echo"") >&5
- (eval "$ac_compile") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: $? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
- if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
- ac_cv_c_bigendian=yes
- fi
- if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
- if test "$ac_cv_c_bigendian" = unknown; then
- ac_cv_c_bigendian=no
- else
- # finding both strings is unlikely to happen, but who knows?
- ac_cv_c_bigendian=unknown
- fi
- fi
- else
- echo "$as_me: failed program was:" >&5
- sed 's/^/| /' conftest.$ac_ext >&5
- fi
- rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- else
- cat >conftest.$ac_ext <<_ACEOF
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
- cat >>conftest.$ac_ext <<_ACEOF
- /* end confdefs.h. */
- $ac_includes_default
- int
- main ()
- {
- /* Are we little or big endian? From Harbison&Steele. */
- union
- {
- long int l;
- char c[sizeof (long int)];
- } u;
- u.l = 1;
- return u.c[sizeof (long int) - 1] == 1;
- ;
- return 0;
- }
- _ACEOF
- rm -f conftest$ac_exeext
- if { (ac_try="$ac_link"
- case "(($ac_try" in
- *"* | *`* | *\*) ac_try_echo=$ac_try;;
- *) ac_try_echo=$ac_try;;
- esac
- eval "echo "$as_me:$LINENO: $ac_try_echo"") >&5
- (eval "$ac_link") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: $? = $ac_status" >&5
- (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (case "(($ac_try" in
- *"* | *`* | *\*) ac_try_echo=$ac_try;;
- *) ac_try_echo=$ac_try;;
- esac
- eval "echo "$as_me:$LINENO: $ac_try_echo"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: $? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_c_bigendian=no
- else
- echo "$as_me: program exited with status $ac_status" >&5
- echo "$as_me: failed program was:" >&5
- sed 's/^/| /' conftest.$ac_ext >&5
- ( exit $ac_status )
- ac_cv_c_bigendian=yes
- fi
- rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
- fi
- fi
- rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- { echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
- echo "${ECHO_T}$ac_cv_c_bigendian" >&6; }
- case $ac_cv_c_bigendian in
- yes)
- cat >>confdefs.h <<_ACEOF
- #define WORDS_BIGENDIAN 1
- _ACEOF
- ;;
- no)
- ;;
- *)
- { { echo "$as_me:$LINENO: error: unknown endianness
- presetting ac_cv_c_bigendian=no (or yes) will help" >&5
- echo "$as_me: error: unknown endianness
- presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
- { (exit 1); exit 1; }; } ;;
- esac
- { echo "$as_me:$LINENO: checking for library containing socket" >&5
- echo $ECHO_N "checking for library containing socket... $ECHO_C" >&6; }
- if test "${ac_cv_search_socket+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- ac_func_search_save_LIBS=$LIBS
- cat >conftest.$ac_ext <<_ACEOF
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
- cat >>conftest.$ac_ext <<_ACEOF
- /* end confdefs.h. */
- /* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
- #ifdef __cplusplus
- extern "C"
- #endif
- char socket ();
- int
- main ()
- {
- return socket ();
- ;
- return 0;
- }
- _ACEOF
- for ac_lib in '' socket; do
- if test -z "$ac_lib"; then
- ac_res="none required"
- else
- ac_res=-l$ac_lib
- LIBS="-l$ac_lib $ac_func_search_save_LIBS"
- fi
- rm -f conftest.$ac_objext conftest$ac_exeext
- if { (ac_try="$ac_link"
- case "(($ac_try" in
- *"* | *`* | *\*) ac_try_echo=$ac_try;;
- *) ac_try_echo=$ac_try;;
- esac
- eval "echo "$as_me:$LINENO: $ac_try_echo"") >&5
- (eval "$ac_link") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: $? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest$ac_exeext &&
- $as_test_x conftest$ac_exeext; then
- ac_cv_search_socket=$ac_res
- else
- echo "$as_me: failed program was:" >&5
- sed 's/^/| /' conftest.$ac_ext >&5
- fi
- rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo
- conftest$ac_exeext
- if test "${ac_cv_search_socket+set}" = set; then
- break
- fi
- done
- if test "${ac_cv_search_socket+set}" = set; then
- :
- else
- ac_cv_search_socket=no
- fi
- rm conftest.$ac_ext
- LIBS=$ac_func_search_save_LIBS
- fi
- { echo "$as_me:$LINENO: result: $ac_cv_search_socket" >&5
- echo "${ECHO_T}$ac_cv_search_socket" >&6; }
- ac_res=$ac_cv_search_socket
- if test "$ac_res" != no; then
- test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
- fi
- { echo "$as_me:$LINENO: checking for library containing gethostbyname" >&5
- echo $ECHO_N "checking for library containing gethostbyname... $ECHO_C" >&6; }
- if test "${ac_cv_search_gethostbyname+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- ac_func_search_save_LIBS=$LIBS
- cat >conftest.$ac_ext <<_ACEOF
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
- cat >>conftest.$ac_ext <<_ACEOF
- /* end confdefs.h. */
- /* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
- #ifdef __cplusplus
- extern "C"
- #endif
- char gethostbyname ();
- int
- main ()
- {
- return gethostbyname ();
- ;
- return 0;
- }
- _ACEOF
- for ac_lib in '' nsl; do
- if test -z "$ac_lib"; then
- ac_res="none required"
- else
- ac_res=-l$ac_lib
- LIBS="-l$ac_lib $ac_func_search_save_LIBS"
- fi
- rm -f conftest.$ac_objext conftest$ac_exeext
- if { (ac_try="$ac_link"
- case "(($ac_try" in
- *"* | *`* | *\*) ac_try_echo=$ac_try;;
- *) ac_try_echo=$ac_try;;
- esac
- eval "echo "$as_me:$LINENO: $ac_try_echo"") >&5
- (eval "$ac_link") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: $? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest$ac_exeext &&
- $as_test_x conftest$ac_exeext; then
- ac_cv_search_gethostbyname=$ac_res
- else
- echo "$as_me: failed program was:" >&5
- sed 's/^/| /' conftest.$ac_ext >&5
- fi
- rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo
- conftest$ac_exeext
- if test "${ac_cv_search_gethostbyname+set}" = set; then
- break
- fi
- done
- if test "${ac_cv_search_gethostbyname+set}" = set; then
- :
- else
- ac_cv_search_gethostbyname=no
- fi
- rm conftest.$ac_ext
- LIBS=$ac_func_search_save_LIBS
- fi
- { echo "$as_me:$LINENO: result: $ac_cv_search_gethostbyname" >&5
- echo "${ECHO_T}$ac_cv_search_gethostbyname" >&6; }
- ac_res=$ac_cv_search_gethostbyname
- if test "$ac_res" != no; then
- test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
- fi
- { echo "$as_me:$LINENO: checking for library containing dlopen" >&5
- echo $ECHO_N "checking for library containing dlopen... $ECHO_C" >&6; }
- if test "${ac_cv_search_dlopen+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- ac_func_search_save_LIBS=$LIBS
- cat >conftest.$ac_ext <<_ACEOF
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
- cat >>conftest.$ac_ext <<_ACEOF
- /* end confdefs.h. */
- /* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
- #ifdef __cplusplus
- extern "C"
- #endif
- char dlopen ();
- int
- main ()
- {
- return dlopen ();
- ;
- return 0;
- }
- _ACEOF
- for ac_lib in '' dl; do
- if test -z "$ac_lib"; then
- ac_res="none required"
- else
- ac_res=-l$ac_lib
- LIBS="-l$ac_lib $ac_func_search_save_LIBS"
- fi
- rm -f conftest.$ac_objext conftest$ac_exeext
- if { (ac_try="$ac_link"
- case "(($ac_try" in
- *"* | *`* | *\*) ac_try_echo=$ac_try;;
- *) ac_try_echo=$ac_try;;
- esac
- eval "echo "$as_me:$LINENO: $ac_try_echo"") >&5
- (eval "$ac_link") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: $? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest$ac_exeext &&
- $as_test_x conftest$ac_exeext; then
- ac_cv_search_dlopen=$ac_res
- else
- echo "$as_me: failed program was:" >&5
- sed 's/^/| /' conftest.$ac_ext >&5
- fi
- rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo
- conftest$ac_exeext
- if test "${ac_cv_search_dlopen+set}" = set; then
- break
- fi
- done
- if test "${ac_cv_search_dlopen+set}" = set; then
- :
- else
- ac_cv_search_dlopen=no
- fi
- rm conftest.$ac_ext
- LIBS=$ac_func_search_save_LIBS
- fi
- { echo "$as_me:$LINENO: result: $ac_cv_search_dlopen" >&5
- echo "${ECHO_T}$ac_cv_search_dlopen" >&6; }
- ac_res=$ac_cv_search_dlopen
- if test "$ac_res" != no; then
- test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
- fi
- { echo "$as_me:$LINENO: checking for library containing inet_aton" >&5
- echo $ECHO_N "checking for library containing inet_aton... $ECHO_C" >&6; }
- if test "${ac_cv_search_inet_aton+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- ac_func_search_save_LIBS=$LIBS
- cat >conftest.$ac_ext <<_ACEOF
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
- cat >>conftest.$ac_ext <<_ACEOF
- /* end confdefs.h. */
- /* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
- #ifdef __cplusplus
- extern "C"
- #endif
- char inet_aton ();
- int
- main ()
- {
- return inet_aton ();
- ;
- return 0;
- }
- _ACEOF
- for ac_lib in '' resolv; do
- if test -z "$ac_lib"; then
- ac_res="none required"
- else
- ac_res=-l$ac_lib
- LIBS="-l$ac_lib $ac_func_search_save_LIBS"
- fi
- rm -f conftest.$ac_objext conftest$ac_exeext
- if { (ac_try="$ac_link"
- case "(($ac_try" in
- *"* | *`* | *\*) ac_try_echo=$ac_try;;
- *) ac_try_echo=$ac_try;;
- esac
- eval "echo "$as_me:$LINENO: $ac_try_echo"") >&5
- (eval "$ac_link") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: $? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest$ac_exeext &&
- $as_test_x conftest$ac_exeext; then
- ac_cv_search_inet_aton=$ac_res
- else
- echo "$as_me: failed program was:" >&5
- sed 's/^/| /' conftest.$ac_ext >&5
- fi
- rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo
- conftest$ac_exeext
- if test "${ac_cv_search_inet_aton+set}" = set; then
- break
- fi
- done
- if test "${ac_cv_search_inet_aton+set}" = set; then
- :
- else
- ac_cv_search_inet_aton=no
- fi
- rm conftest.$ac_ext
- LIBS=$ac_func_search_save_LIBS
- fi
- { echo "$as_me:$LINENO: result: $ac_cv_search_inet_aton" >&5
- echo "${ECHO_T}$ac_cv_search_inet_aton" >&6; }
- ac_res=$ac_cv_search_inet_aton
- if test "$ac_res" != no; then
- test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
- fi
- if test "$enable_threads" = "yes"; then
- { echo "$as_me:$LINENO: checking for library containing pthread_create" >&5
- echo $ECHO_N "checking for library containing pthread_create... $ECHO_C" >&6; }
- if test "${ac_cv_search_pthread_create+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- ac_func_search_save_LIBS=$LIBS
- cat >conftest.$ac_ext <<_ACEOF
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
- cat >>conftest.$ac_ext <<_ACEOF
- /* end confdefs.h. */
- /* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
- #ifdef __cplusplus
- extern "C"
- #endif
- char pthread_create ();
- int
- main ()
- {
- return pthread_create ();
- ;
- return 0;
- }
- _ACEOF
- for ac_lib in '' pthread; do
- if test -z "$ac_lib"; then
- ac_res="none required"
- else
- ac_res=-l$ac_lib
- LIBS="-l$ac_lib $ac_func_search_save_LIBS"
- fi
- rm -f conftest.$ac_objext conftest$ac_exeext
- if { (ac_try="$ac_link"
- case "(($ac_try" in
- *"* | *`* | *\*) ac_try_echo=$ac_try;;
- *) ac_try_echo=$ac_try;;
- esac
- eval "echo "$as_me:$LINENO: $ac_try_echo"") >&5
- (eval "$ac_link") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: $? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest$ac_exeext &&
- $as_test_x conftest$ac_exeext; then
- ac_cv_search_pthread_create=$ac_res
- else
- echo "$as_me: failed program was:" >&5
- sed 's/^/| /' conftest.$ac_ext >&5
- fi
- rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo
- conftest$ac_exeext
- if test "${ac_cv_search_pthread_create+set}" = set; then
- break
- fi
- done
- if test "${ac_cv_search_pthread_create+set}" = set; then
- :
- else
- ac_cv_search_pthread_create=no
- fi
- rm conftest.$ac_ext
- LIBS=$ac_func_search_save_LIBS
- fi
- { echo "$as_me:$LINENO: result: $ac_cv_search_pthread_create" >&5
- echo "${ECHO_T}$ac_cv_search_pthread_create" >&6; }
- ac_res=$ac_cv_search_pthread_create
- if test "$ac_res" != no; then
- test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
- fi
- { echo "$as_me:$LINENO: checking for library containing pthread_detach" >&5
- echo $ECHO_N "checking for library containing pthread_detach... $ECHO_C" >&6; }
- if test "${ac_cv_search_pthread_detach+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- ac_func_search_save_LIBS=$LIBS
- cat >conftest.$ac_ext <<_ACEOF
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
- cat >>conftest.$ac_ext <<_ACEOF
- /* end confdefs.h. */
- /* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
- #ifdef __cplusplus
- extern "C"
- #endif
- char pthread_detach ();
- int
- main ()
- {
- return pthread_detach ();
- ;
- return 0;
- }
- _ACEOF
- for ac_lib in '' pthread; do
- if test -z "$ac_lib"; then
- ac_res="none required"
- else
- ac_res=-l$ac_lib
- LIBS="-l$ac_lib $ac_func_search_save_LIBS"
- fi
- rm -f conftest.$ac_objext conftest$ac_exeext
- if { (ac_try="$ac_link"
- case "(($ac_try" in
- *"* | *`* | *\*) ac_try_echo=$ac_try;;
- *) ac_try_echo=$ac_try;;
- esac
- eval "echo "$as_me:$LINENO: $ac_try_echo"") >&5
- (eval "$ac_link") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: $? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest$ac_exeext &&
- $as_test_x conftest$ac_exeext; then
- ac_cv_search_pthread_detach=$ac_res
- else
- echo "$as_me: failed program was:" >&5
- sed 's/^/| /' conftest.$ac_ext >&5
- fi
- rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo
- conftest$ac_exeext
- if test "${ac_cv_search_pthread_detach+set}" = set; then
- break
- fi
- done
- if test "${ac_cv_search_pthread_detach+set}" = set; then
- :
- else
- ac_cv_search_pthread_detach=no
- fi
- rm conftest.$ac_ext
- LIBS=$ac_func_search_save_LIBS
- fi
- { echo "$as_me:$LINENO: result: $ac_cv_search_pthread_detach" >&5
- echo "${ECHO_T}$ac_cv_search_pthread_detach" >&6; }
- ac_res=$ac_cv_search_pthread_detach
- if test "$ac_res" != no; then
- test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
- fi
- fi
- for ac_func in gettimeofday ftime socketpair uname inet_aton strptime getrlimit strlcat strlcpy strtoull getaddrinfo localtime_r gmtime_r memmem strtok_r writev readv flock prctl
- do
- as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
- { echo "$as_me:$LINENO: checking for $ac_func" >&5
- echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
- if { as_var=$as_ac_var; eval "test "${$as_var+set}" = set"; }; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- cat >conftest.$ac_ext <<_ACEOF
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
- cat >>conftest.$ac_ext <<_ACEOF
- /* end confdefs.h. */
- /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
- #define $ac_func innocuous_$ac_func
- /* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below.
- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- <limits.h> exists even on freestanding compilers. */
- #ifdef __STDC__
- # include <limits.h>
- #else
- # include <assert.h>
- #endif
- #undef $ac_func
- /* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
- #ifdef __cplusplus
- extern "C"
- #endif
- char $ac_func ();
- /* 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
- #endif
- int
- main ()
- {
- return $ac_func ();
- ;
- return 0;
- }
- _ACEOF
- rm -f conftest.$ac_objext conftest$ac_exeext
- if { (ac_try="$ac_link"
- case "(($ac_try" in
- *"* | *`* | *\*) ac_try_echo=$ac_try;;
- *) ac_try_echo=$ac_try;;
- esac
- eval "echo "$as_me:$LINENO: $ac_try_echo"") >&5
- (eval "$ac_link") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: $? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest$ac_exeext &&
- $as_test_x conftest$ac_exeext; then
- eval "$as_ac_var=yes"
- else
- echo "$as_me: failed program was:" >&5
- sed 's/^/| /' conftest.$ac_ext >&5
- eval "$as_ac_var=no"
- fi
- rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo
- conftest$ac_exeext conftest.$ac_ext
- fi
- ac_res=`eval echo '${'$as_ac_var'}'`
- { echo "$as_me:$LINENO: result: $ac_res" >&5
- echo "${ECHO_T}$ac_res" >&6; }
- if test `eval echo '${'$as_ac_var'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
- #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
- _ACEOF
- fi
- done
- using_custom_malloc=no
- if test x$enable_openbsd_malloc = xyes ; then
- cat >>confdefs.h <<_ACEOF
- #define HAVE_MALLOC_GOOD_SIZE 1
- _ACEOF
- using_custom_malloc=yes
- fi
- if test x$tcmalloc = xyes ; then
- using_custom_malloc=yes
- fi
- if test $using_custom_malloc = no ; then
- for ac_func in mallinfo malloc_good_size malloc_usable_size
- do
- as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
- { echo "$as_me:$LINENO: checking for $ac_func" >&5
- echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
- if { as_var=$as_ac_var; eval "test "${$as_var+set}" = set"; }; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- cat >conftest.$ac_ext <<_ACEOF
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
- cat >>conftest.$ac_ext <<_ACEOF
- /* end confdefs.h. */
- /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
- #define $ac_func innocuous_$ac_func
- /* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below.
- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- <limits.h> exists even on freestanding compilers. */
- #ifdef __STDC__
- # include <limits.h>
- #else
- # include <assert.h>
- #endif
- #undef $ac_func
- /* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
- #ifdef __cplusplus
- extern "C"
- #endif
- char $ac_func ();
- /* 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
- #endif
- int
- main ()
- {
- return $ac_func ();
- ;
- return 0;
- }
- _ACEOF
- rm -f conftest.$ac_objext conftest$ac_exeext
- if { (ac_try="$ac_link"
- case "(($ac_try" in
- *"* | *`* | *\*) ac_try_echo=$ac_try;;
- *) ac_try_echo=$ac_try;;
- esac
- eval "echo "$as_me:$LINENO: $ac_try_echo"") >&5
- (eval "$ac_link") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: $? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest$ac_exeext &&
- $as_test_x conftest$ac_exeext; then
- eval "$as_ac_var=yes"
- else
- echo "$as_me: failed program was:" >&5
- sed 's/^/| /' conftest.$ac_ext >&5
- eval "$as_ac_var=no"
- fi
- rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo
- conftest$ac_exeext conftest.$ac_ext
- fi
- ac_res=`eval echo '${'$as_ac_var'}'`
- { echo "$as_me:$LINENO: result: $ac_res" >&5
- echo "${ECHO_T}$ac_res" >&6; }
- if test `eval echo '${'$as_ac_var'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
- #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
- _ACEOF
- fi
- done
- fi
- if test "$enable_threads" = "yes"; then
- for ac_header in pthread.h
- do
- as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
- if { as_var=$as_ac_Header; eval "test "${$as_var+set}" = set"; }; then
- { echo "$as_me:$LINENO: checking for $ac_header" >&5
- echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
- if { as_var=$as_ac_Header; eval "test "${$as_var+set}" = set"; }; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
- fi
- ac_res=`eval echo '${'$as_ac_Header'}'`
- { echo "$as_me:$LINENO: result: $ac_res" >&5
- echo "${ECHO_T}$ac_res" >&6; }
- else
- # Is the header compilable?
- { echo "$as_me:$LINENO: checking $ac_header usability" >&5
- echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
- cat >conftest.$ac_ext <<_ACEOF
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
- cat >>conftest.$ac_ext <<_ACEOF
- /* end confdefs.h. */
- $ac_includes_default
- #include <$ac_header>
- _ACEOF
- rm -f conftest.$ac_objext
- if { (ac_try="$ac_compile"
- case "(($ac_try" in
- *"* | *`* | *\*) ac_try_echo=$ac_try;;
- *) ac_try_echo=$ac_try;;
- esac
- eval "echo "$as_me:$LINENO: $ac_try_echo"") >&5
- (eval "$ac_compile") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: $? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
- ac_header_compiler=yes
- else
- echo "$as_me: failed program was:" >&5
- sed 's/^/| /' conftest.$ac_ext >&5
- ac_header_compiler=no
- fi
- rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
- echo "${ECHO_T}$ac_header_compiler" >&6; }
- # Is the header present?
- { echo "$as_me:$LINENO: checking $ac_header presence" >&5
- echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
- cat >conftest.$ac_ext <<_ACEOF
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
- cat >>conftest.$ac_ext <<_ACEOF
- /* end confdefs.h. */
- #include <$ac_header>
- _ACEOF
- if { (ac_try="$ac_cpp conftest.$ac_ext"
- case "(($ac_try" in
- *"* | *`* | *\*) ac_try_echo=$ac_try;;
- *) ac_try_echo=$ac_try;;
- esac
- eval "echo "$as_me:$LINENO: $ac_try_echo"") >&5
- (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: $? = $ac_status" >&5
- (exit $ac_status); } >/dev/null && {
- test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
- test ! -s conftest.err
- }; then
- ac_header_preproc=yes
- else
- echo "$as_me: failed program was:" >&5
- sed 's/^/| /' conftest.$ac_ext >&5
- ac_header_preproc=no
- fi
- rm -f conftest.err conftest.$ac_ext
- { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
- echo "${ECHO_T}$ac_header_preproc" >&6; }
- # So? What about this header?
- case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
- yes:no: )
- { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
- echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
- echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
- ac_header_preproc=yes
- ;;
- no:yes:* )
- { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
- echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
- echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
- echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: section "Present But Cannot Be Compiled"" >&5
- echo "$as_me: WARNING: $ac_header: section "Present But Cannot Be Compiled"" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
- echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
- echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
- ;;
- esac
- { echo "$as_me:$LINENO: checking for $ac_header" >&5
- echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
- if { as_var=$as_ac_Header; eval "test "${$as_var+set}" = set"; }; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- eval "$as_ac_Header=$ac_header_preproc"
- fi
- ac_res=`eval echo '${'$as_ac_Header'}'`
- { echo "$as_me:$LINENO: result: $ac_res" >&5
- echo "${ECHO_T}$ac_res" >&6; }
- fi
- if test `eval echo '${'$as_ac_Header'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
- #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
- _ACEOF
- fi
- done
- for ac_func in pthread_create
- do
- as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
- { echo "$as_me:$LINENO: checking for $ac_func" >&5
- echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
- if { as_var=$as_ac_var; eval "test "${$as_var+set}" = set"; }; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- cat >conftest.$ac_ext <<_ACEOF
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
- cat >>conftest.$ac_ext <<_ACEOF
- /* end confdefs.h. */
- /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
- #define $ac_func innocuous_$ac_func
- /* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below.
- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- <limits.h> exists even on freestanding compilers. */
- #ifdef __STDC__
- # include <limits.h>
- #else
- # include <assert.h>
- #endif
- #undef $ac_func
- /* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
- #ifdef __cplusplus
- extern "C"
- #endif
- char $ac_func ();
- /* 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
- #endif
- int
- main ()
- {
- return $ac_func ();
- ;
- return 0;
- }
- _ACEOF
- rm -f conftest.$ac_objext conftest$ac_exeext
- if { (ac_try="$ac_link"
- case "(($ac_try" in
- *"* | *`* | *\*) ac_try_echo=$ac_try;;
- *) ac_try_echo=$ac_try;;
- esac
- eval "echo "$as_me:$LINENO: $ac_try_echo"") >&5
- (eval "$ac_link") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: $? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest$ac_exeext &&
- $as_test_x conftest$ac_exeext; then
- eval "$as_ac_var=yes"
- else
- echo "$as_me: failed program was:" >&5
- sed 's/^/| /' conftest.$ac_ext >&5
- eval "$as_ac_var=no"
- fi
- rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo
- conftest$ac_exeext conftest.$ac_ext
- fi
- ac_res=`eval echo '${'$as_ac_var'}'`
- { echo "$as_me:$LINENO: result: $ac_res" >&5
- echo "${ECHO_T}$ac_res" >&6; }
- if test `eval echo '${'$as_ac_var'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
- #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
- _ACEOF
- fi
- done
- fi
- if test "$bwin32" = true; then
- TOR_LIB_WS32=-lws2_32
- # Some of the cargo-cults recommend -lwsock32 as well, but I don't
- # think it's actually necessary.
- TOR_LIB_GDI=-lgdi32
- else
- TOR_LIB_WS32=
- TOR_LIB_GDI=
- fi
- for ac_header in sys/types.h
- do
- as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
- if { as_var=$as_ac_Header; eval "test "${$as_var+set}" = set"; }; then
- { echo "$as_me:$LINENO: checking for $ac_header" >&5
- echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
- if { as_var=$as_ac_Header; eval "test "${$as_var+set}" = set"; }; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
- fi
- ac_res=`eval echo '${'$as_ac_Header'}'`
- { echo "$as_me:$LINENO: result: $ac_res" >&5
- echo "${ECHO_T}$ac_res" >&6; }
- else
- # Is the header compilable?
- { echo "$as_me:$LINENO: checking $ac_header usability" >&5
- echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
- cat >conftest.$ac_ext <<_ACEOF
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
- cat >>conftest.$ac_ext <<_ACEOF
- /* end confdefs.h. */
- $ac_includes_default
- #include <$ac_header>
- _ACEOF
- rm -f conftest.$ac_objext
- if { (ac_try="$ac_compile"
- case "(($ac_try" in
- *"* | *`* | *\*) ac_try_echo=$ac_try;;
- *) ac_try_echo=$ac_try;;
- esac
- eval "echo "$as_me:$LINENO: $ac_try_echo"") >&5
- (eval "$ac_compile") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: $? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
- ac_header_compiler=yes
- else
- echo "$as_me: failed program was:" >&5
- sed 's/^/| /' conftest.$ac_ext >&5
- ac_header_compiler=no
- fi
- rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
- echo "${ECHO_T}$ac_header_compiler" >&6; }
- # Is the header present?
- { echo "$as_me:$LINENO: checking $ac_header presence" >&5
- echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
- cat >conftest.$ac_ext <<_ACEOF
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
- cat >>conftest.$ac_ext <<_ACEOF
- /* end confdefs.h. */
- #include <$ac_header>
- _ACEOF
- if { (ac_try="$ac_cpp conftest.$ac_ext"
- case "(($ac_try" in
- *"* | *`* | *\*) ac_try_echo=$ac_try;;
- *) ac_try_echo=$ac_try;;
- esac
- eval "echo "$as_me:$LINENO: $ac_try_echo"") >&5
- (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: $? = $ac_status" >&5
- (exit $ac_status); } >/dev/null && {
- test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
- test ! -s conftest.err
- }; then
- ac_header_preproc=yes
- else
- echo "$as_me: failed program was:" >&5
- sed 's/^/| /' conftest.$ac_ext >&5
- ac_header_preproc=no
- fi
- rm -f conftest.err conftest.$ac_ext
- { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
- echo "${ECHO_T}$ac_header_preproc" >&6; }
- # So? What about this header?
- case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
- yes:no: )
- { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
- echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
- echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
- ac_header_preproc=yes
- ;;
- no:yes:* )
- { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
- echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
- echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
- echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: section "Present But Cannot Be Compiled"" >&5
- echo "$as_me: WARNING: $ac_header: section "Present But Cannot Be Compiled"" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
- echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
- echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
- ;;
- esac
- { echo "$as_me:$LINENO: checking for $ac_header" >&5
- echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
- if { as_var=$as_ac_Header; eval "test "${$as_var+set}" = set"; }; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- eval "$as_ac_Header=$ac_header_preproc"
- fi
- ac_res=`eval echo '${'$as_ac_Header'}'`
- { echo "$as_me:$LINENO: result: $ac_res" >&5
- echo "${ECHO_T}$ac_res" >&6; }
- fi
- if test `eval echo '${'$as_ac_Header'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
- #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
- _ACEOF
- fi
- done
- { echo "$as_me:$LINENO: checking for u_int64_t" >&5
- echo $ECHO_N "checking for u_int64_t... $ECHO_C" >&6; }
- if test "${ac_cv_type_u_int64_t+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- cat >conftest.$ac_ext <<_ACEOF
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
- cat >>conftest.$ac_ext <<_ACEOF
- /* end confdefs.h. */
- $ac_includes_default
- typedef u_int64_t ac__type_new_;
- int
- main ()
- {
- if ((ac__type_new_ *) 0)
- return 0;
- if (sizeof (ac__type_new_))
- return 0;
- ;
- return 0;
- }
- _ACEOF
- rm -f conftest.$ac_objext
- if { (ac_try="$ac_compile"
- case "(($ac_try" in
- *"* | *`* | *\*) ac_try_echo=$ac_try;;
- *) ac_try_echo=$ac_try;;
- esac
- eval "echo "$as_me:$LINENO: $ac_try_echo"") >&5
- (eval "$ac_compile") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: $? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
- ac_cv_type_u_int64_t=yes
- else
- echo "$as_me: failed program was:" >&5
- sed 's/^/| /' conftest.$ac_ext >&5
- ac_cv_type_u_int64_t=no
- fi
- rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- { echo "$as_me:$LINENO: result: $ac_cv_type_u_int64_t" >&5
- echo "${ECHO_T}$ac_cv_type_u_int64_t" >&6; }
- if test $ac_cv_type_u_int64_t = yes; then
- :
- else
- cat >>confdefs.h <<_ACEOF
- #define u_int64_t unsigned long long
- _ACEOF
- fi
- { echo "$as_me:$LINENO: checking for u_int32_t" >&5
- echo $ECHO_N "checking for u_int32_t... $ECHO_C" >&6; }
- if test "${ac_cv_type_u_int32_t+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- cat >conftest.$ac_ext <<_ACEOF
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
- cat >>conftest.$ac_ext <<_ACEOF
- /* end confdefs.h. */
- $ac_includes_default
- typedef u_int32_t ac__type_new_;
- int
- main ()
- {
- if ((ac__type_new_ *) 0)
- return 0;
- if (sizeof (ac__type_new_))
- return 0;
- ;
- return 0;
- }
- _ACEOF
- rm -f conftest.$ac_objext
- if { (ac_try="$ac_compile"
- case "(($ac_try" in
- *"* | *`* | *\*) ac_try_echo=$ac_try;;
- *) ac_try_echo=$ac_try;;
- esac
- eval "echo "$as_me:$LINENO: $ac_try_echo"") >&5
- (eval "$ac_compile") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: $? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
- ac_cv_type_u_int32_t=yes
- else
- echo "$as_me: failed program was:" >&5
- sed 's/^/| /' conftest.$ac_ext >&5
- ac_cv_type_u_int32_t=no
- fi
- rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- { echo "$as_me:$LINENO: result: $ac_cv_type_u_int32_t" >&5
- echo "${ECHO_T}$ac_cv_type_u_int32_t" >&6; }
- if test $ac_cv_type_u_int32_t = yes; then
- :
- else
- cat >>confdefs.h <<_ACEOF
- #define u_int32_t unsigned long
- _ACEOF
- fi
- { echo "$as_me:$LINENO: checking for u_int16_t" >&5
- echo $ECHO_N "checking for u_int16_t... $ECHO_C" >&6; }
- if test "${ac_cv_type_u_int16_t+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- cat >conftest.$ac_ext <<_ACEOF
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
- cat >>conftest.$ac_ext <<_ACEOF
- /* end confdefs.h. */
- $ac_includes_default
- typedef u_int16_t ac__type_new_;
- int
- main ()
- {
- if ((ac__type_new_ *) 0)
- return 0;
- if (sizeof (ac__type_new_))
- return 0;
- ;
- return 0;
- }
- _ACEOF
- rm -f conftest.$ac_objext
- if { (ac_try="$ac_compile"
- case "(($ac_try" in
- *"* | *`* | *\*) ac_try_echo=$ac_try;;
- *) ac_try_echo=$ac_try;;
- esac
- eval "echo "$as_me:$LINENO: $ac_try_echo"") >&5
- (eval "$ac_compile") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: $? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
- ac_cv_type_u_int16_t=yes
- else
- echo "$as_me: failed program was:" >&5
- sed 's/^/| /' conftest.$ac_ext >&5
- ac_cv_type_u_int16_t=no
- fi
- rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- { echo "$as_me:$LINENO: result: $ac_cv_type_u_int16_t" >&5
- echo "${ECHO_T}$ac_cv_type_u_int16_t" >&6; }
- if test $ac_cv_type_u_int16_t = yes; then
- :
- else
- cat >>confdefs.h <<_ACEOF
- #define u_int16_t unsigned short
- _ACEOF
- fi
- { echo "$as_me:$LINENO: checking for u_int8_t" >&5
- echo $ECHO_N "checking for u_int8_t... $ECHO_C" >&6; }
- if test "${ac_cv_type_u_int8_t+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- cat >conftest.$ac_ext <<_ACEOF
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
- cat >>conftest.$ac_ext <<_ACEOF
- /* end confdefs.h. */
- $ac_includes_default
- typedef u_int8_t ac__type_new_;
- int
- main ()
- {
- if ((ac__type_new_ *) 0)
- return 0;
- if (sizeof (ac__type_new_))
- return 0;
- ;
- return 0;
- }
- _ACEOF
- rm -f conftest.$ac_objext
- if { (ac_try="$ac_compile"
- case "(($ac_try" in
- *"* | *`* | *\*) ac_try_echo=$ac_try;;
- *) ac_try_echo=$ac_try;;
- esac
- eval "echo "$as_me:$LINENO: $ac_try_echo"") >&5
- (eval "$ac_compile") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: $? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
- ac_cv_type_u_int8_t=yes
- else
- echo "$as_me: failed program was:" >&5
- sed 's/^/| /' conftest.$ac_ext >&5
- ac_cv_type_u_int8_t=no
- fi
- rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- { echo "$as_me:$LINENO: result: $ac_cv_type_u_int8_t" >&5
- echo "${ECHO_T}$ac_cv_type_u_int8_t" >&6; }
- if test $ac_cv_type_u_int8_t = yes; then
- :
- else
- cat >>confdefs.h <<_ACEOF
- #define u_int8_t unsigned char
- _ACEOF
- fi
- tor_libevent_pkg_redhat="libevent"
- tor_libevent_pkg_debian="libevent-dev"
- tor_libevent_devpkg_redhat="libevent-devel"
- tor_libevent_devpkg_debian="libevent-dev"
- trylibeventdir=""
- # Check whether --with-libevent-dir was given.
- if test "${with_libevent_dir+set}" = set; then
- withval=$with_libevent_dir;
- if test x$withval != xno ; then
- trylibeventdir="$withval"
- fi
- fi
- if test "x$trylibeventdir" = x && test "x$ALT_libevent_WITHVAL" != x ; then
- trylibeventdir="$ALT_libevent_WITHVAL"
- fi
- tor_saved_LIBS="$LIBS"
- tor_saved_LDFLAGS="$LDFLAGS"
- tor_saved_CPPFLAGS="$CPPFLAGS"
- { echo "$as_me:$LINENO: checking for libevent directory" >&5
- echo $ECHO_N "checking for libevent directory... $ECHO_C" >&6; }
- if test "${tor_cv_library_libevent_dir+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- tor_libevent_dir_found=no
- tor_libevent_any_linkable=no
- for tor_trydir in "$trylibeventdir" "(system)" "$prefix" /usr/local /usr/pkg /opt/libevent; do
- LDFLAGS="$tor_saved_LDFLAGS"
- LIBS="$tor_saved_LIBS -levent $TOR_LIB_WS32"
- CPPFLAGS="$tor_saved_CPPFLAGS"
- if test -z "$tor_trydir" ; then
- continue;
- fi
- # Skip the directory if it isn't there.
- if test ! -d "$tor_trydir" && test "$tor_trydir" != "(system)"; then
- continue;
- fi
- # If this isn't blank, try adding the directory (or appropriate
- # include/libs subdirectories) to the command line.
- if test "$tor_trydir" != "(system)"; then
- if test -d "$tor_trydir/lib"; then
- LDFLAGS="-L$tor_trydir/lib $LDFLAGS"
- else
- LDFLAGS="-L$tor_trydir $LDFLAGS"
- fi
- if test -d "$tor_trydir/include"; then
- CPPFLAGS="-I$tor_trydir/include $CPPFLAGS"
- else
- CPPFLAGS="-I$tor_trydir $CPPFLAGS"
- fi
- fi
- # Can we link against (but not necessarily run, or find the headers for)
- # the binary?
- cat >conftest.$ac_ext <<_ACEOF
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
- cat >>conftest.$ac_ext <<_ACEOF
- /* end confdefs.h. */
- #ifdef WIN32
- #include <winsock2.h>
- #endif
- void exit(int); void *event_init(void);
- int
- main ()
- {
- #ifdef WIN32
- {WSADATA d; WSAStartup(0x101,&d); }
- #endif
- event_init(); exit(0);
- ;
- return 0;
- }
- _ACEOF
- rm -f conftest.$ac_objext conftest$ac_exeext
- if { (ac_try="$ac_link"
- case "(($ac_try" in
- *"* | *`* | *\*) ac_try_echo=$ac_try;;
- *) ac_try_echo=$ac_try;;
- esac
- eval "echo "$as_me:$LINENO: $ac_try_echo"") >&5
- (eval "$ac_link") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: $? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest$ac_exeext &&
- $as_test_x conftest$ac_exeext; then
- linkable=yes
- else
- echo "$as_me: failed program was:" >&5
- sed 's/^/| /' conftest.$ac_ext >&5
- linkable=no
- fi
- rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo
- conftest$ac_exeext conftest.$ac_ext
- if test "$linkable" = yes; then
- tor_libevent_any_linkable=yes
- # Okay, we can link against it. Can we find the headers?
- cat >conftest.$ac_ext <<_ACEOF
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
- cat >>conftest.$ac_ext <<_ACEOF
- /* end confdefs.h. */
- #ifdef WIN32
- #include <winsock2.h>
- #endif
- #include <stdlib.h>
- #include <sys/time.h>
- #include <sys/types.h>
- #include <event.h>
- int
- main ()
- {
- #ifdef WIN32
- {WSADATA d; WSAStartup(0x101,&d); }
- #endif
- event_init(); exit(0);
- ;
- return 0;
- }
- _ACEOF
- rm -f conftest.$ac_objext
- if { (ac_try="$ac_compile"
- case "(($ac_try" in
- *"* | *`* | *\*) ac_try_echo=$ac_try;;
- *) ac_try_echo=$ac_try;;
- esac
- eval "echo "$as_me:$LINENO: $ac_try_echo"") >&5
- (eval "$ac_compile") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: $? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
- buildable=yes
- else
- echo "$as_me: failed program was:" >&5
- sed 's/^/| /' conftest.$ac_ext >&5
- buildable=no
- fi
- rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- if test "$buildable" = yes; then
- tor_cv_library_libevent_dir=$tor_trydir
- tor_libevent_dir_found=yes
- break
- fi
- fi
- done
- if test "$tor_libevent_dir_found" = no; then
- if test "$tor_libevent_any_linkable" = no ; then
- { echo "$as_me:$LINENO: WARNING: Could not find a linkable libevent. If you have it installed somewhere unusual, you can specify an explicit path using --with-libevent-dir" >&5
- echo "$as_me: WARNING: Could not find a linkable libevent. If you have it installed somewhere unusual, you can specify an explicit path using --with-libevent-dir" >&2;}
- h=""
- if test xpkg = xdevpkg; then
- h=" headers for"
- fi
- if test -f /etc/debian_version && test x"$tor_libevent_pkg_debian" != x; then
- { echo "$as_me:$LINENO: WARNING: On Debian, you can install$h libevent using "apt-get install $tor_libevent_pkg_debian"" >&5
- echo "$as_me: WARNING: On Debian, you can install$h libevent using "apt-get install $tor_libevent_pkg_debian"" >&2;}
- if test x"$tor_libevent_pkg_debian" != x"$tor_libevent_devpkg_debian"; then
- { echo "$as_me:$LINENO: WARNING: You will probably need $tor_libevent_devpkg_debian too." >&5
- echo "$as_me: WARNING: You will probably need $tor_libevent_devpkg_debian too." >&2;}
- fi
- fi
- if test -f /etc/fedora-release && test x"$tor_libevent_pkg_redhat" != x; then
- { echo "$as_me:$LINENO: WARNING: On Fedora Core, you can install$h libevent using "yum install $tor_libevent_pkg_redhat"" >&5
- echo "$as_me: WARNING: On Fedora Core, you can install$h libevent using "yum install $tor_libevent_pkg_redhat"" >&2;}
- if test x"$tor_libevent_pkg_redhat" != x"$tor_libevent_devpkg_redhat"; then
- { echo "$as_me:$LINENO: WARNING: You will probably need to install $tor_libevent_devpkg_redhat too." >&5
- echo "$as_me: WARNING: You will probably need to install $tor_libevent_devpkg_redhat too." >&2;}
- fi
- else
- if test -f /etc/redhat-release && test x"$tor_libevent_pkg_redhat" != x; then
- { echo "$as_me:$LINENO: WARNING: On most Redhat-based systems, you can get$h libevent by installing the $tor_libevent_pkg_redhat" RPM package" >&5
- echo "$as_me: WARNING: On most Redhat-based systems, you can get$h libevent by installing the $tor_libevent_pkg_redhat" RPM package" >&2;}
- if test x"$tor_libevent_pkg_redhat" != x"$tor_libevent_devpkg_redhat"; then
- { echo "$as_me:$LINENO: WARNING: You will probably need to install $tor_libevent_devpkg_redhat too." >&5
- echo "$as_me: WARNING: You will probably need to install $tor_libevent_devpkg_redhat too." >&2;}
- fi
- fi
- fi
- { { echo "$as_me:$LINENO: error: Missing libraries; unable to proceed." >&5
- echo "$as_me: error: Missing libraries; unable to proceed." >&2;}
- { (exit 1); exit 1; }; }
- else
- { echo "$as_me:$LINENO: WARNING: We found the libraries for libevent, but we could not find the C header files. You may need to install a devel package." >&5
- echo "$as_me: WARNING: We found the libraries for libevent, but we could not find the C header files. You may need to install a devel package." >&2;}
- h=""
- if test xdevpkg = xdevpkg; then
- h=" headers for"
- fi
- if test -f /etc/debian_version && test x"$tor_libevent_devpkg_debian" != x; then
- { echo "$as_me:$LINENO: WARNING: On Debian, you can install$h libevent using "apt-get install $tor_libevent_devpkg_debian"" >&5
- echo "$as_me: WARNING: On Debian, you can install$h libevent using "apt-get install $tor_libevent_devpkg_debian"" >&2;}
- if test x"$tor_libevent_devpkg_debian" != x"$tor_libevent_devpkg_debian"; then
- { echo "$as_me:$LINENO: WARNING: You will probably need $tor_libevent_devpkg_debian too." >&5
- echo "$as_me: WARNING: You will probably need $tor_libevent_devpkg_debian too." >&2;}
- fi
- fi
- if test -f /etc/fedora-release && test x"$tor_libevent_devpkg_redhat" != x; then
- { echo "$as_me:$LINENO: WARNING: On Fedora Core, you can install$h libevent using "yum install $tor_libevent_devpkg_redhat"" >&5
- echo "$as_me: WARNING: On Fedora Core, you can install$h libevent using "yum install $tor_libevent_devpkg_redhat"" >&2;}
- if test x"$tor_libevent_devpkg_redhat" != x"$tor_libevent_devpkg_redhat"; then
- { echo "$as_me:$LINENO: WARNING: You will probably need to install $tor_libevent_devpkg_redhat too." >&5
- echo "$as_me: WARNING: You will probably need to install $tor_libevent_devpkg_redhat too." >&2;}
- fi
- else
- if test -f /etc/redhat-release && test x"$tor_libevent_devpkg_redhat" != x; then
- { echo "$as_me:$LINENO: WARNING: On most Redhat-based systems, you can get$h libevent by installing the $tor_libevent_devpkg_redhat" RPM package" >&5
- echo "$as_me: WARNING: On most Redhat-based systems, you can get$h libevent by installing the $tor_libevent_devpkg_redhat" RPM package" >&2;}
- if test x"$tor_libevent_devpkg_redhat" != x"$tor_libevent_devpkg_redhat"; then
- { echo "$as_me:$LINENO: WARNING: You will probably need to install $tor_libevent_devpkg_redhat too." >&5
- echo "$as_me: WARNING: You will probably need to install $tor_libevent_devpkg_redhat too." >&2;}
- fi
- fi
- fi
- { { echo "$as_me:$LINENO: error: Missing headers; unable to proceed." >&5
- echo "$as_me: error: Missing headers; unable to proceed." >&2;}
- { (exit 1); exit 1; }; }
- fi
- fi
- LDFLAGS="$tor_saved_LDFLAGS"
- LIBS="$tor_saved_LIBS"
- CPPFLAGS="$tor_saved_CPPFLAGS"
- fi
- { echo "$as_me:$LINENO: result: $tor_cv_library_libevent_dir" >&5
- echo "${ECHO_T}$tor_cv_library_libevent_dir" >&6; }
- LIBS="$LIBS -levent $TOR_LIB_WS32"
- if test "$tor_cv_library_libevent_dir" != "(system)"; then
- if test -d "$tor_cv_library_libevent_dir/lib"; then
- LDFLAGS="-L$tor_cv_library_libevent_dir/lib $LDFLAGS"
- else
- LDFLAGS="-L$tor_cv_library_libevent_dir $LDFLAGS"
- fi
- if test -d "$tor_cv_library_libevent_dir/include"; then
- CPPFLAGS="-I$tor_cv_library_libevent_dir/include $CPPFLAGS"
- else
- CPPFLAGS="-I$tor_cv_library_libevent_dir $CPPFLAGS"
- fi
- fi
- if test x$tor_cv_library_libevent_dir = "x(system)"; then
- TOR_LDFLAGS_libevent=""
- TOR_CPPFLAGS_libevent=""
- else
- if test -d "$tor_cv_library_libevent_dir/lib"; then
- TOR_LDFLAGS_libevent="-L$tor_cv_library_libevent_dir/lib"
- else
- TOR_LDFLAGS_libevent="-L$tor_cv_library_libevent_dir"
- fi
- if test -d "$tor_cv_library_libevent_dir/include"; then
- TOR_CPPFLAGS_libevent="-I$tor_cv_library_libevent_dir/include"
- else
- TOR_CPPFLAGS_libevent="-I$tor_cv_library_libevent_dir"
- fi
- fi
- if test "$cross_compiling" != yes; then
- { echo "$as_me:$LINENO: checking whether we need extra options to link libevent" >&5
- echo $ECHO_N "checking whether we need extra options to link libevent... $ECHO_C" >&6; }
- if test "${tor_cv_library_libevent_linker_option+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- orig_LDFLAGS="$LDFLAGS"
- runs=no
- linked_with=nothing
- if test -d "$tor_cv_library_libevent_dir/lib"; then
- tor_trydir="$tor_cv_library_libevent_dir/lib"
- else
- tor_trydir="$tor_cv_library_libevent_dir"
- fi
- for tor_tryextra in "(none)" "-Wl,-R$tor_trydir" "-R$tor_trydir"
- "-Wl,-rpath,$tor_trydir" ; do
- if test "$tor_tryextra" = "(none)"; then
- LDFLAGS="$orig_LDFLAGS"
- else
- LDFLAGS="$tor_tryextra $orig_LDFLAGS"
- fi
- if test "$cross_compiling" = yes; then
- { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
- See `config.log' for more details." >&5
- echo "$as_me: error: cannot run test program while cross compiling
- See `config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
- else
- cat >conftest.$ac_ext <<_ACEOF
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
- cat >>conftest.$ac_ext <<_ACEOF
- /* end confdefs.h. */
- #ifdef WIN32
- #include <winsock2.h>
- #endif
- void exit(int); void *event_init(void);
- int
- main ()
- {
- #ifdef WIN32
- {WSADATA d; WSAStartup(0x101,&d); }
- #endif
- event_init(); exit(0);
- ;
- return 0;
- }
- _ACEOF
- rm -f conftest$ac_exeext
- if { (ac_try="$ac_link"
- case "(($ac_try" in
- *"* | *`* | *\*) ac_try_echo=$ac_try;;
- *) ac_try_echo=$ac_try;;
- esac
- eval "echo "$as_me:$LINENO: $ac_try_echo"") >&5
- (eval "$ac_link") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: $? = $ac_status" >&5
- (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (case "(($ac_try" in
- *"* | *`* | *\*) ac_try_echo=$ac_try;;
- *) ac_try_echo=$ac_try;;
- esac
- eval "echo "$as_me:$LINENO: $ac_try_echo"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: $? = $ac_status" >&5
- (exit $ac_status); }; }; then
- runnable=yes
- else
- echo "$as_me: program exited with status $ac_status" >&5
- echo "$as_me: failed program was:" >&5
- sed 's/^/| /' conftest.$ac_ext >&5
- ( exit $ac_status )
- runnable=no
- fi
- rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
- fi
- if test "$runnable" = yes; then
- tor_cv_library_libevent_linker_option=$tor_tryextra
- break
- fi
- done
- if test "$runnable" = no; then
- { { echo "$as_me:$LINENO: error: Found linkable libevent in $tor_cv_library_libevent_dir, but it does not seem to run, even with -R. Maybe specify another using --with-libevent-dir}" >&5
- echo "$as_me: error: Found linkable libevent in $tor_cv_library_libevent_dir, but it does not seem to run, even with -R. Maybe specify another using --with-libevent-dir}" >&2;}
- { (exit 1); exit 1; }; }
- fi
- LDFLAGS="$orig_LDFLAGS"
- fi
- { echo "$as_me:$LINENO: result: $tor_cv_library_libevent_linker_option" >&5
- echo "${ECHO_T}$tor_cv_library_libevent_linker_option" >&6; }
- if test "$tor_cv_library_libevent_linker_option" != "(none)" ; then
- TOR_LDFLAGS_libevent="$TOR_LDFLAGS_libevent $tor_cv_library_libevent_linker_option"
- fi
- fi # cross-compile
- LIBS="$tor_saved_LIBS"
- LDFLAGS="$tor_saved_LDFLAGS"
- CPPFLAGS="$tor_saved_CPPFLAGS"
- save_LIBS="$LIBS"
- save_LDFLAGS="$LDFLAGS"
- save_CPPFLAGS="$CPPFLAGS"
- LIBS="-levent $TOR_LIB_WS32 $LIBS"
- LDFLAGS="$TOR_LDFLAGS_libevent $LDFLAGS"
- CPPFLAGS="$TOR_CPPFLAGS_libevent $CPPFLAGS"
- for ac_func in event_get_version event_get_method event_set_log_callback
- do
- as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
- { echo "$as_me:$LINENO: checking for $ac_func" >&5
- echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
- if { as_var=$as_ac_var; eval "test "${$as_var+set}" = set"; }; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- cat >conftest.$ac_ext <<_ACEOF
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
- cat >>conftest.$ac_ext <<_ACEOF
- /* end confdefs.h. */
- /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
- #define $ac_func innocuous_$ac_func
- /* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below.
- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- <limits.h> exists even on freestanding compilers. */
- #ifdef __STDC__
- # include <limits.h>
- #else
- # include <assert.h>
- #endif
- #undef $ac_func
- /* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
- #ifdef __cplusplus
- extern "C"
- #endif
- char $ac_func ();
- /* 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
- #endif
- int
- main ()
- {
- return $ac_func ();
- ;
- return 0;
- }
- _ACEOF
- rm -f conftest.$ac_objext conftest$ac_exeext
- if { (ac_try="$ac_link"
- case "(($ac_try" in
- *"* | *`* | *\*) ac_try_echo=$ac_try;;
- *) ac_try_echo=$ac_try;;
- esac
- eval "echo "$as_me:$LINENO: $ac_try_echo"") >&5
- (eval "$ac_link") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: $? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest$ac_exeext &&
- $as_test_x conftest$ac_exeext; then
- eval "$as_ac_var=yes"
- else
- echo "$as_me: failed program was:" >&5
- sed 's/^/| /' conftest.$ac_ext >&5
- eval "$as_ac_var=no"
- fi
- rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo
- conftest$ac_exeext conftest.$ac_ext
- fi
- ac_res=`eval echo '${'$as_ac_var'}'`
- { echo "$as_me:$LINENO: result: $ac_res" >&5
- echo "${ECHO_T}$ac_res" >&6; }
- if test `eval echo '${'$as_ac_var'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
- #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
- _ACEOF
- fi
- done
- { echo "$as_me:$LINENO: checking for struct event.min_heap_idx" >&5
- echo $ECHO_N "checking for struct event.min_heap_idx... $ECHO_C" >&6; }
- if test "${ac_cv_member_struct_event_min_heap_idx+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- cat >conftest.$ac_ext <<_ACEOF
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
- cat >>conftest.$ac_ext <<_ACEOF
- /* end confdefs.h. */
- #include <event.h>
- int
- main ()
- {
- static struct event ac_aggr;
- if (ac_aggr.min_heap_idx)
- return 0;
- ;
- return 0;
- }
- _ACEOF
- rm -f conftest.$ac_objext
- if { (ac_try="$ac_compile"
- case "(($ac_try" in
- *"* | *`* | *\*) ac_try_echo=$ac_try;;
- *) ac_try_echo=$ac_try;;
- esac
- eval "echo "$as_me:$LINENO: $ac_try_echo"") >&5
- (eval "$ac_compile") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: $? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
- ac_cv_member_struct_event_min_heap_idx=yes
- else
- echo "$as_me: failed program was:" >&5
- sed 's/^/| /' conftest.$ac_ext >&5
- cat >conftest.$ac_ext <<_ACEOF
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
- cat >>conftest.$ac_ext <<_ACEOF
- /* end confdefs.h. */
- #include <event.h>
- int
- main ()
- {
- static struct event ac_aggr;
- if (sizeof ac_aggr.min_heap_idx)
- return 0;
- ;
- return 0;
- }
- _ACEOF
- rm -f conftest.$ac_objext
- if { (ac_try="$ac_compile"
- case "(($ac_try" in
- *"* | *`* | *\*) ac_try_echo=$ac_try;;
- *) ac_try_echo=$ac_try;;
- esac
- eval "echo "$as_me:$LINENO: $ac_try_echo"") >&5
- (eval "$ac_compile") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: $? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
- ac_cv_member_struct_event_min_heap_idx=yes
- else
- echo "$as_me: failed program was:" >&5
- sed 's/^/| /' conftest.$ac_ext >&5
- ac_cv_member_struct_event_min_heap_idx=no
- fi
- rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- { echo "$as_me:$LINENO: result: $ac_cv_member_struct_event_min_heap_idx" >&5
- echo "${ECHO_T}$ac_cv_member_struct_event_min_heap_idx" >&6; }
- if test $ac_cv_member_struct_event_min_heap_idx = yes; then
- cat >>confdefs.h <<_ACEOF
- #define HAVE_STRUCT_EVENT_MIN_HEAP_IDX 1
- _ACEOF
- fi
- LIBS="$save_LIBS"
- LDFLAGS="$save_LDFLAGS"
- CPPFLAGS="$save_CPPFLAGS"
- tor_openssl_pkg_redhat="openssl"
- tor_openssl_pkg_debian="libssl"
- tor_openssl_devpkg_redhat="openssl-devel"
- tor_openssl_devpkg_debian="libssl-dev"
- ALT_openssl_WITHVAL=""
- # Check whether --with-ssl-dir was given.
- if test "${with_ssl_dir+set}" = set; then
- withval=$with_ssl_dir;
- if test "x$withval" != xno && test "x$withval" != "x" ; then
- ALT_openssl_WITHVAL="$withval"
- fi
- fi
- tryopenssldir=""
- # Check whether --with-openssl-dir was given.
- if test "${with_openssl_dir+set}" = set; then
- withval=$with_openssl_dir;
- if test x$withval != xno ; then
- tryopenssldir="$withval"
- fi
- fi
- if test "x$tryopenssldir" = x && test "x$ALT_openssl_WITHVAL" != x ; then
- tryopenssldir="$ALT_openssl_WITHVAL"
- fi
- tor_saved_LIBS="$LIBS"
- tor_saved_LDFLAGS="$LDFLAGS"
- tor_saved_CPPFLAGS="$CPPFLAGS"
- { echo "$as_me:$LINENO: checking for openssl directory" >&5
- echo $ECHO_N "checking for openssl directory... $ECHO_C" >&6; }
- if test "${tor_cv_library_openssl_dir+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- tor_openssl_dir_found=no
- tor_openssl_any_linkable=no
- for tor_trydir in "$tryopenssldir" "(system)" "$prefix" /usr/local /usr/pkg /usr/local/openssl /usr/lib/openssl /usr/local/ssl /usr/lib/ssl /usr/local /usr/athena /opt/openssl; do
- LDFLAGS="$tor_saved_LDFLAGS"
- LIBS="$tor_saved_LIBS -lssl -lcrypto $TOR_LIB_GDI"
- CPPFLAGS="$tor_saved_CPPFLAGS"
- if test -z "$tor_trydir" ; then
- continue;
- fi
- # Skip the directory if it isn't there.
- if test ! -d "$tor_trydir" && test "$tor_trydir" != "(system)"; then
- continue;
- fi
- # If this isn't blank, try adding the directory (or appropriate
- # include/libs subdirectories) to the command line.
- if test "$tor_trydir" != "(system)"; then
- if test -d "$tor_trydir/lib"; then
- LDFLAGS="-L$tor_trydir/lib $LDFLAGS"
- else
- LDFLAGS="-L$tor_trydir $LDFLAGS"
- fi
- if test -d "$tor_trydir/include"; then
- CPPFLAGS="-I$tor_trydir/include $CPPFLAGS"
- else
- CPPFLAGS="-I$tor_trydir $CPPFLAGS"
- fi
- fi
- # Can we link against (but not necessarily run, or find the headers for)
- # the binary?
- cat >conftest.$ac_ext <<_ACEOF
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
- cat >>conftest.$ac_ext <<_ACEOF
- /* end confdefs.h. */
- void RAND_add(const void *buf, int num, double entropy);
- int
- main ()
- {
- RAND_add((void*)0,0,0); exit(0);
- ;
- return 0;
- }
- _ACEOF
- rm -f conftest.$ac_objext conftest$ac_exeext
- if { (ac_try="$ac_link"
- case "(($ac_try" in
- *"* | *`* | *\*) ac_try_echo=$ac_try;;
- *) ac_try_echo=$ac_try;;
- esac
- eval "echo "$as_me:$LINENO: $ac_try_echo"") >&5
- (eval "$ac_link") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: $? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest$ac_exeext &&
- $as_test_x conftest$ac_exeext; then
- linkable=yes
- else
- echo "$as_me: failed program was:" >&5
- sed 's/^/| /' conftest.$ac_ext >&5
- linkable=no
- fi
- rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo
- conftest$ac_exeext conftest.$ac_ext
- if test "$linkable" = yes; then
- tor_openssl_any_linkable=yes
- # Okay, we can link against it. Can we find the headers?
- cat >conftest.$ac_ext <<_ACEOF
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
- cat >>conftest.$ac_ext <<_ACEOF
- /* end confdefs.h. */
- #include <openssl/rand.h>
- int
- main ()
- {
- RAND_add((void*)0,0,0); exit(0);
- ;
- return 0;
- }
- _ACEOF
- rm -f conftest.$ac_objext
- if { (ac_try="$ac_compile"
- case "(($ac_try" in
- *"* | *`* | *\*) ac_try_echo=$ac_try;;
- *) ac_try_echo=$ac_try;;
- esac
- eval "echo "$as_me:$LINENO: $ac_try_echo"") >&5
- (eval "$ac_compile") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: $? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
- buildable=yes
- else
- echo "$as_me: failed program was:" >&5
- sed 's/^/| /' conftest.$ac_ext >&5
- buildable=no
- fi
- rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- if test "$buildable" = yes; then
- tor_cv_library_openssl_dir=$tor_trydir
- tor_openssl_dir_found=yes
- break
- fi
- fi
- done
- if test "$tor_openssl_dir_found" = no; then
- if test "$tor_openssl_any_linkable" = no ; then
- { echo "$as_me:$LINENO: WARNING: Could not find a linkable openssl. If you have it installed somewhere unusual, you can specify an explicit path using --with-openssl-dir" >&5
- echo "$as_me: WARNING: Could not find a linkable openssl. If you have it installed somewhere unusual, you can specify an explicit path using --with-openssl-dir" >&2;}
- h=""
- if test xpkg = xdevpkg; then
- h=" headers for"
- fi
- if test -f /etc/debian_version && test x"$tor_openssl_pkg_debian" != x; then
- { echo "$as_me:$LINENO: WARNING: On Debian, you can install$h openssl using "apt-get install $tor_openssl_pkg_debian"" >&5
- echo "$as_me: WARNING: On Debian, you can install$h openssl using "apt-get install $tor_openssl_pkg_debian"" >&2;}
- if test x"$tor_openssl_pkg_debian" != x"$tor_openssl_devpkg_debian"; then
- { echo "$as_me:$LINENO: WARNING: You will probably need $tor_openssl_devpkg_debian too." >&5
- echo "$as_me: WARNING: You will probably need $tor_openssl_devpkg_debian too." >&2;}
- fi
- fi
- if test -f /etc/fedora-release && test x"$tor_openssl_pkg_redhat" != x; then
- { echo "$as_me:$LINENO: WARNING: On Fedora Core, you can install$h openssl using "yum install $tor_openssl_pkg_redhat"" >&5
- echo "$as_me: WARNING: On Fedora Core, you can install$h openssl using "yum install $tor_openssl_pkg_redhat"" >&2;}
- if test x"$tor_openssl_pkg_redhat" != x"$tor_openssl_devpkg_redhat"; then
- { echo "$as_me:$LINENO: WARNING: You will probably need to install $tor_openssl_devpkg_redhat too." >&5
- echo "$as_me: WARNING: You will probably need to install $tor_openssl_devpkg_redhat too." >&2;}
- fi
- else
- if test -f /etc/redhat-release && test x"$tor_openssl_pkg_redhat" != x; then
- { echo "$as_me:$LINENO: WARNING: On most Redhat-based systems, you can get$h openssl by installing the $tor_openssl_pkg_redhat" RPM package" >&5
- echo "$as_me: WARNING: On most Redhat-based systems, you can get$h openssl by installing the $tor_openssl_pkg_redhat" RPM package" >&2;}
- if test x"$tor_openssl_pkg_redhat" != x"$tor_openssl_devpkg_redhat"; then
- { echo "$as_me:$LINENO: WARNING: You will probably need to install $tor_openssl_devpkg_redhat too." >&5
- echo "$as_me: WARNING: You will probably need to install $tor_openssl_devpkg_redhat too." >&2;}
- fi
- fi
- fi
- { { echo "$as_me:$LINENO: error: Missing libraries; unable to proceed." >&5
- echo "$as_me: error: Missing libraries; unable to proceed." >&2;}
- { (exit 1); exit 1; }; }
- else
- { echo "$as_me:$LINENO: WARNING: We found the libraries for openssl, but we could not find the C header files. You may need to install a devel package." >&5
- echo "$as_me: WARNING: We found the libraries for openssl, but we could not find the C header files. You may need to install a devel package." >&2;}
- h=""
- if test xdevpkg = xdevpkg; then
- h=" headers for"
- fi
- if test -f /etc/debian_version && test x"$tor_openssl_devpkg_debian" != x; then
- { echo "$as_me:$LINENO: WARNING: On Debian, you can install$h openssl using "apt-get install $tor_openssl_devpkg_debian"" >&5
- echo "$as_me: WARNING: On Debian, you can install$h openssl using "apt-get install $tor_openssl_devpkg_debian"" >&2;}
- if test x"$tor_openssl_devpkg_debian" != x"$tor_openssl_devpkg_debian"; then
- { echo "$as_me:$LINENO: WARNING: You will probably need $tor_openssl_devpkg_debian too." >&5
- echo "$as_me: WARNING: You will probably need $tor_openssl_devpkg_debian too." >&2;}
- fi
- fi
- if test -f /etc/fedora-release && test x"$tor_openssl_devpkg_redhat" != x; then
- { echo "$as_me:$LINENO: WARNING: On Fedora Core, you can install$h openssl using "yum install $tor_openssl_devpkg_redhat"" >&5
- echo "$as_me: WARNING: On Fedora Core, you can install$h openssl using "yum install $tor_openssl_devpkg_redhat"" >&2;}
- if test x"$tor_openssl_devpkg_redhat" != x"$tor_openssl_devpkg_redhat"; then
- { echo "$as_me:$LINENO: WARNING: You will probably need to install $tor_openssl_devpkg_redhat too." >&5
- echo "$as_me: WARNING: You will probably need to install $tor_openssl_devpkg_redhat too." >&2;}
- fi
- else
- if test -f /etc/redhat-release && test x"$tor_openssl_devpkg_redhat" != x; then
- { echo "$as_me:$LINENO: WARNING: On most Redhat-based systems, you can get$h openssl by installing the $tor_openssl_devpkg_redhat" RPM package" >&5
- echo "$as_me: WARNING: On most Redhat-based systems, you can get$h openssl by installing the $tor_openssl_devpkg_redhat" RPM package" >&2;}
- if test x"$tor_openssl_devpkg_redhat" != x"$tor_openssl_devpkg_redhat"; then
- { echo "$as_me:$LINENO: WARNING: You will probably need to install $tor_openssl_devpkg_redhat too." >&5
- echo "$as_me: WARNING: You will probably need to install $tor_openssl_devpkg_redhat too." >&2;}
- fi
- fi
- fi
- { { echo "$as_me:$LINENO: error: Missing headers; unable to proceed." >&5
- echo "$as_me: error: Missing headers; unable to proceed." >&2;}
- { (exit 1); exit 1; }; }
- fi
- fi
- LDFLAGS="$tor_saved_LDFLAGS"
- LIBS="$tor_saved_LIBS"
- CPPFLAGS="$tor_saved_CPPFLAGS"
- fi
- { echo "$as_me:$LINENO: result: $tor_cv_library_openssl_dir" >&5
- echo "${ECHO_T}$tor_cv_library_openssl_dir" >&6; }
- LIBS="$LIBS -lssl -lcrypto $TOR_LIB_GDI"
- if test "$tor_cv_library_openssl_dir" != "(system)"; then
- if test -d "$tor_cv_library_openssl_dir/lib"; then
- LDFLAGS="-L$tor_cv_library_openssl_dir/lib $LDFLAGS"
- else
- LDFLAGS="-L$tor_cv_library_openssl_dir $LDFLAGS"
- fi
- if test -d "$tor_cv_library_openssl_dir/include"; then
- CPPFLAGS="-I$tor_cv_library_openssl_dir/include $CPPFLAGS"
- else
- CPPFLAGS="-I$tor_cv_library_openssl_dir $CPPFLAGS"
- fi
- fi
- if test x$tor_cv_library_openssl_dir = "x(system)"; then
- TOR_LDFLAGS_openssl=""
- TOR_CPPFLAGS_openssl=""
- else
- if test -d "$tor_cv_library_openssl_dir/lib"; then
- TOR_LDFLAGS_openssl="-L$tor_cv_library_openssl_dir/lib"
- else
- TOR_LDFLAGS_openssl="-L$tor_cv_library_openssl_dir"
- fi
- if test -d "$tor_cv_library_openssl_dir/include"; then
- TOR_CPPFLAGS_openssl="-I$tor_cv_library_openssl_dir/include"
- else
- TOR_CPPFLAGS_openssl="-I$tor_cv_library_openssl_dir"
- fi
- fi
- if test "$cross_compiling" != yes; then
- { echo "$as_me:$LINENO: checking whether we need extra options to link openssl" >&5
- echo $ECHO_N "checking whether we need extra options to link openssl... $ECHO_C" >&6; }
- if test "${tor_cv_library_openssl_linker_option+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- orig_LDFLAGS="$LDFLAGS"
- runs=no
- linked_with=nothing
- if test -d "$tor_cv_library_openssl_dir/lib"; then
- tor_trydir="$tor_cv_library_openssl_dir/lib"
- else
- tor_trydir="$tor_cv_library_openssl_dir"
- fi
- for tor_tryextra in "(none)" "-Wl,-R$tor_trydir" "-R$tor_trydir"
- "-Wl,-rpath,$tor_trydir" ; do
- if test "$tor_tryextra" = "(none)"; then
- LDFLAGS="$orig_LDFLAGS"
- else
- LDFLAGS="$tor_tryextra $orig_LDFLAGS"
- fi
- if test "$cross_compiling" = yes; then
- { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
- See `config.log' for more details." >&5
- echo "$as_me: error: cannot run test program while cross compiling
- See `config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
- else
- cat >conftest.$ac_ext <<_ACEOF
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
- cat >>conftest.$ac_ext <<_ACEOF
- /* end confdefs.h. */
- void RAND_add(const void *buf, int num, double entropy);
- int
- main ()
- {
- RAND_add((void*)0,0,0); exit(0);
- ;
- return 0;
- }
- _ACEOF
- rm -f conftest$ac_exeext
- if { (ac_try="$ac_link"
- case "(($ac_try" in
- *"* | *`* | *\*) ac_try_echo=$ac_try;;
- *) ac_try_echo=$ac_try;;
- esac
- eval "echo "$as_me:$LINENO: $ac_try_echo"") >&5
- (eval "$ac_link") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: $? = $ac_status" >&5
- (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (case "(($ac_try" in
- *"* | *`* | *\*) ac_try_echo=$ac_try;;
- *) ac_try_echo=$ac_try;;
- esac
- eval "echo "$as_me:$LINENO: $ac_try_echo"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: $? = $ac_status" >&5
- (exit $ac_status); }; }; then
- runnable=yes
- else
- echo "$as_me: program exited with status $ac_status" >&5
- echo "$as_me: failed program was:" >&5
- sed 's/^/| /' conftest.$ac_ext >&5
- ( exit $ac_status )
- runnable=no
- fi
- rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
- fi
- if test "$runnable" = yes; then
- tor_cv_library_openssl_linker_option=$tor_tryextra
- break
- fi
- done
- if test "$runnable" = no; then
- { { echo "$as_me:$LINENO: error: Found linkable openssl in $tor_cv_library_openssl_dir, but it does not seem to run, even with -R. Maybe specify another using --with-openssl-dir}" >&5
- echo "$as_me: error: Found linkable openssl in $tor_cv_library_openssl_dir, but it does not seem to run, even with -R. Maybe specify another using --with-openssl-dir}" >&2;}
- { (exit 1); exit 1; }; }
- fi
- LDFLAGS="$orig_LDFLAGS"
- fi
- { echo "$as_me:$LINENO: result: $tor_cv_library_openssl_linker_option" >&5
- echo "${ECHO_T}$tor_cv_library_openssl_linker_option" >&6; }
- if test "$tor_cv_library_openssl_linker_option" != "(none)" ; then
- TOR_LDFLAGS_openssl="$TOR_LDFLAGS_openssl $tor_cv_library_openssl_linker_option"
- fi
- fi # cross-compile
- LIBS="$tor_saved_LIBS"
- LDFLAGS="$tor_saved_LDFLAGS"
- CPPFLAGS="$tor_saved_CPPFLAGS"
- tor_openssl_pkg_redhat="zlib"
- tor_openssl_pkg_debian="zlib1g"
- tor_openssl_devpkg_redhat="zlib-devel"
- tor_openssl_devpkg_debian="zlib1g-dev"
- tryzlibdir=""
- # Check whether --with-zlib-dir was given.
- if test "${with_zlib_dir+set}" = set; then
- withval=$with_zlib_dir;
- if test x$withval != xno ; then
- tryzlibdir="$withval"
- fi
- fi
- if test "x$tryzlibdir" = x && test "x$ALT_zlib_WITHVAL" != x ; then
- tryzlibdir="$ALT_zlib_WITHVAL"
- fi
- tor_saved_LIBS="$LIBS"
- tor_saved_LDFLAGS="$LDFLAGS"
- tor_saved_CPPFLAGS="$CPPFLAGS"
- { echo "$as_me:$LINENO: checking for zlib directory" >&5
- echo $ECHO_N "checking for zlib directory... $ECHO_C" >&6; }
- if test "${tor_cv_library_zlib_dir+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- tor_zlib_dir_found=no
- tor_zlib_any_linkable=no
- for tor_trydir in "$tryzlibdir" "(system)" "$prefix" /usr/local /usr/pkg /opt/zlib; do
- LDFLAGS="$tor_saved_LDFLAGS"
- LIBS="$tor_saved_LIBS -lz"
- CPPFLAGS="$tor_saved_CPPFLAGS"
- if test -z "$tor_trydir" ; then
- continue;
- fi
- # Skip the directory if it isn't there.
- if test ! -d "$tor_trydir" && test "$tor_trydir" != "(system)"; then
- continue;
- fi
- # If this isn't blank, try adding the directory (or appropriate
- # include/libs subdirectories) to the command line.
- if test "$tor_trydir" != "(system)"; then
- if test -d "$tor_trydir/lib"; then
- LDFLAGS="-L$tor_trydir/lib $LDFLAGS"
- else
- LDFLAGS="-L$tor_trydir $LDFLAGS"
- fi
- if test -d "$tor_trydir/include"; then
- CPPFLAGS="-I$tor_trydir/include $CPPFLAGS"
- else
- CPPFLAGS="-I$tor_trydir $CPPFLAGS"
- fi
- fi
- # Can we link against (but not necessarily run, or find the headers for)
- # the binary?
- cat >conftest.$ac_ext <<_ACEOF
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
- cat >>conftest.$ac_ext <<_ACEOF
- /* end confdefs.h. */
- const char * zlibVersion(void);
- int
- main ()
- {
- zlibVersion(); exit(0);
- ;
- return 0;
- }
- _ACEOF
- rm -f conftest.$ac_objext conftest$ac_exeext
- if { (ac_try="$ac_link"
- case "(($ac_try" in
- *"* | *`* | *\*) ac_try_echo=$ac_try;;
- *) ac_try_echo=$ac_try;;
- esac
- eval "echo "$as_me:$LINENO: $ac_try_echo"") >&5
- (eval "$ac_link") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: $? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest$ac_exeext &&
- $as_test_x conftest$ac_exeext; then
- linkable=yes
- else
- echo "$as_me: failed program was:" >&5
- sed 's/^/| /' conftest.$ac_ext >&5
- linkable=no
- fi
- rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo
- conftest$ac_exeext conftest.$ac_ext
- if test "$linkable" = yes; then
- tor_zlib_any_linkable=yes
- # Okay, we can link against it. Can we find the headers?
- cat >conftest.$ac_ext <<_ACEOF
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
- cat >>conftest.$ac_ext <<_ACEOF
- /* end confdefs.h. */
- #include <zlib.h>
- int
- main ()
- {
- zlibVersion(); exit(0);
- ;
- return 0;
- }
- _ACEOF
- rm -f conftest.$ac_objext
- if { (ac_try="$ac_compile"
- case "(($ac_try" in
- *"* | *`* | *\*) ac_try_echo=$ac_try;;
- *) ac_try_echo=$ac_try;;
- esac
- eval "echo "$as_me:$LINENO: $ac_try_echo"") >&5
- (eval "$ac_compile") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: $? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
- buildable=yes
- else
- echo "$as_me: failed program was:" >&5
- sed 's/^/| /' conftest.$ac_ext >&5
- buildable=no
- fi
- rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- if test "$buildable" = yes; then
- tor_cv_library_zlib_dir=$tor_trydir
- tor_zlib_dir_found=yes
- break
- fi
- fi
- done
- if test "$tor_zlib_dir_found" = no; then
- if test "$tor_zlib_any_linkable" = no ; then
- { echo "$as_me:$LINENO: WARNING: Could not find a linkable zlib. If you have it installed somewhere unusual, you can specify an explicit path using --with-zlib-dir" >&5
- echo "$as_me: WARNING: Could not find a linkable zlib. If you have it installed somewhere unusual, you can specify an explicit path using --with-zlib-dir" >&2;}
- h=""
- if test xpkg = xdevpkg; then
- h=" headers for"
- fi
- if test -f /etc/debian_version && test x"$tor_zlib_pkg_debian" != x; then
- { echo "$as_me:$LINENO: WARNING: On Debian, you can install$h zlib using "apt-get install $tor_zlib_pkg_debian"" >&5
- echo "$as_me: WARNING: On Debian, you can install$h zlib using "apt-get install $tor_zlib_pkg_debian"" >&2;}
- if test x"$tor_zlib_pkg_debian" != x"$tor_zlib_devpkg_debian"; then
- { echo "$as_me:$LINENO: WARNING: You will probably need $tor_zlib_devpkg_debian too." >&5
- echo "$as_me: WARNING: You will probably need $tor_zlib_devpkg_debian too." >&2;}
- fi
- fi
- if test -f /etc/fedora-release && test x"$tor_zlib_pkg_redhat" != x; then
- { echo "$as_me:$LINENO: WARNING: On Fedora Core, you can install$h zlib using "yum install $tor_zlib_pkg_redhat"" >&5
- echo "$as_me: WARNING: On Fedora Core, you can install$h zlib using "yum install $tor_zlib_pkg_redhat"" >&2;}
- if test x"$tor_zlib_pkg_redhat" != x"$tor_zlib_devpkg_redhat"; then
- { echo "$as_me:$LINENO: WARNING: You will probably need to install $tor_zlib_devpkg_redhat too." >&5
- echo "$as_me: WARNING: You will probably need to install $tor_zlib_devpkg_redhat too." >&2;}
- fi
- else
- if test -f /etc/redhat-release && test x"$tor_zlib_pkg_redhat" != x; then
- { echo "$as_me:$LINENO: WARNING: On most Redhat-based systems, you can get$h zlib by installing the $tor_zlib_pkg_redhat" RPM package" >&5
- echo "$as_me: WARNING: On most Redhat-based systems, you can get$h zlib by installing the $tor_zlib_pkg_redhat" RPM package" >&2;}
- if test x"$tor_zlib_pkg_redhat" != x"$tor_zlib_devpkg_redhat"; then
- { echo "$as_me:$LINENO: WARNING: You will probably need to install $tor_zlib_devpkg_redhat too." >&5
- echo "$as_me: WARNING: You will probably need to install $tor_zlib_devpkg_redhat too." >&2;}
- fi
- fi
- fi
- { { echo "$as_me:$LINENO: error: Missing libraries; unable to proceed." >&5
- echo "$as_me: error: Missing libraries; unable to proceed." >&2;}
- { (exit 1); exit 1; }; }
- else
- { echo "$as_me:$LINENO: WARNING: We found the libraries for zlib, but we could not find the C header files. You may need to install a devel package." >&5
- echo "$as_me: WARNING: We found the libraries for zlib, but we could not find the C header files. You may need to install a devel package." >&2;}
- h=""
- if test xdevpkg = xdevpkg; then
- h=" headers for"
- fi
- if test -f /etc/debian_version && test x"$tor_zlib_devpkg_debian" != x; then
- { echo "$as_me:$LINENO: WARNING: On Debian, you can install$h zlib using "apt-get install $tor_zlib_devpkg_debian"" >&5
- echo "$as_me: WARNING: On Debian, you can install$h zlib using "apt-get install $tor_zlib_devpkg_debian"" >&2;}
- if test x"$tor_zlib_devpkg_debian" != x"$tor_zlib_devpkg_debian"; then
- { echo "$as_me:$LINENO: WARNING: You will probably need $tor_zlib_devpkg_debian too." >&5
- echo "$as_me: WARNING: You will probably need $tor_zlib_devpkg_debian too." >&2;}
- fi
- fi
- if test -f /etc/fedora-release && test x"$tor_zlib_devpkg_redhat" != x; then
- { echo "$as_me:$LINENO: WARNING: On Fedora Core, you can install$h zlib using "yum install $tor_zlib_devpkg_redhat"" >&5
- echo "$as_me: WARNING: On Fedora Core, you can install$h zlib using "yum install $tor_zlib_devpkg_redhat"" >&2;}
- if test x"$tor_zlib_devpkg_redhat" != x"$tor_zlib_devpkg_redhat"; then
- { echo "$as_me:$LINENO: WARNING: You will probably need to install $tor_zlib_devpkg_redhat too." >&5
- echo "$as_me: WARNING: You will probably need to install $tor_zlib_devpkg_redhat too." >&2;}
- fi
- else
- if test -f /etc/redhat-release && test x"$tor_zlib_devpkg_redhat" != x; then
- { echo "$as_me:$LINENO: WARNING: On most Redhat-based systems, you can get$h zlib by installing the $tor_zlib_devpkg_redhat" RPM package" >&5
- echo "$as_me: WARNING: On most Redhat-based systems, you can get$h zlib by installing the $tor_zlib_devpkg_redhat" RPM package" >&2;}
- if test x"$tor_zlib_devpkg_redhat" != x"$tor_zlib_devpkg_redhat"; then
- { echo "$as_me:$LINENO: WARNING: You will probably need to install $tor_zlib_devpkg_redhat too." >&5
- echo "$as_me: WARNING: You will probably need to install $tor_zlib_devpkg_redhat too." >&2;}
- fi
- fi
- fi
- { { echo "$as_me:$LINENO: error: Missing headers; unable to proceed." >&5
- echo "$as_me: error: Missing headers; unable to proceed." >&2;}
- { (exit 1); exit 1; }; }
- fi
- fi
- LDFLAGS="$tor_saved_LDFLAGS"
- LIBS="$tor_saved_LIBS"
- CPPFLAGS="$tor_saved_CPPFLAGS"
- fi
- { echo "$as_me:$LINENO: result: $tor_cv_library_zlib_dir" >&5
- echo "${ECHO_T}$tor_cv_library_zlib_dir" >&6; }
- LIBS="$LIBS -lz"
- if test "$tor_cv_library_zlib_dir" != "(system)"; then
- if test -d "$tor_cv_library_zlib_dir/lib"; then
- LDFLAGS="-L$tor_cv_library_zlib_dir/lib $LDFLAGS"
- else
- LDFLAGS="-L$tor_cv_library_zlib_dir $LDFLAGS"
- fi
- if test -d "$tor_cv_library_zlib_dir/include"; then
- CPPFLAGS="-I$tor_cv_library_zlib_dir/include $CPPFLAGS"
- else
- CPPFLAGS="-I$tor_cv_library_zlib_dir $CPPFLAGS"
- fi
- fi
- if test x$tor_cv_library_zlib_dir = "x(system)"; then
- TOR_LDFLAGS_zlib=""
- TOR_CPPFLAGS_zlib=""
- else
- if test -d "$tor_cv_library_zlib_dir/lib"; then
- TOR_LDFLAGS_zlib="-L$tor_cv_library_zlib_dir/lib"
- else
- TOR_LDFLAGS_zlib="-L$tor_cv_library_zlib_dir"
- fi
- if test -d "$tor_cv_library_zlib_dir/include"; then
- TOR_CPPFLAGS_zlib="-I$tor_cv_library_zlib_dir/include"
- else
- TOR_CPPFLAGS_zlib="-I$tor_cv_library_zlib_dir"
- fi
- fi
- if test "$cross_compiling" != yes; then
- { echo "$as_me:$LINENO: checking whether we need extra options to link zlib" >&5
- echo $ECHO_N "checking whether we need extra options to link zlib... $ECHO_C" >&6; }
- if test "${tor_cv_library_zlib_linker_option+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- orig_LDFLAGS="$LDFLAGS"
- runs=no
- linked_with=nothing
- if test -d "$tor_cv_library_zlib_dir/lib"; then
- tor_trydir="$tor_cv_library_zlib_dir/lib"
- else
- tor_trydir="$tor_cv_library_zlib_dir"
- fi
- for tor_tryextra in "(none)" "-Wl,-R$tor_trydir" "-R$tor_trydir"
- "-Wl,-rpath,$tor_trydir" ; do
- if test "$tor_tryextra" = "(none)"; then
- LDFLAGS="$orig_LDFLAGS"
- else
- LDFLAGS="$tor_tryextra $orig_LDFLAGS"
- fi
- if test "$cross_compiling" = yes; then
- { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
- See `config.log' for more details." >&5
- echo "$as_me: error: cannot run test program while cross compiling
- See `config.log' for more details." >&2;}
- { (exit 1); exit 1; }; }
- else
- cat >conftest.$ac_ext <<_ACEOF
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
- cat >>conftest.$ac_ext <<_ACEOF
- /* end confdefs.h. */
- const char * zlibVersion(void);
- int
- main ()
- {
- zlibVersion(); exit(0);
- ;
- return 0;
- }
- _ACEOF
- rm -f conftest$ac_exeext
- if { (ac_try="$ac_link"
- case "(($ac_try" in
- *"* | *`* | *\*) ac_try_echo=$ac_try;;
- *) ac_try_echo=$ac_try;;
- esac
- eval "echo "$as_me:$LINENO: $ac_try_echo"") >&5
- (eval "$ac_link") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: $? = $ac_status" >&5
- (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (case "(($ac_try" in
- *"* | *`* | *\*) ac_try_echo=$ac_try;;
- *) ac_try_echo=$ac_try;;
- esac
- eval "echo "$as_me:$LINENO: $ac_try_echo"") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: $? = $ac_status" >&5
- (exit $ac_status); }; }; then
- runnable=yes
- else
- echo "$as_me: program exited with status $ac_status" >&5
- echo "$as_me: failed program was:" >&5
- sed 's/^/| /' conftest.$ac_ext >&5
- ( exit $ac_status )
- runnable=no
- fi
- rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
- fi
- if test "$runnable" = yes; then
- tor_cv_library_zlib_linker_option=$tor_tryextra
- break
- fi
- done
- if test "$runnable" = no; then
- { { echo "$as_me:$LINENO: error: Found linkable zlib in $tor_cv_library_zlib_dir, but it does not seem to run, even with -R. Maybe specify another using --with-zlib-dir}" >&5
- echo "$as_me: error: Found linkable zlib in $tor_cv_library_zlib_dir, but it does not seem to run, even with -R. Maybe specify another using --with-zlib-dir}" >&2;}
- { (exit 1); exit 1; }; }
- fi
- LDFLAGS="$orig_LDFLAGS"
- fi
- { echo "$as_me:$LINENO: result: $tor_cv_library_zlib_linker_option" >&5
- echo "${ECHO_T}$tor_cv_library_zlib_linker_option" >&6; }
- if test "$tor_cv_library_zlib_linker_option" != "(none)" ; then
- TOR_LDFLAGS_zlib="$TOR_LDFLAGS_zlib $tor_cv_library_zlib_linker_option"
- fi
- fi # cross-compile
- LIBS="$tor_saved_LIBS"
- LDFLAGS="$tor_saved_LDFLAGS"
- CPPFLAGS="$tor_saved_CPPFLAGS"
- # Check whether --enable-largefile was given.
- if test "${enable_largefile+set}" = set; then
- enableval=$enable_largefile;
- fi
- if test "$enable_largefile" != no; then
- { echo "$as_me:$LINENO: checking for special C compiler options needed for large files" >&5
- echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6; }
- if test "${ac_cv_sys_largefile_CC+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- ac_cv_sys_largefile_CC=no
- if test "$GCC" != yes; then
- ac_save_CC=$CC
- while :; do
- # IRIX 6.2 and later do not support large files by default,
- # so use the C compiler's -n32 option if that helps.
- cat >conftest.$ac_ext <<_ACEOF
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
- cat >>conftest.$ac_ext <<_ACEOF
- /* end confdefs.h. */
- #include <sys/types.h>
- /* Check that off_t can represent 2**63 - 1 correctly.
- We can't simply define LARGE_OFF_T to be 9223372036854775807,
- since some C++ compilers masquerading as C compilers
- incorrectly reject 9223372036854775807. */
- #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
- int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
- && LARGE_OFF_T % 2147483647 == 1)
- ? 1 : -1];
- int
- main ()
- {
- ;
- return 0;
- }
- _ACEOF
- rm -f conftest.$ac_objext
- if { (ac_try="$ac_compile"
- case "(($ac_try" in
- *"* | *`* | *\*) ac_try_echo=$ac_try;;
- *) ac_try_echo=$ac_try;;
- esac
- eval "echo "$as_me:$LINENO: $ac_try_echo"") >&5
- (eval "$ac_compile") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: $? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
- break
- else
- echo "$as_me: failed program was:" >&5
- sed 's/^/| /' conftest.$ac_ext >&5
- fi
- rm -f core conftest.err conftest.$ac_objext
- CC="$CC -n32"
- rm -f conftest.$ac_objext
- if { (ac_try="$ac_compile"
- case "(($ac_try" in
- *"* | *`* | *\*) ac_try_echo=$ac_try;;
- *) ac_try_echo=$ac_try;;
- esac
- eval "echo "$as_me:$LINENO: $ac_try_echo"") >&5
- (eval "$ac_compile") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: $? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
- ac_cv_sys_largefile_CC=' -n32'; break
- else
- echo "$as_me: failed program was:" >&5
- sed 's/^/| /' conftest.$ac_ext >&5
- fi
- rm -f core conftest.err conftest.$ac_objext
- break
- done
- CC=$ac_save_CC
- rm -f conftest.$ac_ext
- fi
- fi
- { echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_CC" >&5
- echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6; }
- if test "$ac_cv_sys_largefile_CC" != no; then
- CC=$CC$ac_cv_sys_largefile_CC
- fi
- { echo "$as_me:$LINENO: checking for _FILE_OFFSET_BITS value needed for large files" >&5
- echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6; }
- if test "${ac_cv_sys_file_offset_bits+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- while :; do
- cat >conftest.$ac_ext <<_ACEOF
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
- cat >>conftest.$ac_ext <<_ACEOF
- /* end confdefs.h. */
- #include <sys/types.h>
- /* Check that off_t can represent 2**63 - 1 correctly.
- We can't simply define LARGE_OFF_T to be 9223372036854775807,
- since some C++ compilers masquerading as C compilers
- incorrectly reject 9223372036854775807. */
- #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
- int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
- && LARGE_OFF_T % 2147483647 == 1)
- ? 1 : -1];
- int
- main ()
- {
- ;
- return 0;
- }
- _ACEOF
- rm -f conftest.$ac_objext
- if { (ac_try="$ac_compile"
- case "(($ac_try" in
- *"* | *`* | *\*) ac_try_echo=$ac_try;;
- *) ac_try_echo=$ac_try;;
- esac
- eval "echo "$as_me:$LINENO: $ac_try_echo"") >&5
- (eval "$ac_compile") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: $? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
- ac_cv_sys_file_offset_bits=no; break
- else
- echo "$as_me: failed program was:" >&5
- sed 's/^/| /' conftest.$ac_ext >&5
- fi
- rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- cat >conftest.$ac_ext <<_ACEOF
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
- cat >>conftest.$ac_ext <<_ACEOF
- /* end confdefs.h. */
- #define _FILE_OFFSET_BITS 64
- #include <sys/types.h>
- /* Check that off_t can represent 2**63 - 1 correctly.
- We can't simply define LARGE_OFF_T to be 9223372036854775807,
- since some C++ compilers masquerading as C compilers
- incorrectly reject 9223372036854775807. */
- #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
- int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
- && LARGE_OFF_T % 2147483647 == 1)
- ? 1 : -1];
- int
- main ()
- {
- ;
- return 0;
- }
- _ACEOF
- rm -f conftest.$ac_objext
- if { (ac_try="$ac_compile"
- case "(($ac_try" in
- *"* | *`* | *\*) ac_try_echo=$ac_try;;
- *) ac_try_echo=$ac_try;;
- esac
- eval "echo "$as_me:$LINENO: $ac_try_echo"") >&5
- (eval "$ac_compile") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: $? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
- ac_cv_sys_file_offset_bits=64; break
- else
- echo "$as_me: failed program was:" >&5
- sed 's/^/| /' conftest.$ac_ext >&5
- fi
- rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- ac_cv_sys_file_offset_bits=unknown
- break
- done
- fi
- { echo "$as_me:$LINENO: result: $ac_cv_sys_file_offset_bits" >&5
- echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6; }
- case $ac_cv_sys_file_offset_bits in #(
- no | unknown) ;;
- *)
- cat >>confdefs.h <<_ACEOF
- #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
- _ACEOF
- ;;
- esac
- rm -f conftest*
- if test $ac_cv_sys_file_offset_bits = unknown; then
- { echo "$as_me:$LINENO: checking for _LARGE_FILES value needed for large files" >&5
- echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6; }
- if test "${ac_cv_sys_large_files+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- while :; do
- cat >conftest.$ac_ext <<_ACEOF
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
- cat >>conftest.$ac_ext <<_ACEOF
- /* end confdefs.h. */
- #include <sys/types.h>
- /* Check that off_t can represent 2**63 - 1 correctly.
- We can't simply define LARGE_OFF_T to be 9223372036854775807,
- since some C++ compilers masquerading as C compilers
- incorrectly reject 9223372036854775807. */
- #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
- int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
- && LARGE_OFF_T % 2147483647 == 1)
- ? 1 : -1];
- int
- main ()
- {
- ;
- return 0;
- }
- _ACEOF
- rm -f conftest.$ac_objext
- if { (ac_try="$ac_compile"
- case "(($ac_try" in
- *"* | *`* | *\*) ac_try_echo=$ac_try;;
- *) ac_try_echo=$ac_try;;
- esac
- eval "echo "$as_me:$LINENO: $ac_try_echo"") >&5
- (eval "$ac_compile") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: $? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
- ac_cv_sys_large_files=no; break
- else
- echo "$as_me: failed program was:" >&5
- sed 's/^/| /' conftest.$ac_ext >&5
- fi
- rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- cat >conftest.$ac_ext <<_ACEOF
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
- cat >>conftest.$ac_ext <<_ACEOF
- /* end confdefs.h. */
- #define _LARGE_FILES 1
- #include <sys/types.h>
- /* Check that off_t can represent 2**63 - 1 correctly.
- We can't simply define LARGE_OFF_T to be 9223372036854775807,
- since some C++ compilers masquerading as C compilers
- incorrectly reject 9223372036854775807. */
- #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
- int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
- && LARGE_OFF_T % 2147483647 == 1)
- ? 1 : -1];
- int
- main ()
- {
- ;
- return 0;
- }
- _ACEOF
- rm -f conftest.$ac_objext
- if { (ac_try="$ac_compile"
- case "(($ac_try" in
- *"* | *`* | *\*) ac_try_echo=$ac_try;;
- *) ac_try_echo=$ac_try;;
- esac
- eval "echo "$as_me:$LINENO: $ac_try_echo"") >&5
- (eval "$ac_compile") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: $? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
- ac_cv_sys_large_files=1; break
- else
- echo "$as_me: failed program was:" >&5
- sed 's/^/| /' conftest.$ac_ext >&5
- fi
- rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- ac_cv_sys_large_files=unknown
- break
- done
- fi
- { echo "$as_me:$LINENO: result: $ac_cv_sys_large_files" >&5
- echo "${ECHO_T}$ac_cv_sys_large_files" >&6; }
- case $ac_cv_sys_large_files in #(
- no | unknown) ;;
- *)
- cat >>confdefs.h <<_ACEOF
- #define _LARGE_FILES $ac_cv_sys_large_files
- _ACEOF
- ;;
- esac
- rm -f conftest*
- fi
- fi
- for ac_header in unistd.h string.h signal.h sys/stat.h sys/types.h fcntl.h sys/fcntl.h sys/time.h errno.h assert.h time.h
- do
- as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
- if { as_var=$as_ac_Header; eval "test "${$as_var+set}" = set"; }; then
- { echo "$as_me:$LINENO: checking for $ac_header" >&5
- echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
- if { as_var=$as_ac_Header; eval "test "${$as_var+set}" = set"; }; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
- fi
- ac_res=`eval echo '${'$as_ac_Header'}'`
- { echo "$as_me:$LINENO: result: $ac_res" >&5
- echo "${ECHO_T}$ac_res" >&6; }
- else
- # Is the header compilable?
- { echo "$as_me:$LINENO: checking $ac_header usability" >&5
- echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
- cat >conftest.$ac_ext <<_ACEOF
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
- cat >>conftest.$ac_ext <<_ACEOF
- /* end confdefs.h. */
- $ac_includes_default
- #include <$ac_header>
- _ACEOF
- rm -f conftest.$ac_objext
- if { (ac_try="$ac_compile"
- case "(($ac_try" in
- *"* | *`* | *\*) ac_try_echo=$ac_try;;
- *) ac_try_echo=$ac_try;;
- esac
- eval "echo "$as_me:$LINENO: $ac_try_echo"") >&5
- (eval "$ac_compile") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: $? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
- ac_header_compiler=yes
- else
- echo "$as_me: failed program was:" >&5
- sed 's/^/| /' conftest.$ac_ext >&5
- ac_header_compiler=no
- fi
- rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
- echo "${ECHO_T}$ac_header_compiler" >&6; }
- # Is the header present?
- { echo "$as_me:$LINENO: checking $ac_header presence" >&5
- echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
- cat >conftest.$ac_ext <<_ACEOF
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
- cat >>conftest.$ac_ext <<_ACEOF
- /* end confdefs.h. */
- #include <$ac_header>
- _ACEOF
- if { (ac_try="$ac_cpp conftest.$ac_ext"
- case "(($ac_try" in
- *"* | *`* | *\*) ac_try_echo=$ac_try;;
- *) ac_try_echo=$ac_try;;
- esac
- eval "echo "$as_me:$LINENO: $ac_try_echo"") >&5
- (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: $? = $ac_status" >&5
- (exit $ac_status); } >/dev/null && {
- test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
- test ! -s conftest.err
- }; then
- ac_header_preproc=yes
- else
- echo "$as_me: failed program was:" >&5
- sed 's/^/| /' conftest.$ac_ext >&5
- ac_header_preproc=no
- fi
- rm -f conftest.err conftest.$ac_ext
- { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
- echo "${ECHO_T}$ac_header_preproc" >&6; }
- # So? What about this header?
- case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
- yes:no: )
- { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
- echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
- echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
- ac_header_preproc=yes
- ;;
- no:yes:* )
- { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
- echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
- echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
- echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: section "Present But Cannot Be Compiled"" >&5
- echo "$as_me: WARNING: $ac_header: section "Present But Cannot Be Compiled"" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
- echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
- echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
- ;;
- esac
- { echo "$as_me:$LINENO: checking for $ac_header" >&5
- echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
- if { as_var=$as_ac_Header; eval "test "${$as_var+set}" = set"; }; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- eval "$as_ac_Header=$ac_header_preproc"
- fi
- ac_res=`eval echo '${'$as_ac_Header'}'`
- { echo "$as_me:$LINENO: result: $ac_res" >&5
- echo "${ECHO_T}$ac_res" >&6; }
- fi
- if test `eval echo '${'$as_ac_Header'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
- #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
- _ACEOF
- else
- { echo "$as_me:$LINENO: WARNING: Some headers were not found" >&5
- echo "$as_me: WARNING: Some headers were not found" >&2;}
- fi
- done
- for ac_header in netdb.h sys/ioctl.h sys/socket.h arpa/inet.h netinet/in.h pwd.h grp.h sys/un.h sys/uio.h
- do
- as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
- if { as_var=$as_ac_Header; eval "test "${$as_var+set}" = set"; }; then
- { echo "$as_me:$LINENO: checking for $ac_header" >&5
- echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
- if { as_var=$as_ac_Header; eval "test "${$as_var+set}" = set"; }; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
- fi
- ac_res=`eval echo '${'$as_ac_Header'}'`
- { echo "$as_me:$LINENO: result: $ac_res" >&5
- echo "${ECHO_T}$ac_res" >&6; }
- else
- # Is the header compilable?
- { echo "$as_me:$LINENO: checking $ac_header usability" >&5
- echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
- cat >conftest.$ac_ext <<_ACEOF
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
- cat >>conftest.$ac_ext <<_ACEOF
- /* end confdefs.h. */
- $ac_includes_default
- #include <$ac_header>
- _ACEOF
- rm -f conftest.$ac_objext
- if { (ac_try="$ac_compile"
- case "(($ac_try" in
- *"* | *`* | *\*) ac_try_echo=$ac_try;;
- *) ac_try_echo=$ac_try;;
- esac
- eval "echo "$as_me:$LINENO: $ac_try_echo"") >&5
- (eval "$ac_compile") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: $? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
- ac_header_compiler=yes
- else
- echo "$as_me: failed program was:" >&5
- sed 's/^/| /' conftest.$ac_ext >&5
- ac_header_compiler=no
- fi
- rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
- echo "${ECHO_T}$ac_header_compiler" >&6; }
- # Is the header present?
- { echo "$as_me:$LINENO: checking $ac_header presence" >&5
- echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
- cat >conftest.$ac_ext <<_ACEOF
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
- cat >>conftest.$ac_ext <<_ACEOF
- /* end confdefs.h. */
- #include <$ac_header>
- _ACEOF
- if { (ac_try="$ac_cpp conftest.$ac_ext"
- case "(($ac_try" in
- *"* | *`* | *\*) ac_try_echo=$ac_try;;
- *) ac_try_echo=$ac_try;;
- esac
- eval "echo "$as_me:$LINENO: $ac_try_echo"") >&5
- (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: $? = $ac_status" >&5
- (exit $ac_status); } >/dev/null && {
- test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
- test ! -s conftest.err
- }; then
- ac_header_preproc=yes
- else
- echo "$as_me: failed program was:" >&5
- sed 's/^/| /' conftest.$ac_ext >&5
- ac_header_preproc=no
- fi
- rm -f conftest.err conftest.$ac_ext
- { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
- echo "${ECHO_T}$ac_header_preproc" >&6; }
- # So? What about this header?
- case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
- yes:no: )
- { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
- echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
- echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
- ac_header_preproc=yes
- ;;
- no:yes:* )
- { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
- echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
- echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
- echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: section "Present But Cannot Be Compiled"" >&5
- echo "$as_me: WARNING: $ac_header: section "Present But Cannot Be Compiled"" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
- echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
- echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
- ;;
- esac
- { echo "$as_me:$LINENO: checking for $ac_header" >&5
- echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
- if { as_var=$as_ac_Header; eval "test "${$as_var+set}" = set"; }; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- eval "$as_ac_Header=$ac_header_preproc"
- fi
- ac_res=`eval echo '${'$as_ac_Header'}'`
- { echo "$as_me:$LINENO: result: $ac_res" >&5
- echo "${ECHO_T}$ac_res" >&6; }
- fi
- if test `eval echo '${'$as_ac_Header'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
- #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
- _ACEOF
- fi
- done
- for ac_header in stdint.h sys/types.h inttypes.h sys/param.h sys/wait.h limits.h sys/limits.h netinet/in.h arpa/inet.h machine/limits.h syslog.h sys/time.h sys/resource.h inttypes.h utime.h sys/utime.h sys/mman.h netinet/in6.h malloc.h sys/syslimits.h malloc/malloc.h linux/types.h sys/file.h malloc_np.h sys/prctl.h
- do
- as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
- if { as_var=$as_ac_Header; eval "test "${$as_var+set}" = set"; }; then
- { echo "$as_me:$LINENO: checking for $ac_header" >&5
- echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
- if { as_var=$as_ac_Header; eval "test "${$as_var+set}" = set"; }; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
- fi
- ac_res=`eval echo '${'$as_ac_Header'}'`
- { echo "$as_me:$LINENO: result: $ac_res" >&5
- echo "${ECHO_T}$ac_res" >&6; }
- else
- # Is the header compilable?
- { echo "$as_me:$LINENO: checking $ac_header usability" >&5
- echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
- cat >conftest.$ac_ext <<_ACEOF
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
- cat >>conftest.$ac_ext <<_ACEOF
- /* end confdefs.h. */
- $ac_includes_default
- #include <$ac_header>
- _ACEOF
- rm -f conftest.$ac_objext
- if { (ac_try="$ac_compile"
- case "(($ac_try" in
- *"* | *`* | *\*) ac_try_echo=$ac_try;;
- *) ac_try_echo=$ac_try;;
- esac
- eval "echo "$as_me:$LINENO: $ac_try_echo"") >&5
- (eval "$ac_compile") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: $? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
- ac_header_compiler=yes
- else
- echo "$as_me: failed program was:" >&5
- sed 's/^/| /' conftest.$ac_ext >&5
- ac_header_compiler=no
- fi
- rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
- echo "${ECHO_T}$ac_header_compiler" >&6; }
- # Is the header present?
- { echo "$as_me:$LINENO: checking $ac_header presence" >&5
- echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
- cat >conftest.$ac_ext <<_ACEOF
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
- cat >>conftest.$ac_ext <<_ACEOF
- /* end confdefs.h. */
- #include <$ac_header>
- _ACEOF
- if { (ac_try="$ac_cpp conftest.$ac_ext"
- case "(($ac_try" in
- *"* | *`* | *\*) ac_try_echo=$ac_try;;
- *) ac_try_echo=$ac_try;;
- esac
- eval "echo "$as_me:$LINENO: $ac_try_echo"") >&5
- (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: $? = $ac_status" >&5
- (exit $ac_status); } >/dev/null && {
- test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
- test ! -s conftest.err
- }; then
- ac_header_preproc=yes
- else
- echo "$as_me: failed program was:" >&5
- sed 's/^/| /' conftest.$ac_ext >&5
- ac_header_preproc=no
- fi
- rm -f conftest.err conftest.$ac_ext
- { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
- echo "${ECHO_T}$ac_header_preproc" >&6; }
- # So? What about this header?
- case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
- yes:no: )
- { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
- echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
- echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
- ac_header_preproc=yes
- ;;
- no:yes:* )
- { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
- echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
- echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
- echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: section "Present But Cannot Be Compiled"" >&5
- echo "$as_me: WARNING: $ac_header: section "Present But Cannot Be Compiled"" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
- echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
- echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
- ;;
- esac
- { echo "$as_me:$LINENO: checking for $ac_header" >&5
- echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
- if { as_var=$as_ac_Header; eval "test "${$as_var+set}" = set"; }; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- eval "$as_ac_Header=$ac_header_preproc"
- fi
- ac_res=`eval echo '${'$as_ac_Header'}'`
- { echo "$as_me:$LINENO: result: $ac_res" >&5
- echo "${ECHO_T}$ac_res" >&6; }
- fi
- if test `eval echo '${'$as_ac_Header'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
- #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
- _ACEOF
- fi
- done
- { echo "$as_me:$LINENO: checking for declaration of malloc_good_size" >&5
- echo $ECHO_N "checking for declaration of malloc_good_size... $ECHO_C" >&6; }
- if test "${tor_cv_malloc_good_size_declared+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- cat >conftest.$ac_ext <<_ACEOF
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
- cat >>conftest.$ac_ext <<_ACEOF
- /* end confdefs.h. */
- #ifdef HAVE_MALLOC_H
- #include <malloc.h>
- #endif
- #ifdef HAVE_MALLOC_MALLOC_H
- #include <malloc/malloc.h>
- #endif
- int
- main ()
- {
- void *ptr= malloc_good_size ;
- ;
- return 0;
- }
- _ACEOF
- rm -f conftest.$ac_objext
- if { (ac_try="$ac_compile"
- case "(($ac_try" in
- *"* | *`* | *\*) ac_try_echo=$ac_try;;
- *) ac_try_echo=$ac_try;;
- esac
- eval "echo "$as_me:$LINENO: $ac_try_echo"") >&5
- (eval "$ac_compile") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: $? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
- tor_cv_malloc_good_size_declared=yes
- else
- echo "$as_me: failed program was:" >&5
- sed 's/^/| /' conftest.$ac_ext >&5
- tor_cv_malloc_good_size_declared=no
- fi
- rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- { echo "$as_me:$LINENO: result: $tor_cv_malloc_good_size_declared" >&5
- echo "${ECHO_T}$tor_cv_malloc_good_size_declared" >&6; }
- if test x$tor_cv_malloc_good_size_declared != xno ; then
- cat >>confdefs.h <<_ACEOF
- #define HAVE_MALLOC_GOOD_SIZE_PROTOTYPE 1
- _ACEOF
- fi
- for ac_header in net/if.h
- do
- as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
- { echo "$as_me:$LINENO: checking for $ac_header" >&5
- echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
- if { as_var=$as_ac_Header; eval "test "${$as_var+set}" = set"; }; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- cat >conftest.$ac_ext <<_ACEOF
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
- cat >>conftest.$ac_ext <<_ACEOF
- /* end confdefs.h. */
- #ifdef HAVE_SYS_TYPES_H
- #include <sys/types.h>
- #endif
- #ifdef HAVE_SYS_SOCKET_H
- #include <sys/socket.h>
- #endif
- #include <$ac_header>
- _ACEOF
- rm -f conftest.$ac_objext
- if { (ac_try="$ac_compile"
- case "(($ac_try" in
- *"* | *`* | *\*) ac_try_echo=$ac_try;;
- *) ac_try_echo=$ac_try;;
- esac
- eval "echo "$as_me:$LINENO: $ac_try_echo"") >&5
- (eval "$ac_compile") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: $? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
- eval "$as_ac_Header=yes"
- else
- echo "$as_me: failed program was:" >&5
- sed 's/^/| /' conftest.$ac_ext >&5
- eval "$as_ac_Header=no"
- fi
- rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- fi
- ac_res=`eval echo '${'$as_ac_Header'}'`
- { echo "$as_me:$LINENO: result: $ac_res" >&5
- echo "${ECHO_T}$ac_res" >&6; }
- if test `eval echo '${'$as_ac_Header'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
- #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
- _ACEOF
- net_if_found=1
- else
- net_if_found=0
- fi
- done
- for ac_header in net/pfvar.h
- do
- as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
- { echo "$as_me:$LINENO: checking for $ac_header" >&5
- echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
- if { as_var=$as_ac_Header; eval "test "${$as_var+set}" = set"; }; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
- else
- cat >conftest.$ac_ext <<_ACEOF
- /* confdefs.h. */
- _ACEOF
- cat confdefs.h >>conftest.$ac_ext
- cat >>conftest.$ac_ext <<_ACEOF
- /* end confdefs.h. */
- #ifdef HAVE_SYS_TYPES_H
- #include <sys/types.h>
- #endif
- #ifdef HAVE_SYS_SOCKET_H
- #include <sys/socket.h>
- #endif
- #ifdef HAVE_NET_IF_H
- #include <net/if.h>
- #endif
- #include <$ac_header>
- _ACEOF
- rm -f conftest.$ac_objext
- if { (ac_try="$ac_compile"
- case "(($ac_try" in
- *"* | *`* | *\*) ac_try_echo=$ac_try;;