On Thu, Jul 14, 2005 at 03:35:29AM +0200, Christian Hammers wrote:
> Hallo Goswin and Robert
> 
> Attached you will find a set of possible patches for this problem.
> I tested them on my amd64 and mtr works well.
> 
> Please apply *only one* of them, depending on whether you like to
> patch configure.in and run autoreconf or apply the larger one to
> configure and be done.
> 
> Both patches work by completely removing the -lresolv vs -lbind test as
> this is a Debian paackge and "we know better" what we want to use :-)
> It would be nice though, if you could notify the upstream author of
> this problem.

Hi,

I'm "upstream author",  and this -lresolv thing has always been bothering
me. The problem is, If I "know what we want" or something like that, 
we'll fix it in a way that is bound to break lots of other systems. 

Now, I've got "debian" myself, and I'd think I'd test this myself. Or
someone slipped a patch past me that he said was good, and I forgot
to test it.

        Roger. 


> 
> bye,
> 
> -christian-
> 
> 

> --- mtr-0.69/configure.in     2005-01-11 09:46:56.000000000 +0100
> +++ mtr-0.69.patched/configure.in     2005-07-14 03:26:42.000000000 +0200
> @@ -85,9 +85,7 @@
>  AC_CHECK_FUNCS(seteuid)
>  #  AC_CHECK_FUNC(setuid, , AC_MSG_ERROR (I Need either seteuid or setuid))
>  
> -AC_CHECK_FUNC(res_mkquery, , 
> -  AC_CHECK_LIB(bind, res_mkquery, , 
> -   AC_CHECK_LIB(resolv, res_mkquery, , AC_MSG_ERROR(No resolver library 
> found))))
> +LIBS="$LIBS -lresolv"
>  
>  AC_CHECK_FUNC(herror, , AC_DEFINE(NO_HERROR))
>  AC_CHECK_FUNC(strerror, , AC_DEFINE(NO_STRERROR))

> --- mtr-0.69/configure        2005-07-14 03:30:40.000000000 +0200
> +++ mtr-0.69.patched2/configure       2005-07-14 03:29:40.000000000 +0200
> @@ -2692,148 +2692,7 @@
>  
>  #  AC_CHECK_FUNC(setuid, , AC_MSG_ERROR (I Need either seteuid or setuid))
>  
> -echo $ac_n "checking for res_mkquery""... $ac_c" 1>&6
> -echo "configure:2697: checking for res_mkquery" >&5
> -if eval "test \"`echo '$''{'ac_cv_func_res_mkquery'+set}'`\" = set"; then
> -  echo $ac_n "(cached) $ac_c" 1>&6
> -else
> -  cat > conftest.$ac_ext <<EOF
> -#line 2702 "configure"
> -#include "confdefs.h"
> -/* System header to define __stub macros and hopefully few prototypes,
> -    which can conflict with char res_mkquery(); below.  */
> -#include <assert.h>
> -/* Override any gcc2 internal prototype to avoid an error.  */
> -/* We use char because int might match the return type of a gcc2
> -    builtin and then its argument prototype would still apply.  */
> -char res_mkquery();
> -
> -int main() {
> -
> -/* The GNU C library defines this for functions which it implements
> -    to always fail with ENOSYS.  Some functions are actually named
> -    something starting with __ and the normal name is an alias.  */
> -#if defined (__stub_res_mkquery) || defined (__stub___res_mkquery)
> -choke me
> -#else
> -res_mkquery();
> -#endif
> -
> -; return 0; }
> -EOF
> -if { (eval echo configure:2725: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } 
> && test -s conftest${ac_exeext}; then
> -  rm -rf conftest*
> -  eval "ac_cv_func_res_mkquery=yes"
> -else
> -  echo "configure: failed program was:" >&5
> -  cat conftest.$ac_ext >&5
> -  rm -rf conftest*
> -  eval "ac_cv_func_res_mkquery=no"
> -fi
> -rm -f conftest*
> -fi
> -
> -if eval "test \"`echo '$ac_cv_func_'res_mkquery`\" = yes"; then
> -  echo "$ac_t""yes" 1>&6
> -  :
> -else
> -  echo "$ac_t""no" 1>&6
> -echo $ac_n "checking for res_mkquery in -lbind""... $ac_c" 1>&6
> -echo "configure:2743: checking for res_mkquery in -lbind" >&5
> -ac_lib_var=`echo bind'_'res_mkquery | sed 'y%./+-%__p_%'`
> -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
> -  echo $ac_n "(cached) $ac_c" 1>&6
> -else
> -  ac_save_LIBS="$LIBS"
> -LIBS="-lbind  $LIBS"
> -cat > conftest.$ac_ext <<EOF
> -#line 2751 "configure"
> -#include "confdefs.h"
> -/* Override any gcc2 internal prototype to avoid an error.  */
> -/* We use char because int might match the return type of a gcc2
> -    builtin and then its argument prototype would still apply.  */
> -char res_mkquery();
> -
> -int main() {
> -res_mkquery()
> -; return 0; }
> -EOF
> -if { (eval echo configure:2762: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } 
> && test -s conftest${ac_exeext}; then
> -  rm -rf conftest*
> -  eval "ac_cv_lib_$ac_lib_var=yes"
> -else
> -  echo "configure: failed program was:" >&5
> -  cat conftest.$ac_ext >&5
> -  rm -rf conftest*
> -  eval "ac_cv_lib_$ac_lib_var=no"
> -fi
> -rm -f conftest*
> -LIBS="$ac_save_LIBS"
> -
> -fi
> -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
> -  echo "$ac_t""yes" 1>&6
> -    ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/^a-zA-Z0-9_/_/g' \
> -    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
> -  cat >> confdefs.h <<EOF
> -#define $ac_tr_lib 1
> -EOF
> -
> -  LIBS="-lbind $LIBS"
> -
> -else
> -  echo "$ac_t""no" 1>&6
> -echo $ac_n "checking for res_mkquery in -lresolv""... $ac_c" 1>&6
> -echo "configure:2788: checking for res_mkquery in -lresolv" >&5
> -ac_lib_var=`echo resolv'_'res_mkquery | sed 'y%./+-%__p_%'`
> -if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
> -  echo $ac_n "(cached) $ac_c" 1>&6
> -else
> -  ac_save_LIBS="$LIBS"
> -LIBS="-lresolv  $LIBS"
> -cat > conftest.$ac_ext <<EOF
> -#line 2796 "configure"
> -#include "confdefs.h"
> -/* Override any gcc2 internal prototype to avoid an error.  */
> -/* We use char because int might match the return type of a gcc2
> -    builtin and then its argument prototype would still apply.  */
> -char res_mkquery();
> -
> -int main() {
> -res_mkquery()
> -; return 0; }
> -EOF
> -if { (eval echo configure:2807: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } 
> && test -s conftest${ac_exeext}; then
> -  rm -rf conftest*
> -  eval "ac_cv_lib_$ac_lib_var=yes"
> -else
> -  echo "configure: failed program was:" >&5
> -  cat conftest.$ac_ext >&5
> -  rm -rf conftest*
> -  eval "ac_cv_lib_$ac_lib_var=no"
> -fi
> -rm -f conftest*
> -LIBS="$ac_save_LIBS"
> -
> -fi
> -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
> -  echo "$ac_t""yes" 1>&6
> -    ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/^a-zA-Z0-9_/_/g' \
> -    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
> -  cat >> confdefs.h <<EOF
> -#define $ac_tr_lib 1
> -EOF
> -
> -  LIBS="-lresolv $LIBS"
> -
> -else
> -  echo "$ac_t""no" 1>&6
> -{ echo "configure: error: No resolver library found" 1>&2; exit 1; }
> -fi
> -
> -fi
> -
> -fi
> +LIBS="-lresolv $LIBS"
>  
>  
>  echo $ac_n "checking for herror""... $ac_c" 1>&6


-- 
** [EMAIL PROTECTED] ** http://www.BitWizard.nl/ ** +31-15-2600998 **
*-- BitWizard writes Linux device drivers for any device you may have! --*
Q: It doesn't work. A: Look buddy, doesn't work is an ambiguous statement. 
Does it sit on the couch all day? Is it unemployed? Please be specific! 
Define 'it' and what it isn't doing. --------- Adapted from lxrbot FAQ


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to