diff --git a/m4/moo-python.m4 b/m4/moo-python.m4 index b32d4a88..4bc33f80 100644 --- a/m4/moo-python.m4 +++ b/m4/moo-python.m4 @@ -137,7 +137,6 @@ $ac_distutils_result]) # Check for Python extra linker flags # if PYTHON_EXTRA_LIBS is set, do not do anything if test $python_found = yes; then - AC_MSG_CHECKING([Python extra linker flags]) if test -z "$PYTHON_EXTRA_LIBS"; then PYTHON_EXTRA_LIBS=`$PYTHON -c "import distutils.sysconfig; \ @@ -145,12 +144,15 @@ $ac_distutils_result]) print conf('LOCALMODLIBS'), conf('LIBS')"` PYTHON_EXTRA_LDFLAGS=`$PYTHON -c "import distutils.sysconfig; \ conf = distutils.sysconfig.get_config_var; \ - print conf('LINKFORSHARED')"` - PYTHON_EXTRA_LIBS="$PYTHON_EXTRA_LIBS $PYTHON_EXTRA_LDFLAGS" + print conf('LINKFORSHARED'), conf('LDFLAGS')"` fi + AC_MSG_CHECKING([Python extra libs]) AC_MSG_RESULT([$PYTHON_EXTRA_LIBS]) + AC_MSG_CHECKING([Python extra linker flags]) + AC_MSG_RESULT([$PYTHON_EXTRA_LDFLAGS]) AC_SUBST([PYTHON_EXTRA_LIBS]) + AC_SUBST([PYTHON_EXTRA_LDFLAGS]) fi if test $python_found = yes; then diff --git a/tests/Makefile.am b/tests/Makefile.am index 693f7e21..b17943f6 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -72,9 +72,9 @@ endif bin_PROGRAMS = $(medit) -ldflags = -export-dynamic +ldflags = -export-dynamic $(PYTHON_EXTRA_LDFLAGS) ldadd = ../moo/libmoo.la -test_ldflags = -export-dynamic +test_ldflags = -export-dynamic $(PYTHON_EXTRA_LDFLAGS) test_ldadd = ../moo/libmoo-test.la if MOO_OS_MINGW