lynx-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

lynx-dev more on configure wrt bind/resolv and inet_addr


From: Henry Nelson
Subject: lynx-dev more on configure wrt bind/resolv and inet_addr
Date: Sat, 30 Jan 1999 16:11:25 +0900 (JST)

"for cf_inetlib in -lbind -lresolv ; do ; if ; else ; done" will only
work if lresolv succeeds (which is highly unlikely if lbind succeeds).
A patch to the configure script to fix this is appended (dev.15).

It compiles okay on Solaris2.6, gcc2.8.1, slang1.2.2, but probably
will have no time to test the binary for a week or two.  Tested only
with a working libbind.a and no libresolv.

BTW, Tom, the test for socket in -lsocket is going to fail if people
get confused and define $LIBS with either -lresolv or -lbind before
running configure.

__Henry

*** lynx2-8-2/configure.orig    Sat Jan 30 15:22:22 1999
--- lynx2-8-2/configure Sat Jan 30 15:37:54 1999
***************
*** 6067,6077 ****
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    
!           cf_save_LIBS="$LIBS"
!           for cf_inetlib in -lbind -lresolv
!           do
!               LIBS="$cf_save_LIBS $cf_inetlib"
!               cat > conftest.$ac_ext <<EOF
  #line 6076 "configure"
  #include "confdefs.h"
  
--- 6067,6075 ----
    echo $ac_n "(cached) $ac_c" 1>&6
  else
    
!     cf_save_LIBS="$LIBS"
! LIBS="-lbind $cf_save_LIBS"
! cat > conftest.$ac_ext <<EOF
  #line 6076 "configure"
  #include "confdefs.h"
  
***************
*** 6085,6099 ****
  EOF
  if { (eval echo configure:6087: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } 
&& test -s conftest${ac_exeext}; then
    rm -rf conftest*
!   cf_cv_lib_inet_addr=$cf_inetlib
  else
    echo "configure: failed program was:" >&5
    cat conftest.$ac_ext >&5
    rm -rf conftest*
    cf_cv_lib_inet_addr=no
  fi
  rm -f conftest*
-           done
        
  fi
  
--- 6083,6116 ----
  EOF
  if { (eval echo configure:6087: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } 
&& test -s conftest${ac_exeext}; then
    rm -rf conftest*
!   cf_cv_lib_inet_addr=-lbind
  else
+   
+ LIBS="-lresolv $cf_save_LIBS"
+ cat > conftest.$ac_ext <<EOF
+ #line 6076 "configure"
+ #include "confdefs.h"
+ 
+ #include <sys/socket.h>
+ #include <netinet/in.h>
+ #include <arpa/inet.h>
+               
+ int main() {
+ inet_addr(0)
+ ; return 0; }
+ EOF
+ if { (eval echo configure:6087: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } 
&& test -s conftest${ac_exeext}; then
+   rm -rf conftest*
+   cf_cv_lib_inet_addr=-lresolv
+ else
+   
    echo "configure: failed program was:" >&5
    cat conftest.$ac_ext >&5
    rm -rf conftest*
    cf_cv_lib_inet_addr=no
  fi
+ fi
  rm -f conftest*
        
  fi
  

reply via email to

[Prev in Thread] Current Thread [Next in Thread]