diff options
Diffstat (limited to 'source4/scripting')
-rw-r--r-- | source4/scripting/python/config.m4 | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/source4/scripting/python/config.m4 b/source4/scripting/python/config.m4 index 5607accb7c..af13b6ae69 100644 --- a/source4/scripting/python/config.m4 +++ b/source4/scripting/python/config.m4 @@ -48,9 +48,14 @@ fi if test -z "$PYTHON_CONFIG"; then AC_MSG_WARN([No python-config found]) else - base=`$PYTHON_CONFIG --prefix` - TRY_LINK_PYTHON([`echo -n -L${base}/lib " "; $PYTHON_CONFIG --ldflags`], [`$PYTHON_CONFIG --includes`]) - TRY_LINK_PYTHON([`echo -n -L${base}/lib " "; $PYTHON_CONFIG --ldflags`], [`$PYTHON_CONFIG --cflags`]) + TRY_LINK_PYTHON([`$PYTHON_CONFIG --ldflags`], [`$PYTHON_CONFIG --includes`]) + TRY_LINK_PYTHON([`$PYTHON_CONFIG --ldflags`], [`$PYTHON_CONFIG --cflags`]) + if x$working_python = xno; then + # It seems the library path isn't included on some systems + base=`$PYTHON_CONFIG --prefix` + TRY_LINK_PYTHON([`echo -n -L${base}/lib " "; $PYTHON_CONFIG --ldflags`], [`$PYTHON_CONFIG --includes`]) + TRY_LINK_PYTHON([`echo -n -L${base}/lib " "; $PYTHON_CONFIG --ldflags`], [`$PYTHON_CONFIG --cflags`]) + fi fi if test x$PYTHON != x |