summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@redhat.com>2019-05-23 03:30:23 +0200
committerGitHub <noreply@github.com>2019-05-23 03:30:23 +0200
commit0a8e57248b913851640c64375600f05157c997df (patch)
tree79352007eef8deb7530c38d460554183e6c960a2 /configure
parentbpo-27737: Allow whitespace only headers encoding (#13478) (diff)
downloadcpython-0a8e57248b913851640c64375600f05157c997df.tar.gz
cpython-0a8e57248b913851640c64375600f05157c997df.tar.bz2
cpython-0a8e57248b913851640c64375600f05157c997df.zip
bpo-36721: Add --embed option to python-config (GH-13500)
To embed Python into an application, a new --embed option must be passed to "python3-config --libs --embed" to get "-lpython3.8" (link the application to libpython). To support both 3.8 and older, try "python3-config --libs --embed" first and fallback to "python3-config --libs" (without --embed) if the previous command fails. Add a pkg-config "python-3.8-embed" module to embed Python into an application: "pkg-config python-3.8-embed --libs" includes "-lpython3.8". To support both 3.8 and older, try "pkg-config python-X.Y-embed --libs" first and fallback to "pkg-config python-X.Y --libs" (without --embed) if the previous command fails (replace "X.Y" with the Python version). On the other hand, "pkg-config python3.8 --libs" no longer contains "-lpython3.8". C extensions must not be linked to libpython (except on Android, case handled by the script); this change is backward incompatible on purpose. "make install" now also installs "python-3.8-embed.pc".
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure3
1 files changed, 2 insertions, 1 deletions
diff --git a/configure b/configure
index a0767b97136..72889b9d2ef 100755
--- a/configure
+++ b/configure
@@ -17315,7 +17315,7 @@ fi
# generate output files
-ac_config_files="$ac_config_files Makefile.pre Misc/python.pc Misc/python-config.sh"
+ac_config_files="$ac_config_files Makefile.pre Misc/python.pc Misc/python-embed.pc Misc/python-config.sh"
ac_config_files="$ac_config_files Modules/ld_so_aix"
@@ -18018,6 +18018,7 @@ do
"Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
"Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
"Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
+ "Misc/python-embed.pc") CONFIG_FILES="$CONFIG_FILES Misc/python-embed.pc" ;;
"Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
"Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;