dnl ***********************************************
dnl * Please run autoreconf to test your changes! *
dnl ***********************************************
dnl NOTE: autoconf 2.64 doesn't seem to work (use 2.61).

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

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

dnl Ensure that if prefix is specified, it does not end in a slash. If
dnl it does, we get path names containing '//' which is both ugly and
dnl can cause trouble.

dnl Last slash shouldn't be stripped if prefix=/
if test "$prefix" != "/"; then
    prefix=`echo "$prefix" | sed -e 's/\/$//g'`
fi    

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])

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


define_xopen_source=yes

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

AC_ARG_ENABLE(universalsdk,
	AC_HELP_STRING(--enable-universalsdk@<:@=SDKDIR@:>@, Build against Mac OS X 10.4u SDK (ppc/i386)),
[
	case $enableval in
	yes)
		enableval=/Developer/SDKs/MacOSX10.4u.sdk
		;;
	esac
	case $enableval in
	no)
		UNIVERSALSDK=
		enable_universalsdk=
		;;
	*)
		UNIVERSALSDK=$enableval
		;;
	esac
],[
   	UNIVERSALSDK=
	enable_universalsdk=
])
AC_SUBST(UNIVERSALSDK)

ARCH_RUN_32BIT=
AC_SUBST(ARCH_RUN_32BIT)

UNIVERSAL_ARCHS="32-bit"
AC_MSG_CHECKING(for --with-universal-archs)
AC_ARG_WITH(universal-archs,
    AC_HELP_STRING(--with-universal-archs=ARCH, select architectures for universal build ("32-bit", "64-bit" or "all")),
[
	AC_MSG_RESULT($withval)
	UNIVERSAL_ARCHS="$withval"
],
[
 	AC_MSG_RESULT(32-bit)
])



AC_ARG_WITH(framework-name,
              AC_HELP_STRING(--with-framework-name=FRAMEWORK, 
                             specify an alternate name of the framework built with --enable-framework),
[
    PYTHONFRAMEWORK=${withval}
    PYTHONFRAMEWORKDIR=${withval}.framework
    PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr '[A-Z]' '[a-z]'`
    ],[
    PYTHONFRAMEWORK=Python
    PYTHONFRAMEWORKDIR=Python.framework
    PYTHONFRAMEWORKIDENTIFIER=org.python.python
])
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=
		FRAMEWORKINSTALLFIRST=
		FRAMEWORKINSTALLLAST=
		FRAMEWORKALTINSTALLFIRST=
		FRAMEWORKALTINSTALLLAST=
		if test "x${prefix}" = "xNONE"; then
			FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
		else
			FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
		fi
		enable_framework=
		;;
	*)
		PYTHONFRAMEWORKPREFIX=$enableval
		PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
		FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
		FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure bininstall maninstall"
		if test "$UNIVERSAL_ARCHS" = "all"
		then
			FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps4way frameworkinstallunixtools4way"
			FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps4way frameworkaltinstallunixtools4way"
		else
			FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
			FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
		fi

		if test "x${prefix}" = "xNONE" ; then
			FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
		else
			FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
		fi
		prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION

		# Add files for Mac specific code to the list of output
		# files:
		AC_CONFIG_FILES(Mac/Makefile)
		AC_CONFIG_FILES(Mac/PythonLauncher/Makefile)
		AC_CONFIG_FILES(Mac/IDLE/Makefile)
		AC_CONFIG_FILES(Mac/Resources/framework/Info.plist)
		AC_CONFIG_FILES(Mac/Resources/app/Info.plist)
	esac
	],[
	PYTHONFRAMEWORK=
	PYTHONFRAMEWORKDIR=no-framework
	PYTHONFRAMEWORKPREFIX=
	PYTHONFRAMEWORKINSTALLDIR=
	FRAMEWORKINSTALLFIRST=
	FRAMEWORKINSTALLLAST=
	FRAMEWORKALTINSTALLFIRST=
	FRAMEWORKALTINSTALLLAST=
	if test "x${prefix}" = "xNONE" ; then
		FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
	else
		FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
	fi
	enable_framework=

	if test "$UNIVERSAL_ARCHS" = "all" 
	then
		FRAMEWORKINSTALLLAST=update4wayuniversal
		FRAMEWORKALTINSTALLLAST=update4wayuniversal
	fi
])
AC_SUBST(PYTHONFRAMEWORK)
AC_SUBST(PYTHONFRAMEWORKIDENTIFIER)
AC_SUBST(PYTHONFRAMEWORKDIR)
AC_SUBST(PYTHONFRAMEWORKPREFIX)
AC_SUBST(PYTHONFRAMEWORKINSTALLDIR)
AC_SUBST(FRAMEWORKINSTALLFIRST)
AC_SUBST(FRAMEWORKINSTALLLAST)
AC_SUBST(FRAMEWORKALTINSTALLFIRST)
AC_SUBST(FRAMEWORKALTINSTALLLAST)
AC_SUBST(FRAMEWORKUNIXTOOLSPREFIX)

##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.@<:@0123456789@:>@ | OpenBSD/4.@<:@0123@:>@) 
    define_xopen_source=no
    # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
    # also defined. This can be overridden by defining _BSD_SOURCE
    # As this has a different meaning on Linux, only define it on OpenBSD
    AC_DEFINE(_BSD_SOURCE, 1, [Define on OpenBSD to activate all library features])
    ;;
  # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
  # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
  # Marc Recht
  NetBSD/1.5 | NetBSD/1.5.* | NetBSD/1.6 | NetBSD/1.6.* | NetBSD/1.6@<:@A-S@:>@)
    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, the math functions C89 does not cover are never defined
  # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
  FreeBSD/4.*)
    define_xopen_source=no;;
  # On 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.*
  # 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 defining them
  Darwin/@<:@6789@:>@.*)
    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 QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
  # defining NI_NUMERICHOST.
  QNX/6.3.2)
    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)
AC_SUBST(EXPORT_MACOSX_DEPLOYMENT_TARGET)
CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
EXPORT_MACOSX_DEPLOYMENT_TARGET='#'

AC_MSG_CHECKING(machine type as reported by uname -m)
ac_sys_machine=`uname -m`
AC_MSG_RESULT($ac_sys_machine)

# 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:-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)

# 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

AC_SUBST(CXX)
AC_SUBST(MAINCC)
AC_MSG_CHECKING(for --with-cxx-main=<compiler>)
AC_ARG_WITH(cxx_main,
            AC_HELP_STRING([--with-cxx-main=<compiler>],
                           [compile main() and link python executable with C++ compiler]),
[
	
	case $withval in
	no)	with_cxx_main=no
		MAINCC='$(CC)';;
	yes)	with_cxx_main=yes
		MAINCC='$(CXX)';;
	*)	with_cxx_main=yes
		MAINCC=$withval
		if test -z "$CXX"
		then
			CXX=$withval
		fi;;
	esac], [
	with_cxx_main=no
	MAINCC='$(CC)'
])
AC_MSG_RESULT($with_cxx_main)

preset_cxx="$CXX"
if test -z "$CXX"
then
        case "$CC" in
        gcc)    AC_PATH_PROG(CXX, [g++], [g++], [notfound]) ;;
        cc)     AC_PATH_PROG(CXX, [c++], [c++], [notfound]) ;;
        esac
	if test "$CXX" = "notfound"
	then
		CXX=""
	fi
fi
if test -z "$CXX"
then
	AC_CHECK_PROGS(CXX, $CCC c++ g++ gcc CC cxx cc++ cl, notfound)
	if test "$CXX" = "notfound"
	then
		CXX=""
	fi
fi
if test "$preset_cxx" != "$CXX"
then
        AC_MSG_WARN([

  By default, distutils will build C++ extension modules with "$CXX".
  If this is not intended, then set CXX on the configure command line.
  ])
fi


# checks for UNIX variants that set C preprocessor variables
AC_AIX

# Check for unsupported systems
case $ac_sys_system/$ac_sys_release in
atheos*|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
	LINKCC='$(PURIFY) $(MAINCC)'
	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";;
	QNX*)
	   # qcc must be used because the other compilers do not
	   # support -N.
	   LINKCC=qcc;;
	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*)
	  case `uname -m` in
		ia64)
			LDLIBRARY='libpython$(VERSION).so'
			;;
		*)
			LDLIBRARY='libpython$(VERSION).sl'
			;;
	  esac
	  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}
	  ;;
    Darwin*)
    	LDLIBRARY='libpython$(VERSION).dylib'
	BLDLIBRARY='-L. -lpython$(VERSION)'
	RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
	;;

  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)
        if test "$CC" != 'g++' ; then
	    STRICT_PROTO="-Wstrict-prototypes"
	fi
        # For gcc 4.x we need to use -fwrapv so lets check if its supported
        if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
           WRAP="-fwrapv"
        fi
	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 $STRICT_PROTO"
	    else
		OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
	    fi
	    ;;
	*)
	    OPT="-O3 -Wall $STRICT_PROTO"
	    ;;
	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)

# The -arch flags for universal builds on OSX
UNIVERSAL_ARCH_FLAGS=
AC_SUBST(UNIVERSAL_ARCH_FLAGS)

# 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

    # if using gcc on alpha, use -mieee to get (near) full IEEE 754
    # support.  Without this, treatment of subnormals doesn't follow
    # the standard.
    case $ac_sys_machine in
         alpha*)
                BASECFLAGS="$BASECFLAGS -mieee"
                ;;
    esac

    case $ac_sys_system in
	SCO_SV*)
	    BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
	    ;;
	# is there any other compiler on Darwin besides gcc?
	Darwin*)
	    # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
	    # used to be here, but non-Apple gcc doesn't accept them.


	    if test "${enable_universalsdk}"; then
		UNIVERSAL_ARCH_FLAGS=""
	        if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
		   UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
		   ARCH_RUN_32BIT=""

	         elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
		   UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"

	         elif test "$UNIVERSAL_ARCHS" = "all" ; then
		   UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
		   ARCH_RUN_32BIT="arch -i386 -ppc"

		 else
	           AC_MSG_ERROR([proper usage is --with-universalarch=32-bit|64-bit|all])

		 fi


		BASECFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${BASECFLAGS}"
		tgt=`sw_vers -productVersion | sed 's/\(10\.[[0-9]]*\).*/\1/'`
		if test "${UNIVERSALSDK}" != "/" -a "${tgt}" '>' '10.4' ; then
			CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
		fi
	    fi

	    # Calculate the right deployment target for this build.
	    #
	    cur_target=`sw_vers -productVersion | sed 's/\(10\.[[0-9]]*\).*/\1/'`
	    if test ${cur_target} '>' 10.2; then
		    cur_target=10.3
	    fi
	    if test "${UNIVERSAL_ARCHS}" = "all"; then
		    # Ensure that the default platform for a 4-way
		    # universal build is OSX 10.5, that's the first
		    # OS release where 4-way builds make sense.
		    cur_target='10.5'
	    fi
	    CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
	    
	    # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the 
	    # environment with a value that is the same as what we'll use
	    # in the Makefile to ensure that we'll get the same compiler
	    # environment during configure and build time.
	    MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
	    export MACOSX_DEPLOYMENT_TARGET
	    EXPORT_MACOSX_DEPLOYMENT_TARGET=''

	    ;;
	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

# Check whether GCC supports PyArg_ParseTuple format
if test "$GCC" = "yes"
then
  AC_MSG_CHECKING(whether gcc supports ParseTuple __format__)
  save_CFLAGS=$CFLAGS
  CFLAGS="$CFLAGS -Werror"
  AC_TRY_COMPILE([
    void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
  ],,
  AC_DEFINE(HAVE_ATTRIBUTE_FORMAT_PARSETUPLE, 1, [Define if GCC supports __attribute__((format(PyArg_ParseTuple, 2, 3)))])
  AC_MSG_RESULT(yes),
  AC_MSG_RESULT(no)
  )
  CFLAGS=$save_CFLAGS
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 conio.h curses.h direct.h dlfcn.h errno.h \
fcntl.h grp.h \
ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
shadow.h signal.h stdint.h stropts.h termios.h thread.h \
unistd.h utime.h \
sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.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/statvfs.h sys/stat.h \
sys/termio.h sys/time.h \
sys/times.h sys/types.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 linux/tipc.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_TYPE_UINT32_T
AC_TYPE_UINT64_T
AC_TYPE_INT32_T
AC_TYPE_INT64_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_CHECK_SIZEOF(pid_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 long double support)
have_long_double=no
AC_TRY_COMPILE([], [long double x; x = (long double)0.;], [
  AC_DEFINE(HAVE_LONG_DOUBLE, 1, [Define this if you have the type long double.])
  have_long_double=yes
])
AC_MSG_RESULT($have_long_double)
if test "$have_long_double" = yes ; then
AC_CHECK_SIZEOF(long double, 12)
fi

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

AC_CHECK_TYPES(uintptr_t, 
   [AC_CHECK_SIZEOF(uintptr_t, 4)], 
   [], [#ifdef HAVE_STDINT_H
        #include <stdint.h>
        #endif])


# 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/@<:@01567@:>@\..*) 
    OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
    ;;
  Darwin/*)
    OTHER_LIBTOOL_OPT=""
    ;;
esac

AC_SUBST(LIBTOOL_CRUFT)
case $ac_sys_system/$ac_sys_release in
  Darwin/@<:@01567@:>@\..*) 
    LIBTOOL_CRUFT="-framework System -lcc_dynamic"
    if test "${enable_universalsdk}"; then
	    :
    else
	LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `arch`"
    fi
    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*)
		case `uname -m` in
			ia64) SO=.so;;
	  		*)    SO=.sl;;
		esac
		;;
	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)

AC_DEFINE_UNQUOTED(SHLIB_EXT, "$SO", [Define this to be extension of shared libraries (including the dot!).])
# 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*)
		if test "$GCC" = "yes"
		then LDSHARED='$(CC) -shared'
		else LDSHARED='ld -b';
		fi ;;
	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

		if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
		then
			if test "${enable_universalsdk}"; then
				LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
			fi
			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*|QNX*) LDSHARED='$(CC) -shared';;
	BSD/OS*/4*) LDSHARED="gcc -shared";;
	FreeBSD*)
		if [[ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]]
		then
			LDSHARED="$CC -shared ${LDFLAGS}"
		else
			LDSHARED="ld -Bshareable ${LDFLAGS}"
		fi;;
	OpenBSD*)
		if [[ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]]
		then
				LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
		else
				case `uname -r` in
				[[01]].* | 2.[[0-7]] | 2.[[0-7]].*)
				   LDSHARED="ld -Bshareable ${LDFLAGS}"
				   ;;
				*)
				   LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
				   ;;
				esac
		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";
		elif test `uname -p` = sparc;
		then CCSHARED="-xcode=pic32";
		else CCSHARED="-Kpic";
		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;;
	QNX*)
		# -Wl,-E causes the symbols to be added to the dynamic
		# symbol table so that they can be found when a module
		# is loaded.  -N 2048K causes the stack size to be set
		# to 2048 kilobytes so that the stack doesn't overflow
		# when running test_compile.py.
		LINKFORSHARED='-Wl,-E -N 2048K';;
	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_init 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)])

# Check for use of the system libffi library
AC_MSG_CHECKING(for --with-system-ffi)
AC_ARG_WITH(system_ffi,
            AC_HELP_STRING(--with-system-ffi, build _ctypes module using an installed ffi library))

AC_MSG_RESULT($with_system_ffi)

# 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)
		       ;;
      AIX/5) 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

AC_MSG_CHECKING(for OSX 10.5 SDK or later)
AC_TRY_COMPILE([#include <Carbon/Carbon.h>], FSIORefNum fRef = 0,
  AC_DEFINE(HAVE_OSX105_SDK, 1, Define if compiling using MacOS X 10.5 SDK or later.)
  AC_MSG_RESULT(yes),
  AC_MSG_RESULT(no)
)

# 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";;
	# Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
	Darwin/@<:@0156@:>@\..*) 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 setitimer getitimer bind_textdomain_codeset chown \
 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
 getpriority getpwent getspnam getspent getsid getwd \
 kill killpg lchmod lchown lstat mkfifo mknod mktime \
 mremap nice pathconf pause plock poll pthread_init \
 putenv readlink realpath \
 select sem_open sem_timedwait sem_getvalue sem_unlink 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)
)
AC_MSG_CHECKING(for epoll)
AC_TRY_COMPILE([#include <sys/epoll.h>], void *x=epoll_create,
  AC_DEFINE(HAVE_EPOLL, 1, Define if you have the 'epoll' functions.)
  AC_MSG_RESULT(yes),
  AC_MSG_RESULT(no)
)
AC_MSG_CHECKING(for kqueue)
AC_TRY_COMPILE([
#include <sys/types.h>
#include <sys/event.h>
    ], int x=kqueue(),
  AC_DEFINE(HAVE_KQUEUE, 1, Define if you have the 'kqueue' functions.)
  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)
)

# On Tru64, chflags seems to be present, but calling it will
# exit Python
AC_MSG_CHECKING(for chflags)
AC_TRY_RUN([
#include <sys/stat.h>
#include <unistd.h>
int main(int argc, char*argv[])
{
  if(chflags(argv[0], 0) != 0)
    return 1;
  return 0;
}
],AC_DEFINE(HAVE_CHFLAGS, 1, Define to 1 if you have the `chflags' function.)
  AC_MSG_RESULT(yes),
  AC_MSG_RESULT(no)
)

AC_MSG_CHECKING(for lchflags)
AC_TRY_RUN([
#include <sys/stat.h>
#include <unistd.h>
int main(int argc, char*argv[])
{
  if(lchflags(argv[0], 0) != 0)
    return 1;
  return 0;
}
],AC_DEFINE(HAVE_LCHFLAGS, 1, Define to 1 if you have the `lchflags' function.)
  AC_MSG_RESULT(yes),
  AC_MSG_RESULT(no)
)

dnl Check if system zlib has *Copy() functions
dnl
dnl On MacOSX the linker will search for dylibs on the entire linker path
dnl before searching for static libraries. setup.py adds -Wl,-search_paths_first
dnl to revert to a more traditional unix behaviour and make it possible to
dnl override the system libz with a local static library of libz. Temporarily
dnl add that flag to our CFLAGS as well to ensure that we check the version
dnl of libz that will be used by setup.py. 
dnl The -L/usr/local/lib is needed as wel to get the same compilation 
dnl environment as setup.py (and leaving it out can cause configure to use the
dnl wrong version of the library)
case $ac_sys_system/$ac_sys_release in
Darwin/*) 
	_CUR_CFLAGS="${CFLAGS}"
	_CUR_LDFLAGS="${LDFLAGS}"
	CFLAGS="${CFLAGS} -Wl,-search_paths_first"
	LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
	;;
esac

AC_CHECK_LIB(z, inflateCopy, AC_DEFINE(HAVE_ZLIB_COPY, 1, Define if the zlib library has inflateCopy))

case $ac_sys_system/$ac_sys_release in
Darwin/*) 
	CFLAGS="${_CUR_CFLAGS}"
	LDFLAGS="${_CUR_LDFLAGS}"
	;;
esac

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"])
   )
)

# Stuff for expat.
AC_CHECK_FUNCS(memmove)

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

AC_REPLACE_FUNCS(dup2 getcwd strdup)
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 mathematical functions *
# ************************************

LIBS_SAVE=$LIBS
LIBS="$LIBS $LIBM"

# Detect whether system arithmetic is subject to x87-style double
# rounding issues.  The result of this test has little meaning on non
# IEEE 754 platforms.  On IEEE 754, test should return 1 if rounding
# mode is round-to-nearest and double rounding issues are present, and
# 0 otherwise.  See http://bugs.python.org/issue2937 for more info.
AC_MSG_CHECKING(for x87-style double rounding)
AC_CACHE_VAL(ac_cv_x87_double_rounding, [
AC_TRY_RUN([
#include <stdlib.h>
#include <math.h>
int main() {
    volatile double x, y, z;
    /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
    x = 0.99999999999999989; /* 1-2**-53 */
    y = 1./x;
    if (y != 1.)
        exit(0);
    /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
    x = 1e16;
    y = 2.99999;
    z = x + y;
    if (z != 1e16+4.)
        exit(0);
    /* both tests show evidence of double rounding */
    exit(1);
}
],
ac_cv_x87_double_rounding=no,
ac_cv_x87_double_rounding=yes,
ac_cv_x87_double_rounding=no)])
AC_MSG_RESULT($ac_cv_x87_double_rounding)
if test "$ac_cv_x87_double_rounding" = yes
then
  AC_DEFINE(X87_DOUBLE_ROUNDING, 1,
  [Define if arithmetic is subject to x87-style double rounding issue])
fi

# Multiprocessing check for broken sem_getvalue
AC_MSG_CHECKING(for broken sem_getvalue)
AC_TRY_RUN([
#include <unistd.h>
#include <fcntl.h>
#include <stdio.h>
#include <semaphore.h>
#include <sys/stat.h>

int main(void){
  sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
  int count;
  int res;
  if(a==SEM_FAILED){
    perror("sem_open");
    return 1;

  }
  res = sem_getvalue(a, &count);
  sem_close(a);
  return res==-1 ? 1 : 0;
}
]
,AC_MSG_RESULT(no),
 AC_MSG_RESULT(yes)
  AC_DEFINE(HAVE_BROKEN_SEM_GETVALUE, 1, define to 1 if your sem_getvalue is broken.)
)

# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
# -0. on some architectures.
AC_MSG_CHECKING(whether tanh preserves the sign of zero)
AC_CACHE_VAL(ac_cv_tanh_preserves_zero_sign, [
AC_TRY_RUN([
#include <math.h>
#include <stdlib.h>
int main() {
    /* return 0 if either negative zeros don't exist
       on this platform or if negative zeros exist
       and tanh(-0.) == -0. */
  if (atan2(0., -1.) == atan2(-0., -1.) ||
      atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
  else exit(1);
}
],
ac_cv_tanh_preserves_zero_sign=yes,
ac_cv_tanh_preserves_zero_sign=no,
ac_cv_tanh_preserves_zero_sign=no)])
AC_MSG_RESULT($ac_cv_tanh_preserves_zero_sign)
if test "$ac_cv_tanh_preserves_zero_sign" = yes
then
  AC_DEFINE(TANH_PRESERVES_ZERO_SIGN, 1,
  [Define if tanh(-0.) is -0., or if platform doesn't have signed zeros])
fi

AC_CHECK_FUNCS([acosh asinh atanh copysign expm1 finite hypot log1p])
AC_CHECK_DECLS([isinf, isnan, isfinite], [], [], [[#include <math.h>]])

LIBS=$LIBS_SAVE

# determine what size digit to use for Python's longs
AC_MSG_CHECKING([digit size for Python's longs])
AC_ARG_ENABLE(big-digits,
AC_HELP_STRING([--enable-big-digits@<:@=BITS@:>@],[use big digits for Python longs [[BITS=30]]]),
[case $enable_big_digits in
yes)
  enable_big_digits=30 ;;
no)
  enable_big_digits=15 ;;
[15|30])
  ;;
*)
  AC_MSG_ERROR([bad value $enable_big_digits for --enable-big-digits; value should be 15 or 30]) ;;
esac
AC_MSG_RESULT($enable_big_digits)
AC_DEFINE_UNQUOTED(PYLONG_BITS_IN_DIGIT, $enable_big_digits, [Define as the preferred size in bits of long digits])
],
[AC_MSG_RESULT(no value specified)])

# 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()
  {
	/* Success: exit code 0 */
        exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
  }
  ],
  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

# On some systems we need to link readline to a termcap compatible
# library.  NOTE: Keep the precedence of listed libraries synchronised
# with setup.py.
py_cv_lib_readline=no
AC_MSG_CHECKING([how to link readline libs])
for py_libtermcap in "" ncursesw ncurses curses termcap; do
  if test -z "$py_libtermcap"; then
    READLINE_LIBS="-lreadline"
  else
    READLINE_LIBS="-lreadline -l$py_libtermcap"
  fi
  LIBS="$READLINE_LIBS $LIBS_no_readline"
  AC_LINK_IFELSE(
    [AC_LANG_CALL([],[readline])],
    [py_cv_lib_readline=yes])
  if test $py_cv_lib_readline = yes; then
    break
  fi
done
# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
#AC_SUBST([READLINE_LIBS])
if test $py_cv_lib_readline = no; then
  AC_MSG_RESULT([none])
else
  AC_MSG_RESULT([$READLINE_LIBS])
  AC_DEFINE(HAVE_LIBREADLINE, 1,
    [Define if you have the readline library (-lreadline).])
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]), ,$READLINE_LIBS)

# 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]), ,$READLINE_LIBS)

# also in 4.0
AC_CHECK_LIB(readline, rl_completion_display_matches_hook,
	AC_DEFINE(HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK, 1,
        [Define if you have readline 4.0]), ,$READLINE_LIBS)

# 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]), ,$READLINE_LIBS)

# 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 is_term_resized)
AC_TRY_COMPILE([#include <curses.h>], void *x=is_term_resized,
  AC_DEFINE(HAVE_CURSES_IS_TERM_RESIZED, 1, Define if you have the 'is_term_resized' function.)
  AC_MSG_RESULT(yes),
  AC_MSG_RESULT(no)
)

AC_MSG_CHECKING(for resize_term)
AC_TRY_COMPILE([#include <curses.h>], void *x=resize_term,
  AC_DEFINE(HAVE_CURSES_RESIZE_TERM, 1, Define if you have the 'resize_term' function.)
  AC_MSG_RESULT(yes),
  AC_MSG_RESULT(no)
)

AC_MSG_CHECKING(for resizeterm)
AC_TRY_COMPILE([#include <curses.h>], void *x=resizeterm,
  AC_DEFINE(HAVE_CURSES_RESIZETERM, 1, Define if you have the 'resizeterm' function.)
  AC_MSG_RESULT(yes),
  AC_MSG_RESULT(no)
)

AC_MSG_CHECKING(for /dev/ptmx)

if test -r /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 -r /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_MSG_CHECKING(for %zd printf() format support)
AC_TRY_RUN([#include <stdio.h>
#include <stddef.h>
#include <string.h>

#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif

#ifdef HAVE_SSIZE_T
typedef ssize_t Py_ssize_t;
#elif SIZEOF_VOID_P == SIZEOF_LONG
typedef long Py_ssize_t;
#else
typedef int Py_ssize_t;
#endif

int main()
{
    char buffer[256];

    if(sprintf(buffer, "%zd", (size_t)123) < 0)
       	return 1;

    if (strcmp(buffer, "123"))
	return 1;

    if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
       	return 1;

    if (strcmp(buffer, "-123"))
	return 1;

    return 0;
}],
[AC_MSG_RESULT(yes)
 AC_DEFINE(PY_FORMAT_SIZE_T, "z", [Define to printf format modifier for Py_ssize_t])],
 AC_MSG_RESULT(no))

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 Modules/Setup"
if test ! -f Modules/Setup
then
	cp $srcdir/Modules/Setup.dist Modules/Setup
fi

echo "creating Modules/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

case $ac_sys_system in
BeOS)
        AC_MSG_WARN([

  Support for BeOS is deprecated as of Python 2.6.
  See PEP 11 for the gory details.
  ])
  ;;
*) ;;
esac

mv config.c Modules
