[Python-checkins] python/dist/src configure,1.393,1.394 configure.in,1.404,1.405 pyconfig.h.in,1.78,1.79

loewis@users.sourceforge.net loewis@users.sourceforge.net
Sat, 03 May 2003 05:10:50 -0700


Update of /cvsroot/python/python/dist/src
In directory sc8-pr-cvs1:/tmp/cvs-serv8842

Modified Files:
	configure configure.in pyconfig.h.in 
Log Message:
Try linking hstrerror and inet_aton tests. Look for these functions in -lresolv.


Index: configure
===================================================================
RCS file: /cvsroot/python/python/dist/src/configure,v
retrieving revision 1.393
retrieving revision 1.394
diff -C2 -d -r1.393 -r1.394
*** configure	3 May 2003 11:25:40 -0000	1.393
--- configure	3 May 2003 12:10:46 -0000	1.394
***************
*** 1,4 ****
  #! /bin/sh
! # From configure.in Revision: 1.403 .
  # Guess values for system-dependent variables and create Makefiles.
  # Generated by GNU Autoconf 2.53 for python 2.3.
--- 1,4 ----
  #! /bin/sh
! # From configure.in Revision: 1.404 .
  # Guess values for system-dependent variables and create Makefiles.
  # Generated by GNU Autoconf 2.53 for python 2.3.
***************
*** 12510,12513 ****
--- 12510,12640 ----
  rm -f conftest.$ac_objext conftest.$ac_ext
  
+ echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
+ echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6
+ if test "${ac_cv_lib_c_inet_aton+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+   ac_check_lib_save_LIBS=$LIBS
+ LIBS="-lc  $LIBS"
+ cat >conftest.$ac_ext <<_ACEOF
+ #line $LINENO "configure"
+ #include "confdefs.h"
+ 
+ /* Override any gcc2 internal prototype to avoid an error.  */
+ #ifdef __cplusplus
+ extern "C"
+ #endif
+ /* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+ char inet_aton ();
+ #ifdef F77_DUMMY_MAIN
+ #  ifdef __cplusplus
+      extern "C"
+ #  endif
+    int F77_DUMMY_MAIN() { return 1; }
+ #endif
+ int
+ main ()
+ {
+ inet_aton ();
+   ;
+   return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+   (eval $ac_link) 2>&5
+   ac_status=$?
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+   (exit $ac_status); } &&
+          { ac_try='test -s conftest$ac_exeext'
+   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+   (exit $ac_status); }; }; then
+   ac_cv_lib_c_inet_aton=yes
+ else
+   echo "$as_me: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ ac_cv_lib_c_inet_aton=no
+ fi
+ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+ LIBS=$ac_check_lib_save_LIBS
+ fi
+ echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
+ echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6
+ if test $ac_cv_lib_c_inet_aton = yes; then
+   /bin/true
+ else
+ 
+ echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
+ echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6
+ if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
+   echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+   ac_check_lib_save_LIBS=$LIBS
+ LIBS="-lresolv  $LIBS"
+ cat >conftest.$ac_ext <<_ACEOF
+ #line $LINENO "configure"
+ #include "confdefs.h"
+ 
+ /* Override any gcc2 internal prototype to avoid an error.  */
+ #ifdef __cplusplus
+ extern "C"
+ #endif
+ /* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+ char inet_aton ();
+ #ifdef F77_DUMMY_MAIN
+ #  ifdef __cplusplus
+      extern "C"
+ #  endif
+    int F77_DUMMY_MAIN() { return 1; }
+ #endif
+ int
+ main ()
+ {
+ inet_aton ();
+   ;
+   return 0;
+ }
+ _ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+   (eval $ac_link) 2>&5
+   ac_status=$?
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+   (exit $ac_status); } &&
+          { ac_try='test -s conftest$ac_exeext'
+   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+   (eval $ac_try) 2>&5
+   ac_status=$?
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+   (exit $ac_status); }; }; then
+   ac_cv_lib_resolv_inet_aton=yes
+ else
+   echo "$as_me: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ ac_cv_lib_resolv_inet_aton=no
+ fi
+ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+ LIBS=$ac_check_lib_save_LIBS
+ fi
+ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
+ echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6
+ if test $ac_cv_lib_resolv_inet_aton = yes; then
+   cat >>confdefs.h <<_ACEOF
+ #define HAVE_LIBRESOLV 1
+ _ACEOF
+ 
+   LIBS="-lresolv $LIBS"
+ 
+ fi
+ 
+ 
+ fi
+ 
+ 
  echo "$as_me:$LINENO: checking for hstrerror" >&5
  echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6
***************
*** 12528,12543 ****
  main ()
  {
! void* p = hstrerror
    ;
    return 0;
  }
  _ACEOF
! rm -f conftest.$ac_objext
! if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
!   (eval $ac_compile) 2>&5
    ac_status=$?
    echo "$as_me:$LINENO: \$? = $ac_status" >&5
    (exit $ac_status); } &&
!          { ac_try='test -s conftest.$ac_objext'
    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
    (eval $ac_try) 2>&5
--- 12655,12670 ----
  main ()
  {
! void* p = hstrerror; hstrerror(0)
    ;
    return 0;
  }
  _ACEOF
! rm -f conftest.$ac_objext conftest$ac_exeext
! if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
!   (eval $ac_link) 2>&5
    ac_status=$?
    echo "$as_me:$LINENO: \$? = $ac_status" >&5
    (exit $ac_status); } &&
!          { ac_try='test -s conftest$ac_exeext'
    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
    (eval $ac_try) 2>&5
***************
*** 12559,12563 ****
  
  fi
! rm -f conftest.$ac_objext conftest.$ac_ext
  
  echo "$as_me:$LINENO: checking for inet_aton" >&5
--- 12686,12690 ----
  
  fi
! rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
  
  echo "$as_me:$LINENO: checking for inet_aton" >&5
***************
*** 12581,12596 ****
  main ()
  {
! void* p = inet_aton
    ;
    return 0;
  }
  _ACEOF
! rm -f conftest.$ac_objext
! if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
!   (eval $ac_compile) 2>&5
    ac_status=$?
    echo "$as_me:$LINENO: \$? = $ac_status" >&5
    (exit $ac_status); } &&
!          { ac_try='test -s conftest.$ac_objext'
    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
    (eval $ac_try) 2>&5
--- 12708,12723 ----
  main ()
  {
! void* p = inet_aton;inet_aton(0,0)
    ;
    return 0;
  }
  _ACEOF
! rm -f conftest.$ac_objext conftest$ac_exeext
! if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
!   (eval $ac_link) 2>&5
    ac_status=$?
    echo "$as_me:$LINENO: \$? = $ac_status" >&5
    (exit $ac_status); } &&
!          { ac_try='test -s conftest$ac_exeext'
    { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
    (eval $ac_try) 2>&5
***************
*** 12612,12616 ****
  
  fi
! rm -f conftest.$ac_objext conftest.$ac_ext
  
  echo "$as_me:$LINENO: checking for inet_pton" >&5
--- 12739,12743 ----
  
  fi
! rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
  
  echo "$as_me:$LINENO: checking for inet_pton" >&5

Index: configure.in
===================================================================
RCS file: /cvsroot/python/python/dist/src/configure.in,v
retrieving revision 1.404
retrieving revision 1.405
diff -C2 -d -r1.404 -r1.405
*** configure.in	3 May 2003 11:25:43 -0000	1.404
--- configure.in	3 May 2003 12:10:48 -0000	1.405
***************
*** 1930,1938 ****
  )
  
  AC_MSG_CHECKING(for hstrerror)
! AC_TRY_COMPILE([
  #include "confdefs.h" 
  #include <netdb.h>
! ], void* p = hstrerror,
    AC_DEFINE(HAVE_HSTRERROR, 1, Define if you have the 'hstrerror' function.)
    AC_MSG_RESULT(yes),
--- 1930,1944 ----
  )
  
+ dnl On some systems (e.g. Solaris 9), hstrerror and inet_aton are in -lresolv
+ dnl On others, they are in the C library, so we to take no action
+ AC_CHECK_LIB(c, inet_aton, [/bin/true],
+   AC_CHECK_LIB(resolv, inet_aton)
+ )
+ 
  AC_MSG_CHECKING(for hstrerror)
! AC_TRY_LINK([
  #include "confdefs.h" 
  #include <netdb.h>
! ], void* p = hstrerror; hstrerror(0),
    AC_DEFINE(HAVE_HSTRERROR, 1, Define if you have the 'hstrerror' function.)
    AC_MSG_RESULT(yes),
***************
*** 1941,1950 ****
  
  AC_MSG_CHECKING(for inet_aton)
! AC_TRY_COMPILE([
  #include "confdefs.h" 
  #include <sys/socket.h>
  #include <netinet/in.h>
  #include <arpa/inet.h>
! ], void* p = inet_aton,
    AC_DEFINE(HAVE_INET_ATON, 1, Define if you have the 'inet_aton' function.)
    AC_MSG_RESULT(yes),
--- 1947,1956 ----
  
  AC_MSG_CHECKING(for inet_aton)
! AC_TRY_LINK([
  #include "confdefs.h" 
  #include <sys/socket.h>
  #include <netinet/in.h>
  #include <arpa/inet.h>
! ], void* p = inet_aton;inet_aton(0,0),
    AC_DEFINE(HAVE_INET_ATON, 1, Define if you have the 'inet_aton' function.)
    AC_MSG_RESULT(yes),

Index: pyconfig.h.in
===================================================================
RCS file: /cvsroot/python/python/dist/src/pyconfig.h.in,v
retrieving revision 1.78
retrieving revision 1.79
diff -C2 -d -r1.78 -r1.79
*** pyconfig.h.in	3 May 2003 10:32:18 -0000	1.78
--- pyconfig.h.in	3 May 2003 12:10:48 -0000	1.79
***************
*** 253,256 ****
--- 253,259 ----
  #undef HAVE_LIBINTL_H
  
+ /* Define to 1 if you have the `resolv' library (-lresolv). */
+ #undef HAVE_LIBRESOLV
+ 
  /* Define to 1 if you have the <libutil.h> header file. */
  #undef HAVE_LIBUTIL_H