Index: configure =================================================================== --- configure (revision 73142) +++ configure (working copy) @@ -1,5 +1,5 @@ #! /bin/sh -# From configure.in Revision: 73021 . +# From configure.in Revision: 73142 . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.61 for python 3.1. # @@ -712,6 +712,7 @@ BLDSHARED CCSHARED LINKFORSHARED +FRAMEWORKLINK CFLAGSFORSHARED SHLIBS USE_SIGNAL_MODULE @@ -13315,6 +13316,7 @@ + # SO is the extension of shared libraries `(including the dot!) # -- usually .so, .sl on HP-UX, .dll on Cygwin { echo "$as_me:$LINENO: checking SO" >&5 @@ -13501,6 +13503,100 @@ fi { echo "$as_me:$LINENO: result: $CCSHARED" >&5 echo "${ECHO_T}$CCSHARED" >&6; } + +# check if we need libintl for locale functions +{ echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5 +echo $ECHO_N "checking for textdomain in -lintl... $ECHO_C" >&6; } +if test "${ac_cv_lib_intl_textdomain+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lintl $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char textdomain (); +int +main () +{ +return textdomain (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && + $as_test_x conftest$ac_exeext; then + ac_cv_lib_intl_textdomain=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_lib_intl_textdomain=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5 +echo "${ECHO_T}$ac_cv_lib_intl_textdomain" >&6; } +if test $ac_cv_lib_intl_textdomain = yes; then + have_intl=yes +fi + + +if $have_intl +then + +cat >>confdefs.h <<\_ACEOF +#define WITH_LIBINTL 1 +_ACEOF + +fi + +{ echo "$as_me:$LINENO: checking FRAMEWORKLINK" >&5 +echo $ECHO_N "checking FRAMEWORKLINK... $ECHO_C" >&6; } +if test -z "$FRAMEWORKLINK" +then + case $ac_sys_system in + Darwin) + if test $have_intl + then + FRAMEWORKLINK="-lintl -framework CoreFoundation" + else + FRAMEWORKLINK="-framework CoreFoundation" + fi + esac +fi +{ echo "$as_me:$LINENO: result: $FRAMEWORKLINK" >&5 +echo "${ECHO_T}$FRAMEWORKLINK" >&6; } + # LINKFORSHARED are the flags passed to the $(CC) command that links # the python executable -- this is only needed for a few systems { echo "$as_me:$LINENO: checking LINKFORSHARED" >&5 @@ -13516,7 +13612,7 @@ Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";; # -u libsys_s pulls in all symbols in libsys Darwin/*) - LINKFORSHARED="$extra_undefs -framework CoreFoundation" + LINKFORSHARED="$LINKFORSHARED $FRAMEWORKLINK" if test "$enable_framework" then LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)' @@ -13824,77 +13920,6 @@ # pthread (first!) on Linux fi -# check if we need libintl for locale functions -{ echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5 -echo $ECHO_N "checking for textdomain in -lintl... $ECHO_C" >&6; } -if test "${ac_cv_lib_intl_textdomain+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lintl $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char textdomain (); -int -main () -{ -return textdomain (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_lib_intl_textdomain=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_intl_textdomain=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5 -echo "${ECHO_T}$ac_cv_lib_intl_textdomain" >&6; } -if test $ac_cv_lib_intl_textdomain = yes; then - -cat >>confdefs.h <<\_ACEOF -#define WITH_LIBINTL 1 -_ACEOF - -fi - - # checks for system dependent C++ extensions support case "$ac_sys_system" in AIX*) { echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5 @@ -26132,7 +26157,7 @@ BLDSHARED!$BLDSHARED$ac_delim CCSHARED!$CCSHARED$ac_delim LINKFORSHARED!$LINKFORSHARED$ac_delim -CFLAGSFORSHARED!$CFLAGSFORSHARED$ac_delim +FRAMEWORKLINK!$FRAMEWORKLINK$ac_delim _ACEOF if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then @@ -26174,6 +26199,7 @@ ac_delim='%!_!# ' for ac_last_try in false false false false false :; do cat >conf$$subs.sed <<_ACEOF +CFLAGSFORSHARED!$CFLAGSFORSHARED$ac_delim SHLIBS!$SHLIBS$ac_delim USE_SIGNAL_MODULE!$USE_SIGNAL_MODULE$ac_delim SIGNAL_OBJS!$SIGNAL_OBJS$ac_delim @@ -26197,7 +26223,7 @@ LTLIBOBJS!$LTLIBOBJS$ac_delim _ACEOF - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 21; then + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 22; then break elif $ac_last_try; then { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 Index: configure.in =================================================================== --- configure.in (revision 73142) +++ configure.in (working copy) @@ -1546,6 +1546,7 @@ AC_SUBST(BLDSHARED) AC_SUBST(CCSHARED) AC_SUBST(LINKFORSHARED) +AC_SUBST(FRAMEWORKLINK) # SO is the extension of shared libraries `(including the dot!) # -- usually .so, .sl on HP-UX, .dll on Cygwin AC_MSG_CHECKING(SO) @@ -1722,6 +1723,31 @@ esac fi AC_MSG_RESULT($CCSHARED) + +# check if we need libintl for locale functions +AC_CHECK_LIB(intl, textdomain, have_intl=yes) + +if $have_intl +then + AC_DEFINE(WITH_LIBINTL, 1, + [Define to 1 if libintl is needed for locale functions.]) +fi + +AC_MSG_CHECKING(FRAMEWORKLINK) +if test -z "$FRAMEWORKLINK" +then + case $ac_sys_system in + Darwin) + if test $have_intl + then + FRAMEWORKLINK="-lintl -framework CoreFoundation" + else + FRAMEWORKLINK="-framework CoreFoundation" + fi + esac +fi +AC_MSG_RESULT($FRAMEWORKLINK) + # 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) @@ -1735,8 +1761,8 @@ 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" + Darwin/*) + LINKFORSHARED="$LINKFORSHARED $FRAMEWORKLINK" if test "$enable_framework" then LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)' @@ -1817,11 +1843,6 @@ # pthread (first!) on Linux fi -# check if we need libintl for locale functions -AC_CHECK_LIB(intl, textdomain, - AC_DEFINE(WITH_LIBINTL, 1, - [Define to 1 if libintl is needed for locale functions.])) - # checks for system dependent C++ extensions support case "$ac_sys_system" in AIX*) AC_MSG_CHECKING(for genuine AIX C++ extensions support) Index: Makefile.pre.in =================================================================== --- Makefile.pre.in (revision 73142) +++ Makefile.pre.in (working copy) @@ -69,6 +69,7 @@ SGI_ABI= @SGI_ABI@ CCSHARED= @CCSHARED@ LINKFORSHARED= @LINKFORSHARED@ +FRAMEWORKLINK= @FRAMEWORKLINK@ ARFLAGS= @ARFLAGS@ # Extra C flags added for building the interpreter object files. CFLAGSFORSHARED=@CFLAGSFORSHARED@ @@ -463,10 +464,10 @@ -install_name $(DESTDIR)$(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK) \ -compatibility_version $(VERSION) \ -current_version $(VERSION) \ - -framework CoreFoundation; \ + $(FRAMEWORKLINK); \ else \ /usr/bin/libtool -o $(LDLIBRARY) -dynamic $(OTHER_LIBTOOL_OPT) $(LIBRARY) \ - @LIBTOOL_CRUFT@ -framework CoreFoundation;\ + @LIBTOOL_CRUFT@ $(FRAMEWORKLINK); \ fi $(INSTALL) -d -m $(DIRMODE) \ $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Resources/English.lproj