summaryrefslogtreecommitdiff
path: root/Build
diff options
context:
space:
mode:
Diffstat (limited to 'Build')
-rw-r--r--Build/source/texk/web2c/ChangeLog4
-rw-r--r--Build/source/texk/web2c/c-auto.in9
-rwxr-xr-xBuild/source/texk/web2c/configure121
-rw-r--r--Build/source/texk/web2c/configure.ac42
-rw-r--r--Build/source/texk/web2c/luatexdir/ChangeLog4
-rw-r--r--Build/source/texk/web2c/luatexdir/lua/lepdflib.cc28
6 files changed, 206 insertions, 2 deletions
diff --git a/Build/source/texk/web2c/ChangeLog b/Build/source/texk/web2c/ChangeLog
index a944ff886f3..66d87b7a18d 100644
--- a/Build/source/texk/web2c/ChangeLog
+++ b/Build/source/texk/web2c/ChangeLog
@@ -1,3 +1,7 @@
+2011-10-06 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * configure.ac: Add poppler feature tests for luaTeX.
+
2011-10-04 Peter Breitenlohner <peb@mppmu.mpg.de>
* am/web.am (DISTCLEANFILES): Preserve distributed files.
diff --git a/Build/source/texk/web2c/c-auto.in b/Build/source/texk/web2c/c-auto.in
index c2208184515..b6a3138c87e 100644
--- a/Build/source/texk/web2c/c-auto.in
+++ b/Build/source/texk/web2c/c-auto.in
@@ -37,6 +37,9 @@
/* web2c: Default editor for interactive `e' option. */
#undef EDITOR
+/* Define to 1 for the class `EmbFile' in <Catalog.h>. */
+#undef EMBFILE_IN_CATALOG_H
+
/* metafont: Define to include EPSF pseudo window support. */
#undef EPSFWIN
@@ -46,6 +49,12 @@
/* Define to 1 if you have the `access' function. */
#undef HAVE_ACCESS
+/* Define to 1 if we have the class `AnnotBorderStyle'. */
+#undef HAVE_ANNOTBORDERSTYLE
+
+/* Define to 1 if class `Annot' has the `decRefCnt' member. */
+#undef HAVE_ANNOTDECREFCNT
+
/* Define to 1 if you have the <assert.h> header file. */
#undef HAVE_ASSERT_H
diff --git a/Build/source/texk/web2c/configure b/Build/source/texk/web2c/configure
index 1b8ae9945ea..693a40c561d 100755
--- a/Build/source/texk/web2c/configure
+++ b/Build/source/texk/web2c/configure
@@ -22550,6 +22550,127 @@ ${top_srcdir}/../../libs/obsdcompat/*.[ch]:
cd ${top_builddir}/../../libs/obsdcompat && $(MAKE) $(AM_MAKEFLAGS) rebuild'
+# Checks for xpdf poppler features.
+eval CPPFLAGS=\"$POPPLER_INCLUDES \$CPPFLAGS\"
+eval LIBS=\"$POPPLER_LIBS \$LIBS\"
+
+ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+ac_link="./libtool --mode=link --tag=CXX $ac_link"
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Annot::decRefCnt" >&5
+$as_echo_n "checking for Annot::decRefCnt... " >&6; }
+if ${kpse_cv_have_Annot_decRefCnt+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <goo/GooString.h>
+#include <Object.h>
+#include <Array.h>
+#include <Annot.h>
+int
+main ()
+{
+Annot *an; an->decRefCnt();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+ kpse_cv_have_Annot_decRefCnt=yes
+else
+ kpse_cv_have_Annot_decRefCnt=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $kpse_cv_have_Annot_decRefCnt" >&5
+$as_echo "$kpse_cv_have_Annot_decRefCnt" >&6; }
+if test "x$kpse_cv_have_Annot_decRefCnt" = xyes; then :
+
+$as_echo "#define HAVE_ANNOTDECREFCNT 1" >>confdefs.h
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for class AnnotBorderStyle" >&5
+$as_echo_n "checking for class AnnotBorderStyle... " >&6; }
+if ${kpse_cv_have_AnnotBorderStyle+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <goo/GooString.h>
+#include <Object.h>
+#include <Array.h>
+#include <Annot.h>
+int
+main ()
+{
+AnnotBorderStyle *an;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+ kpse_cv_have_AnnotBorderStyle=yes
+else
+ kpse_cv_have_AnnotBorderStyle=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $kpse_cv_have_AnnotBorderStyle" >&5
+$as_echo "$kpse_cv_have_AnnotBorderStyle" >&6; }
+if test "x$kpse_cv_have_AnnotBorderStyle" = xyes; then :
+
+$as_echo "#define HAVE_ANNOTBORDERSTYLE 1" >>confdefs.h
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for class EmbFile in Catalog.h" >&5
+$as_echo_n "checking for class EmbFile in Catalog.h... " >&6; }
+if ${kpse_cv_have_EmbFile_in_Catalog_h+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <goo/GooString.h>
+#include <Object.h>
+#include <Array.h>
+#include <Catalog.h>
+int
+main ()
+{
+EmbFile *ef;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+ kpse_cv_have_EmbFile_in_Catalog_h=yes
+else
+ kpse_cv_have_EmbFile_in_Catalog_h=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $kpse_cv_have_EmbFile_in_Catalog_h" >&5
+$as_echo "$kpse_cv_have_EmbFile_in_Catalog_h" >&6; }
+if test "x$kpse_cv_have_EmbFile_in_Catalog_h" = xyes; then :
+
+$as_echo "#define EMBFILE_IN_CATALOG_H 1" >>confdefs.h
+
+fi
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+ac_link="./libtool --mode=link --tag=CC $ac_link"
+
+CPPFLAGS=$kpse_save_CPPFLAGS
+LIBS=$kpse_save_LIBS
+
+
ac_config_headers="$ac_config_headers w2c/c-auto.h:c-auto.in"
diff --git a/Build/source/texk/web2c/configure.ac b/Build/source/texk/web2c/configure.ac
index 7fa4163b377..f97caba635b 100644
--- a/Build/source/texk/web2c/configure.ac
+++ b/Build/source/texk/web2c/configure.ac
@@ -272,6 +272,48 @@ KPSE_TECKIT_FLAGS
KPSE_ICU_XETEX_FLAGS([icule])
KPSE_OBSDCOMPAT_FLAGS
+# Checks for xpdf poppler features.
+KPSE_ADD_FLAGS([poppler])
+AC_LANG_PUSH([C++])
+AC_CACHE_CHECK([for Annot::decRefCnt],
+ [kpse_cv_have_Annot_decRefCnt],
+ [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <goo/GooString.h>
+#include <Object.h>
+#include <Array.h>
+#include <Annot.h>]],
+ [[Annot *an; an->decRefCnt();]])],
+ [kpse_cv_have_Annot_decRefCnt=yes],
+ [kpse_cv_have_Annot_decRefCnt=no])])
+AS_IF([test "x$kpse_cv_have_Annot_decRefCnt" = xyes],
+ [AC_DEFINE([HAVE_ANNOTDECREFCNT], 1,
+ [Define to 1 if class `Annot' has the `decRefCnt' member.])])
+AC_CACHE_CHECK([for class AnnotBorderStyle],
+ [kpse_cv_have_AnnotBorderStyle],
+ [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <goo/GooString.h>
+#include <Object.h>
+#include <Array.h>
+#include <Annot.h>]],
+ [[AnnotBorderStyle *an;]])],
+ [kpse_cv_have_AnnotBorderStyle=yes],
+ [kpse_cv_have_AnnotBorderStyle=no])])
+AS_IF([test "x$kpse_cv_have_AnnotBorderStyle" = xyes],
+ [AC_DEFINE([HAVE_ANNOTBORDERSTYLE], 1,
+ [Define to 1 if we have the class `AnnotBorderStyle'.])])
+AC_CACHE_CHECK([for class EmbFile in Catalog.h],
+ [kpse_cv_have_EmbFile_in_Catalog_h],
+ [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <goo/GooString.h>
+#include <Object.h>
+#include <Array.h>
+#include <Catalog.h>]],
+ [[EmbFile *ef;]])],
+ [kpse_cv_have_EmbFile_in_Catalog_h=yes],
+ [kpse_cv_have_EmbFile_in_Catalog_h=no])])
+AS_IF([test "x$kpse_cv_have_EmbFile_in_Catalog_h" = xyes],
+ [AC_DEFINE([EMBFILE_IN_CATALOG_H], 1,
+ [Define to 1 for the class `EmbFile' in <Catalog.h>.])])
+AC_LANG_POP([C++])
+KPSE_RESTORE_FLAGS
+
dnl Write output here, instead of putting a zillion -D's on the command line.
AC_CONFIG_HEADERS([w2c/c-auto.h:c-auto.in],
[sed -e 's/^#define PACKAGE/#define WEB2C_PACKAGE/' \
diff --git a/Build/source/texk/web2c/luatexdir/ChangeLog b/Build/source/texk/web2c/luatexdir/ChangeLog
index 80099dff764..d2734279a52 100644
--- a/Build/source/texk/web2c/luatexdir/ChangeLog
+++ b/Build/source/texk/web2c/luatexdir/ChangeLog
@@ -1,3 +1,7 @@
+2011-10-06 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * lua/lepdflib.cc: Test poppler 0.16.x / 0.17.x features.
+
2011-10-04 Peter Breitenlohner <peb@mppmu.mpg.de>
* am/libluatex.am: Avoid to `clean' ../mplibdir/lmplib.c.
diff --git a/Build/source/texk/web2c/luatexdir/lua/lepdflib.cc b/Build/source/texk/web2c/luatexdir/lua/lepdflib.cc
index 66b8731acbb..6cd09836d2c 100644
--- a/Build/source/texk/web2c/luatexdir/lua/lepdflib.cc
+++ b/Build/source/texk/web2c/luatexdir/lua/lepdflib.cc
@@ -89,8 +89,10 @@ new_poppler_userdata(AnnotBorder);
new_poppler_userdata(Annots);
new_poppler_userdata(Array);
new_poppler_userdata(Catalog);
-new_poppler_userdata(EmbFile);
new_poppler_userdata(Dict);
+#ifdef EMBFILE_IN_CATALOG_H
+new_poppler_userdata(EmbFile);
+#endif
//new_poppler_userdata(GooString);
new_poppler_userdata(LinkDest);
new_poppler_userdata(Links);
@@ -393,7 +395,11 @@ static int m_Annot__gc(lua_State * L)
printf("\n===== Annot GC ===== uin=<%p>\n", uin);
#endif
if (uin->atype == ALLOC_LEPDF)
+#ifdef HAVE_ANNOTDECREFCNT
+ ((Annot *) uin->d)->decRefCnt();
+#else
delete(Annot *) uin->d;
+#endif
return 0;
}
@@ -410,6 +416,8 @@ static const struct luaL_Reg Annot_m[] = {
//**********************************************************************
// AnnotBorderStyle
+#ifdef HAVE_ANNOTBORDERSTYLE
+
m_poppler_get_DOUBLE(AnnotBorderStyle, getWidth);
m_poppler__tostring(AnnotBorderStyle);
@@ -435,6 +443,8 @@ static const struct luaL_Reg AnnotBorderStyle_m[] = {
{NULL, NULL} // sentinel
};
+#endif
+
//**********************************************************************
// Annots
@@ -684,6 +694,8 @@ static int m_Catalog_findDest(lua_State * L)
m_poppler_get_poppler(Catalog, Object, getDests);
m_poppler_get_INT(Catalog, numEmbeddedFiles);
+#ifdef EMBFILE_IN_CATALOG_H
+
static int m_Catalog_embeddedFile(lua_State * L)
{
EmbFile *ef;
@@ -708,6 +720,8 @@ static int m_Catalog_embeddedFile(lua_State * L)
return 1;
}
+#endif
+
m_poppler_get_INT(Catalog, numJS);
static int m_Catalog_getJS(lua_State * L)
@@ -749,7 +763,9 @@ static const struct luaL_Reg Catalog_m[] = {
{"findDest", m_Catalog_findDest},
{"getDests", m_Catalog_getDests},
{"numEmbeddedFiles", m_Catalog_numEmbeddedFiles},
+#ifdef EMBFILE_IN_CATALOG_H
{"embeddedFile", m_Catalog_embeddedFile},
+#endif
{"numJS", m_Catalog_numJS},
{"getJS", m_Catalog_getJS},
{"getOutline", m_Catalog_getOutline},
@@ -761,6 +777,8 @@ static const struct luaL_Reg Catalog_m[] = {
//**********************************************************************
// EmbFile
+#ifdef EMBFILE_IN_CATALOG_H
+
m_poppler_get_GOOSTRING(EmbFile, name);
m_poppler_get_GOOSTRING(EmbFile, description);
m_poppler_get_INT(EmbFile, size);
@@ -801,6 +819,8 @@ static const struct luaL_Reg EmbFile_m[] = {
{NULL, NULL} // sentinel
};
+#endif
+
//**********************************************************************
// Dict
@@ -2683,12 +2703,16 @@ int luaopen_epdf(lua_State * L)
{
register_meta(Annot);
// TODO register_meta(AnnotBorder);
+#ifdef HAVE_ANNOTBORDERSTYLE
register_meta(AnnotBorderStyle);
+#endif
register_meta(Annots);
register_meta(Array);
register_meta(Catalog);
- register_meta(EmbFile);
register_meta(Dict);
+#ifdef EMBFILE_IN_CATALOG_H
+ register_meta(EmbFile);
+#endif
register_meta(GooString);
register_meta(LinkDest);
register_meta(Links);