summaryrefslogtreecommitdiffstats
path: root/configure.in
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2006-10-19 10:58:46 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2006-10-19 10:58:46 (GMT)
commitaac1316222c7e4a073af1634f2eef0a872a3dafb (patch)
treef200e0b491ba8b0bccc490a116b48763633e0c48 /configure.in
parentb03c35bac3a17aad776a1ef8e81706cf56412143 (diff)
downloadcpython-aac1316222c7e4a073af1634f2eef0a872a3dafb.zip
cpython-aac1316222c7e4a073af1634f2eef0a872a3dafb.tar.gz
cpython-aac1316222c7e4a073af1634f2eef0a872a3dafb.tar.bz2
Add check for the PyArg_ParseTuple format, and declare
it if it is supported.
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in15
1 files changed, 15 insertions, 0 deletions
diff --git a/configure.in b/configure.in
index 14f2918..4ab84dd 100644
--- a/configure.in
+++ b/configure.in
@@ -890,6 +890,21 @@ else
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)
+ )
+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).