Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(442)

Unified Diff: aclocal.m4

Issue 566870043: Drop requirement for python-devel (Closed)
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | config.hh.in » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: aclocal.m4
diff --git a/aclocal.m4 b/aclocal.m4
index dc088ea3f988c2285782093979835b450fdf317f..50a5f2129069f4cda814a76f38ff2038f4210805 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -1126,89 +1126,6 @@ AC_DEFUN(STEPMAKE_PYTHON, [
])
-# Check for python-config, between minimum ($2) and maximum version ($3).
-# If missing, add entry to missing-list ($1, one of 'OPTIONAL', 'REQUIRED')
-AC_DEFUN(STEPMAKE_PYTHON_DEVEL, [
- AC_ARG_WITH(python-include,
- [AS_HELP_STRING(
- [--with-python-include=DIR],
- [location of the python include dir])],
- [if test "$withval" = "yes" -o "$withval" = "no"; then
- AC_MSG_WARN(Usage: --with-python-include=includedir)
- else
- PYTHON_CFLAGS="-I${withval}"
- fi])
-
- AC_ARG_WITH(python-lib,
- [AS_HELP_STRING(
- [--with-python-lib=NAME],
- [name of the python lib])],
- [if test "$withval" = "yes" -o "$withval" = "no"; then
- AC_MSG_WARN(Usage: --with-python-lib=name)
- else
- LDFLAGS="$LDFLAGS -l${withval}"
- fi])
-
- STEPMAKE_PYTHON($1, $2, $3)
- AC_CHECK_PROGS(PYTHON_CONFIG, `basename $PYTHON`-config, no)
-
- if test -z "$PYTHON_CFLAGS" -a "$PYTHON_CONFIG" != "no"; then
- # We massage $PYTHON_CFLAGS:
- #
- # . Clean out junk (http://bugs.python.org/issue3290).
- # . Python headers may need some '-f*' flags, leave them in.
- # . Since we are later on adding $PYTHON_CFLAGS to $CPPFLAGS, remove
- # the '-Wstrict-prototypes' warning, which is not valid for C++,
- # and which some ports of Python add (for example macports).
- #
- # This leads to the following BREs for sed:
- #
- # s/-[WDOm][[:alnum:][:punct:]][[:alnum:][:punct:]]*//g
- # s/-arch [^[:space:]]*//g
- # s/-Wstrict-prototypes//g
- #
- # However, the first BRE strips off parts of valid options, thus
- # resulting in invalid gcc arguments (Gentoo bug #415793). For
- # instance, '-floop-strip-mime' becomes '-floop-strip', and
- # '-fvect-cost-model' becomes '-fvect-cost'.
- #
- # Our tentative fix is to require a non-alphanumeric character
- # before the initial hyphen of the BRE or the hyphen being the first
- # character in the string.
-dnl To prevent m4 eating brackets we add one more level of brackets
-dnl for proper quoting.
- [PYTHON_CFLAGS=`$PYTHON_CONFIG --cflags \
- | sed -e 's/\(^\|[^[:alnum:]]\)-[WDOm][[:alnum:][:punct:]][[:alnum:][:punct:]]*//g' \
- -e 's/-arch [^[:space:]]*//g' \
- -e 's/-Wstrict-prototypes//g'`]
- PYTHON_LDFLAGS=`$PYTHON_CONFIG --ldflags`
- fi
-
- if test -z "$PYTHON_CFLAGS" -a "$cross_compiling" = "no"; then
- changequote(<<, >>)#dnl
- # alternatively, for python >= 2.0
- # 'import sys, distutils.sysconfig; \
- # sys.stdout.write (distutils.sysconfig.get_python_inc ())'
- PYTHON_INCLUDE=`$PYTHON -c 'import sys; \
- sys.stdout.write ("%s/include/python%s" % (sys.prefix, sys.version[:3]))'`
- PYTHON_CFLAGS="-I$PYTHON_INCLUDE"
- changequote([, ])#dnl
- fi
-
- if test -z "$PYTHON_HEADER"; then
- CPPFLAGS="$PYTHON_CFLAGS $CPPFLAGS"
- AC_CHECK_HEADERS([Python.h],[PYTHON_HEADER=yes])
- fi
-
- if test -z "$PYTHON_HEADER"; then
- warn="Python.h (python-devel, python-dev or libpython-dev package)"
- STEPMAKE_ADD_ENTRY($1, $warn)
- fi
- AC_SUBST(PYTHON_CFLAGS)
- AC_SUBST(PYTHON_LDFLAGS)
-])
-
-
AC_DEFUN(STEPMAKE_STL_DATA_METHOD, [
AC_CACHE_CHECK([for stl.data () method],
[stepmake_cv_stl_data_method],
« no previous file with comments | « no previous file | config.hh.in » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b