diff -Naur poppler-0.5.4-orig/configure.ac poppler-0.5.4/configure.ac --- poppler-0.5.4-orig/configure.ac 2006-11-22 19:54:56.000000000 -0800 +++ poppler-0.5.4/configure.ac 2006-11-23 00:04:28.000000000 -0800 @@ -2,9 +2,9 @@ AC_INIT(poppler, 0.5.4) AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION) AM_CONFIG_HEADER(config.h) -AM_CONFIG_HEADER(poppler/poppler-config.h) dnl ##### Checks for programs. +AC_LIBTOOL_WIN32_DLL AC_PROG_LIBTOOL AC_PROG_CC AC_PROG_CXX @@ -68,6 +68,21 @@ AC_DEFINE(HAVE_FSEEK64) fi + +dnl Test for Win32 +AC_MSG_CHECKING([if building for some Win32 platform]) +case "$host" in + *-*-mingw*|*-*-cygwin*) + platform_win32=yes + ;; + *) + platform_win32=no + ;; +esac +AC_MSG_RESULT($platform_win32) +AM_CONDITIONAL(PLATFORM_WIN32, test x$platform_win32 = xyes) + + dnl Test for zlib AC_ARG_ENABLE([zlib], [AS_HELP_STRING([--enable-zlib],[Build with zlib])], @@ -183,9 +198,9 @@ enable_poppler_glib=$enableval, enable_poppler_glib="try") if test x$enable_poppler_glib = xyes; then - PKG_CHECK_MODULES(POPPLER_GLIB, gdk-2.0 >= 2.4.0 glib >= 2.6) + PKG_CHECK_MODULES(POPPLER_GLIB, gdk-2.0 >= 2.4.0 glib-2.0 >= 2.6) elif test x$enable_poppler_glib = xtry; then - PKG_CHECK_MODULES(POPPLER_GLIB, gdk-2.0 >= 2.4.0, + PKG_CHECK_MODULES(POPPLER_GLIB, gdk-2.0 >= 2.4.0 glib-2.0 >= 2.6, [enable_poppler_glib="yes"], [enable_poppler_glib="no"]) fi @@ -315,6 +330,7 @@ fofi/Makefile splash/Makefile poppler/Makefile +poppler/poppler-config.h utils/Makefile glib/Makefile glib/poppler-features.h diff -Naur poppler-0.5.4-orig/glib/Makefile.am poppler-0.5.4/glib/Makefile.am --- poppler-0.5.4-orig/glib/Makefile.am 2006-11-22 19:54:56.000000000 -0800 +++ poppler-0.5.4/glib/Makefile.am 2006-11-22 22:15:40.000000000 -0800 @@ -86,7 +86,10 @@ $(FREETYPE_LIBS) \ $(cairo_libs) -libpoppler_glib_la_LDFLAGS = -version-info 1:0:0 +if PLATFORM_WIN32 +no_undefined = -no-undefined +endif +libpoppler_glib_la_LDFLAGS = -version-info 1:0:0 $(no_undefined) noinst_PROGRAMS = test-poppler-glib diff -Naur poppler-0.5.4-orig/m4/libjpeg.m4 poppler-0.5.4/m4/libjpeg.m4 --- poppler-0.5.4-orig/m4/libjpeg.m4 2006-11-22 19:54:56.000000000 -0800 +++ poppler-0.5.4/m4/libjpeg.m4 2006-11-22 21:11:08.000000000 -0800 @@ -68,7 +68,7 @@ dnl then search the headers (can't use simply AC_TRY_xxx, as jpeglib.h dnl requires system dependent includes loaded before it) -jpeg_incdirs="$includedir /usr/include /usr/local/include " +jpeg_incdirs="`eval echo $includedir` /usr/include /usr/local/include " AC_FIND_FILE(jpeglib.h, $jpeg_incdirs, jpeg_incdir) test "x$jpeg_incdir" = xNO && jpeg_incdir= diff -Naur poppler-0.5.4-orig/poppler/CairoFontEngine.cc poppler-0.5.4/poppler/CairoFontEngine.cc --- poppler-0.5.4-orig/poppler/CairoFontEngine.cc 2006-11-22 19:54:56.000000000 -0800 +++ poppler-0.5.4/poppler/CairoFontEngine.cc 2006-11-22 19:58:16.000000000 -0800 @@ -18,6 +18,7 @@ #include #include "goo/gfile.h" #include "Error.h" +#include #ifdef USE_GCC_PRAGMAS #pragma implementation diff -Naur poppler-0.5.4-orig/poppler/Makefile.am poppler-0.5.4/poppler/Makefile.am --- poppler-0.5.4-orig/poppler/Makefile.am 2006-11-22 19:54:56.000000000 -0800 +++ poppler-0.5.4/poppler/Makefile.am 2006-11-22 22:12:13.000000000 -0800 @@ -96,7 +96,10 @@ $(FREETYPE_LIBS) \ $(FONTCONFIG_LIBS) -libpoppler_la_LDFLAGS = -version-info 1:0:0 +if PLATFORM_WIN32 +no_undefined = -no-undefined +endif +libpoppler_la_LDFLAGS = -version-info 1:0:0 $(no_undefined) if ENABLE_XPDF_HEADERS