diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2007-12-25 16:36:50 -0600 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2007-12-26 11:57:08 -0600 |
commit | 327847b98765e29a10f70e2b7512bd9acd6a0570 (patch) | |
tree | 5c36dc861bf1c03bf6546688f43fddeed7b1e529 /source4/scripting/python | |
parent | 533cc583ed20efdfd6bee60f86d16fef3942898b (diff) | |
download | samba-327847b98765e29a10f70e2b7512bd9acd6a0570.tar.gz samba-327847b98765e29a10f70e2b7512bd9acd6a0570.tar.bz2 samba-327847b98765e29a10f70e2b7512bd9acd6a0570.zip |
r26597: Attempt to provide alternative for hosts that don't have python-config.
(This used to be commit fa5d1923efe5c1dc7ef12757b41f8d8eafcb1288)
Diffstat (limited to 'source4/scripting/python')
-rw-r--r-- | source4/scripting/python/config.m4 | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/source4/scripting/python/config.m4 b/source4/scripting/python/config.m4 index b6ca7966df..a629aa8f92 100644 --- a/source4/scripting/python/config.m4 +++ b/source4/scripting/python/config.m4 @@ -19,10 +19,16 @@ if test -z "$PYTHON_CONFIG"; then AC_MSG_WARN([No python-config found]) else working_python=yes + PYTHON_LDFLAGS=`$PYTHON_CONFIG --ldflags` + PYTHON_CFLAGS=`$PYTHON_CONFIG --cflags` fi -PYTHON_LDFLAGS=`$PYTHON_CONFIG --ldflags` -PYTHON_CFLAGS=`$PYTHON_CONFIG --cflags` +if test $working_python = no && test x$PYTHON != x +then + PYTHON_CFLAGS=`$PYTHON -c "from distutils import sysconfig; print '-I%s -I%s %s' % (sysconfig.get_python_inc(), sysconfig.get_python_inc(plat_specific=True), sysconfig.get_config_var('CFLAGS'))"` + PYTHON_LDFLAGS=`$PYTHON -c "from distutils import sysconfig; print '%s %s -lpython%s -L%s' % (sysconfig.get_config_var('LIBS'), sysconfig.get_config_var('SYSLIBS'), sysconfig.get_config_var('VERSION'), sysconfig.get_config_var('LIBPL'))"` + working_python=yes +fi SMB_EXT_LIB(EXT_LIB_PYTHON, [$PYTHON_LDFLAGS], [$PYTHON_CFLAGS]) |