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, 3.2)

dnl Some m4 magic to ensure that the configure script is generated
dnl by the correct autoconf version.
m4_define([version_required],
[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]), [$1]), 0,
       [],
       [m4_fatal([Autoconf version $1 is required for Python], 63)])
])
version_required(2.61)

AC_REVISION($Revision$)
AC_INIT(python, PYTHON_VERSION, http://bugs.python.org/)
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)

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", "3-way", "intel" 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 "
		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/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" = "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";;
        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)

# 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=;;
	*)	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;;
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";;
	QNX*)
	   # qcc must be used because the other compilers do not
	   # support -N.
	   LINKCC=qcc;;
	esac
fi
AC_MSG_RESULT($LINKCC)

# GNULD is set to "yes" if the GNU linker is used.  If this goes wrong
# make sure we default having it set to "no": this is used by
# distutils.unixccompiler to know if it should add --enable-new-dtags
# to linker command lines, and failing to detect GNU ld simply results
# in the same bahaviour as before.
AC_SUBST(GNULD)
AC_MSG_CHECKING(for GNU ld)
ac_prog=ld
if test "$GCC" = yes; then
       ac_prog=`$CC -print-prog-name=ld`
fi
case `"$ac_prog" -V 2>&1 < /dev/null` in
      *GNU*)
          GNULD=yes;;
      *)
          GNULD=no;;
esac
AC_MSG_RESULT($GNULD)

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*)
    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
    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}
	  ;;
    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)

# tweak ARFLAGS only if the user didn't set it on the command line
AC_SUBST(ARFLAGS)
if test -z "$ARFLAGS"
then
        ARFLAGS="rc"
fi

AC_SUBST(SVNVERSION)
AC_CHECK_PROG(SVNVERSION, svnversion, found, not-found)
if test $SVNVERSION = found
then
	SVNVERSION="svnversion \$(srcdir)"
else
	SVNVERSION="echo Unversioned directory"
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
		CYGWIN*) 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
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_CACHE_VAL(ac_cv_no_strict_aliasing_ok,
     AC_TRY_COMPILE([],[int main() { return 0; }],
     ac_cv_no_strict_aliasing_ok=yes,
     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"
		   ARCH_RUN_32BIT="true"

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

	         elif test "$UNIVERSAL_ARCHS" = "intel" ; then
		   UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
		   ARCH_RUN_32BIT="arch -i386"

	         elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
		   UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
		   ARCH_RUN_32BIT="arch -i386 -ppc"

		 else
	           AC_MSG_ERROR([proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way])

		 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
		    if test ${enable_universalsdk}; then
			    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'

			    elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
				    cur_target='10.5'

			    elif test "${UNIVERSAL_ARCHS}" = "intel"; then
				    cur_target='10.5'

			    elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
				    cur_target='10.5'
			    fi
		    else
			    if test `arch` = "i386"; then
				    # On Intel macs default to a deployment
				    # target of 10.4, that's the first OSX
				    # release with Intel support.
				    cur_target="10.4"
			    fi
		    fi
	    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_COMPILE([],[int main() { return 0; }],
  ac_cv_opt_olimit_ok=yes,
  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_COMPILE([],[int main() { return 0; }],
    ac_cv_olimit_ok=yes,
    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, 16)
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])

AC_CHECK_SIZEOF(off_t, [], [
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
])

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(time_t, [], [
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#ifdef HAVE_TIME_H
#include <time.h>
#endif
])

# 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(pthread_t, [], [
#ifdef HAVE_PTHREAD_H
#include <pthread.h>
#endif
  ])
fi
CC="$ac_save_cc"

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


ARCH_RUN_32BIT=""
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
    AC_TRY_RUN([
    #include <unistd.h>
    int main(int argc, char*argv[])
    {
      if (sizeof(long) == 4) {
    	  return 0;
      } else {
      	  return 1;
      }
    }
    ], ac_osx_32bit=yes,
       ac_osx_32bit=no,
       ac_osx_32bit=yes)
    
    if test "${ac_osx_32bit}" = "yes"; then
    	case `arch` in
    	i386) 
    		MACOSX_DEFAULT_ARCH="i386" 
    		;;
    	ppc) 
    		MACOSX_DEFAULT_ARCH="ppc" 
    		;;
    	*)
    		AC_MSG_ERROR([Unexpected output of 'arch' on OSX])
    		;;
    	esac
    else
    	case `arch` in
    	i386) 
    		MACOSX_DEFAULT_ARCH="x86_64" 
    		;;
    	ppc) 
    		MACOSX_DEFAULT_ARCH="ppc64" 
    		;;
    	*)
    		AC_MSG_ERROR([Unexpected output of 'arch' on OSX])
    		;;
    	esac

	#ARCH_RUN_32BIT="true"
    fi

    LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_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)
	if test $enable_shared = "yes"
	then
		AC_MSG_ERROR([Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead])
	fi
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"
		;;
	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';;
	CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
	*)	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;;
	IRIX*/6*)  case $CC in
		   *gcc*) CCSHARED="-shared";;
		   *) CCSHARED="";;
		   esac;;
	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/*) 
		LINKFORSHARED="$extra_undefs -framework CoreFoundation"
		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.])
        LIBS="-lintl $LIBS"])

# 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.
AC_CHECK_LIB(nsl, t_open, [LIBS="-lnsl $LIBS"]) # SVR4
AC_CHECK_LIB(socket, socket, [LIBS="-lsocket $LIBS"], [], $LIBS) # SVR4 sockets

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)

# Check for --with-dbmliborder
AC_MSG_CHECKING(for --with-dbmliborder)
AC_ARG_WITH(dbmliborder,
            AC_HELP_STRING([--with-dbmliborder=db1:db2:...], [order to check db backends for dbm. Valid value is a colon separated string with the backend names `ndbm', `gdbm' and `bdb'.]),
[
if test x$with_dbmliborder = xyes
then
AC_MSG_ERROR([proper usage is --with-dbmliborder=db1:db2:...])
else
  for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
    if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
    then
      AC_MSG_ERROR([proper usage is --with-dbmliborder=db1:db2:...])
    fi
  done
fi])
AC_MSG_RESULT($with_dbmliborder)

# 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"],[
    # 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_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
	;;
	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";;
	*)
	# 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 mbrtowc 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 strlcpy \
 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
 truncate uname unsetenv utimes waitpid wait3 wait4 \
 wcscoll wcsftime wcsxfrm _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_CACHE_VAL(ac_cv_have_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_cv_have_chflags=yes,
    ac_cv_have_chflags=no,
    ac_cv_have_chflags=no)
)
AC_MSG_RESULT($ac_cv_have_chflags)
if test $ac_cv_have_chflags = yes
then
  AC_DEFINE(HAVE_CHFLAGS, 1, Define to 1 if you have the `chflags' function.)
fi

AC_MSG_CHECKING(for lchflags)
AC_CACHE_VAL(ac_cv_have_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_cv_have_lchflags=yes,
    ac_cv_have_lchflags=no,
    ac_cv_have_lchflags=no)
)
AC_MSG_RESULT($ac_cv_have_lchflags)
if test $ac_cv_have_lchflags = yes
then
  AC_DEFINE(HAVE_LCHFLAGS, 1, Define to 1 if you have the `lchflags' function.)
fi

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);],
have_getaddrinfo=yes,
have_getaddrinfo=no)
AC_MSG_RESULT($have_getaddrinfo)
if test $have_getaddrinfo = yes
then
  AC_MSG_CHECKING(getaddrinfo bug)
  AC_CACHE_VAL(ac_cv_buggy_getaddrinfo,
  AC_TRY_RUN([[
#include <sys/types.h>
#include <netdb.h>
#include <string.h>
#include <sys/socket.h>
#include <netinet/in.h>

int 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);
  return 0;

 bad:
  if (aitop)
    freeaddrinfo(aitop);
  return 1;
}
]], ac_cv_buggy_getaddrinfo=no,
    ac_cv_buggy_getaddrinfo=yes,
    ac_cv_buggy_getaddrinfo=yes))
fi

if test $have_getaddrinfo = no -o $ac_cv_buggy_getaddrinfo = 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) ;;
*) 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 various properties of floating point *
# **************************************************

AC_MSG_CHECKING(whether C doubles are little-endian IEEE 754 binary64)
AC_CACHE_VAL(ac_cv_little_endian_double, [
AC_TRY_RUN([
#include <string.h>
int main() {
    double x = 9006104071832581.0;
    if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
        return 0;
    else
        return 1;
}
],
ac_cv_little_endian_double=yes,
ac_cv_little_endian_double=no,
ac_cv_little_endian_double=no)])
AC_MSG_RESULT($ac_cv_little_endian_double)
if test "$ac_cv_little_endian_double" = yes
then
  AC_DEFINE(DOUBLE_IS_LITTLE_ENDIAN_IEEE754, 1,
  [Define if C doubles are 64-bit IEEE 754 binary format, stored
   with the least significant byte first])
fi

AC_MSG_CHECKING(whether C doubles are big-endian IEEE 754 binary64)
AC_CACHE_VAL(ac_cv_big_endian_double, [
AC_TRY_RUN([
#include <string.h>
int main() {
    double x = 9006104071832581.0;
    if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
        return 0;
    else
        return 1;
}
],
ac_cv_big_endian_double=yes,
ac_cv_big_endian_double=no,
ac_cv_big_endian_double=no)])
AC_MSG_RESULT($ac_cv_big_endian_double)
if test "$ac_cv_big_endian_double" = yes
then
  AC_DEFINE(DOUBLE_IS_BIG_ENDIAN_IEEE754, 1,
  [Define if C doubles are 64-bit IEEE 754 binary format, stored
   with the most significant byte first])
fi

# Some ARM platforms use a mixed-endian representation for doubles.
# While Python doesn't currently have full support for these platforms
# (see e.g., issue 1762561), we can at least make sure that float <-> string
# conversions work.
AC_MSG_CHECKING(whether C doubles are ARM mixed-endian IEEE 754 binary64)
AC_CACHE_VAL(ac_cv_mixed_endian_double, [
AC_TRY_RUN([
#include <string.h>
int main() {
    double x = 9006104071832581.0;
    if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
        return 0;
    else
        return 1;
}
],
ac_cv_mixed_endian_double=yes,
ac_cv_mixed_endian_double=no,
ac_cv_mixed_endian_double=no)])
AC_MSG_RESULT($ac_cv_mixed_endian_double)
if test "$ac_cv_mixed_endian_double" = yes
then
  AC_DEFINE(DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754, 1,
  [Define if C doubles are 64-bit IEEE 754 binary format, stored
   in ARM mixed-endian order (byte order 45670123)])
fi

# The short float repr introduced in Python 3.1 requires the
# correctly-rounded string <-> double conversion functions from
# Python/dtoa.c, which in turn require that the FPU uses 53-bit
# rounding; this is a problem on x86, where the x87 FPU has a default
# rounding precision of 64 bits.  For gcc/x86, we try to fix this by
# using inline assembler to get and set the x87 FPU control word.
if test "$GCC" = yes && test -n "`$CC -dM -E - </dev/null | grep i386`"
then
    # Check that it's okay to use gcc inline assembler to get and set
    # x87 control word.  It should be, but you never know...
    AC_MSG_CHECKING(whether we can use gcc inline assembler to get and set x87 control word)
    AC_TRY_COMPILE([], [
      unsigned short cw;
      __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
      __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
    ],
    [have_gcc_asm_for_x87=yes], [have_gcc_asm_for_x87=no])
    AC_MSG_RESULT($have_gcc_asm_for_x87)
    if test "$have_gcc_asm_for_x87" = yes
    then
        AC_DEFINE(HAVE_GCC_ASM_FOR_X87, 1,
        [Define if we can use gcc inline assembler to get and set x87 control word])
    fi
fi

# 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)
# $BASECFLAGS may affect the result
ac_save_cc="$CC"
CC="$CC $BASECFLAGS"
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)
CC="$ac_save_cc"
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

# ************************************
# * Check for mathematical functions *
# ************************************

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

# 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 erf erfc expm1 finite gamma])
AC_CHECK_FUNCS([hypot lgamma log1p round tgamma])
AC_CHECK_DECLS([isinf, isnan, isfinite], [], [], [[#include <math.h>]])

LIBS=$LIBS_SAVE

# Multiprocessing check for broken sem_getvalue
AC_MSG_CHECKING(for broken sem_getvalue)
AC_CACHE_VAL(ac_cv_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_cv_broken_sem_getvalue=no,
   ac_cv_broken_sem_getvalue=yes,
   ac_cv_broken_sem_getvalue=yes)
)
AC_MSG_RESULT($ac_cv_broken_sem_getvalue)
if test $ac_cv_broken_sem_getvalue = yes
then
  AC_DEFINE(HAVE_BROKEN_SEM_GETVALUE, 1,
  [define to 1 if your sem_getvalue is broken.])
fi

# 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 str)
AC_ARG_WITH(wide-unicode, 
            AC_HELP_STRING(--with-wide-unicode, Use 4-byte Unicode characters (default is 2 bytes)),
[
if test "$withval" != no
then unicode_size="4"
else unicode_size="2"
fi
],
[
case "$have_ucs4_tcl" in
  yes) unicode_size="4" ;;
  *)   unicode_size="2" ;;
esac
])

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

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

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

# 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]), )
  AC_EGREP_HEADER([extern int rl_completion_suppress_append;],
  [readline/readline.h],
  AC_DEFINE(HAVE_RL_COMPLETION_SUPPRESS_APPEND, 1,
  [Define if you have rl_completion_suppress_append]), )
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_CACHE_VAL(ac_cv_broken_poll,
AC_TRY_RUN([
#include <poll.h>

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

    close (42);

    poll_test = poll(&poll_struct, 1, 0);
    if (poll_test < 0)
        return 0;
    else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
        return 0;
    else
        return 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_CACHE_VAL(ac_cv_have_size_t_format,
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_cv_have_size_t_format=yes,
    ac_cv_have_size_t_format=no,
    ac_cv_have_size_t_format=no)
)
AC_MSG_RESULT($ac_cv_have_size_t_format)
if test $ac_cv_have_size_t_format = yes
then
  AC_DEFINE(PY_FORMAT_SIZE_T, "z",
  [Define to printf format modifier for Py_ssize_t])
fi

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

AC_MSG_CHECKING(for broken mbstowcs)
AC_CACHE_VAL(ac_cv_broken_mbstowcs,
AC_TRY_RUN([
#include<stdlib.h>
int main() {
    size_t len = -1;
    const char *str = "text";
    len = mbstowcs(NULL, str, 0);
    return (len != 4);
}
],
ac_cv_broken_mbstowcs=no,
ac_cv_broken_mbstowcs=yes,
ac_cv_broken_mbstowcs=no))
AC_MSG_RESULT($ac_cv_broken_mbstowcs)
if test "$ac_cv_broken_mbstowcs" = yes
then
  AC_DEFINE(HAVE_BROKEN_MBSTOWCS, 1,
  [Define if mbstowcs(NULL, "text", 0) does not return the number of 
   wide chars that would be converted.])
fi

# Check for --with-computed-gotos
AC_MSG_CHECKING(for --with-computed-gotos)
AC_ARG_WITH(computed-gotos,
            AC_HELP_STRING(--with-computed-gotos,
                           Use computed gotos / threaded dispatch in evaluation loop (not available on all compilers)),
[
if test "$withval" != no
then 
  AC_DEFINE(USE_COMPUTED_GOTOS, 1,
  [Define if you want to use computed gotos in ceval.c.]) 
  AC_MSG_RESULT(yes)
else AC_MSG_RESULT(no)
fi],
[AC_MSG_RESULT(no)])


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 Misc/python.pc)
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
mv config.c Modules
