Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ISC Open Source Projects
Kea
Commits
de063908
Commit
de063908
authored
Jun 15, 2011
by
Jelte Jansen
Browse files
[trac710] Check if we need -Wno-unused-parameter for Python.h
parent
f3813c74
Changes
1
Hide whitespace changes
Inline
Side-by-side
configure.ac
View file @
de063908
...
...
@@ -184,6 +184,30 @@ CPPFLAGS="$CPPFLAGS ${PYTHON_INCLUDES}"
AC_CHECK_HEADERS([Python.h],, AC_MSG_ERROR([Missing Python.h]))
CPPFLAGS="$CPPFLAGS_SAVED"
# Python 3.2 has an unused parameter in one of its headers. This
# has been reported, but not fixed as of yet, so we check if we need
# to set -Wno-unused-parameter.
CPPFLAGS_SAVED="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS ${PYTHON_INCLUDES} -Wall -Wextra -Werror"
AC_MSG_CHECKING([whether we need -Wno-unused-parameter for python])
AC_TRY_COMPILE(
[#include <Python.h>],
[],
[AC_MSG_RESULT(no)],
[
CPPFLAGS="$CPPFLAGS -Wno-unused-parameter"
AC_TRY_COMPILE([#include <Python.h>],
[],
[AC_MSG_RESULT(yes)
PYTHON_INCLUDES="${PYTHON_INCLUDES} -Wno-unused-parameter"
AC_SUBST(PYTHON_INCLUDES)
],
[AC_MSG_ERROR([Can't compile against Python.h])]
)
]
)
CPPFLAGS="$CPPFLAGS_SAVED"
# Check for python library. Needed for Python-wrapper libraries.
LDFLAGS_SAVED="$LDFLAGS"
LDFLAGS="$LDFLAGS $PYTHON_LDFLAGS"
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment