[Python-checkins] CVS: python/dist/src configure,1.105,1.106 configure.in,1.113,1.114

Guido van Rossum guido@cnri.reston.va.us
Mon, 20 Dec 1999 16:27:25 -0500 (EST)


Update of /projects/cvsroot/python/dist/src
In directory eric:/projects/python/develop/guido/src

Modified Files:
	configure configure.in 
Log Message:
Changes to auto-detect the correct dynload_<platform>.c file.
NOTE: Windows, Mac and OS/2 build procedures must be adapted manually!

This is part of a set of patches by Greg Stein.


Index: configure
===================================================================
RCS file: /projects/cvsroot/python/dist/src/configure,v
retrieving revision 1.105
retrieving revision 1.106
diff -C2 -r1.105 -r1.106
*** configure	1999/12/16 17:50:52	1.105
--- configure	1999/12/20 21:27:22	1.106
***************
*** 1,5 ****
  #! /bin/sh
  
! # From configure.in Revision: 1.113 
  
  # Guess values for system-dependent variables and create Makefiles.
--- 1,5 ----
  #! /bin/sh
  
! # From configure.in Revision: 1.114 
  
[...1309 lines suppressed...]
*** 4703,4707 ****
  }
  EOF
! if { (eval echo configure:4706: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  then
    ac_cv_malloc_zero=nonnull
--- 4787,4791 ----
  }
  EOF
! if { (eval echo configure:4790: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  then
    ac_cv_malloc_zero=nonnull
***************
*** 4889,4892 ****
--- 4973,4977 ----
  s%@LDLAST@%$LDLAST%g
  s%@DLINCLDIR@%$DLINCLDIR%g
+ s%@DYNLOADFILE@%$DYNLOADFILE%g
  s%@LIBOBJS@%$LIBOBJS%g
  s%@HAVE_GETHOSTBYNAME_R_6_ARG@%$HAVE_GETHOSTBYNAME_R_6_ARG%g

Index: configure.in
===================================================================
RCS file: /projects/cvsroot/python/dist/src/configure.in,v
retrieving revision 1.113
retrieving revision 1.114
diff -C2 -r1.113 -r1.114
*** configure.in	1999/12/16 17:50:52	1.113
--- configure.in	1999/12/20 21:27:22	1.114
***************
*** 1,4 ****
  dnl Process this file with autoconf 2.0 or later to make a configure script.
! AC_REVISION($Revision: 1.113 $)
  AC_PREREQ(2.0)
  AC_INIT(Include/object.h)
--- 1,4 ----
  dnl Process this file with autoconf 2.0 or later to make a configure script.
! AC_REVISION($Revision: 1.114 $)
  AC_PREREQ(2.0)
  AC_INIT(Include/object.h)
***************
*** 692,695 ****
--- 692,696 ----
  AC_MSG_RESULT($withval)
  AC_DEFINE(WITH_SGI_DL)
+ DYNLOADFILE="dynload_dl.o"
  dldir=$withval
  if test -d "$dldir"
***************
*** 704,707 ****
--- 705,709 ----
  AC_MSG_RESULT($withval)
  AC_DEFINE(WITH_DL_DLD)
+ DYNLOADFILE="dynload_dl.o"
  dldir=`echo "$withval" | sed 's/,.*//'`
  dlddir=`echo "$withval" | sed 's/.*,//'`
***************
*** 712,715 ****
--- 714,748 ----
  DLINCLDIR=${dldir}
  LIBS="$LIBS -ldl -ldld"], AC_MSG_RESULT(no))
+ 
+ # the dlopen() function means we might want to use dynload_shlib.o. some
+ # platforms, such as AIX, have dlopen(), but don't want to use it.
+ AC_CHECK_FUNC(dlopen)
+ 
+ # DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
+ # loading of modules.
+ AC_SUBST(DYNLOADFILE)
+ AC_MSG_CHECKING(DYNLOADFILE)
+ if test -z "$DYNLOADFILE"
+ then
+ 	case $ac_sys_system/$ac_sys_release in
+ 	AIX*) DYNLOADFILE="dynload_aix.o";;
+ 	BeOS*) DYNLOADFILE="dynload_beos.o";;
+ 	hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
+ 	next/*) DYNLOADFILE="dynload_next.o";;
+ 	*)
+ 	# use dynload_shlib.c and dlopen() if we have it; otherwise stub
+ 	# out any dynamic loading
+ 	if test "$ac_cv_func_dlopen" = yes
+ 	then DYNLOADFILE="dynload_shlib.o"
+ 	else DYNLOADFILE="dynload_stub.o"
+ 	fi
+ 	;;
+ 	esac
+ fi
+ AC_MSG_RESULT($DYNLOADFILE)
+ if test "$DYNLOADFILE" != "dynload_stub.o"
+ then
+ 	AC_DEFINE(HAVE_DYNAMIC_LOADING)
+ fi
  
  # checks for library functions