diff options
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 93 |
1 files changed, 69 insertions, 24 deletions
diff --git a/configure.ac b/configure.ac index b53dee2..c63e34b 100644 --- a/configure.ac +++ b/configure.ac @@ -3,7 +3,7 @@ dnl * Please run autoreconf to test your changes! * dnl *********************************************** # Set VERSION so we only need to edit in one place (i.e., here) -m4_define(PYTHON_VERSION, 3.3) +m4_define(PYTHON_VERSION, 3.4) AC_PREREQ(2.65) @@ -917,6 +917,7 @@ fi # Other platforms follow if test $enable_shared = "yes"; then + PY_ENABLE_SHARED=1 AC_DEFINE(Py_ENABLE_SHARED, 1, [Defined if Python is built as a shared library.]) case $ac_sys_system in CYGWIN*) @@ -972,6 +973,7 @@ if test $enable_shared = "yes"; then esac else # shared is disabled + PY_ENABLE_SHARED=0 case $ac_sys_system in CYGWIN*) BLDLIBRARY='$(LIBRARY)' @@ -1182,6 +1184,28 @@ yes) BASECFLAGS="$BASECFLAGS -Wno-unused-result" fi + AC_MSG_CHECKING(for -Werror=declaration-after-statement) + ac_save_cc="$CC" + CC="$CC -Werror=declaration-after-statement" + save_CFLAGS="$CFLAGS" + AC_CACHE_VAL(ac_cv_declaration_after_statement_warning, + AC_COMPILE_IFELSE( + [ + AC_LANG_PROGRAM([[]], [[]]) + ],[ + ac_cv_declaration_after_statement_warning=yes + ],[ + ac_cv_declaration_after_statement_warning=no + ])) + CFLAGS="$save_CFLAGS" + CC="$ac_save_cc" + AC_MSG_RESULT($ac_cv_declaration_after_statement_warning) + + if test $ac_cv_declaration_after_statement_warning = yes + then + BASECFLAGS="$BASECFLAGS -Werror=declaration-after-statement" + 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. @@ -1326,24 +1350,6 @@ then BASECFLAGS="$BASECFLAGS $ac_arch_flags" 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 -Wformat" - AC_COMPILE_IFELSE([ - AC_LANG_PROGRAM([[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). @@ -1566,7 +1572,7 @@ AC_CHECK_HEADERS(linux/netlink.h,,,[ ]) # On Linux, can.h and can/raw.h require sys/socket.h -AC_CHECK_HEADERS(linux/can.h linux/can/raw.h,,,[ +AC_CHECK_HEADERS(linux/can.h linux/can/raw.h linux/can/bcm.h,,,[ #ifdef HAVE_SYS_SOCKET_H #include <sys/socket.h> #endif @@ -2108,6 +2114,12 @@ then # -u libsys_s pulls in all symbols in libsys Darwin/*) LINKFORSHARED="$extra_undefs -framework CoreFoundation" + + # Issue #18075: the default maximum stack size (8MBytes) is too + # small for the default recursion limit. Increase the stack size + # to ensure that tests don't crash + LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED" + if test "$enable_framework" then LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)' @@ -2270,6 +2282,34 @@ AC_ARG_ENABLE(loadable-sqlite-extensions, AC_MSG_RESULT($enable_loadable_sqlite_extensions) +# Check for --with-tcltk-includes=path and --with-tcltk-libs=path +AC_SUBST(TCLTK_INCLUDES) +AC_SUBST(TCLTK_LIBS) +AC_MSG_CHECKING(for --with-tcltk-includes) +AC_ARG_WITH(tcltk-includes, + AS_HELP_STRING([--with-tcltk-includes='-I...'], [override search for Tcl and Tk include files]), + [], + [with_tcltk_includes="default"]) +AC_MSG_RESULT($with_tcltk_includes) +AC_MSG_CHECKING(for --with-tcltk-libs) +AC_ARG_WITH(tcltk-libs, + AS_HELP_STRING([--with-tcltk-libs='-L...'], [override search for Tcl and Tk libs]), + [], + [with_tcltk_libs="default"]) +AC_MSG_RESULT($with_tcltk_libs) +if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault +then + if test "x$with_tcltk_includes" != "x$with_tcltk_libs" + then + AC_MSG_ERROR([use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither]) + fi + TCLTK_INCLUDES="" + TCLTK_LIBS="" +else + TCLTK_INCLUDES="$with_tcltk_includes" + TCLTK_LIBS="$with_tcltk_libs" +fi + # Check for --with-dbmliborder AC_MSG_CHECKING(for --with-dbmliborder) AC_ARG_WITH(dbmliborder, @@ -2795,7 +2835,7 @@ fi # checks for library functions AC_CHECK_FUNCS(alarm accept4 setitimer getitimer bind_textdomain_codeset chown \ - clock confstr ctermid execv faccessat fchmod fchmodat fchown fchownat \ + clock confstr ctermid dup3 execv faccessat fchmod fchmodat fchown fchownat \ fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \ futimens futimes gai_strerror \ getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \ @@ -2815,7 +2855,7 @@ AC_CHECK_FUNCS(alarm accept4 setitimer getitimer bind_textdomain_codeset chown \ sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \ sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \ truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \ - wcscoll wcsftime wcsxfrm writev _getpty) + wcscoll wcsftime wcsxfrm wmemcmp writev _getpty) AC_CHECK_DECL(dirfd, AC_DEFINE(HAVE_DIRFD, 1, @@ -3082,7 +3122,7 @@ 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_REPLACE_FUNCS(dup2 strdup) AC_CHECK_FUNCS(getpgrp, AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <unistd.h>]], [[getpgrp(0);]])], [AC_DEFINE(GETPGRP_HAVE_ARG, 1, [Define if getpgrp() must be called as getpgrp(0).])], @@ -3955,6 +3995,11 @@ AC_MSG_CHECKING(LDVERSION) LDVERSION='$(VERSION)$(ABIFLAGS)' AC_MSG_RESULT($LDVERSION) +dnl define LIBPL after ABIFLAGS and LDVERSION is defined. +AC_SUBST(PY_ENABLE_SHARED) +LIBPL="${prefix}/lib/python${VERSION}/config-${LDVERSION}" +AC_SUBST(LIBPL) + # 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) @@ -4634,7 +4679,7 @@ if test "$have_gcc_asm_for_x87" = yes; then fi # generate output files -AC_CONFIG_FILES(Makefile.pre Modules/Setup.config Misc/python.pc) +AC_CONFIG_FILES(Makefile.pre Modules/Setup.config Misc/python.pc Misc/python-config.sh) AC_CONFIG_FILES([Modules/ld_so_aix], [chmod +x Modules/ld_so_aix]) AC_OUTPUT |