diff options
| author | 2015-01-29 22:21:27 +0100 | |
|---|---|---|
| committer | 2015-01-29 22:21:27 +0100 | |
| commit | 1ff3448d2e27f1bac8d2f0af8b8e952854860278 (patch) | |
| tree | 6f747b981b75b8943f55f1a80980c84402a06960 /m4 | |
| parent | 344409e1d1ad917d377b256214c5411dda82e6b0 (diff) | |
| download | libimobiledevice-1ff3448d2e27f1bac8d2f0af8b8e952854860278.tar.gz libimobiledevice-1ff3448d2e27f1bac8d2f0af8b8e952854860278.tar.bz2 | |
m4: Use python-config if available to fix Python 3 support on newer distros
Diffstat (limited to 'm4')
| -rw-r--r-- | m4/ac_python_devel.m4 | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/m4/ac_python_devel.m4 b/m4/ac_python_devel.m4 index 2e7406e..545c607 100644 --- a/m4/ac_python_devel.m4 +++ b/m4/ac_python_devel.m4 | |||
| @@ -151,6 +151,9 @@ $ac_distutils_result]) | |||
| 151 | # Check for Python include path | 151 | # Check for Python include path |
| 152 | # | 152 | # |
| 153 | AC_MSG_CHECKING([for Python include path]) | 153 | AC_MSG_CHECKING([for Python include path]) |
| 154 | if type $PYTHON-config; then | ||
| 155 | PYTHON_CPPFLAGS=`$PYTHON-config --includes` | ||
| 156 | fi | ||
| 154 | if test -z "$PYTHON_CPPFLAGS"; then | 157 | if test -z "$PYTHON_CPPFLAGS"; then |
| 155 | python_path=`$PYTHON -c "import distutils.sysconfig; \ | 158 | python_path=`$PYTHON -c "import distutils.sysconfig; \ |
| 156 | print(distutils.sysconfig.get_python_inc());"` | 159 | print(distutils.sysconfig.get_python_inc());"` |
| @@ -166,6 +169,9 @@ $ac_distutils_result]) | |||
| 166 | # Check for Python library path | 169 | # Check for Python library path |
| 167 | # | 170 | # |
| 168 | AC_MSG_CHECKING([for Python library path]) | 171 | AC_MSG_CHECKING([for Python library path]) |
| 172 | if type $PYTHON-config; then | ||
| 173 | PYTHON_LDFLAGS=`$PYTHON-config --ldflags` | ||
| 174 | fi | ||
| 169 | if test -z "$PYTHON_LDFLAGS"; then | 175 | if test -z "$PYTHON_LDFLAGS"; then |
| 170 | # (makes two attempts to ensure we've got a version number | 176 | # (makes two attempts to ensure we've got a version number |
| 171 | # from the interpreter) | 177 | # from the interpreter) |
