From 23d69c13bd49902b2883eec4d5e899b0d1bf85ea Mon Sep 17 00:00:00 2001 From: Karl Ramm Date: Tue, 17 Mar 2009 04:41:27 +0000 Subject: use c-ares --- configure | 395 +++++++++++++++++++++++++++------------------------------ configure.in | 8 +- debian/control | 2 +- zwgc/main.c | 7 +- 4 files changed, 201 insertions(+), 211 deletions(-) diff --git a/configure b/configure index 233ecf1..4209b6e 100755 --- a/configure +++ b/configure @@ -1485,7 +1485,6 @@ Optional Packages: --with-krb5=PREFIX Use Kerberos 5 --with-hesiod=PREFIX Use Hesiod --with-regex=PREFIX Use installed regex library - --with-ares=PREFIX Use libares --with-com_err=PREFIX Specify location of com_err --with-ss=PREFIX Specify location of ss (requires com_err) @@ -4146,7 +4145,7 @@ ia64-*-hpux*) ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 4149 "configure"' > conftest.$ac_ext + echo '#line 4148 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -6712,11 +6711,11 @@ else -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:6715: $lt_compile\"" >&5) + (eval echo "\"\$as_me:6714: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:6719: \$? = $ac_status" >&5 + echo "$as_me:6718: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -6945,11 +6944,11 @@ else -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:6948: $lt_compile\"" >&5) + (eval echo "\"\$as_me:6947: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:6952: \$? = $ac_status" >&5 + echo "$as_me:6951: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -7005,11 +7004,11 @@ else -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:7008: $lt_compile\"" >&5) + (eval echo "\"\$as_me:7007: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:7012: \$? = $ac_status" >&5 + echo "$as_me:7011: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -8335,7 +8334,7 @@ linux*) libsuff= case "$host_cpu" in x86_64*|s390x*|powerpc64*) - echo '#line 8338 "configure"' > conftest.$ac_ext + echo '#line 8337 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -9173,7 +9172,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext <&5) + (eval echo "\"\$as_me:11452: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:11457: \$? = $ac_status" >&5 + echo "$as_me:11456: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -11510,11 +11509,11 @@ else -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:11513: $lt_compile\"" >&5) + (eval echo "\"\$as_me:11512: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:11517: \$? = $ac_status" >&5 + echo "$as_me:11516: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -12021,7 +12020,7 @@ linux*) libsuff= case "$host_cpu" in x86_64*|s390x*|powerpc64*) - echo '#line 12024 "configure"' > conftest.$ac_ext + echo '#line 12023 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -12859,7 +12858,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext <&5) + (eval echo "\"\$as_me:13786: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:13791: \$? = $ac_status" >&5 + echo "$as_me:13790: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -13844,11 +13843,11 @@ else -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:13847: $lt_compile\"" >&5) + (eval echo "\"\$as_me:13846: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:13851: \$? = $ac_status" >&5 + echo "$as_me:13850: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -15154,7 +15153,7 @@ linux*) libsuff= case "$host_cpu" in x86_64*|s390x*|powerpc64*) - echo '#line 15157 "configure"' > conftest.$ac_ext + echo '#line 15156 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -15898,11 +15897,11 @@ else -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:15901: $lt_compile\"" >&5) + (eval echo "\"\$as_me:15900: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:15905: \$? = $ac_status" >&5 + echo "$as_me:15904: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -16131,11 +16130,11 @@ else -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:16134: $lt_compile\"" >&5) + (eval echo "\"\$as_me:16133: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:16138: \$? = $ac_status" >&5 + echo "$as_me:16137: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings @@ -16191,11 +16190,11 @@ else -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:16194: $lt_compile\"" >&5) + (eval echo "\"\$as_me:16193: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:16198: \$? = $ac_status" >&5 + echo "$as_me:16197: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -17521,7 +17520,7 @@ linux*) libsuff= case "$host_cpu" in x86_64*|s390x*|powerpc64*) - echo '#line 17524 "configure"' > conftest.$ac_ext + echo '#line 17523 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -18359,7 +18358,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext <&5 -echo $ECHO_N "checking for res_send... $ECHO_C" >&6; } -if test "${ac_cv_func_res_send+set}" = set; then +if test "$com_err" != no; then + if test "$com_err" != yes; then + CPPFLAGS="$CPPFLAGS -I$com_err/include" + LDFLAGS="$LDFLAGS -L$com_err/lib" + fi + { echo "$as_me:$LINENO: checking for com_err in -lcom_err" >&5 +echo $ECHO_N "checking for com_err in -lcom_err... $ECHO_C" >&6; } +if test "${ac_cv_lib_com_err_com_err+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - cat >conftest.$ac_ext <<_ACEOF + ac_check_lib_save_LIBS=$LIBS +LIBS="-lcom_err $LIBS" +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Define res_send to an innocuous variant, in case declares res_send. - For example, HP-UX 11i declares gettimeofday. */ -#define res_send innocuous_res_send - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char res_send (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef res_send /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC @@ -25183,18 +25172,11 @@ cat >>conftest.$ac_ext <<_ACEOF #ifdef __cplusplus extern "C" #endif -char res_send (); -/* 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_res_send || defined __stub___res_send -choke me -#endif - +char com_err (); int main () { -return res_send (); +return com_err (); ; return 0; } @@ -25217,30 +25199,54 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then - ac_cv_func_res_send=yes + ac_cv_lib_com_err_com_err=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_func_res_send=no + ac_cv_lib_com_err_com_err=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_res_send" >&5 -echo "${ECHO_T}$ac_cv_func_res_send" >&6; } -if test $ac_cv_func_res_send = yes; then +{ echo "$as_me:$LINENO: result: $ac_cv_lib_com_err_com_err" >&5 +echo "${ECHO_T}$ac_cv_lib_com_err_com_err" >&6; } +if test $ac_cv_lib_com_err_com_err = yes; then : else + { { echo "$as_me:$LINENO: error: com_err library not found" >&5 +echo "$as_me: error: com_err library not found" >&2;} + { (exit 1); exit 1; }; } +fi -{ echo "$as_me:$LINENO: checking for res_send in -lresolv" >&5 -echo $ECHO_N "checking for res_send in -lresolv... $ECHO_C" >&6; } -if test "${ac_cv_lib_resolv_res_send+set}" = set; then +else + { { echo "$as_me:$LINENO: error: This package requires com_err." >&5 +echo "$as_me: error: This package requires com_err." >&2;} + { (exit 1); exit 1; }; } +fi + +# Check whether --with-ss was given. +if test "${with_ss+set}" = set; then + withval=$with_ss; ss="$withval" +else + ss=yes +fi + +if test "$ss" != no; then + if test "$ss" != yes; then + CPPFLAGS="$CPPFLAGS -I$ss/include" + LDFLAGS="$LDFLAGS -L$ss/lib" + fi + +{ echo "$as_me:$LINENO: checking for initscr in -lcurses" >&5 +echo $ECHO_N "checking for initscr in -lcurses... $ECHO_C" >&6; } +if test "${ac_cv_lib_curses_initscr+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS -LIBS="-lresolv $LIBS" +LIBS="-lcurses $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -25254,11 +25260,11 @@ cat >>conftest.$ac_ext <<_ACEOF #ifdef __cplusplus extern "C" #endif -char res_send (); +char initscr (); int main () { -return res_send (); +return initscr (); ; return 0; } @@ -25281,42 +25287,37 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then - ac_cv_lib_resolv_res_send=yes + ac_cv_lib_curses_initscr=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_resolv_res_send=no + ac_cv_lib_curses_initscr=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_res_send" >&5 -echo "${ECHO_T}$ac_cv_lib_resolv_res_send" >&6; } -if test $ac_cv_lib_resolv_res_send = yes; then +{ echo "$as_me:$LINENO: result: $ac_cv_lib_curses_initscr" >&5 +echo "${ECHO_T}$ac_cv_lib_curses_initscr" >&6; } +if test $ac_cv_lib_curses_initscr = yes; then cat >>confdefs.h <<_ACEOF -#define HAVE_LIBRESOLV 1 +#define HAVE_LIBCURSES 1 _ACEOF - LIBS="-lresolv $LIBS" + LIBS="-lcurses $LIBS" fi -fi -if test "$ares" != yes; then - CPPFLAGS="$CPPFLAGS -I$ares/include" - LDFLAGS="$LDFLAGS -L$ares/lib" -fi -{ echo "$as_me:$LINENO: checking for ares_init in -lares" >&5 -echo $ECHO_N "checking for ares_init in -lares... $ECHO_C" >&6; } -if test "${ac_cv_lib_ares_ares_init+set}" = set; then +{ echo "$as_me:$LINENO: checking for readline in -lreadline" >&5 +echo $ECHO_N "checking for readline in -lreadline... $ECHO_C" >&6; } +if test "${ac_cv_lib_readline_readline+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS -LIBS="-lares $LIBS" +LIBS="-lreadline $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -25330,11 +25331,11 @@ cat >>conftest.$ac_ext <<_ACEOF #ifdef __cplusplus extern "C" #endif -char ares_init (); +char readline (); int main () { -return ares_init (); +return readline (); ; return 0; } @@ -25357,55 +25358,36 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then - ac_cv_lib_ares_ares_init=yes + ac_cv_lib_readline_readline=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_ares_ares_init=no + ac_cv_lib_readline_readline=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_ares_ares_init" >&5 -echo "${ECHO_T}$ac_cv_lib_ares_ares_init" >&6; } -if test $ac_cv_lib_ares_ares_init = yes; then - : -else - { { echo "$as_me:$LINENO: error: libares not found" >&5 -echo "$as_me: error: libares not found" >&2;} - { (exit 1); exit 1; }; } -fi - - ARES_LIBS="-lares" - cat >>confdefs.h <<\_ACEOF -#define HAVE_ARES 1 +{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_readline" >&5 +echo "${ECHO_T}$ac_cv_lib_readline_readline" >&6; } +if test $ac_cv_lib_readline_readline = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBREADLINE 1 _ACEOF -fi - + LIBS="-lreadline $LIBS" -# Check whether --with-com_err was given. -if test "${with_com_err+set}" = set; then - withval=$with_com_err; com_err="$withval" -else - com_err=yes fi -if test "$com_err" != no; then - if test "$com_err" != yes; then - CPPFLAGS="$CPPFLAGS -I$com_err/include" - LDFLAGS="$LDFLAGS -L$com_err/lib" - fi - { echo "$as_me:$LINENO: checking for com_err in -lcom_err" >&5 -echo $ECHO_N "checking for com_err in -lcom_err... $ECHO_C" >&6; } -if test "${ac_cv_lib_com_err_com_err+set}" = set; then + { echo "$as_me:$LINENO: checking for ss_perror in -lss" >&5 +echo $ECHO_N "checking for ss_perror in -lss... $ECHO_C" >&6; } +if test "${ac_cv_lib_ss_ss_perror+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS -LIBS="-lcom_err $LIBS" +LIBS="-lss -lcom_err $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -25419,11 +25401,11 @@ cat >>conftest.$ac_ext <<_ACEOF #ifdef __cplusplus extern "C" #endif -char com_err (); +char ss_perror (); int main () { -return com_err (); +return ss_perror (); ; return 0; } @@ -25446,60 +25428,62 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then - ac_cv_lib_com_err_com_err=yes + ac_cv_lib_ss_ss_perror=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_com_err_com_err=no + ac_cv_lib_ss_ss_perror=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_com_err_com_err" >&5 -echo "${ECHO_T}$ac_cv_lib_com_err_com_err" >&6; } -if test $ac_cv_lib_com_err_com_err = yes; then +{ echo "$as_me:$LINENO: result: $ac_cv_lib_ss_ss_perror" >&5 +echo "${ECHO_T}$ac_cv_lib_ss_ss_perror" >&6; } +if test $ac_cv_lib_ss_ss_perror = yes; then : else - { { echo "$as_me:$LINENO: error: com_err library not found" >&5 -echo "$as_me: error: com_err library not found" >&2;} + { { echo "$as_me:$LINENO: error: ss library not found" >&5 +echo "$as_me: error: ss library not found" >&2;} { (exit 1); exit 1; }; } fi else - { { echo "$as_me:$LINENO: error: This package requires com_err." >&5 -echo "$as_me: error: This package requires com_err." >&2;} + { { echo "$as_me:$LINENO: error: This package requires ss." >&5 +echo "$as_me: error: This package requires ss." >&2;} { (exit 1); exit 1; }; } fi +LIBS="$KRB5_LIBS $KRB4_LIBS $HESIOD_LIBS $LIBS" -# Check whether --with-ss was given. -if test "${with_ss+set}" = set; then - withval=$with_ss; ss="$withval" -else - ss=yes -fi - -if test "$ss" != no; then - if test "$ss" != yes; then - CPPFLAGS="$CPPFLAGS -I$ss/include" - LDFLAGS="$LDFLAGS -L$ss/lib" - fi - -{ echo "$as_me:$LINENO: checking for initscr in -lcurses" >&5 -echo $ECHO_N "checking for initscr in -lcurses... $ECHO_C" >&6; } -if test "${ac_cv_lib_curses_initscr+set}" = set; then +{ echo "$as_me:$LINENO: checking for res_send" >&5 +echo $ECHO_N "checking for res_send... $ECHO_C" >&6; } +if test "${ac_cv_func_res_send+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lcurses $LIBS" -cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ +/* Define res_send to an innocuous variant, in case declares res_send. + For example, HP-UX 11i declares gettimeofday. */ +#define res_send innocuous_res_send + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char res_send (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef res_send /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC @@ -25507,11 +25491,18 @@ cat >>conftest.$ac_ext <<_ACEOF #ifdef __cplusplus extern "C" #endif -char initscr (); +char res_send (); +/* 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_res_send || defined __stub___res_send +choke me +#endif + int main () { -return initscr (); +return res_send (); ; return 0; } @@ -25534,37 +25525,30 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then - ac_cv_lib_curses_initscr=yes + ac_cv_func_res_send=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_curses_initscr=no + ac_cv_func_res_send=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_curses_initscr" >&5 -echo "${ECHO_T}$ac_cv_lib_curses_initscr" >&6; } -if test $ac_cv_lib_curses_initscr = yes; then - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBCURSES 1 -_ACEOF - - LIBS="-lcurses $LIBS" - -fi - +{ echo "$as_me:$LINENO: result: $ac_cv_func_res_send" >&5 +echo "${ECHO_T}$ac_cv_func_res_send" >&6; } +if test $ac_cv_func_res_send = yes; then + : +else -{ echo "$as_me:$LINENO: checking for readline in -lreadline" >&5 -echo $ECHO_N "checking for readline in -lreadline... $ECHO_C" >&6; } -if test "${ac_cv_lib_readline_readline+set}" = set; then +{ echo "$as_me:$LINENO: checking for res_send in -lresolv" >&5 +echo $ECHO_N "checking for res_send in -lresolv... $ECHO_C" >&6; } +if test "${ac_cv_lib_resolv_res_send+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS -LIBS="-lreadline $LIBS" +LIBS="-lresolv $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -25578,11 +25562,11 @@ cat >>conftest.$ac_ext <<_ACEOF #ifdef __cplusplus extern "C" #endif -char readline (); +char res_send (); int main () { -return readline (); +return res_send (); ; return 0; } @@ -25605,36 +25589,38 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then - ac_cv_lib_readline_readline=yes + ac_cv_lib_resolv_res_send=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_readline_readline=no + ac_cv_lib_resolv_res_send=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_readline" >&5 -echo "${ECHO_T}$ac_cv_lib_readline_readline" >&6; } -if test $ac_cv_lib_readline_readline = yes; then +{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_res_send" >&5 +echo "${ECHO_T}$ac_cv_lib_resolv_res_send" >&6; } +if test $ac_cv_lib_resolv_res_send = yes; then cat >>confdefs.h <<_ACEOF -#define HAVE_LIBREADLINE 1 +#define HAVE_LIBRESOLV 1 _ACEOF - LIBS="-lreadline $LIBS" + LIBS="-lresolv $LIBS" fi - { echo "$as_me:$LINENO: checking for ss_perror in -lss" >&5 -echo $ECHO_N "checking for ss_perror in -lss... $ECHO_C" >&6; } -if test "${ac_cv_lib_ss_ss_perror+set}" = set; then +fi + +{ echo "$as_me:$LINENO: checking for ares_init in -lcares" >&5 +echo $ECHO_N "checking for ares_init in -lcares... $ECHO_C" >&6; } +if test "${ac_cv_lib_cares_ares_init+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS -LIBS="-lss -lcom_err $LIBS" +LIBS="-lcares $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -25648,11 +25634,11 @@ cat >>conftest.$ac_ext <<_ACEOF #ifdef __cplusplus extern "C" #endif -char ss_perror (); +char ares_init (); int main () { -return ss_perror (); +return ares_init (); ; return 0; } @@ -25675,34 +25661,33 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then - ac_cv_lib_ss_ss_perror=yes + ac_cv_lib_cares_ares_init=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_cv_lib_ss_ss_perror=no + ac_cv_lib_cares_ares_init=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_ss_ss_perror" >&5 -echo "${ECHO_T}$ac_cv_lib_ss_ss_perror" >&6; } -if test $ac_cv_lib_ss_ss_perror = yes; then - : -else - { { echo "$as_me:$LINENO: error: ss library not found" >&5 -echo "$as_me: error: ss library not found" >&2;} - { (exit 1); exit 1; }; } -fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_cares_ares_init" >&5 +echo "${ECHO_T}$ac_cv_lib_cares_ares_init" >&6; } +if test $ac_cv_lib_cares_ares_init = yes; then + ARES_LIBS="-lcares" + cat >>confdefs.h <<\_ACEOF +#define HAVE_ARES 1 +_ACEOF else - { { echo "$as_me:$LINENO: error: This package requires ss." >&5 -echo "$as_me: error: This package requires ss." >&2;} + { { echo "$as_me:$LINENO: error: libcares not found" >&5 +echo "$as_me: error: libcares not found" >&2;} { (exit 1); exit 1; }; } fi -LIBS="$KRB5_LIBS $KRB4_LIBS $HESIOD_LIBS $LIBS" + + if test $ac_cv_c_compiler_gnu = yes; then { echo "$as_me:$LINENO: checking whether $CC needs -traditional" >&5 diff --git a/configure.in b/configure.in index 078aa09..55b652e 100644 --- a/configure.in +++ b/configure.in @@ -117,12 +117,18 @@ AC_SUBST(KRB5_LIBS) ATHENA_KRB5 ATHENA_HESIOD ATHENA_REGEXP -ATHENA_ARES ATHENA_UTIL_COM_ERR ATHENA_UTIL_SS LIBS="$KRB5_LIBS $KRB4_LIBS $HESIOD_LIBS $LIBS" dnl Checks for library functions. +AC_CHECK_FUNC(res_send, :, AC_CHECK_LIB(resolv, res_send)) +AC_CHECK_LIB(cares, ares_init, + [ARES_LIBS="-lcares" + AC_DEFINE(HAVE_ARES)], + [AC_MSG_ERROR(libcares not found)]) +AC_SUBST(ARES_LIBS) + AC_PROG_GCC_TRADITIONAL AC_FUNC_VPRINTF AC_FUNC_GETPGRP diff --git a/debian/control b/debian/control index 9cf4532..a6a709e 100644 --- a/debian/control +++ b/debian/control @@ -3,7 +3,7 @@ Section: net Priority: optional Maintainer: Karl Ramm Uploaders: Karl Ramm , Sam Hartman -Build-Depends: debhelper (>= 4), libares-dev, libkrb5-dev (>= 1.2.2-4), comerr-dev, ss-dev, +Build-Depends: debhelper (>= 4), libc-ares-dev, libkrb5-dev (>= 1.2.2-4), comerr-dev, ss-dev, libreadline5-dev, libx11-dev, libxt-dev, x-dev | x11proto-core-dev, libxaw7-dev | libxaw8-dev, libxmu-dev, libncurses5-dev, bison, libhesiod-dev Standards-Version: 3.7.2.2 diff --git a/zwgc/main.c b/zwgc/main.c index 3d0fda0..771d155 100644 --- a/zwgc/main.c +++ b/zwgc/main.c @@ -53,7 +53,7 @@ static void setup_signals(int); static void detach(void); static void signal_exit(int); #ifdef HAVE_ARES -static void notice_callback(void *, int, struct hostent *); +static void notice_callback(void *, int, int, struct hostent *); #endif #ifdef CMU_ZWGCPLUS void reprocess_notice(ZNotice_t *notice, char *hostname); @@ -250,7 +250,6 @@ main(int argc, register char **current; int dofork = 1; #ifdef HAVE_ARES - char *errmem; int status; #endif @@ -299,8 +298,7 @@ main(int argc, status = ares_init(&achannel); if (status != ARES_SUCCESS) { fprintf(stderr, "Couldn't initialize resolver: %s\n", - ares_strerror(status, &errmem)); - ares_free_errmem(errmem); + ares_strerror(status)); return(1); } #endif @@ -431,6 +429,7 @@ notice_handler(ZNotice_t *notice) static void notice_callback(void *arg, int status, + int timeouts, struct hostent *fromhost) { ZNotice_t *notice = (ZNotice_t *) arg; -- cgit v1.2.3