dnl Process this file with autoconf 2.0 or later to make a configure script.

# Set VERSION so we only need to edit in one place (i.e., here)
m4_define(PYTHON_VERSION, 2.5)

AC_REVISION($Revision$)
AC_PREREQ(2.59)
AC_INIT(python, PYTHON_VERSION, http://www.python.org/python-bugs)
AC_CONFIG_SRCDIR([Include/object.h])
AC_CONFIG_HEADER(pyconfig.h)

dnl This is for stuff that absolutely must end up in pyconfig.h.
dnl Please use pyport.h instead, if possible.
AH_TOP([
#ifndef Py_PYCONFIG_H
#define Py_PYCONFIG_H
])
AH_BOTTOM([
/* Define the macros needed if on a UnixWare 7.x system. */
#if defined(__USLC__) && defined(__SCO_VERSION__)
#define STRICT_SYSV_CURSES /* Don't use ncurses extensions */
#endif

#endif /*Py_PYCONFIG_H*/
])

# We don't use PACKAGE_ variables, and they cause conflicts
# with other autoconf-based packages that include Python.h
grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
rm confdefs.h
mv confdefs.h.new confdefs.h

AC_SUBST(VERSION)
VERSION=PYTHON_VERSION

AC_SUBST(SOVERSION)
SOVERSION=1.0

# The later defininition of _XOPEN_SOURCE disables certain features
# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
AC_DEFINE(_GNU_SOURCE, 1, [Define on Linux to activate all library features])

# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
# them.
AC_DEFINE(_NETBSD_SOURCE, 1, [Define on NetBSD to activate all library features])

# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
# them.
AC_DEFINE(__BSD_VISIBLE, 1, [Define on FreeBSD to activate all library features])

# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
AC_DEFINE(_BSD_TYPES, 1, [Define on Irix to enable u_int])

define_xopen_source=yes

# Arguments passed to configure.
AC_SUBST(CONFIG_ARGS)
CONFIG_ARGS="$ac_configure_args"

dnl quadrigraphs "@<:@" and "@:>@" produce "[" and "]" in the output
AC_ARG_ENABLE(framework,
              AC_HELP_STRING(--enable-framework@<:@=INSTALLDIR@:>@, Build (MacOSX|Darwin) framework),
[
	case $enableval in
	yes) 
		enableval=/Library/Frameworks
	esac
	case $enableval in
	no)
		PYTHONFRAMEWORK=
		PYTHONFRAMEWORKDIR=no-framework
		PYTHONFRAMEWORKPREFIX=
		PYTHONFRAMEWORKINSTALLDIR=
		enable_framework=
		;;
	*)
		PYTHONFRAMEWORK=Python
		PYTHONFRAMEWORKDIR=Python.framework
		PYTHONFRAMEWORKPREFIX=$enableval
		PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
		prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
	esac
	],[
	PYTHONFRAMEWORK=
	PYTHONFRAMEWORKDIR=no-framework
	PYTHONFRAMEWORKPREFIX=
	PYTHONFRAMEWORKINSTALLDIR=
	enable_framework=
])
AC_SUBST(PYTHONFRAMEWORK)
AC_SUBST(PYTHONFRAMEWORKDIR)
AC_SUBST(PYTHONFRAMEWORKPREFIX)
AC_SUBST(PYTHONFRAMEWORKINSTALLDIR)

##AC_ARG_WITH(dyld,
##            AC_HELP_STRING(--with-dyld,
##                           Use (OpenStep|Rhapsody) dynamic linker))
##
# Set name for machine-dependent library files
AC_SUBST(MACHDEP)
AC_MSG_CHECKING(MACHDEP)
if test -z "$MACHDEP"
then
	ac_sys_system=`uname -s`
	if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64" \
	-o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
		ac_sys_release=`uname -v`
	else
		ac_sys_release=`uname -r`
	fi
	ac_md_system=`echo $ac_sys_system |
			   tr -d '[/ ]' | tr '[[A-Z]]' '[[a-z]]'`
	ac_md_release=`echo $ac_sys_release |
			   tr -d '[/ ]' | sed 's/^[[A-Z]]\.//' | sed 's/\..*//'`
	MACHDEP="$ac_md_system$ac_md_release"

	case $MACHDEP in
	cygwin*) MACHDEP="cygwin";;
	darwin*) MACHDEP="darwin";;
	atheos*) MACHDEP="atheos";;
        irix646) MACHDEP="irix6";;
	'')	MACHDEP="unknown";;
	esac
fi
	
# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
# disable features if it is defined, without any means to access these
# features as extensions. For these systems, we skip the definition of
# _XOPEN_SOURCE. Before adding a system to the list to gain access to
# some feature, make sure there is no alternative way to access this
# feature. Also, when using wildcards, make sure you have verified the
# need for not defining _XOPEN_SOURCE on all systems matching the
# wildcard, and that the wildcard does not include future systems
# (which may remove their limitations).
dnl quadrigraphs "@<:@" and "@:>@" produce "[" and "]" in the output
case $ac_sys_system/$ac_sys_release in
  # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
  # even though select is a POSIX function. Reported by J. Ribbens.
  # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
  OpenBSD/2.* | OpenBSD/3.@<:@012345678@:>@) 
    define_xopen_source=no;;
  # On Solaris 2.6, sys/wait.h is inconsistent in the usage
  # of union __?sigval. Reported by Stuart Bishop.
  SunOS/5.6)
    define_xopen_source=no;;
  # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
  # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
  # Reconfirmed for 7.1.4 by Martin v. Loewis.
  OpenUNIX/8.0.0| UnixWare/7.1.@<:@0-4@:>@)
    define_xopen_source=no;;
  # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
  # but used in struct sockaddr.sa_family. Reported by Tim Rice.
  SCO_SV/3.2)
    define_xopen_source=no;;
  # On FreeBSD 4.8 and MacOS X 10.2, a bug in ncurses.h means that
  # it craps out if _XOPEN_EXTENDED_SOURCE is defined. Apparently,
  # this is fixed in 10.3, which identifies itself as Darwin/7.*
  # This should hopefully be fixed in FreeBSD 4.9
  FreeBSD/4.8* | Darwin/6* )
    define_xopen_source=no;;
  # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
  # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
  # or has another value. By not (re)defining it, the defaults come in place.
  AIX/4)
    define_xopen_source=no;;
  AIX/5)
    if test `uname -r` -eq 1; then
      define_xopen_source=no
    fi
    ;;
  # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
  # disables platform specific features beyond repair.
  # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE 
  # has no effect, don't bother defineing them
  Darwin/@<:@78@:>@.*)
    define_xopen_source=no
    ;;

esac

if test $define_xopen_source = yes
then
  # On Solaris w/ g++ it appears that _XOPEN_SOURCE has to be
  # defined precisely as g++ defines it
  # Furthermore, on Solaris 10, XPG6 requires the use of a C99
  # compiler
  case $ac_sys_system/$ac_sys_release in
    SunOS/5.8|SunOS/5.9|SunOS/5.10)
      AC_DEFINE(_XOPEN_SOURCE, 500, 
                Define to the level of X/Open that your system supports)
      ;;
    *)
      AC_DEFINE(_XOPEN_SOURCE, 600, 
                Define to the level of X/Open that your system supports)
      ;;
  esac

  # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
  # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
  # several APIs are not declared. Since this is also needed in some
  # cases for HP-UX, we define it globally.
  # except for Solaris 10, where it must not be defined, 
  # as it implies XPG4.2
  case $ac_sys_system/$ac_sys_release in
    SunOS/5.10)
      ;;
    *)
      AC_DEFINE(_XOPEN_SOURCE_EXTENDED, 1,
      		Define to activate Unix95-and-earlier features)
      ;;
  esac

  AC_DEFINE(_POSIX_C_SOURCE, 200112L, Define to activate features from IEEE Stds 1003.1-2001)
  
fi

#
# SGI compilers allow the specification of the both the ABI and the
# ISA on the command line.  Depending on the values of these switches,
# different and often incompatable code will be generated.
#
# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
# thus supply support for various ABI/ISA combinations.  The MACHDEP
# variable is also adjusted.
#
AC_SUBST(SGI_ABI)
if test ! -z "$SGI_ABI"
then
        CC="cc $SGI_ABI"
        LDFLAGS="$SGI_ABI $LDFLAGS"
        MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
fi
AC_MSG_RESULT($MACHDEP)

# And add extra plat-mac for darwin
AC_SUBST(EXTRAPLATDIR)
AC_SUBST(EXTRAMACHDEPPATH)
AC_MSG_CHECKING(EXTRAPLATDIR)
if test -z "$EXTRAPLATDIR"
then
	case $MACHDEP in
	darwin)	
		EXTRAPLATDIR="\$(PLATMACDIRS)"
		EXTRAMACHDEPPATH="\$(PLATMACPATH)"
		;;
	*) 
		EXTRAPLATDIR=""
		EXTRAMACHDEPPATH=""
		;;
	esac
fi
AC_MSG_RESULT($EXTRAPLATDIR)

# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
# it may influence the way we can build extensions, so distutils
# needs to check it
AC_SUBST(CONFIGURE_MACOSX_DEPLOYMENT_TARGET)
CONFIGURE_MACOSX_DEPLOYMENT_TARGET=

# checks for alternative programs

# compiler flags are generated in two sets, BASECFLAGS and OPT.  OPT is just
# for debug/optimization stuff.  BASECFLAGS is for flags that are required
# just to get things to compile and link.  Users are free to override OPT
# when running configure or make.  The build should not break if they do.
# BASECFLAGS should generally not be messed with, however.

# XXX shouldn't some/most/all of this code be merged with the stuff later
# on that fiddles with OPT and BASECFLAGS?
AC_MSG_CHECKING(for --without-gcc)
AC_ARG_WITH(gcc,
            AC_HELP_STRING(--without-gcc,never use gcc),
[
	case $withval in
	no)	CC=cc
		without_gcc=yes;;
	yes)	CC=gcc
		without_gcc=no;;
	*)	CC=$withval
		without_gcc=$withval;;
	esac], [
	case $ac_sys_system in
	AIX*)   CC=cc_r
		without_gcc=;;
	BeOS*)
		case $BE_HOST_CPU in
		ppc)
			CC=mwcc
			without_gcc=yes
			BASECFLAGS="$BASECFLAGS -export pragma"
			OPT="$OPT -O"
			LDFLAGS="$LDFLAGS -nodup"
			;;
		x86)
			CC=gcc
			without_gcc=no
			OPT="$OPT -O"
			;;
		*)
			AC_MSG_ERROR([Unknown BeOS platform "$BE_HOST_CPU"])
			;;
		esac
		AR="\$(srcdir)/Modules/ar_beos"
		RANLIB=:
		;;
    Monterey*)
        RANLIB=:
        without_gcc=;;
	*)	without_gcc=no;;
	esac])
AC_MSG_RESULT($without_gcc)

AC_SUBST(CXX)
AC_SUBST(MAINOBJ)
MAINOBJ=python.o
AC_MSG_CHECKING(for --with-cxx=<compiler>)
AC_ARG_WITH(cxx,
            AC_HELP_STRING(--with-cxx=<compiler>, enable C++ support),
[
	check_cxx=no
	case $withval in
	no)	CXX=
		with_cxx=no;;
	*)	CXX=$withval
		MAINOBJ=ccpython.o
		with_cxx=$withval;;
	esac], [
	with_cxx=no
	check_cxx=yes
])
AC_MSG_RESULT($with_cxx)

if test "$with_cxx" = "yes"
then
	AC_MSG_ERROR([must supply a compiler when using --with-cxx])
fi

dnl The following fragment works similar to AC_PROG_CXX.
dnl It does not fail if CXX is not found, and it is not executed if 
dnl --without-cxx was given.
dnl Finally, it does not test whether CXX is g++.

dnl Autoconf 2.5x does not have AC_PROG_CXX_WORKS anymore
ifdef([AC_PROG_CXX_WORKS],[],
      [AC_DEFUN([AC_PROG_CXX_WORKS],
      [AC_LANG_PUSH(C++)dnl
       _AC_COMPILER_EXEEXT
       AC_LANG_POP()
      ]
)])

if test "$check_cxx" = "yes" 
then
	AC_CHECK_PROGS(CXX, $CCC c++ g++ gcc CC cxx cc++ cl, notfound)
	if test "$CXX" = "notfound"
	then
		CXX=
	else
		AC_PROG_CXX_WORKS
	fi
fi

# If the user switches compilers, we can't believe the cache
if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
then
  AC_MSG_ERROR([cached CC is different -- throw away $cache_file
(it is also a good idea to do 'make clean' before compiling)])
fi

AC_PROG_CC

# checks for UNIX variants that set C preprocessor variables
AC_AIX

# Check for unsupported systems
case $ac_sys_system/$ac_sys_release in
Linux*/1*)
   echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
   echo See README for details.
   exit 1;;
esac

AC_EXEEXT
AC_MSG_CHECKING(for --with-suffix)
AC_ARG_WITH(suffix,
            AC_HELP_STRING(--with-suffix=.exe, set executable suffix),
[
	case $withval in
	no)	EXEEXT=;;
	yes)	EXEEXT=.exe;;
	*)	EXEEXT=$withval;;
	esac])
AC_MSG_RESULT($EXEEXT)

# Test whether we're running on a non-case-sensitive system, in which
# case we give a warning if no ext is given
AC_SUBST(BUILDEXEEXT)
AC_MSG_CHECKING(for case-insensitive build directory)
if test ! -d CaseSensitiveTestDir; then
mkdir CaseSensitiveTestDir
fi

if test -d casesensitivetestdir
then
    AC_MSG_RESULT(yes)
    BUILDEXEEXT=.exe
else
	AC_MSG_RESULT(no)
	BUILDEXEEXT=$EXEEXT
fi
rmdir CaseSensitiveTestDir

case $MACHDEP in
bsdos*)
    case $CC in
    gcc) CC="$CC -D_HAVE_BSDI";;
    esac;;
esac

case $ac_sys_system in
hp*|HP*)
    case $CC in
    cc|*/cc) CC="$CC -Ae";;
    esac;;
Monterey*)
    case $CC in
    cc) CC="$CC -Wl,-Bexport";;
    esac;;
SunOS*)
    # Some functions have a prototype only with that define, e.g. confstr
    AC_DEFINE(__EXTENSIONS__, 1, [Defined on Solaris to see additional function prototypes.])
    ;;
esac


AC_SUBST(LIBRARY)
AC_MSG_CHECKING(LIBRARY)
if test -z "$LIBRARY"
then
	LIBRARY='libpython$(VERSION).a'
fi
AC_MSG_RESULT($LIBRARY)

# LDLIBRARY is the name of the library to link against (as opposed to the
# name of the library into which to insert object files). BLDLIBRARY is also
# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
# is blank as the main program is not linked directly against LDLIBRARY.
# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
# systems without shared libraries, LDLIBRARY is the same as LIBRARY
# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
# DLLLIBRARY is the shared (i.e., DLL) library.
# 
# RUNSHARED is used to run shared python without installed libraries
#
# INSTSONAME is the name of the shared library that will be use to install
# on the system - some systems like version suffix, others don't
AC_SUBST(LDLIBRARY)
AC_SUBST(DLLLIBRARY)
AC_SUBST(BLDLIBRARY)
AC_SUBST(LDLIBRARYDIR)
AC_SUBST(INSTSONAME)
AC_SUBST(RUNSHARED)
LDLIBRARY="$LIBRARY"
BLDLIBRARY='$(LDLIBRARY)'
INSTSONAME='$(LDLIBRARY)'
DLLLIBRARY=''
LDLIBRARYDIR=''
RUNSHARED=''

# LINKCC is the command that links the python executable -- default is $(CC).
# If CXX is set, and if it is needed to link a main function that was
# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
# python might then depend on the C++ runtime
# This is altered for AIX in order to build the export list before 
# linking.
AC_SUBST(LINKCC)
AC_MSG_CHECKING(LINKCC)
if test -z "$LINKCC"
then
        if test -z "$CXX"; then
              LINKCC="\$(PURIFY) \$(CC)"
        else
              echo 'extern "C" void foo();int main(){foo();}' > conftest_a.cc
              $CXX -c conftest_a.cc # 2>&5
              echo 'void foo(){}' > conftest_b.$ac_ext
              $CC -c conftest_b.$ac_ext # 2>&5
              if $CC -o conftest$ac_exeext conftest_a.$ac_objext conftest_b.$ac_objext 2>&5 \
                 && test -s conftest$ac_exeext && ./conftest$ac_exeext
              then
                 LINKCC="\$(PURIFY) \$(CC)"
              else
                 LINKCC="\$(PURIFY) \$(CXX)"
              fi
              rm -fr conftest*
        fi
	case $ac_sys_system in
	AIX*)
	   exp_extra="\"\""
	   if test $ac_sys_release -ge 5 -o \
		   $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
	       exp_extra="."
	   fi
	   LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
	Monterey64*)
	   LINKCC="$LINKCC -L/usr/lib/ia64l64";;
	esac
fi
AC_MSG_RESULT($LINKCC)

AC_MSG_CHECKING(for --enable-shared)
AC_ARG_ENABLE(shared,
              AC_HELP_STRING(--enable-shared, disable/enable building shared python library))

if test -z "$enable_shared"
then 
  case $ac_sys_system in
  CYGWIN* | atheos*)
    enable_shared="yes";;
  *)
    enable_shared="no";;
  esac
fi
AC_MSG_RESULT($enable_shared)

AC_MSG_CHECKING(for --enable-profiling)
AC_ARG_ENABLE(profiling,
              AC_HELP_STRING(--enable-profiling, enable C-level code profiling),
[ac_save_cc="$CC"
 CC="$CC -pg"
 AC_TRY_RUN([int main() { return 0; }],
   ac_enable_profiling="yes",
   ac_enable_profiling="no",
   ac_enable_profiling="no")
 CC="$ac_save_cc"])
AC_MSG_RESULT($ac_enable_profiling)

case "$ac_enable_profiling" in
    "yes")
	BASECFLAGS="-pg $BASECFLAGS"
	LDFLAGS="-pg $LDFLAGS"
    ;;
esac

AC_MSG_CHECKING(LDLIBRARY)

# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
# library that we build, but we do not want to link against it (we
# will find it with a -framework option). For this reason there is an
# extra variable BLDLIBRARY against which Python and the extension
# modules are linked, BLDLIBRARY. This is normally the same as
# LDLIBRARY, but empty for MacOSX framework builds.
if test "$enable_framework"
then
  LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
  RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
  BLDLIBRARY=''
else
  BLDLIBRARY='$(LDLIBRARY)'
fi  

# Other platforms follow
if test $enable_shared = "yes"; then
  AC_DEFINE(Py_ENABLE_SHARED, 1, [Defined if Python is built as a shared library.])
  case $ac_sys_system in
    BeOS*)
          LDLIBRARY='libpython$(VERSION).so'
          ;;
    CYGWIN*)
          LDLIBRARY='libpython$(VERSION).dll.a'
          DLLLIBRARY='libpython$(VERSION).dll'
          ;;
    SunOS*)
	  LDLIBRARY='libpython$(VERSION).so'
	  BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
	  RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
	  INSTSONAME="$LDLIBRARY".$SOVERSION
          ;;
    Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
	  LDLIBRARY='libpython$(VERSION).so'
	  BLDLIBRARY='-L. -lpython$(VERSION)'
	  RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
	  case $ac_sys_system in
	      FreeBSD*)
		SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
		;;
	  esac
	  INSTSONAME="$LDLIBRARY".$SOVERSION
	  ;;
    hp*|HP*)
	  LDLIBRARY='libpython$(VERSION).sl'
	  BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
	  RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
	  ;;
    OSF*)
	  LDLIBRARY='libpython$(VERSION).so'
	  BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
	  RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
	  ;;
    atheos*)
	  LDLIBRARY='libpython$(VERSION).so'
	  BLDLIBRARY='-L. -lpython$(VERSION)'
	  RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
	  ;;
  esac
else # shared is disabled
  case $ac_sys_system in
    CYGWIN*)
          BLDLIBRARY='$(LIBRARY)'
          LDLIBRARY='libpython$(VERSION).dll.a'
          ;;
  esac
fi

AC_MSG_RESULT($LDLIBRARY)

AC_PROG_RANLIB
AC_SUBST(AR)
AC_CHECK_PROGS(AR, ar aal, ar)

AC_SUBST(SVNVERSION)
AC_CHECK_PROG(SVNVERSION, svnversion, found, not-found)
if test $SVNVERSION = found
then
	SVNVERSION="svnversion \$(srcdir)"
else
	SVNVERSION="echo exported"
fi

case $MACHDEP in
bsdos*|hp*|HP*)
	# install -d does not work on BSDI or HP-UX
	if test -z "$INSTALL"
	then
		INSTALL="${srcdir}/install-sh -c"
	fi
esac
AC_PROG_INSTALL

# Not every filesystem supports hard links
AC_SUBST(LN)
if test -z "$LN" ; then
	case $ac_sys_system in
		BeOS*) LN="ln -s";;
		CYGWIN*) LN="ln -s";;
		atheos*) LN="ln -s";;
		*) LN=ln;;
	esac
fi

# Check for --with-pydebug
AC_MSG_CHECKING(for --with-pydebug)
AC_ARG_WITH(pydebug, 
            AC_HELP_STRING(--with-pydebug, build with Py_DEBUG defined),
[
if test "$withval" != no
then 
  AC_DEFINE(Py_DEBUG, 1, 
  [Define if you want to build an interpreter with many run-time checks.]) 
  AC_MSG_RESULT(yes); 
  Py_DEBUG='true'
else AC_MSG_RESULT(no); Py_DEBUG='false'
fi],
[AC_MSG_RESULT(no)])

# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
# merged with this chunk of code?

# Optimizer/debugger flags
# ------------------------
# (The following bit of code is complicated enough - please keep things
# indented properly.  Just pretend you're editing Python code. ;-)

# There are two parallel sets of case statements below, one that checks to
# see if OPT was set and one that does BASECFLAGS setting based upon
# compiler and platform.  BASECFLAGS tweaks need to be made even if the
# user set OPT.

# tweak OPT based on compiler and platform, only if the user didn't set
# it on the command line
AC_SUBST(OPT)
if test -z "$OPT"
then
    case $GCC in
    yes)
	case $ac_cv_prog_cc_g in
	yes)
	    if test "$Py_DEBUG" = 'true' ; then
		# Optimization messes up debuggers, so turn it off for
		# debug builds.
		OPT="-g -Wall -Wstrict-prototypes"
	    else
		OPT="-g -O3 -Wall -Wstrict-prototypes"
	    fi
	    ;;
	*)
	    OPT="-O3 -Wall -Wstrict-prototypes"
	    ;;
	esac
	case $ac_sys_system in
	    SCO_SV*) OPT="$OPT -m486 -DSCO5"
	    ;;
        esac
	;;

    *)
	OPT="-O"
	;;
    esac

    # The current (beta) Monterey compiler dies with optimizations
    # XXX what is Monterey? Does it still die w/ -O? Can we get rid of this?
    case $ac_sys_system in
	Monterey*)
	    OPT=""
	    ;;
    esac

fi

AC_SUBST(BASECFLAGS)
# tweak BASECFLAGS based on compiler and platform
case $GCC in
yes)
    # Python violates C99 rules, by casting between incompatible
    # pointer types. GCC may generate bad code as a result of that,
    # so use -fno-strict-aliasing if supported.
    AC_MSG_CHECKING(whether $CC accepts -fno-strict-aliasing)
     ac_save_cc="$CC"
     CC="$CC -fno-strict-aliasing"
     AC_TRY_RUN([int main() { return 0; }],
     ac_cv_no_strict_aliasing_ok=yes,
     ac_cv_no_strict_aliasing_ok=no,
     ac_cv_no_strict_aliasing_ok=no)
     CC="$ac_save_cc"
    AC_MSG_RESULT($ac_cv_no_strict_aliasing_ok)
    if test $ac_cv_no_strict_aliasing_ok = yes
    then
      BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
    fi
    case $ac_sys_system in
	SCO_SV*)
	    BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
	    ;;
	# is there any other compiler on Darwin besides gcc?
	Darwin*)
	    BASECFLAGS="$BASECFLAGS -Wno-long-double -no-cpp-precomp -mno-fused-madd"
	    ;;
	OSF*)
	    BASECFLAGS="$BASECFLAGS -mieee"
	    ;;
    esac
    ;;

*)
    case $ac_sys_system in
    OpenUNIX*|UnixWare*)
	BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
	;;
    OSF*)
	BASECFLAGS="$BASECFLAGS -ieee -std"
    	;;
    SCO_SV*)
	BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
	;;
    esac
    ;;
esac

if test "$Py_DEBUG" = 'true'; then
  :
else
  OPT="-DNDEBUG $OPT"
fi

if test "$ac_arch_flags"
then
	BASECFLAGS="$BASECFLAGS $ac_arch_flags"
fi

# disable check for icc since it seems to pass, but generates a warning
if test "$CC" = icc
then
  ac_cv_opt_olimit_ok=no
fi

AC_MSG_CHECKING(whether $CC accepts -OPT:Olimit=0)
AC_CACHE_VAL(ac_cv_opt_olimit_ok,
[ac_save_cc="$CC"
CC="$CC -OPT:Olimit=0"
AC_TRY_RUN([int main() { return 0; }],
  ac_cv_opt_olimit_ok=yes,
  ac_cv_opt_olimit_ok=no,
  ac_cv_opt_olimit_ok=no)
CC="$ac_save_cc"])
AC_MSG_RESULT($ac_cv_opt_olimit_ok)
if test $ac_cv_opt_olimit_ok = yes; then
    case $ac_sys_system in
	# XXX is this branch needed? On MacOSX 10.2.2 the result of the
	# olimit_ok test is "no".  Is it "yes" in some other Darwin-esque
	# environment?
        Darwin*)
	    ;;
        *)
	    BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
	    ;;
    esac
else
  AC_MSG_CHECKING(whether $CC accepts -Olimit 1500)
  AC_CACHE_VAL(ac_cv_olimit_ok,
  [ac_save_cc="$CC"
  CC="$CC -Olimit 1500"
  AC_TRY_RUN([int main() { return 0; }],
    ac_cv_olimit_ok=yes,
    ac_cv_olimit_ok=no,
    ac_cv_olimit_ok=no)
  CC="$ac_save_cc"])
  AC_MSG_RESULT($ac_cv_olimit_ok)
  if test $ac_cv_olimit_ok = yes; then
    BASECFLAGS="$BASECFLAGS -Olimit 1500"
  fi
fi

# On some compilers, pthreads are available without further options
# (e.g. MacOS X). On some of these systems, the compiler will not
# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
# So we have to see first whether pthreads are available without
# options before we can check whether -Kpthread improves anything.
AC_MSG_CHECKING(whether pthreads are available without options)
AC_CACHE_VAL(ac_cv_pthread_is_default,
[AC_TRY_RUN([
#include <pthread.h>

void* routine(void* p){return NULL;}

int main(){
  pthread_t p;
  if(pthread_create(&p,NULL,routine,NULL)!=0)
    return 1;
  (void)pthread_detach(p);
  return 0;
}
],
[
  ac_cv_pthread_is_default=yes
  ac_cv_kthread=no
  ac_cv_pthread=no
],
  ac_cv_pthread_is_default=no,
  ac_cv_pthread_is_default=no)
])
AC_MSG_RESULT($ac_cv_pthread_is_default)


if test $ac_cv_pthread_is_default = yes 
then
  ac_cv_kpthread=no
else
# -Kpthread, if available, provides the right #defines
# and linker options to make pthread_create available
# Some compilers won't report that they do not support -Kpthread,
# so we need to run a program to see whether it really made the
# function available.
AC_MSG_CHECKING(whether $CC accepts -Kpthread)
AC_CACHE_VAL(ac_cv_kpthread,
[ac_save_cc="$CC"
CC="$CC -Kpthread"
AC_TRY_RUN([
#include <pthread.h>

void* routine(void* p){return NULL;}

int main(){
  pthread_t p;
  if(pthread_create(&p,NULL,routine,NULL)!=0)
    return 1;
  (void)pthread_detach(p);
  return 0;
}
],
  ac_cv_kpthread=yes,
  ac_cv_kpthread=no,
  ac_cv_kpthread=no)
CC="$ac_save_cc"])
AC_MSG_RESULT($ac_cv_kpthread)
fi

if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
then
# -Kthread, if available, provides the right #defines
# and linker options to make pthread_create available
# Some compilers won't report that they do not support -Kthread,
# so we need to run a program to see whether it really made the
# function available.
AC_MSG_CHECKING(whether $CC accepts -Kthread)
AC_CACHE_VAL(ac_cv_kthread,
[ac_save_cc="$CC"
CC="$CC -Kthread"
AC_TRY_RUN([
#include <pthread.h>

void* routine(void* p){return NULL;}

int main(){
  pthread_t p;
  if(pthread_create(&p,NULL,routine,NULL)!=0)
    return 1;
  (void)pthread_detach(p);
  return 0;
}
],
  ac_cv_kthread=yes,
  ac_cv_kthread=no,
  ac_cv_kthread=no)
CC="$ac_save_cc"])
AC_MSG_RESULT($ac_cv_kthread)
fi

if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
then
# -pthread, if available, provides the right #defines
# and linker options to make pthread_create available
# Some compilers won't report that they do not support -pthread,
# so we need to run a program to see whether it really made the
# function available.
AC_MSG_CHECKING(whether $CC accepts -pthread)
AC_CACHE_VAL(ac_cv_thread,
[ac_save_cc="$CC"
CC="$CC -pthread"
AC_TRY_RUN([
#include <pthread.h>

void* routine(void* p){return NULL;}

int main(){
  pthread_t p;
  if(pthread_create(&p,NULL,routine,NULL)!=0)
    return 1;
  (void)pthread_detach(p);
  return 0;
}
],
  ac_cv_pthread=yes,
  ac_cv_pthread=no,
  ac_cv_pthread=no)
CC="$ac_save_cc"])
AC_MSG_RESULT($ac_cv_pthread)
fi

# If we have set a CC compiler flag for thread support then
# check if it works for CXX, too.
ac_cv_cxx_thread=no
if test ! -z "$CXX"
then
AC_MSG_CHECKING(whether $CXX also accepts flags for thread support)
ac_save_cxx="$CXX"

if test "$ac_cv_kpthread" = "yes"
then
  CXX="$CXX -Kpthread"  
  ac_cv_cxx_thread=yes
elif test "$ac_cv_kthread" = "yes"
then
  CXX="$CXX -Kthread"
  ac_cv_cxx_thread=yes
elif test "$ac_cv_pthread" = "yes"
then 
  CXX="$CXX -pthread"
  ac_cv_cxx_thread=yes
fi

if test $ac_cv_cxx_thread = yes
then
  echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
  $CXX -c conftest.$ac_ext 2>&5
  if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
     && test -s conftest$ac_exeext && ./conftest$ac_exeext
  then
    ac_cv_cxx_thread=yes
  else
    ac_cv_cxx_thread=no
  fi
  rm -fr conftest*
fi
AC_MSG_RESULT($ac_cv_cxx_thread)
fi
CXX="$ac_save_cxx"

dnl # check for ANSI or K&R ("traditional") preprocessor
dnl AC_MSG_CHECKING(for C preprocessor type)
dnl AC_TRY_COMPILE([
dnl #define spam(name, doc) {#name, &name, #name "() -- " doc}
dnl int foo;
dnl struct {char *name; int *addr; char *doc;} desc = spam(foo, "something");
dnl ], [;], cpp_type=ansi, AC_DEFINE(HAVE_OLD_CPP) cpp_type=traditional)
dnl AC_MSG_RESULT($cpp_type)

# checks for header files
AC_HEADER_STDC
AC_CHECK_HEADERS(asm/types.h curses.h dlfcn.h fcntl.h grp.h \
shadow.h langinfo.h libintl.h ncurses.h poll.h pthread.h \
stropts.h termios.h thread.h \
unistd.h utime.h \
sys/audioio.h sys/bsdtty.h sys/file.h sys/loadavg.h sys/lock.h sys/mkdev.h \
sys/modem.h \
sys/param.h sys/poll.h sys/select.h sys/socket.h sys/time.h sys/times.h \
sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h \
sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
bluetooth/bluetooth.h)
AC_HEADER_DIRENT
AC_HEADER_MAJOR

# On Solaris, term.h requires curses.h
AC_CHECK_HEADERS(term.h,,,[
#ifdef HAVE_CURSES_H
#include <curses.h>
#endif
])

# On Linux, netlink.h requires asm/types.h
AC_CHECK_HEADERS(linux/netlink.h,,,[
#ifdef HAVE_ASM_TYPES_H
#include <asm/types.h>
#endif
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
])

# checks for typedefs
was_it_defined=no
AC_MSG_CHECKING(for clock_t in time.h)
AC_EGREP_HEADER(clock_t, time.h, was_it_defined=yes, [
    AC_DEFINE(clock_t, long, [Define to 'long' if <time.h> doesn't define.])
])
AC_MSG_RESULT($was_it_defined)

# Check whether using makedev requires defining _OSF_SOURCE
AC_MSG_CHECKING(for makedev)
AC_TRY_LINK([#include <sys/types.h> ],
	    [ makedev(0, 0) ],
	    ac_cv_has_makedev=yes,
	    ac_cv_has_makedev=no)
if test "$ac_cv_has_makedev" = "no"; then
    # we didn't link, try if _OSF_SOURCE will allow us to link
    AC_TRY_LINK([
#define _OSF_SOURCE 1
#include <sys/types.h>
    ],
    [ makedev(0, 0) ],
    ac_cv_has_makedev=yes,
    ac_cv_has_makedev=no)
    if test "$ac_cv_has_makedev" = "yes"; then
        AC_DEFINE(_OSF_SOURCE, 1, [Define _OSF_SOURCE to get the makedev macro.])
    fi
fi
AC_MSG_RESULT($ac_cv_has_makedev)
if test "$ac_cv_has_makedev" = "yes"; then
    AC_DEFINE(HAVE_MAKEDEV, 1, [Define this if you have the makedev macro.])
fi

# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
# defined, but the compiler does not support pragma redefine_extname,
# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
# structures (such as rlimit64) without declaring them. As a
# work-around, disable LFS on such configurations

use_lfs=yes
AC_MSG_CHECKING(Solaris LFS bug)
AC_TRY_COMPILE([
#define _LARGEFILE_SOURCE 1
#define _FILE_OFFSET_BITS 64
#include <sys/resource.h>
],struct rlimit foo;,sol_lfs_bug=no,sol_lfs_bug=yes)
AC_MSG_RESULT($sol_lfs_bug)
if test "$sol_lfs_bug" = "yes"; then
  use_lfs=no
fi

if test "$use_lfs" = "yes"; then
# Two defines needed to enable largefile support on various platforms
# These may affect some typedefs
AC_DEFINE(_LARGEFILE_SOURCE, 1, 
[This must be defined on some systems to enable large file support.])
AC_DEFINE(_FILE_OFFSET_BITS, 64,
[This must be set to 64 on some systems to enable large file support.])
fi

# Add some code to confdefs.h so that the test for off_t works on SCO
cat >> confdefs.h <<\EOF
#if defined(SCO_DS)
#undef _OFF_T
#endif
EOF

# Type availability checks
AC_TYPE_MODE_T
AC_TYPE_OFF_T
AC_TYPE_PID_T
AC_TYPE_SIGNAL
AC_TYPE_SIZE_T
AC_TYPE_UID_T
AC_CHECK_TYPE(ssize_t, 
  AC_DEFINE(HAVE_SSIZE_T, 1, Define if your compiler provides ssize_t),,)

# Sizes of various common basic types
# ANSI C requires sizeof(char) == 1, so no need to check it
AC_CHECK_SIZEOF(int, 4)
AC_CHECK_SIZEOF(long, 4)
AC_CHECK_SIZEOF(void *, 4)
AC_CHECK_SIZEOF(short, 2)
AC_CHECK_SIZEOF(float, 4)
AC_CHECK_SIZEOF(double, 8)
AC_CHECK_SIZEOF(fpos_t, 4)
AC_CHECK_SIZEOF(size_t, 4)

AC_MSG_CHECKING(for long long support)
have_long_long=no
AC_TRY_COMPILE([], [long long x; x = (long long)0;], [
  AC_DEFINE(HAVE_LONG_LONG, 1, [Define this if you have the type long long.]) 
  have_long_long=yes
])
AC_MSG_RESULT($have_long_long)
if test "$have_long_long" = yes ; then
AC_CHECK_SIZEOF(long long, 8)
fi

AC_MSG_CHECKING(for uintptr_t support)
have_uintptr_t=no
AC_TRY_COMPILE([], [uintptr_t x; x = (uintptr_t)0;], [
  AC_DEFINE(HAVE_UINTPTR_T, 1, [Define this if you have the type uintptr_t.]) 
  have_uintptr_t=yes
])
AC_MSG_RESULT($have_uintptr_t)
if test "$have_uintptr_t" = yes ; then
AC_CHECK_SIZEOF(uintptr_t, 4)
fi

# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
AC_MSG_CHECKING(size of off_t)
AC_CACHE_VAL(ac_cv_sizeof_off_t,
[AC_TRY_RUN([#include <stdio.h>
#include <sys/types.h>
main()
{
  FILE *f=fopen("conftestval", "w");
  if (!f) exit(1);
  fprintf(f, "%d\n", sizeof(off_t));
  exit(0);
}],
ac_cv_sizeof_off_t=`cat conftestval`,
ac_cv_sizeof_off_t=0,
ac_cv_sizeof_off_t=4)
])
AC_MSG_RESULT($ac_cv_sizeof_off_t)
AC_DEFINE_UNQUOTED(SIZEOF_OFF_T, $ac_cv_sizeof_off_t,
[The number of bytes in an off_t.])

AC_MSG_CHECKING(whether to enable large file support)
if test "$have_long_long" = yes -a \
	"$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
	"$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
  AC_DEFINE(HAVE_LARGEFILE_SUPPORT, 1, 
  [Defined to enable large file support when an off_t is bigger than a long
   and long long is available and at least as big as an off_t. You may need
   to add some flags for configuration and compilation to enable this mode.
   (For Solaris and Linux, the necessary defines are already defined.)])
  AC_MSG_RESULT(yes)
else
  AC_MSG_RESULT(no)
fi

# AC_CHECK_SIZEOF() doesn't include <time.h>.
AC_MSG_CHECKING(size of time_t)
AC_CACHE_VAL(ac_cv_sizeof_time_t,
[AC_TRY_RUN([#include <stdio.h>
#include <time.h>
main()
{
  FILE *f=fopen("conftestval", "w");
  if (!f) exit(1);
  fprintf(f, "%d\n", sizeof(time_t));
  exit(0);
}],
ac_cv_sizeof_time_t=`cat conftestval`,
ac_cv_sizeof_time_t=0,
ac_cv_sizeof_time_t=4)
])
AC_MSG_RESULT($ac_cv_sizeof_time_t)
AC_DEFINE_UNQUOTED(SIZEOF_TIME_T, $ac_cv_sizeof_time_t, 
[The number of bytes in a time_t.])


# if have pthread_t then define SIZEOF_PTHREAD_T
ac_save_cc="$CC"
if test "$ac_cv_kpthread" = "yes"
then CC="$CC -Kpthread"
elif test "$ac_cv_kthread" = "yes"
then CC="$CC -Kthread"
elif test "$ac_cv_pthread" = "yes"
then CC="$CC -pthread"
fi
AC_MSG_CHECKING(for pthread_t)
have_pthread_t=no
AC_TRY_COMPILE([#include <pthread.h>], [pthread_t x; x = *(pthread_t*)0;], have_pthread_t=yes)
AC_MSG_RESULT($have_pthread_t)
if test "$have_pthread_t" = yes ; then
  # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
  AC_MSG_CHECKING(size of pthread_t)
  AC_CACHE_VAL(ac_cv_sizeof_pthread_t,
  [AC_TRY_RUN([#include <stdio.h>
#include <pthread.h>
  main()
  {
    FILE *f=fopen("conftestval", "w");
    if (!f) exit(1);
    fprintf(f, "%d\n", sizeof(pthread_t));
    exit(0);
  }],
  ac_cv_sizeof_pthread_t=`cat conftestval`,
  ac_cv_sizeof_pthread_t=0,
  ac_cv_sizeof_pthread_t=4)
  ])
  AC_MSG_RESULT($ac_cv_sizeof_pthread_t)
  AC_DEFINE_UNQUOTED(SIZEOF_PTHREAD_T, $ac_cv_sizeof_pthread_t,
   [The number of bytes in a pthread_t.])
fi
CC="$ac_save_cc"

AC_MSG_CHECKING(for --enable-toolbox-glue)
AC_ARG_ENABLE(toolbox-glue,
              AC_HELP_STRING(--enable-toolbox-glue, disable/enable MacOSX glue code for extensions))

if test -z "$enable_toolbox_glue"
then 
	case $ac_sys_system/$ac_sys_release in
	Darwin/*)
		enable_toolbox_glue="yes";;
	*)
		enable_toolbox_glue="no";;
	esac
fi
case "$enable_toolbox_glue" in
yes)
	extra_machdep_objs="Python/mactoolboxglue.o"
	extra_undefs="-u _PyMac_Error"
	AC_DEFINE(USE_TOOLBOX_OBJECT_GLUE, 1,
         [Define if you want to use MacPython modules on MacOSX in unix-Python.])
	;;
*)
	extra_machdep_objs=""
	extra_undefs=""
	;;
esac
AC_MSG_RESULT($enable_toolbox_glue)

AC_SUBST(OTHER_LIBTOOL_OPT)
case $ac_sys_system/$ac_sys_release in
  Darwin/@<:@01234567@:>@.*) 
    OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
    ;;
  Darwin/*)
    OTHER_LIBTOOL_OPT=""
    ;;
esac

AC_SUBST(LIBTOOL_CRUFT)
case $ac_sys_system/$ac_sys_release in
  Darwin/@<:@01234567@:>@.*) 
    LIBTOOL_CRUFT="-framework System -lcc_dynamic -arch_only `arch`"
    LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
    LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
  Darwin/*)
    gcc_version=`gcc -v 2>&1 |  grep version | cut -d\  -f3`
    if test ${gcc_version} '<' 4.0
        then
            LIBTOOL_CRUFT="-lcc_dynamic"
        else 
            LIBTOOL_CRUFT=""
    fi
    LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only `arch`"
    LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
    LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
esac

AC_MSG_CHECKING(for --enable-framework)
if test "$enable_framework"
then
	BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
	# -F. is needed to allow linking to the framework while 
	# in the build location.
	AC_DEFINE(WITH_NEXT_FRAMEWORK, 1, 
         [Define if you want to produce an OpenStep/Rhapsody framework
         (shared library plus accessory files).])
	AC_MSG_RESULT(yes)
else
	AC_MSG_RESULT(no)
fi

AC_MSG_CHECKING(for dyld)
case $ac_sys_system/$ac_sys_release in
  Darwin/*)
  	AC_DEFINE(WITH_DYLD, 1, 
        [Define if you want to use the new-style (Openstep, Rhapsody, MacOS)
         dynamic linker (dyld) instead of the old-style (NextStep) dynamic
         linker (rld). Dyld is necessary to support frameworks.])
  	AC_MSG_RESULT(always on for Darwin)
  	;;
  *)
	AC_MSG_RESULT(no)
	;;
esac

# Set info about shared libraries.
AC_SUBST(SO)
AC_SUBST(LDSHARED)
AC_SUBST(BLDSHARED)
AC_SUBST(CCSHARED)
AC_SUBST(LINKFORSHARED)
# SO is the extension of shared libraries `(including the dot!)
# -- usually .so, .sl on HP-UX, .dll on Cygwin
AC_MSG_CHECKING(SO)
if test -z "$SO"
then
	case $ac_sys_system in
	hp*|HP*)   SO=.sl;;
	CYGWIN*)   SO=.dll;;
	*)	   SO=.so;;
	esac
else
	# this might also be a termcap variable, see #610332
        echo
        echo '====================================================================='
        echo '+                                                                   +'
	echo '+ WARNING: You have set SO in your environment.                     +'
        echo '+ Do you really mean to change the extension for shared libraries?  +'
        echo '+ Continuing in 10 seconds to let you to ponder.                    +'
        echo '+                                                                   +'
        echo '====================================================================='
	sleep 10
fi
AC_MSG_RESULT($SO)
# LDSHARED is the ld *command* used to create shared library
# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
# (Shared libraries in this instance are shared modules to be loaded into
# Python, as opposed to building Python itself as a shared library.)
AC_MSG_CHECKING(LDSHARED)
if test -z "$LDSHARED"
then
	case $ac_sys_system/$ac_sys_release in
	AIX*)
		BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
		LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
		;;
	BeOS*)
		BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
		LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
		;;
	IRIX/5*) LDSHARED="ld -shared";;
	IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
	SunOS/5*) 
		if test "$GCC" = "yes"
		then LDSHARED='$(CC) -shared'
		else LDSHARED='$(CC) -G';
		fi ;;
	hp*|HP*) LDSHARED="ld -b";;
	OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
	Darwin/1.3*)
		LDSHARED='$(CC) $(LDFLAGS) -bundle'
		if test "$enable_framework" ; then
			# Link against the framework. All externals should be defined.
			BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
			LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
		else
			# No framework. Ignore undefined symbols, assuming they come from Python
			LDSHARED="$LDSHARED -undefined suppress"
		fi ;;
	Darwin/1.4*|Darwin/5.*|Darwin/6.*)
		LDSHARED='$(CC) $(LDFLAGS) -bundle'
		if test "$enable_framework" ; then
			# Link against the framework. All externals should be defined.
			BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
			LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
		else
			# No framework, use the Python app as bundle-loader
			BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
			LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
		fi ;;
	Darwin/*)
		# Use -undefined dynamic_lookup whenever possible (10.3 and later).
		# This allows an extension to be used in any Python
		cur_target=`sw_vers -productVersion | sed 's/\(10\.[[0-9]]*\).*/\1/'`
		CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
		if test ${MACOSX_DEPLOYMENT_TARGET-${cur_target}} '>' 10.2
		then
			LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
			BLDSHARED="$LDSHARED"
		else
			LDSHARED='$(CC) $(LDFLAGS) -bundle'
			if test "$enable_framework" ; then
				# Link against the framework. All externals should be defined.
				BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
				LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
			else
				# No framework, use the Python app as bundle-loader
				BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
				LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
			fi
		fi
		;;
	Linux*|GNU*) LDSHARED='$(CC) -shared';;
	BSD/OS*/4*) LDSHARED="gcc -shared";;
	OpenBSD*|FreeBSD*)
		if [[ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]]
		then
			LDSHARED="$CC -shared ${LDFLAGS}"
		else
			LDSHARED="ld -Bshareable ${LDFLAGS}"
		fi;;
	NetBSD*|DragonFly*) LDSHARED="cc -shared ${LDFLAGS}";;
	OpenUNIX*|UnixWare*)
		if test "$GCC" = "yes"
		then LDSHARED='$(CC) -shared'
		else LDSHARED='$(CC) -G'
		fi;;
	SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
	Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
	CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
	atheos*) LDSHARED="gcc -shared";;
	*)	LDSHARED="ld";;
	esac
fi
AC_MSG_RESULT($LDSHARED)
BLDSHARED=${BLDSHARED-$LDSHARED}
# CCSHARED are the C *flags* used to create objects to go into a shared
# library (module) -- this is only needed for a few systems
AC_MSG_CHECKING(CCSHARED)
if test -z "$CCSHARED"
then
	case $ac_sys_system/$ac_sys_release in
	SunOS*) if test "$GCC" = yes;
	        then CCSHARED="-fPIC";
		else CCSHARED="-xcode=pic32";
	        fi;;
	hp*|HP*) if test "$GCC" = yes;
		 then CCSHARED="-fPIC";
		 else CCSHARED="+z";
		 fi;;
	Linux*|GNU*) CCSHARED="-fPIC";;
	BSD/OS*/4*) CCSHARED="-fpic";;
	FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
	OpenUNIX*|UnixWare*)
		if test "$GCC" = "yes"
		then CCSHARED="-fPIC"
		else CCSHARED="-KPIC"
		fi;;
	SCO_SV*)
		if test "$GCC" = "yes"
		then CCSHARED="-fPIC"
		else CCSHARED="-Kpic -belf"
		fi;;
	Monterey*) CCSHARED="-G";;
	IRIX*/6*)  case $CC in
		   *gcc*) CCSHARED="-shared";;
		   *) CCSHARED="";;
		   esac;;
	atheos*) CCSHARED="-fPIC";;
	esac
fi
AC_MSG_RESULT($CCSHARED)
# LINKFORSHARED are the flags passed to the $(CC) command that links
# the python executable -- this is only needed for a few systems
AC_MSG_CHECKING(LINKFORSHARED)
if test -z "$LINKFORSHARED"
then
	case $ac_sys_system/$ac_sys_release in
	AIX*)	LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
	hp*|HP*)
	    LINKFORSHARED="-Wl,-E -Wl,+s";;
#	    LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
	BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
	Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
	# -u libsys_s pulls in all symbols in libsys
	Darwin/*) 
		# -u _PyMac_Error is needed to pull in the mac toolbox glue,
		# which is
		# not used by the core itself but which needs to be in the core so
		# that dynamically loaded extension modules have access to it.
		# -prebind is no longer used, because it actually seems to give a
		# slowdown in stead of a speedup, maybe due to the large number of
		# dynamic loads Python does.

		LINKFORSHARED="$extra_undefs"
		if test "$enable_framework"
		then
			LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
		fi
		LINKFORSHARED="$LINKFORSHARED";;
	OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
	SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
	ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
	FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) 
		if [[ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]]
		then
			LINKFORSHARED="-Wl,--export-dynamic"
		fi;;
	SunOS/5*) case $CC in
		  *gcc*)
		    if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
		    then
			LINKFORSHARED="-Xlinker --export-dynamic"
		    fi;;
		  esac;;
	CYGWIN*)
		if test $enable_shared = "no"
		then
			LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
		fi;;
	esac
fi
AC_MSG_RESULT($LINKFORSHARED)

AC_SUBST(CFLAGSFORSHARED)
AC_MSG_CHECKING(CFLAGSFORSHARED)
if test ! "$LIBRARY" = "$LDLIBRARY"
then
	case $ac_sys_system in
	CYGWIN*)
		# Cygwin needs CCSHARED when building extension DLLs
		# but not when building the interpreter DLL.
		CFLAGSFORSHARED='';;
	*)
		CFLAGSFORSHARED='$(CCSHARED)'
	esac
fi
AC_MSG_RESULT($CFLAGSFORSHARED)

# SHLIBS are libraries (except -lc and -lm) to link to the python shared
# library (with --enable-shared).
# For platforms on which shared libraries are not allowed to have unresolved
# symbols, this must be set to $(LIBS) (expanded by make). We do this even
# if it is not required, since it creates a dependency of the shared library
# to LIBS. This, in turn, means that applications linking the shared libpython
# don't need to link LIBS explicitly. The default should be only changed
# on systems where this approach causes problems.
AC_SUBST(SHLIBS)
AC_MSG_CHECKING(SHLIBS)
case "$ac_sys_system" in
	*)
		SHLIBS='$(LIBS)';;
esac
AC_MSG_RESULT($SHLIBS)


# checks for libraries
AC_CHECK_LIB(dl, dlopen)	# Dynamic linking for SunOS/Solaris and SYSV
AC_CHECK_LIB(dld, shl_load)	# Dynamic linking for HP-UX

# only check for sem_ini if thread support is requested
if test "$with_threads" = "yes" -o -z "$with_threads"; then
    AC_SEARCH_LIBS(sem_init, pthread rt posix4) # 'Real Time' functions on Solaris
						# posix4 on Solaris 2.6
						# pthread (first!) on Linux
fi

# check if we need libintl for locale functions
AC_CHECK_LIB(intl, textdomain,
	AC_DEFINE(WITH_LIBINTL, 1,
	[Define to 1 if libintl is needed for locale functions.]))

# checks for system dependent C++ extensions support
case "$ac_sys_system" in
	AIX*)	AC_MSG_CHECKING(for genuine AIX C++ extensions support)
		AC_TRY_LINK([#include "/usr/lpp/xlC/include/load.h"],
			    [loadAndInit("", 0, "")],
			    [AC_DEFINE(AIX_GENUINE_CPLUSPLUS, 1,
                      [Define for AIX if your compiler is a genuine IBM xlC/xlC_r
                       and you want support for AIX C++ shared extension modules.])
			     AC_MSG_RESULT(yes)],
			    [AC_MSG_RESULT(no)]);;
	*) ;;
esac

# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
# BeOS' sockets are stashed in libnet.
AC_CHECK_LIB(nsl, t_open, [LIBS="-lnsl $LIBS"]) # SVR4
AC_CHECK_LIB(socket, socket, [LIBS="-lsocket $LIBS"], [], $LIBS) # SVR4 sockets

case "$ac_sys_system" in
BeOS*)
AC_CHECK_LIB(net, socket, [LIBS="-lnet $LIBS"], [], $LIBS) # BeOS
;;
esac

AC_MSG_CHECKING(for --with-libs)
AC_ARG_WITH(libs,
            AC_HELP_STRING(--with-libs='lib1 ...', link against additional libs),
[
AC_MSG_RESULT($withval)
LIBS="$withval $LIBS"
],
[AC_MSG_RESULT(no)])

# Determine if signalmodule should be used.
AC_SUBST(USE_SIGNAL_MODULE)
AC_SUBST(SIGNAL_OBJS)
AC_MSG_CHECKING(for --with-signal-module)
AC_ARG_WITH(signal-module,
            AC_HELP_STRING(--with-signal-module, disable/enable signal module))

if test -z "$with_signal_module"
then with_signal_module="yes"
fi
AC_MSG_RESULT($with_signal_module)

if test "${with_signal_module}" = "yes"; then
	USE_SIGNAL_MODULE=""
	SIGNAL_OBJS=""
else
	USE_SIGNAL_MODULE="#"
	SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
fi

# This is used to generate Setup.config
AC_SUBST(USE_THREAD_MODULE)
USE_THREAD_MODULE=""

AC_MSG_CHECKING(for --with-dec-threads)
AC_SUBST(LDLAST)
AC_ARG_WITH(dec-threads,
            AC_HELP_STRING(--with-dec-threads, use DEC Alpha/OSF1 thread-safe libraries),
[
AC_MSG_RESULT($withval)
LDLAST=-threads
if test "${with_thread+set}" != set; then
   with_thread="$withval";
fi],
[AC_MSG_RESULT(no)])

# Templates for things AC_DEFINEd more than once.
# For a single AC_DEFINE, no template is needed.
AH_TEMPLATE(C_THREADS,[Define if you have the Mach cthreads package])
AH_TEMPLATE(_REENTRANT,
  [Define to force use of thread-safe errno, h_errno, and other functions])
AH_TEMPLATE(WITH_THREAD,
  [Define if you want to compile in rudimentary thread support])

AC_MSG_CHECKING(for --with-threads)
dnl quadrigraphs "@<:@" and "@:>@" produce "[" and "]" in the output
AC_ARG_WITH(threads,
            AC_HELP_STRING(--with(out)-threads@<:@=DIRECTORY@:>@, disable/enable thread support))

# --with-thread is deprecated, but check for it anyway
dnl quadrigraphs "@<:@" and "@:>@" produce "[" and "]" in the output
AC_ARG_WITH(thread,
            AC_HELP_STRING(--with(out)-thread@<:@=DIRECTORY@:>@, deprecated; use --with(out)-threads),
            [with_threads=$with_thread])

if test -z "$with_threads"
then with_threads="yes"
fi
AC_MSG_RESULT($with_threads)

AC_SUBST(THREADOBJ)
if test "$with_threads" = "no"
then
    USE_THREAD_MODULE="#"
elif test "$ac_cv_pthread_is_default" = yes
then
    AC_DEFINE(WITH_THREAD)
    # Defining _REENTRANT on system with POSIX threads should not hurt.
    AC_DEFINE(_REENTRANT)
    posix_threads=yes
    THREADOBJ="Python/thread.o"    
elif test "$ac_cv_kpthread" = "yes"
then
    CC="$CC -Kpthread"
    if test "$ac_cv_cxx_thread" = "yes"; then
        CXX="$CXX -Kpthread"
    fi
    AC_DEFINE(WITH_THREAD)
    posix_threads=yes
    THREADOBJ="Python/thread.o"
elif test "$ac_cv_kthread" = "yes"
then
    CC="$CC -Kthread"
    if test "$ac_cv_cxx_thread" = "yes"; then
        CXX="$CXX -Kthread"
    fi
    AC_DEFINE(WITH_THREAD)
    posix_threads=yes
    THREADOBJ="Python/thread.o"
elif test "$ac_cv_pthread" = "yes"
then
    CC="$CC -pthread"
    if test "$ac_cv_cxx_thread" = "yes"; then
        CXX="$CXX -pthread"
    fi
    AC_DEFINE(WITH_THREAD)
    posix_threads=yes
    THREADOBJ="Python/thread.o"
else
    if test ! -z "$with_threads" -a -d "$with_threads"
    then LDFLAGS="$LDFLAGS -L$with_threads"
    fi
    if test ! -z "$withval" -a -d "$withval"
    then LDFLAGS="$LDFLAGS -L$withval"
    fi

    # According to the POSIX spec, a pthreads implementation must
    # define _POSIX_THREADS in unistd.h. Some apparently don't
    # (e.g. gnu pth with pthread emulation)
    AC_MSG_CHECKING(for _POSIX_THREADS in unistd.h)
    AC_EGREP_CPP(yes,
    [
#include <unistd.h>
#ifdef _POSIX_THREADS
yes
#endif
    ], unistd_defines_pthreads=yes, unistd_defines_pthreads=no)
    AC_MSG_RESULT($unistd_defines_pthreads)

    AC_DEFINE(_REENTRANT)
    AC_CHECK_HEADER(cthreads.h, [AC_DEFINE(WITH_THREAD)
    AC_DEFINE(C_THREADS)
    AC_DEFINE(HURD_C_THREADS, 1,
    [Define if you are using Mach cthreads directly under /include])
    LIBS="$LIBS -lthreads"
    THREADOBJ="Python/thread.o"],[
    AC_CHECK_HEADER(mach/cthreads.h, [AC_DEFINE(WITH_THREAD)
    AC_DEFINE(C_THREADS)
    AC_DEFINE(MACH_C_THREADS, 1,
    [Define if you are using Mach cthreads under mach /])
    THREADOBJ="Python/thread.o"],[
    AC_MSG_CHECKING(for --with-pth)
    AC_ARG_WITH([pth],
                AC_HELP_STRING(--with-pth, use GNU pth threading libraries),
                [AC_MSG_RESULT($withval)
                  AC_DEFINE([WITH_THREAD])
                  AC_DEFINE([HAVE_PTH], 1,
                            [Define if you have GNU PTH threads.])
                  LIBS="-lpth $LIBS"
                  THREADOBJ="Python/thread.o"],
	        [AC_MSG_RESULT(no)

    # Just looking for pthread_create in libpthread is not enough:
    # on HP/UX, pthread.h renames pthread_create to a different symbol name.
    # So we really have to include pthread.h, and then link.
    _libs=$LIBS
    LIBS="$LIBS -lpthread"
    AC_MSG_CHECKING([for pthread_create in -lpthread])
    AC_TRY_LINK([#include <pthread.h>

void * start_routine (void *arg) { exit (0); }], [
pthread_create (NULL, NULL, start_routine, NULL)], [
    AC_MSG_RESULT(yes)
    AC_DEFINE(WITH_THREAD)
    posix_threads=yes
    THREADOBJ="Python/thread.o"],[
    LIBS=$_libs
    AC_CHECK_FUNC(pthread_detach, [AC_DEFINE(WITH_THREAD)
    posix_threads=yes
    THREADOBJ="Python/thread.o"],[
    AC_CHECK_HEADER(atheos/threads.h, [AC_DEFINE(WITH_THREAD)
    AC_DEFINE(ATHEOS_THREADS, 1,
    [Define this if you have AtheOS threads.])
    THREADOBJ="Python/thread.o"],[
    AC_CHECK_HEADER(kernel/OS.h, [AC_DEFINE(WITH_THREAD)
    AC_DEFINE(BEOS_THREADS, 1,
    [Define this if you have BeOS threads.])
    THREADOBJ="Python/thread.o"],[
    AC_CHECK_LIB(pthreads, pthread_create, [AC_DEFINE(WITH_THREAD)
    posix_threads=yes
    LIBS="$LIBS -lpthreads"
    THREADOBJ="Python/thread.o"], [
    AC_CHECK_LIB(c_r, pthread_create, [AC_DEFINE(WITH_THREAD)
    posix_threads=yes
    LIBS="$LIBS -lc_r"
    THREADOBJ="Python/thread.o"], [
    AC_CHECK_LIB(pthread, __pthread_create_system, [AC_DEFINE(WITH_THREAD)
    posix_threads=yes
    LIBS="$LIBS -lpthread"
    THREADOBJ="Python/thread.o"], [
    AC_CHECK_LIB(cma, pthread_create, [AC_DEFINE(WITH_THREAD)
    posix_threads=yes
    LIBS="$LIBS -lcma"
    THREADOBJ="Python/thread.o"],[
    USE_THREAD_MODULE="#"])
    ])])])])])])])])])])

    AC_CHECK_LIB(mpc, usconfig, [AC_DEFINE(WITH_THREAD)
    LIBS="$LIBS -lmpc"
    THREADOBJ="Python/thread.o"
    USE_THREAD_MODULE=""])

    if test "$posix_threads" != "yes"; then     
      AC_CHECK_LIB(thread, thr_create, [AC_DEFINE(WITH_THREAD)
      LIBS="$LIBS -lthread"
      THREADOBJ="Python/thread.o"
      USE_THREAD_MODULE=""])
    fi

    if test "$USE_THREAD_MODULE" != "#"
    then
        # If the above checks didn't disable threads, (at least) OSF1
        # needs this '-threads' argument during linking.
        case $ac_sys_system in
        OSF1) LDLAST=-threads;;
        esac
    fi
fi

if test "$posix_threads" = "yes"; then
      if test "$unistd_defines_pthreads" = "no"; then
         AC_DEFINE(_POSIX_THREADS, 1,
         [Define if you have POSIX threads, 
          and your system does not define that.])
      fi

      # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
      case  $ac_sys_system/$ac_sys_release in
  SunOS/5.6) AC_DEFINE(HAVE_PTHREAD_DESTRUCTOR, 1,
                       Defined for Solaris 2.6 bug in pthread header.)
		       ;;
      SunOS/5.8) AC_DEFINE(HAVE_BROKEN_POSIX_SEMAPHORES, 1,
		       Define if the Posix semaphores do not work on your system)
		       ;;
      esac

      AC_MSG_CHECKING(if PTHREAD_SCOPE_SYSTEM is supported)
      AC_CACHE_VAL(ac_cv_pthread_system_supported,
      [AC_TRY_RUN([#include <pthread.h>
      void *foo(void *parm) {
        return NULL;
      }
      main() {
        pthread_attr_t attr;
        pthread_t id;
        if (pthread_attr_init(&attr)) exit(-1);
        if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
        if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
        exit(0);
      }],
      ac_cv_pthread_system_supported=yes,
      ac_cv_pthread_system_supported=no,
      ac_cv_pthread_system_supported=no)
      ])
      AC_MSG_RESULT($ac_cv_pthread_system_supported)
      if test "$ac_cv_pthread_system_supported" = "yes"; then
        AC_DEFINE(PTHREAD_SYSTEM_SCHED_SUPPORTED, 1, [Defined if PTHREAD_SCOPE_SYSTEM supported.])
      fi
      AC_CHECK_FUNCS(pthread_sigmask,
        [case $ac_sys_system in
        CYGWIN*)
          AC_DEFINE(HAVE_BROKEN_PTHREAD_SIGMASK, 1,
            [Define if pthread_sigmask() does not work on your system.])
            ;;
        esac])
fi


# Check for enable-ipv6
AH_TEMPLATE(ENABLE_IPV6, [Define if --enable-ipv6 is specified])
AC_MSG_CHECKING([if --enable-ipv6 is specified])
AC_ARG_ENABLE(ipv6,
[  --enable-ipv6           Enable ipv6 (with ipv4) support
  --disable-ipv6          Disable ipv6 support],
[ case "$enableval" in
  no)
       AC_MSG_RESULT(no)
       ipv6=no
       ;;
  *)   AC_MSG_RESULT(yes)
       AC_DEFINE(ENABLE_IPV6)
       ipv6=yes
       ;;
  esac ],

[
dnl the check does not work on cross compilation case...
  AC_TRY_RUN([ /* AF_INET6 available check */
#include <sys/types.h>
#include <sys/socket.h>
main()
{
 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
   exit(1);
 else
   exit(0);
}
],
  AC_MSG_RESULT(yes)
  ipv6=yes,
  AC_MSG_RESULT(no)
  ipv6=no,
  AC_MSG_RESULT(no)
  ipv6=no
)

if test "$ipv6" = "yes"; then
	AC_MSG_CHECKING(if RFC2553 API is available)
	AC_TRY_COMPILE([#include <sys/types.h>
#include <netinet/in.h>],
	[struct sockaddr_in6 x;
x.sin6_scope_id;],
		AC_MSG_RESULT(yes)
		ipv6=yes,
		AC_MSG_RESULT(no, IPv6 disabled)
		ipv6=no)
fi

if test "$ipv6" = "yes"; then
	AC_DEFINE(ENABLE_IPV6)
fi
])

ipv6type=unknown
ipv6lib=none
ipv6trylibc=no

if test "$ipv6" = "yes"; then
	AC_MSG_CHECKING([ipv6 stack type])
	for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
	do
		case $i in
		inria)
			dnl http://www.kame.net/
			AC_EGREP_CPP(yes, [
#include <netinet/in.h>
#ifdef IPV6_INRIA_VERSION
yes
#endif],
				[ipv6type=$i])
			;;
		kame)
			dnl http://www.kame.net/
			AC_EGREP_CPP(yes, [
#include <netinet/in.h>
#ifdef __KAME__
yes
#endif],
				[ipv6type=$i;
				ipv6lib=inet6
				ipv6libdir=/usr/local/v6/lib
				ipv6trylibc=yes])
			;;
		linux-glibc)
			dnl http://www.v6.linux.or.jp/
			AC_EGREP_CPP(yes, [
#include <features.h>
#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
yes
#endif],
				[ipv6type=$i;
				ipv6trylibc=yes])
			;;
		linux-inet6)
			dnl http://www.v6.linux.or.jp/
			if test -d /usr/inet6; then
				ipv6type=$i
				ipv6lib=inet6
				ipv6libdir=/usr/inet6/lib
				BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
			fi
			;;
		solaris)
			if test -f /etc/netconfig; then
                          if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
				ipv6type=$i
				ipv6trylibc=yes
                          fi
                        fi
			;;
		toshiba)
			AC_EGREP_CPP(yes, [
#include <sys/param.h>
#ifdef _TOSHIBA_INET6
yes
#endif],
				[ipv6type=$i;
				ipv6lib=inet6;
				ipv6libdir=/usr/local/v6/lib])
			;;
		v6d)
			AC_EGREP_CPP(yes, [
#include </usr/local/v6/include/sys/v6config.h>
#ifdef __V6D__
yes
#endif],
				[ipv6type=$i;
				ipv6lib=v6;
				ipv6libdir=/usr/local/v6/lib;
				BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"])
			;;
		zeta)
			AC_EGREP_CPP(yes, [
#include <sys/param.h>
#ifdef _ZETA_MINAMI_INET6
yes
#endif],
				[ipv6type=$i;
				ipv6lib=inet6;
				ipv6libdir=/usr/local/v6/lib])
			;;
		esac
		if test "$ipv6type" != "unknown"; then
			break
		fi
	done
	AC_MSG_RESULT($ipv6type)
fi

if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
	if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
		LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
		echo "using lib$ipv6lib"
	else
		if test $ipv6trylibc = "yes"; then
			echo "using libc"
		else
			echo 'Fatal: no $ipv6lib library found.  cannot continue.'
			echo "You need to fetch lib$ipv6lib.a from appropriate"
			echo 'ipv6 kit and compile beforehand.'
			exit 1
		fi
	fi
fi

# Check for --with-doc-strings
AC_MSG_CHECKING(for --with-doc-strings)
AC_ARG_WITH(doc-strings,
            AC_HELP_STRING(--with(out)-doc-strings, disable/enable documentation strings))

if test -z "$with_doc_strings"
then with_doc_strings="yes"
fi
if test "$with_doc_strings" != "no"
then
    AC_DEFINE(WITH_DOC_STRINGS, 1,
      [Define if you want documentation strings in extension modules])
fi
AC_MSG_RESULT($with_doc_strings)

# Check for Python-specific malloc support
AC_MSG_CHECKING(for --with-tsc)
AC_ARG_WITH(tsc,
[  --with(out)-tsc         enable/disable timestamp counter profile], [
if test "$withval" != no
then 
  AC_DEFINE(WITH_TSC, 1, 
    [Define to profile with the Pentium timestamp counter]) 
    AC_MSG_RESULT(yes)
else AC_MSG_RESULT(no)
fi],
[AC_MSG_RESULT(no)])

# Check for Python-specific malloc support
AC_MSG_CHECKING(for --with-pymalloc)
AC_ARG_WITH(pymalloc,
            AC_HELP_STRING(--with(out)-pymalloc, disable/enable specialized mallocs))

if test -z "$with_pymalloc"
then with_pymalloc="yes"
fi
if test "$with_pymalloc" != "no"
then
    AC_DEFINE(WITH_PYMALLOC, 1, 
     [Define if you want to compile in Python-specific mallocs])
fi
AC_MSG_RESULT($with_pymalloc)

# Check for --with-wctype-functions
AC_MSG_CHECKING(for --with-wctype-functions)
AC_ARG_WITH(wctype-functions, 
            AC_HELP_STRING(--with-wctype-functions, use wctype.h functions),
[
if test "$withval" != no
then 
  AC_DEFINE(WANT_WCTYPE_FUNCTIONS, 1,
  [Define if you want wctype.h functions to be used instead of the
   one supplied by Python itself. (see Include/unicodectype.h).]) 
  AC_MSG_RESULT(yes)
else AC_MSG_RESULT(no)
fi],
[AC_MSG_RESULT(no)])

# -I${DLINCLDIR} is added to the compile rule for importdl.o
AC_SUBST(DLINCLDIR)
DLINCLDIR=.

# 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_FUNCS(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*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
	if test "$ac_cv_func_dlopen" = yes
	then DYNLOADFILE="dynload_shlib.o"
	else DYNLOADFILE="dynload_aix.o"
	fi
	;;
	BeOS*) DYNLOADFILE="dynload_beos.o";;
	hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
	Darwin/*) DYNLOADFILE="dynload_next.o";;
	atheos*) DYNLOADFILE="dynload_atheos.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, 1,
        [Defined when any dynamic module loading is enabled.])
fi

# MACHDEP_OBJS can be set to platform-specific object files needed by Python

AC_SUBST(MACHDEP_OBJS)
AC_MSG_CHECKING(MACHDEP_OBJS)
if test -z "$MACHDEP_OBJS"
then
	MACHDEP_OBJS=$extra_machdep_objs
else
	MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
fi
AC_MSG_RESULT(MACHDEP_OBJS)

# checks for library functions
AC_CHECK_FUNCS(alarm bind_textdomain_codeset chown clock confstr ctermid \
 execv fork fpathconf ftime ftruncate \
 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
 getpriority getpwent getspnam getspent getsid getwd \
 kill killpg lchown lstat mkfifo mknod mktime \
 mremap nice pathconf pause plock poll pthread_init \
 putenv readlink realpath \
 select setegid seteuid setgid \
 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
 sigaction siginterrupt sigrelse strftime \
 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
 truncate uname unsetenv utimes waitpid wait3 wait4 wcscoll _getpty)

# For some functions, having a definition is not sufficient, since
# we want to take their address.
AC_MSG_CHECKING(for chroot)
AC_TRY_COMPILE([#include <unistd.h>], void *x=chroot,
  AC_DEFINE(HAVE_CHROOT, 1, Define if you have the 'chroot' function.)
  AC_MSG_RESULT(yes),
  AC_MSG_RESULT(no)
)
AC_MSG_CHECKING(for link)
AC_TRY_COMPILE([#include <unistd.h>], void *x=link,
  AC_DEFINE(HAVE_LINK, 1, Define if you have the 'link' function.)
  AC_MSG_RESULT(yes),
  AC_MSG_RESULT(no)
)
AC_MSG_CHECKING(for symlink)
AC_TRY_COMPILE([#include <unistd.h>], void *x=symlink,
  AC_DEFINE(HAVE_SYMLINK, 1, Define if you have the 'symlink' function.)
  AC_MSG_RESULT(yes),
  AC_MSG_RESULT(no)
)
AC_MSG_CHECKING(for fchdir)
AC_TRY_COMPILE([#include <unistd.h>], void *x=fchdir,
  AC_DEFINE(HAVE_FCHDIR, 1, Define if you have the 'fchdir' function.)
  AC_MSG_RESULT(yes),
  AC_MSG_RESULT(no)
)
AC_MSG_CHECKING(for fsync)
AC_TRY_COMPILE([#include <unistd.h>], void *x=fsync,
  AC_DEFINE(HAVE_FSYNC, 1, Define if you have the 'fsync' function.)
  AC_MSG_RESULT(yes),
  AC_MSG_RESULT(no)
)
AC_MSG_CHECKING(for fdatasync)
AC_TRY_COMPILE([#include <unistd.h>], void *x=fdatasync,
  AC_DEFINE(HAVE_FDATASYNC, 1, Define if you have the 'fdatasync' function.)
  AC_MSG_RESULT(yes),
  AC_MSG_RESULT(no)
)

# On some systems (eg. FreeBSD 5), we would find a definition of the
# functions ctermid_r, setgroups in the library, but no prototype
# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
# address to avoid compiler warnings and potential miscompilations
# because of the missing prototypes.

AC_MSG_CHECKING(for ctermid_r)
AC_TRY_COMPILE([
#include "confdefs.h" 
#include <stdio.h>
], void* p = ctermid_r,
  AC_DEFINE(HAVE_CTERMID_R, 1, Define if you have the 'ctermid_r' function.)
  AC_MSG_RESULT(yes),
  AC_MSG_RESULT(no)
)

AC_MSG_CHECKING(for flock)
AC_TRY_COMPILE([
#include "confdefs.h" 
#include <sys/file.h>
], void* p = flock,
  AC_DEFINE(HAVE_FLOCK, 1, Define if you have the 'flock' function.)
  AC_MSG_RESULT(yes),
  AC_MSG_RESULT(no)
)

AC_MSG_CHECKING(for getpagesize)
AC_TRY_COMPILE([
#include "confdefs.h" 
#include <unistd.h>
], void* p = getpagesize,
  AC_DEFINE(HAVE_GETPAGESIZE, 1, Define if you have the 'getpagesize' function.)
  AC_MSG_RESULT(yes),
  AC_MSG_RESULT(no)
)

dnl check for true
AC_CHECK_PROGS(TRUE, true, /bin/true)

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, [$ac_cv_prog_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),
  AC_MSG_RESULT(no)
)

AC_MSG_CHECKING(for inet_aton)
AC_TRY_LINK([
#include "confdefs.h" 
#include <sys/types.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),
  AC_MSG_RESULT(no)
)

AC_MSG_CHECKING(for inet_pton)
AC_TRY_COMPILE([
#include "confdefs.h" 
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
], void* p = inet_pton,
  AC_DEFINE(HAVE_INET_PTON, 1, Define if you have the 'inet_pton' function.)
  AC_MSG_RESULT(yes),
  AC_MSG_RESULT(no)
)

# On some systems, setgroups is in unistd.h, on others, in grp.h
AC_MSG_CHECKING(for setgroups)
AC_TRY_COMPILE([
#include "confdefs.h" 
#include <unistd.h>
#ifdef HAVE_GRP_H
#include <grp.h>
#endif
], 
void* p = setgroups,
  AC_DEFINE(HAVE_SETGROUPS, 1, Define if you have the 'setgroups' function.)
  AC_MSG_RESULT(yes),
  AC_MSG_RESULT(no)
)

# check for openpty and forkpty

AC_CHECK_FUNCS(openpty,, 
   AC_CHECK_LIB(util,openpty,
     [AC_DEFINE(HAVE_OPENPTY) LIBS="$LIBS -lutil"],
     AC_CHECK_LIB(bsd,openpty, [AC_DEFINE(HAVE_OPENPTY) LIBS="$LIBS -lbsd"])
   )
)
AC_CHECK_FUNCS(forkpty,, 
   AC_CHECK_LIB(util,forkpty, 
     [AC_DEFINE(HAVE_FORKPTY) LIBS="$LIBS -lutil"],
     AC_CHECK_LIB(bsd,forkpty, [AC_DEFINE(HAVE_FORKPTY) LIBS="$LIBS -lbsd"])
   )
)

# check for long file support functions
AC_CHECK_FUNCS(fseek64 fseeko fstatvfs ftell64 ftello statvfs)

AC_REPLACE_FUNCS(dup2 getcwd strdup strerror memmove)
AC_CHECK_FUNCS(getpgrp, 
  AC_TRY_COMPILE([#include <unistd.h>], 
   [getpgrp(0);], 
   AC_DEFINE(GETPGRP_HAVE_ARG, 1,
   [Define if getpgrp() must be called as getpgrp(0).])
 )
)
AC_CHECK_FUNCS(setpgrp,
  AC_TRY_COMPILE([#include <unistd.h>],
    [setpgrp(0,0);],
    AC_DEFINE(SETPGRP_HAVE_ARG, 1,
    [Define if setpgrp() must be called as setpgrp(0, 0).])
  )
)
AC_CHECK_FUNCS(gettimeofday, 
  AC_TRY_COMPILE([#include <sys/time.h>], 
    [gettimeofday((struct timeval*)0,(struct timezone*)0);], ,
    AC_DEFINE(GETTIMEOFDAY_NO_TZ, 1,
    [Define if gettimeofday() does not have second (timezone) argument
     This is the case on Motorola V4 (R40V4.2)])
  )
)

AC_MSG_CHECKING(for major, minor, and makedev)
AC_TRY_LINK([
#if defined(MAJOR_IN_MKDEV)
#include <sys/mkdev.h>
#elif defined(MAJOR_IN_SYSMACROS)
#include <sys/sysmacros.h>
#else
#include <sys/types.h>
#endif
],[
  makedev(major(0),minor(0));
],[
  AC_DEFINE(HAVE_DEVICE_MACROS, 1,
	    [Define to 1 if you have the device macros.])
  AC_MSG_RESULT(yes)
],[
  AC_MSG_RESULT(no)
])

# On OSF/1 V5.1, getaddrinfo is available, but a define
# for [no]getaddrinfo in netdb.h. 
AC_MSG_CHECKING(for getaddrinfo)
AC_TRY_LINK([
#include <sys/types.h>
#include <sys/socket.h>
#include <netdb.h>
#include <stdio.h>
],[
getaddrinfo(NULL, NULL, NULL, NULL);
], [
AC_MSG_RESULT(yes)
AC_MSG_CHECKING(getaddrinfo bug)
AC_TRY_RUN([
#include <sys/types.h>
#include <netdb.h>
#include <string.h>
#include <sys/socket.h>
#include <netinet/in.h>

main()
{
  int passive, gaierr, inet4 = 0, inet6 = 0;
  struct addrinfo hints, *ai, *aitop;
  char straddr[INET6_ADDRSTRLEN], strport[16];

  for (passive = 0; passive <= 1; passive++) {
    memset(&hints, 0, sizeof(hints));
    hints.ai_family = AF_UNSPEC;
    hints.ai_flags = passive ? AI_PASSIVE : 0;
    hints.ai_socktype = SOCK_STREAM;
    hints.ai_protocol = IPPROTO_TCP;
    if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
      (void)gai_strerror(gaierr);
      goto bad;
    }
    for (ai = aitop; ai; ai = ai->ai_next) {
      if (ai->ai_addr == NULL ||
          ai->ai_addrlen == 0 ||
          getnameinfo(ai->ai_addr, ai->ai_addrlen,
                      straddr, sizeof(straddr), strport, sizeof(strport),
                      NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
        goto bad;
      }
      switch (ai->ai_family) {
      case AF_INET:
        if (strcmp(strport, "54321") != 0) {
          goto bad;
        }
        if (passive) {
          if (strcmp(straddr, "0.0.0.0") != 0) {
            goto bad;
          }
        } else {
          if (strcmp(straddr, "127.0.0.1") != 0) {
            goto bad;
          }
        }
        inet4++;
        break;
      case AF_INET6:
        if (strcmp(strport, "54321") != 0) {
          goto bad;
        }
        if (passive) {
          if (strcmp(straddr, "::") != 0) {
            goto bad;
          }
        } else {
          if (strcmp(straddr, "::1") != 0) {
            goto bad;
          }
        }
        inet6++;
        break;
      case AF_UNSPEC:
        goto bad;
        break;
      default:
        /* another family support? */
        break;
      }
    }
  }

  if (!(inet4 == 0 || inet4 == 2))
    goto bad;
  if (!(inet6 == 0 || inet6 == 2))
    goto bad;

  if (aitop)
    freeaddrinfo(aitop);
  exit(0);

 bad:
  if (aitop)
    freeaddrinfo(aitop);
  exit(1);
}
],
AC_MSG_RESULT(good)
buggygetaddrinfo=no,
AC_MSG_RESULT(buggy)
buggygetaddrinfo=yes,
AC_MSG_RESULT(buggy)
buggygetaddrinfo=yes)], [
AC_MSG_RESULT(no)
buggygetaddrinfo=yes
])

if test "$buggygetaddrinfo" = "yes"; then
	if test "$ipv6" = "yes"; then
		echo 'Fatal: You must get working getaddrinfo() function.'
		echo '       or you can specify "--disable-ipv6"'.
		exit 1
	fi
else
	AC_DEFINE(HAVE_GETADDRINFO, 1, [Define if you have the getaddrinfo function.])
fi
AC_CHECK_FUNCS(getnameinfo)

# checks for structures
AC_HEADER_TIME
AC_STRUCT_TM
AC_STRUCT_TIMEZONE
AC_CHECK_MEMBERS([struct stat.st_rdev])
AC_CHECK_MEMBERS([struct stat.st_blksize])
AC_CHECK_MEMBERS([struct stat.st_flags])
AC_CHECK_MEMBERS([struct stat.st_gen])
AC_CHECK_MEMBERS([struct stat.st_birthtime])
AC_STRUCT_ST_BLOCKS

AC_MSG_CHECKING(for time.h that defines altzone)
AC_CACHE_VAL(ac_cv_header_time_altzone,
[AC_TRY_COMPILE([#include <time.h>], [return altzone;],
  ac_cv_header_time_altzone=yes,
  ac_cv_header_time_altzone=no)])
AC_MSG_RESULT($ac_cv_header_time_altzone)
if test $ac_cv_header_time_altzone = yes; then
  AC_DEFINE(HAVE_ALTZONE, 1, [Define this if your time.h defines altzone.])
fi

was_it_defined=no
AC_MSG_CHECKING(whether sys/select.h and sys/time.h may both be included)
AC_TRY_COMPILE([
#include <sys/types.h>
#include <sys/select.h>
#include <sys/time.h>
], [;], [
  AC_DEFINE(SYS_SELECT_WITH_SYS_TIME, 1,
  [Define if  you can safely include both <sys/select.h> and <sys/time.h>
   (which you can't on SCO ODT 3.0).]) 
  was_it_defined=yes
])
AC_MSG_RESULT($was_it_defined)

AC_MSG_CHECKING(for addrinfo)
AC_CACHE_VAL(ac_cv_struct_addrinfo,
AC_TRY_COMPILE([
#		include <netdb.h>],
	[struct addrinfo a],
	ac_cv_struct_addrinfo=yes,
	ac_cv_struct_addrinfo=no))
AC_MSG_RESULT($ac_cv_struct_addrinfo)
if test $ac_cv_struct_addrinfo = yes; then
	AC_DEFINE(HAVE_ADDRINFO, 1, [struct addrinfo (netdb.h)])
fi

AC_MSG_CHECKING(for sockaddr_storage)
AC_CACHE_VAL(ac_cv_struct_sockaddr_storage,
AC_TRY_COMPILE([
#		include <sys/types.h>
#		include <sys/socket.h>],
	[struct sockaddr_storage s],
	ac_cv_struct_sockaddr_storage=yes,
	ac_cv_struct_sockaddr_storage=no))
AC_MSG_RESULT($ac_cv_struct_sockaddr_storage)
if test $ac_cv_struct_sockaddr_storage = yes; then
	AC_DEFINE(HAVE_SOCKADDR_STORAGE, 1, [struct sockaddr_storage (sys/socket.h)])
fi

# checks for compiler characteristics

AC_C_CHAR_UNSIGNED
AC_C_CONST

works=no
AC_MSG_CHECKING(for working volatile)
AC_TRY_COMPILE([],[volatile int x; x = 0;], works=yes, 
  AC_DEFINE(volatile, [], [Define to empty if the keyword does not work.])
)
AC_MSG_RESULT($works)

works=no
AC_MSG_CHECKING(for working signed char)
AC_TRY_COMPILE([], [signed char c;], works=yes, 
  AC_DEFINE(signed, [], [Define to empty if the keyword does not work.])
)
AC_MSG_RESULT($works)

have_prototypes=no
AC_MSG_CHECKING(for prototypes)
AC_TRY_COMPILE([int foo(int x) { return 0; }], [return foo(10);],[
  AC_DEFINE(HAVE_PROTOTYPES, 1, 
   [Define if your compiler supports function prototype]) 
  have_prototypes=yes
])
AC_MSG_RESULT($have_prototypes)

works=no
AC_MSG_CHECKING(for variable length prototypes and stdarg.h)
AC_TRY_COMPILE([
#include <stdarg.h>
int foo(int x, ...) {
	va_list va;
	va_start(va, x);
	va_arg(va, int);
	va_arg(va, char *);
	va_arg(va, double);
	return 0;
}
], [return foo(10, "", 3.14);], [
  AC_DEFINE(HAVE_STDARG_PROTOTYPES, 1,
   [Define if your compiler supports variable length function prototypes
   (e.g. void fprintf(FILE *, char *, ...);) *and* <stdarg.h>]) 
  works=yes
])
AC_MSG_RESULT($works)

# check for socketpair
AC_MSG_CHECKING(for socketpair)
AC_TRY_COMPILE([
#include <sys/types.h>
#include <sys/socket.h>
], void *x=socketpair,
  AC_DEFINE(HAVE_SOCKETPAIR, 1, Define if you have the 'socketpair' function.)
  AC_MSG_RESULT(yes),
  AC_MSG_RESULT(no)
)

# check if sockaddr has sa_len member
AC_MSG_CHECKING(if sockaddr has sa_len member)
AC_TRY_COMPILE([#include <sys/types.h>
#include <sys/socket.h>],
[struct sockaddr x;
x.sa_len = 0;],
	AC_MSG_RESULT(yes)
	AC_DEFINE(HAVE_SOCKADDR_SA_LEN, 1, [Define if sockaddr has sa_len member]),
	AC_MSG_RESULT(no))

va_list_is_array=no
AC_MSG_CHECKING(whether va_list is an array)
AC_TRY_COMPILE([
#ifdef HAVE_STDARG_PROTOTYPES
#include <stdarg.h>
#else
#include <varargs.h>
#endif
], [va_list list1, list2; list1 = list2;], , [
 AC_DEFINE(VA_LIST_IS_ARRAY, 1, [Define if a va_list is an array of some kind]) 
 va_list_is_array=yes
])
AC_MSG_RESULT($va_list_is_array)

# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
AH_TEMPLATE(HAVE_GETHOSTBYNAME_R,
  [Define this if you have some version of gethostbyname_r()])

AC_CHECK_FUNC(gethostbyname_r, [
  AC_DEFINE(HAVE_GETHOSTBYNAME_R)
  AC_MSG_CHECKING([gethostbyname_r with 6 args])
  OLD_CFLAGS=$CFLAGS
  CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
  AC_TRY_COMPILE([
#   include <netdb.h>
  ], [
    char *name;
    struct hostent *he, *res;
    char buffer[2048];
    int buflen = 2048;
    int h_errnop;

    (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
  ], [
    AC_DEFINE(HAVE_GETHOSTBYNAME_R)
    AC_DEFINE(HAVE_GETHOSTBYNAME_R_6_ARG, 1,
    [Define this if you have the 6-arg version of gethostbyname_r().])
    AC_MSG_RESULT(yes)
  ], [
    AC_MSG_RESULT(no)
    AC_MSG_CHECKING([gethostbyname_r with 5 args])
    AC_TRY_COMPILE([
#     include <netdb.h>
    ], [
      char *name;
      struct hostent *he;
      char buffer[2048];
      int buflen = 2048;
      int h_errnop;

      (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
    ], [
      AC_DEFINE(HAVE_GETHOSTBYNAME_R)
      AC_DEFINE(HAVE_GETHOSTBYNAME_R_5_ARG, 1,
      [Define this if you have the 5-arg version of gethostbyname_r().])
      AC_MSG_RESULT(yes)
    ], [
      AC_MSG_RESULT(no)
      AC_MSG_CHECKING([gethostbyname_r with 3 args])
      AC_TRY_COMPILE([
#       include <netdb.h>
      ], [
        char *name;
        struct hostent *he;
        struct hostent_data data;

        (void) gethostbyname_r(name, he, &data);
      ], [
        AC_DEFINE(HAVE_GETHOSTBYNAME_R)
        AC_DEFINE(HAVE_GETHOSTBYNAME_R_3_ARG, 1,
        [Define this if you have the 3-arg version of gethostbyname_r().])
        AC_MSG_RESULT(yes)
      ], [
        AC_MSG_RESULT(no)
      ])
    ])
  ])
  CFLAGS=$OLD_CFLAGS
], [
  AC_CHECK_FUNCS(gethostbyname)
])
AC_SUBST(HAVE_GETHOSTBYNAME_R_6_ARG)
AC_SUBST(HAVE_GETHOSTBYNAME_R_5_ARG)
AC_SUBST(HAVE_GETHOSTBYNAME_R_3_ARG)
AC_SUBST(HAVE_GETHOSTBYNAME_R)
AC_SUBST(HAVE_GETHOSTBYNAME)

# checks for system services
# (none yet)

# Linux requires this for correct f.p. operations
AC_CHECK_FUNC(__fpu_control,
  [],
  [AC_CHECK_LIB(ieee, __fpu_control)
])

# Check for --with-fpectl
AC_MSG_CHECKING(for --with-fpectl)
AC_ARG_WITH(fpectl,
            AC_HELP_STRING(--with-fpectl, enable SIGFPE catching),
[
if test "$withval" != no
then 
  AC_DEFINE(WANT_SIGFPE_HANDLER, 1,
  [Define if you want SIGFPE handled (see Include/pyfpe.h).]) 
  AC_MSG_RESULT(yes)
else AC_MSG_RESULT(no)
fi],
[AC_MSG_RESULT(no)])

# check for --with-libm=...
AC_SUBST(LIBM)
case $ac_sys_system in
Darwin) ;;
BeOS) ;;
*) LIBM=-lm
esac
AC_MSG_CHECKING(for --with-libm=STRING)
AC_ARG_WITH(libm,
            AC_HELP_STRING(--with-libm=STRING, math library),
[
if test "$withval" = no
then LIBM=
     AC_MSG_RESULT(force LIBM empty)
elif test "$withval" != yes
then LIBM=$withval
     AC_MSG_RESULT(set LIBM="$withval")
else AC_MSG_ERROR([proper usage is --with-libm=STRING])
fi],
[AC_MSG_RESULT(default LIBM="$LIBM")])

# check for --with-libc=...
AC_SUBST(LIBC)
AC_MSG_CHECKING(for --with-libc=STRING)
AC_ARG_WITH(libc,
            AC_HELP_STRING(--with-libc=STRING, C library),
[
if test "$withval" = no
then LIBC=
     AC_MSG_RESULT(force LIBC empty)
elif test "$withval" != yes
then LIBC=$withval
     AC_MSG_RESULT(set LIBC="$withval")
else AC_MSG_ERROR([proper usage is --with-libc=STRING])
fi],
[AC_MSG_RESULT(default LIBC="$LIBC")])

# check for hypot() in math library
LIBS_SAVE=$LIBS
LIBS="$LIBS $LIBM"
AC_REPLACE_FUNCS(hypot)
LIBS=$LIBS_SAVE

# check for wchar.h
AC_CHECK_HEADER(wchar.h, [
  AC_DEFINE(HAVE_WCHAR_H, 1, 
  [Define if the compiler provides a wchar.h header file.]) 
  wchar_h="yes"
],
wchar_h="no"
)

# determine wchar_t size
if test "$wchar_h" = yes
then
  AC_CHECK_SIZEOF(wchar_t, 4, [#include <wchar.h>])
fi

AC_MSG_CHECKING(for UCS-4 tcl)
have_ucs4_tcl=no
AC_TRY_COMPILE([
#include <tcl.h>
#if TCL_UTF_MAX != 6
# error "NOT UCS4_TCL"
#endif], [], [
  AC_DEFINE(HAVE_UCS4_TCL, 1, [Define this if you have tcl and TCL_UTF_MAX==6])
  have_ucs4_tcl=yes
])
AC_MSG_RESULT($have_ucs4_tcl)

# check whether wchar_t is signed or not
if test "$wchar_h" = yes
then
  # check whether wchar_t is signed or not
  AC_MSG_CHECKING(whether wchar_t is signed)
  AC_CACHE_VAL(ac_cv_wchar_t_signed, [
  AC_TRY_RUN([
  #include <wchar.h>
  int main()
  {
        exit((((wchar_t) -1) < ((wchar_t) 0)) ? 1 : 0);
  }
  ],
  ac_cv_wchar_t_signed=yes,
  ac_cv_wchar_t_signed=no,
  ac_cv_wchar_t_signed=yes)])
  AC_MSG_RESULT($ac_cv_wchar_t_signed)
fi
  
AC_MSG_CHECKING(what type to use for unicode)
dnl quadrigraphs "@<:@" and "@:>@" produce "[" and "]" in the output
AC_ARG_ENABLE(unicode, 
              AC_HELP_STRING(--enable-unicode@<:@=ucs@<:@24@:>@@:>@, Enable Unicode strings (default is yes)),
              [],
              [enable_unicode=yes])

if test $enable_unicode = yes
then
  # Without any arguments, Py_UNICODE defaults to two-byte mode
  case "$have_ucs4_tcl" in
  yes) enable_unicode="ucs4"
       ;;
  *)   enable_unicode="ucs2"
       ;;
  esac
fi

AH_TEMPLATE(Py_UNICODE_SIZE,
  [Define as the size of the unicode type.])
case "$enable_unicode" in
ucs2) unicode_size="2"
      AC_DEFINE(Py_UNICODE_SIZE,2)
      ;;
ucs4) unicode_size="4"
      AC_DEFINE(Py_UNICODE_SIZE,4)
      ;;
esac

AH_TEMPLATE(PY_UNICODE_TYPE,
  [Define as the integral type used for Unicode representation.])

AC_SUBST(UNICODE_OBJS)
if test "$enable_unicode" = "no"
then
  UNICODE_OBJS=""
  AC_MSG_RESULT(not used)
else
  UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
  AC_DEFINE(Py_USING_UNICODE, 1,
  [Define if you want to have a Unicode type.])

  # wchar_t is only usable if it maps to an unsigned type
  if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
          -a "$ac_cv_wchar_t_signed" = "no"
  then
    PY_UNICODE_TYPE="wchar_t"
    AC_DEFINE(HAVE_USABLE_WCHAR_T, 1,
    [Define if you have a useable wchar_t type defined in wchar.h; useable
     means wchar_t must be an unsigned type with at least 16 bits. (see
     Include/unicodeobject.h).])
    AC_DEFINE(PY_UNICODE_TYPE,wchar_t)
  elif test "$ac_cv_sizeof_short" = "$unicode_size"
  then
       PY_UNICODE_TYPE="unsigned short"
       AC_DEFINE(PY_UNICODE_TYPE,unsigned short)
  elif test "$ac_cv_sizeof_long" = "$unicode_size"
  then
       PY_UNICODE_TYPE="unsigned long"
       AC_DEFINE(PY_UNICODE_TYPE,unsigned long)
  else
       PY_UNICODE_TYPE="no type found"
  fi
  AC_MSG_RESULT($PY_UNICODE_TYPE)
fi

# check for endianness
AC_C_BIGENDIAN

# Check whether right shifting a negative integer extends the sign bit
# or fills with zeros (like the Cray J90, according to Tim Peters).
AC_MSG_CHECKING(whether right shift extends the sign bit)
AC_CACHE_VAL(ac_cv_rshift_extends_sign, [
AC_TRY_RUN([
int main()
{
	exit(((-1)>>3 == -1) ? 0 : 1);
}
],
ac_cv_rshift_extends_sign=yes,
ac_cv_rshift_extends_sign=no,
ac_cv_rshift_extends_sign=yes)])
AC_MSG_RESULT($ac_cv_rshift_extends_sign)
if test "$ac_cv_rshift_extends_sign" = no
then
  AC_DEFINE(SIGNED_RIGHT_SHIFT_ZERO_FILLS, 1,
  [Define if i>>j for signed int i does not extend the sign bit
   when i < 0])
fi

# check for getc_unlocked and related locking functions
AC_MSG_CHECKING(for getc_unlocked() and friends)
AC_CACHE_VAL(ac_cv_have_getc_unlocked, [
AC_TRY_LINK([#include <stdio.h>],[
	FILE *f = fopen("/dev/null", "r");
	flockfile(f);
	getc_unlocked(f);
	funlockfile(f);
], ac_cv_have_getc_unlocked=yes, ac_cv_have_getc_unlocked=no)])
AC_MSG_RESULT($ac_cv_have_getc_unlocked)
if test "$ac_cv_have_getc_unlocked" = yes
then
  AC_DEFINE(HAVE_GETC_UNLOCKED, 1,
  [Define this if you have flockfile(), getc_unlocked(), and funlockfile()])
fi

# check where readline lives
# save the value of LIBS so we don't actually link Python with readline
LIBS_no_readline=$LIBS
AC_CHECK_LIB(readline, readline)
if test "$ac_cv_have_readline_readline" = no
then
  AC_CHECK_LIB(termcap, readline)
fi

# check for readline 2.1
AC_CHECK_LIB(readline, rl_callback_handler_install,
	AC_DEFINE(HAVE_RL_CALLBACK, 1,
        [Define if you have readline 2.1]), , )

# check for readline 2.2
AC_TRY_CPP([#include <readline/readline.h>],
have_readline=yes, have_readline=no)
if test $have_readline = yes
then
  AC_EGREP_HEADER([extern int rl_completion_append_character;],
  [readline/readline.h],
  AC_DEFINE(HAVE_RL_COMPLETION_APPEND_CHARACTER, 1,
  [Define if you have readline 2.2]), )
fi

# check for readline 4.0
AC_CHECK_LIB(readline, rl_pre_input_hook,
	AC_DEFINE(HAVE_RL_PRE_INPUT_HOOK, 1,
        [Define if you have readline 4.0]), , )

# check for readline 4.2
AC_CHECK_LIB(readline, rl_completion_matches,
	AC_DEFINE(HAVE_RL_COMPLETION_MATCHES, 1,
        [Define if you have readline 4.2]), , )

# also in readline 4.2
AC_TRY_CPP([#include <readline/readline.h>],
have_readline=yes, have_readline=no)
if test $have_readline = yes
then
  AC_EGREP_HEADER([extern int rl_catch_signals;],
  [readline/readline.h],
  AC_DEFINE(HAVE_RL_CATCH_SIGNAL, 1,
  [Define if you can turn off readline's signal handling.]), )
fi

# End of readline checks: restore LIBS
LIBS=$LIBS_no_readline

AC_MSG_CHECKING(for broken nice())
AC_CACHE_VAL(ac_cv_broken_nice, [
AC_TRY_RUN([
int main()
{
	int val1 = nice(1);
	if (val1 != -1 && val1 == nice(2))
		exit(0);
	exit(1);
}
],
ac_cv_broken_nice=yes,
ac_cv_broken_nice=no,
ac_cv_broken_nice=no)])
AC_MSG_RESULT($ac_cv_broken_nice)
if test "$ac_cv_broken_nice" = yes
then
  AC_DEFINE(HAVE_BROKEN_NICE, 1,
  [Define if nice() returns success/failure instead of the new priority.])
fi

AC_MSG_CHECKING(for broken poll())
AC_TRY_RUN([
#include <poll.h>

int main (void)
    {
    struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
    
    close (42);

    int poll_test = poll (&poll_struct, 1, 0);

    if (poll_test < 0)
        {
        exit(0);
        }
    else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
        {
        exit(0);
        }
    else
        {
        exit(1);
        }
    }
],
ac_cv_broken_poll=yes,
ac_cv_broken_poll=no,
ac_cv_broken_poll=no)
AC_MSG_RESULT($ac_cv_broken_poll)
if test "$ac_cv_broken_poll" = yes
then
  AC_DEFINE(HAVE_BROKEN_POLL, 1,
      [Define if poll() sets errno on invalid file descriptors.])
fi

# Before we can test tzset, we need to check if struct tm has a tm_zone 
# (which is not required by ISO C or UNIX spec) and/or if we support
# tzname[]
AC_STRUCT_TIMEZONE

# check tzset(3) exists and works like we expect it to
AC_MSG_CHECKING(for working tzset())
AC_CACHE_VAL(ac_cv_working_tzset, [
AC_TRY_RUN([
#include <stdlib.h>
#include <time.h>
#include <string.h>

#if HAVE_TZNAME
extern char *tzname[];
#endif

int main()
{
	/* Note that we need to ensure that not only does tzset(3)
	   do 'something' with localtime, but it works as documented
	   in the library reference and as expected by the test suite.
	   This includes making sure that tzname is set properly if
	   tm->tm_zone does not exist since it is the alternative way
	   of getting timezone info.

	   Red Hat 6.2 doesn't understand the southern hemisphere 
	   after New Year's Day.
	*/

	time_t groundhogday = 1044144000; /* GMT-based */
	time_t midyear = groundhogday + (365 * 24 * 3600 / 2);

	putenv("TZ=UTC+0");
	tzset();
	if (localtime(&groundhogday)->tm_hour != 0)
	    exit(1);
#if HAVE_TZNAME
	/* For UTC, tzname[1] is sometimes "", sometimes "   " */
	if (strcmp(tzname[0], "UTC") || 
		(tzname[1][0] != 0 && tzname[1][0] != ' '))
	    exit(1);
#endif

	putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
	tzset();
	if (localtime(&groundhogday)->tm_hour != 19)
	    exit(1);
#if HAVE_TZNAME
	if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
	    exit(1);
#endif

	putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
	tzset();
	if (localtime(&groundhogday)->tm_hour != 11)
	    exit(1);
#if HAVE_TZNAME
	if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
	    exit(1);
#endif

#if HAVE_STRUCT_TM_TM_ZONE
	if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
	    exit(1);
	if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
	    exit(1);
#endif

	exit(0);
}
],
ac_cv_working_tzset=yes,
ac_cv_working_tzset=no,
ac_cv_working_tzset=no)])
AC_MSG_RESULT($ac_cv_working_tzset)
if test "$ac_cv_working_tzset" = yes
then
  AC_DEFINE(HAVE_WORKING_TZSET, 1,
  [Define if tzset() actually switches the local timezone in a meaningful way.])
fi

# Look for subsecond timestamps in struct stat
AC_MSG_CHECKING(for tv_nsec in struct stat)
AC_CACHE_VAL(ac_cv_stat_tv_nsec,
AC_TRY_COMPILE([#include <sys/stat.h>], [
struct stat st;
st.st_mtim.tv_nsec = 1;
],
ac_cv_stat_tv_nsec=yes,
ac_cv_stat_tv_nsec=no,
ac_cv_stat_tv_nsec=no))
AC_MSG_RESULT($ac_cv_stat_tv_nsec)
if test "$ac_cv_stat_tv_nsec" = yes
then
  AC_DEFINE(HAVE_STAT_TV_NSEC, 1,
  [Define if you have struct stat.st_mtim.tv_nsec])
fi

# Look for BSD style subsecond timestamps in struct stat
AC_MSG_CHECKING(for tv_nsec2 in struct stat)
AC_CACHE_VAL(ac_cv_stat_tv_nsec2,
AC_TRY_COMPILE([#include <sys/stat.h>], [
struct stat st;
st.st_mtimespec.tv_nsec = 1;
],
ac_cv_stat_tv_nsec2=yes,
ac_cv_stat_tv_nsec2=no,
ac_cv_stat_tv_nsec2=no))
AC_MSG_RESULT($ac_cv_stat_tv_nsec2)
if test "$ac_cv_stat_tv_nsec2" = yes
then
  AC_DEFINE(HAVE_STAT_TV_NSEC2, 1,
  [Define if you have struct stat.st_mtimensec])
fi

# On HP/UX 11.0, mvwdelch is a block with a return statement
AC_MSG_CHECKING(whether mvwdelch is an expression)
AC_CACHE_VAL(ac_cv_mvwdelch_is_expression,
AC_TRY_COMPILE([#include <curses.h>], [
  int rtn;
  rtn = mvwdelch(0,0,0);
], ac_cv_mvwdelch_is_expression=yes,
   ac_cv_mvwdelch_is_expression=no,
   ac_cv_mvwdelch_is_expression=yes))
AC_MSG_RESULT($ac_cv_mvwdelch_is_expression)

if test "$ac_cv_mvwdelch_is_expression" = yes
then
  AC_DEFINE(MVWDELCH_IS_EXPRESSION, 1,
  [Define if mvwdelch in curses.h is an expression.])
fi

AC_MSG_CHECKING(whether WINDOW has _flags)
AC_CACHE_VAL(ac_cv_window_has_flags,
AC_TRY_COMPILE([#include <curses.h>], [
  WINDOW *w;
  w->_flags = 0;
], ac_cv_window_has_flags=yes,
   ac_cv_window_has_flags=no,
   ac_cv_window_has_flags=no))
AC_MSG_RESULT($ac_cv_window_has_flags)


if test "$ac_cv_window_has_flags" = yes
then
  AC_DEFINE(WINDOW_HAS_FLAGS, 1, 
  [Define if WINDOW in curses.h offers a field _flags.])
fi

AC_MSG_CHECKING(for /dev/ptmx)

if test -e /dev/ptmx
then
  AC_MSG_RESULT(yes)
  AC_DEFINE(HAVE_DEV_PTMX, 1,
  [Define if we have /dev/ptmx.])
else
  AC_MSG_RESULT(no)
fi

AC_MSG_CHECKING(for /dev/ptc)

if test -e /dev/ptc
then
  AC_MSG_RESULT(yes)
  AC_DEFINE(HAVE_DEV_PTC, 1,
  [Define if we have /dev/ptc.])
else
  AC_MSG_RESULT(no)
fi

AC_CHECK_TYPE(socklen_t,,
  AC_DEFINE(socklen_t,int,
            Define to `int' if <sys/socket.h> does not define.),[
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
])

AC_SUBST(THREADHEADERS)

for h in `(cd $srcdir;echo Python/thread_*.h)`
do
  THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
done

AC_SUBST(SRCDIRS)
SRCDIRS="Parser Grammar Objects Python Modules Mac"
AC_MSG_CHECKING(for build directories)
for dir in $SRCDIRS; do
    if test ! -d $dir; then
        mkdir $dir
    fi
done
AC_MSG_RESULT(done)

# generate output files
AC_CONFIG_FILES(Makefile.pre Modules/Setup.config)
AC_OUTPUT

echo "creating Setup"
if test ! -f Modules/Setup
then
	cp $srcdir/Modules/Setup.dist Modules/Setup
fi

echo "creating Setup.local"
if test ! -f Modules/Setup.local
then
	echo "# Edit this file for local setup changes" >Modules/Setup.local
fi

echo "creating Makefile"
$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
			-s Modules Modules/Setup.config \
			Modules/Setup.local Modules/Setup
mv config.c Modules
