Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
1c335e63
Commit
1c335e63
authored
Jan 01, 2010
by
Benjamin Peterson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use pkg-config to find the libffi headers when --with-system-ffi is used #6943
parent
8cdc9bc9
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
128 additions
and
3 deletions
+128
-3
Makefile.pre.in
Makefile.pre.in
+2
-0
configure
configure
+115
-2
configure.in
configure.in
+8
-0
setup.py
setup.py
+3
-1
No files found.
Makefile.pre.in
View file @
1c335e63
...
...
@@ -205,6 +205,8 @@ GRAMMAR_C= $(srcdir)/Python/graminit.c
GRAMMAR_INPUT
=
$(srcdir)
/Grammar/Grammar
LIBFFI_INCLUDEDIR
=
@LIBFFI_INCLUDEDIR@
##########################################################################
# Parser
PGEN
=
Parser/pgen
$(EXE)
...
...
configure
View file @
1c335e63
#! /bin/sh
# From configure.in Revision: 771
89
.
# From configure.in Revision: 771
93
.
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.61 for python 2.7.
#
...
...
@@ -717,6 +717,8 @@ CCSHARED
LINKFORSHARED
CFLAGSFORSHARED
SHLIBS
PKG_CONFIG
LIBFFI_INCLUDEDIR
USE_SIGNAL_MODULE
SIGNAL_OBJS
USE_THREAD_MODULE
...
...
@@ -15543,6 +15545,115 @@ if test "${with_system_ffi+set}" = set; then
fi
if
test
"
$with_system_ffi
"
=
"yes"
;
then
if
test
-n
"
$ac_tool_prefix
"
;
then
# Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
set
dummy
${
ac_tool_prefix
}
pkg-config
;
ac_word
=
$2
{
echo
"
$as_me
:
$LINENO
: checking for
$ac_word
"
>
&5
echo
$ECHO_N
"checking for
$ac_word
...
$ECHO_C
"
>
&6
;
}
if
test
"
${
ac_cv_path_PKG_CONFIG
+set
}
"
=
set
;
then
echo
$ECHO_N
"(cached)
$ECHO_C
"
>
&6
else
case
$PKG_CONFIG
in
[
\\
/]
*
|
?:[
\\
/]
*
)
ac_cv_path_PKG_CONFIG
=
"
$PKG_CONFIG
"
# Let the user override the test with a path.
;;
*
)
as_save_IFS
=
$IFS
;
IFS
=
$PATH_SEPARATOR
for
as_dir
in
$PATH
do
IFS
=
$as_save_IFS
test
-z
"
$as_dir
"
&&
as_dir
=
.
for
ac_exec_ext
in
''
$ac_executable_extensions
;
do
if
{
test
-f
"
$as_dir
/
$ac_word$ac_exec_ext
"
&&
$as_test_x
"
$as_dir
/
$ac_word$ac_exec_ext
"
;
}
;
then
ac_cv_path_PKG_CONFIG
=
"
$as_dir
/
$ac_word$ac_exec_ext
"
echo
"
$as_me
:
$LINENO
: found
$as_dir
/
$ac_word$ac_exec_ext
"
>
&5
break
2
fi
done
done
IFS
=
$as_save_IFS
;;
esac
fi
PKG_CONFIG
=
$ac_cv_path_PKG_CONFIG
if
test
-n
"
$PKG_CONFIG
"
;
then
{
echo
"
$as_me
:
$LINENO
: result:
$PKG_CONFIG
"
>
&5
echo
"
${
ECHO_T
}
$PKG_CONFIG
"
>
&6
;
}
else
{
echo
"
$as_me
:
$LINENO
: result: no"
>
&5
echo
"
${
ECHO_T
}
no"
>
&6
;
}
fi
fi
if
test
-z
"
$ac_cv_path_PKG_CONFIG
"
;
then
ac_pt_PKG_CONFIG
=
$PKG_CONFIG
# Extract the first word of "pkg-config", so it can be a program name with args.
set
dummy pkg-config
;
ac_word
=
$2
{
echo
"
$as_me
:
$LINENO
: checking for
$ac_word
"
>
&5
echo
$ECHO_N
"checking for
$ac_word
...
$ECHO_C
"
>
&6
;
}
if
test
"
${
ac_cv_path_ac_pt_PKG_CONFIG
+set
}
"
=
set
;
then
echo
$ECHO_N
"(cached)
$ECHO_C
"
>
&6
else
case
$ac_pt_PKG_CONFIG
in
[
\\
/]
*
|
?:[
\\
/]
*
)
ac_cv_path_ac_pt_PKG_CONFIG
=
"
$ac_pt_PKG_CONFIG
"
# Let the user override the test with a path.
;;
*
)
as_save_IFS
=
$IFS
;
IFS
=
$PATH_SEPARATOR
for
as_dir
in
$PATH
do
IFS
=
$as_save_IFS
test
-z
"
$as_dir
"
&&
as_dir
=
.
for
ac_exec_ext
in
''
$ac_executable_extensions
;
do
if
{
test
-f
"
$as_dir
/
$ac_word$ac_exec_ext
"
&&
$as_test_x
"
$as_dir
/
$ac_word$ac_exec_ext
"
;
}
;
then
ac_cv_path_ac_pt_PKG_CONFIG
=
"
$as_dir
/
$ac_word$ac_exec_ext
"
echo
"
$as_me
:
$LINENO
: found
$as_dir
/
$ac_word$ac_exec_ext
"
>
&5
break
2
fi
done
done
IFS
=
$as_save_IFS
;;
esac
fi
ac_pt_PKG_CONFIG
=
$ac_cv_path_ac_pt_PKG_CONFIG
if
test
-n
"
$ac_pt_PKG_CONFIG
"
;
then
{
echo
"
$as_me
:
$LINENO
: result:
$ac_pt_PKG_CONFIG
"
>
&5
echo
"
${
ECHO_T
}
$ac_pt_PKG_CONFIG
"
>
&6
;
}
else
{
echo
"
$as_me
:
$LINENO
: result: no"
>
&5
echo
"
${
ECHO_T
}
no"
>
&6
;
}
fi
if
test
"x
$ac_pt_PKG_CONFIG
"
=
x
;
then
PKG_CONFIG
=
""
else
case
$cross_compiling
:
$ac_tool_warned
in
yes
:
)
{
echo
"
$as_me
:
$LINENO
: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet. If you think this
configuration is useful to you, please write to autoconf@gnu.org."
>
&5
echo
"
$as_me
: WARNING: In the future, Autoconf will not detect cross-tools
whose name does not start with the host triplet. If you think this
configuration is useful to you, please write to autoconf@gnu.org."
>
&2
;
}
ac_tool_warned
=
yes
;;
esac
PKG_CONFIG
=
$ac_pt_PKG_CONFIG
fi
else
PKG_CONFIG
=
"
$ac_cv_path_PKG_CONFIG
"
fi
LIBFFI_INCLUDEDIR
=
"
`
"
$PKG_CONFIG
"
libffi
--cflags-only-I
2>/dev/null |
sed
-e
's/^-I//;s/ *$//'
`
"
else
LIBFFI_INCLUDEDIR
=
""
fi
{
echo
"
$as_me
:
$LINENO
: result:
$with_system_ffi
"
>
&5
echo
"
${
ECHO_T
}
$with_system_ffi
"
>
&6
;
}
...
...
@@ -28351,6 +28462,8 @@ CCSHARED!$CCSHARED$ac_delim
LINKFORSHARED!
$LINKFORSHARED$ac_delim
CFLAGSFORSHARED!
$CFLAGSFORSHARED$ac_delim
SHLIBS!
$SHLIBS$ac_delim
PKG_CONFIG!
$PKG_CONFIG$ac_delim
LIBFFI_INCLUDEDIR!
$LIBFFI_INCLUDEDIR$ac_delim
USE_SIGNAL_MODULE!
$USE_SIGNAL_MODULE$ac_delim
SIGNAL_OBJS!
$SIGNAL_OBJS$ac_delim
USE_THREAD_MODULE!
$USE_THREAD_MODULE$ac_delim
...
...
@@ -28374,7 +28487,7 @@ SRCDIRS!$SRCDIRS$ac_delim
LTLIBOBJS!
$LTLIBOBJS$ac_delim
_ACEOF
if
test
`
sed
-n
"s/.*
$ac_delim
\$
/X/p"
conf
$$
subs.sed |
grep
-c
X
`
=
2
5
;
then
if
test
`
sed
-n
"s/.*
$ac_delim
\$
/X/p"
conf
$$
subs.sed |
grep
-c
X
`
=
2
7
;
then
break
elif
$ac_last_try
;
then
{
{
echo
"
$as_me
:
$LINENO
: error: could not make
$CONFIG_STATUS
"
>
&5
...
...
configure.in
View file @
1c335e63
...
...
@@ -1980,6 +1980,14 @@ AC_MSG_CHECKING(for --with-system-ffi)
AC_ARG_WITH(system_ffi,
AC_HELP_STRING(--with-system-ffi, build _ctypes module using an installed ffi library))
if test "$with_system_ffi" = "yes"; then
AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
else
LIBFFI_INCLUDEDIR=""
fi
AC_SUBST(LIBFFI_INCLUDEDIR)
AC_MSG_RESULT($with_system_ffi)
# Check for --with-dbmliborder
...
...
setup.py
View file @
1c335e63
...
...
@@ -1790,7 +1790,9 @@ class PyBuildExt(build_ext):
# in /usr/include/ffi
inc_dirs
.
append
(
'/usr/include/ffi'
)
ffi_inc
=
find_file
(
'ffi.h'
,
[],
inc_dirs
)
ffi_inc
=
[
sysconfig
.
get_config_var
(
"LIBFFI_INCLUDEDIR"
)]
if
not
ffi_inc
:
ffi_inc
=
find_file
(
'ffi.h'
,
[],
inc_dirs
)
if
ffi_inc
is
not
None
:
ffi_h
=
ffi_inc
[
0
]
+
'/ffi.h'
fp
=
open
(
ffi_h
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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