- ac_link='$CC $CPPFLAGS $CFLAGS $PYTHON_INCLUDES conftest.c $LDFLAGS ${PYTHON_LIB2} $LIBS -o conftest${ac_exeext}'
- if { (eval echo python.m4: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- AC_MSG_RESULT(yes)
- PYTHON_LIB="${PYTHON_LIB2}"
- PYTHON_OK=yes
+ echo "configure: failed program was:" >&5
+ cat conftest.c >&5
+ AC_MSG_RESULT(no)
+ fi
+ rm -f conftest*
+ if test "x$PYTHON_OK" = "xyes";then
+ AC_MSG_CHECKING([for Python-Imaging])
+ cat > conftest.c << EOF
+#include <Python.h>
+#include <Imaging.h>
+
+int main()
+{
+ Py_Main(0, 0);
+ return 0;
+}
+EOF
+ if test "$HAVE_PYTHON_IMAGING_LIB"; then
+ ac_link='$CC $CPPFLAGS $CFLAGS $PYTHON_INCLUDES conftest.c $LDFLAGS ${PYTHON_LIB2} $LIBS -o conftest${ac_exeext}'
+ if { (eval echo python.m4: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ PYTHON_LIB="${PYTHON_LIB2}"
+ AC_DEFINE_UNQUOTED(HAVE_PYTHON_IMAGING, 1)
+ HAVE_PYTHON_IMAGING=yes
+ export HAVE_PYTHON_IMAGING
+ AC_SUBST(HAVE_PYTHON_IMAGING)
+ AC_MSG_RESULT(yes)
+ else
+ echo "configure: failed program was:" >&5
+ cat conftest.c >&5
+ AC_MSG_RESULT(no)
+ fi