diff --git a/Makefile.pre.in b/Makefile.pre.in --- a/Makefile.pre.in +++ b/Makefile.pre.in @@ -433,9 +433,9 @@ # Build the interpreter $(BUILDPYTHON): Modules/python.o $(LIBRARY) $(LDLIBRARY) - $(LINKCC) $(LDFLAGS) $(LINKFORSHARED) -o $@ \ + $(LINKCC) $(LINKFORSHARED) -o $@ \ Modules/python.o \ - $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST) + $(BLDLIBRARY) $(LDFLAGS) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST) platform: $(BUILDPYTHON) pybuilddir.txt $(RUNSHARED) $(PYTHON_FOR_BUILD) -c 'import sys ; from sysconfig import get_platform ; print get_platform()+"-"+sys.version[0:3]' >platform diff --git a/configure.ac b/configure.ac --- a/configure.ac +++ b/configure.ac @@ -46,7 +46,7 @@ dnl Last slash shouldn't be stripped if prefix=/ if test "$prefix" != "/"; then prefix=`echo "$prefix" | sed -e 's/\/$//g'` -fi +fi dnl This is for stuff that absolutely must end up in pyconfig.h. dnl Please use pyport.h instead, if possible. @@ -131,7 +131,7 @@ fi ;; esac - + ],[ UNIVERSALSDK= enable_universalsdk= @@ -189,7 +189,7 @@ AS_HELP_STRING([--enable-framework@<:@=INSTALLDIR@:>@], [Build (MacOSX|Darwin) framework]), [ case $enableval in - yes) + yes) enableval=/Library/Frameworks esac case $enableval in @@ -244,7 +244,7 @@ FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications" if test "${prefix}" = "NONE"; then - # User hasn't specified the + # User hasn't specified the # --prefix option, but wants to install # the framework in a non-default location, # ensure that the compatibility links get @@ -372,7 +372,7 @@ esac _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}" 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 @@ -389,7 +389,7 @@ # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish. # In addition, Stefan Krah confirms that issue #1244610 exists through # OpenBSD 4.6, but is fixed in 4.7. - OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.@<:@0123456@:>@) + OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.@<:@0123456@:>@) 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 @@ -427,12 +427,12 @@ # 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 + # 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 + # 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;; @@ -458,7 +458,7 @@ if test $define_xopen_source = yes then - AC_DEFINE(_XOPEN_SOURCE, 600, + AC_DEFINE(_XOPEN_SOURCE, 600, Define to the level of X/Open that your system supports) # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires @@ -469,7 +469,7 @@ Define to activate Unix95-and-earlier features) AC_DEFINE(_POSIX_C_SOURCE, 200112L, Define to activate features from IEEE Stds 1003.1-2001) - + fi # @@ -497,11 +497,11 @@ if test -z "$EXTRAPLATDIR" then case $MACHDEP in - darwin) + darwin) EXTRAPLATDIR="\$(PLATMACDIRS)" EXTRAMACHDEPPATH="\$(PLATMACPATH)" ;; - *) + *) EXTRAPLATDIR="" EXTRAMACHDEPPATH="" ;; @@ -623,7 +623,7 @@ AS_HELP_STRING([--with-cxx-main=], [compile main() and link python executable with C++ compiler]), [ - + case $withval in no) with_cxx_main=no MAINCC='$(CC)';; @@ -750,7 +750,7 @@ # 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 @@ -772,7 +772,7 @@ # 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 +# This is altered for AIX in order to build the export list before # linking. AC_SUBST(LINKCC) AC_MSG_CHECKING(LINKCC) @@ -819,7 +819,7 @@ AS_HELP_STRING([--enable-shared], [disable/enable building shared python library])) if test -z "$enable_shared" -then +then case $ac_sys_system in CYGWIN* | atheos*) enable_shared="yes";; @@ -864,7 +864,7 @@ BLDLIBRARY='' else BLDLIBRARY='$(LDLIBRARY)' -fi +fi # Other platforms follow if test $enable_shared = "yes"; then @@ -1015,14 +1015,14 @@ # Check for --with-pydebug AC_MSG_CHECKING(for --with-pydebug) -AC_ARG_WITH(pydebug, +AC_ARG_WITH(pydebug, AS_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); +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], @@ -1137,7 +1137,7 @@ AC_MSG_CHECKING(which compiler should be used) case "${UNIVERSALSDK}" in */MacOSX10.4u.sdk) - # Build using 10.4 SDK, force usage of gcc when the + # Build using 10.4 SDK, force usage of gcc when the # compiler is gcc, otherwise the user will get very # confusing error messages when building on OSX 10.6 CC=gcc-4.0 @@ -1154,9 +1154,9 @@ 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 + # 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' @@ -1179,8 +1179,8 @@ fi fi CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}} - - # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the + + # 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. @@ -1188,6 +1188,8 @@ export MACOSX_DEPLOYMENT_TARGET EXPORT_MACOSX_DEPLOYMENT_TARGET='' + LDFLAGS="${LDFLAGS} -Wl,-search_paths_first" + if test "${enable_universalsdk}"; then UNIVERSAL_ARCH_FLAGS="" if test "$UNIVERSAL_ARCHS" = "32-bit" ; then @@ -1222,7 +1224,7 @@ CFLAGS="${UNIVERSAL_ARCH_FLAGS} ${CFLAGS}" - if test "${UNIVERSALSDK}" != "/" + if test "${UNIVERSALSDK}" != "/" then CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}" LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}" @@ -1369,7 +1371,7 @@ AC_MSG_RESULT($ac_cv_pthread_is_default) -if test $ac_cv_pthread_is_default = yes +if test $ac_cv_pthread_is_default = yes then ac_cv_kpthread=no else @@ -1468,14 +1470,14 @@ if test "$ac_cv_kpthread" = "yes" then - CXX="$CXX -Kpthread" + 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 +then CXX="$CXX -pthread" ac_cv_cxx_thread=yes fi @@ -1601,11 +1603,11 @@ # These may affect some typedefs case $ac_sys_system/$ac_sys_release in AIX*) - AC_DEFINE(_LARGE_FILES, 1, + AC_DEFINE(_LARGE_FILES, 1, [This must be defined on AIX systems to enable large file support.]) ;; esac -AC_DEFINE(_LARGEFILE_SOURCE, 1, +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.]) @@ -1667,7 +1669,7 @@ AC_MSG_CHECKING(for long long support) have_long_long=no AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[long long x; x = (long long)0;]])],[ - AC_DEFINE(HAVE_LONG_LONG, 1, [Define this if you have the type long long.]) + 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) @@ -1689,7 +1691,7 @@ AC_MSG_CHECKING(for _Bool support) have_c99_bool=no AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[_Bool x; x = (_Bool)0;]])],[ - AC_DEFINE(HAVE_C99_BOOL, 1, [Define this if you have the type _Bool.]) + AC_DEFINE(HAVE_C99_BOOL, 1, [Define this if you have the type _Bool.]) have_c99_bool=yes ],[]) AC_MSG_RESULT($have_c99_bool) @@ -1697,8 +1699,8 @@ AC_CHECK_SIZEOF(_Bool, 1) fi -AC_CHECK_TYPES(uintptr_t, - [AC_CHECK_SIZEOF(uintptr_t, 4)], +AC_CHECK_TYPES(uintptr_t, + [AC_CHECK_SIZEOF(uintptr_t, 4)], [], [#ifdef HAVE_STDINT_H #include #endif @@ -1717,7 +1719,7 @@ then if test "$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, + 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. @@ -1768,7 +1770,7 @@ AS_HELP_STRING([--enable-toolbox-glue], [disable/enable MacOSX glue code for extensions])) if test -z "$enable_toolbox_glue" -then +then case $ac_sys_system/$ac_sys_release in Darwin/*) enable_toolbox_glue="yes";; @@ -1793,7 +1795,7 @@ AC_SUBST(OTHER_LIBTOOL_OPT) case $ac_sys_system/$ac_sys_release in - Darwin/@<:@01567@:>@\..*) + Darwin/@<:@01567@:>@\..*) OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000" ;; Darwin/*) @@ -1804,7 +1806,7 @@ AC_SUBST(LIBTOOL_CRUFT) case $ac_sys_system/$ac_sys_release in - Darwin/@<:@01567@:>@\..*) + Darwin/@<:@01567@:>@\..*) LIBTOOL_CRUFT="-framework System -lcc_dynamic" if test "${enable_universalsdk}"; then : @@ -1818,7 +1820,7 @@ if test ${gcc_version} '<' 4.0 then LIBTOOL_CRUFT="-lcc_dynamic" - else + else LIBTOOL_CRUFT="" fi AC_RUN_IFELSE([AC_LANG_SOURCE([[ @@ -1832,14 +1834,14 @@ } } ]])],[ac_osx_32bit=yes],[ac_osx_32bit=no],[ac_osx_32bit=yes]) - + if test "${ac_osx_32bit}" = "yes"; then case `/usr/bin/arch` in - i386) - MACOSX_DEFAULT_ARCH="i386" + i386) + MACOSX_DEFAULT_ARCH="i386" ;; - ppc) - MACOSX_DEFAULT_ARCH="ppc" + ppc) + MACOSX_DEFAULT_ARCH="ppc" ;; *) AC_MSG_ERROR([Unexpected output of 'arch' on OSX]) @@ -1847,11 +1849,11 @@ esac else case `/usr/bin/arch` in - i386) - MACOSX_DEFAULT_ARCH="x86_64" + i386) + MACOSX_DEFAULT_ARCH="x86_64" ;; - ppc) - MACOSX_DEFAULT_ARCH="ppc64" + ppc) + MACOSX_DEFAULT_ARCH="ppc64" ;; *) AC_MSG_ERROR([Unexpected output of 'arch' on OSX]) @@ -1870,9 +1872,9 @@ if test "$enable_framework" then BASECFLAGS="$BASECFLAGS -fno-common -dynamic" - # -F. is needed to allow linking to the framework while + # -F. is needed to allow linking to the framework while # in the build location. - AC_DEFINE(WITH_NEXT_FRAMEWORK, 1, + 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) @@ -1887,7 +1889,7 @@ AC_MSG_CHECKING(for dyld) case $ac_sys_system/$ac_sys_release in Darwin/*) - AC_DEFINE(WITH_DYLD, 1, + 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.]) @@ -1953,7 +1955,7 @@ ;; IRIX/5*) LDSHARED="ld -shared";; IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";; - SunOS/5*) + SunOS/5*) if test "$GCC" = "yes" ; then LDSHARED='$(CC) -shared' LDCXXSHARED='$(CXX) -shared' @@ -2130,7 +2132,7 @@ BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";; Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";; # -u libsys_s pulls in all symbols in libsys - Darwin/*) + Darwin/*) # -u _PyMac_Error is needed to pull in the mac toolbox glue, # which is # not used by the core itself but which needs to be in the core so @@ -2148,7 +2150,7 @@ OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";; SCO_SV*) LINKFORSHARED="-Wl,-Bexport";; ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";; - FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) + FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) if [[ "`$CC -dM -E - ]], [[getpgrp(0);]])], [AC_DEFINE(GETPGRP_HAVE_ARG, 1, [Define if getpgrp() must be called as getpgrp(0).])], []) @@ -3152,7 +3154,7 @@ [AC_DEFINE(SETPGRP_HAVE_ARG, 1, [Define if setpgrp() must be called as setpgrp(0, 0).])], []) ) -AC_CHECK_FUNCS(gettimeofday, +AC_CHECK_FUNCS(gettimeofday, AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], [[gettimeofday((struct timeval*)0,(struct timezone*)0);]])], [], @@ -3182,7 +3184,7 @@ ]) # On OSF/1 V5.1, getaddrinfo is available, but a define -# for [no]getaddrinfo in netdb.h. +# for [no]getaddrinfo in netdb.h. AC_MSG_CHECKING(for getaddrinfo) AC_LINK_IFELSE([AC_LANG_PROGRAM([[ #include @@ -3342,7 +3344,7 @@ ]], [[;]])],[ AC_DEFINE(SYS_SELECT_WITH_SYS_TIME, 1, [Define if you can safely include both and - (which you can't on SCO ODT 3.0).]) + (which you can't on SCO ODT 3.0).]) was_it_defined=yes ],[]) AC_MSG_RESULT($was_it_defined) @@ -3393,8 +3395,8 @@ have_prototypes=no AC_MSG_CHECKING(for prototypes) AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[int foo(int x) { return 0; }]], [[return foo(10);]])], - [AC_DEFINE(HAVE_PROTOTYPES, 1, - [Define if your compiler supports function prototype]) + [AC_DEFINE(HAVE_PROTOTYPES, 1, + [Define if your compiler supports function prototype]) have_prototypes=yes], [] ) @@ -3415,7 +3417,7 @@ ]], [[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* ]) + (e.g. void fprintf(FILE *, char *, ...);) *and* ]) works=yes ],[]) AC_MSG_RESULT($works) @@ -3450,7 +3452,7 @@ #include #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]) + 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) @@ -3545,9 +3547,9 @@ AS_HELP_STRING([--with-fpectl], [enable SIGFPE catching]), [ if test "$withval" != no -then +then AC_DEFINE(WANT_SIGFPE_HANDLER, 1, - [Define if you want SIGFPE handled (see Include/pyfpe.h).]) + [Define if you want SIGFPE handled (see Include/pyfpe.h).]) AC_MSG_RESULT(yes) else AC_MSG_RESULT(no) fi], @@ -3862,8 +3864,8 @@ # 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.]) + AC_DEFINE(HAVE_WCHAR_H, 1, + [Define if the compiler provides a wchar.h header file.]) wchar_h="yes" ], wchar_h="no" @@ -3906,10 +3908,10 @@ [ac_cv_wchar_t_signed=yes])]) AC_MSG_RESULT($ac_cv_wchar_t_signed) fi - + AC_MSG_CHECKING(what type to use for unicode) dnl quadrigraphs "@<:@" and "@:>@" produce "[" and "]" in the output -AC_ARG_ENABLE(unicode, +AC_ARG_ENABLE(unicode, AS_HELP_STRING([--enable-unicode@<:@=ucs@<:@24@:>@@:>@], [Enable Unicode strings (default is ucs2)]), [], [enable_unicode=yes]) @@ -4153,7 +4155,7 @@ [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 +# 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 @@ -4179,7 +4181,7 @@ 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 + Red Hat 6.2 doesn't understand the southern hemisphere after New Year's Day. */ @@ -4192,7 +4194,7 @@ exit(1); #if HAVE_TZNAME /* For UTC, tzname[1] is sometimes "", sometimes " " */ - if (strcmp(tzname[0], "UTC") || + if (strcmp(tzname[0], "UTC") || (tzname[1][0] != 0 && tzname[1][0] != ' ')) exit(1); #endif @@ -4297,7 +4299,7 @@ if test "$ac_cv_window_has_flags" = yes then - AC_DEFINE(WINDOW_HAS_FLAGS, 1, + AC_DEFINE(WINDOW_HAS_FLAGS, 1, [Define if WINDOW in curses.h offers a field _flags.]) fi