From: Colin Leroy Date: Fri, 14 Jun 2013 08:23:11 +0000 (+0200) Subject: Fix configure failing when cross-building for win32 X-Git-Tag: 3.9.3~120 X-Git-Url: http://git.claws-mail.org/?p=claws.git;a=commitdiff_plain;h=d74bd45f9a003128e049a42a5a06606944fc286c;ds=inline Fix configure failing when cross-building for win32 --- diff --git a/configure.ac b/configure.ac index 3c692110d..23b0d207b 100644 --- a/configure.ac +++ b/configure.ac @@ -1198,21 +1198,23 @@ AM_PATH_PYTHON([2.5], [ fi if test x"$HAVE_PYTHON" = xyes; then - # libpython.so - PYTHON_SHARED_LIB="libpython${PYTHON_VERSION}.so" - _save_libs="$LIBS" - LIBS="-ldl" - AC_MSG_CHECKING([whether to dlopen $PYTHON_SHARED_LIB works]) - AC_RUN_IFELSE( - [AC_LANG_PROGRAM( - [#include - #define PYTHON_SO_FILE "${PYTHON_SHARED_LIB}" + if test x"$platform_win32" = xno; then + # libpython.so + PYTHON_SHARED_LIB="libpython${PYTHON_VERSION}.so" + _save_libs="$LIBS" + LIBS="-ldl" + AC_MSG_CHECKING([whether to dlopen $PYTHON_SHARED_LIB works]) + AC_RUN_IFELSE( + [AC_LANG_PROGRAM( + [#include + #define PYTHON_SO_FILE "${PYTHON_SHARED_LIB}" + ], + [if (!dlopen(PYTHON_SO_FILE, RTLD_NOW | RTLD_GLOBAL)) return 1; return 0;]) ], - [if (!dlopen(PYTHON_SO_FILE, RTLD_NOW | RTLD_GLOBAL)) return 1; return 0;]) - ], - [found_libpython_so="yes"], - [found_libpython_so="no"], - [AC_MSG_FAILURE([cross-compiling not supported])]) + [found_libpython_so="yes"], + [found_libpython_so="no"], + [AC_MSG_FAILURE([cross-compiling not supported])]) + fi if test x"$found_libpython_so" != x"yes"; then AC_MSG_RESULT(no) AC_MSG_WARN(Could not find Python shared libary: ${PYTHON_SHARED_LIB}. Maybe you need to install development packages for Python.)