diff -Nru djvulibre-3.5.24/debian/changelog djvulibre-3.5.24/debian/changelog --- djvulibre-3.5.24/debian/changelog 2011-06-22 10:48:22.000000000 +0000 +++ djvulibre-3.5.24/debian/changelog 2011-09-28 15:58:15.000000000 +0000 @@ -1,3 +1,9 @@ +djvulibre (3.5.24-9) unstable; urgency=low + + * single debian patch source option (closes: #643094) + + -- Barak A. Pearlmutter Wed, 28 Sep 2011 16:57:18 +0100 + djvulibre (3.5.24-8) unstable; urgency=low * ddjvu_anno_get_xmp consistent prototype vs implementation (closes: #613547) diff -Nru djvulibre-3.5.24/debian/patches/debian-changes djvulibre-3.5.24/debian/patches/debian-changes --- djvulibre-3.5.24/debian/patches/debian-changes 1970-01-01 00:00:00.000000000 +0000 +++ djvulibre-3.5.24/debian/patches/debian-changes 2011-09-28 16:01:00.000000000 +0000 @@ -0,0 +1,7311 @@ +Description: Undocumented upstream changes + This patch has been created by dpkg-source during the package build + but it might have accumulated changes from several uploads. Please + check the changelog to (hopefully) learn more on those changes. + +--- djvulibre-3.5.24.orig/Makefile.in ++++ djvulibre-3.5.24/Makefile.in +@@ -32,17 +32,9 @@ SUBDIRS_FIRST = libdjvu tools + @XML_YES@SUBDIRS_XML = xmltools + @XML_NO@SUBDIRS_XML = + +-@GUI_YES@SUBDIRS_GUI = gui +-@GUI_NO@SUBDIRS_GUI = +- +-@I18N_YES@SUBDIRS_I18N = i18n +-@I18N_NO@SUBDIRS_I18N = +- + SUBDIRS_LAST = desktopfiles + +-SUBDIRS = ${SUBDIRS_FIRST} ${SUBDIRS_XML} \ +- ${SUBDIRS_GUI} ${SUBDIRS_I18N} \ +- ${SUBDIRS_LAST} ++SUBDIRS = ${SUBDIRS_FIRST} ${SUBDIRS_XML} ${SUBDIRS_I18N} ${SUBDIRS_LAST} + + world: all + @echo "Congratulations: the compilation was successful!" +@@ -67,10 +59,6 @@ install-utils: install-tools + + @XML_YES@install-utils: install-xmltools + +-@GUI_YES@install: install-gui +- +-@I18N_YES@install: install-i18n +- + @DESKTOP_YES@install: install-desktopfiles + + install-libdjvu: FORCE +@@ -82,12 +70,6 @@ install-tools: FORCE + install-xmltools: FORCE + ( cd xmltools && ${MAKE} install ) + +-install-gui: FORCE +- ( cd gui && ${MAKE} install ) +- +-install-i18n: FORCE +- ( cd i18n && ${MAKE} install ) +- + install-desktopfiles: FORCE + ( cd desktopfiles && ${MAKE} install ) + +--- djvulibre-3.5.24.orig/NEWS ++++ djvulibre-3.5.24/NEWS +@@ -1,3 +1,11 @@ ++NEW SINCE VERSION 3.5.24 ++------------------------ ++- Removed the deprecated djview3 code. ++- Removed the deprecated cothreads code. ++- Removed the unmaintained japanese man pages. ++- Added ddjvu option to skip corrupted pages. ++ ++ + NEW IN VERSION 3.5.24 + --------------------- + - Set ddjvuapi_version to 20. +--- djvulibre-3.5.24.orig/djvulibre.spec ++++ djvulibre-3.5.24/djvulibre.spec +@@ -35,14 +35,12 @@ version of that code maintained by the o + compatible with version 3.5 of the LizardTech DjVu software suite. + + DjVulibre-3.5 contains: +-- a standalone DjVu viewer based on the Qt library. +-- A browser plugin that works with most Unix browsers. ++- An up-to-date version of the C++ DjVu Reference Library. + - A full-fledged wavelet-based compressor for pictures. + - A simple compressor for bitonal (black and white) scanned pages. + - A compressor for palettized images (a la GIF/PNG). + - A set of utilities to manipulate and assemble DjVu images and documents. + - A set of decoders to convert DjVu to a number of other formats. +-- An up-to-date version of the C++ DjVu Reference Library. + + %prep + %setup -q +--- djvulibre-3.5.24.orig/configure.ac ++++ djvulibre-3.5.24/configure.ac +@@ -208,7 +208,6 @@ AC_PATH_THREADS(, + # What to compile + # ---------------------------------------- + +- + # Check compilation of xmltools + ac_enable_xmltools=yes + AC_ARG_ENABLE(xmltools, +@@ -224,96 +223,6 @@ fi + AC_SUBST(XML_YES) + AC_SUBST(XML_NO) + +- +-# Check compilation of djview +-AC_ARG_ENABLE(djview, +- AS_HELP_STRING([--enable-djview],[Enable the compilation of djview3.]), +- [ac_enable_djview=$enableval], +- [ac_enable_djview=no] ) +-if test x$ac_enable_djview != xno ; then +- AC_MSG_WARN([Enabling compilation of djview3. +--------------------------------------------------------- +-*** The Qt2 or Qt3 based viewer, djview3, is considered obsolete. +-*** The recommended viewer is now the Qt4 based viewer, djview4. +-*** Djview4 comes in a separate source package that should be +-*** compiled after installing the djvulibre library. +---------------------------------------------------------]) +- # Search QT library +- AC_PATH_QT(, +- [ no_qt=yes +- AC_MSG_WARN([Qt3 support is disabled]) ]) +- +- # Search X11 and Xt headers +- if test "$no_x" != "yes" ; then +- savedCFLAGS="$CFLAGS" +- CFLAGS="$CFLAGS ${X_CFLAGS}" +- AC_CHECK_HEADERS(X11/extensions/Xext.h,,,[include ]) +- AC_CHECK_HEADER(X11/Shell.h, [], [no_xt=yes]) +- AC_CHECK_HEADER(X11/IntrinsicP.h, [], [no_xt=yes]) +- CFLAGS="$savedCFLAGS" +- if test "$no_xt" = "yes" ; then +- AC_MSG_WARN([Xt include files not found]) +- else +- AC_DEFINE(HAVE_XT,1,[Define if you have the Xt include files.]) +- fi +- fi +- +- if test x$no_threads = xyes || test x$no_qt = xyes || test x$no_xt = xyes +- then +- AC_MSG_WARN([Disabling compilation of djview. +--------------------------------------------------------- +-*** The GUI portion of this package will not be compiled. +-*** This is probably not what you want. Chech the output +-*** of configure for warning messages. Read file INSTALL. +-*** Investigate options --with-qt and --enable-threads. +-*** Make sure the Xt include files are present. +---------------------------------------------------------]) +- ac_enable_djview=no; +- fi +-fi +-if test x$ac_enable_djview != xno ; then +- GUI_YES='' +- GUI_NO='#' +-else +- GUI_YES='#' +- GUI_NO='' +-fi +-AC_SUBST(GUI_YES) +-AC_SUBST(GUI_NO) +- +- +-# Check compilation of i18n files. +-AC_ARG_ENABLE(i18n, +- AS_HELP_STRING([--disable-i18n],[Do not prepare the localization files.]), +- [ac_enable_i18n=$enableval], +- [ac_enable_i18n=all] ) +-if test "$ac_enable_i18n" != xno ; then +- I18N_YES='' +- I18N_NO='#' +- LINGUAS= +- if test "$ac_enable_i18n" = all ; then +- for n in $srcdir/i18n/* ; do +- if test -r $n/Makefile.in ; then +- LINGUAS="$LINGUAS `basename $n`" +- fi +- done +- else +- for n in $ac_enable_i18n ; do +- if test -r $srcdir/i18n/$n/Makefile.in ; then +- LINGUAS="$LINGUAS $n" +- fi +- done +- fi +-else +- I18N_YES='#' +- I18N_NO='' +-fi +-AC_SUBST(LINGUAS) +-AC_SUBST(I18N_YES) +-AC_SUBST(I18N_NO) +- +- +- + # ---------------------------------------- + # Desktop files + # ---------------------------------------- +@@ -353,151 +262,6 @@ fi + AC_SUBST(DESKTOP_YES) + AC_SUBST(DESKTOP_NO) + +- +-# ---------------------------------------- +-# Flags for NSDEJAVU.SO +-# ---------------------------------------- +- +-NSDEJAVU_CFLAGS= +-NSDEJAVU_LIBS= +-if test x$ac_enable_djview != xno +-then +- AC_PATH_GLIB +- NSDEJAVU_CFLAGS=${X_CFLAGS} +- case "$host" in +- *-cygwin* | *-mingw*) +- NSDEJAVU_LIBS="`echo ${X_LIBS} | sed -e 's/-lXext/-lXt -lXext/'`" +- NSDEJAVU_LIBS="-no-undefined $NSDEJAVU_LIBS" +- ;; +- esac +-fi +-AC_SUBST(NSDEJAVU_CFLAGS) +-AC_SUBST(NSDEJAVU_LIBS) +- +-# ----------- +-# How to install shared libraries +-if test -z "$INSTALL_SHLIB" ; then +- INSTALL_SHLIB="${INSTALL_DATA}" +- case "$host" in +- *-cygwin* | *-mingw*) +- INSTALL_SHLIB="cp" +- ;; +- esac +-fi +-AC_SUBST(INSTALL_SHLIB) +- +- +- +-# ---------------------------------------- +-# Compiler version check +-# ---------------------------------------- +- +-# Work around broken compilers with the famous LPR0 bug +-if test x$ac_shared_libdjvu != xno && test x$GXX = xyes; then +- AC_MSG_CHECKING([if $CXX has the LPR0 bug]) +- echo 'extern "C"{inline int sqr(int x)throw(){return x*x;}}int main(){}' \ +- > conftest.cc +- if ${CXX} -fPIC ${OPTS} conftest.cc -o conftest \ +- > /dev/null 2> /dev/null ; then +- AC_MSG_RESULT([no]) +- else +- AC_MSG_RESULT([yes]) +- OPTS=`echo $OPTS | sed -e 's/-mcpu=i686/-mpentium/'` +- fi +-fi +- +-# What compiler are we using ? +-if test x$GXX != xyes ; then +- AC_MSG_WARN([The recommended c++ compiler is g++.]) +- if test $ac_cv_cxx_exceptions = no ; then +- AC_MSG_ERROR([Exception support in c++ compiler is mandatory.]) +- fi +-else +- AC_MSG_CHECKING([g++ version]) +-changequote(<<, >>)dnl +- cxxver="`$CXX --version | head -1 | +- sed -e 's/^.*[^0-9.]\([2-4]\.[0-9.]*\).*$/\1/'`" +-changequote([, ])dnl +- AC_MSG_RESULT($cxxver) +- action=none +- case "$cxxver" in +-changequote(<<, >>)dnl +- 1.*) action=error ;; +- 2.[0-8]*) action=error ;; +- 2.90*) action=error ;; +- 2.91.[6-9]*) ;; +- 2.91*) action=warn2 ;; +- 2.96*) action=redhat ;; +- 2.9*) ;; +- 3.0) action=warn3 ;; +-changequote([, ])dnl +- esac +- case $action in +- error) +- AC_MSG_ERROR([Your c++ compiler ($cxxver) is outdated.]) +- ;; +- warn2) +- AC_MSG_WARN([Your c++ compiler ($cxxver) has known problems. +-------------------------------------------- +-*** Please upgrade to gcc-2.95.3 or better. +--------------------------------------------]) +- ;; +- warn3) +- AC_MSG_WARN([Your c++ compiler ($cxxver) has known problems. +-------------------------------------------- +-*** Please upgrade to gcc-3.0.2 or better. +--------------------------------------------]) +- ;; +- redhat) +- # Check for infamous early 2.96 compiler +- for n in `g++ -v 2>&1 | grep version` ; do rhversion=$n ; done +- case "$rhversion" in +-changequote(<<, >>)dnl +- 2.96-1[0-9][0-9]*) ;; +- 2.96-8[5-9]*) ;; +- 2.96-9*) ;; +- *) +-changequote([, ])dnl +- AC_MSG_WARN([Your c++ compiler ($cxxver) has known problems. +-------------------------------------------------------- +-*** You have an early version of the gcc-2.96 compiler. +-*** The good news is that the new version works nicely. +-*** Check . +-*** Please upgrade. +--------------------------------------------------------]) +- ;; +- esac +- esac +- # Do we want the pragmas interface/implementation +- case "$cxxver" in +-changequote(<<, >>)dnl +- 2*) cxxpragmas=yes ;; +- 3.0*) cxxpragmas=yes ;; +- *) cxxpragmas=no ;; +-changequote([, ])dnl +- esac +- if test x$cxxpragmas = xyes ; then +- AC_DEFINE(NEED_GNUG_PRAGMAS,1, +- [Define to use g++ pragmas interface/implementation]) +- fi +-fi +- +- +- +-# ---------------------------------------- +-# Qt version check +-# ---------------------------------------- +- +-# What version of QT are we using +-if test x${qt_version+set} = xset ; then +- if test "$qt_version" -lt 200 ; then +- AC_MSG_ERROR([We no longer support Qt-1x.]) +- elif test "$qt_version" -lt 220 ; then +- AC_MSG_WARN([We suggest using QT-2.2.0 or better.]) +- fi +-fi +- +- + # ---------------------------------------- + # End + # ---------------------------------------- +@@ -513,15 +277,6 @@ AC_CONFIG_FILES(libdjvu/ddjvuapi.pc) + AC_CONFIG_FILES(tools/Makefile) + AC_CONFIG_FILES(tools/jb2cmp/Makefile) + AC_CONFIG_FILES(xmltools/Makefile) +-AC_CONFIG_FILES(gui/Makefile) +-AC_CONFIG_FILES(gui/bin2cpp/Makefile) +-AC_CONFIG_FILES(gui/djview/Makefile) +-AC_CONFIG_FILES(gui/nsdejavu/Makefile) +-AC_CONFIG_FILES(i18n/Makefile) +-AC_CONFIG_FILES(i18n/ja/Makefile) +-AC_CONFIG_FILES(i18n/de/Makefile) +-AC_CONFIG_FILES(i18n/fr/Makefile) +-AC_CONFIG_FILES(i18n/cs/Makefile) + AC_CONFIG_FILES(desktopfiles/Makefile) + + # Go +@@ -595,13 +350,6 @@ AH_BOTTOM([ + #define GCONTAINER_NO_TYPENAME 1 + #endif + +-/* - COTHREAD */ +-#ifdef HAVE_COTHREAD +-#ifndef HAVE_COTHREAD_PATCH +-#define NO_LIBGCC_HOOKS 1 +-#endif +-#endif +- + /* - JPEG */ + #ifdef HAVE_JPEG + #define NEED_JPEG_DECODER 1 +@@ -614,24 +362,6 @@ AH_BOTTOM([ + #define HAS_MEMMAP 0 + #endif + +-/* - QT */ +-#ifdef HAVE_QT +-#if HAVE_QT < 200 +-#define QT1 +-#elif HAVE_QT < 300 +-#define QT2 +-#else +-#define QT3 +-#endif +-#endif +- +-/* - X STUFF */ +-#ifdef HAVE_SYS_IPC_H +-#ifdef HAVE_SYS_SHM_H +-#define USE_XSHM 1 +-#endif +-#endif +- + /* config.h: end */ + #endif + ]) +--- djvulibre-3.5.24.orig/README ++++ djvulibre-3.5.24/README +@@ -52,33 +52,17 @@ GNU GPL in October 2000. DjVuLibre (pron + libre"), is an enhanced version of that code maintained by the original + inventors of DjVu. It is compatible with LizardTech's DjVu software v3.5. + +-DjVuLibre includes: +- +-- A standalone DjVu viewer for Unix under X11 (based on the Qt library). +- +-- A browser plugin that works with most Unix browsers, including: +- Netscape-4.x, Netscape-6.x, Mozilla, Galeon, Konqueror, and Opera. ++This package includes: + ++- An up-to-date version of the C++ DjVu Reference Library + - A full-fledged wavelet-based compressor for pictures. +- + - A simple compressor for bitonal (black and white) scanned pages. +- + - A compressor for palettized images (a la GIF). +- +-- A full set of utilities to manipulate and +- assemble DjVu images and documents. +- ++- A full set of utilities to manipulate and assemble DjVu images and documents. + - A set of decoders to convert DjVu to a number of other formats. + +-- An up-to-date version of the C++ DjVu Reference Library +- +-Windows and Mac versions of the viewer/plug-in, as well as commercial versions +-of the compressors and OCR engines are available from LizardTech Inc.. The +-compressors provided here are slower, produce larger files, and sometimes +-lower quality images than the commercial compressors, but they do the job. +- +-A variety of free web-based conversion services are also available, including +-any2djvu.djvuzone.org, bib2web.djvuzone.org, and openlib.djvuzone.org. ++The full-fledged DjVu file viewer and browser plugin DjView4 ++is available as a separate package. + + + +--- djvulibre-3.5.24.orig/INSTALL ++++ djvulibre-3.5.24/INSTALL +@@ -37,22 +37,7 @@ You can also compile DjVuLibre with neit + You might never notice the difference. + + +-1.3 - QT +--------- +- +-The graphical user interface of the viewer relies on the Qt library +-from TrollTech . The command line tools +-do not rely on Qt and can be compiled independently. +- +-The source code of the Qt library can be downloaded from +-. +- +-Avoid versions earlier than Qt-2.2.0. +-The suggested version is Qt-3.3.6 +-Qt-4 support is under development. +- +- +-1.4 - THREADS ++1.3 - THREADS + ------------- + + The DjVu viewer makes heavy use of multiple threads of execution. Modern +@@ -60,13 +45,10 @@ Unix operating systems come with the sta + DjVuLibre-3.5 fully supports detecting and using Posix threads. + + For the sake of older operating systems, DjVuLibre-3.5 offers a custom +-threading model called CoThreads. CoThreads work best with a two line patch +-to the GCC compiler. This is described in files "etc/README.libgcc". The +-configuration script will auto-detect the available threading model and suggest +-applying the GCC patch when it is needed. ++threading model called CoThreads. This should be considered obsolete. + + +-1.5 - MAKE ++1.4 - MAKE + ---------- + + There are various kind of "make" programs around with various capabilities. +@@ -98,31 +80,15 @@ configuration script. A complete list c + * Option "--enable-desktopfiles[=(yes|no)]" + + Installs the scripts +- /usr/share/djvu/osi/desktop/register-djvu-mime and +- /usr/share/djvu/osi/desktop/register-djview-menu ++ /usr/share/djvu/osi/desktop/register-djvu-mime + to setup the xdg mime type database and menu entries. + +-* Option "--enable-i18n[=(yes|no|languages)]" +- +- Enable generation of translation files and man pages +- for the specified languages. By default, translation files +- and man pages are generated for all available languages +- + * Options "--with-extra-includes=DIR" + and "--with-extra-libraries=DIR" + + This option defines additional directories for + searching include files or libraries. + +-* Option "--with-qt=QTDIR" +- +- This option specifies the base location of the Qt library. +- Without this option, the configuration script will inspect +- environment variable QTDIR as well as a few typical locations. +- When everything else fails (that should not happen), you +- can simply define the environment variables +- QT_CFLAGS, QT_LIBS and MOC. +- + * Option "--with-jpeg=JPEGDIR" + + This option specifies a directory where the JPEG library has been +@@ -176,9 +142,8 @@ successful. You can then proceed with t + The installation procedure will: + + - install the executable programs into "${prefix}/bin". +-- possibly install the shared library "${prefix}/lib/libdjvu-3.5.so". ++- possibly install the shared library "${prefix}/lib/libdjvulibre-3.5.so". + - install the man pages under "${prefix}/man or ${prefix}/share/man". +-- install the Netscape plug-in as "${prefix}/lib/netscape/plugins/nsdejavu.so". + - install various ancillary files under "${prefix}/share/djvu". + - optionally install information files for desktop environments. + +@@ -193,243 +158,3 @@ Of course you must have the appropriate + perform the installation. Chances are that you need to + be root to install something into /usr or /usr/local. + +- +- +- +-3- PLUG-IN ISSUES +-================ +- +- +-3.1- NETSCAPE 4.7 +------------------ +- +- +-The DjVu Netscape plug-in is a shared library which runs program djview +-in slave mode. This shared library is normally installed in: +- +- ${prefix}/lib/netscape/plugins/nsdejavu.so. +- +-Therefore, unless you specified a different prefix to the configure program, +-the shared library is installed in /usr/local/lib/netscape/plugins. This is a +-good thing since Netscape 4 always searches this directory for plug-ins. +- +-3.1.1- DISABLING PREVIOUS VERSIONS OF THE DJVU PLUG-IN +- +-You might have however to first disable any previous version of the plug-in. +-Selecting menu "Help->About Plugins" in Netscape displays the current list of +-plug-ins. Previous versions of the plug-in were often installed in one of the +-following locations. +- +- ${HOME}/.netscape/plugins/nsdejavu.so +- /usr/lib/netscape/plugins/nsdejavu.so +- /opt/netscape/plugins/nsdejavu.so +- +-You can safely remove these files to disable the previous version of the DjVu +-plug-in. You can also remove the directory "DjVu" that was installed under the +-corresponding "netscape" or ".netscape" directory. Note that "nsdejavu.so" +-and "DjVu" are often symbolic links to the actual installation directory. +-Removing the symbolic links is sufficient to disable the plug-in. +- +-3.1.2- ALTERNATIVE PLUG-IN INSTALLATION STRATEGIES +- +-More complicated cases can be dealt using one of the following strategies. +- +-- You can explicitly set the plug-in search path by setting the +- environment variable NPX_PLUGIN_PATH before starting Netscape. +- Setting this variable overrides Netscape default search directories. +- +- $ NPX_PLUGIN_PATH="${prefix}/lib/netscape/plugins:$HOME/.netscape/plugins" +- $ export NPX_PLUGIN_PATH ; netscape +- +-- You can create a symbolic link to nsdejavu.so from a place that +- is normally searched by Netscape. +- +- $ cd $HOME/.netscape ; mkdir plugins ; cd plugins +- $ ln -s ${prefix}/lib/netscape/plugins/nsdejavu.so nsdejavu.so +- +- You must not copy nsdejavu.so but create a symbolic link. This is necessary +- because nsdejavu.so will first locate its normal installation directory by +- following the symbolic link, and then will locate the DjVu viewer djview. +- +-You can then restart Netscape and select menu "Help->About Plugins" to check +-that the DjVu plug-in is properly recognized. The Netscape plug-in search rules +-are explained in the README file that usually comes with the Netscape +-distribution. +- +-3.1.3- TROUBLESHOOTING +- +-Sometimes Netscape creates a huge mess in configuration files +-named ${HOME}/.mailcap and ${HOME}/.mime.types. The following +-command cleans the djvu related entries in these files: +- +- $ djview -fix +- +-Then restart Netscape and hope for the best. +- +- +- +-3.2- NETSCAPE 6.1 +------------------ +- +-It seems that Netscape 6 only recognize plug-ins installed inside its own +-plug-in directory. This can be done using a symbolic link. Let us assume that +-Netscape 6 is installed in /usr/local/netscape6 and that the DjVu plug-in is +-installed in /usr/local/lib/netscape/plugins. +- +- $ cd /usr/local/netscape6/plugins +- $ ln -s /usr/local/lib/netscape/plugins/nsdejavu.so nsdejavu.so +- +-You can then run Netscape 6.1 and view DjVu images. +- +- +-3.3- KONQUEROR +--------------- +- +-The DjVu plug-in works nicely with the Konqueror web browser. +- +-In Konqueror, select "Settings->Configure Konqueror". When the dialog +-appears, select the icon "Netscape Plugins". Make sure that directory +-"${prefix}/lib/netscape/plugins" appears in the list of plug-in directories. +-Then press button "Scan for new plugins". Clicking the "Plugins" tab button +-should display a list of recognized plug-ins. Check that "nsdejavu.so" appears +-there. You should now be able to use DjVu with Konqueror. +- +- +-3.4- MOZILLA +------------- +- +-You must establish a link from the mozilla plugin directory. Let us assume +-that mozilla is installed under /usr/lib/mozilla-1.1 and that the DjVu plug-in +-is installed in /usr/local/lib/netscape/plugins. +- +- $ cd /usr/lib/mozilla-1.1/plugins +- $ ln -s /usr/local/lib/netscape/plugins/nsdejavu.so nsdejavu.so +- +-Works nicely. +- +- +-3.5- GALEON +------------ +- +-Install the plugin for mozilla and it will work for galeon. +- +- +-3.6- MOZILLA FIREBIRD/FIREFOX +------------------------------ +- +-You must establish a link from the appropriate plugin directory. +-Let us assume that mozilla is installed under /usr/lib/mozilla-firefox +-and that the DjVu plug-in is installed in /usr/local/lib/netscape/plugins. +- +- $ cd /usr/lib/mozilla-firefox/plugins +- $ ln -s /usr/local/lib/netscape/plugins/nsdejavu.so nsdejavu.so +- +-Works nicely. +- +- +-3.7- OPERA +----------- +- +-You must install openmotif to have plugin support in Opera. +-The DjVu plugin then works okay. +- +- +- +- +- +-4- PORTING NOTES +-================ +- +- +-4.1- GNU/LINUX +--------------- +- +-Simply typing "configure ; make" should work on most recent distributions. +- +-In addition, the tarball contains a valid spec file for the rpm packager. +-The following command should perform all the compilation steps. +- +- $ rpm -ta djvulibre-3.5.X.tar.gz +- +-The resulting rpm files can be found in the usual places. +- +- +-4.2- SGI IRIX 6.5 +------------------ +- +-Successful compilation using qt-2.3.0. +-Compilation was made with gcc-3.0.2 with the thread patch discussed at +-. +-The configure command line was: +- $ ./configure --enable-rpo \ +- --with-qt=/home/leonb/djvulibre-3.5/BUILDI/qt-2.3.0 \ +- --with-jpeg=/home/leonb/djvulibre-3.5/BUILDI/libjpeg +- +- +- +-4.3- SUN SOLARIS 5 +------------------- +- +-SPARC-SUN-SOLARIS-5.6: +-Successful compilation using qt-2.3.0 +-Compilation was made with gcc-3.0.2 with option -fpermissive. +-The configure command line was: +- $ ./configure --enable-rpo \ +- --with-qt=/home/leonb/djvulibre-3.5/BUILDS/qt-2.3.0 \ +- --with-jpeg=/home/leonb/djvulibre-3.5/BUILDS/libjpeg \ +- CXX='g++ -fpermissive' +- +-I386-SUN-SOLARIS-5.9: +-Successful compilation using qt-3.2 and gcc-3.3. +- 1) Installed gcc 3.3 +- 2) Installed and built Qt +- 3) export QTDIR=/usr/local/qt +- 4) export QT_CFLAGS=-I/usr/local/qt/include +- 5) export QT_LIBS='-L/usr/local/qt/lib -lqt -ldl' +- 6) export PATH=$PATH:/usr/ccs/bin +- 7) export PATH=/usr/local/bin:/opt/sfw/bin:$PATH +- 8) export LD_LIBRARY_PATH=/opt/sfw/qt/lib:$LD_LIBRARY_PATH +- export LD_LIBRARY_PATH=/usr/local/lib:/opt/sfw/lib:$LD_LIBRARY_PATH +- 9) cd DjVu/djvulibre-3.5 +- 11) ./configure --with-qt=/usr/local/qt --prefix=/usr/local \ +- CXX='g++ -fpermissive -DNO_MMX -static-libgcc ' +- 12) make +- 13) make install +- +- +- +-4.4- FREEBSD-4.4 +----------------- +- +-Successful compilation using gnu-make, qt-2.3.1 and gcc-2.95.3. +-The configure command line was: +- $ ./configure \ +- JPEG_LIBS='/usr/local/lib/libjpeg.a' \ +- JPEG_CFLAGS='-I/usr/local/include' +- +- +- +-4.5- MAC OS X 10.3.2 +--------------------- +- +-We envision two ways to compile DjVuLibre on the Mac. +-- either using DarwinPorts or Fink +-- or using XCode and the native OS-X utilities. +- +-4.5.1- USING XCODE AND THE NATIVE UTILITIES +- +-Not much has been done at this point. +-Please check the file djvulibre-3.5/mac/README. +- +-4.5.2- USING DARWINPORTS OR FINK +- +-DjVuLibre assumes that you have DarwinPorts in /opt/local +-or Fink in /sw. Required packages: libjpeg libtiff qt3. +-The configure command line is +- $ ./configure +- +-DjVuLibre should then compile and install without problems. +-The DjVuLibre viewer 'djview' runs under X11. +-Similarly, the DjVuLibre plugin does not run in Safari or MSIE. +-It only runs in X11 based browsers such as mozilla or konqueror. +- +--- djvulibre-3.5.24.orig/configure ++++ djvulibre-3.5.24/configure +@@ -1,11 +1,11 @@ + #! /bin/sh + # Guess values for system-dependent variables and create Makefiles. +-# Generated by GNU Autoconf 2.65 for djvulibre 3.5.24. ++# Generated by GNU Autoconf 2.67 for djvulibre 3.5.24. + # + # + # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +-# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +-# Inc. ++# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software ++# Foundation, Inc. + # + # + # This configure script is free software; the Free Software Foundation +@@ -316,7 +316,7 @@ $as_echo X"$as_dir" | + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" +- } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" ++ } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" + + + } # as_fn_mkdir_p +@@ -356,19 +356,19 @@ else + fi # as_fn_arith + + +-# as_fn_error ERROR [LINENO LOG_FD] +-# --------------------------------- ++# as_fn_error STATUS ERROR [LINENO LOG_FD] ++# ---------------------------------------- + # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are + # provided, also output the error to LOG_FD, referencing LINENO. Then exit the +-# script with status $?, using 1 if that was 0. ++# script with STATUS, using 1 if that was 0. + as_fn_error () + { +- as_status=$?; test $as_status -eq 0 && as_status=1 +- if test "$3"; then +- as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack +- $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 ++ as_status=$1; test $as_status -eq 0 && as_status=1 ++ if test "$4"; then ++ as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack ++ $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + fi +- $as_echo "$as_me: error: $1" >&2 ++ $as_echo "$as_me: error: $2" >&2 + as_fn_exit $as_status + } # as_fn_error + +@@ -679,7 +679,7 @@ test -n "$DJDIR" || exec 7<&0 &1 + + # Name of the host. +-# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, ++# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, + # so uname gets run too. + ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` + +@@ -744,35 +744,11 @@ ac_includes_default="\ + ac_header_list= + ac_subst_vars='LTLIBOBJS + LIBOBJS +-INSTALL_SHLIB +-NSDEJAVU_LIBS +-NSDEJAVU_CFLAGS +-GLIB_CFLAGS +-GLIB_LIBS +-PKG_CONFIG_PATH +-PKG_CONFIG + DESKTOP_NO + DESKTOP_YES + XDG_DESKTOP_MENU + XDG_ICON_RESOURCE + XDG_MIME +-I18N_NO +-I18N_YES +-LINGUAS +-GUI_NO +-GUI_YES +-LRELEASE +-LUPDATE +-UIC +-MOC +-QT_LIBS +-QT_CFLAGS +-QTDIR +-X_EXTRA_LIBS +-X_LIBS +-X_PRE_LIBS +-X_CFLAGS +-XMKMF + XML_NO + XML_YES + THREAD_CFLAGS +@@ -895,10 +871,6 @@ with_jpeg + with_tiff + enable_threads + enable_xmltools +-enable_djview +-with_x +-with_qt +-enable_i18n + enable_desktopfiles + ' + ac_precious_vars='build_alias +@@ -919,17 +891,7 @@ JPEG_CFLAGS + TIFF_LIBS + TIFF_CFLAGS + PTHREAD_LIBS +-PTHREAD_CFLAGS +-XMKMF +-QTDIR +-QT_CFLAGS +-QT_LIBS +-MOC +-UIC +-PKG_CONFIG +-PKG_CONFIG_PATH +-GLIB_LIBS +-GLIB_CFLAGS' ++PTHREAD_CFLAGS' + + + # Initialize some variables set by options. +@@ -992,8 +954,9 @@ do + fi + + case $ac_option in +- *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; +- *) ac_optarg=yes ;; ++ *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; ++ *=) ac_optarg= ;; ++ *) ac_optarg=yes ;; + esac + + # Accept the important Cygnus configure options, so we can diagnose typos. +@@ -1038,7 +1001,7 @@ do + ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && +- as_fn_error "invalid feature name: $ac_useropt" ++ as_fn_error $? "invalid feature name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in +@@ -1064,7 +1027,7 @@ do + ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && +- as_fn_error "invalid feature name: $ac_useropt" ++ as_fn_error $? "invalid feature name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in +@@ -1268,7 +1231,7 @@ do + ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && +- as_fn_error "invalid package name: $ac_useropt" ++ as_fn_error $? "invalid package name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in +@@ -1284,7 +1247,7 @@ do + ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && +- as_fn_error "invalid package name: $ac_useropt" ++ as_fn_error $? "invalid package name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in +@@ -1314,8 +1277,8 @@ do + | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) + x_libraries=$ac_optarg ;; + +- -*) as_fn_error "unrecognized option: \`$ac_option' +-Try \`$0 --help' for more information." ++ -*) as_fn_error $? "unrecognized option: \`$ac_option' ++Try \`$0 --help' for more information" + ;; + + *=*) +@@ -1323,7 +1286,7 @@ Try \`$0 --help' for more information." + # Reject names that are not valid shell variable names. + case $ac_envvar in #( + '' | [0-9]* | *[!_$as_cr_alnum]* ) +- as_fn_error "invalid variable name: \`$ac_envvar'" ;; ++ as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; + esac + eval $ac_envvar=\$ac_optarg + export $ac_envvar ;; +@@ -1341,13 +1304,13 @@ done + + if test -n "$ac_prev"; then + ac_option=--`echo $ac_prev | sed 's/_/-/g'` +- as_fn_error "missing argument to $ac_option" ++ as_fn_error $? "missing argument to $ac_option" + fi + + if test -n "$ac_unrecognized_opts"; then + case $enable_option_checking in + no) ;; +- fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;; ++ fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; + *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; + esac + fi +@@ -1370,7 +1333,7 @@ do + [\\/$]* | ?:[\\/]* ) continue;; + NONE | '' ) case $ac_var in *prefix ) continue;; esac;; + esac +- as_fn_error "expected an absolute directory name for --$ac_var: $ac_val" ++ as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" + done + + # There might be people who depend on the old broken behavior: `$host' +@@ -1384,8 +1347,8 @@ target=$target_alias + if test "x$host_alias" != x; then + if test "x$build_alias" = x; then + cross_compiling=maybe +- $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. +- If a cross compiler is detected then cross compile mode will be used." >&2 ++ $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. ++ If a cross compiler is detected then cross compile mode will be used" >&2 + elif test "x$build_alias" != "x$host_alias"; then + cross_compiling=yes + fi +@@ -1400,9 +1363,9 @@ test "$silent" = yes && exec 6>/dev/null + ac_pwd=`pwd` && test -n "$ac_pwd" && + ac_ls_di=`ls -di .` && + ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || +- as_fn_error "working directory cannot be determined" ++ as_fn_error $? "working directory cannot be determined" + test "X$ac_ls_di" = "X$ac_pwd_ls_di" || +- as_fn_error "pwd does not report name of working directory" ++ as_fn_error $? "pwd does not report name of working directory" + + + # Find the source files, if location was not specified. +@@ -1441,11 +1404,11 @@ else + fi + if test ! -r "$srcdir/$ac_unique_file"; then + test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." +- as_fn_error "cannot find sources ($ac_unique_file) in $srcdir" ++ as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" + fi + ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" + ac_abs_confdir=`( +- cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg" ++ cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" + pwd)` + # When building in place, set srcdir=. + if test "$ac_abs_confdir" = "$ac_pwd"; then +@@ -1485,7 +1448,7 @@ Configuration: + --help=short display options specific to this package + --help=recursive display the short help of all the included packages + -V, --version display version information and exit +- -q, --quiet, --silent do not print \`checking...' messages ++ -q, --quiet, --silent do not print \`checking ...' messages + --cache-file=FILE cache test results in FILE [disabled] + -C, --config-cache alias for \`--cache-file=config.cache' + -n, --no-create do not create output files +@@ -1528,10 +1491,6 @@ _ACEOF + + cat <<\_ACEOF + +-X features: +- --x-includes=DIR X include files are in DIR +- --x-libraries=DIR X library files are in DIR +- + System types: + --build=BUILD configure for building on BUILD [guessed] + --host=HOST cross-compile to build programs to run on HOST [BUILD] +@@ -1558,8 +1517,6 @@ Optional Features: + --disable-largefile omit support for large files + --enable-threads select threading model (default is auto) + --disable-xmltools Do not compile the djvu xml tools. +- --enable-djview Enable the compilation of djview3. +- --disable-i18n Do not prepare the localization files. + --disable-desktopfiles Do not install scripts to register icons and menus. + + Optional Packages: +@@ -1574,8 +1531,6 @@ Optional Packages: + --with-gnu-ld assume the C compiler uses GNU ld [default=no] + --with-jpeg=DIR where the IJG jpeg library is located + --with-tiff=DIR where libtiff is located +- --with-x use the X Window System +- --with-qt=DIR where the Qt3 root is installed. + + Some influential environment variables: + CC C compiler command +@@ -1597,17 +1552,6 @@ Some influential environment variables: + Flags for linking pthread programs. + PTHREAD_CFLAGS + Flags for compiling pthread programs. +- XMKMF Path to xmkmf, Makefile generator for X Window System +- QTDIR Location of the Qt3 package. +- QT_CFLAGS Flags for compiling Qt3 programs. +- QT_LIBS Flags for linking Qt3 programs. +- MOC Location of the MOC program. +- UIC Location of the UIC program. +- PKG_CONFIG Location of the pkg-config program. +- PKG_CONFIG_PATH +- Path for pkg-config descriptors. +- GLIB_LIBS Libraries for glib-2.0 +- GLIB_CFLAGS Compilation flags for glib-2.0 + + Use these variables to override the choices made by `configure' or to help + it to find libraries and programs with nonstandard names/locations. +@@ -1676,9 +1620,9 @@ test -n "$ac_init_help" && exit $ac_stat + if $ac_init_version; then + cat <<\_ACEOF + djvulibre configure 3.5.24 +-generated by GNU Autoconf 2.65 ++generated by GNU Autoconf 2.67 + +-Copyright (C) 2009 Free Software Foundation, Inc. ++Copyright (C) 2010 Free Software Foundation, Inc. + This configure script is free software; the Free Software Foundation + gives unlimited permission to copy, distribute and modify it. + _ACEOF +@@ -1782,7 +1726,7 @@ ac_fn_c_check_header_compile () + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 + $as_echo_n "checking for $2... " >&6; } +-if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : ++if eval "test \"\${$3+set}\"" = set; then : + $as_echo_n "(cached) " >&6 + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +@@ -1825,7 +1769,7 @@ $as_echo "$ac_try_echo"; } >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 +- test $ac_status = 0; } >/dev/null && { ++ test $ac_status = 0; } > conftest.i && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then : +@@ -1891,7 +1835,7 @@ ac_fn_c_check_func () + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 + $as_echo_n "checking for $2... " >&6; } +-if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : ++if eval "test \"\${$3+set}\"" = set; then : + $as_echo_n "(cached) " >&6 + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +@@ -2009,7 +1953,7 @@ $as_echo "$ac_try_echo"; } >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 +- test $ac_status = 0; } >/dev/null && { ++ test $ac_status = 0; } > conftest.i && { + test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || + test ! -s conftest.err + }; then : +@@ -2121,10 +2065,10 @@ fi + ac_fn_cxx_check_header_mongrel () + { + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack +- if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : ++ if eval "test \"\${$3+set}\"" = set; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 + $as_echo_n "checking for $2... " >&6; } +-if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : ++if eval "test \"\${$3+set}\"" = set; then : + $as_echo_n "(cached) " >&6 + fi + eval ac_res=\$$3 +@@ -2160,7 +2104,7 @@ if ac_fn_cxx_try_cpp "$LINENO"; then : + else + ac_header_preproc=no + fi +-rm -f conftest.err conftest.$ac_ext ++rm -f conftest.err conftest.i conftest.$ac_ext + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 + $as_echo "$ac_header_preproc" >&6; } + +@@ -2187,7 +2131,7 @@ $as_echo "$as_me: WARNING: $2: proceedin + esac + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 + $as_echo_n "checking for $2... " >&6; } +-if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : ++if eval "test \"\${$3+set}\"" = set; then : + $as_echo_n "(cached) " >&6 + else + eval "$3=\$ac_header_compiler" +@@ -2209,7 +2153,7 @@ ac_fn_c_find_intX_t () + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5 + $as_echo_n "checking for int$2_t... " >&6; } +-if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : ++if eval "test \"\${$3+set}\"" = set; then : + $as_echo_n "(cached) " >&6 + else + eval "$3=no" +@@ -2260,8 +2204,7 @@ fi + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +- eval as_val=\$$3 +- if test "x$as_val" = x""no; then : ++ if eval test \"x\$"$3"\" = x"no"; then : + + else + break +@@ -2284,7 +2227,7 @@ ac_fn_c_find_uintX_t () + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5 + $as_echo_n "checking for uint$2_t... " >&6; } +-if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : ++if eval "test \"\${$3+set}\"" = set; then : + $as_echo_n "(cached) " >&6 + else + eval "$3=no" +@@ -2314,8 +2257,7 @@ if ac_fn_cxx_try_compile "$LINENO"; then + esac + fi + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +- eval as_val=\$$3 +- if test "x$as_val" = x""no; then : ++ if eval test \"x\$"$3"\" = x"no"; then : + + else + break +@@ -2338,7 +2280,7 @@ ac_fn_cxx_check_type () + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 + $as_echo_n "checking for $2... " >&6; } +-if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : ++if eval "test \"\${$3+set}\"" = set; then : + $as_echo_n "(cached) " >&6 + else + eval "$3=no" +@@ -2392,7 +2334,7 @@ ac_fn_cxx_check_header_compile () + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 + $as_echo_n "checking for $2... " >&6; } +-if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : ++if eval "test \"\${$3+set}\"" = set; then : + $as_echo_n "(cached) " >&6 + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +@@ -2422,7 +2364,7 @@ ac_fn_cxx_check_func () + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 + $as_echo_n "checking for $2... " >&6; } +-if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : ++if eval "test \"\${$3+set}\"" = set; then : + $as_echo_n "(cached) " >&6 + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +@@ -2485,7 +2427,7 @@ This file contains any messages produced + running configure, to aid debugging if configure makes a mistake. + + It was created by djvulibre $as_me 3.5.24, which was +-generated by GNU Autoconf 2.65. Invocation command line was ++generated by GNU Autoconf 2.67. Invocation command line was + + $ $0 $@ + +@@ -2595,11 +2537,9 @@ trap 'exit_status=$? + { + echo + +- cat <<\_ASBOX +-## ---------------- ## ++ $as_echo "## ---------------- ## + ## Cache variables. ## +-## ---------------- ## +-_ASBOX ++## ---------------- ##" + echo + # The following way of writing the cache mishandles newlines in values, + ( +@@ -2633,11 +2573,9 @@ $as_echo "$as_me: WARNING: cache variabl + ) + echo + +- cat <<\_ASBOX +-## ----------------- ## ++ $as_echo "## ----------------- ## + ## Output variables. ## +-## ----------------- ## +-_ASBOX ++## ----------------- ##" + echo + for ac_var in $ac_subst_vars + do +@@ -2650,11 +2588,9 @@ _ASBOX + echo + + if test -n "$ac_subst_files"; then +- cat <<\_ASBOX +-## ------------------- ## ++ $as_echo "## ------------------- ## + ## File substitutions. ## +-## ------------------- ## +-_ASBOX ++## ------------------- ##" + echo + for ac_var in $ac_subst_files + do +@@ -2668,11 +2604,9 @@ _ASBOX + fi + + if test -s confdefs.h; then +- cat <<\_ASBOX +-## ----------- ## ++ $as_echo "## ----------- ## + ## confdefs.h. ## +-## ----------- ## +-_ASBOX ++## ----------- ##" + echo + cat confdefs.h + echo +@@ -2727,7 +2661,12 @@ _ACEOF + ac_site_file1=NONE + ac_site_file2=NONE + if test -n "$CONFIG_SITE"; then +- ac_site_file1=$CONFIG_SITE ++ # We do not want a PATH search for config.site. ++ case $CONFIG_SITE in #(( ++ -*) ac_site_file1=./$CONFIG_SITE;; ++ */*) ac_site_file1=$CONFIG_SITE;; ++ *) ac_site_file1=./$CONFIG_SITE;; ++ esac + elif test "x$prefix" != xNONE; then + ac_site_file1=$prefix/share/config.site + ac_site_file2=$prefix/etc/config.site +@@ -2742,7 +2681,11 @@ do + { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 + $as_echo "$as_me: loading site script $ac_site_file" >&6;} + sed 's/^/| /' "$ac_site_file" >&5 +- . "$ac_site_file" ++ . "$ac_site_file" \ ++ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 ++$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} ++as_fn_error $? "failed to load site script $ac_site_file ++See \`config.log' for more details" "$LINENO" 5 ; } + fi + done + +@@ -2821,7 +2764,7 @@ if $ac_cache_corrupted; then + $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 + $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} +- as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 ++ as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 + fi + ## -------------------- ## + ## Main body of script. ## +@@ -2836,16 +2779,22 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu + + ac_aux_dir= + for ac_dir in config "$srcdir"/config; do +- for ac_t in install-sh install.sh shtool; do +- if test -f "$ac_dir/$ac_t"; then +- ac_aux_dir=$ac_dir +- ac_install_sh="$ac_aux_dir/$ac_t -c" +- break 2 +- fi +- done ++ if test -f "$ac_dir/install-sh"; then ++ ac_aux_dir=$ac_dir ++ ac_install_sh="$ac_aux_dir/install-sh -c" ++ break ++ elif test -f "$ac_dir/install.sh"; then ++ ac_aux_dir=$ac_dir ++ ac_install_sh="$ac_aux_dir/install.sh -c" ++ break ++ elif test -f "$ac_dir/shtool"; then ++ ac_aux_dir=$ac_dir ++ ac_install_sh="$ac_aux_dir/shtool install -c" ++ break ++ fi + done + if test -z "$ac_aux_dir"; then +- as_fn_error "cannot find install-sh, install.sh, or shtool in config \"$srcdir\"/config" "$LINENO" 5 ++ as_fn_error $? "cannot find install-sh, install.sh, or shtool in config \"$srcdir\"/config" "$LINENO" 5 + fi + + # These three variables are undocumented and unsupported, +@@ -2864,7 +2813,7 @@ ac_config_headers="$ac_config_headers co + + # Make sure we can run config.sub. + $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || +- as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 ++ as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 + $as_echo_n "checking build system type... " >&6; } +@@ -2875,16 +2824,16 @@ else + test "x$ac_build_alias" = x && + ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` + test "x$ac_build_alias" = x && +- as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5 ++ as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 + ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || +- as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 ++ as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 + + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 + $as_echo "$ac_cv_build" >&6; } + case $ac_cv_build in + *-*-*) ;; +-*) as_fn_error "invalid value of canonical build" "$LINENO" 5;; ++*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5 ;; + esac + build=$ac_cv_build + ac_save_IFS=$IFS; IFS='-' +@@ -2909,7 +2858,7 @@ else + ac_cv_host=$ac_cv_build + else + ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || +- as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 ++ as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 + fi + + fi +@@ -2917,7 +2866,7 @@ fi + $as_echo "$ac_cv_host" >&6; } + case $ac_cv_host in + *-*-*) ;; +-*) as_fn_error "invalid value of canonical host" "$LINENO" 5;; ++*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5 ;; + esac + host=$ac_cv_host + ac_save_IFS=$IFS; IFS='-' +@@ -2947,7 +2896,7 @@ if test "${with_extra_includes+set}" = s + withval=$with_extra_includes; if test -d "$withval" ; then + CPPFLAGS="$CPPFLAGS -I$withval" + else +- as_fn_error "Cannot stat directory $withval" "$LINENO" 5 ++ as_fn_error $? "Cannot stat directory $withval" "$LINENO" 5 + fi + fi + +@@ -2958,7 +2907,7 @@ if test "${with_extra_libraries+set}" = + withval=$with_extra_libraries; if test -d "$withval" ; then + LDFLAGS="$LDFLAGS -L$withval" + else +- as_fn_error "Cannot stat directory $withval" "$LINENO" 5 ++ as_fn_error $? "Cannot stat directory $withval" "$LINENO" 5 + fi + fi + +@@ -3004,7 +2953,7 @@ esac + $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } + set x ${MAKE-make} + ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` +-if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then : ++if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\"" = set; then : + $as_echo_n "(cached) " >&6 + else + cat >conftest.make <<\_ACEOF +@@ -3012,7 +2961,7 @@ SHELL = /bin/sh + all: + @echo '@@@%%%=$(MAKE)=@@@%%%' + _ACEOF +-# GNU make sometimes prints "make[1]: Entering...", which would confuse us. ++# GNU make sometimes prints "make[1]: Entering ...", which would confuse us. + case `${MAKE-make} -f conftest.make 2>/dev/null` in + *@@@%%%=?*=@@@%%%*) + eval ac_cv_prog_make_${ac_make}_set=yes;; +@@ -3832,8 +3781,8 @@ fi + + test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 + $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +-as_fn_error "no acceptable C compiler found in \$PATH +-See \`config.log' for more details." "$LINENO" 5; } ++as_fn_error $? "no acceptable C compiler found in \$PATH ++See \`config.log' for more details" "$LINENO" 5 ; } + + # Provide some information about the compiler. + $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 +@@ -3947,9 +3896,8 @@ sed 's/^/| /' conftest.$ac_ext >&5 + + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 + $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +-{ as_fn_set_status 77 +-as_fn_error "C compiler cannot create executables +-See \`config.log' for more details." "$LINENO" 5; }; } ++as_fn_error 77 "C compiler cannot create executables ++See \`config.log' for more details" "$LINENO" 5 ; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + $as_echo "yes" >&6; } +@@ -3991,8 +3939,8 @@ done + else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 + $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +-as_fn_error "cannot compute suffix of executables: cannot compile and link +-See \`config.log' for more details." "$LINENO" 5; } ++as_fn_error $? "cannot compute suffix of executables: cannot compile and link ++See \`config.log' for more details" "$LINENO" 5 ; } + fi + rm -f conftest conftest$ac_cv_exeext + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 +@@ -4049,9 +3997,9 @@ $as_echo "$ac_try_echo"; } >&5 + else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 + $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +-as_fn_error "cannot run C compiled programs. ++as_fn_error $? "cannot run C compiled programs. + If you meant to cross compile, use \`--host'. +-See \`config.log' for more details." "$LINENO" 5; } ++See \`config.log' for more details" "$LINENO" 5 ; } + fi + fi + fi +@@ -4102,8 +4050,8 @@ sed 's/^/| /' conftest.$ac_ext >&5 + + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 + $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +-as_fn_error "cannot compute suffix of object files: cannot compile +-See \`config.log' for more details." "$LINENO" 5; } ++as_fn_error $? "cannot compute suffix of object files: cannot compile ++See \`config.log' for more details" "$LINENO" 5 ; } + fi + rm -f conftest.$ac_cv_objext conftest.$ac_ext + fi +@@ -4380,7 +4328,7 @@ esac + done + IFS=$as_save_IFS + if test -z "$ac_cv_path_SED"; then +- as_fn_error "no acceptable sed could be found in \$PATH" "$LINENO" 5 ++ as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 + fi + else + ac_cv_path_SED=$SED +@@ -4456,7 +4404,7 @@ esac + done + IFS=$as_save_IFS + if test -z "$ac_cv_path_GREP"; then +- as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 ++ as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi + else + ac_cv_path_GREP=$GREP +@@ -4522,7 +4470,7 @@ esac + done + IFS=$as_save_IFS + if test -z "$ac_cv_path_EGREP"; then +- as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 ++ as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi + else + ac_cv_path_EGREP=$EGREP +@@ -4589,7 +4537,7 @@ esac + done + IFS=$as_save_IFS + if test -z "$ac_cv_path_FGREP"; then +- as_fn_error "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 ++ as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi + else + ac_cv_path_FGREP=$FGREP +@@ -4705,7 +4653,7 @@ else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + $as_echo "no" >&6; } + fi +-test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5 ++test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 + $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } + if test "${lt_cv_prog_gnu_ld+set}" = set; then : +@@ -4907,13 +4855,13 @@ if test "${lt_cv_nm_interface+set}" = se + else + lt_cv_nm_interface="BSD nm" + echo "int some_variable = 0;" > conftest.$ac_ext +- (eval echo "\"\$as_me:4910: $ac_compile\"" >&5) ++ (eval echo "\"\$as_me:4858: $ac_compile\"" >&5) + (eval "$ac_compile" 2>conftest.err) + cat conftest.err >&5 +- (eval echo "\"\$as_me:4913: $NM \\\"conftest.$ac_objext\\\"\"" >&5) ++ (eval echo "\"\$as_me:4861: $NM \\\"conftest.$ac_objext\\\"\"" >&5) + (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) + cat conftest.err >&5 +- (eval echo "\"\$as_me:4916: output\"" >&5) ++ (eval echo "\"\$as_me:4864: output\"" >&5) + cat conftest.out >&5 + if $GREP 'External.*some_variable' conftest.out > /dev/null; then + lt_cv_nm_interface="MS dumpbin" +@@ -6108,7 +6056,7 @@ ia64-*-hpux*) + ;; + *-*-irix6*) + # Find out which ABI we are using. +- echo '#line 6111 "configure"' > conftest.$ac_ext ++ echo '#line 6059 "configure"' > conftest.$ac_ext + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + (eval $ac_compile) 2>&5 + ac_status=$? +@@ -6897,7 +6845,7 @@ else + # Broken: fails on valid input. + continue + fi +-rm -f conftest.err conftest.$ac_ext ++rm -f conftest.err conftest.i conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. +@@ -6913,11 +6861,11 @@ else + ac_preproc_ok=: + break + fi +-rm -f conftest.err conftest.$ac_ext ++rm -f conftest.err conftest.i conftest.$ac_ext + + done + # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +-rm -f conftest.err conftest.$ac_ext ++rm -f conftest.i conftest.err conftest.$ac_ext + if $ac_preproc_ok; then : + break + fi +@@ -6956,7 +6904,7 @@ else + # Broken: fails on valid input. + continue + fi +-rm -f conftest.err conftest.$ac_ext ++rm -f conftest.err conftest.i conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. +@@ -6972,18 +6920,18 @@ else + ac_preproc_ok=: + break + fi +-rm -f conftest.err conftest.$ac_ext ++rm -f conftest.err conftest.i conftest.$ac_ext + + done + # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +-rm -f conftest.err conftest.$ac_ext ++rm -f conftest.i conftest.err conftest.$ac_ext + if $ac_preproc_ok; then : + + else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 + $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +-as_fn_error "C preprocessor \"$CPP\" fails sanity check +-See \`config.log' for more details." "$LINENO" 5; } ++as_fn_error $? "C preprocessor \"$CPP\" fails sanity check ++See \`config.log' for more details" "$LINENO" 5 ; } + fi + + ac_ext=c +@@ -7112,8 +7060,7 @@ do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` + ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default + " +-eval as_val=\$$as_ac_Header +- if test "x$as_val" = x""yes; then : ++if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF + #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 + _ACEOF +@@ -7608,11 +7555,11 @@ else + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` +- (eval echo "\"\$as_me:7611: $lt_compile\"" >&5) ++ (eval echo "\"\$as_me:7558: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 +- echo "$as_me:7615: \$? = $ac_status" >&5 ++ echo "$as_me:7562: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. +@@ -7947,11 +7894,11 @@ else + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` +- (eval echo "\"\$as_me:7950: $lt_compile\"" >&5) ++ (eval echo "\"\$as_me:7897: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 +- echo "$as_me:7954: \$? = $ac_status" >&5 ++ echo "$as_me:7901: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. +@@ -8052,11 +7999,11 @@ else + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` +- (eval echo "\"\$as_me:8055: $lt_compile\"" >&5) ++ (eval echo "\"\$as_me:8002: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 +- echo "$as_me:8059: \$? = $ac_status" >&5 ++ echo "$as_me:8006: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized +@@ -8107,11 +8054,11 @@ else + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` +- (eval echo "\"\$as_me:8110: $lt_compile\"" >&5) ++ (eval echo "\"\$as_me:8057: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 +- echo "$as_me:8114: \$? = $ac_status" >&5 ++ echo "$as_me:8061: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized +@@ -10490,7 +10437,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 10493 "configure" ++#line 10440 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -10586,7 +10533,7 @@ else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 10589 "configure" ++#line 10536 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -11113,8 +11060,8 @@ fi + + test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 + $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +-as_fn_error "no acceptable C compiler found in \$PATH +-See \`config.log' for more details." "$LINENO" 5; } ++as_fn_error $? "no acceptable C compiler found in \$PATH ++See \`config.log' for more details" "$LINENO" 5 ; } + + # Provide some information about the compiler. + $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 +@@ -11909,7 +11856,7 @@ else + # Broken: fails on valid input. + continue + fi +-rm -f conftest.err conftest.$ac_ext ++rm -f conftest.err conftest.i conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. +@@ -11925,11 +11872,11 @@ else + ac_preproc_ok=: + break + fi +-rm -f conftest.err conftest.$ac_ext ++rm -f conftest.err conftest.i conftest.$ac_ext + + done + # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +-rm -f conftest.err conftest.$ac_ext ++rm -f conftest.i conftest.err conftest.$ac_ext + if $ac_preproc_ok; then : + break + fi +@@ -11968,7 +11915,7 @@ else + # Broken: fails on valid input. + continue + fi +-rm -f conftest.err conftest.$ac_ext ++rm -f conftest.err conftest.i conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. +@@ -11984,11 +11931,11 @@ else + ac_preproc_ok=: + break + fi +-rm -f conftest.err conftest.$ac_ext ++rm -f conftest.err conftest.i conftest.$ac_ext + + done + # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +-rm -f conftest.err conftest.$ac_ext ++rm -f conftest.i conftest.err conftest.$ac_ext + if $ac_preproc_ok; then : + + else +@@ -12217,7 +12164,7 @@ else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + $as_echo "no" >&6; } + fi +-test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5 ++test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 + $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } + if test "${lt_cv_prog_gnu_ld+set}" = set; then : +@@ -13758,11 +13705,11 @@ else + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` +- (eval echo "\"\$as_me:13761: $lt_compile\"" >&5) ++ (eval echo "\"\$as_me:13708: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 +- echo "$as_me:13765: \$? = $ac_status" >&5 ++ echo "$as_me:13712: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings other than the usual output. +@@ -13857,11 +13804,11 @@ else + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` +- (eval echo "\"\$as_me:13860: $lt_compile\"" >&5) ++ (eval echo "\"\$as_me:13807: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 +- echo "$as_me:13864: \$? = $ac_status" >&5 ++ echo "$as_me:13811: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized +@@ -13909,11 +13856,11 @@ else + -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` +- (eval echo "\"\$as_me:13912: $lt_compile\"" >&5) ++ (eval echo "\"\$as_me:13859: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 +- echo "$as_me:13916: \$? = $ac_status" >&5 ++ echo "$as_me:13863: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized +@@ -15573,7 +15520,7 @@ for ac_hdr in dirent.h sys/ndir.h sys/di + as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh` + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5 + $as_echo_n "checking for $ac_hdr that defines DIR... " >&6; } +-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then : ++if eval "test \"\${$as_ac_Header+set}\"" = set; then : + $as_echo_n "(cached) " >&6 + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +@@ -15600,8 +15547,7 @@ fi + eval ac_res=\$$as_ac_Header + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 + $as_echo "$ac_res" >&6; } +-eval as_val=\$$as_ac_Header +- if test "x$as_val" = x""yes; then : ++if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF + #define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1 + _ACEOF +@@ -15807,8 +15753,7 @@ for ac_header in wchar.h wctype.h sys/mm + do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` + ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +-eval as_val=\$$as_ac_Header +- if test "x$as_val" = x""yes; then : ++if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF + #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 + _ACEOF +@@ -15821,8 +15766,7 @@ for ac_header in stdint.h inttypes.h sys + do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` + ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +-eval as_val=\$$as_ac_Header +- if test "x$as_val" = x""yes; then : ++if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF + #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 + _ACEOF +@@ -16126,8 +16070,7 @@ do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` + ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default + " +-eval as_val=\$$as_ac_Header +- if test "x$as_val" = x""yes; then : ++if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF + #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 + _ACEOF +@@ -16347,8 +16290,7 @@ for ac_func in fork vfork + do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` + ac_fn_cxx_check_func "$LINENO" "$ac_func" "$as_ac_var" +-eval as_val=\$$as_ac_var +- if test "x$as_val" = x""yes; then : ++if eval test \"x\$"$as_ac_var"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF + #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 + _ACEOF +@@ -16617,8 +16559,7 @@ for ac_func in wcrtomb iswspace setenv + do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` + ac_fn_cxx_check_func "$LINENO" "$ac_func" "$as_ac_var" +-eval as_val=\$$as_ac_var +- if test "x$as_val" = x""yes; then : ++if eval test \"x\$"$as_ac_var"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF + #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 + _ACEOF +@@ -16630,8 +16571,7 @@ for ac_func in putc_unlocked strerror vs + do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` + ac_fn_cxx_check_func "$LINENO" "$ac_func" "$as_ac_var" +-eval as_val=\$$as_ac_var +- if test "x$as_val" = x""yes; then : ++if eval test \"x\$"$as_ac_var"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF + #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 + _ACEOF +@@ -16643,8 +16583,7 @@ for ac_func in gethostname strftime getp + do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` + ac_fn_cxx_check_func "$LINENO" "$ac_func" "$as_ac_var" +-eval as_val=\$$as_ac_var +- if test "x$as_val" = x""yes; then : ++if eval test \"x\$"$as_ac_var"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF + #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 + _ACEOF +@@ -16656,8 +16595,7 @@ for ac_func in sigaction mkstemp + do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` + ac_fn_cxx_check_func "$LINENO" "$ac_func" "$as_ac_var" +-eval as_val=\$$as_ac_var +- if test "x$as_val" = x""yes; then : ++if eval test \"x\$"$as_ac_var"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF + #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 + _ACEOF +@@ -16987,7 +16925,7 @@ case "${host_cpu}-${host_os}" in + ;; + esac + case "${host_os}-${GCC}" in +- *linux*-yes) ++ *linux*-yes | *kfreebsd*-yes ) + # On Linux/GCC, libtool uses -nostdlib for linking, which cancel part + # of the -pthread flag effect (libpthread is not automatically linked). + # So we'll try to link with both -pthread and -lpthread first: +@@ -17147,114 +17085,6 @@ rm -f core conftest.err conftest.$ac_obj + ;; + esac + fi +- if test x$ac_threads = xno ; then +- case x$ac_use_threads in +- x|xyes|xauto|xcothread) +- +- +-acx_cothread=no +-if test x$GXX = xyes ; then +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cothreads work with ${host_cpu}" >&5 +-$as_echo_n "checking whether cothreads work with ${host_cpu}... " >&6; } +- case ${host_cpu} in +- i?86|powerpc*|mips*|alpha*|hppa*) +- acx_cothread=yes +- ;; +- esac +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_cothread" >&5 +-$as_echo "$acx_cothread" >&6; } +-fi +-if test x$acx_cothread != xno ; then +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether libgcc contains the cothread patch" >&5 +-$as_echo_n "checking whether libgcc contains the cothread patch... " >&6; } +- 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 +- +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ +-extern "C" { void *(*__get_eh_context_ptr)(); +- void *__new_eh_context(void); } +-int +-main () +-{ +- __get_eh_context_ptr = &__new_eh_context; +- ; +- return 0; +-} +-_ACEOF +-if ac_fn_cxx_try_link "$LINENO"; then : +- acx_cothread_patch=yes +-else +- acx_cothread_patch=no +-fi +-rm -f core conftest.err conftest.$ac_objext \ +- conftest$ac_exeext conftest.$ac_ext +- 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 +- +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_cothread_patch" >&5 +-$as_echo "$acx_cothread_patch" >&6; } +- if test x$acx_cothread_patch = xno ; then +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the cothread patch is critical" >&5 +-$as_echo_n "checking if the cothread patch is critical... " >&6; } +- echo 'void foo() { throw "Hello"; }' > conftest.cc +- compile="$CXX $CXXFLAGS -c conftest.cc" +- check="nm conftest.o | grep sjthrow | cat > conftest.out" +- acx_cothread_patch=yes +- if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$compile\""; } >&5 +- (eval $compile) 2>&5 +- ac_status=$? +- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 +- test $ac_status = 0; } && { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$check\""; } >&5 +- (eval $check) 2>&5 +- ac_status=$? +- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 +- test $ac_status = 0; } ; then +- if test -z "`cat conftest.out`" ; then +- acx_cothread_patch=no +- fi +- fi +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_cothread_patch" >&5 +-$as_echo "$acx_cothread_patch" >&6; } +- rm conftest.* +- if test x$acx_cothread_patch = xyes ; then +- acx_cothread=no +- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Cothread cannot work without the patch" >&5 +-$as_echo "$as_me: WARNING: Cothread cannot work without the patch" >&2;} +- else +- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Applying the patch is recommended anyway" >&5 +-$as_echo "$as_me: WARNING: Applying the patch is recommended anyway" >&2;} +- fi +- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: See the INSTALL file for more information" >&5 +-$as_echo "$as_me: WARNING: See the INSTALL file for more information" >&2;} +- fi +-fi +-# Must do. +-if test x$acx_cothread = xyes ; then +- +-$as_echo "#define HAVE_COTHREAD 1" >>confdefs.h +- +- if test x$acx_cothread_patch = xyes ; then +- +-$as_echo "#define HAVE_COTHREAD_PATCH 1" >>confdefs.h +- +- fi +- ac_threads=cothread +- THREAD_CFLAGS="-DTHREADMODEL=COTHREADS" +- +-else +- : +-fi +- +- ;; +- esac +- fi + fi + + +@@ -17300,7 +17130,6 @@ fi + # What to compile + # ---------------------------------------- + +- + # Check compilation of xmltools + ac_enable_xmltools=yes + # Check whether --enable-xmltools was given. +@@ -17318,1379 +17147,136 @@ fi + + + ++# ---------------------------------------- ++# Desktop files ++# ---------------------------------------- + +-# Check compilation of djview +-# Check whether --enable-djview was given. +-if test "${enable_djview+set}" = set; then : +- enableval=$enable_djview; ac_enable_djview=$enableval +-else +- ac_enable_djview=no ++ac_desktopfiles=yes ++# Check whether --enable-desktopfiles was given. ++if test "${enable_desktopfiles+set}" = set; then : ++ enableval=$enable_desktopfiles; ac_desktopfiles=$enableval + fi + +-if test x$ac_enable_djview != xno ; then +- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Enabling compilation of djview3. +--------------------------------------------------------- +-*** The Qt2 or Qt3 based viewer, djview3, is considered obsolete. +-*** The recommended viewer is now the Qt4 based viewer, djview4. +-*** Djview4 comes in a separate source package that should be +-*** compiled after installing the djvulibre library. +---------------------------------------------------------" >&5 +-$as_echo "$as_me: WARNING: Enabling compilation of djview3. +--------------------------------------------------------- +-*** The Qt2 or Qt3 based viewer, djview3, is considered obsolete. +-*** The recommended viewer is now the Qt4 based viewer, djview4. +-*** Djview4 comes in a separate source package that should be +-*** compiled after installing the djvulibre library. +---------------------------------------------------------" >&2;} +- # Search QT library +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5 +-$as_echo_n "checking for X... " >&6; } +- +- +-# Check whether --with-x was given. +-if test "${with_x+set}" = set; then : +- withval=$with_x; +-fi +- +-# $have_x is `yes', `no', `disabled', or empty when we do not yet know. +-if test "x$with_x" = xno; then +- # The user explicitly disabled X. +- have_x=disabled +-else +- case $x_includes,$x_libraries in #( +- *\'*) as_fn_error "cannot use X directory names containing '" "$LINENO" 5;; #( +- *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then : +- $as_echo_n "(cached) " >&6 +-else +- # One or both of the vars are not set, and there is no cached value. +-ac_x_includes=no ac_x_libraries=no +-rm -f -r conftest.dir +-if mkdir conftest.dir; then +- cd conftest.dir +- cat >Imakefile <<'_ACEOF' +-incroot: +- @echo incroot='${INCROOT}' +-usrlibdir: +- @echo usrlibdir='${USRLIBDIR}' +-libdir: +- @echo libdir='${LIBDIR}' +-_ACEOF +- if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then +- # GNU make sometimes prints "make[1]: Entering...", which would confuse us. +- for ac_var in incroot usrlibdir libdir; do +- eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`" +- done +- # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. +- for ac_extension in a so sl dylib la dll; do +- if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" && +- test -f "$ac_im_libdir/libX11.$ac_extension"; then +- ac_im_usrlibdir=$ac_im_libdir; break +- fi +- done +- # Screen out bogus values from the imake configuration. They are +- # bogus both because they are the default anyway, and because +- # using them would break gcc on systems where it needs fixed includes. +- case $ac_im_incroot in +- /usr/include) ac_x_includes= ;; +- *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;; +- esac +- case $ac_im_usrlibdir in +- /usr/lib | /usr/lib64 | /lib | /lib64) ;; +- *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;; +- esac +- fi +- cd .. +- rm -f -r conftest.dir +-fi + +-# Standard set of common directories for X headers. +-# Check X11 before X11Rn because it is often a symlink to the current release. +-ac_x_header_dirs=' +-/usr/X11/include +-/usr/X11R7/include +-/usr/X11R6/include +-/usr/X11R5/include +-/usr/X11R4/include +- +-/usr/include/X11 +-/usr/include/X11R7 +-/usr/include/X11R6 +-/usr/include/X11R5 +-/usr/include/X11R4 +- +-/usr/local/X11/include +-/usr/local/X11R7/include +-/usr/local/X11R6/include +-/usr/local/X11R5/include +-/usr/local/X11R4/include +- +-/usr/local/include/X11 +-/usr/local/include/X11R7 +-/usr/local/include/X11R6 +-/usr/local/include/X11R5 +-/usr/local/include/X11R4 +- +-/usr/X386/include +-/usr/x386/include +-/usr/XFree86/include/X11 +- +-/usr/include +-/usr/local/include +-/usr/unsupported/include +-/usr/athena/include +-/usr/local/x11r5/include +-/usr/lpp/Xamples/include +- +-/usr/openwin/include +-/usr/openwin/share/include' +- +-if test "$ac_x_includes" = no; then +- # Guess where to find include files, by looking for Xlib.h. +- # First, try using that file with no special directory specified. +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ +-#include +-_ACEOF +-if ac_fn_cxx_try_cpp "$LINENO"; then : +- # We can compile using X headers with no special include directory. +-ac_x_includes= ++# Check for xdg tools ++# Extract the first word of "xdg-mime", so it can be a program name with args. ++set dummy xdg-mime; ac_word=$2 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if test "${ac_cv_path_XDG_MIME+set}" = set; then : ++ $as_echo_n "(cached) " >&6 + else +- for ac_dir in $ac_x_header_dirs; do +- if test -r "$ac_dir/X11/Xlib.h"; then +- ac_x_includes=$ac_dir +- break ++ case $XDG_MIME in ++ [\\/]* | ?:[\\/]*) ++ ac_cv_path_XDG_MIME="$XDG_MIME" # Let the user override the test with a path. ++ ;; ++ *) ++ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ++ ac_cv_path_XDG_MIME="$as_dir/$ac_word$ac_exec_ext" ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ break 2 + fi + done ++ done ++IFS=$as_save_IFS ++ ++ ;; ++esac ++fi ++XDG_MIME=$ac_cv_path_XDG_MIME ++if test -n "$XDG_MIME"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XDG_MIME" >&5 ++$as_echo "$XDG_MIME" >&6; } ++else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } + fi +-rm -f conftest.err conftest.$ac_ext +-fi # $ac_x_includes = no + +-if test "$ac_x_libraries" = no; then +- # Check for the libraries. +- # See if we find them without any special options. +- # Don't add to $LIBS permanently. +- ac_save_LIBS=$LIBS +- LIBS="-lX11 $LIBS" +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ +-#include +-int +-main () +-{ +-XrmInitialize () +- ; +- return 0; +-} +-_ACEOF +-if ac_fn_cxx_try_link "$LINENO"; then : +- LIBS=$ac_save_LIBS +-# We can link X programs with no special library path. +-ac_x_libraries= ++ ++# Extract the first word of "xdg-icon-resource", so it can be a program name with args. ++set dummy xdg-icon-resource; ac_word=$2 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if test "${ac_cv_path_XDG_ICON_RESOURCE+set}" = set; then : ++ $as_echo_n "(cached) " >&6 + else +- LIBS=$ac_save_LIBS +-for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g` ++ case $XDG_ICON_RESOURCE in ++ [\\/]* | ?:[\\/]*) ++ ac_cv_path_XDG_ICON_RESOURCE="$XDG_ICON_RESOURCE" # Let the user override the test with a path. ++ ;; ++ *) ++ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH + do +- # Don't even attempt the hair of trying to link an X program! +- for ac_extension in a so sl dylib la dll; do +- if test -r "$ac_dir/libX11.$ac_extension"; then +- ac_x_libraries=$ac_dir +- break 2 +- fi +- done ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ++ ac_cv_path_XDG_ICON_RESOURCE="$as_dir/$ac_word$ac_exec_ext" ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ break 2 ++ fi + done +-fi +-rm -f core conftest.err conftest.$ac_objext \ +- conftest$ac_exeext conftest.$ac_ext +-fi # $ac_x_libraries = no ++ done ++IFS=$as_save_IFS + +-case $ac_x_includes,$ac_x_libraries in #( +- no,* | *,no | *\'*) +- # Didn't find X, or a directory has "'" in its name. +- ac_cv_have_x="have_x=no";; #( +- *) +- # Record where we found X for the cache. +- ac_cv_have_x="have_x=yes\ +- ac_x_includes='$ac_x_includes'\ +- ac_x_libraries='$ac_x_libraries'" ++ ;; + esac + fi +-;; #( +- *) have_x=yes;; +- esac +- eval "$ac_cv_have_x" +-fi # $with_x != no +- +-if test "$have_x" != yes; then +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5 +-$as_echo "$have_x" >&6; } +- no_x=yes +-else +- # If each of the values was on the command line, it overrides each guess. +- test "x$x_includes" = xNONE && x_includes=$ac_x_includes +- test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries +- # Update the cache value to reflect the command line values. +- ac_cv_have_x="have_x=yes\ +- ac_x_includes='$x_includes'\ +- ac_x_libraries='$x_libraries'" +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5 +-$as_echo "libraries $x_libraries, headers $x_includes" >&6; } +-fi +- +-if test "$no_x" = yes; then +- # Not all programs may use this symbol, but it does not hurt to define it. +- +-$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h +- +- X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS= +-else +- if test -n "$x_includes"; then +- X_CFLAGS="$X_CFLAGS -I$x_includes" +- fi +- +- # It would also be nice to do this for all -L options, not just this one. +- if test -n "$x_libraries"; then +- X_LIBS="$X_LIBS -L$x_libraries" +- # For Solaris; some versions of Sun CC require a space after -R and +- # others require no space. Words are not sufficient . . . . +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5 +-$as_echo_n "checking whether -R must be followed by a space... " >&6; } +- ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries" +- ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag +- ac_cxx_werror_flag=yes +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ +- +-int +-main () +-{ +- +- ; +- return 0; +-} +-_ACEOF +-if ac_fn_cxx_try_link "$LINENO"; then : ++XDG_ICON_RESOURCE=$ac_cv_path_XDG_ICON_RESOURCE ++if test -n "$XDG_ICON_RESOURCE"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XDG_ICON_RESOURCE" >&5 ++$as_echo "$XDG_ICON_RESOURCE" >&6; } ++else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + $as_echo "no" >&6; } +- X_LIBS="$X_LIBS -R$x_libraries" +-else +- LIBS="$ac_xsave_LIBS -R $x_libraries" +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ ++fi + +-int +-main () +-{ + +- ; +- return 0; +-} +-_ACEOF +-if ac_fn_cxx_try_link "$LINENO"; then : +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +-$as_echo "yes" >&6; } +- X_LIBS="$X_LIBS -R $x_libraries" ++# Extract the first word of "xdg-desktop-menu", so it can be a program name with args. ++set dummy xdg-desktop-menu; ac_word=$2 ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 ++$as_echo_n "checking for $ac_word... " >&6; } ++if test "${ac_cv_path_XDG_DESKTOP_MENU+set}" = set; then : ++ $as_echo_n "(cached) " >&6 + else +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5 +-$as_echo "neither works" >&6; } +-fi +-rm -f core conftest.err conftest.$ac_objext \ +- conftest$ac_exeext conftest.$ac_ext +-fi +-rm -f core conftest.err conftest.$ac_objext \ +- conftest$ac_exeext conftest.$ac_ext +- ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag +- LIBS=$ac_xsave_LIBS ++ case $XDG_DESKTOP_MENU in ++ [\\/]* | ?:[\\/]*) ++ ac_cv_path_XDG_DESKTOP_MENU="$XDG_DESKTOP_MENU" # Let the user override the test with a path. ++ ;; ++ *) ++ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR ++for as_dir in $PATH ++do ++ IFS=$as_save_IFS ++ test -z "$as_dir" && as_dir=. ++ for ac_exec_ext in '' $ac_executable_extensions; do ++ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ++ ac_cv_path_XDG_DESKTOP_MENU="$as_dir/$ac_word$ac_exec_ext" ++ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 ++ break 2 + fi ++done ++ done ++IFS=$as_save_IFS + +- # Check for system-dependent libraries X programs must link with. +- # Do this before checking for the system-independent R6 libraries +- # (-lICE), since we may need -lsocket or whatever for X linking. +- +- if test "$ISC" = yes; then +- X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet" +- else +- # Martyn Johnson says this is needed for Ultrix, if the X +- # libraries were built with DECnet support. And Karl Berry says +- # the Alpha needs dnet_stub (dnet does not exist). +- ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11" +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ +- +-/* Override any GCC internal prototype to avoid an error. +- Use char because int might match the return type of a GCC +- builtin and then its argument prototype would still apply. */ +-#ifdef __cplusplus +-extern "C" +-#endif +-char XOpenDisplay (); +-int +-main () +-{ +-return XOpenDisplay (); +- ; +- return 0; +-} +-_ACEOF +-if ac_fn_cxx_try_link "$LINENO"; then : +- +-else +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5 +-$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; } +-if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then : +- $as_echo_n "(cached) " >&6 +-else +- ac_check_lib_save_LIBS=$LIBS +-LIBS="-ldnet $LIBS" +-cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ +- +-/* Override any GCC internal prototype to avoid an error. +- Use char because int might match the return type of a GCC +- builtin and then its argument prototype would still apply. */ +-#ifdef __cplusplus +-extern "C" +-#endif +-char dnet_ntoa (); +-int +-main () +-{ +-return dnet_ntoa (); +- ; +- return 0; +-} +-_ACEOF +-if ac_fn_cxx_try_link "$LINENO"; then : +- ac_cv_lib_dnet_dnet_ntoa=yes +-else +- ac_cv_lib_dnet_dnet_ntoa=no +-fi +-rm -f core conftest.err conftest.$ac_objext \ +- conftest$ac_exeext conftest.$ac_ext +-LIBS=$ac_check_lib_save_LIBS +-fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5 +-$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; } +-if test "x$ac_cv_lib_dnet_dnet_ntoa" = x""yes; then : +- X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet" +-fi +- +- if test $ac_cv_lib_dnet_dnet_ntoa = no; then +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5 +-$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; } +-if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then : +- $as_echo_n "(cached) " >&6 +-else +- ac_check_lib_save_LIBS=$LIBS +-LIBS="-ldnet_stub $LIBS" +-cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ +- +-/* Override any GCC internal prototype to avoid an error. +- Use char because int might match the return type of a GCC +- builtin and then its argument prototype would still apply. */ +-#ifdef __cplusplus +-extern "C" +-#endif +-char dnet_ntoa (); +-int +-main () +-{ +-return dnet_ntoa (); +- ; +- return 0; +-} +-_ACEOF +-if ac_fn_cxx_try_link "$LINENO"; then : +- ac_cv_lib_dnet_stub_dnet_ntoa=yes +-else +- ac_cv_lib_dnet_stub_dnet_ntoa=no +-fi +-rm -f core conftest.err conftest.$ac_objext \ +- conftest$ac_exeext conftest.$ac_ext +-LIBS=$ac_check_lib_save_LIBS +-fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5 +-$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; } +-if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = x""yes; then : +- X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub" +-fi +- +- fi +-fi +-rm -f core conftest.err conftest.$ac_objext \ +- conftest$ac_exeext conftest.$ac_ext +- LIBS="$ac_xsave_LIBS" +- +- # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT, +- # to get the SysV transport functions. +- # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4) +- # needs -lnsl. +- # The nsl library prevents programs from opening the X display +- # on Irix 5.2, according to T.E. Dickey. +- # The functions gethostbyname, getservbyname, and inet_addr are +- # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking. +- ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname" +-if test "x$ac_cv_func_gethostbyname" = x""yes; then : +- +-fi +- +- if test $ac_cv_func_gethostbyname = no; then +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5 +-$as_echo_n "checking for gethostbyname in -lnsl... " >&6; } +-if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then : +- $as_echo_n "(cached) " >&6 +-else +- ac_check_lib_save_LIBS=$LIBS +-LIBS="-lnsl $LIBS" +-cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ +- +-/* Override any GCC internal prototype to avoid an error. +- Use char because int might match the return type of a GCC +- builtin and then its argument prototype would still apply. */ +-#ifdef __cplusplus +-extern "C" +-#endif +-char gethostbyname (); +-int +-main () +-{ +-return gethostbyname (); +- ; +- return 0; +-} +-_ACEOF +-if ac_fn_cxx_try_link "$LINENO"; then : +- ac_cv_lib_nsl_gethostbyname=yes +-else +- ac_cv_lib_nsl_gethostbyname=no +-fi +-rm -f core conftest.err conftest.$ac_objext \ +- conftest$ac_exeext conftest.$ac_ext +-LIBS=$ac_check_lib_save_LIBS +-fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5 +-$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; } +-if test "x$ac_cv_lib_nsl_gethostbyname" = x""yes; then : +- X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl" +-fi +- +- if test $ac_cv_lib_nsl_gethostbyname = no; then +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5 +-$as_echo_n "checking for gethostbyname in -lbsd... " >&6; } +-if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then : +- $as_echo_n "(cached) " >&6 +-else +- ac_check_lib_save_LIBS=$LIBS +-LIBS="-lbsd $LIBS" +-cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ +- +-/* Override any GCC internal prototype to avoid an error. +- Use char because int might match the return type of a GCC +- builtin and then its argument prototype would still apply. */ +-#ifdef __cplusplus +-extern "C" +-#endif +-char gethostbyname (); +-int +-main () +-{ +-return gethostbyname (); +- ; +- return 0; +-} +-_ACEOF +-if ac_fn_cxx_try_link "$LINENO"; then : +- ac_cv_lib_bsd_gethostbyname=yes +-else +- ac_cv_lib_bsd_gethostbyname=no +-fi +-rm -f core conftest.err conftest.$ac_objext \ +- conftest$ac_exeext conftest.$ac_ext +-LIBS=$ac_check_lib_save_LIBS +-fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5 +-$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; } +-if test "x$ac_cv_lib_bsd_gethostbyname" = x""yes; then : +- X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd" +-fi +- +- fi +- fi +- +- # lieder@skyler.mavd.honeywell.com says without -lsocket, +- # socket/setsockopt and other routines are undefined under SCO ODT +- # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary +- # on later versions), says Simon Leinen: it contains gethostby* +- # variants that don't use the name server (or something). -lsocket +- # must be given before -lnsl if both are needed. We assume that +- # if connect needs -lnsl, so does gethostbyname. +- ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect" +-if test "x$ac_cv_func_connect" = x""yes; then : +- +-fi +- +- if test $ac_cv_func_connect = no; then +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5 +-$as_echo_n "checking for connect in -lsocket... " >&6; } +-if test "${ac_cv_lib_socket_connect+set}" = set; then : +- $as_echo_n "(cached) " >&6 +-else +- ac_check_lib_save_LIBS=$LIBS +-LIBS="-lsocket $X_EXTRA_LIBS $LIBS" +-cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ +- +-/* Override any GCC internal prototype to avoid an error. +- Use char because int might match the return type of a GCC +- builtin and then its argument prototype would still apply. */ +-#ifdef __cplusplus +-extern "C" +-#endif +-char connect (); +-int +-main () +-{ +-return connect (); +- ; +- return 0; +-} +-_ACEOF +-if ac_fn_cxx_try_link "$LINENO"; then : +- ac_cv_lib_socket_connect=yes +-else +- ac_cv_lib_socket_connect=no +-fi +-rm -f core conftest.err conftest.$ac_objext \ +- conftest$ac_exeext conftest.$ac_ext +-LIBS=$ac_check_lib_save_LIBS +-fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5 +-$as_echo "$ac_cv_lib_socket_connect" >&6; } +-if test "x$ac_cv_lib_socket_connect" = x""yes; then : +- X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS" +-fi +- +- fi +- +- # Guillermo Gomez says -lposix is necessary on A/UX. +- ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove" +-if test "x$ac_cv_func_remove" = x""yes; then : +- +-fi +- +- if test $ac_cv_func_remove = no; then +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5 +-$as_echo_n "checking for remove in -lposix... " >&6; } +-if test "${ac_cv_lib_posix_remove+set}" = set; then : +- $as_echo_n "(cached) " >&6 +-else +- ac_check_lib_save_LIBS=$LIBS +-LIBS="-lposix $LIBS" +-cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ +- +-/* Override any GCC internal prototype to avoid an error. +- Use char because int might match the return type of a GCC +- builtin and then its argument prototype would still apply. */ +-#ifdef __cplusplus +-extern "C" +-#endif +-char remove (); +-int +-main () +-{ +-return remove (); +- ; +- return 0; +-} +-_ACEOF +-if ac_fn_cxx_try_link "$LINENO"; then : +- ac_cv_lib_posix_remove=yes +-else +- ac_cv_lib_posix_remove=no +-fi +-rm -f core conftest.err conftest.$ac_objext \ +- conftest$ac_exeext conftest.$ac_ext +-LIBS=$ac_check_lib_save_LIBS +-fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5 +-$as_echo "$ac_cv_lib_posix_remove" >&6; } +-if test "x$ac_cv_lib_posix_remove" = x""yes; then : +- X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix" +-fi +- +- fi +- +- # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. +- ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat" +-if test "x$ac_cv_func_shmat" = x""yes; then : +- +-fi +- +- if test $ac_cv_func_shmat = no; then +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5 +-$as_echo_n "checking for shmat in -lipc... " >&6; } +-if test "${ac_cv_lib_ipc_shmat+set}" = set; then : +- $as_echo_n "(cached) " >&6 +-else +- ac_check_lib_save_LIBS=$LIBS +-LIBS="-lipc $LIBS" +-cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ +- +-/* Override any GCC internal prototype to avoid an error. +- Use char because int might match the return type of a GCC +- builtin and then its argument prototype would still apply. */ +-#ifdef __cplusplus +-extern "C" +-#endif +-char shmat (); +-int +-main () +-{ +-return shmat (); +- ; +- return 0; +-} +-_ACEOF +-if ac_fn_cxx_try_link "$LINENO"; then : +- ac_cv_lib_ipc_shmat=yes +-else +- ac_cv_lib_ipc_shmat=no +-fi +-rm -f core conftest.err conftest.$ac_objext \ +- conftest$ac_exeext conftest.$ac_ext +-LIBS=$ac_check_lib_save_LIBS +-fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5 +-$as_echo "$ac_cv_lib_ipc_shmat" >&6; } +-if test "x$ac_cv_lib_ipc_shmat" = x""yes; then : +- X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc" +-fi +- +- fi +- fi +- +- # Check for libraries that X11R6 Xt/Xaw programs need. +- ac_save_LDFLAGS=$LDFLAGS +- test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries" +- # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to +- # check for ICE first), but we must link in the order -lSM -lICE or +- # we get undefined symbols. So assume we have SM if we have ICE. +- # These have to be linked with before -lX11, unlike the other +- # libraries we check for below, so use a different variable. +- # John Interrante, Karl Berry +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5 +-$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; } +-if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then : +- $as_echo_n "(cached) " >&6 +-else +- ac_check_lib_save_LIBS=$LIBS +-LIBS="-lICE $X_EXTRA_LIBS $LIBS" +-cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ +- +-/* Override any GCC internal prototype to avoid an error. +- Use char because int might match the return type of a GCC +- builtin and then its argument prototype would still apply. */ +-#ifdef __cplusplus +-extern "C" +-#endif +-char IceConnectionNumber (); +-int +-main () +-{ +-return IceConnectionNumber (); +- ; +- return 0; +-} +-_ACEOF +-if ac_fn_cxx_try_link "$LINENO"; then : +- ac_cv_lib_ICE_IceConnectionNumber=yes +-else +- ac_cv_lib_ICE_IceConnectionNumber=no +-fi +-rm -f core conftest.err conftest.$ac_objext \ +- conftest$ac_exeext conftest.$ac_ext +-LIBS=$ac_check_lib_save_LIBS +-fi +-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5 +-$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; } +-if test "x$ac_cv_lib_ICE_IceConnectionNumber" = x""yes; then : +- X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE" +-fi +- +- LDFLAGS=$ac_save_LDFLAGS +- +-fi +- +- +- +- +- if test ${no_x-no} != yes ; then +- X_LIBS="$X_LIBS $X_PRE_LIBS -lXext -lX11 $X_EXTRA_LIBS" +- fi +- # Variables +- +- +- +- +- +- # Arguments +- +-# Check whether --with-qt was given. +-if test "${with_qt+set}" = set; then : +- withval=$with_qt; test x$withval != xyes && QTDIR=$withval +-fi +- +- test x$no_x = xyes && QTDIR=no +- # Check for the lib64 thing +- lib=`basename "$libdir"` +- case "$lib" in lib*) ;; *) lib="lib" ;; esac +- if test $lib = "lib" -o $lib = "lib64" ; then +- libs="$lib" ; else libs="$lib lib"; fi +- # Standard qt directory +- ac_has_qt=no +- if test x$QTDIR != xno ; then +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Qt root directory" >&5 +-$as_echo_n "checking for Qt root directory... " >&6; } +- ac_has_qt=no +- ac_userdef_qt=no +- if test x${QT_CFLAGS+set} = xset || test x${QT_LIBS+set} = xset ; then +- ac_userdef_qt=yes +- ac_has_qt="user defined QT_CFLAGS and QT_LIBS" # no questions asked +- else +- ac_qt_dirs="/usr/local /usr/X11R6 /usr" +- for lib in $libs ; do +- for n in /usr/$lib/qt* ; do +- test -d $n && ac_qt_dirs="$n $ac_qt_dirs" ; +- done +- done +- if test -d "$QTDIR" ; then +- ac_qt_dirs="$QTDIR $ac_qt_dirs" +- fi +- for dir in $ac_qt_dirs ; do +- if test -r $dir/include/qwidget.h ; then +- ac_has_qt=$dir +- QTDIR=$dir +- break +- fi +- done +- fi +- # Unusual install +- if test "x$ac_has_qt" = xno ; then +- ac_qt_names="qt3 qt2 qt" +- ac_qt_dirs="/usr /usr/X11R6 /usr/local" +- case "$host" in +- *-darwin* | *-macos10*) +- if test -d /opt/local ; then +- ac_qt_dirs="/opt/local $ac_qt_dirs" +- elif test -d /sw ; then +- ac_qt_dirs="/sw $ac_qt_dirs" +- fi +- ;; +- esac +- ac_qt_dirs="$QTDIR $prefix $ac_qt_dirs" +- for d in $ac_qt_dirs ; do +- for n in $ac_qt_names ; do +- if test -r $d/include/$n/qwidget.h ; then +- for lib in $libs ; do +- for l in lib$n.so lib$n-mt.so lib$n-mt.dylib lib$n.a lib$n-mt.a ; do +- if test -r $d/$lib/$l ; then +- QT_CFLAGS="-I$d/include/$n" +- QT_LIBS="-L$d/$lib -l$n" +- QTDIR=$d +- ac_has_qt="bsd-style Qt install" +- break 3 +- fi +- done +- for l in libqt.dll.a libqt-mt.dll.a libqt-mt.la libqt.a libqt-mt.a; do +- if test -r $d/$lib/$n/$lib/$l ; then +- QT_CFLAGS="-I$d/include/$n" +- QT_LIBS="-L$d/$lib/$n/$lib -lqt" +- QTDIR=$d/$lib/$n +- ac_has_qt="cygwin-style Qt install" +- break 3 +- fi +- done +- for l in libqt.so libqt-mt.so libqt-mt.dylib libqt.a libqt-mt.a; do +- if test -r $d/$lib/$l ; then +- QT_CFLAGS="-I$d/include/$n" +- QT_LIBS="-L$d/$lib -lqt" +- QTDIR=$d +- ac_has_qt="debian-style Qt install" +- break 3 +- fi +- done +- done +- fi +- done +- done +- fi +- # Print result +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_has_qt" >&5 +-$as_echo "$ac_has_qt" >&6; } +- fi +- # Programs +- if test "x$ac_has_qt" != xno ; then +- if test "x$ac_userdef_qt" != xyes ; then +- if test x${QT_CFLAGS+set} != xset ; then +- QT_CFLAGS="-I$QTDIR/include" +- fi +- if test x${QT_LIBS+set} != xset ; then +- if test -d $QTDIR/$lib ; then +- QT_LIBS="-L$QTDIR/$lib -lqt" +- else +- QT_LIBS="-L$QTDIR/lib -lqt" +- fi +- fi +- # KDE-3.0 styles require qt-mt even in non KDE applications. +- # Bero dixit. See kde bug #40823. +- qt_libdir= +- qt_libname= +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for multithreaded Qt3 library" >&5 +-$as_echo_n "checking for multithreaded Qt3 library... " >&6; } +- for n in `echo $QT_LIBS` ; do case $n in +- -L*) qt_libdir=`echo "$n" | sed -e 's:^-L::'` ;; +- -l*) qt_libname=`echo "$n" | sed -e 's:^-l::'` ;; +- esac +- done +- ac_has_qt_mt=no +- for n in ${qt_libdir}/lib${qt_libname}-mt.so \ +- ${qt_libdir}/lib${qt_libname}-mt.dylib \ +- ${qt_libdir}/lib${qt_libname}-mt.dll.a; do +- if test -r $n ; then +- ac_has_qt_mt=yes +- fi +- done +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_has_qt_mt" >&5 +-$as_echo "$ac_has_qt_mt" >&6; } +- if test $ac_has_qt_mt = yes ; then +- newqtlibs= +- for n in `echo $QT_LIBS` ; do +- test "$n" = "-l$qt_libname" && n="$n-mt" +- newqtlibs="$newqtlibs $n" +- done +- QT_LIBS="$newqtlibs" +- fi +- fi +- for ac_prog in moc-qt3 moc +-do +- # Extract the first word of "$ac_prog", so it can be a program name with args. +-set dummy $ac_prog; ac_word=$2 +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +-$as_echo_n "checking for $ac_word... " >&6; } +-if test "${ac_cv_path_MOC+set}" = set; then : +- $as_echo_n "(cached) " >&6 +-else +- case $MOC in +- [\\/]* | ?:[\\/]*) +- ac_cv_path_MOC="$MOC" # Let the user override the test with a path. +- ;; +- *) +- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +-for as_dir in $QTDIR/bin $PATH +-do +- IFS=$as_save_IFS +- test -z "$as_dir" && as_dir=. +- for ac_exec_ext in '' $ac_executable_extensions; do +- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then +- ac_cv_path_MOC="$as_dir/$ac_word$ac_exec_ext" +- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 +- break 2 +- fi +-done +- done +-IFS=$as_save_IFS +- +- ;; +-esac +-fi +-MOC=$ac_cv_path_MOC +-if test -n "$MOC"; then +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MOC" >&5 +-$as_echo "$MOC" >&6; } +-else +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +-$as_echo "no" >&6; } +-fi +- +- +- test -n "$MOC" && break +-done +-test -n "$MOC" || MOC=":" +- +- for ac_prog in uic-qt3 uic +-do +- # Extract the first word of "$ac_prog", so it can be a program name with args. +-set dummy $ac_prog; ac_word=$2 +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +-$as_echo_n "checking for $ac_word... " >&6; } +-if test "${ac_cv_path_UIC+set}" = set; then : +- $as_echo_n "(cached) " >&6 +-else +- case $UIC in +- [\\/]* | ?:[\\/]*) +- ac_cv_path_UIC="$UIC" # Let the user override the test with a path. +- ;; +- *) +- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +-for as_dir in $QTDIR/bin $PATH +-do +- IFS=$as_save_IFS +- test -z "$as_dir" && as_dir=. +- for ac_exec_ext in '' $ac_executable_extensions; do +- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then +- ac_cv_path_UIC="$as_dir/$ac_word$ac_exec_ext" +- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 +- break 2 +- fi +-done +- done +-IFS=$as_save_IFS +- +- ;; +-esac +-fi +-UIC=$ac_cv_path_UIC +-if test -n "$UIC"; then +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UIC" >&5 +-$as_echo "$UIC" >&6; } +-else +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +-$as_echo "no" >&6; } +-fi +- +- +- test -n "$UIC" && break +-done +-test -n "$UIC" || UIC=":" +- +- for ac_prog in lupdate-qt3 lupdate +-do +- # Extract the first word of "$ac_prog", so it can be a program name with args. +-set dummy $ac_prog; ac_word=$2 +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +-$as_echo_n "checking for $ac_word... " >&6; } +-if test "${ac_cv_path_LUPDATE+set}" = set; then : +- $as_echo_n "(cached) " >&6 +-else +- case $LUPDATE in +- [\\/]* | ?:[\\/]*) +- ac_cv_path_LUPDATE="$LUPDATE" # Let the user override the test with a path. +- ;; +- *) +- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +-for as_dir in $QTDIR/bin $PATH +-do +- IFS=$as_save_IFS +- test -z "$as_dir" && as_dir=. +- for ac_exec_ext in '' $ac_executable_extensions; do +- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then +- ac_cv_path_LUPDATE="$as_dir/$ac_word$ac_exec_ext" +- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 +- break 2 +- fi +-done +- done +-IFS=$as_save_IFS +- +- ;; +-esac +-fi +-LUPDATE=$ac_cv_path_LUPDATE +-if test -n "$LUPDATE"; then +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LUPDATE" >&5 +-$as_echo "$LUPDATE" >&6; } +-else +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +-$as_echo "no" >&6; } +-fi +- +- +- test -n "$LUPDATE" && break +-done +-test -n "$LUPDATE" || LUPDATE=":" +- +- for ac_prog in lrelease-qt3 lrelease +-do +- # Extract the first word of "$ac_prog", so it can be a program name with args. +-set dummy $ac_prog; ac_word=$2 +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +-$as_echo_n "checking for $ac_word... " >&6; } +-if test "${ac_cv_path_LRELEASE+set}" = set; then : +- $as_echo_n "(cached) " >&6 +-else +- case $LRELEASE in +- [\\/]* | ?:[\\/]*) +- ac_cv_path_LRELEASE="$LRELEASE" # Let the user override the test with a path. +- ;; +- *) +- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +-for as_dir in $QTDIR/bin $PATH +-do +- IFS=$as_save_IFS +- test -z "$as_dir" && as_dir=. +- for ac_exec_ext in '' $ac_executable_extensions; do +- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then +- ac_cv_path_LRELEASE="$as_dir/$ac_word$ac_exec_ext" +- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 +- break 2 +- fi +-done +- done +-IFS=$as_save_IFS +- +- ;; +-esac +-fi +-LRELEASE=$ac_cv_path_LRELEASE +-if test -n "$LRELEASE"; then +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LRELEASE" >&5 +-$as_echo "$LRELEASE" >&6; } +-else +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +-$as_echo "no" >&6; } +-fi +- +- +- test -n "$LRELEASE" && break +-done +-test -n "$LRELEASE" || LRELEASE=":" +- +- if test -x "$MOC" ; then : ; else +- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Cannot locate the Qt Meta-Object compiler." >&5 +-$as_echo "$as_me: WARNING: Cannot locate the Qt Meta-Object compiler." >&2;} +- ac_has_qt=no +- QTDIR=no +- fi +- fi +- # Execute +- if test "x$ac_has_qt" != xno ; then +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if a small Qt program runs" >&5 +-$as_echo_n "checking if a small Qt program runs... " >&6; } +- 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 +- +- save_CXXFLAGS="$CXXFLAGS" +- save_LIBS="$LIBS" +- CXXFLAGS="$CXXFLAGS $CFLAGS $THREAD_CFLAGS $QT_CFLAGS $X_CFLAGS" +- LIBS="$THREAD_LIBS $QT_LIBS $X_LIBS $LIBS" +- if test "$cross_compiling" = yes; then : +- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +-as_fn_error "cannot run test program while cross compiling +-See \`config.log' for more details." "$LINENO" 5; } +-else +- cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ +- +-#include +-#include +-#include +-int main() { +-QFile qf("confout"); if (!qf.open(IO_WriteOnly)) return 1; +-QTextStream ts(&qf); ts << QT_VERSION; return 0; +-} +-_ACEOF +-if ac_fn_cxx_try_run "$LINENO"; then : +- okay=yes +-else +- okay=no; QTDIR=no +-fi +-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ +- conftest.$ac_objext conftest.beam conftest.$ac_ext +-fi +- +- CXXFLAGS="$save_CXXFLAGS" +- LIBS="$save_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 +- +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $okay" >&5 +-$as_echo "$okay" >&6; } +- if test "x$okay" = xno ; then +- ac_has_qt=no +- fi +- fi +- # Version +- if test "x$ac_has_qt" != xno ; then +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking Qt version" >&5 +-$as_echo_n "checking Qt version... " >&6; } +- qt_version=`cat < confout` +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $qt_version" >&5 +-$as_echo "$qt_version" >&6; } +- +-cat >>confdefs.h <<_ACEOF +-#define HAVE_QT $qt_version +-_ACEOF +- +- rm confout 2>/dev/null +- fi +- # Execute +- if test "x$ac_has_qt" = xno ; then +- QT_CFLAGS= ; QT_LIBS= ; QTDIR= ; MOC=moc ; +- no_qt=yes +- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Qt3 support is disabled" >&5 +-$as_echo "$as_me: WARNING: Qt3 support is disabled" >&2;} +- else +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: setting QT_CFLAGS=$QT_CFLAGS" >&5 +-$as_echo "setting QT_CFLAGS=$QT_CFLAGS" >&6; } +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: setting QT_LIBS=$QT_LIBS" >&5 +-$as_echo "setting QT_LIBS=$QT_LIBS" >&6; } +- : +- fi +- +- +- # Search X11 and Xt headers +- if test "$no_x" != "yes" ; then +- savedCFLAGS="$CFLAGS" +- CFLAGS="$CFLAGS ${X_CFLAGS}" +- for ac_header in X11/extensions/Xext.h +-do : +- ac_fn_cxx_check_header_compile "$LINENO" "X11/extensions/Xext.h" "ac_cv_header_X11_extensions_Xext_h" "include +-" +-if test "x$ac_cv_header_X11_extensions_Xext_h" = x""yes; then : +- cat >>confdefs.h <<_ACEOF +-#define HAVE_X11_EXTENSIONS_XEXT_H 1 +-_ACEOF +- +-fi +- +-done +- +- ac_fn_cxx_check_header_mongrel "$LINENO" "X11/Shell.h" "ac_cv_header_X11_Shell_h" "$ac_includes_default" +-if test "x$ac_cv_header_X11_Shell_h" = x""yes; then : +- +-else +- no_xt=yes +-fi +- +- +- ac_fn_cxx_check_header_mongrel "$LINENO" "X11/IntrinsicP.h" "ac_cv_header_X11_IntrinsicP_h" "$ac_includes_default" +-if test "x$ac_cv_header_X11_IntrinsicP_h" = x""yes; then : +- +-else +- no_xt=yes +-fi +- +- +- CFLAGS="$savedCFLAGS" +- if test "$no_xt" = "yes" ; then +- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Xt include files not found" >&5 +-$as_echo "$as_me: WARNING: Xt include files not found" >&2;} +- else +- +-$as_echo "#define HAVE_XT 1" >>confdefs.h +- +- fi +- fi +- +- if test x$no_threads = xyes || test x$no_qt = xyes || test x$no_xt = xyes +- then +- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Disabling compilation of djview. +--------------------------------------------------------- +-*** The GUI portion of this package will not be compiled. +-*** This is probably not what you want. Chech the output +-*** of configure for warning messages. Read file INSTALL. +-*** Investigate options --with-qt and --enable-threads. +-*** Make sure the Xt include files are present. +---------------------------------------------------------" >&5 +-$as_echo "$as_me: WARNING: Disabling compilation of djview. +--------------------------------------------------------- +-*** The GUI portion of this package will not be compiled. +-*** This is probably not what you want. Chech the output +-*** of configure for warning messages. Read file INSTALL. +-*** Investigate options --with-qt and --enable-threads. +-*** Make sure the Xt include files are present. +---------------------------------------------------------" >&2;} +- ac_enable_djview=no; +- fi +-fi +-if test x$ac_enable_djview != xno ; then +- GUI_YES='' +- GUI_NO='#' +-else +- GUI_YES='#' +- GUI_NO='' +-fi +- +- +- +- +-# Check compilation of i18n files. +-# Check whether --enable-i18n was given. +-if test "${enable_i18n+set}" = set; then : +- enableval=$enable_i18n; ac_enable_i18n=$enableval +-else +- ac_enable_i18n=all +-fi +- +-if test "$ac_enable_i18n" != xno ; then +- I18N_YES='' +- I18N_NO='#' +- LINGUAS= +- if test "$ac_enable_i18n" = all ; then +- for n in $srcdir/i18n/* ; do +- if test -r $n/Makefile.in ; then +- LINGUAS="$LINGUAS `basename $n`" +- fi +- done +- else +- for n in $ac_enable_i18n ; do +- if test -r $srcdir/i18n/$n/Makefile.in ; then +- LINGUAS="$LINGUAS $n" +- fi +- done +- fi +-else +- I18N_YES='#' +- I18N_NO='' +-fi +- +- +- +- +- +- +-# ---------------------------------------- +-# Desktop files +-# ---------------------------------------- +- +-ac_desktopfiles=yes +-# Check whether --enable-desktopfiles was given. +-if test "${enable_desktopfiles+set}" = set; then : +- enableval=$enable_desktopfiles; ac_desktopfiles=$enableval +-fi +- +- +-# Check for xdg tools +-# Extract the first word of "xdg-mime", so it can be a program name with args. +-set dummy xdg-mime; ac_word=$2 +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +-$as_echo_n "checking for $ac_word... " >&6; } +-if test "${ac_cv_path_XDG_MIME+set}" = set; then : +- $as_echo_n "(cached) " >&6 +-else +- case $XDG_MIME in +- [\\/]* | ?:[\\/]*) +- ac_cv_path_XDG_MIME="$XDG_MIME" # Let the user override the test with a path. +- ;; +- *) +- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +-for as_dir in $PATH +-do +- IFS=$as_save_IFS +- test -z "$as_dir" && as_dir=. +- for ac_exec_ext in '' $ac_executable_extensions; do +- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then +- ac_cv_path_XDG_MIME="$as_dir/$ac_word$ac_exec_ext" +- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 +- break 2 +- fi +-done +- done +-IFS=$as_save_IFS +- +- ;; +-esac +-fi +-XDG_MIME=$ac_cv_path_XDG_MIME +-if test -n "$XDG_MIME"; then +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XDG_MIME" >&5 +-$as_echo "$XDG_MIME" >&6; } +-else +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +-$as_echo "no" >&6; } +-fi +- +- +-# Extract the first word of "xdg-icon-resource", so it can be a program name with args. +-set dummy xdg-icon-resource; ac_word=$2 +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +-$as_echo_n "checking for $ac_word... " >&6; } +-if test "${ac_cv_path_XDG_ICON_RESOURCE+set}" = set; then : +- $as_echo_n "(cached) " >&6 +-else +- case $XDG_ICON_RESOURCE in +- [\\/]* | ?:[\\/]*) +- ac_cv_path_XDG_ICON_RESOURCE="$XDG_ICON_RESOURCE" # Let the user override the test with a path. +- ;; +- *) +- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +-for as_dir in $PATH +-do +- IFS=$as_save_IFS +- test -z "$as_dir" && as_dir=. +- for ac_exec_ext in '' $ac_executable_extensions; do +- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then +- ac_cv_path_XDG_ICON_RESOURCE="$as_dir/$ac_word$ac_exec_ext" +- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 +- break 2 +- fi +-done +- done +-IFS=$as_save_IFS +- +- ;; +-esac +-fi +-XDG_ICON_RESOURCE=$ac_cv_path_XDG_ICON_RESOURCE +-if test -n "$XDG_ICON_RESOURCE"; then +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XDG_ICON_RESOURCE" >&5 +-$as_echo "$XDG_ICON_RESOURCE" >&6; } +-else +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +-$as_echo "no" >&6; } +-fi +- +- +-# Extract the first word of "xdg-desktop-menu", so it can be a program name with args. +-set dummy xdg-desktop-menu; ac_word=$2 +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +-$as_echo_n "checking for $ac_word... " >&6; } +-if test "${ac_cv_path_XDG_DESKTOP_MENU+set}" = set; then : +- $as_echo_n "(cached) " >&6 +-else +- case $XDG_DESKTOP_MENU in +- [\\/]* | ?:[\\/]*) +- ac_cv_path_XDG_DESKTOP_MENU="$XDG_DESKTOP_MENU" # Let the user override the test with a path. +- ;; +- *) +- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +-for as_dir in $PATH +-do +- IFS=$as_save_IFS +- test -z "$as_dir" && as_dir=. +- for ac_exec_ext in '' $ac_executable_extensions; do +- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then +- ac_cv_path_XDG_DESKTOP_MENU="$as_dir/$ac_word$ac_exec_ext" +- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 +- break 2 +- fi +-done +- done +-IFS=$as_save_IFS +- +- ;; +-esac +-fi +-XDG_DESKTOP_MENU=$ac_cv_path_XDG_DESKTOP_MENU +-if test -n "$XDG_DESKTOP_MENU"; then +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XDG_DESKTOP_MENU" >&5 +-$as_echo "$XDG_DESKTOP_MENU" >&6; } +-else +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +-$as_echo "no" >&6; } +-fi ++ ;; ++esac ++fi ++XDG_DESKTOP_MENU=$ac_cv_path_XDG_DESKTOP_MENU ++if test -n "$XDG_DESKTOP_MENU"; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XDG_DESKTOP_MENU" >&5 ++$as_echo "$XDG_DESKTOP_MENU" >&6; } ++else ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 ++$as_echo "no" >&6; } ++fi + + + if test -x ${XDG_MIME} && \ +@@ -18726,248 +17312,6 @@ fi + + + +- +-# ---------------------------------------- +-# Flags for NSDEJAVU.SO +-# ---------------------------------------- +- +-NSDEJAVU_CFLAGS= +-NSDEJAVU_LIBS= +-if test x$ac_enable_djview != xno +-then +- +- +- +- # Extract the first word of "pkg-config", so it can be a program name with args. +-set dummy pkg-config; ac_word=$2 +-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +-$as_echo_n "checking for $ac_word... " >&6; } +-if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : +- $as_echo_n "(cached) " >&6 +-else +- case $PKG_CONFIG in +- [\\/]* | ?:[\\/]*) +- ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. +- ;; +- *) +- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +-for as_dir in $PATH +-do +- IFS=$as_save_IFS +- test -z "$as_dir" && as_dir=. +- for ac_exec_ext in '' $ac_executable_extensions; do +- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then +- ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" +- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 +- break 2 +- fi +-done +- done +-IFS=$as_save_IFS +- +- ;; +-esac +-fi +-PKG_CONFIG=$ac_cv_path_PKG_CONFIG +-if test -n "$PKG_CONFIG"; then +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 +-$as_echo "$PKG_CONFIG" >&6; } +-else +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +-$as_echo "no" >&6; } +-fi +- +- +- if test -z "$PKG_CONFIG" ; then +- : +- else +- : +- fi +- +- +- +- +- +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for glib" >&5 +-$as_echo_n "checking for glib... " >&6; } +- if test -x "$PKG_CONFIG" ; then +- if $PKG_CONFIG glib-2.0 ; then +- ac_glib=yes +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5 +-$as_echo "found" >&6; } +- GLIB_LIBS=`$PKG_CONFIG --libs glib-2.0` +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: setting GLIB_LIBS=$GLIB_LIBS" >&5 +-$as_echo "setting GLIB_LIBS=$GLIB_LIBS" >&6; } +- GLIB_CFLAGS=`$PKG_CONFIG --cflags glib-2.0` +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: setting GLIB_CFLAGS=$GLIB_CFLAGS" >&5 +-$as_echo "setting GLIB_CFLAGS=$GLIB_CFLAGS" >&6; } +- +-$as_echo "#define HAVE_GLIB 1" >>confdefs.h +- +- : +- else +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found by pkg-config" >&5 +-$as_echo "not found by pkg-config" >&6; } +- ac_glib=no +- : +- fi +- else +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no pkg-config" >&5 +-$as_echo "no pkg-config" >&6; } +- ac_glib=no +- : +- fi +- +- NSDEJAVU_CFLAGS=${X_CFLAGS} +- case "$host" in +- *-cygwin* | *-mingw*) +- NSDEJAVU_LIBS="`echo ${X_LIBS} | sed -e 's/-lXext/-lXt -lXext/'`" +- NSDEJAVU_LIBS="-no-undefined $NSDEJAVU_LIBS" +- ;; +- esac +-fi +- +- +- +-# ----------- +-# How to install shared libraries +-if test -z "$INSTALL_SHLIB" ; then +- INSTALL_SHLIB="${INSTALL_DATA}" +- case "$host" in +- *-cygwin* | *-mingw*) +- INSTALL_SHLIB="cp" +- ;; +- esac +-fi +- +- +- +- +-# ---------------------------------------- +-# Compiler version check +-# ---------------------------------------- +- +-# Work around broken compilers with the famous LPR0 bug +-if test x$ac_shared_libdjvu != xno && test x$GXX = xyes; then +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX has the LPR0 bug" >&5 +-$as_echo_n "checking if $CXX has the LPR0 bug... " >&6; } +- echo 'extern "C"{inline int sqr(int x)throw(){return x*x;}}int main(){}' \ +- > conftest.cc +- if ${CXX} -fPIC ${OPTS} conftest.cc -o conftest \ +- > /dev/null 2> /dev/null ; then +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +-$as_echo "no" >&6; } +- else +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +-$as_echo "yes" >&6; } +- OPTS=`echo $OPTS | sed -e 's/-mcpu=i686/-mpentium/'` +- fi +-fi +- +-# What compiler are we using ? +-if test x$GXX != xyes ; then +- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The recommended c++ compiler is g++." >&5 +-$as_echo "$as_me: WARNING: The recommended c++ compiler is g++." >&2;} +- if test $ac_cv_cxx_exceptions = no ; then +- as_fn_error "Exception support in c++ compiler is mandatory." "$LINENO" 5 +- fi +-else +- { $as_echo "$as_me:${as_lineno-$LINENO}: checking g++ version" >&5 +-$as_echo_n "checking g++ version... " >&6; } +- cxxver="`$CXX --version | head -1 | +- sed -e 's/^.*[^0-9.]\([2-4]\.[0-9.]*\).*$/\1/'`" +- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cxxver" >&5 +-$as_echo "$cxxver" >&6; } +- action=none +- case "$cxxver" in +- 1.*) action=error ;; +- 2.[0-8]*) action=error ;; +- 2.90*) action=error ;; +- 2.91.[6-9]*) ;; +- 2.91*) action=warn2 ;; +- 2.96*) action=redhat ;; +- 2.9*) ;; +- 3.0) action=warn3 ;; +- esac +- case $action in +- error) +- as_fn_error "Your c++ compiler ($cxxver) is outdated." "$LINENO" 5 +- ;; +- warn2) +- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Your c++ compiler ($cxxver) has known problems. +-------------------------------------------- +-*** Please upgrade to gcc-2.95.3 or better. +--------------------------------------------" >&5 +-$as_echo "$as_me: WARNING: Your c++ compiler ($cxxver) has known problems. +-------------------------------------------- +-*** Please upgrade to gcc-2.95.3 or better. +--------------------------------------------" >&2;} +- ;; +- warn3) +- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Your c++ compiler ($cxxver) has known problems. +-------------------------------------------- +-*** Please upgrade to gcc-3.0.2 or better. +--------------------------------------------" >&5 +-$as_echo "$as_me: WARNING: Your c++ compiler ($cxxver) has known problems. +-------------------------------------------- +-*** Please upgrade to gcc-3.0.2 or better. +--------------------------------------------" >&2;} +- ;; +- redhat) +- # Check for infamous early 2.96 compiler +- for n in `g++ -v 2>&1 | grep version` ; do rhversion=$n ; done +- case "$rhversion" in +- 2.96-1[0-9][0-9]*) ;; +- 2.96-8[5-9]*) ;; +- 2.96-9*) ;; +- *) +- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Your c++ compiler ($cxxver) has known problems. +-------------------------------------------------------- +-*** You have an early version of the gcc-2.96 compiler. +-*** The good news is that the new version works nicely. +-*** Check . +-*** Please upgrade. +--------------------------------------------------------" >&5 +-$as_echo "$as_me: WARNING: Your c++ compiler ($cxxver) has known problems. +-------------------------------------------------------- +-*** You have an early version of the gcc-2.96 compiler. +-*** The good news is that the new version works nicely. +-*** Check . +-*** Please upgrade. +--------------------------------------------------------" >&2;} +- ;; +- esac +- esac +- # Do we want the pragmas interface/implementation +- case "$cxxver" in +- 2*) cxxpragmas=yes ;; +- 3.0*) cxxpragmas=yes ;; +- *) cxxpragmas=no ;; +- esac +- if test x$cxxpragmas = xyes ; then +- +-$as_echo "#define NEED_GNUG_PRAGMAS 1" >>confdefs.h +- +- fi +-fi +- +- +- +-# ---------------------------------------- +-# Qt version check +-# ---------------------------------------- +- +-# What version of QT are we using +-if test x${qt_version+set} = xset ; then +- if test "$qt_version" -lt 200 ; then +- as_fn_error "We no longer support Qt-1x." "$LINENO" 5 +- elif test "$qt_version" -lt 220 ; then +- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: We suggest using QT-2.2.0 or better." >&5 +-$as_echo "$as_me: WARNING: We suggest using QT-2.2.0 or better." >&2;} +- fi +-fi +- +- + # ---------------------------------------- + # End + # ---------------------------------------- +@@ -19041,24 +17385,6 @@ ac_config_files="$ac_config_files tools/ + + ac_config_files="$ac_config_files xmltools/Makefile" + +-ac_config_files="$ac_config_files gui/Makefile" +- +-ac_config_files="$ac_config_files gui/bin2cpp/Makefile" +- +-ac_config_files="$ac_config_files gui/djview/Makefile" +- +-ac_config_files="$ac_config_files gui/nsdejavu/Makefile" +- +-ac_config_files="$ac_config_files i18n/Makefile" +- +-ac_config_files="$ac_config_files i18n/ja/Makefile" +- +-ac_config_files="$ac_config_files i18n/de/Makefile" +- +-ac_config_files="$ac_config_files i18n/fr/Makefile" +- +-ac_config_files="$ac_config_files i18n/cs/Makefile" +- + ac_config_files="$ac_config_files desktopfiles/Makefile" + + +@@ -19146,6 +17472,7 @@ DEFS=-DHAVE_CONFIG_H + + ac_libobjs= + ac_ltlibobjs= ++U= + for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue + # 1. Remove the extension, and $U if already installed. + ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' +@@ -19307,19 +17634,19 @@ export LANGUAGE + (unset CDPATH) >/dev/null 2>&1 && unset CDPATH + + +-# as_fn_error ERROR [LINENO LOG_FD] +-# --------------------------------- ++# as_fn_error STATUS ERROR [LINENO LOG_FD] ++# ---------------------------------------- + # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are + # provided, also output the error to LOG_FD, referencing LINENO. Then exit the +-# script with status $?, using 1 if that was 0. ++# script with STATUS, using 1 if that was 0. + as_fn_error () + { +- as_status=$?; test $as_status -eq 0 && as_status=1 +- if test "$3"; then +- as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack +- $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 ++ as_status=$1; test $as_status -eq 0 && as_status=1 ++ if test "$4"; then ++ as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack ++ $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + fi +- $as_echo "$as_me: error: $1" >&2 ++ $as_echo "$as_me: error: $2" >&2 + as_fn_exit $as_status + } # as_fn_error + +@@ -19515,7 +17842,7 @@ $as_echo X"$as_dir" | + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" +- } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" ++ } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" + + + } # as_fn_mkdir_p +@@ -19569,7 +17896,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_wri + # values after options handling. + ac_log=" + This file was extended by djvulibre $as_me 3.5.24, which was +-generated by GNU Autoconf 2.65. Invocation command line was ++generated by GNU Autoconf 2.67. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES + CONFIG_HEADERS = $CONFIG_HEADERS +@@ -19635,10 +17962,10 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_writ + ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" + ac_cs_version="\\ + djvulibre config.status 3.5.24 +-configured by $0, generated by GNU Autoconf 2.65, ++configured by $0, generated by GNU Autoconf 2.67, + with options \\"\$ac_cs_config\\" + +-Copyright (C) 2009 Free Software Foundation, Inc. ++Copyright (C) 2010 Free Software Foundation, Inc. + This config.status script is free software; the Free Software Foundation + gives unlimited permission to copy, distribute and modify it." + +@@ -19654,11 +17981,16 @@ ac_need_defaults=: + while test $# != 0 + do + case $1 in +- --*=*) ++ --*=?*) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` + ac_shift=: + ;; ++ --*=) ++ ac_option=`expr "X$1" : 'X\([^=]*\)='` ++ ac_optarg= ++ ac_shift=: ++ ;; + *) + ac_option=$1 + ac_optarg=$2 +@@ -19680,6 +18012,7 @@ do + $ac_shift + case $ac_optarg in + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; ++ '') as_fn_error $? "missing file argument" ;; + esac + as_fn_append CONFIG_FILES " '$ac_optarg'" + ac_need_defaults=false;; +@@ -19692,7 +18025,7 @@ do + ac_need_defaults=false;; + --he | --h) + # Conflict between --help and --header +- as_fn_error "ambiguous option: \`$1' ++ as_fn_error $? "ambiguous option: \`$1' + Try \`$0 --help' for more information.";; + --help | --hel | -h ) + $as_echo "$ac_cs_usage"; exit ;; +@@ -19701,7 +18034,7 @@ Try \`$0 --help' for more information."; + ac_cs_silent=: ;; + + # This is an error. +- -*) as_fn_error "unrecognized option: \`$1' ++ -*) as_fn_error $? "unrecognized option: \`$1' + Try \`$0 --help' for more information." ;; + + *) as_fn_append ac_config_targets " $1" +@@ -20113,18 +18446,9 @@ do + "tools/Makefile") CONFIG_FILES="$CONFIG_FILES tools/Makefile" ;; + "tools/jb2cmp/Makefile") CONFIG_FILES="$CONFIG_FILES tools/jb2cmp/Makefile" ;; + "xmltools/Makefile") CONFIG_FILES="$CONFIG_FILES xmltools/Makefile" ;; +- "gui/Makefile") CONFIG_FILES="$CONFIG_FILES gui/Makefile" ;; +- "gui/bin2cpp/Makefile") CONFIG_FILES="$CONFIG_FILES gui/bin2cpp/Makefile" ;; +- "gui/djview/Makefile") CONFIG_FILES="$CONFIG_FILES gui/djview/Makefile" ;; +- "gui/nsdejavu/Makefile") CONFIG_FILES="$CONFIG_FILES gui/nsdejavu/Makefile" ;; +- "i18n/Makefile") CONFIG_FILES="$CONFIG_FILES i18n/Makefile" ;; +- "i18n/ja/Makefile") CONFIG_FILES="$CONFIG_FILES i18n/ja/Makefile" ;; +- "i18n/de/Makefile") CONFIG_FILES="$CONFIG_FILES i18n/de/Makefile" ;; +- "i18n/fr/Makefile") CONFIG_FILES="$CONFIG_FILES i18n/fr/Makefile" ;; +- "i18n/cs/Makefile") CONFIG_FILES="$CONFIG_FILES i18n/cs/Makefile" ;; + "desktopfiles/Makefile") CONFIG_FILES="$CONFIG_FILES desktopfiles/Makefile" ;; + +- *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;; ++ *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;; + esac + done + +@@ -20162,7 +18486,7 @@ $debug || + { + tmp=./conf$$-$RANDOM + (umask 077 && mkdir "$tmp") +-} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5 ++} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 + + # Set up the scripts for CONFIG_FILES section. + # No need to generate them if there are no CONFIG_FILES. +@@ -20179,7 +18503,7 @@ if test "x$ac_cr" = x; then + fi + ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` + if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then +- ac_cs_awk_cr='\r' ++ ac_cs_awk_cr='\\r' + else + ac_cs_awk_cr=$ac_cr + fi +@@ -20193,18 +18517,18 @@ _ACEOF + echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && + echo "_ACEOF" + } >conf$$subs.sh || +- as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 +-ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` ++ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ++ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` + ac_delim='%!_!# ' + for ac_last_try in false false false false false :; do + . ./conf$$subs.sh || +- as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 ++ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 + + ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` + if test $ac_delim_n = $ac_delim_num; then + break + elif $ac_last_try; then +- as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 ++ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +@@ -20293,20 +18617,28 @@ if sed "s/$ac_cr//" < /dev/null > /dev/n + else + cat + fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ +- || as_fn_error "could not setup config files machinery" "$LINENO" 5 ++ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 + _ACEOF + +-# VPATH may cause trouble with some makes, so we remove $(srcdir), +-# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and ++# VPATH may cause trouble with some makes, so we remove sole $(srcdir), ++# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and + # trailing colons and then remove the whole line if VPATH becomes empty + # (actually we leave an empty line to preserve line numbers). + if test "x$srcdir" = x.; then +- ac_vpsub='/^[ ]*VPATH[ ]*=/{ +-s/:*\$(srcdir):*/:/ +-s/:*\${srcdir}:*/:/ +-s/:*@srcdir@:*/:/ +-s/^\([^=]*=[ ]*\):*/\1/ ++ ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ ++h ++s/// ++s/^/:/ ++s/[ ]*$/:/ ++s/:\$(srcdir):/:/g ++s/:\${srcdir}:/:/g ++s/:@srcdir@:/:/g ++s/^:*// + s/:*$// ++x ++s/\(=[ ]*\).*/\1/ ++G ++s/\n// + s/^[^=]*=[ ]*$// + }' + fi +@@ -20334,7 +18666,7 @@ for ac_last_try in false false :; do + if test -z "$ac_t"; then + break + elif $ac_last_try; then +- as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5 ++ as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +@@ -20419,7 +18751,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_writ + _ACAWK + _ACEOF + cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +- as_fn_error "could not setup config headers machinery" "$LINENO" 5 ++ as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 + fi # test -n "$CONFIG_HEADERS" + + +@@ -20432,7 +18764,7 @@ do + esac + case $ac_mode$ac_tag in + :[FHL]*:*);; +- :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;; ++ :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;; + :[FH]-) ac_tag=-:-;; + :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; + esac +@@ -20460,7 +18792,7 @@ do + [\\/$]*) false;; + *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; + esac || +- as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;; ++ as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;; + esac + case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac + as_fn_append ac_file_inputs " '$ac_f'" +@@ -20487,7 +18819,7 @@ $as_echo "$as_me: creating $ac_file" >&6 + + case $ac_tag in + *:-:* | *:-) cat >"$tmp/stdin" \ +- || as_fn_error "could not create $ac_file" "$LINENO" 5 ;; ++ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; + esac + ;; + esac +@@ -20618,22 +18950,22 @@ s&@INSTALL@&$ac_INSTALL&;t t + $ac_datarootdir_hack + " + eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ +- || as_fn_error "could not create $ac_file" "$LINENO" 5 ++ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + + test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && + { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' +-which seems to be undefined. Please make sure it is defined." >&5 ++which seems to be undefined. Please make sure it is defined" >&5 + $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +-which seems to be undefined. Please make sure it is defined." >&2;} ++which seems to be undefined. Please make sure it is defined" >&2;} + + rm -f "$tmp/stdin" + case $ac_file in + -) cat "$tmp/out" && rm -f "$tmp/out";; + *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; + esac \ +- || as_fn_error "could not create $ac_file" "$LINENO" 5 ++ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + ;; + :H) + # +@@ -20644,19 +18976,19 @@ which seems to be undefined. Please mak + $as_echo "/* $configure_input */" \ + && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" + } >"$tmp/config.h" \ +- || as_fn_error "could not create $ac_file" "$LINENO" 5 ++ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then + { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 + $as_echo "$as_me: $ac_file is unchanged" >&6;} + else + rm -f "$ac_file" + mv "$tmp/config.h" "$ac_file" \ +- || as_fn_error "could not create $ac_file" "$LINENO" 5 ++ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + fi + else + $as_echo "/* $configure_input */" \ + && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ +- || as_fn_error "could not create -" "$LINENO" 5 ++ || as_fn_error $? "could not create -" "$LINENO" 5 + fi + ;; + +@@ -21479,7 +19811,7 @@ _ACEOF + ac_clean_files=$ac_clean_files_save + + test $ac_write_fail = 0 || +- as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5 ++ as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 + + + # configure is writing to config.log, and then calls config.status. +@@ -21500,7 +19832,7 @@ if test "$no_create" != yes; then + exec 5>>config.log + # Use ||, not &&, to avoid exiting from the if with $? = 1, which + # would make configure fail if this is the last instruction. +- $ac_cs_success || as_fn_exit $? ++ $ac_cs_success || as_fn_exit 1 + fi + if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 +--- djvulibre-3.5.24.orig/win32/djvulibre/tools.props ++++ djvulibre-3.5.24/win32/djvulibre/tools.props +@@ -8,5 +8,10 @@ + $(DjVuLibreRoot);$(DjVuLibreRoot)\libdjvu;$(TiffRoot);$(TiffDir);%(AdditionalIncludeDirectories) + HAVE_NAMESPACES;HAVE_TIFF;%(PreprocessorDefinitions) + ++ ++ ++ ++ setargv.obj;%(AdditionalDependencies) ++ + + +\ No newline at end of file +--- djvulibre-3.5.24.orig/win32/djvulibre/djvulibre.nsi ++++ djvulibre-3.5.24/win32/djvulibre/djvulibre.nsi +@@ -2,7 +2,7 @@ + + ; HM NIS Edit Wizard helper defines + !define PRODUCT_NAME "DjVuLibre+DjView" +-!define PRODUCT_VERSION "3.5.23d+4.6c" ++!define PRODUCT_VERSION "3.5.24+4.7b" + !define PRODUCT_PUBLISHER "DjVuZone" + !define PRODUCT_WEB_SITE "http://djvu.sourceforge.net" + !define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\djview.exe" +--- djvulibre-3.5.24.orig/config/acinclude.m4 ++++ djvulibre-3.5.24/config/acinclude.m4 +@@ -404,7 +404,7 @@ case "${host_cpu}-${host_os}" in + ;; + esac + case "${host_os}-${GCC}" in +- *linux*-yes) ++ *linux*-yes | *kfreebsd*-yes ) + # On Linux/GCC, libtool uses -nostdlib for linking, which cancel part + # of the -pthread flag effect (libpthread is not automatically linked). + # So we'll try to link with both -pthread and -lpthread first: +@@ -512,73 +512,9 @@ fi + + + dnl ------------------------------------------------------------------ +-dnl @synopsis AC_PATH_COTHREADS([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) +-dnl Define HAVE_COTHREAD if cothreads can be used. +-dnl Define HAVE_COTHREAD_PATCH if cothread libgcc patch is available +-dnl ------------------------------------------------------------------ +- +-AC_DEFUN([AC_PATH_COTHREAD], [ +-AC_REQUIRE([AC_CANONICAL_HOST]) +-acx_cothread=no +-if test x$GXX = xyes ; then +- AC_MSG_CHECKING([whether cothreads work with ${host_cpu}]) +- case ${host_cpu} in +- i?86|powerpc*|mips*|alpha*|hppa*) +- acx_cothread=yes +- ;; +- esac +- AC_MSG_RESULT($acx_cothread) +-fi +-if test x$acx_cothread != xno ; then +- AC_MSG_CHECKING([whether libgcc contains the cothread patch]) +- AC_LANG_PUSH(C++) +- AC_TRY_LINK([extern "C" { void *(*__get_eh_context_ptr)(); +- void *__new_eh_context(void); }], +- [ __get_eh_context_ptr = &__new_eh_context;], +- [acx_cothread_patch=yes], [acx_cothread_patch=no]) +- AC_LANG_POP(C++) +- AC_MSG_RESULT($acx_cothread_patch) +- if test x$acx_cothread_patch = xno ; then +- AC_MSG_CHECKING([if the cothread patch is critical]) +- echo 'void foo() { throw "Hello"; }' > conftest.cc +- compile="$CXX $CXXFLAGS -c conftest.cc" +- check="nm conftest.o | grep sjthrow | cat > conftest.out" +- acx_cothread_patch=yes +- if AC_TRY_EVAL(compile) && AC_TRY_EVAL(check) ; then +- if test -z "`cat conftest.out`" ; then +- acx_cothread_patch=no +- fi +- fi +- AC_MSG_RESULT($acx_cothread_patch) +- rm conftest.* +- if test x$acx_cothread_patch = xyes ; then +- acx_cothread=no +- AC_MSG_WARN([Cothread cannot work without the patch]) +- else +- AC_MSG_WARN([Applying the patch is recommended anyway]) +- fi +- AC_MSG_WARN([See the INSTALL file for more information]) +- fi +-fi +-# Must do. +-if test x$acx_cothread = xyes ; then +- AC_DEFINE(HAVE_COTHREAD,1, +- [Define if cothreads are available.]) +- if test x$acx_cothread_patch = xyes ; then +- AC_DEFINE(HAVE_COTHREAD_PATCH,1, +- [Define if libgcc contains the cothread patch.]) +- fi +- ifelse([$1],,:,[$1]) +-else +- ifelse([$2],,:,[$2]) +-fi +-]) +- +-dnl ------------------------------------------------------------------ + dnl @synopsis AC_PATH_THREADS([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) + dnl Process optional option --enable-threads +-dnl Check availability of pthreads or cothreads +-dnl using AC_PATH_PTHREAD and AC_PATH_COTHREAD. ++dnl Check availability of pthreads or cothreads using AC_PATH_PTHREAD + dnl Set output variable THREADS_LIBS and THREADS_CFLAGS + dnl ------------------------------------------------------------------ + +@@ -614,16 +550,6 @@ if test x$ac_use_threads != xno ; then + ;; + esac + fi +- if test x$ac_threads = xno ; then +- case x$ac_use_threads in +- x|xyes|xauto|xcothread) +- AC_PATH_COTHREAD( +- [ ac_threads=cothread +- THREAD_CFLAGS="-DTHREADMODEL=COTHREADS" +- ] ) +- ;; +- esac +- fi + fi + AC_SUBST(THREAD_LIBS) + AC_SUBST(THREAD_CFLAGS) +@@ -705,213 +631,6 @@ jpeg_CreateDecompress(0,0,0);], + ]) + + dnl ------------------------------------------------------------------ +-dnl @synopsis AC_PATH_QT([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) +-dnl Process option --with-qt=DIR +-dnl Define HAVE_QT and set it to QT_VERSION +-dnl Set output variables MOC, UIC, QT_LIBS and QT_CFLAGS. +-dnl ------------------------------------------------------------------ +- +-AC_DEFUN([AC_PATH_QT], +-[ +- AC_REQUIRE([AC_PATH_X]) +- AC_REQUIRE([AC_PATH_XTRA]) +- if test ${no_x-no} != yes ; then +- X_LIBS="$X_LIBS $X_PRE_LIBS -lXext -lX11 $X_EXTRA_LIBS" +- fi +- # Variables +- AC_ARG_VAR(QTDIR,[Location of the Qt3 package.]) +- AC_ARG_VAR(QT_CFLAGS,[Flags for compiling Qt3 programs.]) +- AC_ARG_VAR(QT_LIBS,[Flags for linking Qt3 programs.]) +- AC_ARG_VAR(MOC,[Location of the MOC program.]) +- AC_ARG_VAR(UIC,[Location of the UIC program.]) +- # Arguments +- AC_ARG_WITH(qt, +- AC_HELP_STRING([--with-qt=DIR], +- [where the Qt3 root is installed.]), +- [ test x$withval != xyes && QTDIR=$withval ]) +- test x$no_x = xyes && QTDIR=no +- # Check for the lib64 thing +- lib=`basename "$libdir"` +- case "$lib" in lib*) ;; *) lib="lib" ;; esac +- if test $lib = "lib" -o $lib = "lib64" ; then +- libs="$lib" ; else libs="$lib lib"; fi +- # Standard qt directory +- ac_has_qt=no +- if test x$QTDIR != xno ; then +- AC_MSG_CHECKING([for Qt root directory]) +- ac_has_qt=no +- ac_userdef_qt=no +- if test x${QT_CFLAGS+set} = xset || test x${QT_LIBS+set} = xset ; then +- ac_userdef_qt=yes +- ac_has_qt="user defined QT_CFLAGS and QT_LIBS" # no questions asked +- else +- ac_qt_dirs="/usr/local /usr/X11R6 /usr" +- for lib in $libs ; do +- for n in /usr/$lib/qt* ; do +- test -d $n && ac_qt_dirs="$n $ac_qt_dirs" ; +- done +- done +- if test -d "$QTDIR" ; then +- ac_qt_dirs="$QTDIR $ac_qt_dirs" +- fi +- for dir in $ac_qt_dirs ; do +- if test -r $dir/include/qwidget.h ; then +- ac_has_qt=$dir +- QTDIR=$dir +- break +- fi +- done +- fi +- # Unusual install +- if test "x$ac_has_qt" = xno ; then +- ac_qt_names="qt3 qt2 qt" +- ac_qt_dirs="/usr /usr/X11R6 /usr/local" +- case "$host" in +- *-darwin* | *-macos10*) +- if test -d /opt/local ; then +- ac_qt_dirs="/opt/local $ac_qt_dirs" +- elif test -d /sw ; then +- ac_qt_dirs="/sw $ac_qt_dirs" +- fi +- ;; +- esac +- ac_qt_dirs="$QTDIR $prefix $ac_qt_dirs" +- for d in $ac_qt_dirs ; do +- for n in $ac_qt_names ; do +- if test -r $d/include/$n/qwidget.h ; then +- for lib in $libs ; do +- for l in lib$n.so lib$n-mt.so lib$n-mt.dylib lib$n.a lib$n-mt.a ; do +- if test -r $d/$lib/$l ; then +- QT_CFLAGS="-I$d/include/$n" +- QT_LIBS="-L$d/$lib -l$n" +- QTDIR=$d +- ac_has_qt="bsd-style Qt install" +- break 3 +- fi +- done +- for l in libqt.dll.a libqt-mt.dll.a libqt-mt.la libqt.a libqt-mt.a; do +- if test -r $d/$lib/$n/$lib/$l ; then +- QT_CFLAGS="-I$d/include/$n" +- QT_LIBS="-L$d/$lib/$n/$lib -lqt" +- QTDIR=$d/$lib/$n +- ac_has_qt="cygwin-style Qt install" +- break 3 +- fi +- done +- for l in libqt.so libqt-mt.so libqt-mt.dylib libqt.a libqt-mt.a; do +- if test -r $d/$lib/$l ; then +- QT_CFLAGS="-I$d/include/$n" +- QT_LIBS="-L$d/$lib -lqt" +- QTDIR=$d +- ac_has_qt="debian-style Qt install" +- break 3 +- fi +- done +- done +- fi +- done +- done +- fi +- # Print result +- AC_MSG_RESULT($ac_has_qt) +- fi +- # Programs +- if test "x$ac_has_qt" != xno ; then +- if test "x$ac_userdef_qt" != xyes ; then +- if test x${QT_CFLAGS+set} != xset ; then +- QT_CFLAGS="-I$QTDIR/include" +- fi +- if test x${QT_LIBS+set} != xset ; then +- if test -d $QTDIR/$lib ; then +- QT_LIBS="-L$QTDIR/$lib -lqt" +- else +- QT_LIBS="-L$QTDIR/lib -lqt" +- fi +- fi +- # KDE-3.0 styles require qt-mt even in non KDE applications. +- # Bero dixit. See kde bug #40823. +- qt_libdir= +- qt_libname= +- AC_MSG_CHECKING([for multithreaded Qt3 library]) +- for n in `echo $QT_LIBS` ; do case $n in +- -L*) qt_libdir=`echo "$n" | sed -e 's:^-L::'` ;; +- -l*) qt_libname=`echo "$n" | sed -e 's:^-l::'` ;; +- esac +- done +- ac_has_qt_mt=no +- for n in ${qt_libdir}/lib${qt_libname}-mt.so \ +- ${qt_libdir}/lib${qt_libname}-mt.dylib \ +- ${qt_libdir}/lib${qt_libname}-mt.dll.a; do +- if test -r $n ; then +- ac_has_qt_mt=yes +- fi +- done +- AC_MSG_RESULT($ac_has_qt_mt) +- if test $ac_has_qt_mt = yes ; then +- newqtlibs= +- for n in `echo $QT_LIBS` ; do +- test "$n" = "-l$qt_libname" && n="$n-mt" +- newqtlibs="$newqtlibs $n" +- done +- QT_LIBS="$newqtlibs" +- fi +- fi +- AC_PATH_PROGS(MOC, [moc-qt3 moc], [:], [$QTDIR/bin $PATH]) +- AC_PATH_PROGS(UIC, [uic-qt3 uic], [:], [$QTDIR/bin $PATH]) +- AC_PATH_PROGS(LUPDATE, [lupdate-qt3 lupdate], [:], [$QTDIR/bin $PATH]) +- AC_PATH_PROGS(LRELEASE, [lrelease-qt3 lrelease], [:], [$QTDIR/bin $PATH]) +- if test -x "$MOC" ; then : ; else +- AC_MSG_WARN([Cannot locate the Qt Meta-Object compiler.]) +- ac_has_qt=no +- QTDIR=no +- fi +- fi +- # Execute +- if test "x$ac_has_qt" != xno ; then +- AC_MSG_CHECKING([if a small Qt program runs]) +- AC_LANG_PUSH(C++) +- save_CXXFLAGS="$CXXFLAGS" +- save_LIBS="$LIBS" +- CXXFLAGS="$CXXFLAGS $CFLAGS $THREAD_CFLAGS $QT_CFLAGS $X_CFLAGS" +- LIBS="$THREAD_LIBS $QT_LIBS $X_LIBS $LIBS" +- AC_TRY_RUN([ +-#include +-#include +-#include +-int main() { +-QFile qf("confout"); if (!qf.open(IO_WriteOnly)) return 1; +-QTextStream ts(&qf); ts << QT_VERSION; return 0; +-}],[okay=yes],[okay=no; QTDIR=no]) +- CXXFLAGS="$save_CXXFLAGS" +- LIBS="$save_LIBS" +- AC_LANG_POP(C++) +- AC_MSG_RESULT($okay) +- if test "x$okay" = xno ; then +- ac_has_qt=no +- fi +- fi +- # Version +- if test "x$ac_has_qt" != xno ; then +- AC_MSG_CHECKING([Qt version]) +- qt_version=`cat < confout` +- AC_MSG_RESULT($qt_version) +- AC_DEFINE_UNQUOTED(HAVE_QT,$qt_version, +- [Define to Qt version if available]) +- rm confout 2>/dev/null +- fi +- # Execute +- if test "x$ac_has_qt" = xno ; then +- QT_CFLAGS= ; QT_LIBS= ; QTDIR= ; MOC=moc ; +- ifelse([$2],,:,[$2]) +- else +- AC_MSG_RESULT([setting QT_CFLAGS=$QT_CFLAGS]) +- AC_MSG_RESULT([setting QT_LIBS=$QT_LIBS]) +- ifelse([$1],,:,[$1]) +- fi +-]) +- +- +-dnl ------------------------------------------------------------------ + dnl @synopsis AC_PATH_TIFF([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) + dnl Process option --with-tiff + dnl Search LIBTIFF. Define HAVE_TIFF. +@@ -991,39 +710,6 @@ AC_DEFUN([AC_PROG_PKG_CONFIG], + ]) + + +-dnl ------------------------------------------------------------------ +-dnl @synopsis AC_PATH_GLIB([action-if-found],[action-if-notfound]) +-dnl Search for glib. Defines HAVE_GLIB. +-dnl Sets output variables GLIB_CFLAGS and GLIB_LIBS +-dnl ------------------------------------------------------------------ +- +-AC_DEFUN([AC_PATH_GLIB], +-[ +- AC_REQUIRE([AC_PROG_PKG_CONFIG]) +- AC_ARG_VAR(GLIB_LIBS, [Libraries for glib-2.0]) +- AC_ARG_VAR(GLIB_CFLAGS, [Compilation flags for glib-2.0]) +- AC_MSG_CHECKING([for glib]) +- if test -x "$PKG_CONFIG" ; then +- if $PKG_CONFIG glib-2.0 ; then +- ac_glib=yes +- AC_MSG_RESULT([found]) +- GLIB_LIBS=`$PKG_CONFIG --libs glib-2.0` +- AC_MSG_RESULT([setting GLIB_LIBS=$GLIB_LIBS]) +- GLIB_CFLAGS=`$PKG_CONFIG --cflags glib-2.0` +- AC_MSG_RESULT([setting GLIB_CFLAGS=$GLIB_CFLAGS]) +- AC_DEFINE(HAVE_GLIB,1,[Define if you have glib-2.0.]) +- ifelse([$1],,:,[$1]) +- else +- AC_MSG_RESULT([not found by pkg-config]) +- ac_glib=no +- ifelse([$2],,:,[$2]) +- fi +- else +- AC_MSG_RESULT([no pkg-config]) +- ac_glib=no +- ifelse([$2],,:,[$2]) +- fi +-]) + + + +--- djvulibre-3.5.24.orig/tools/csepdjvu.cpp ++++ djvulibre-3.5.24/tools/csepdjvu.cpp +@@ -162,6 +162,7 @@ + #include "jb2tune.h" + + #include ++#include + #include + + #undef MIN +@@ -1287,7 +1288,7 @@ Comments::textmark(GP mark) + int shx = (mark->x - lastx) * 100 / fontsize; + int shy = (mark->y - lasty) * 100 / fontsize; + int inter = dirx * shx + diry * shy; +- if ( (dirx == lastdirx) && (diry == lastdiry) && ++ if ( (dirx || diry) && (dirx == lastdirx) && (diry == lastdiry) && + (inter > -150) && (inter < 300) && + abs(diry * shx + dirx * shy) < 80 ) + mark->inter = inter; +--- djvulibre-3.5.24.orig/tools/ddjvu.1 ++++ djvulibre-3.5.24/tools/ddjvu.1 +@@ -66,7 +66,7 @@ and + .BR "ppm" + respectively produce a Portable Bitmap (PBM), + Portable Graymap (PGM), +-or Portable Pixmap (PGM) file. ++or Portable Pixmap (PPM) file. + Format + .B "pnm" + produces a PBM, PGM, or PPM +@@ -178,6 +178,13 @@ select specific layers of a DjVu image. + These modes can fail if the DjVu image does + not contain the selected layer. + .RE ++.TP ++.BI "-skip" ++Instead of aborting when encountering a corrupted page, ++this option causes ++.BR ddjvu ++to simply skip the corrupted page and continue with the next. ++This is useful for processing certain damaged files. + + .SH RESOLUTION OPTIONS + The following options control the resolution of the output image. +--- djvulibre-3.5.24.orig/tools/djvuextract.cpp ++++ djvulibre-3.5.24/tools/djvuextract.cpp +@@ -105,6 +105,7 @@ + #include "GOS.h" + #include "DjVuMessage.h" + #include ++#include + #include + + +--- djvulibre-3.5.24.orig/tools/djvutxt.cpp ++++ djvulibre-3.5.24/tools/djvutxt.cpp +@@ -61,6 +61,7 @@ + # include "config.h" + #endif + ++#include + #include + #include + #include +--- djvulibre-3.5.24.orig/tools/ddjvu.cpp ++++ djvulibre-3.5.24/tools/ddjvu.cpp +@@ -62,6 +62,7 @@ + # include "config.h" + #endif + ++#include + #include + #include + #include +@@ -131,6 +132,7 @@ ddjvu_rect_t info_size; + ddjvu_rect_t info_segment; + const char *inputfilename = 0; + const char *outputfilename = 0; ++int flag_skip_corrupted = 0; + + #if HAVE_TIFF2PDF + char *tempfilename = 0; +@@ -163,7 +165,6 @@ handle(int wait) + if (msg->m_error.filename) + fprintf(stderr,"ddjvu: '%s:%d'\n", + msg->m_error.filename, msg->m_error.lineno); +- exit(10); + default: + break; + } +@@ -553,8 +554,16 @@ dopage(int pageno) + while (! ddjvu_page_decoding_done(page)) + handle(TRUE); + if (ddjvu_page_decoding_error(page)) +- die(i18n("Cannot decode page %d."), pageno); +- ++ { ++ handle(FALSE); ++ fprintf(stderr,"ddjvu: "); ++ fprintf(stderr,i18n("Cannot decode page %d."), pageno); ++ fprintf(stderr,"\n"); ++ if (flag_skip_corrupted) ++ return; ++ else ++ exit(10); ++ } + timingdata[1] = ticks(); + /* Open files */ + if (flag_format == 't') +@@ -752,19 +761,20 @@ usage() + i18n("DjVu decompression utility\n\n" + "Usage: ddjvu [options] [ []]\n\n" + "Options:\n" +- " -verbose Prints various informational messages.\n" +- " -format=FMT Selects output format: pbm,pgm,ppm,pnm,rle,tiff.\n" +- " -scale=N Selects display scale.\n" +- " -size=WxH Selects size of rendered image.\n" +- " -subsample=N Selects direct subsampling factor.\n" +- " -aspect=no Authorizes aspect ratio changes\n" +- " -segment=WxH+X+Y Selects which segment of the rendered image\n" +- " -mode=black Renders a meaningful bitonal image.\n" +- " -mode=mask Only renders the mask layer.\n" +- " -mode=foreground Only renders the foreground layer.\n" +- " -mode=background Only renders the background layer.\n" +- " -page=PAGESPEC Selects page(s) to be decoded.\n" +- " -quality=QUALITY Specifies jpeg quality for lossy tiff output.\n" ++ " -verbose Print various informational messages.\n" ++ " -format=FMT Select output format: pbm,pgm,ppm,pnm,rle,tiff.\n" ++ " -scale=N Select display scale.\n" ++ " -size=WxH Select size of rendered image.\n" ++ " -subsample=N Select direct subsampling factor.\n" ++ " -aspect=no Authorize aspect ratio changes\n" ++ " -segment=WxH+X+Y Select which segment of the rendered image\n" ++ " -mode=black Render a meaningful bitonal image.\n" ++ " -mode=mask Only render the mask layer.\n" ++ " -mode=foreground Only render the foreground layer.\n" ++ " -mode=background Only render the background layer.\n" ++ " -page=PAGESPEC Select page(s) to be decoded.\n" ++ " -skip Skip corrupted pages instead of aborting.\n" ++ " -quality=QUALITY Specify jpeg quality for lossy tiff output.\n" + "\n" + "If is a single dash or omitted, the decompressed image\n" + "is sent to the standard output. If is a single dash or\n" +@@ -836,7 +846,6 @@ parse_option(int argc, char **argv, int + arg = opt; + opt = "subsample"; + } +- + /* Parse options */ + if (!strcmp(opt,"v") || + !strcmp(opt,"verbose")) +@@ -845,6 +854,12 @@ parse_option(int argc, char **argv, int + die(i18n(errarg), opt); + flag_verbose = 1; + } ++ else if (!strcmp(opt,"skip")) ++ { ++ if (arg) ++ die(i18n(errarg), opt); ++ flag_skip_corrupted = 1; ++ } + else if (!strcmp(opt,"scale")) + { + if (!arg) +@@ -1011,6 +1026,8 @@ main(int argc, char **argv) + die(i18n("Cannot open djvu document '%s'."), inputfilename); + while (! ddjvu_document_decoding_done(doc)) + handle(TRUE); ++ if (ddjvu_document_decoding_error(doc)) ++ die(i18n("Cannot decode document.")); + + /* Process all pages */ + i = ddjvu_document_get_pagenum(doc); +--- djvulibre-3.5.24.orig/tools/djvudump.cpp ++++ djvulibre-3.5.24/tools/djvudump.cpp +@@ -119,8 +119,12 @@ xxx + #include + #include + #include ++#include + #include + ++const char *outputfile = 0; ++FILE *outputf = stdout; ++ + void + display(const GURL &url) + { +@@ -133,7 +137,7 @@ display(const GURL &url) + obs->seek(0); + obs->readall(buf, size); + GNativeString ns = str; +- fputs((const char*)ns, stdout); ++ fputs((const char*)ns, outputf); + } + + +@@ -145,7 +149,7 @@ usage() + "DJVUDUMP --- DjVuLibre-" DJVULIBRE_VERSION "\n" + #endif + "Describes DjVu and IFF85 files\n\n" +- "Usage: djvudump \n" ); ++ "Usage: djvudump [-o outputfile] \n" ); + exit(1); + } + +@@ -155,24 +159,37 @@ main(int argc, char **argv) + setlocale(LC_ALL,""); + setlocale(LC_NUMERIC,"C"); + djvu_programname(argv[0]); +- GArray dargv(0,argc-1); ++ // get output file name ++ if (argc>2 && !strcmp(argv[1],"-o")) ++ { ++ outputfile = argv[2]; ++ argv += 2; ++ argc -= 2; ++ } ++ // convert iff file name ++ GArray dargv(0, argc-1); + for(int i=0;i + #include + #include ++#include + #include + + // command line data +--- djvulibre-3.5.24.orig/tools/tiff2pdf.c ++++ djvulibre-3.5.24/tools/tiff2pdf.c +@@ -721,7 +721,6 @@ tiff2pdf(TIFF *input, FILE *outputfile, + const char *outfilename = ""; + T2P *t2p = NULL; + TIFF *output = NULL; +- tsize_t written=0; + int c; + + /* T2P */ +@@ -874,7 +873,7 @@ tiff2pdf(TIFF *input, FILE *outputfile, + TIFFSeekFile(output, (toff_t) 0, SEEK_SET); + + /* Write */ +- written = t2p_write_pdf(t2p, input, output); ++ t2p_write_pdf(t2p, input, output); + if(t2p->t2p_error != 0){ + TIFFError(TIFF2PDF_MODULE, "An error occurred creating output PDF file"); + goto fail; +@@ -2633,7 +2632,6 @@ static tsize_t t2p_readwrite_pdf_image_t + tsize_t read=0; + uint16 i=0; + ttile_t tilecount=0; +- tsize_t tilesize=0; + ttile_t septilecount=0; + tsize_t septilesize=0; + #ifdef JPEG_SUPPORT +@@ -2819,7 +2817,6 @@ static tsize_t t2p_readwrite_pdf_image_t + if(t2p->pdf_sample == T2P_SAMPLE_PLANAR_SEPARATE_TO_CONTIG){ + septilesize=TIFFTileSize(input); + septilecount=TIFFNumberOfTiles(input); +- tilesize=septilesize*t2p->tiff_samplesperpixel; + tilecount=septilecount/t2p->tiff_samplesperpixel; + buffer = (unsigned char*) _TIFFmalloc(t2p->tiff_datasize); + if(buffer==NULL){ +@@ -3802,7 +3799,6 @@ static tsize_t t2p_write_pdf_info(T2P* t + tsize_t written=0; + char* info; + char buffer[512]; +- int buflen=0; + + if(t2p->pdf_datetime==NULL){ + t2p_pdf_tifftime(t2p, input); +@@ -3815,7 +3811,8 @@ static tsize_t t2p_write_pdf_info(T2P* t + } + written += TIFFWriteFile(output, (tdata_t) "\r/Producer ", 11); + _TIFFmemset((tdata_t)buffer, 0x00, 512); +- buflen=sprintf(buffer, "libtiff / tiff2pdf - %d / %s", TIFFLIB_VERSION, T2P_VERSION); ++ sprintf(buffer, "libtiff / tiff2pdf - %d / %s", ++ TIFFLIB_VERSION, T2P_VERSION); + written += t2p_write_pdf_string(buffer, output); + written += TIFFWriteFile(output, (tdata_t) "\r", 1); + if(t2p->pdf_creator != NULL){ +--- djvulibre-3.5.24.orig/tools/djvumake.cpp ++++ djvulibre-3.5.24/tools/djvumake.cpp +@@ -153,6 +153,7 @@ + + #include + #include ++#include + #include + #include + +--- djvulibre-3.5.24.orig/tools/cpaldjvu.cpp ++++ djvulibre-3.5.24/tools/cpaldjvu.cpp +@@ -118,6 +118,7 @@ + #include "jb2tune.h" + + #include ++#include + #include + #include + +--- djvulibre-3.5.24.orig/tools/cjb2.cpp ++++ djvulibre-3.5.24/tools/cjb2.cpp +@@ -120,6 +120,7 @@ + #include "jb2tune.h" + + #include ++#include + #include + #if HAVE_TIFF + #include +--- djvulibre-3.5.24.orig/tools/djvused.cpp ++++ djvulibre-3.5.24/tools/djvused.cpp +@@ -61,6 +61,7 @@ + #endif + + #include ++#include + #include + #include + #include +--- djvulibre-3.5.24.orig/tools/djvmcvt.cpp ++++ djvulibre-3.5.24/tools/djvmcvt.cpp +@@ -144,6 +144,7 @@ + + #include + #include ++#include + #include + + static const char * progname; +--- djvulibre-3.5.24.orig/tools/djvudump.1 ++++ djvulibre-3.5.24/tools/djvudump.1 +@@ -27,7 +27,7 @@ + djvudump \- Display internal structure of DjVu files. + + .SH SYNOPSIS +-.BI "djvudump " "djvufiles" "..." ++.BI "djvudump [-o " "outputfile" "] " "djvufiles" "..." + + .SH DESCRIPTION + Program +--- djvulibre-3.5.24.orig/tools/djvups.cpp ++++ djvulibre-3.5.24/tools/djvups.cpp +@@ -57,6 +57,7 @@ + # include "config.h" + #endif + ++#include + #include + #include + #include +--- djvulibre-3.5.24.orig/tools/tiff2pdf.h ++++ djvulibre-3.5.24/tools/tiff2pdf.h +@@ -22,6 +22,7 @@ + # endif + # if HAVE_TIFF + # include ++# include + # include + # include + # include +--- djvulibre-3.5.24.orig/tools/djvuserve.cpp ++++ djvulibre-3.5.24/tools/djvuserve.cpp +@@ -73,6 +73,7 @@ + + #include + #include ++#include + #include + #include + #include +--- djvulibre-3.5.24.orig/tools/bzz.cpp ++++ djvulibre-3.5.24/tools/bzz.cpp +@@ -94,6 +94,7 @@ + #include "GURL.h" + #include "DjVuMessage.h" + #include ++#include + #include + + static const char *program = "(unknown)"; +--- djvulibre-3.5.24.orig/tools/djvm.cpp ++++ djvulibre-3.5.24/tools/djvm.cpp +@@ -135,9 +135,9 @@ + #include "DjVuMessage.h" + + #include ++#include + #include + #include +-#include + + static const char * progname; + +--- djvulibre-3.5.24.orig/tools/jb2cmp/patterns.cpp ++++ djvulibre-3.5.24/tools/jb2cmp/patterns.cpp +@@ -303,11 +303,8 @@ static int32 distance_by_pixeldiff_funct + int32 (*compare_row)(byte *, byte *, int32), + int32 (*compare_with_white)(byte *, int32), int32 ceiling) + { +- byte **p1, **p2; + int32 w1, w2, h1, h2; + int32 shift_x, shift_y; /* of i1's coordinate system with respect to i2 */ +- /*int32 s = 0, i, i_start, i_cap; +- int32 right_margin_start, right_margin_width;*/ + + /* make i1 to be narrower than i2 */ + if (i1->width > i2->width) +@@ -317,8 +314,8 @@ static int32 distance_by_pixeldiff_funct + i2 = img; + } + +- w1 = i1->width; h1 = i1->height; p1 = i1->pixels; +- w2 = i2->width; h2 = i2->height; p2 = i2->pixels; ++ w1 = i1->width; h1 = i1->height; ++ w2 = i2->width; h2 = i2->height; + + /* (shift_x, shift_y) */ + /* is what should be added to i1's coordinates to get i2's coordinates. */ +@@ -339,86 +336,6 @@ static int32 distance_by_pixeldiff_funct + + return distance_by_pixeldiff_functions_by_shift( + i1, i2, compare_row, compare_with_white, ceiling, shift_x, shift_y); +- +-/* FIXME */ +-#if 0 +- /* Compute difference in the non-overlapping top margin */ +- +- if (shift_y < 0) +- { +- /* i1 has top rows not covered by i2 */ +- i_cap = -shift_y; +- for (i = 0; i < i_cap; i++) +- { +- assert(i >= 0 && i < h1); +- s += compare_with_white(p1[i], w1); +- if (s > ceiling) return maxint; +- } +- i_start = i_cap; /* topmost overlapping row in i1's coords */ +- } +- else +- { +- /* i2 has top rows not covered by i1 */ +- for (i = 0; i < shift_y; i++) +- { +- assert(i >= 0 && i < h2); +- s += compare_with_white(p2[i], w2); +- if (s > ceiling) return maxint; +- } +- i_start = 0; +- } +- +- /* Compute difference in the overlapping area */ +- +- i_cap = h2 - shift_y; +- if (h1 < i_cap) i_cap = h1; +- +- right_margin_start = shift_x + w1; +- right_margin_width = w2 - right_margin_start; +- +- for (i = i_start; i < i_cap; i++) /* i is a coordinate in i1 system */ +- { +- int32 y = i + shift_y; /* same row coordinate in i2 system */ +- assert(y >= 0 && y < h2); +- s += compare_with_white(p2[y], shift_x); +- if (s > ceiling) return maxint; +- assert(i >= 0 && i < h1); +- assert(shift_x + w1 <= w2); +- assert(i < h1); +- s += compare_row(p2[y] + shift_x, p1[i], w1); +- if (s > ceiling) return maxint; +- s += compare_with_white(p2[y] + right_margin_start, right_margin_width); +- if (s > ceiling) return maxint; +- } +- +- +- /* Compute difference in the non-overlapping bottom margin */ +- +- if (i_cap == h1) +- { +- /* i2 has bottom rows not covered by i1 */ +- i_start = i_cap + shift_y; +- for (i = i_start; i < h2; i++) +- { +- assert(i >= 0 && i < h2); +- s += compare_with_white(p2[i], w2); +- if (s > ceiling) return maxint; +- } +- } +- else +- { +- /* i1 has bottom rows not covered by i2 */ +- i_start = i_cap; +- for (i = i_cap; i < h1; i++) +- { +- assert(i >= 0 && i < h1); +- s += compare_with_white(p1[i], w1); +- if (s > ceiling) return maxint; +- } +- } +- +- return s; +-#endif + } + + #endif +--- djvulibre-3.5.24.orig/libdjvu/GSmartPointer.cpp ++++ djvulibre-3.5.24/libdjvu/GSmartPointer.cpp +@@ -67,6 +67,7 @@ + // Our original implementation consisted of multiple classes. + // . + ++#include + #include + #if PARANOID_DEBUG + # include +--- djvulibre-3.5.24.orig/libdjvu/Makefile.in ++++ djvulibre-3.5.24/libdjvu/Makefile.in +@@ -38,7 +38,6 @@ TOUCH = @TOUCH@ + INSTALL = @INSTALL@ + INSTALL_PROGRAM = @INSTALL_PROGRAM@ + INSTALL_DATA = @INSTALL_DATA@ +-INSTALL_SHLIB = @INSTALL_SHLIB@ + LIBTOOL = @LIBTOOL@ + + DEFS = @DEFS@ +@@ -101,7 +100,7 @@ install-data: FORCE + install-lib: ${LIBDJVU_LA} FORCE + ${INSTALL} -d ${DESTDIR}${libdir} + ${LIBTOOL} --mode=install \ +- ${INSTALL_SHLIB} ${LIBDJVU_LA} ${DESTDIR}${libdir} ++ ${INSTALL_DATA} ${LIBDJVU_LA} ${DESTDIR}${libdir} + + install-include: FORCE + ${INSTALL} -d ${DESTDIR}${includedir}/libdjvu +--- djvulibre-3.5.24.orig/libdjvu/miniexp.h ++++ djvulibre-3.5.24/libdjvu/miniexp.h +@@ -38,7 +38,8 @@ extern "C" { + #ifndef MINILISPAPI + # define MINILISPAPI /**/ + #endif +- ++ ++#include + + /* -------------------------------------------------- */ + /* LISP EXPRESSIONS */ +--- djvulibre-3.5.24.orig/libdjvu/DjVuMessage.cpp ++++ djvulibre-3.5.24/libdjvu/DjVuMessage.cpp +@@ -71,6 +71,7 @@ + #include "debug.h" + #include + #include ++#include + #include + #ifdef WIN32 + # include +--- djvulibre-3.5.24.orig/libdjvu/IW44Image.cpp ++++ djvulibre-3.5.24/libdjvu/IW44Image.cpp +@@ -76,6 +76,7 @@ + #include "IFFByteStream.h" + #include "GRect.h" + ++#include + #include + #include + #include +--- djvulibre-3.5.24.orig/libdjvu/DjVuToPS.cpp ++++ djvulibre-3.5.24/libdjvu/DjVuToPS.cpp +@@ -72,6 +72,7 @@ + #include "GPixmap.h" + #include "debug.h" + #include ++#include + #include + #include + #include +--- djvulibre-3.5.24.orig/libdjvu/DjVuPort.h ++++ djvulibre-3.5.24/libdjvu/DjVuPort.h +@@ -65,6 +65,7 @@ + + #include "GThreads.h" + #include "GURL.h" ++#include "stddef.h" + + #ifdef HAVE_NAMESPACES + namespace DJVU { +--- djvulibre-3.5.24.orig/libdjvu/MMX.h ++++ djvulibre-3.5.24/libdjvu/MMX.h +@@ -143,17 +143,18 @@ class MMXControl + + #ifndef NO_MMX + +-#if defined(__GNUC__) && defined(__i386__) ++#if defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__)) ++typedef struct{ char c[8]; } MMX_t; + #define MMXemms \ + __asm__ volatile("emms" : : : "memory" ) + #define MMXrr(op,src,dst) \ +- __asm__ volatile( #op " %%" #src ",%%" #dst : : : "memory") ++ __asm__ volatile( #op " %%" #src ",%%" #dst : : : "memory" ) + #define MMXir(op,imm,dst) \ +- __asm__ volatile( #op " %0,%%" #dst : : "i" (imm) : "memory") ++ __asm__ volatile( #op " %0,%%" #dst : : "i" (imm) : "memory" ) + #define MMXar(op,addr,dst) \ +- __asm__ volatile( #op " %0,%%" #dst : : "m" (*(addr)) : "memory") ++ __asm__ volatile( #op " %0,%%" #dst : : "m" (*(MMX_t*)(addr)) : "memory" ) + #define MMXra(op,src,addr) \ +- __asm__ volatile( #op " %%" #src ",%0" : : "m" (*(addr)) : "memory") ++ __asm__ volatile( #op " %%" #src ",%0" : "=m" (*(MMX_t*)(addr)) : : "memory") + #define MMX 1 + #endif + +--- djvulibre-3.5.24.orig/libdjvu/GOS.cpp ++++ djvulibre-3.5.24/libdjvu/GOS.cpp +@@ -65,6 +65,7 @@ + #include "GOS.h" + #include "GURL.h" + ++#include + #include + #include + #include +--- djvulibre-3.5.24.orig/libdjvu/IFFByteStream.h ++++ djvulibre-3.5.24/libdjvu/IFFByteStream.h +@@ -124,6 +124,7 @@ + + + #include "DjVuGlobal.h" ++#include + #include + #include + #include +--- djvulibre-3.5.24.orig/libdjvu/BSEncodeByteStream.cpp ++++ djvulibre-3.5.24/libdjvu/BSEncodeByteStream.cpp +@@ -71,6 +71,7 @@ + #include "GOS.h" + #endif + ++#include + #include + #include + #include +--- djvulibre-3.5.24.orig/libdjvu/GURL.cpp ++++ djvulibre-3.5.24/libdjvu/GURL.cpp +@@ -72,6 +72,7 @@ + #include "GURL.h" + #include "debug.h" + ++#include + #include + #include + #include +--- djvulibre-3.5.24.orig/libdjvu/GUnicode.cpp ++++ djvulibre-3.5.24/libdjvu/GUnicode.cpp +@@ -62,6 +62,8 @@ + + #include "GString.h" + ++#include ++ + #if HAS_ICONV + #include + #endif +--- djvulibre-3.5.24.orig/libdjvu/miniexp.cpp ++++ djvulibre-3.5.24/libdjvu/miniexp.cpp +@@ -23,6 +23,7 @@ + # pragma implementation "miniexp.h" + #endif + ++#include + #include + #include + #include +--- djvulibre-3.5.24.orig/libdjvu/GSmartPointer.h ++++ djvulibre-3.5.24/libdjvu/GSmartPointer.h +@@ -97,6 +97,8 @@ + #include "DjVuGlobal.h" + #include "atomic.h" + ++#include ++ + #ifdef HAVE_NAMESPACES + namespace DJVU { + # ifdef NOT_DEFINED // Just to fool emacs c++ mode +@@ -505,7 +507,8 @@ template + class GPBuffer : public GPBufferBase + { + public: +- GPBuffer(TYPE *&xptr,const size_t n=0) : GPBufferBase((void *&)xptr,n,sizeof(TYPE)) {} ++ GPBuffer(TYPE *&xptr,const size_t n=0) ++ : GPBufferBase((void *&)xptr,n,sizeof(TYPE)) {} + inline void resize(const size_t n) {GPBufferBase::resize(n,sizeof(TYPE));} + inline void clear(void) {GPBufferBase::set(sizeof(TYPE),0);} + inline void set(const char c) {GPBufferBase::set(sizeof(TYPE),c);} +--- djvulibre-3.5.24.orig/libdjvu/GException.cpp ++++ djvulibre-3.5.24/libdjvu/GException.cpp +@@ -60,6 +60,7 @@ + # pragma implementation + #endif + ++#include + #include + #include + #include +--- djvulibre-3.5.24.orig/libdjvu/IW44EncodeCodec.cpp ++++ djvulibre-3.5.24/libdjvu/IW44EncodeCodec.cpp +@@ -76,6 +76,7 @@ + #include "IFFByteStream.h" + #include "GRect.h" + ++#include + #include + #include + #include +--- djvulibre-3.5.24.orig/libdjvu/JPEGDecoder.h ++++ djvulibre-3.5.24/libdjvu/JPEGDecoder.h +@@ -64,6 +64,7 @@ + + #ifdef NEED_JPEG_DECODER + ++#include + #include + #include + +--- djvulibre-3.5.24.orig/libdjvu/ddjvuapi.cpp ++++ djvulibre-3.5.24/libdjvu/ddjvuapi.cpp +@@ -60,6 +60,7 @@ + # pragma implementation "ddjvuapi.h" + #endif + ++#include + #include + #include + #include +--- djvulibre-3.5.24.orig/libdjvu/atomic.cpp ++++ djvulibre-3.5.24/libdjvu/atomic.cpp +@@ -28,6 +28,7 @@ + # include "config.h" + #endif + ++#include + #include + #include + #include "atomic.h" +--- djvulibre-3.5.24.orig/libdjvu/ByteStream.cpp ++++ djvulibre-3.5.24/libdjvu/ByteStream.cpp +@@ -73,6 +73,7 @@ + #include "GOS.h" + #include "GURL.h" + #include "DjVuMessage.h" ++#include + #include + #if defined(WIN32) || defined(__CYGWIN32__) + # include +--- djvulibre-3.5.24.orig/libdjvu/ZPCodec.cpp ++++ djvulibre-3.5.24/libdjvu/ZPCodec.cpp +@@ -66,6 +66,8 @@ + #include "ZPCodec.h" + #include "ByteStream.h" + #include "GException.h" ++ ++#include + #include + #include + #include +--- djvulibre-3.5.24.orig/libdjvu/MMX.cpp ++++ djvulibre-3.5.24/libdjvu/MMX.cpp +@@ -62,6 +62,7 @@ + + #include "MMX.h" + #include ++#include + #include + + +@@ -166,8 +167,23 @@ MMXControl::enable_mmx() + : "=m" (cpuflags) : + : "eax","ecx","edx"); + #endif ++#if defined(MMX) && defined(__GNUC__) && defined(__x86_64__) ++ // Detection of MMX for GCC ++ __asm__ volatile (// Check that CR0:EM is clear ++ "xorl %%edx,%%edx\n\t" ++ "smsw %%ax\n\t" ++ "andl $4,%%eax\n\t" ++ "jnz 1f\n\t" ++ // Execute CPUID ++ "movl $1,%%eax\n\t" ++ "cpuid\n" ++ // Finish ++ "1:\tmovl %%edx, %0" ++ : "=m" (cpuflags) : ++ : "eax","ebx","ecx","edx"); ++#endif + #if defined(MMX) && defined(_MSC_VER) && defined(_M_IX86) +- // Detection of MMX for MSVC ++ // Detection of MMX for MSVC 32 bits + __asm { pushfd + pop ecx + xor edx,edx +--- djvulibre-3.5.24.orig/libdjvu/GString.h ++++ djvulibre-3.5.24/libdjvu/GString.h +@@ -108,6 +108,7 @@ + #include "DjVuGlobal.h" + #include "GContainer.h" + ++#include + #include + #include + #ifdef WIN32 +--- djvulibre-3.5.24.orig/libdjvu/GThreads.cpp ++++ djvulibre-3.5.24/libdjvu/GThreads.cpp +@@ -71,6 +71,8 @@ + #include "GThreads.h" + #include "GException.h" + #include "DjVuMessageLite.h" ++ ++#include + #include + #include + +@@ -100,13 +102,6 @@ + #if THREADMODEL==WINTHREADS + # include + #endif +-#if THREADMODEL==COTHREADS +-# include +-# include +-# include +-# include +-# include +-#endif + + + #ifdef HAVE_NAMESPACES +@@ -378,257 +373,6 @@ GMonitor::wait(unsigned long timeout) + #endif + + +- +-// ---------------------------------------- +-// MACTHREADS IMPLEMENTATION (obsolete) +-// ---------------------------------------- +- +-#if THREADMODEL==MACTHREADS +- +-// Doubly linked list of waiting threads +-struct thr_waiting { +- struct thr_waiting *next; // ptr to next waiting thread record +- struct thr_waiting *prev; // ptr to ptr to this waiting thread +- unsigned long thid; // id of waiting thread +- int *wchan; // cause of the wait +-}; +-static struct thr_waiting *first_waiting_thr = 0; +-static struct thr_waiting *last_waiting_thr = 0; +- +- +-// Stops current thread. +-// Argument ``self'' must be current thread id. +-// Assumes ``ThreadBeginCritical'' has been called before. +-static void +-macthread_wait(ThreadID self, int *wchan) +-{ +- // Prepare and link wait record +- struct thr_waiting wait; // no need to malloc :-) +- wait.thid = self; +- wait.wchan = wchan; +- wait.next = 0; +- wait.prev = last_waiting_thr; +- *(wait.prev ? &wait.prev->next : &first_waiting_thr ) = &wait; +- *(wait.next ? &wait.next->prev : &last_waiting_thr ) = &wait; +- // Leave critical section and start waiting. +- (*wchan)++; +- SetThreadStateEndCritical(self, kStoppedThreadState, kNoThreadID); +- // The Apple documentation says that the above call reschedules a new +- // thread. Therefore it will only return when the thread wakes up. +- ThreadBeginCritical(); +- (*wchan)--; +- // Unlink wait record +- *(wait.prev ? &wait.prev->next : &first_waiting_thr ) = wait.next; +- *(wait.next ? &wait.next->prev : &last_waiting_thr ) = wait.prev; +- // Returns from the wait. +-} +- +-// Wakeup one thread or all threads waiting on cause wchan +-static void +-macthread_wakeup(int *wchan, int onlyone) +-{ +- if (*wchan == 0) +- return; +- for (struct thr_waiting *q=first_waiting_thr; q; q=q->next) +- if (q->wchan == wchan) { +- // Found a waiting thread +- q->wchan = 0; +- SetThreadState(q->thid, kReadyThreadState, kNoThreadID); +- if (onlyone) +- return; +- } +-} +- +-GThread::GThread(int stacksize) +- : thid(kNoThreadID), xentry(0), xarg(0) +-{ +-} +- +-GThread::~GThread(void) +-{ +- thid = kNoThreadID; +-} +- +-pascal void * +-GThread::start(void *arg) +-{ +- GThread *gt = (GThread*)arg; +- try +- { +- G_TRY +- { +- (gt->xentry)(gt->xarg); +- } +- G_CATCH(ex) +- { +- ex.perror(); +- DjVuMessageLite::perror( ERR_MSG("GThreads.uncaught") ); +-#ifdef _DEBUG +- abort(); +-#endif +- } +- G_ENDCATCH; +- } +- catch(...) +- { +- DjVuMessageLite::perror( ERR_MSG("GThreads.unrecognized") ); +-#ifdef _DEBUG +- abort(); +-#endif +- } +- return 0; +-} +- +-int +-GThread::create(void (*entry)(void*), void *arg) +-{ +- if (xentry || thid!=kNoThreadID) +- return -1; +- xentry = entry; +- xarg = arg; +- int err = NewThread( kCooperativeThread, GThread::start , this, 0, +- kCreateIfNeeded, (void**)nil, &thid ); +- if( err != noErr ) +- return err; +- return 0; +-} +- +-void +-GThread::terminate() +-{ +- if (thid != kNoThreadID) { +- DisposeThread( thid, NULL, false ); +- thid = kNoThreadID; +- } +-} +- +-int +-GThread::yield() +-{ +- YieldToAnyThread(); +- return 0; +-} +- +-void* +-GThread::current() +-{ +- unsigned long thid = kNoThreadID; +- GetCurrentThread(&thid); +- return (void*) thid; +-} +- +- +-// GMonitor implementation +-GMonitor::GMonitor() +- : ok(0), count(1), locker(0), wlock(0), wsig(0) +-{ +- locker = kNoThreadID; +- ok = 1; +-} +- +-GMonitor::~GMonitor() +-{ +- ok = 0; +- ThreadBeginCritical(); +- macthread_wakeup(&wsig, 0); +- macthread_wakeup(&wlock, 0); +- ThreadEndCritical(); +- YieldToAnyThread(); +-} +- +-void +-GMonitor::enter() +-{ +- ThreadID self; +- GetCurrentThread(&self); +- ThreadBeginCritical(); +- if (count>0 || self!=locker) +- { +- while (ok && count<=0) +- macthread_wait(self, &wlock); +- count = 1; +- locker = self; +- } +- count -= 1; +- ThreadEndCritical(); +-} +- +-void +-GMonitor::leave() +-{ +- ThreadID self; +- GetCurrentThread(&self); +- if (ok && (count>0 || self!=locker)) +- G_THROW( ERR_MSG("GThreads.not_acq_leave") ); +- ThreadBeginCritical(); +- if (++count > 0) +- macthread_wakeup(&wlock, 1); +- ThreadEndCritical(); +-} +- +-void +-GMonitor::signal() +-{ +- ThreadID self; +- GetCurrentThread(&self); +- if (count>0 || self!=locker) +- G_THROW( ERR_MSG("GThreads.not_acq_signal") ); +- ThreadBeginCritical(); +- macthread_wakeup(&wsig, 1); +- ThreadEndCritical(); +-} +- +-void +-GMonitor::broadcast() +-{ +- ThreadID self; +- GetCurrentThread(&self); +- if (count>0 || self!=locker) +- G_THROW( ERR_MSG("GThreads.not_acq_broad") ); +- ThreadBeginCritical(); +- macthread_wakeup(&wsig, 0); +- ThreadEndCritical(); +-} +- +-void +-GMonitor::wait() +-{ +- // Check state +- ThreadID self; +- GetCurrentThread(&self); +- if (count>0 || locker!=self) +- G_THROW( ERR_MSG("GThreads.not_acq_wait") ); +- // Wait +- if (ok) +- { +- // Atomically release monitor and wait +- ThreadBeginCritical(); +- int sav_count = count; +- count = 1; +- macthread_wakeup(&wlock, 1); +- macthread_wait(self, &wsig); +- // Re-acquire +- while (ok && count<=0) +- macthread_wait(self, &wlock); +- count = sav_count; +- locker = self; +- ThreadEndCritical(); +- } +-} +- +-void +-GMonitor::wait(unsigned long timeout) +-{ +- // Timeouts are not used for anything important. +- // Just ignore the timeout and wait the regular way. +- if (timeout > 0) +- wait(); +-} +- +-#endif +- +- +- + // ---------------------------------------- + // POSIXTHREADS IMPLEMENTATION + // ---------------------------------------- +@@ -898,922 +642,6 @@ GMonitor::wait(unsigned long timeout) + + + +-// ---------------------------------------- +-// CUSTOM COOPERATIVE THREADS +-// ---------------------------------------- +- +-#if THREADMODEL==COTHREADS +- +-#ifndef __GNUG__ +-#error "COTHREADS require G++" +-#endif +-#if (__GNUC__<2) || ((__GNUC__==2) && (__GNUC_MINOR__<=90)) +-#warning "COTHREADS require EGCS-1.1.1 with Leon's libgcc patch." +-#warning "You may have trouble with thread-unsafe exceptions..." +-#define NO_LIBGCC_HOOKS +-#endif +- +-// -------------------------------------- constants +- +-// Minimal stack size +-#define MINSTACK (32*1024) +-// Default stack size +-#define DEFSTACK (127*1024) +-// Maxtime between checking fdesc (ms) +-#define MAXFDWAIT (200) +-// Maximum time to wait in any case +-#define MAXWAIT (60*60*1000) +-// Maximum penalty for hog task (ms) +-#define MAXPENALTY (1000) +-// Trace task switches +-#undef COTHREAD_TRACE +-#undef COTHREAD_TRACE_VERBOSE +- +-// -------------------------------------- context switch code +- +-struct mach_state { +- jmp_buf buf; +-}; +- +-static void +-mach_switch(mach_state *st1, mach_state *st2) +-{ +-#if #cpu(sparc) +- asm("ta 3"); // save register windows +-#endif +- if (! setjmp(st1->buf)) +- longjmp(st2->buf, 1); +-} +- +-static void +-mach_start(mach_state *st1, void *pc, char *stacklo, char *stackhi) +-{ +-#if #cpu(sparc) +- asm("ta 3"); // save register windows +-#endif +- if (! setjmp(st1->buf)) +- { +- // The following code must perform two tasks: +- // -- set stack pointer to a proper value between #stacklo# and #stackhi#. +- // -- branch to or call the function at address #pc#. +- // This function never returns ... so there is no need to save anything +-#if #cpu(mips) +- char *sp = (char*)(((unsigned long)stackhi-16) & ~0xff); +- asm volatile ("move $sp,%0\n\t" // set new stack pointer +- "move $25,%1\n\t" // call subroutine via $25 +- "jal $25\n\t" // call subroutine via $25 +- "nop" // delay slot +- : : "r" (sp), "r" (pc) ); +-#elif #cpu(i386) +- char *sp = (char*)(((unsigned long)stackhi-16) & ~0xff); +- asm volatile ("movl %0,%%esp\n\t" // set new stack pointer +- "call *%1" // call function +- : : "r" (sp), "r" (pc) ); +-#elif #cpu(sparc) +- char *sp = (char*)(((unsigned long)stackhi-16) & ~0xff); +- asm volatile ("ta 3\n\t" // saving the register windows will not hurt. +- "mov %0,%%sp\n\t" // set new stack pointer +- "call %1,0\n\t" // call function +- "nop" // delay slot +- : : "r" (sp), "r" (pc) ); +-#elif #cpu(hppa) +- char *sp = (char*)(((unsigned long)stacklo+128+255) & ~0xff); +- asm volatile("copy %0,%%sp\n\t" // set stack pointer +- "copy %1,%%r22\n\t" // set call address +- ".CALL\n\t" // call pseudo instr (why?) +- "bl $$dyncall,%%r31\n\t" // call +- "copy %%r31,%%r2" // delay slot ??? +- : : "r" (sp), "r" (pc) ); +-#elif #cpu(alpha) +- char *sp = (char*)(((unsigned long)stackhi-16) & ~0xff); +- asm volatile ("bis $31,%0,$30\n\t" // set new stack pointer +- "bis $31,%1,$27\n\t" // load function pointer +- "jsr $26,($27),0" // call function +- : : "r" (sp), "r" (pc) ); +-#elif #cpu(powerpc) +- char *sp = (char*)(((unsigned long)stackhi-16) & ~0xff); +- asm volatile ("mr 1,%0\n\t" // set new stack pointer +- "mr 0,%1\n\t" // load func pointer into r0 +- "mtlr 0\n\t" // load link register with r0 +- "blrl" // branch +- : : "r" (sp), "r" (pc) ); +-#elif #cpu(m68k) && defined(COTHREAD_UNTESTED) +- char *sp = (char*)(((unsigned long)stackhi-16) & ~0xff); +- asm volatile ("move%.l %0,%Rsp\n\t" // set new stack pointer +- "jmp %a1" // branch to address %1 +- : : "r" (sp), "a" (pc) ); +-#elif #cpu(arm) && defined(COTHREAD_UNTESTED) +- char *sp = (char*)(((unsigned long)stackhi-16) & ~0xff); +- asm volatile ("mov %|sp, %0\n\t" // set new stack pointer +-# if defined(__ARM_ARCH_4__) || defined(__ARM_ARCH_4T__) +- "mov %|pc, %1" // branch to address %1 +-# else +- "bx %1" // branch to address %1 +-# endif +- : : "r" (sp), "r" (pc) ); +-#else +-#error "COTHREADS not supported on this machine." +-#error "Try -DTHREADMODEL=NOTHREADS." +-#endif +- // We should never reach this point +- abort(); +- // Note that this call to abort() makes sure +- // that function mach_start() is compiled as a non-leaf +- // function. It is indeed a non-leaf function since the +- // piece of assembly code calls a function, but the compiler +- // would not know without the call to abort() ... +- } +-} +- +-#ifdef CHECK +-// This code can be used to verify that task switching works. +-char stack[16384]; +-mach_state st1, st2; +-void th2() { +- puts("2b"); mach_switch(&st2, &st1); +- puts("4b"); mach_switch(&st2, &st1); +- puts("6b"); mach_switch(&st2, &st1); +-} +-void th2relay() { +- th2(); puts("ooops\n"); +-} +-void th1() { +- mach_start(&st1, (void*)th2relay, stack, stack+sizeof(stack)); +- puts("3a"); mach_switch(&st1, &st2); +- puts("5a"); mach_switch(&st1, &st2); +-} +-int main() { +- puts("1a"); th1(); puts("6a"); +-} +-#endif +- +- +- +-// -------------------------------------- select +- +-struct coselect { +- int nfds; +- fd_set rset; +- fd_set wset; +- fd_set eset; +-}; +- +-static void +-coselect_merge(coselect *dest, coselect *from) +-{ +- int i; +- int nfds = from->nfds; +- if (nfds > dest->nfds) +- dest->nfds = nfds; +- for (i=0; irset)) FD_SET(i, &dest->rset); +- for (i=0; iwset)) FD_SET(i, &dest->wset); +- for (i=0; ieset)) FD_SET(i, &dest->eset); +-} +- +-static int +-coselect_test(coselect *c) +-{ +- static timeval tmzero = {0,0}; +- fd_set copyr = c->rset; +- fd_set copyw = c->wset; +- fd_set copye = c->eset; +- return select(c->nfds, ©r, ©w, ©e, &tmzero); +-} +- +- +-// -------------------------------------- cotask +- +-class GThread::cotask { +-public: +-#ifndef NO_LIBGCC_HOOKS +- cotask(const int xstacksize,void *); +-#else +- cotask(const int xstacksize); +-#endif +- ~cotask(); +- class GThread::cotask *next; +- class GThread::cotask *prev; +- // context +- mach_state regs; +- // stack information +- char *stack; +- GPBuffer gstack; +- int stacksize; +- // timing information +- unsigned long over; +- // waiting information +- void *wchan; +- coselect *wselect; +- unsigned long *maxwait; +- // delete after termination +- bool autodelete; +- // egcs exception support +-#ifndef NO_LIBGCC_HOOKS +- void *ehctx; +-#endif +-}; +- +-#ifndef NO_LIBGCC_HOOKS +-GThread::cotask::cotask(const int xstacksize, void *xehctx) +-#else +-GThread::cotask::cotask(const int xstacksize) +-#endif +-: next(0), prev(0), gstack(stack,xstacksize), stacksize(xstacksize), +- over(0), wchan(0), wselect(0), maxwait(0), autodelete(false) +-#ifndef NO_LIBGCC_HOOKS +- ,ehctx(xehctx) +-#endif +-{ +- memset(®s,0,sizeof(regs)); +-} +- +-static GThread::cotask *maintask = 0; +-static GThread::cotask *curtask = 0; +-static GThread::cotask *autodeletetask = 0; +-static unsigned long globalmaxwait = 0; +-static void (*scheduling_callback)(int) = 0; +-static timeval time_base; +- +- +-GThread::cotask::~cotask() +-{ +- gstack.resize(0); +-#ifndef NO_LIBGCC_HOOKS +- if (ehctx) +- free(ehctx); +- ehctx = 0; +-#endif +-} +- +-static void +-cotask_free(GThread::cotask *task) +-{ +-#ifdef COTHREAD_TRACE +- DjVuPrintErrorUTF8("cothreads: freeing task %p with autodelete=%d\n", +- task,task->autodelete); +-#endif +- if (task!=maintask) +- { +- delete task; +- } +-} +- +- +-// -------------------------------------- time +- +-static unsigned long +-time_elapsed(int reset=1) +-{ +- timeval tm; +- gettimeofday(&tm, NULL); +- long msec = (tm.tv_usec-time_base.tv_usec)/1000; +- unsigned long elapsed = (long)(tm.tv_sec-time_base.tv_sec)*1000 + msec; +- if (reset && elapsed>0) +- { +-#ifdef COTHREAD_TRACE +-#ifdef COTHREAD_TRACE_VERBOSE +- DjVuPrintErrorUTF8("cothreads: %4ld ms in task %p\n", elapsed, curtask); +-#endif +-#endif +- time_base.tv_sec = tm.tv_sec; +- time_base.tv_usec += msec*1000; +- } +- return elapsed; +-} +- +- +-// -------------------------------------- scheduler +- +-static int +-cotask_yield() +-{ +- // ok +- if (! maintask) +- return 0; +- // get elapsed time and return immediately when it is too small +- unsigned long elapsed = time_elapsed(); +- if (elapsed==0 && curtask->wchan==0 && curtask->prev && curtask->next) +- return 0; +- // adjust task running time +- curtask->over += elapsed; +- if (curtask->over > MAXPENALTY) +- curtask->over = MAXPENALTY; +- // start scheduling +- reschedule: +- // try unblocking tasks +- GThread::cotask *n = curtask->next; +- GThread::cotask *q = n; +- do +- { +- if (q->wchan) +- { +- if (q->maxwait && *q->maxwait<=elapsed) +- { +- *q->maxwait = 0; +- q->wchan=0; +- q->maxwait=0; +- q->wselect=0; +- } +- else if (q->wselect && globalmaxwait<=elapsed && coselect_test(q->wselect)) +- { +- q->wchan=0; +- if (q->maxwait) +- *q->maxwait -= elapsed; +- q->maxwait = 0; +- q->wselect=0; +- } +- if (q->maxwait) +- *q->maxwait -= elapsed; +- } +- q = q->next; +- } +- while (q!=n); +- // adjust globalmaxwait +- if (globalmaxwait < elapsed) +- globalmaxwait = MAXFDWAIT; +- else +- globalmaxwait -= elapsed; +- // find best candidate +- static int count; +- unsigned long best = MAXPENALTY + 1; +- GThread::cotask *r = 0; +- count = 0; +- q = n; +- do +- { +- if (! q->wchan) +- { +- count += 1; +- if (best > q->over) +- { +- r = q; +- best = r->over; +- } +- } +- q = q->next; +- } +- while (q != n); +- // found +- if (count > 0) +- { +- // adjust over +- q = n; +- do +- { +- q->over = (q->over>best ? q->over-best : 0); +- q = q->next; +- } +- while (q != n); +- // Switch +- if (r != curtask) +- { +-#ifdef COTHREAD_TRACE +- DjVuPrintErrorUTF8("cothreads: ----- switch to %p [%ld]\n", r, best); +-#endif +- GThread::cotask *old = curtask; +- curtask = r; +- mach_switch(&old->regs, &curtask->regs); +- } +- // handle autodelete +- if (autodeletetask && autodeletetask->autodelete) +- cotask_free(autodeletetask); +- autodeletetask = 0; +- // return +- if (count == 1) +- return 1; +- return 0; +- } +- // No task ready +- count = 0; +- unsigned long minwait = MAXWAIT; +- coselect allfds; +- allfds.nfds = 1; +- FD_ZERO(&allfds.rset); +- FD_ZERO(&allfds.wset); +- FD_ZERO(&allfds.eset); +- q = n; +- do +- { +- if (q->maxwait || q->wselect) +- count += 1; +- if (q->maxwait && *q->maxwaitmaxwait; +- if (q->wselect) +- coselect_merge(&allfds, q->wselect); +- q = q->next; +- } +- while (q != n); +- // abort on deadlock +- if (count == 0) { +- DjVuMessageLite::perror( ERR_MSG("GThreads.panic") ); +- abort(); +- } +- // select +- timeval tm; +- tm.tv_sec = minwait/1000; +- tm.tv_usec = 1000*(minwait-1000*tm.tv_sec); +- select(allfds.nfds,&allfds.rset, &allfds.wset, &allfds.eset, &tm); +- // reschedule +- globalmaxwait = 0; +- elapsed = time_elapsed(); +- goto reschedule; +-} +- +- +-static void +-cotask_terminate(GThread::cotask *task) +-{ +-#ifdef COTHREAD_TRACE +- DjVuPrintErrorUTF8("cothreads: terminating task %p\n", task); +-#endif +- if (task && task!=maintask) +- { +- if (task->prev && task->next) +- { +- if (scheduling_callback) +- (*scheduling_callback)(GThread::CallbackTerminate); +- task->prev->next = task->next; +- task->next->prev = task->prev; +- // mark task as terminated +- task->prev = 0; +- // self termination +- if (task == curtask) +- { +- if (task->autodelete) +- autodeletetask = task; +- cotask_yield(); +- } +- } +- } +-} +- +- +-static void +-cotask_wakeup(void *wchan, int onlyone) +-{ +- if (maintask && curtask) +- { +- GThread::cotask *n = curtask->next; +- GThread::cotask *q = n; +- do +- { +- if (q->wchan == wchan) +- { +- q->wchan=0; +- q->maxwait=0; +- q->wselect=0; +- q->over = 0; +- if (onlyone) +- return; +- } +- q = q->next; +- } +- while (q!=n); +- } +-} +- +- +-// -------------------------------------- select / get_select +- +-static int +-cotask_select(int nfds, +- fd_set *rfds, fd_set *wfds, fd_set *efds, +- struct timeval *tm) +-{ +- // bypass +- if (maintask==0 || (tm && tm->tv_sec==0 && tm->tv_usec<1000)) +- return select(nfds, rfds, wfds, efds, tm); +- // copy parameters +- unsigned long maxwait = 0; +- coselect parm; +- // set waiting info +- curtask->wchan = (void*)&parm; +- if (rfds || wfds || efds) +- { +- parm.nfds = nfds; +- if (rfds) { parm.rset=*rfds; } else { FD_ZERO(&parm.rset); } +- if (wfds) { parm.wset=*wfds; } else { FD_ZERO(&parm.wset); } +- if (efds) { parm.eset=*efds; } else { FD_ZERO(&parm.eset); } +- curtask->wselect = &parm; +- } +- if (tm) +- { +- maxwait = time_elapsed(0) + tm->tv_sec*1000 + tm->tv_usec/1000; +- curtask->maxwait = &maxwait; +- } +- // reschedule +- cotask_yield(); +- // call select to update masks +- if (tm) +- { +- tm->tv_sec = maxwait/1000; +- tm->tv_usec = 1000*(maxwait-1000*tm->tv_sec); +- } +- static timeval tmzero = {0,0}; +- return select(nfds, rfds, wfds, efds, &tmzero); +-} +- +- +-static void +-cotask_get_select(int &nfds, fd_set *rfds, fd_set *wfds, fd_set *efds, +- unsigned long &timeout) +-{ +- int ready = 1; +- unsigned long minwait = MAXWAIT; +- unsigned long elapsed = time_elapsed(0); +- coselect allfds; +- allfds.nfds=0; +- FD_ZERO(&allfds.rset); +- FD_ZERO(&allfds.wset); +- FD_ZERO(&allfds.eset); +- if (curtask) +- { +- GThread::cotask *q=curtask->next; +- while (q != curtask) +- { +- ready++; +- if (q->wchan) +- { +- if (q->wselect) +- coselect_merge(&allfds, q->wselect); +- if (q->maxwait && *q->maxwaitmaxwait; +- ready--; +- } +- q = q->next; +- } +- } +- timeout = 0; +- nfds=allfds.nfds; +- *rfds=allfds.rset; +- *wfds=allfds.wset; +- *efds=allfds.eset; +- if (ready==1 && minwait>elapsed) +- timeout = minwait-elapsed; +-} +- +- +- +-// -------------------------------------- libgcc hook +- +-#ifndef NO_LIBGCC_HOOKS +-// These are exported by Leon's patched version of libgcc.a +-// Let's hope that the egcs people will include the patch in +-// the distributions. +-extern "C" +-{ +- extern void* (*__get_eh_context_ptr)(void); +- extern void* __new_eh_context(void); +-} +- +-// This function is called via the pointer __get_eh_context_ptr +-// by the internal mechanisms of egcs. It must return the +-// per-thread event handler context. This is necessary to +-// implement thread safe exceptions on some machine and/or +-// when flag -fsjlj-exception is set. +-static void * +-cotask_get_eh_context() +-{ +- if (curtask) +- return curtask->ehctx; +- else if (maintask) +- return maintask->ehctx; +- DjVuMessageLite::perror( ERR_MSG("GThreads.co_panic") ); +- abort(); +-} +-#endif +- +- +- +-// -------------------------------------- GThread +- +-void +-GThread::set_scheduling_callback(void (*call)(int)) +-{ +- if (scheduling_callback) +- G_THROW( ERR_MSG("GThreads.dupl_callback") ); +- scheduling_callback = call; +-} +- +- +-GThread::GThread(int stacksize) +- : task(0), xentry(0), xarg(0) +-{ +- // check argument +- if (stacksize < 0) +- stacksize = DEFSTACK; +- if (stacksize < MINSTACK) +- stacksize = MINSTACK; +- // initialization +- if (! maintask) +- { +-#ifndef NO_LIBGCC_HOOKS +- static GThread::cotask comaintask(0,(*__get_eh_context_ptr)()); +- __get_eh_context_ptr = cotask_get_eh_context; +-#else +- static GThread::cotask comaintask(0); +-#endif +- maintask = &comaintask; +-// memset(maintask, 0, sizeof(GThread::cotask)); +- maintask->next = maintask; +- maintask->prev = maintask; +- gettimeofday(&time_base,NULL); +- curtask = maintask; +- } +- // allocation +-#ifndef NO_LIBGCC_HOOKS +- task = new GThread::cotask(stacksize,__new_eh_context()); +-#else +- task = new GThread::cotask(stacksize); +-#endif +-} +- +- +-GThread::~GThread() +-{ +- if (task && task!=maintask) +- { +- if (task->prev) // running +- task->autodelete = true; +- else +- cotask_free(task); +- task = 0; +- } +-} +- +-#if __GNUC__ >= 3 +-# if __GNUC_MINOR__ >= 4 +-# define noinline __attribute__((noinline,used)) +-# elif __GNUC_MINOR >= 2 +-# define noinline __attribute__((noinline)) +-# endif +-#endif +-#ifndef noinline +-# define noinline /**/ +-#endif +- +-static noinline void startone(void); +-static noinline void starttwo(GThread *thr); +-static GThread * volatile starter; +- +-static void +-startone(void) +-{ +- GThread *thr = starter; +- mach_switch(&thr->task->regs, &curtask->regs); +- // Registers may still contain an improper pointer +- // to the exception context. We should neither +- // register cleanups nor register handlers. +- starttwo(thr); +- abort(); +-} +- +-static void +-starttwo(GThread *thr) +-{ +- // Hopefully this function reacquires +- // an exception context pointer. Therefore +- // we can register the exception handlers. +- // It is placed after ``startone'' to avoid inlining. +-#ifdef __EXCEPTIONS +- try +- { +-#endif +- G_TRY +- { +- thr->xentry( thr->xarg ); +- } +- G_CATCH(ex) +- { +- ex.perror(); +- DjVuMessageLite::perror( ERR_MSG("GThreads.uncaught") ); +-#ifdef _DEBUG +- abort(); +-#endif +- } +- G_ENDCATCH; +-#ifdef __EXCEPTIONS +- } +- catch(...) +- { +- DjVuMessageLite::perror( ERR_MSG("GThreads.unrecognized") ); +-#ifdef _DEBUG +- abort(); +-#endif +- } +-#endif +- cotask_terminate(curtask); +- GThread::yield(); +- // Do not add anything below this line! +- // Nothing should reach it anyway. +- abort(); +-} +- +-int +-GThread::create(void (*entry)(void*), void *arg) +-{ +- if (task->next || task->prev) +- return -1; +- xentry = entry; +- xarg = arg; +- task->wchan = 0; +- task->next = curtask; +- task->prev = curtask->prev; +- task->next->prev = task; +- task->prev->next = task; +- GThread::cotask *old = curtask; +- starter = this; +- mach_start(&old->regs, (void*)startone, +- task->stack, task->stack+task->stacksize); +- if (scheduling_callback) +- (*scheduling_callback)(CallbackCreate); +- return 0; +-} +- +- +-void +-GThread::terminate() +-{ +- if (task && task!=maintask) +- cotask_terminate(task); +-} +- +-int +-GThread::yield() +-{ +- return cotask_yield(); +-} +- +-int +-GThread::select(int nfds, +- fd_set *readfds, fd_set *writefds, fd_set *exceptfds, +- struct timeval *timeout) +-{ +- return cotask_select(nfds, readfds, writefds, exceptfds, timeout); +-} +- +-void +-GThread::get_select(int &nfds, fd_set *rfds, fd_set *wfds, fd_set *efds, +- unsigned long &timeout) +-{ +- cotask_get_select(nfds, rfds, wfds, efds, timeout); +-} +- +-inline void * +-GThread::current() +-{ +- if (curtask && curtask!=maintask) +- return (void*)curtask; +- return (void*)0; +-} +- +- +-// -------------------------------------- GMonitor +- +-GMonitor::GMonitor() +- : count(1), locker(0), wlock(0), wsig(0) +-{ +- locker = 0; +- ok = 1; +-} +- +-GMonitor::~GMonitor() +-{ +- ok = 0; +- cotask_wakeup((void*)&wsig, 0); +- cotask_wakeup((void*)&wlock, 0); +- cotask_yield(); +- // Because we know how the scheduler works, we know that this single call to +- // yield will run all unblocked tasks and given them the chance to leave the +- // scope of the monitor object. +-} +- +-void +-GMonitor::enter() +-{ +- void *self = GThread::current(); +- if (count>0 || self!=locker) +- { +- while (ok && count<=0) +- { +- curtask->wchan = (void*)&wlock; +- wlock++; +- cotask_yield(); +- wlock--; +- } +- count = 1; +- locker = self; +- } +- count -= 1; +-} +- +-void +-GMonitor::leave() +-{ +- void *self = GThread::current(); +- if (ok && (count>0 || self!=locker)) +- G_THROW( ERR_MSG("GThreads.not_acq_leave") ); +- if (++count > 0 && wlock > 0) +- cotask_wakeup((void*)&wlock, 1); +-} +- +-void +-GMonitor::signal() +-{ +- void *self = GThread::current(); +- if (count>0 || self!=locker) +- G_THROW( ERR_MSG("GThreads.not_acq_signal") ); +- if (wsig > 0) +- { +- cotask_wakeup((void*)&wsig, 1); +- if (scheduling_callback) +- (*scheduling_callback)(GThread::CallbackUnblock); +- } +-} +- +-void +-GMonitor::broadcast() +-{ +- void *self = GThread::current(); +- if (count>0 || self!=locker) +- G_THROW( ERR_MSG("GThreads.not_acq_broad") ); +- if (wsig > 0) +- { +- cotask_wakeup((void*)&wsig, 0); +- if (scheduling_callback) +- (*scheduling_callback)(GThread::CallbackUnblock); +- } +-} +- +-void +-GMonitor::wait() +-{ +- // Check state +- void *self = GThread::current(); +- if (count>0 || locker!=self) +- G_THROW( ERR_MSG("GThreads.not_acq_wait") ); +- // Wait +- if (ok) +- { +- // Atomically release monitor and wait +- int sav_count = count; +- count = 1; +- curtask->wchan = (void*)&wsig; +- cotask_wakeup((void*)&wlock, 1); +- wsig++; +- cotask_yield(); +- wsig--; +- // Re-acquire +- while (ok && count <= 0) +- { +- curtask->wchan = (void*)&wlock; +- wlock++; +- cotask_yield(); +- wlock--; +- } +- count = sav_count; +- locker = self; +- } +-} +- +-void +-GMonitor::wait(unsigned long timeout) +-{ +- // Check state +- void *self = GThread::current(); +- if (count>0 || locker!=self) +- G_THROW( ERR_MSG("GThreads.not_acq_wait") ); +- // Wait +- if (ok) +- { +- // Atomically release monitor and wait +- int sav_count = count; +- count = 1; +- unsigned long maxwait = time_elapsed(0) + timeout; +- curtask->maxwait = &maxwait; +- curtask->wchan = (void*)&wsig; +- cotask_wakeup((void*)&wlock, 1); +- wsig++; +- cotask_yield(); +- wsig--; +- // Re-acquire +- while (ok && count<=0) +- { +- curtask->wchan = (void*)&wlock; +- wlock++; +- cotask_yield(); +- wlock--; +- } +- count = sav_count; +- locker = self; +- } +-} +- +-#endif +- +- +- +- + // ---------------------------------------- + // GSAFEFLAGS + // ---------------------------------------- +--- djvulibre-3.5.24.orig/libdjvu/ddjvuapi.h ++++ djvulibre-3.5.24/libdjvu/ddjvuapi.h +@@ -64,6 +64,7 @@ extern "C" { + } + #endif + ++#include + #include + #include + +@@ -1618,7 +1619,7 @@ ddjvu_anno_get_metadata(miniexp_t annota + Returns zero if no such key is present. */ + + DDJVUAPI const char * +-ddjvu_anno_get_xmp(miniexp_t annotations, miniexp_t xmp); ++ddjvu_anno_get_xmp(miniexp_t annotations); + + + /* -------------------------------------------------- */ +--- djvulibre-3.5.24.orig/libdjvu/Arrays.cpp ++++ djvulibre-3.5.24/libdjvu/Arrays.cpp +@@ -239,9 +239,7 @@ ArrayRep::ins(int n, const void * what, + copy(ndata, lobound-minlo, hibound-minlo, + data, lobound-minlo, hibound-minlo); + destroy(data, lobound-minlo, hibound-minlo); +- void *tmp=data; + data=ndata; +- tmp=data; + maxhi = nmaxhi; + } + +--- djvulibre-3.5.24.orig/libdjvu/XMLParser.cpp ++++ djvulibre-3.5.24/libdjvu/XMLParser.cpp +@@ -75,6 +75,7 @@ + #include "debug.h" + #include + #include ++#include + #include + + +@@ -645,17 +646,12 @@ lt_XMLParser::Impl::parse(const lt_XMLTa + GPosition datapos=args.contains("data"); + if(datapos) + { +- bool isDjVuType=false; + GPosition typePos(args.contains("type")); + if(typePos) +- { +- if(args[typePos] != mimetype) + { +- // DjVuPrintErrorUTF8("Ignoring %s Object tag\n",mimetype); ++ if(args[typePos] != mimetype) + continue; + } +- isDjVuType=true; +- } + const GURL url = (pdjvufile) ? *pdjvufile + : GURL::UTF8(args[datapos], + (args[datapos][0] == '/') ? codebase.base() : codebase); +--- djvulibre-3.5.24.orig/libdjvu/GPixmap.cpp ++++ djvulibre-3.5.24/libdjvu/GPixmap.cpp +@@ -75,6 +75,8 @@ + #include "GThreads.h" + #include "Arrays.h" + #include "JPEGDecoder.h" ++ ++#include + #include + #include + #include +--- djvulibre-3.5.24.orig/libdjvu/DjVuAnno.cpp ++++ djvulibre-3.5.24/libdjvu/DjVuAnno.cpp +@@ -254,24 +254,24 @@ GLObject::print(ByteStream & str, int co + if (!cur_pos) { cur_pos = &local_cur_pos; } + + GUTF8String buffer; +- const char * to_print=0; + switch(type) + { + case NUMBER: +- to_print=buffer.format("%d",number); ++ buffer.format("%d",number); + break; + case STRING: +- to_print=make_c_string(string); ++ buffer = make_c_string(string); + break; + case SYMBOL: +- to_print=buffer.format("%s",(const char *)symbol); ++ buffer.format("%s",(const char *)symbol); + break; + case LIST: +- to_print=buffer.format("(%s",(const char *)name); ++ buffer.format("(%s",(const char *)name); + break; + case INVALID: + break; + } ++ const char * to_print = (const char*)buffer; + if (!compact && *cur_pos+strlen(to_print)>70) + { + char ch='\n'; +@@ -1374,7 +1374,7 @@ DjVuANT::encode_raw(void) const + } + //*** XMP Metadata + del_all_items(XMP_TAG, parser); +- if (!xmpmetadata) ++ if (!!xmpmetadata) + { + GUTF8String mdatabuffer("("); + mdatabuffer += XMP_TAG; +@@ -1384,8 +1384,10 @@ DjVuANT::encode_raw(void) const + //*** Mapareas + del_all_items(GMapArea::MAPAREA_TAG, parser); + for(GPosition pos=map_areas;pos;++pos) +- parser.parse(map_areas[pos]->print()); +- ++ { ++ GUTF8String mapareabuffer = map_areas[pos]->print(); ++ parser.parse(mapareabuffer); ++ } + GP gstr=ByteStream::create(); + ByteStream &str=*gstr; + parser.print(str, 1); +--- djvulibre-3.5.24.orig/libdjvu/DjVuGlobal.cpp ++++ djvulibre-3.5.24/libdjvu/DjVuGlobal.cpp +@@ -76,6 +76,8 @@ + #include "GThreads.h" + #include "GException.h" + #include "GContainer.h" ++ ++#include + #include + #include + #include +--- djvulibre-3.5.24.orig/libdjvu/GThreads.h ++++ djvulibre-3.5.24/libdjvu/GThreads.h +@@ -81,40 +81,12 @@ + the default when compiling under Unix. + \item[-DTHREADMODEL=WINTHREADS] Windows implementation. + This is the default when compiling under Windows. +- \item[-DTHREADMODEL=MACTHREADS] Macintosh implementation, +- which is based on the MacOS cooperative model. The current +- implementation does not yet fully support synchronization. +- This is the default when compiling under MacOS. + \item[-DTHREADMODEL=POSIXTHREADS] Posix implementation. + This implementation also supports DCE threads. The behavior of + the code is subject to the quality of the system implementation of + Posix threads. +- \item[-DTHREADMODEL=COTHREADS] Custom cooperative threads. +- These custom threads do not redefine system calls. Before executing +- a potentially blocking system function, each thread must explicitly +- check whether it is going to block and yield control explicitly if +- this is the case. This code must be compiled with a patched version +- of egcs-1.1.1 \URL{http://egcs.cygnus.com}. The patch addresses +- exception thread-safety and is provided in #"@Tools/libgcc2.c.diff"#. +- Once you get the right compiler, this implementation is remarkably +- compact and portable. A variety of processors are supported, +- including mips, intel, sparc, hppa, and alpha. +- \item[-DTHREADMODEL=JRITHREADS] Java implementation hooks. +- Multi-threading within a Netscape plugin can be tricky. A simple +- idea however consists of implementing the threading primitives in +- Java and to access them using JRI. The classes just contain a +- JRIGlobalRef. This is not a real implementation since everything +- (Java code, native functions, stubs, exception thread safety) must +- be addressed by the plugin source code. Performance may be a serious +- issue. + \end{description} + +- {\bf Portability}: The simultaneous use of threads and exceptions caused a +- lot of portability headaches under Unix. We eventually decided to +- implement the COTHREADS cooperative threads (because preemptive threads +- have more problems) and to patch EGCS in order to make exception handling +- COTHREAD-safe. +- + @memo + Portable threads + @author +@@ -133,20 +105,14 @@ + #include "GException.h" + + #define NOTHREADS 0 +-#define COTHREADS 1 +-#define JRITHREADS 2 + #define POSIXTHREADS 10 + #define WINTHREADS 11 +-#define MACTHREADS 12 + + // Known platforms + #ifndef THREADMODEL + #if defined(WIN32) + #define THREADMODEL WINTHREADS + #endif +-#if defined(macintosh) +-#define THREADMODEL MACTHREADS +-#endif + #endif + + // Exception emulation is not thread safe +@@ -183,16 +149,6 @@ + #include + #endif + +-#if THREADMODEL==JRITHREADS +-#include "jri.h" +-#endif +- +-#if THREADMODEL==COTHREADS +-#include +-#include +-#include +-#endif +- + + // ---------------------------------------- + // PORTABLE CLASSES +@@ -260,67 +216,14 @@ public: + static int yield(); + /** Returns a value which uniquely identifies the current thread. */ + static void *current(); +- + #if THREADMODEL==WINTHREADS + private: + HANDLE hthr; + DWORD thrid; +-#elif THREADMODEL==MACTHREADS +-private: +- unsigned long thid; +- static pascal void *start(void *arg); + #elif THREADMODEL==POSIXTHREADS + private: + pthread_t hthr; + static void *start(void *arg); +-#elif THREADMODEL==JRITHREADS +-private: +- JRIGlobalRef obj; +-#elif THREADMODEL==COTHREADS +- friend class GMonitor; +-public: +- class cotask; +- class cotask *task; +- /** Replaces system call #select# (COTHREADS only). The #COTHREADS# model +- does not redefine system function. System functions therefore can +- potentially block the whole process (instead of blocking the current +- thread only) because the system is not aware of the #COTHREADS# +- scheduler. The function #GThread::select# is a #COTHREADS#-aware +- replacement for the well known system function #select#. You can also +- use #GThread::select# for making sure that calls to system functions +- will not block the entire process, as demonstrated below: +- \begin{verbatim} +- int +- gthread_read(int fd, void *buffer, size_t len) +- { +- fd_set rdset; +- FD_ZERO(&rdset); +- FD_SET(fd, &rdset); +- GThread::select(fd+1, &rdset, 0, 0, 0); +- return read(fd, buffer, len); +- } +- \end{verbatim} */ +- static int select(int nfds, fd_set*, fd_set*, fd_set*, struct timeval*); +- /** Provide arguments for system call #select# (COTHREADS only). It may be +- appropriate to call the real system call #select# if the current thread +- is the only thread ready to run. Other threads however may wake up when +- certain file descriptors are ready or when a certain delay expires. +- Function #get_select# returns this information by filling the three +- usual file descriptor sets (similar to the arguments of system call +- #select#). It also returns a timeout #timeout# expressed in +- milliseconds. Note that this timeout is zero is the current thread is +- not the sole thread ready to run. */ +- static void get_select(int &nfds, fd_set*, fd_set*, fd_set*, unsigned long &timeout); +- /** Install hooks in the scheduler (COTHREADS only). The hook function +- #call# is called when a new thread is created (argument is +- #GThread::CallbackCreate#), when a thread terminates (argument is +- #GThread::CallbackTerminate#), or when thread is unblocked (argument is +- #GThread::CallbackUnblock#). This callback can be useful in certain GUI +- toolkits where the most convenient method for scheduling the threads +- consists in setting a timer event that calls \Ref{GThread::yield}. */ +- static void set_scheduling_callback(void (*call)(int)); +- enum { CallbackCreate, CallbackTerminate, CallbackUnblock }; +- + #endif + public: + // Should be considered as private +@@ -401,26 +304,12 @@ private: + CRITICAL_SECTION cs; + struct thr_waiting *head; + struct thr_waiting *tail; +-#elif THREADMODEL==MACTHREADS +- int ok; +- int count; +- unsigned long locker; +- int wlock; +- int wsig; + #elif THREADMODEL==POSIXTHREADS + int ok; + int count; + pthread_t locker; + pthread_mutex_t mutex; + pthread_cond_t cond; +-#elif THREADMODEL==COTHREADS +- int ok; +- int count; +- void *locker; +- int wlock; +- int wsig; +-#elif THREADMODEL==JRITHREADS +- JRIGlobalRef obj; + #endif + private: + // Disable default members +--- djvulibre-3.5.24.orig/libdjvu/BSByteStream.cpp ++++ djvulibre-3.5.24/libdjvu/BSByteStream.cpp +@@ -62,6 +62,7 @@ + + // - Author: Leon Bottou, 07/1998 + ++#include + #include + #include + #include +--- djvulibre-3.5.24.orig/libdjvu/DjVuGlobalMemory.cpp ++++ djvulibre-3.5.24/libdjvu/DjVuGlobalMemory.cpp +@@ -67,6 +67,8 @@ + + #include "DjVuGlobal.h" + #include "GException.h" ++ ++#include + #include + #include + #include "debug.h" +--- djvulibre-3.5.24.orig/libdjvu/JPEGDecoder.cpp ++++ djvulibre-3.5.24/libdjvu/JPEGDecoder.cpp +@@ -153,7 +153,6 @@ JPEGDecoder::decode(ByteStream & bs,GPix + + JSAMPARRAY buffer; /* Output row buffer */ + int row_stride; /* physical row width in output buffer */ +- int full_buf_size; + int isGrey,i; + + cinfo.err = jpeg_std_error(&jerr.pub); +@@ -184,7 +183,6 @@ JPEGDecoder::decode(ByteStream & bs,GPix + + /* JSAMPLEs per row in output buffer */ + row_stride = cinfo.output_width * cinfo.output_components; +- full_buf_size = row_stride * cinfo.output_height; + + /* Make a one-row-high sample array that will go away when done with image */ + buffer = (*cinfo.mem->alloc_sarray) +--- djvulibre-3.5.24.orig/libdjvu/DjVuPalette.cpp ++++ djvulibre-3.5.24/libdjvu/DjVuPalette.cpp +@@ -64,6 +64,8 @@ + #include "ByteStream.h" + #include "BSByteStream.h" + #include "DjVuPalette.h" ++ ++#include + #include + #include + +--- djvulibre-3.5.24.orig/libdjvu/DjVuMessageLite.cpp ++++ djvulibre-3.5.24/libdjvu/DjVuMessageLite.cpp +@@ -73,8 +73,8 @@ + #include "debug.h" + #include + #include ++#include + #include +-// #include + #ifdef WIN32 + #include + #include +--- djvulibre-3.5.24.orig/libdjvu/GBitmap.cpp ++++ djvulibre-3.5.24/libdjvu/GBitmap.cpp +@@ -66,6 +66,8 @@ + #include "GString.h" + #include "GThreads.h" + #include "GException.h" ++#include ++#include + #include + + // - Author: Leon Bottou, 05/1997 +--- djvulibre-3.5.24.orig/libdjvu/UnicodeByteStream.h ++++ djvulibre-3.5.24/libdjvu/UnicodeByteStream.h +@@ -88,6 +88,7 @@ + #include "GString.h" + #include "ByteStream.h" + ++#include + + #ifdef HAVE_NAMESPACES + namespace DJVU { +--- djvulibre-3.5.24.orig/libdjvu/DjVuFileCache.cpp ++++ djvulibre-3.5.24/libdjvu/DjVuFileCache.cpp +@@ -63,6 +63,7 @@ + #include "DjVuFileCache.h" + #include "debug.h" + ++#include + #include + + +--- djvulibre-3.5.24.orig/libdjvu/DjVuDocEditor.cpp ++++ djvulibre-3.5.24/libdjvu/DjVuDocEditor.cpp +@@ -555,27 +555,25 @@ DjVuDocEditor::insert_file(const GURL &f + can_compress_flag); + } + +- // Oh. It does exist... Check that it has IFF structure ++ // Oh. It does exist... Check that it has IFF structure + { +- const GP giff( +- IFFByteStream::create(file_pool->get_stream())); +- IFFByteStream &iff=*giff; +- GUTF8String chkid; +- +- int length; +- length=iff.get_chunk(chkid); +- if (chkid!="FORM:DJVI" && chkid!="FORM:DJVU" && +- chkid!="FORM:BM44" && chkid!="FORM:PM44") +- G_THROW( ERR_MSG("DjVuDocEditor.not_1_page") "\t"+file_url.get_string()); +- +- // Wonderful. It's even a DjVu file. Scan for NDIR chunks. +- // If NDIR chunk is found, ignore the file +- while(iff.get_chunk(chkid)) +- { +- if (chkid=="NDIR") +- return false; +- iff.close_chunk(); +- } ++ const GP giff( ++ IFFByteStream::create(file_pool->get_stream())); ++ IFFByteStream &iff=*giff; ++ GUTF8String chkid; ++ iff.get_chunk(chkid); ++ if (chkid!="FORM:DJVI" && chkid!="FORM:DJVU" && ++ chkid!="FORM:BM44" && chkid!="FORM:PM44") ++ G_THROW( ERR_MSG("DjVuDocEditor.not_1_page") "\t" ++ + file_url.get_string()); ++ // Wonderful. It's even a DjVu file. Scan for NDIR chunks. ++ // If NDIR chunk is found, ignore the file ++ while(iff.get_chunk(chkid)) ++ { ++ if (chkid=="NDIR") ++ return false; ++ iff.close_chunk(); ++ } + } + return insert_file(file_pool,file_url,is_page,file_pos,name2id,source); + } +--- djvulibre-3.5.24.orig/libdjvu/GString.cpp ++++ djvulibre-3.5.24/libdjvu/GString.cpp +@@ -73,6 +73,7 @@ + #include "GThreads.h" + #include "debug.h" + ++#include + #include + #include + #include +@@ -642,26 +643,22 @@ GBaseString::UTF8ToNative( + const char *source=(*this); + GP retval; + if(source && source[0]) +- { +-#if DO_CHANGELOCALE +- GUTF8String lc_ctype(setlocale(LC_CTYPE,0)); +-#endif +- bool repeat; +- for(repeat=!currentlocale;;repeat=false) + { +- retval=(*this)->toNative((GStringRep::EscapeMode)escape); + #if DO_CHANGELOCALE +- if (!repeat || retval || (lc_ctype == setlocale(LC_CTYPE,""))) ++ GUTF8String lc_ctype(setlocale(LC_CTYPE,0)); ++ bool repeat; ++ for(repeat=!currentlocale;;repeat=false) ++ { + #endif +- break; +- } ++ retval=(*this)->toNative((GStringRep::EscapeMode)escape); + #if DO_CHANGELOCALE +- if(!repeat) +- { ++ if (!repeat || retval || (lc_ctype == setlocale(LC_CTYPE,""))) ++ break; ++ } ++ if(!repeat) + setlocale(LC_CTYPE,(const char *)lc_ctype); +- } + #endif +- } ++ } + return GNativeString(retval); + } + +@@ -696,27 +693,19 @@ GBaseString::NativeToUTF8(void) const + const char *source=(*this); + #if DO_CHANGELOCALE + GUTF8String lc_ctype=setlocale(LC_CTYPE,0); +-#endif + bool repeat; + for(repeat=true;;repeat=false) +- { +- if( (retval=GStringRep::NativeToUTF8(source)) ) + { +- if(GStringRep::cmp(retval->toNative(),source)) +- { +- retval=GStringRep::UTF8::create((unsigned int)0); +- } +- } +-#if DO_CHANGELOCALE +- if(!repeat || retval || (lc_ctype == setlocale(LC_CTYPE,""))) + #endif +- break; +- } ++ if( (retval=GStringRep::NativeToUTF8(source)) ) ++ if(GStringRep::cmp(retval->toNative(),source)) ++ retval=GStringRep::UTF8::create((unsigned int)0); + #if DO_CHANGELOCALE ++ if(!repeat || retval || (lc_ctype == setlocale(LC_CTYPE,""))) ++ break; ++ } + if(!repeat) +- { + setlocale(LC_CTYPE,(const char *)lc_ctype); +- } + #endif + } + return GUTF8String(retval); +--- djvulibre-3.5.24.orig/xmltools/djvuxmlparser.cpp ++++ djvulibre-3.5.24/xmltools/djvuxmlparser.cpp +@@ -70,6 +70,7 @@ + #include + #include + #include ++#include + #include + + static void +--- djvulibre-3.5.24.orig/xmltools/djvutoxml.cpp ++++ djvulibre-3.5.24/xmltools/djvutoxml.cpp +@@ -71,6 +71,7 @@ + + #include + #include ++#include + #include + #include + #include +--- djvulibre-3.5.24.orig/desktopfiles/Makefile.in ++++ djvulibre-3.5.24/desktopfiles/Makefile.in +@@ -39,20 +39,13 @@ XDG_DESKTOP_MENU = @XDG_DESKTOP_MENU@ + RM = @RM@ + + datadir_djvu = ${datadir}/djvu/osi/desktop +-datadir_djview = ${datadir}/djvu/djview3/desktop + + + # -------- all + +-all: djvu-icons register-djvu-mime ++all: icons register-djvu-mime + +-@GUI_YES@all: djview-icons register-djview-menu +- +-icons: djvu-icons djview-icons +- +-djvu-icons: hi22-djvu.png hi32-djvu.png hi48-djvu.png hi64-djvu.png hi-djvu.svgz +- +-djview-icons: hi32-djview3.png hi64-djview3.png hi-djview3.svgz ++icons: hi22-djvu.png hi32-djvu.png hi48-djvu.png hi64-djvu.png hi-djvu.svgz + + hi22-djvu.png hi32-djvu.png hi48-djvu.png hi64-djvu.png: djvu.svg + s=`echo $@ | sed -e 's/[a-z]*\([0-9]*\).*/\1/'`; \ +@@ -60,18 +53,9 @@ hi22-djvu.png hi32-djvu.png hi48-djvu.pn + || ${CONVERT} -geometry $${s}x$${s} -depth 8 -background none $< $@ \ + || cp ${srcdir}/prebuilt-$@ $@ + +-hi32-djview3.png hi64-djview3.png: djview.svg +- s=`echo $@ | sed -e 's/[a-z]*\([0-9]*\).*/\1/'`; \ +- ${RSVG} -w $${s} -h $${s} $< $@ \ +- || ${CONVERT} -geometry $${s}x$${s} -depth 8 -background none $< $@ \ +- || cp ${srcdir}/prebuilt-$@ $@ +- + hi-djvu.svgz: djvu.svg + cat $< | gzip >$@ + +-hi-djview3.svgz: djview.svg +- cat $< | gzip >$@ +- + register-djvu-mime: register-djvu-mime.in + sed < ${srcdir}/register-djvu-mime.in > register-djvu-mime \ + -e 's,XDG_MIME,${XDG_MIME},g' \ +@@ -81,22 +65,12 @@ register-djvu-mime: register-djvu-mime.i + -e 's,MYDIR,${datadir_djvu},g' + chmod a+x register-djvu-mime + +-register-djview-menu: register-djview-menu.in +- sed < ${srcdir}/register-djview-menu.in > register-djview-menu \ +- -e 's,XDG_MIME,${XDG_MIME},g' \ +- -e 's,XDG_ICON_RESOURCE,${XDG_ICON_RESOURCE},g' \ +- -e 's,XDG_DESKTOP_MENU,${XDG_DESKTOP_MENU},g' \ +- -e 's,DATADIR,${datadir},g' \ +- -e 's,MYDIR,${datadir_djview},g' +- chmod a+x register-djview-menu + + + # -------- install + + install: install-djvu-files + +-@GUI_YES@install: install-djview-files +- + install-djvu-files: FORCE + ${INSTALL} -d ${DESTDIR}${datadir_djvu} + ${INSTALL_PROGRAM} register-djvu-mime ${DESTDIR}${datadir_djvu} +@@ -106,20 +80,10 @@ install-djvu-files: FORCE + -@echo "Run ${datadir_djvu}/register-djvu-mime install" + -@echo " to register the djvu mime types and icons." + +-install-djview-files: FORCE +- ${INSTALL} -d ${DESTDIR}${datadir_djview} +- ${INSTALL_PROGRAM} register-djview-menu ${DESTDIR}${datadir_djview} +- ${INSTALL_DATA} *djview3.png ${DESTDIR}${datadir_djview} +- ${INSTALL_DATA} *djview3.svgz ${DESTDIR}${datadir_djview} +- ${INSTALL_PROGRAM} ${srcdir}/*djview3.desktop ${DESTDIR}${datadir_djview} +- -@echo "Run ${datadir_djview}/register-djview-menu install" +- -@echo " to register the djview3 menu entries." +- +- + # -------- misc + + clean: FORCE +- -${RM} 2>/dev/null register-djvu-mime register-djview-menu *.png *.svgz ++ -${RM} 2>/dev/null register-djvu-mime *.png *.svgz + + distclean: clean + -${RM} -r 2>/dev/null Makefile *.rpo ii_files +--- djvulibre-3.5.24.orig/desktopfiles/README ++++ djvulibre-3.5.24/desktopfiles/README +@@ -25,9 +25,6 @@ There are two ways to exploit them. + + Calling "${datadir}/djvu/osi/desktop/register-djvu-mime install" + installs icons for the djvu files and registers the djvu mime type. +- Calling "${datadir}/djvu/djview3/desktop/register-djview-menu install", +- installs menu icons and menu entries for the djview3 viewer. +- + + + 2 - Install desktop files by hand. +@@ -67,13 +64,3 @@ There are two ways to exploit them. + because djvu information comes with the freedesktop.org + mime type database. + +- * Menu icons for djview3: +- - Install "hi32-djview3.png" +- as "${datadir}/icons/hicolor/32x32/apps/djvulibre-djview3.png". +- +- * Menu entries for djview3: +- - Install "djvulibre-djview3.desktop" +- as "${datadir}/applications/djvulibre-djview3.desktop". +- - Arrange to execute script "update-desktop-database". +- at installation time. +- +--- djvulibre-3.5.24.orig/share/djvu/osi/fr/messages.xml ++++ djvulibre-3.5.24/share/djvu/osi/fr/messages.xml +@@ -7,10 +7,6 @@ + + + +- +- +- +- + + + +--- djvulibre-3.5.24.orig/share/djvu/osi/de/messages.xml ++++ djvulibre-3.5.24/share/djvu/osi/de/messages.xml +@@ -7,10 +7,6 @@ + + + +- +- +- +- + + + +--- djvulibre-3.5.24.orig/share/djvu/osi/zh/messages.xml ++++ djvulibre-3.5.24/share/djvu/osi/zh/messages.xml +@@ -7,10 +7,6 @@ + + + +- +- +- +- + + + +--- djvulibre-3.5.24.orig/share/djvu/osi/cs/messages.xml ++++ djvulibre-3.5.24/share/djvu/osi/cs/messages.xml +@@ -7,10 +7,6 @@ + + + +- +- +- +- + + + +--- djvulibre-3.5.24.orig/share/djvu/osi/en/messages.xml ++++ djvulibre-3.5.24/share/djvu/osi/en/messages.xml +@@ -7,10 +7,6 @@ + + + +- +- +- +- + + + +--- djvulibre-3.5.24.orig/share/djvu/osi/ja/messages.xml ++++ djvulibre-3.5.24/share/djvu/osi/ja/messages.xml +@@ -7,10 +7,6 @@ + + + +- +- +- +- + + + diff -Nru djvulibre-3.5.24/debian/patches/debian-changes-3.5.24-8 djvulibre-3.5.24/debian/patches/debian-changes-3.5.24-8 --- djvulibre-3.5.24/debian/patches/debian-changes-3.5.24-8 2011-06-22 10:49:43.000000000 +0000 +++ djvulibre-3.5.24/debian/patches/debian-changes-3.5.24-8 1970-01-01 00:00:00.000000000 +0000 @@ -1,7323 +0,0 @@ -Description: Upstream changes introduced in version 3.5.24-8 - This patch has been created by dpkg-source during the package build. - Here's the last changelog entry, hopefully it gives details on why - those changes were made: - . - djvulibre (3.5.24-8) unstable; urgency=low - . - * ddjvu_anno_get_xmp consistent prototype vs implementation (closes: #613547) - . - The person named in the Author field signed this changelog entry. -Author: Barak A. Pearlmutter -Bug-Debian: http://bugs.debian.org/613547 - ---- -The information above should follow the Patch Tagging Guidelines, please -checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here -are templates for supplementary fields that you might want to add: - -Origin: , -Bug: -Bug-Debian: http://bugs.debian.org/ -Bug-Ubuntu: https://launchpad.net/bugs/ -Forwarded: -Reviewed-By: -Last-Update: - ---- djvulibre-3.5.24.orig/configure.ac -+++ djvulibre-3.5.24/configure.ac -@@ -208,7 +208,6 @@ AC_PATH_THREADS(, - # What to compile - # ---------------------------------------- - -- - # Check compilation of xmltools - ac_enable_xmltools=yes - AC_ARG_ENABLE(xmltools, -@@ -224,96 +223,6 @@ fi - AC_SUBST(XML_YES) - AC_SUBST(XML_NO) - -- --# Check compilation of djview --AC_ARG_ENABLE(djview, -- AS_HELP_STRING([--enable-djview],[Enable the compilation of djview3.]), -- [ac_enable_djview=$enableval], -- [ac_enable_djview=no] ) --if test x$ac_enable_djview != xno ; then -- AC_MSG_WARN([Enabling compilation of djview3. ---------------------------------------------------------- --*** The Qt2 or Qt3 based viewer, djview3, is considered obsolete. --*** The recommended viewer is now the Qt4 based viewer, djview4. --*** Djview4 comes in a separate source package that should be --*** compiled after installing the djvulibre library. ----------------------------------------------------------]) -- # Search QT library -- AC_PATH_QT(, -- [ no_qt=yes -- AC_MSG_WARN([Qt3 support is disabled]) ]) -- -- # Search X11 and Xt headers -- if test "$no_x" != "yes" ; then -- savedCFLAGS="$CFLAGS" -- CFLAGS="$CFLAGS ${X_CFLAGS}" -- AC_CHECK_HEADERS(X11/extensions/Xext.h,,,[include ]) -- AC_CHECK_HEADER(X11/Shell.h, [], [no_xt=yes]) -- AC_CHECK_HEADER(X11/IntrinsicP.h, [], [no_xt=yes]) -- CFLAGS="$savedCFLAGS" -- if test "$no_xt" = "yes" ; then -- AC_MSG_WARN([Xt include files not found]) -- else -- AC_DEFINE(HAVE_XT,1,[Define if you have the Xt include files.]) -- fi -- fi -- -- if test x$no_threads = xyes || test x$no_qt = xyes || test x$no_xt = xyes -- then -- AC_MSG_WARN([Disabling compilation of djview. ---------------------------------------------------------- --*** The GUI portion of this package will not be compiled. --*** This is probably not what you want. Chech the output --*** of configure for warning messages. Read file INSTALL. --*** Investigate options --with-qt and --enable-threads. --*** Make sure the Xt include files are present. ----------------------------------------------------------]) -- ac_enable_djview=no; -- fi --fi --if test x$ac_enable_djview != xno ; then -- GUI_YES='' -- GUI_NO='#' --else -- GUI_YES='#' -- GUI_NO='' --fi --AC_SUBST(GUI_YES) --AC_SUBST(GUI_NO) -- -- --# Check compilation of i18n files. --AC_ARG_ENABLE(i18n, -- AS_HELP_STRING([--disable-i18n],[Do not prepare the localization files.]), -- [ac_enable_i18n=$enableval], -- [ac_enable_i18n=all] ) --if test "$ac_enable_i18n" != xno ; then -- I18N_YES='' -- I18N_NO='#' -- LINGUAS= -- if test "$ac_enable_i18n" = all ; then -- for n in $srcdir/i18n/* ; do -- if test -r $n/Makefile.in ; then -- LINGUAS="$LINGUAS `basename $n`" -- fi -- done -- else -- for n in $ac_enable_i18n ; do -- if test -r $srcdir/i18n/$n/Makefile.in ; then -- LINGUAS="$LINGUAS $n" -- fi -- done -- fi --else -- I18N_YES='#' -- I18N_NO='' --fi --AC_SUBST(LINGUAS) --AC_SUBST(I18N_YES) --AC_SUBST(I18N_NO) -- -- -- - # ---------------------------------------- - # Desktop files - # ---------------------------------------- -@@ -353,151 +262,6 @@ fi - AC_SUBST(DESKTOP_YES) - AC_SUBST(DESKTOP_NO) - -- --# ---------------------------------------- --# Flags for NSDEJAVU.SO --# ---------------------------------------- -- --NSDEJAVU_CFLAGS= --NSDEJAVU_LIBS= --if test x$ac_enable_djview != xno --then -- AC_PATH_GLIB -- NSDEJAVU_CFLAGS=${X_CFLAGS} -- case "$host" in -- *-cygwin* | *-mingw*) -- NSDEJAVU_LIBS="`echo ${X_LIBS} | sed -e 's/-lXext/-lXt -lXext/'`" -- NSDEJAVU_LIBS="-no-undefined $NSDEJAVU_LIBS" -- ;; -- esac --fi --AC_SUBST(NSDEJAVU_CFLAGS) --AC_SUBST(NSDEJAVU_LIBS) -- --# ----------- --# How to install shared libraries --if test -z "$INSTALL_SHLIB" ; then -- INSTALL_SHLIB="${INSTALL_DATA}" -- case "$host" in -- *-cygwin* | *-mingw*) -- INSTALL_SHLIB="cp" -- ;; -- esac --fi --AC_SUBST(INSTALL_SHLIB) -- -- -- --# ---------------------------------------- --# Compiler version check --# ---------------------------------------- -- --# Work around broken compilers with the famous LPR0 bug --if test x$ac_shared_libdjvu != xno && test x$GXX = xyes; then -- AC_MSG_CHECKING([if $CXX has the LPR0 bug]) -- echo 'extern "C"{inline int sqr(int x)throw(){return x*x;}}int main(){}' \ -- > conftest.cc -- if ${CXX} -fPIC ${OPTS} conftest.cc -o conftest \ -- > /dev/null 2> /dev/null ; then -- AC_MSG_RESULT([no]) -- else -- AC_MSG_RESULT([yes]) -- OPTS=`echo $OPTS | sed -e 's/-mcpu=i686/-mpentium/'` -- fi --fi -- --# What compiler are we using ? --if test x$GXX != xyes ; then -- AC_MSG_WARN([The recommended c++ compiler is g++.]) -- if test $ac_cv_cxx_exceptions = no ; then -- AC_MSG_ERROR([Exception support in c++ compiler is mandatory.]) -- fi --else -- AC_MSG_CHECKING([g++ version]) --changequote(<<, >>)dnl -- cxxver="`$CXX --version | head -1 | -- sed -e 's/^.*[^0-9.]\([2-4]\.[0-9.]*\).*$/\1/'`" --changequote([, ])dnl -- AC_MSG_RESULT($cxxver) -- action=none -- case "$cxxver" in --changequote(<<, >>)dnl -- 1.*) action=error ;; -- 2.[0-8]*) action=error ;; -- 2.90*) action=error ;; -- 2.91.[6-9]*) ;; -- 2.91*) action=warn2 ;; -- 2.96*) action=redhat ;; -- 2.9*) ;; -- 3.0) action=warn3 ;; --changequote([, ])dnl -- esac -- case $action in -- error) -- AC_MSG_ERROR([Your c++ compiler ($cxxver) is outdated.]) -- ;; -- warn2) -- AC_MSG_WARN([Your c++ compiler ($cxxver) has known problems. --------------------------------------------- --*** Please upgrade to gcc-2.95.3 or better. ---------------------------------------------]) -- ;; -- warn3) -- AC_MSG_WARN([Your c++ compiler ($cxxver) has known problems. --------------------------------------------- --*** Please upgrade to gcc-3.0.2 or better. ---------------------------------------------]) -- ;; -- redhat) -- # Check for infamous early 2.96 compiler -- for n in `g++ -v 2>&1 | grep version` ; do rhversion=$n ; done -- case "$rhversion" in --changequote(<<, >>)dnl -- 2.96-1[0-9][0-9]*) ;; -- 2.96-8[5-9]*) ;; -- 2.96-9*) ;; -- *) --changequote([, ])dnl -- AC_MSG_WARN([Your c++ compiler ($cxxver) has known problems. --------------------------------------------------------- --*** You have an early version of the gcc-2.96 compiler. --*** The good news is that the new version works nicely. --*** Check . --*** Please upgrade. ---------------------------------------------------------]) -- ;; -- esac -- esac -- # Do we want the pragmas interface/implementation -- case "$cxxver" in --changequote(<<, >>)dnl -- 2*) cxxpragmas=yes ;; -- 3.0*) cxxpragmas=yes ;; -- *) cxxpragmas=no ;; --changequote([, ])dnl -- esac -- if test x$cxxpragmas = xyes ; then -- AC_DEFINE(NEED_GNUG_PRAGMAS,1, -- [Define to use g++ pragmas interface/implementation]) -- fi --fi -- -- -- --# ---------------------------------------- --# Qt version check --# ---------------------------------------- -- --# What version of QT are we using --if test x${qt_version+set} = xset ; then -- if test "$qt_version" -lt 200 ; then -- AC_MSG_ERROR([We no longer support Qt-1x.]) -- elif test "$qt_version" -lt 220 ; then -- AC_MSG_WARN([We suggest using QT-2.2.0 or better.]) -- fi --fi -- -- - # ---------------------------------------- - # End - # ---------------------------------------- -@@ -513,15 +277,6 @@ AC_CONFIG_FILES(libdjvu/ddjvuapi.pc) - AC_CONFIG_FILES(tools/Makefile) - AC_CONFIG_FILES(tools/jb2cmp/Makefile) - AC_CONFIG_FILES(xmltools/Makefile) --AC_CONFIG_FILES(gui/Makefile) --AC_CONFIG_FILES(gui/bin2cpp/Makefile) --AC_CONFIG_FILES(gui/djview/Makefile) --AC_CONFIG_FILES(gui/nsdejavu/Makefile) --AC_CONFIG_FILES(i18n/Makefile) --AC_CONFIG_FILES(i18n/ja/Makefile) --AC_CONFIG_FILES(i18n/de/Makefile) --AC_CONFIG_FILES(i18n/fr/Makefile) --AC_CONFIG_FILES(i18n/cs/Makefile) - AC_CONFIG_FILES(desktopfiles/Makefile) - - # Go -@@ -595,13 +350,6 @@ AH_BOTTOM([ - #define GCONTAINER_NO_TYPENAME 1 - #endif - --/* - COTHREAD */ --#ifdef HAVE_COTHREAD --#ifndef HAVE_COTHREAD_PATCH --#define NO_LIBGCC_HOOKS 1 --#endif --#endif -- - /* - JPEG */ - #ifdef HAVE_JPEG - #define NEED_JPEG_DECODER 1 -@@ -614,24 +362,6 @@ AH_BOTTOM([ - #define HAS_MEMMAP 0 - #endif - --/* - QT */ --#ifdef HAVE_QT --#if HAVE_QT < 200 --#define QT1 --#elif HAVE_QT < 300 --#define QT2 --#else --#define QT3 --#endif --#endif -- --/* - X STUFF */ --#ifdef HAVE_SYS_IPC_H --#ifdef HAVE_SYS_SHM_H --#define USE_XSHM 1 --#endif --#endif -- - /* config.h: end */ - #endif - ]) ---- djvulibre-3.5.24.orig/README -+++ djvulibre-3.5.24/README -@@ -52,33 +52,17 @@ GNU GPL in October 2000. DjVuLibre (pron - libre"), is an enhanced version of that code maintained by the original - inventors of DjVu. It is compatible with LizardTech's DjVu software v3.5. - --DjVuLibre includes: -- --- A standalone DjVu viewer for Unix under X11 (based on the Qt library). -- --- A browser plugin that works with most Unix browsers, including: -- Netscape-4.x, Netscape-6.x, Mozilla, Galeon, Konqueror, and Opera. -+This package includes: - -+- An up-to-date version of the C++ DjVu Reference Library - - A full-fledged wavelet-based compressor for pictures. -- - - A simple compressor for bitonal (black and white) scanned pages. -- - - A compressor for palettized images (a la GIF). -- --- A full set of utilities to manipulate and -- assemble DjVu images and documents. -- -+- A full set of utilities to manipulate and assemble DjVu images and documents. - - A set of decoders to convert DjVu to a number of other formats. - --- An up-to-date version of the C++ DjVu Reference Library -- --Windows and Mac versions of the viewer/plug-in, as well as commercial versions --of the compressors and OCR engines are available from LizardTech Inc.. The --compressors provided here are slower, produce larger files, and sometimes --lower quality images than the commercial compressors, but they do the job. -- --A variety of free web-based conversion services are also available, including --any2djvu.djvuzone.org, bib2web.djvuzone.org, and openlib.djvuzone.org. -+The full-fledged DjVu file viewer and browser plugin DjView4 -+is available as a separate package. - - - ---- djvulibre-3.5.24.orig/djvulibre.spec -+++ djvulibre-3.5.24/djvulibre.spec -@@ -35,14 +35,12 @@ version of that code maintained by the o - compatible with version 3.5 of the LizardTech DjVu software suite. - - DjVulibre-3.5 contains: --- a standalone DjVu viewer based on the Qt library. --- A browser plugin that works with most Unix browsers. -+- An up-to-date version of the C++ DjVu Reference Library. - - A full-fledged wavelet-based compressor for pictures. - - A simple compressor for bitonal (black and white) scanned pages. - - A compressor for palettized images (a la GIF/PNG). - - A set of utilities to manipulate and assemble DjVu images and documents. - - A set of decoders to convert DjVu to a number of other formats. --- An up-to-date version of the C++ DjVu Reference Library. - - %prep - %setup -q ---- djvulibre-3.5.24.orig/configure -+++ djvulibre-3.5.24/configure -@@ -1,11 +1,11 @@ - #! /bin/sh - # Guess values for system-dependent variables and create Makefiles. --# Generated by GNU Autoconf 2.65 for djvulibre 3.5.24. -+# Generated by GNU Autoconf 2.67 for djvulibre 3.5.24. - # - # - # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, --# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, --# Inc. -+# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software -+# Foundation, Inc. - # - # - # This configure script is free software; the Free Software Foundation -@@ -316,7 +316,7 @@ $as_echo X"$as_dir" | - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" -- } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" -+ } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" - - - } # as_fn_mkdir_p -@@ -356,19 +356,19 @@ else - fi # as_fn_arith - - --# as_fn_error ERROR [LINENO LOG_FD] --# --------------------------------- -+# as_fn_error STATUS ERROR [LINENO LOG_FD] -+# ---------------------------------------- - # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are - # provided, also output the error to LOG_FD, referencing LINENO. Then exit the --# script with status $?, using 1 if that was 0. -+# script with STATUS, using 1 if that was 0. - as_fn_error () - { -- as_status=$?; test $as_status -eq 0 && as_status=1 -- if test "$3"; then -- as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack -- $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 -+ as_status=$1; test $as_status -eq 0 && as_status=1 -+ if test "$4"; then -+ as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack -+ $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 - fi -- $as_echo "$as_me: error: $1" >&2 -+ $as_echo "$as_me: error: $2" >&2 - as_fn_exit $as_status - } # as_fn_error - -@@ -679,7 +679,7 @@ test -n "$DJDIR" || exec 7<&0 &1 - - # Name of the host. --# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, -+# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, - # so uname gets run too. - ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` - -@@ -744,35 +744,11 @@ ac_includes_default="\ - ac_header_list= - ac_subst_vars='LTLIBOBJS - LIBOBJS --INSTALL_SHLIB --NSDEJAVU_LIBS --NSDEJAVU_CFLAGS --GLIB_CFLAGS --GLIB_LIBS --PKG_CONFIG_PATH --PKG_CONFIG - DESKTOP_NO - DESKTOP_YES - XDG_DESKTOP_MENU - XDG_ICON_RESOURCE - XDG_MIME --I18N_NO --I18N_YES --LINGUAS --GUI_NO --GUI_YES --LRELEASE --LUPDATE --UIC --MOC --QT_LIBS --QT_CFLAGS --QTDIR --X_EXTRA_LIBS --X_LIBS --X_PRE_LIBS --X_CFLAGS --XMKMF - XML_NO - XML_YES - THREAD_CFLAGS -@@ -895,10 +871,6 @@ with_jpeg - with_tiff - enable_threads - enable_xmltools --enable_djview --with_x --with_qt --enable_i18n - enable_desktopfiles - ' - ac_precious_vars='build_alias -@@ -919,17 +891,7 @@ JPEG_CFLAGS - TIFF_LIBS - TIFF_CFLAGS - PTHREAD_LIBS --PTHREAD_CFLAGS --XMKMF --QTDIR --QT_CFLAGS --QT_LIBS --MOC --UIC --PKG_CONFIG --PKG_CONFIG_PATH --GLIB_LIBS --GLIB_CFLAGS' -+PTHREAD_CFLAGS' - - - # Initialize some variables set by options. -@@ -992,8 +954,9 @@ do - fi - - case $ac_option in -- *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; -- *) ac_optarg=yes ;; -+ *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; -+ *=) ac_optarg= ;; -+ *) ac_optarg=yes ;; - esac - - # Accept the important Cygnus configure options, so we can diagnose typos. -@@ -1038,7 +1001,7 @@ do - ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && -- as_fn_error "invalid feature name: $ac_useropt" -+ as_fn_error $? "invalid feature name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in -@@ -1064,7 +1027,7 @@ do - ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && -- as_fn_error "invalid feature name: $ac_useropt" -+ as_fn_error $? "invalid feature name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in -@@ -1268,7 +1231,7 @@ do - ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && -- as_fn_error "invalid package name: $ac_useropt" -+ as_fn_error $? "invalid package name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in -@@ -1284,7 +1247,7 @@ do - ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && -- as_fn_error "invalid package name: $ac_useropt" -+ as_fn_error $? "invalid package name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in -@@ -1314,8 +1277,8 @@ do - | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) - x_libraries=$ac_optarg ;; - -- -*) as_fn_error "unrecognized option: \`$ac_option' --Try \`$0 --help' for more information." -+ -*) as_fn_error $? "unrecognized option: \`$ac_option' -+Try \`$0 --help' for more information" - ;; - - *=*) -@@ -1323,7 +1286,7 @@ Try \`$0 --help' for more information." - # Reject names that are not valid shell variable names. - case $ac_envvar in #( - '' | [0-9]* | *[!_$as_cr_alnum]* ) -- as_fn_error "invalid variable name: \`$ac_envvar'" ;; -+ as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; - esac - eval $ac_envvar=\$ac_optarg - export $ac_envvar ;; -@@ -1341,13 +1304,13 @@ done - - if test -n "$ac_prev"; then - ac_option=--`echo $ac_prev | sed 's/_/-/g'` -- as_fn_error "missing argument to $ac_option" -+ as_fn_error $? "missing argument to $ac_option" - fi - - if test -n "$ac_unrecognized_opts"; then - case $enable_option_checking in - no) ;; -- fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;; -+ fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; - *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; - esac - fi -@@ -1370,7 +1333,7 @@ do - [\\/$]* | ?:[\\/]* ) continue;; - NONE | '' ) case $ac_var in *prefix ) continue;; esac;; - esac -- as_fn_error "expected an absolute directory name for --$ac_var: $ac_val" -+ as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" - done - - # There might be people who depend on the old broken behavior: `$host' -@@ -1384,8 +1347,8 @@ target=$target_alias - if test "x$host_alias" != x; then - if test "x$build_alias" = x; then - cross_compiling=maybe -- $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. -- If a cross compiler is detected then cross compile mode will be used." >&2 -+ $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. -+ If a cross compiler is detected then cross compile mode will be used" >&2 - elif test "x$build_alias" != "x$host_alias"; then - cross_compiling=yes - fi -@@ -1400,9 +1363,9 @@ test "$silent" = yes && exec 6>/dev/null - ac_pwd=`pwd` && test -n "$ac_pwd" && - ac_ls_di=`ls -di .` && - ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || -- as_fn_error "working directory cannot be determined" -+ as_fn_error $? "working directory cannot be determined" - test "X$ac_ls_di" = "X$ac_pwd_ls_di" || -- as_fn_error "pwd does not report name of working directory" -+ as_fn_error $? "pwd does not report name of working directory" - - - # Find the source files, if location was not specified. -@@ -1441,11 +1404,11 @@ else - fi - if test ! -r "$srcdir/$ac_unique_file"; then - test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." -- as_fn_error "cannot find sources ($ac_unique_file) in $srcdir" -+ as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" - fi - ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" - ac_abs_confdir=`( -- cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg" -+ cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" - pwd)` - # When building in place, set srcdir=. - if test "$ac_abs_confdir" = "$ac_pwd"; then -@@ -1485,7 +1448,7 @@ Configuration: - --help=short display options specific to this package - --help=recursive display the short help of all the included packages - -V, --version display version information and exit -- -q, --quiet, --silent do not print \`checking...' messages -+ -q, --quiet, --silent do not print \`checking ...' messages - --cache-file=FILE cache test results in FILE [disabled] - -C, --config-cache alias for \`--cache-file=config.cache' - -n, --no-create do not create output files -@@ -1528,10 +1491,6 @@ _ACEOF - - cat <<\_ACEOF - --X features: -- --x-includes=DIR X include files are in DIR -- --x-libraries=DIR X library files are in DIR -- - System types: - --build=BUILD configure for building on BUILD [guessed] - --host=HOST cross-compile to build programs to run on HOST [BUILD] -@@ -1558,8 +1517,6 @@ Optional Features: - --disable-largefile omit support for large files - --enable-threads select threading model (default is auto) - --disable-xmltools Do not compile the djvu xml tools. -- --enable-djview Enable the compilation of djview3. -- --disable-i18n Do not prepare the localization files. - --disable-desktopfiles Do not install scripts to register icons and menus. - - Optional Packages: -@@ -1574,8 +1531,6 @@ Optional Packages: - --with-gnu-ld assume the C compiler uses GNU ld [default=no] - --with-jpeg=DIR where the IJG jpeg library is located - --with-tiff=DIR where libtiff is located -- --with-x use the X Window System -- --with-qt=DIR where the Qt3 root is installed. - - Some influential environment variables: - CC C compiler command -@@ -1597,17 +1552,6 @@ Some influential environment variables: - Flags for linking pthread programs. - PTHREAD_CFLAGS - Flags for compiling pthread programs. -- XMKMF Path to xmkmf, Makefile generator for X Window System -- QTDIR Location of the Qt3 package. -- QT_CFLAGS Flags for compiling Qt3 programs. -- QT_LIBS Flags for linking Qt3 programs. -- MOC Location of the MOC program. -- UIC Location of the UIC program. -- PKG_CONFIG Location of the pkg-config program. -- PKG_CONFIG_PATH -- Path for pkg-config descriptors. -- GLIB_LIBS Libraries for glib-2.0 -- GLIB_CFLAGS Compilation flags for glib-2.0 - - Use these variables to override the choices made by `configure' or to help - it to find libraries and programs with nonstandard names/locations. -@@ -1676,9 +1620,9 @@ test -n "$ac_init_help" && exit $ac_stat - if $ac_init_version; then - cat <<\_ACEOF - djvulibre configure 3.5.24 --generated by GNU Autoconf 2.65 -+generated by GNU Autoconf 2.67 - --Copyright (C) 2009 Free Software Foundation, Inc. -+Copyright (C) 2010 Free Software Foundation, Inc. - This configure script is free software; the Free Software Foundation - gives unlimited permission to copy, distribute and modify it. - _ACEOF -@@ -1782,7 +1726,7 @@ ac_fn_c_check_header_compile () - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 - $as_echo_n "checking for $2... " >&6; } --if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : -+if eval "test \"\${$3+set}\"" = set; then : - $as_echo_n "(cached) " >&6 - else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -@@ -1825,7 +1769,7 @@ $as_echo "$ac_try_echo"; } >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 -- test $ac_status = 0; } >/dev/null && { -+ test $ac_status = 0; } > conftest.i && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then : -@@ -1891,7 +1835,7 @@ ac_fn_c_check_func () - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 - $as_echo_n "checking for $2... " >&6; } --if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : -+if eval "test \"\${$3+set}\"" = set; then : - $as_echo_n "(cached) " >&6 - else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -@@ -2009,7 +1953,7 @@ $as_echo "$ac_try_echo"; } >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 -- test $ac_status = 0; } >/dev/null && { -+ test $ac_status = 0; } > conftest.i && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.err - }; then : -@@ -2121,10 +2065,10 @@ fi - ac_fn_cxx_check_header_mongrel () - { - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack -- if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : -+ if eval "test \"\${$3+set}\"" = set; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 - $as_echo_n "checking for $2... " >&6; } --if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : -+if eval "test \"\${$3+set}\"" = set; then : - $as_echo_n "(cached) " >&6 - fi - eval ac_res=\$$3 -@@ -2160,7 +2104,7 @@ if ac_fn_cxx_try_cpp "$LINENO"; then : - else - ac_header_preproc=no - fi --rm -f conftest.err conftest.$ac_ext -+rm -f conftest.err conftest.i conftest.$ac_ext - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 - $as_echo "$ac_header_preproc" >&6; } - -@@ -2187,7 +2131,7 @@ $as_echo "$as_me: WARNING: $2: proceedin - esac - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 - $as_echo_n "checking for $2... " >&6; } --if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : -+if eval "test \"\${$3+set}\"" = set; then : - $as_echo_n "(cached) " >&6 - else - eval "$3=\$ac_header_compiler" -@@ -2209,7 +2153,7 @@ ac_fn_c_find_intX_t () - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5 - $as_echo_n "checking for int$2_t... " >&6; } --if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : -+if eval "test \"\${$3+set}\"" = set; then : - $as_echo_n "(cached) " >&6 - else - eval "$3=no" -@@ -2260,8 +2204,7 @@ fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -- eval as_val=\$$3 -- if test "x$as_val" = x""no; then : -+ if eval test \"x\$"$3"\" = x"no"; then : - - else - break -@@ -2284,7 +2227,7 @@ ac_fn_c_find_uintX_t () - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5 - $as_echo_n "checking for uint$2_t... " >&6; } --if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : -+if eval "test \"\${$3+set}\"" = set; then : - $as_echo_n "(cached) " >&6 - else - eval "$3=no" -@@ -2314,8 +2257,7 @@ if ac_fn_cxx_try_compile "$LINENO"; then - esac - fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -- eval as_val=\$$3 -- if test "x$as_val" = x""no; then : -+ if eval test \"x\$"$3"\" = x"no"; then : - - else - break -@@ -2338,7 +2280,7 @@ ac_fn_cxx_check_type () - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 - $as_echo_n "checking for $2... " >&6; } --if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : -+if eval "test \"\${$3+set}\"" = set; then : - $as_echo_n "(cached) " >&6 - else - eval "$3=no" -@@ -2392,7 +2334,7 @@ ac_fn_cxx_check_header_compile () - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 - $as_echo_n "checking for $2... " >&6; } --if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : -+if eval "test \"\${$3+set}\"" = set; then : - $as_echo_n "(cached) " >&6 - else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -@@ -2422,7 +2364,7 @@ ac_fn_cxx_check_func () - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 - $as_echo_n "checking for $2... " >&6; } --if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : -+if eval "test \"\${$3+set}\"" = set; then : - $as_echo_n "(cached) " >&6 - else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -@@ -2485,7 +2427,7 @@ This file contains any messages produced - running configure, to aid debugging if configure makes a mistake. - - It was created by djvulibre $as_me 3.5.24, which was --generated by GNU Autoconf 2.65. Invocation command line was -+generated by GNU Autoconf 2.67. Invocation command line was - - $ $0 $@ - -@@ -2595,11 +2537,9 @@ trap 'exit_status=$? - { - echo - -- cat <<\_ASBOX --## ---------------- ## -+ $as_echo "## ---------------- ## - ## Cache variables. ## --## ---------------- ## --_ASBOX -+## ---------------- ##" - echo - # The following way of writing the cache mishandles newlines in values, - ( -@@ -2633,11 +2573,9 @@ $as_echo "$as_me: WARNING: cache variabl - ) - echo - -- cat <<\_ASBOX --## ----------------- ## -+ $as_echo "## ----------------- ## - ## Output variables. ## --## ----------------- ## --_ASBOX -+## ----------------- ##" - echo - for ac_var in $ac_subst_vars - do -@@ -2650,11 +2588,9 @@ _ASBOX - echo - - if test -n "$ac_subst_files"; then -- cat <<\_ASBOX --## ------------------- ## -+ $as_echo "## ------------------- ## - ## File substitutions. ## --## ------------------- ## --_ASBOX -+## ------------------- ##" - echo - for ac_var in $ac_subst_files - do -@@ -2668,11 +2604,9 @@ _ASBOX - fi - - if test -s confdefs.h; then -- cat <<\_ASBOX --## ----------- ## -+ $as_echo "## ----------- ## - ## confdefs.h. ## --## ----------- ## --_ASBOX -+## ----------- ##" - echo - cat confdefs.h - echo -@@ -2727,7 +2661,12 @@ _ACEOF - ac_site_file1=NONE - ac_site_file2=NONE - if test -n "$CONFIG_SITE"; then -- ac_site_file1=$CONFIG_SITE -+ # We do not want a PATH search for config.site. -+ case $CONFIG_SITE in #(( -+ -*) ac_site_file1=./$CONFIG_SITE;; -+ */*) ac_site_file1=$CONFIG_SITE;; -+ *) ac_site_file1=./$CONFIG_SITE;; -+ esac - elif test "x$prefix" != xNONE; then - ac_site_file1=$prefix/share/config.site - ac_site_file2=$prefix/etc/config.site -@@ -2742,7 +2681,11 @@ do - { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 - $as_echo "$as_me: loading site script $ac_site_file" >&6;} - sed 's/^/| /' "$ac_site_file" >&5 -- . "$ac_site_file" -+ . "$ac_site_file" \ -+ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -+as_fn_error $? "failed to load site script $ac_site_file -+See \`config.log' for more details" "$LINENO" 5 ; } - fi - done - -@@ -2821,7 +2764,7 @@ if $ac_cache_corrupted; then - $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 - $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} -- as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 -+ as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 - fi - ## -------------------- ## - ## Main body of script. ## -@@ -2836,16 +2779,22 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu - - ac_aux_dir= - for ac_dir in config "$srcdir"/config; do -- for ac_t in install-sh install.sh shtool; do -- if test -f "$ac_dir/$ac_t"; then -- ac_aux_dir=$ac_dir -- ac_install_sh="$ac_aux_dir/$ac_t -c" -- break 2 -- fi -- done -+ if test -f "$ac_dir/install-sh"; then -+ ac_aux_dir=$ac_dir -+ ac_install_sh="$ac_aux_dir/install-sh -c" -+ break -+ elif test -f "$ac_dir/install.sh"; then -+ ac_aux_dir=$ac_dir -+ ac_install_sh="$ac_aux_dir/install.sh -c" -+ break -+ elif test -f "$ac_dir/shtool"; then -+ ac_aux_dir=$ac_dir -+ ac_install_sh="$ac_aux_dir/shtool install -c" -+ break -+ fi - done - if test -z "$ac_aux_dir"; then -- as_fn_error "cannot find install-sh, install.sh, or shtool in config \"$srcdir\"/config" "$LINENO" 5 -+ as_fn_error $? "cannot find install-sh, install.sh, or shtool in config \"$srcdir\"/config" "$LINENO" 5 - fi - - # These three variables are undocumented and unsupported, -@@ -2864,7 +2813,7 @@ ac_config_headers="$ac_config_headers co - - # Make sure we can run config.sub. - $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || -- as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 -+ as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 - $as_echo_n "checking build system type... " >&6; } -@@ -2875,16 +2824,16 @@ else - test "x$ac_build_alias" = x && - ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` - test "x$ac_build_alias" = x && -- as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5 -+ as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 - ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || -- as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 -+ as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 - - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 - $as_echo "$ac_cv_build" >&6; } - case $ac_cv_build in - *-*-*) ;; --*) as_fn_error "invalid value of canonical build" "$LINENO" 5;; -+*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5 ;; - esac - build=$ac_cv_build - ac_save_IFS=$IFS; IFS='-' -@@ -2909,7 +2858,7 @@ else - ac_cv_host=$ac_cv_build - else - ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || -- as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 -+ as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 - fi - - fi -@@ -2917,7 +2866,7 @@ fi - $as_echo "$ac_cv_host" >&6; } - case $ac_cv_host in - *-*-*) ;; --*) as_fn_error "invalid value of canonical host" "$LINENO" 5;; -+*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5 ;; - esac - host=$ac_cv_host - ac_save_IFS=$IFS; IFS='-' -@@ -2947,7 +2896,7 @@ if test "${with_extra_includes+set}" = s - withval=$with_extra_includes; if test -d "$withval" ; then - CPPFLAGS="$CPPFLAGS -I$withval" - else -- as_fn_error "Cannot stat directory $withval" "$LINENO" 5 -+ as_fn_error $? "Cannot stat directory $withval" "$LINENO" 5 - fi - fi - -@@ -2958,7 +2907,7 @@ if test "${with_extra_libraries+set}" = - withval=$with_extra_libraries; if test -d "$withval" ; then - LDFLAGS="$LDFLAGS -L$withval" - else -- as_fn_error "Cannot stat directory $withval" "$LINENO" 5 -+ as_fn_error $? "Cannot stat directory $withval" "$LINENO" 5 - fi - fi - -@@ -3004,7 +2953,7 @@ esac - $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } - set x ${MAKE-make} - ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` --if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then : -+if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\"" = set; then : - $as_echo_n "(cached) " >&6 - else - cat >conftest.make <<\_ACEOF -@@ -3012,7 +2961,7 @@ SHELL = /bin/sh - all: - @echo '@@@%%%=$(MAKE)=@@@%%%' - _ACEOF --# GNU make sometimes prints "make[1]: Entering...", which would confuse us. -+# GNU make sometimes prints "make[1]: Entering ...", which would confuse us. - case `${MAKE-make} -f conftest.make 2>/dev/null` in - *@@@%%%=?*=@@@%%%*) - eval ac_cv_prog_make_${ac_make}_set=yes;; -@@ -3832,8 +3781,8 @@ fi - - test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 - $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} --as_fn_error "no acceptable C compiler found in \$PATH --See \`config.log' for more details." "$LINENO" 5; } -+as_fn_error $? "no acceptable C compiler found in \$PATH -+See \`config.log' for more details" "$LINENO" 5 ; } - - # Provide some information about the compiler. - $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 -@@ -3947,9 +3896,8 @@ sed 's/^/| /' conftest.$ac_ext >&5 - - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 - $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} --{ as_fn_set_status 77 --as_fn_error "C compiler cannot create executables --See \`config.log' for more details." "$LINENO" 5; }; } -+as_fn_error 77 "C compiler cannot create executables -+See \`config.log' for more details" "$LINENO" 5 ; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 - $as_echo "yes" >&6; } -@@ -3991,8 +3939,8 @@ done - else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 - $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} --as_fn_error "cannot compute suffix of executables: cannot compile and link --See \`config.log' for more details." "$LINENO" 5; } -+as_fn_error $? "cannot compute suffix of executables: cannot compile and link -+See \`config.log' for more details" "$LINENO" 5 ; } - fi - rm -f conftest conftest$ac_cv_exeext - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 -@@ -4049,9 +3997,9 @@ $as_echo "$ac_try_echo"; } >&5 - else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 - $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} --as_fn_error "cannot run C compiled programs. -+as_fn_error $? "cannot run C compiled programs. - If you meant to cross compile, use \`--host'. --See \`config.log' for more details." "$LINENO" 5; } -+See \`config.log' for more details" "$LINENO" 5 ; } - fi - fi - fi -@@ -4102,8 +4050,8 @@ sed 's/^/| /' conftest.$ac_ext >&5 - - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 - $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} --as_fn_error "cannot compute suffix of object files: cannot compile --See \`config.log' for more details." "$LINENO" 5; } -+as_fn_error $? "cannot compute suffix of object files: cannot compile -+See \`config.log' for more details" "$LINENO" 5 ; } - fi - rm -f conftest.$ac_cv_objext conftest.$ac_ext - fi -@@ -4380,7 +4328,7 @@ esac - done - IFS=$as_save_IFS - if test -z "$ac_cv_path_SED"; then -- as_fn_error "no acceptable sed could be found in \$PATH" "$LINENO" 5 -+ as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 - fi - else - ac_cv_path_SED=$SED -@@ -4456,7 +4404,7 @@ esac - done - IFS=$as_save_IFS - if test -z "$ac_cv_path_GREP"; then -- as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 -+ as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi - else - ac_cv_path_GREP=$GREP -@@ -4522,7 +4470,7 @@ esac - done - IFS=$as_save_IFS - if test -z "$ac_cv_path_EGREP"; then -- as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 -+ as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi - else - ac_cv_path_EGREP=$EGREP -@@ -4589,7 +4537,7 @@ esac - done - IFS=$as_save_IFS - if test -z "$ac_cv_path_FGREP"; then -- as_fn_error "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 -+ as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi - else - ac_cv_path_FGREP=$FGREP -@@ -4705,7 +4653,7 @@ else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 - $as_echo "no" >&6; } - fi --test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5 -+test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 - $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } - if test "${lt_cv_prog_gnu_ld+set}" = set; then : -@@ -4907,13 +4855,13 @@ if test "${lt_cv_nm_interface+set}" = se - else - lt_cv_nm_interface="BSD nm" - echo "int some_variable = 0;" > conftest.$ac_ext -- (eval echo "\"\$as_me:4910: $ac_compile\"" >&5) -+ (eval echo "\"\$as_me:4858: $ac_compile\"" >&5) - (eval "$ac_compile" 2>conftest.err) - cat conftest.err >&5 -- (eval echo "\"\$as_me:4913: $NM \\\"conftest.$ac_objext\\\"\"" >&5) -+ (eval echo "\"\$as_me:4861: $NM \\\"conftest.$ac_objext\\\"\"" >&5) - (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) - cat conftest.err >&5 -- (eval echo "\"\$as_me:4916: output\"" >&5) -+ (eval echo "\"\$as_me:4864: output\"" >&5) - cat conftest.out >&5 - if $GREP 'External.*some_variable' conftest.out > /dev/null; then - lt_cv_nm_interface="MS dumpbin" -@@ -6108,7 +6056,7 @@ ia64-*-hpux*) - ;; - *-*-irix6*) - # Find out which ABI we are using. -- echo '#line 6111 "configure"' > conftest.$ac_ext -+ echo '#line 6059 "configure"' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? -@@ -6897,7 +6845,7 @@ else - # Broken: fails on valid input. - continue - fi --rm -f conftest.err conftest.$ac_ext -+rm -f conftest.err conftest.i conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. -@@ -6913,11 +6861,11 @@ else - ac_preproc_ok=: - break - fi --rm -f conftest.err conftest.$ac_ext -+rm -f conftest.err conftest.i conftest.$ac_ext - - done - # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. --rm -f conftest.err conftest.$ac_ext -+rm -f conftest.i conftest.err conftest.$ac_ext - if $ac_preproc_ok; then : - break - fi -@@ -6956,7 +6904,7 @@ else - # Broken: fails on valid input. - continue - fi --rm -f conftest.err conftest.$ac_ext -+rm -f conftest.err conftest.i conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. -@@ -6972,18 +6920,18 @@ else - ac_preproc_ok=: - break - fi --rm -f conftest.err conftest.$ac_ext -+rm -f conftest.err conftest.i conftest.$ac_ext - - done - # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. --rm -f conftest.err conftest.$ac_ext -+rm -f conftest.i conftest.err conftest.$ac_ext - if $ac_preproc_ok; then : - - else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 - $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} --as_fn_error "C preprocessor \"$CPP\" fails sanity check --See \`config.log' for more details." "$LINENO" 5; } -+as_fn_error $? "C preprocessor \"$CPP\" fails sanity check -+See \`config.log' for more details" "$LINENO" 5 ; } - fi - - ac_ext=c -@@ -7112,8 +7060,7 @@ do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` - ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default - " --eval as_val=\$$as_ac_Header -- if test "x$as_val" = x""yes; then : -+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF - #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 - _ACEOF -@@ -7608,11 +7555,11 @@ else - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` -- (eval echo "\"\$as_me:7611: $lt_compile\"" >&5) -+ (eval echo "\"\$as_me:7558: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 -- echo "$as_me:7615: \$? = $ac_status" >&5 -+ echo "$as_me:7562: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. -@@ -7947,11 +7894,11 @@ else - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` -- (eval echo "\"\$as_me:7950: $lt_compile\"" >&5) -+ (eval echo "\"\$as_me:7897: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 -- echo "$as_me:7954: \$? = $ac_status" >&5 -+ echo "$as_me:7901: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. -@@ -8052,11 +7999,11 @@ else - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` -- (eval echo "\"\$as_me:8055: $lt_compile\"" >&5) -+ (eval echo "\"\$as_me:8002: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 -- echo "$as_me:8059: \$? = $ac_status" >&5 -+ echo "$as_me:8006: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized -@@ -8107,11 +8054,11 @@ else - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` -- (eval echo "\"\$as_me:8110: $lt_compile\"" >&5) -+ (eval echo "\"\$as_me:8057: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 -- echo "$as_me:8114: \$? = $ac_status" >&5 -+ echo "$as_me:8061: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized -@@ -10490,7 +10437,7 @@ else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF --#line 10493 "configure" -+#line 10440 "configure" - #include "confdefs.h" - - #if HAVE_DLFCN_H -@@ -10586,7 +10533,7 @@ else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF --#line 10589 "configure" -+#line 10536 "configure" - #include "confdefs.h" - - #if HAVE_DLFCN_H -@@ -11113,8 +11060,8 @@ fi - - test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 - $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} --as_fn_error "no acceptable C compiler found in \$PATH --See \`config.log' for more details." "$LINENO" 5; } -+as_fn_error $? "no acceptable C compiler found in \$PATH -+See \`config.log' for more details" "$LINENO" 5 ; } - - # Provide some information about the compiler. - $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 -@@ -11909,7 +11856,7 @@ else - # Broken: fails on valid input. - continue - fi --rm -f conftest.err conftest.$ac_ext -+rm -f conftest.err conftest.i conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. -@@ -11925,11 +11872,11 @@ else - ac_preproc_ok=: - break - fi --rm -f conftest.err conftest.$ac_ext -+rm -f conftest.err conftest.i conftest.$ac_ext - - done - # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. --rm -f conftest.err conftest.$ac_ext -+rm -f conftest.i conftest.err conftest.$ac_ext - if $ac_preproc_ok; then : - break - fi -@@ -11968,7 +11915,7 @@ else - # Broken: fails on valid input. - continue - fi --rm -f conftest.err conftest.$ac_ext -+rm -f conftest.err conftest.i conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. -@@ -11984,11 +11931,11 @@ else - ac_preproc_ok=: - break - fi --rm -f conftest.err conftest.$ac_ext -+rm -f conftest.err conftest.i conftest.$ac_ext - - done - # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. --rm -f conftest.err conftest.$ac_ext -+rm -f conftest.i conftest.err conftest.$ac_ext - if $ac_preproc_ok; then : - - else -@@ -12217,7 +12164,7 @@ else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 - $as_echo "no" >&6; } - fi --test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5 -+test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 - $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } - if test "${lt_cv_prog_gnu_ld+set}" = set; then : -@@ -13758,11 +13705,11 @@ else - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` -- (eval echo "\"\$as_me:13761: $lt_compile\"" >&5) -+ (eval echo "\"\$as_me:13708: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 -- echo "$as_me:13765: \$? = $ac_status" >&5 -+ echo "$as_me:13712: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. -@@ -13857,11 +13804,11 @@ else - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` -- (eval echo "\"\$as_me:13860: $lt_compile\"" >&5) -+ (eval echo "\"\$as_me:13807: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 -- echo "$as_me:13864: \$? = $ac_status" >&5 -+ echo "$as_me:13811: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized -@@ -13909,11 +13856,11 @@ else - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` -- (eval echo "\"\$as_me:13912: $lt_compile\"" >&5) -+ (eval echo "\"\$as_me:13859: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 -- echo "$as_me:13916: \$? = $ac_status" >&5 -+ echo "$as_me:13863: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized -@@ -15573,7 +15520,7 @@ for ac_hdr in dirent.h sys/ndir.h sys/di - as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh` - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5 - $as_echo_n "checking for $ac_hdr that defines DIR... " >&6; } --if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then : -+if eval "test \"\${$as_ac_Header+set}\"" = set; then : - $as_echo_n "(cached) " >&6 - else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -@@ -15600,8 +15547,7 @@ fi - eval ac_res=\$$as_ac_Header - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 - $as_echo "$ac_res" >&6; } --eval as_val=\$$as_ac_Header -- if test "x$as_val" = x""yes; then : -+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF - #define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1 - _ACEOF -@@ -15807,8 +15753,7 @@ for ac_header in wchar.h wctype.h sys/mm - do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` - ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" --eval as_val=\$$as_ac_Header -- if test "x$as_val" = x""yes; then : -+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF - #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 - _ACEOF -@@ -15821,8 +15766,7 @@ for ac_header in stdint.h inttypes.h sys - do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` - ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" --eval as_val=\$$as_ac_Header -- if test "x$as_val" = x""yes; then : -+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF - #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 - _ACEOF -@@ -16126,8 +16070,7 @@ do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` - ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default - " --eval as_val=\$$as_ac_Header -- if test "x$as_val" = x""yes; then : -+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF - #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 - _ACEOF -@@ -16347,8 +16290,7 @@ for ac_func in fork vfork - do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` - ac_fn_cxx_check_func "$LINENO" "$ac_func" "$as_ac_var" --eval as_val=\$$as_ac_var -- if test "x$as_val" = x""yes; then : -+if eval test \"x\$"$as_ac_var"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF - #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 - _ACEOF -@@ -16617,8 +16559,7 @@ for ac_func in wcrtomb iswspace setenv - do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` - ac_fn_cxx_check_func "$LINENO" "$ac_func" "$as_ac_var" --eval as_val=\$$as_ac_var -- if test "x$as_val" = x""yes; then : -+if eval test \"x\$"$as_ac_var"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF - #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 - _ACEOF -@@ -16630,8 +16571,7 @@ for ac_func in putc_unlocked strerror vs - do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` - ac_fn_cxx_check_func "$LINENO" "$ac_func" "$as_ac_var" --eval as_val=\$$as_ac_var -- if test "x$as_val" = x""yes; then : -+if eval test \"x\$"$as_ac_var"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF - #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 - _ACEOF -@@ -16643,8 +16583,7 @@ for ac_func in gethostname strftime getp - do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` - ac_fn_cxx_check_func "$LINENO" "$ac_func" "$as_ac_var" --eval as_val=\$$as_ac_var -- if test "x$as_val" = x""yes; then : -+if eval test \"x\$"$as_ac_var"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF - #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 - _ACEOF -@@ -16656,8 +16595,7 @@ for ac_func in sigaction mkstemp - do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` - ac_fn_cxx_check_func "$LINENO" "$ac_func" "$as_ac_var" --eval as_val=\$$as_ac_var -- if test "x$as_val" = x""yes; then : -+if eval test \"x\$"$as_ac_var"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF - #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 - _ACEOF -@@ -16987,7 +16925,7 @@ case "${host_cpu}-${host_os}" in - ;; - esac - case "${host_os}-${GCC}" in -- *linux*-yes) -+ *linux*-yes | *kfreebsd*-yes ) - # On Linux/GCC, libtool uses -nostdlib for linking, which cancel part - # of the -pthread flag effect (libpthread is not automatically linked). - # So we'll try to link with both -pthread and -lpthread first: -@@ -17147,114 +17085,6 @@ rm -f core conftest.err conftest.$ac_obj - ;; - esac - fi -- if test x$ac_threads = xno ; then -- case x$ac_use_threads in -- x|xyes|xauto|xcothread) -- -- --acx_cothread=no --if test x$GXX = xyes ; then -- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cothreads work with ${host_cpu}" >&5 --$as_echo_n "checking whether cothreads work with ${host_cpu}... " >&6; } -- case ${host_cpu} in -- i?86|powerpc*|mips*|alpha*|hppa*) -- acx_cothread=yes -- ;; -- esac -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_cothread" >&5 --$as_echo "$acx_cothread" >&6; } --fi --if test x$acx_cothread != xno ; then -- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether libgcc contains the cothread patch" >&5 --$as_echo_n "checking whether libgcc contains the cothread patch... " >&6; } -- 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 -- -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext --/* end confdefs.h. */ --extern "C" { void *(*__get_eh_context_ptr)(); -- void *__new_eh_context(void); } --int --main () --{ -- __get_eh_context_ptr = &__new_eh_context; -- ; -- return 0; --} --_ACEOF --if ac_fn_cxx_try_link "$LINENO"; then : -- acx_cothread_patch=yes --else -- acx_cothread_patch=no --fi --rm -f core conftest.err conftest.$ac_objext \ -- conftest$ac_exeext conftest.$ac_ext -- 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 -- -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_cothread_patch" >&5 --$as_echo "$acx_cothread_patch" >&6; } -- if test x$acx_cothread_patch = xno ; then -- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the cothread patch is critical" >&5 --$as_echo_n "checking if the cothread patch is critical... " >&6; } -- echo 'void foo() { throw "Hello"; }' > conftest.cc -- compile="$CXX $CXXFLAGS -c conftest.cc" -- check="nm conftest.o | grep sjthrow | cat > conftest.out" -- acx_cothread_patch=yes -- if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$compile\""; } >&5 -- (eval $compile) 2>&5 -- ac_status=$? -- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 -- test $ac_status = 0; } && { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$check\""; } >&5 -- (eval $check) 2>&5 -- ac_status=$? -- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 -- test $ac_status = 0; } ; then -- if test -z "`cat conftest.out`" ; then -- acx_cothread_patch=no -- fi -- fi -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_cothread_patch" >&5 --$as_echo "$acx_cothread_patch" >&6; } -- rm conftest.* -- if test x$acx_cothread_patch = xyes ; then -- acx_cothread=no -- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Cothread cannot work without the patch" >&5 --$as_echo "$as_me: WARNING: Cothread cannot work without the patch" >&2;} -- else -- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Applying the patch is recommended anyway" >&5 --$as_echo "$as_me: WARNING: Applying the patch is recommended anyway" >&2;} -- fi -- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: See the INSTALL file for more information" >&5 --$as_echo "$as_me: WARNING: See the INSTALL file for more information" >&2;} -- fi --fi --# Must do. --if test x$acx_cothread = xyes ; then -- --$as_echo "#define HAVE_COTHREAD 1" >>confdefs.h -- -- if test x$acx_cothread_patch = xyes ; then -- --$as_echo "#define HAVE_COTHREAD_PATCH 1" >>confdefs.h -- -- fi -- ac_threads=cothread -- THREAD_CFLAGS="-DTHREADMODEL=COTHREADS" -- --else -- : --fi -- -- ;; -- esac -- fi - fi - - -@@ -17300,7 +17130,6 @@ fi - # What to compile - # ---------------------------------------- - -- - # Check compilation of xmltools - ac_enable_xmltools=yes - # Check whether --enable-xmltools was given. -@@ -17318,1379 +17147,136 @@ fi - - - -+# ---------------------------------------- -+# Desktop files -+# ---------------------------------------- - --# Check compilation of djview --# Check whether --enable-djview was given. --if test "${enable_djview+set}" = set; then : -- enableval=$enable_djview; ac_enable_djview=$enableval --else -- ac_enable_djview=no -+ac_desktopfiles=yes -+# Check whether --enable-desktopfiles was given. -+if test "${enable_desktopfiles+set}" = set; then : -+ enableval=$enable_desktopfiles; ac_desktopfiles=$enableval - fi - --if test x$ac_enable_djview != xno ; then -- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Enabling compilation of djview3. ---------------------------------------------------------- --*** The Qt2 or Qt3 based viewer, djview3, is considered obsolete. --*** The recommended viewer is now the Qt4 based viewer, djview4. --*** Djview4 comes in a separate source package that should be --*** compiled after installing the djvulibre library. ----------------------------------------------------------" >&5 --$as_echo "$as_me: WARNING: Enabling compilation of djview3. ---------------------------------------------------------- --*** The Qt2 or Qt3 based viewer, djview3, is considered obsolete. --*** The recommended viewer is now the Qt4 based viewer, djview4. --*** Djview4 comes in a separate source package that should be --*** compiled after installing the djvulibre library. ----------------------------------------------------------" >&2;} -- # Search QT library -- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5 --$as_echo_n "checking for X... " >&6; } -- -- --# Check whether --with-x was given. --if test "${with_x+set}" = set; then : -- withval=$with_x; --fi -- --# $have_x is `yes', `no', `disabled', or empty when we do not yet know. --if test "x$with_x" = xno; then -- # The user explicitly disabled X. -- have_x=disabled --else -- case $x_includes,$x_libraries in #( -- *\'*) as_fn_error "cannot use X directory names containing '" "$LINENO" 5;; #( -- *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then : -- $as_echo_n "(cached) " >&6 --else -- # One or both of the vars are not set, and there is no cached value. --ac_x_includes=no ac_x_libraries=no --rm -f -r conftest.dir --if mkdir conftest.dir; then -- cd conftest.dir -- cat >Imakefile <<'_ACEOF' --incroot: -- @echo incroot='${INCROOT}' --usrlibdir: -- @echo usrlibdir='${USRLIBDIR}' --libdir: -- @echo libdir='${LIBDIR}' --_ACEOF -- if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then -- # GNU make sometimes prints "make[1]: Entering...", which would confuse us. -- for ac_var in incroot usrlibdir libdir; do -- eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`" -- done -- # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. -- for ac_extension in a so sl dylib la dll; do -- if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" && -- test -f "$ac_im_libdir/libX11.$ac_extension"; then -- ac_im_usrlibdir=$ac_im_libdir; break -- fi -- done -- # Screen out bogus values from the imake configuration. They are -- # bogus both because they are the default anyway, and because -- # using them would break gcc on systems where it needs fixed includes. -- case $ac_im_incroot in -- /usr/include) ac_x_includes= ;; -- *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;; -- esac -- case $ac_im_usrlibdir in -- /usr/lib | /usr/lib64 | /lib | /lib64) ;; -- *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;; -- esac -- fi -- cd .. -- rm -f -r conftest.dir --fi - --# Standard set of common directories for X headers. --# Check X11 before X11Rn because it is often a symlink to the current release. --ac_x_header_dirs=' --/usr/X11/include --/usr/X11R7/include --/usr/X11R6/include --/usr/X11R5/include --/usr/X11R4/include -- --/usr/include/X11 --/usr/include/X11R7 --/usr/include/X11R6 --/usr/include/X11R5 --/usr/include/X11R4 -- --/usr/local/X11/include --/usr/local/X11R7/include --/usr/local/X11R6/include --/usr/local/X11R5/include --/usr/local/X11R4/include -- --/usr/local/include/X11 --/usr/local/include/X11R7 --/usr/local/include/X11R6 --/usr/local/include/X11R5 --/usr/local/include/X11R4 -- --/usr/X386/include --/usr/x386/include --/usr/XFree86/include/X11 -- --/usr/include --/usr/local/include --/usr/unsupported/include --/usr/athena/include --/usr/local/x11r5/include --/usr/lpp/Xamples/include -- --/usr/openwin/include --/usr/openwin/share/include' -- --if test "$ac_x_includes" = no; then -- # Guess where to find include files, by looking for Xlib.h. -- # First, try using that file with no special directory specified. -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext --/* end confdefs.h. */ --#include --_ACEOF --if ac_fn_cxx_try_cpp "$LINENO"; then : -- # We can compile using X headers with no special include directory. --ac_x_includes= -+# Check for xdg tools -+# Extract the first word of "xdg-mime", so it can be a program name with args. -+set dummy xdg-mime; ac_word=$2 -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -+$as_echo_n "checking for $ac_word... " >&6; } -+if test "${ac_cv_path_XDG_MIME+set}" = set; then : -+ $as_echo_n "(cached) " >&6 - else -- for ac_dir in $ac_x_header_dirs; do -- if test -r "$ac_dir/X11/Xlib.h"; then -- ac_x_includes=$ac_dir -- break -+ case $XDG_MIME in -+ [\\/]* | ?:[\\/]*) -+ ac_cv_path_XDG_MIME="$XDG_MIME" # Let the user override the test with a path. -+ ;; -+ *) -+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -+for as_dir in $PATH -+do -+ IFS=$as_save_IFS -+ test -z "$as_dir" && as_dir=. -+ for ac_exec_ext in '' $ac_executable_extensions; do -+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then -+ ac_cv_path_XDG_MIME="$as_dir/$ac_word$ac_exec_ext" -+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 -+ break 2 - fi - done -+ done -+IFS=$as_save_IFS -+ -+ ;; -+esac -+fi -+XDG_MIME=$ac_cv_path_XDG_MIME -+if test -n "$XDG_MIME"; then -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XDG_MIME" >&5 -+$as_echo "$XDG_MIME" >&6; } -+else -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+$as_echo "no" >&6; } - fi --rm -f conftest.err conftest.$ac_ext --fi # $ac_x_includes = no - --if test "$ac_x_libraries" = no; then -- # Check for the libraries. -- # See if we find them without any special options. -- # Don't add to $LIBS permanently. -- ac_save_LIBS=$LIBS -- LIBS="-lX11 $LIBS" -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext --/* end confdefs.h. */ --#include --int --main () --{ --XrmInitialize () -- ; -- return 0; --} --_ACEOF --if ac_fn_cxx_try_link "$LINENO"; then : -- LIBS=$ac_save_LIBS --# We can link X programs with no special library path. --ac_x_libraries= -+ -+# Extract the first word of "xdg-icon-resource", so it can be a program name with args. -+set dummy xdg-icon-resource; ac_word=$2 -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -+$as_echo_n "checking for $ac_word... " >&6; } -+if test "${ac_cv_path_XDG_ICON_RESOURCE+set}" = set; then : -+ $as_echo_n "(cached) " >&6 - else -- LIBS=$ac_save_LIBS --for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g` -+ case $XDG_ICON_RESOURCE in -+ [\\/]* | ?:[\\/]*) -+ ac_cv_path_XDG_ICON_RESOURCE="$XDG_ICON_RESOURCE" # Let the user override the test with a path. -+ ;; -+ *) -+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -+for as_dir in $PATH - do -- # Don't even attempt the hair of trying to link an X program! -- for ac_extension in a so sl dylib la dll; do -- if test -r "$ac_dir/libX11.$ac_extension"; then -- ac_x_libraries=$ac_dir -- break 2 -- fi -- done -+ IFS=$as_save_IFS -+ test -z "$as_dir" && as_dir=. -+ for ac_exec_ext in '' $ac_executable_extensions; do -+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then -+ ac_cv_path_XDG_ICON_RESOURCE="$as_dir/$ac_word$ac_exec_ext" -+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 -+ break 2 -+ fi - done --fi --rm -f core conftest.err conftest.$ac_objext \ -- conftest$ac_exeext conftest.$ac_ext --fi # $ac_x_libraries = no -+ done -+IFS=$as_save_IFS - --case $ac_x_includes,$ac_x_libraries in #( -- no,* | *,no | *\'*) -- # Didn't find X, or a directory has "'" in its name. -- ac_cv_have_x="have_x=no";; #( -- *) -- # Record where we found X for the cache. -- ac_cv_have_x="have_x=yes\ -- ac_x_includes='$ac_x_includes'\ -- ac_x_libraries='$ac_x_libraries'" -+ ;; - esac - fi --;; #( -- *) have_x=yes;; -- esac -- eval "$ac_cv_have_x" --fi # $with_x != no -- --if test "$have_x" != yes; then -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5 --$as_echo "$have_x" >&6; } -- no_x=yes --else -- # If each of the values was on the command line, it overrides each guess. -- test "x$x_includes" = xNONE && x_includes=$ac_x_includes -- test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries -- # Update the cache value to reflect the command line values. -- ac_cv_have_x="have_x=yes\ -- ac_x_includes='$x_includes'\ -- ac_x_libraries='$x_libraries'" -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5 --$as_echo "libraries $x_libraries, headers $x_includes" >&6; } --fi -- --if test "$no_x" = yes; then -- # Not all programs may use this symbol, but it does not hurt to define it. -- --$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h -- -- X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS= --else -- if test -n "$x_includes"; then -- X_CFLAGS="$X_CFLAGS -I$x_includes" -- fi -- -- # It would also be nice to do this for all -L options, not just this one. -- if test -n "$x_libraries"; then -- X_LIBS="$X_LIBS -L$x_libraries" -- # For Solaris; some versions of Sun CC require a space after -R and -- # others require no space. Words are not sufficient . . . . -- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5 --$as_echo_n "checking whether -R must be followed by a space... " >&6; } -- ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries" -- ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag -- ac_cxx_werror_flag=yes -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext --/* end confdefs.h. */ -- --int --main () --{ -- -- ; -- return 0; --} --_ACEOF --if ac_fn_cxx_try_link "$LINENO"; then : -+XDG_ICON_RESOURCE=$ac_cv_path_XDG_ICON_RESOURCE -+if test -n "$XDG_ICON_RESOURCE"; then -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XDG_ICON_RESOURCE" >&5 -+$as_echo "$XDG_ICON_RESOURCE" >&6; } -+else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 - $as_echo "no" >&6; } -- X_LIBS="$X_LIBS -R$x_libraries" --else -- LIBS="$ac_xsave_LIBS -R $x_libraries" -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext --/* end confdefs.h. */ -+fi - --int --main () --{ - -- ; -- return 0; --} --_ACEOF --if ac_fn_cxx_try_link "$LINENO"; then : -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 --$as_echo "yes" >&6; } -- X_LIBS="$X_LIBS -R $x_libraries" -+# Extract the first word of "xdg-desktop-menu", so it can be a program name with args. -+set dummy xdg-desktop-menu; ac_word=$2 -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -+$as_echo_n "checking for $ac_word... " >&6; } -+if test "${ac_cv_path_XDG_DESKTOP_MENU+set}" = set; then : -+ $as_echo_n "(cached) " >&6 - else -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5 --$as_echo "neither works" >&6; } --fi --rm -f core conftest.err conftest.$ac_objext \ -- conftest$ac_exeext conftest.$ac_ext --fi --rm -f core conftest.err conftest.$ac_objext \ -- conftest$ac_exeext conftest.$ac_ext -- ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag -- LIBS=$ac_xsave_LIBS -+ case $XDG_DESKTOP_MENU in -+ [\\/]* | ?:[\\/]*) -+ ac_cv_path_XDG_DESKTOP_MENU="$XDG_DESKTOP_MENU" # Let the user override the test with a path. -+ ;; -+ *) -+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -+for as_dir in $PATH -+do -+ IFS=$as_save_IFS -+ test -z "$as_dir" && as_dir=. -+ for ac_exec_ext in '' $ac_executable_extensions; do -+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then -+ ac_cv_path_XDG_DESKTOP_MENU="$as_dir/$ac_word$ac_exec_ext" -+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 -+ break 2 - fi -+done -+ done -+IFS=$as_save_IFS - -- # Check for system-dependent libraries X programs must link with. -- # Do this before checking for the system-independent R6 libraries -- # (-lICE), since we may need -lsocket or whatever for X linking. -- -- if test "$ISC" = yes; then -- X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet" -- else -- # Martyn Johnson says this is needed for Ultrix, if the X -- # libraries were built with DECnet support. And Karl Berry says -- # the Alpha needs dnet_stub (dnet does not exist). -- ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11" -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext --/* end confdefs.h. */ -- --/* Override any GCC internal prototype to avoid an error. -- Use char because int might match the return type of a GCC -- builtin and then its argument prototype would still apply. */ --#ifdef __cplusplus --extern "C" --#endif --char XOpenDisplay (); --int --main () --{ --return XOpenDisplay (); -- ; -- return 0; --} --_ACEOF --if ac_fn_cxx_try_link "$LINENO"; then : -- --else -- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5 --$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; } --if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then : -- $as_echo_n "(cached) " >&6 --else -- ac_check_lib_save_LIBS=$LIBS --LIBS="-ldnet $LIBS" --cat confdefs.h - <<_ACEOF >conftest.$ac_ext --/* end confdefs.h. */ -- --/* Override any GCC internal prototype to avoid an error. -- Use char because int might match the return type of a GCC -- builtin and then its argument prototype would still apply. */ --#ifdef __cplusplus --extern "C" --#endif --char dnet_ntoa (); --int --main () --{ --return dnet_ntoa (); -- ; -- return 0; --} --_ACEOF --if ac_fn_cxx_try_link "$LINENO"; then : -- ac_cv_lib_dnet_dnet_ntoa=yes --else -- ac_cv_lib_dnet_dnet_ntoa=no --fi --rm -f core conftest.err conftest.$ac_objext \ -- conftest$ac_exeext conftest.$ac_ext --LIBS=$ac_check_lib_save_LIBS --fi --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5 --$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; } --if test "x$ac_cv_lib_dnet_dnet_ntoa" = x""yes; then : -- X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet" --fi -- -- if test $ac_cv_lib_dnet_dnet_ntoa = no; then -- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5 --$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; } --if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then : -- $as_echo_n "(cached) " >&6 --else -- ac_check_lib_save_LIBS=$LIBS --LIBS="-ldnet_stub $LIBS" --cat confdefs.h - <<_ACEOF >conftest.$ac_ext --/* end confdefs.h. */ -- --/* Override any GCC internal prototype to avoid an error. -- Use char because int might match the return type of a GCC -- builtin and then its argument prototype would still apply. */ --#ifdef __cplusplus --extern "C" --#endif --char dnet_ntoa (); --int --main () --{ --return dnet_ntoa (); -- ; -- return 0; --} --_ACEOF --if ac_fn_cxx_try_link "$LINENO"; then : -- ac_cv_lib_dnet_stub_dnet_ntoa=yes --else -- ac_cv_lib_dnet_stub_dnet_ntoa=no --fi --rm -f core conftest.err conftest.$ac_objext \ -- conftest$ac_exeext conftest.$ac_ext --LIBS=$ac_check_lib_save_LIBS --fi --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5 --$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; } --if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = x""yes; then : -- X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub" --fi -- -- fi --fi --rm -f core conftest.err conftest.$ac_objext \ -- conftest$ac_exeext conftest.$ac_ext -- LIBS="$ac_xsave_LIBS" -- -- # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT, -- # to get the SysV transport functions. -- # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4) -- # needs -lnsl. -- # The nsl library prevents programs from opening the X display -- # on Irix 5.2, according to T.E. Dickey. -- # The functions gethostbyname, getservbyname, and inet_addr are -- # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking. -- ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname" --if test "x$ac_cv_func_gethostbyname" = x""yes; then : -- --fi -- -- if test $ac_cv_func_gethostbyname = no; then -- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5 --$as_echo_n "checking for gethostbyname in -lnsl... " >&6; } --if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then : -- $as_echo_n "(cached) " >&6 --else -- ac_check_lib_save_LIBS=$LIBS --LIBS="-lnsl $LIBS" --cat confdefs.h - <<_ACEOF >conftest.$ac_ext --/* end confdefs.h. */ -- --/* Override any GCC internal prototype to avoid an error. -- Use char because int might match the return type of a GCC -- builtin and then its argument prototype would still apply. */ --#ifdef __cplusplus --extern "C" --#endif --char gethostbyname (); --int --main () --{ --return gethostbyname (); -- ; -- return 0; --} --_ACEOF --if ac_fn_cxx_try_link "$LINENO"; then : -- ac_cv_lib_nsl_gethostbyname=yes --else -- ac_cv_lib_nsl_gethostbyname=no --fi --rm -f core conftest.err conftest.$ac_objext \ -- conftest$ac_exeext conftest.$ac_ext --LIBS=$ac_check_lib_save_LIBS --fi --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5 --$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; } --if test "x$ac_cv_lib_nsl_gethostbyname" = x""yes; then : -- X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl" --fi -- -- if test $ac_cv_lib_nsl_gethostbyname = no; then -- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5 --$as_echo_n "checking for gethostbyname in -lbsd... " >&6; } --if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then : -- $as_echo_n "(cached) " >&6 --else -- ac_check_lib_save_LIBS=$LIBS --LIBS="-lbsd $LIBS" --cat confdefs.h - <<_ACEOF >conftest.$ac_ext --/* end confdefs.h. */ -- --/* Override any GCC internal prototype to avoid an error. -- Use char because int might match the return type of a GCC -- builtin and then its argument prototype would still apply. */ --#ifdef __cplusplus --extern "C" --#endif --char gethostbyname (); --int --main () --{ --return gethostbyname (); -- ; -- return 0; --} --_ACEOF --if ac_fn_cxx_try_link "$LINENO"; then : -- ac_cv_lib_bsd_gethostbyname=yes --else -- ac_cv_lib_bsd_gethostbyname=no --fi --rm -f core conftest.err conftest.$ac_objext \ -- conftest$ac_exeext conftest.$ac_ext --LIBS=$ac_check_lib_save_LIBS --fi --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5 --$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; } --if test "x$ac_cv_lib_bsd_gethostbyname" = x""yes; then : -- X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd" --fi -- -- fi -- fi -- -- # lieder@skyler.mavd.honeywell.com says without -lsocket, -- # socket/setsockopt and other routines are undefined under SCO ODT -- # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary -- # on later versions), says Simon Leinen: it contains gethostby* -- # variants that don't use the name server (or something). -lsocket -- # must be given before -lnsl if both are needed. We assume that -- # if connect needs -lnsl, so does gethostbyname. -- ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect" --if test "x$ac_cv_func_connect" = x""yes; then : -- --fi -- -- if test $ac_cv_func_connect = no; then -- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5 --$as_echo_n "checking for connect in -lsocket... " >&6; } --if test "${ac_cv_lib_socket_connect+set}" = set; then : -- $as_echo_n "(cached) " >&6 --else -- ac_check_lib_save_LIBS=$LIBS --LIBS="-lsocket $X_EXTRA_LIBS $LIBS" --cat confdefs.h - <<_ACEOF >conftest.$ac_ext --/* end confdefs.h. */ -- --/* Override any GCC internal prototype to avoid an error. -- Use char because int might match the return type of a GCC -- builtin and then its argument prototype would still apply. */ --#ifdef __cplusplus --extern "C" --#endif --char connect (); --int --main () --{ --return connect (); -- ; -- return 0; --} --_ACEOF --if ac_fn_cxx_try_link "$LINENO"; then : -- ac_cv_lib_socket_connect=yes --else -- ac_cv_lib_socket_connect=no --fi --rm -f core conftest.err conftest.$ac_objext \ -- conftest$ac_exeext conftest.$ac_ext --LIBS=$ac_check_lib_save_LIBS --fi --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5 --$as_echo "$ac_cv_lib_socket_connect" >&6; } --if test "x$ac_cv_lib_socket_connect" = x""yes; then : -- X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS" --fi -- -- fi -- -- # Guillermo Gomez says -lposix is necessary on A/UX. -- ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove" --if test "x$ac_cv_func_remove" = x""yes; then : -- --fi -- -- if test $ac_cv_func_remove = no; then -- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5 --$as_echo_n "checking for remove in -lposix... " >&6; } --if test "${ac_cv_lib_posix_remove+set}" = set; then : -- $as_echo_n "(cached) " >&6 --else -- ac_check_lib_save_LIBS=$LIBS --LIBS="-lposix $LIBS" --cat confdefs.h - <<_ACEOF >conftest.$ac_ext --/* end confdefs.h. */ -- --/* Override any GCC internal prototype to avoid an error. -- Use char because int might match the return type of a GCC -- builtin and then its argument prototype would still apply. */ --#ifdef __cplusplus --extern "C" --#endif --char remove (); --int --main () --{ --return remove (); -- ; -- return 0; --} --_ACEOF --if ac_fn_cxx_try_link "$LINENO"; then : -- ac_cv_lib_posix_remove=yes --else -- ac_cv_lib_posix_remove=no --fi --rm -f core conftest.err conftest.$ac_objext \ -- conftest$ac_exeext conftest.$ac_ext --LIBS=$ac_check_lib_save_LIBS --fi --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5 --$as_echo "$ac_cv_lib_posix_remove" >&6; } --if test "x$ac_cv_lib_posix_remove" = x""yes; then : -- X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix" --fi -- -- fi -- -- # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. -- ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat" --if test "x$ac_cv_func_shmat" = x""yes; then : -- --fi -- -- if test $ac_cv_func_shmat = no; then -- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5 --$as_echo_n "checking for shmat in -lipc... " >&6; } --if test "${ac_cv_lib_ipc_shmat+set}" = set; then : -- $as_echo_n "(cached) " >&6 --else -- ac_check_lib_save_LIBS=$LIBS --LIBS="-lipc $LIBS" --cat confdefs.h - <<_ACEOF >conftest.$ac_ext --/* end confdefs.h. */ -- --/* Override any GCC internal prototype to avoid an error. -- Use char because int might match the return type of a GCC -- builtin and then its argument prototype would still apply. */ --#ifdef __cplusplus --extern "C" --#endif --char shmat (); --int --main () --{ --return shmat (); -- ; -- return 0; --} --_ACEOF --if ac_fn_cxx_try_link "$LINENO"; then : -- ac_cv_lib_ipc_shmat=yes --else -- ac_cv_lib_ipc_shmat=no --fi --rm -f core conftest.err conftest.$ac_objext \ -- conftest$ac_exeext conftest.$ac_ext --LIBS=$ac_check_lib_save_LIBS --fi --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5 --$as_echo "$ac_cv_lib_ipc_shmat" >&6; } --if test "x$ac_cv_lib_ipc_shmat" = x""yes; then : -- X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc" --fi -- -- fi -- fi -- -- # Check for libraries that X11R6 Xt/Xaw programs need. -- ac_save_LDFLAGS=$LDFLAGS -- test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries" -- # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to -- # check for ICE first), but we must link in the order -lSM -lICE or -- # we get undefined symbols. So assume we have SM if we have ICE. -- # These have to be linked with before -lX11, unlike the other -- # libraries we check for below, so use a different variable. -- # John Interrante, Karl Berry -- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5 --$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; } --if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then : -- $as_echo_n "(cached) " >&6 --else -- ac_check_lib_save_LIBS=$LIBS --LIBS="-lICE $X_EXTRA_LIBS $LIBS" --cat confdefs.h - <<_ACEOF >conftest.$ac_ext --/* end confdefs.h. */ -- --/* Override any GCC internal prototype to avoid an error. -- Use char because int might match the return type of a GCC -- builtin and then its argument prototype would still apply. */ --#ifdef __cplusplus --extern "C" --#endif --char IceConnectionNumber (); --int --main () --{ --return IceConnectionNumber (); -- ; -- return 0; --} --_ACEOF --if ac_fn_cxx_try_link "$LINENO"; then : -- ac_cv_lib_ICE_IceConnectionNumber=yes --else -- ac_cv_lib_ICE_IceConnectionNumber=no --fi --rm -f core conftest.err conftest.$ac_objext \ -- conftest$ac_exeext conftest.$ac_ext --LIBS=$ac_check_lib_save_LIBS --fi --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5 --$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; } --if test "x$ac_cv_lib_ICE_IceConnectionNumber" = x""yes; then : -- X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE" --fi -- -- LDFLAGS=$ac_save_LDFLAGS -- --fi -- -- -- -- -- if test ${no_x-no} != yes ; then -- X_LIBS="$X_LIBS $X_PRE_LIBS -lXext -lX11 $X_EXTRA_LIBS" -- fi -- # Variables -- -- -- -- -- -- # Arguments -- --# Check whether --with-qt was given. --if test "${with_qt+set}" = set; then : -- withval=$with_qt; test x$withval != xyes && QTDIR=$withval --fi -- -- test x$no_x = xyes && QTDIR=no -- # Check for the lib64 thing -- lib=`basename "$libdir"` -- case "$lib" in lib*) ;; *) lib="lib" ;; esac -- if test $lib = "lib" -o $lib = "lib64" ; then -- libs="$lib" ; else libs="$lib lib"; fi -- # Standard qt directory -- ac_has_qt=no -- if test x$QTDIR != xno ; then -- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Qt root directory" >&5 --$as_echo_n "checking for Qt root directory... " >&6; } -- ac_has_qt=no -- ac_userdef_qt=no -- if test x${QT_CFLAGS+set} = xset || test x${QT_LIBS+set} = xset ; then -- ac_userdef_qt=yes -- ac_has_qt="user defined QT_CFLAGS and QT_LIBS" # no questions asked -- else -- ac_qt_dirs="/usr/local /usr/X11R6 /usr" -- for lib in $libs ; do -- for n in /usr/$lib/qt* ; do -- test -d $n && ac_qt_dirs="$n $ac_qt_dirs" ; -- done -- done -- if test -d "$QTDIR" ; then -- ac_qt_dirs="$QTDIR $ac_qt_dirs" -- fi -- for dir in $ac_qt_dirs ; do -- if test -r $dir/include/qwidget.h ; then -- ac_has_qt=$dir -- QTDIR=$dir -- break -- fi -- done -- fi -- # Unusual install -- if test "x$ac_has_qt" = xno ; then -- ac_qt_names="qt3 qt2 qt" -- ac_qt_dirs="/usr /usr/X11R6 /usr/local" -- case "$host" in -- *-darwin* | *-macos10*) -- if test -d /opt/local ; then -- ac_qt_dirs="/opt/local $ac_qt_dirs" -- elif test -d /sw ; then -- ac_qt_dirs="/sw $ac_qt_dirs" -- fi -- ;; -- esac -- ac_qt_dirs="$QTDIR $prefix $ac_qt_dirs" -- for d in $ac_qt_dirs ; do -- for n in $ac_qt_names ; do -- if test -r $d/include/$n/qwidget.h ; then -- for lib in $libs ; do -- for l in lib$n.so lib$n-mt.so lib$n-mt.dylib lib$n.a lib$n-mt.a ; do -- if test -r $d/$lib/$l ; then -- QT_CFLAGS="-I$d/include/$n" -- QT_LIBS="-L$d/$lib -l$n" -- QTDIR=$d -- ac_has_qt="bsd-style Qt install" -- break 3 -- fi -- done -- for l in libqt.dll.a libqt-mt.dll.a libqt-mt.la libqt.a libqt-mt.a; do -- if test -r $d/$lib/$n/$lib/$l ; then -- QT_CFLAGS="-I$d/include/$n" -- QT_LIBS="-L$d/$lib/$n/$lib -lqt" -- QTDIR=$d/$lib/$n -- ac_has_qt="cygwin-style Qt install" -- break 3 -- fi -- done -- for l in libqt.so libqt-mt.so libqt-mt.dylib libqt.a libqt-mt.a; do -- if test -r $d/$lib/$l ; then -- QT_CFLAGS="-I$d/include/$n" -- QT_LIBS="-L$d/$lib -lqt" -- QTDIR=$d -- ac_has_qt="debian-style Qt install" -- break 3 -- fi -- done -- done -- fi -- done -- done -- fi -- # Print result -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_has_qt" >&5 --$as_echo "$ac_has_qt" >&6; } -- fi -- # Programs -- if test "x$ac_has_qt" != xno ; then -- if test "x$ac_userdef_qt" != xyes ; then -- if test x${QT_CFLAGS+set} != xset ; then -- QT_CFLAGS="-I$QTDIR/include" -- fi -- if test x${QT_LIBS+set} != xset ; then -- if test -d $QTDIR/$lib ; then -- QT_LIBS="-L$QTDIR/$lib -lqt" -- else -- QT_LIBS="-L$QTDIR/lib -lqt" -- fi -- fi -- # KDE-3.0 styles require qt-mt even in non KDE applications. -- # Bero dixit. See kde bug #40823. -- qt_libdir= -- qt_libname= -- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for multithreaded Qt3 library" >&5 --$as_echo_n "checking for multithreaded Qt3 library... " >&6; } -- for n in `echo $QT_LIBS` ; do case $n in -- -L*) qt_libdir=`echo "$n" | sed -e 's:^-L::'` ;; -- -l*) qt_libname=`echo "$n" | sed -e 's:^-l::'` ;; -- esac -- done -- ac_has_qt_mt=no -- for n in ${qt_libdir}/lib${qt_libname}-mt.so \ -- ${qt_libdir}/lib${qt_libname}-mt.dylib \ -- ${qt_libdir}/lib${qt_libname}-mt.dll.a; do -- if test -r $n ; then -- ac_has_qt_mt=yes -- fi -- done -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_has_qt_mt" >&5 --$as_echo "$ac_has_qt_mt" >&6; } -- if test $ac_has_qt_mt = yes ; then -- newqtlibs= -- for n in `echo $QT_LIBS` ; do -- test "$n" = "-l$qt_libname" && n="$n-mt" -- newqtlibs="$newqtlibs $n" -- done -- QT_LIBS="$newqtlibs" -- fi -- fi -- for ac_prog in moc-qt3 moc --do -- # Extract the first word of "$ac_prog", so it can be a program name with args. --set dummy $ac_prog; ac_word=$2 --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 --$as_echo_n "checking for $ac_word... " >&6; } --if test "${ac_cv_path_MOC+set}" = set; then : -- $as_echo_n "(cached) " >&6 --else -- case $MOC in -- [\\/]* | ?:[\\/]*) -- ac_cv_path_MOC="$MOC" # Let the user override the test with a path. -- ;; -- *) -- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR --for as_dir in $QTDIR/bin $PATH --do -- IFS=$as_save_IFS -- test -z "$as_dir" && as_dir=. -- for ac_exec_ext in '' $ac_executable_extensions; do -- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then -- ac_cv_path_MOC="$as_dir/$ac_word$ac_exec_ext" -- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 -- break 2 -- fi --done -- done --IFS=$as_save_IFS -- -- ;; --esac --fi --MOC=$ac_cv_path_MOC --if test -n "$MOC"; then -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MOC" >&5 --$as_echo "$MOC" >&6; } --else -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 --$as_echo "no" >&6; } --fi -- -- -- test -n "$MOC" && break --done --test -n "$MOC" || MOC=":" -- -- for ac_prog in uic-qt3 uic --do -- # Extract the first word of "$ac_prog", so it can be a program name with args. --set dummy $ac_prog; ac_word=$2 --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 --$as_echo_n "checking for $ac_word... " >&6; } --if test "${ac_cv_path_UIC+set}" = set; then : -- $as_echo_n "(cached) " >&6 --else -- case $UIC in -- [\\/]* | ?:[\\/]*) -- ac_cv_path_UIC="$UIC" # Let the user override the test with a path. -- ;; -- *) -- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR --for as_dir in $QTDIR/bin $PATH --do -- IFS=$as_save_IFS -- test -z "$as_dir" && as_dir=. -- for ac_exec_ext in '' $ac_executable_extensions; do -- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then -- ac_cv_path_UIC="$as_dir/$ac_word$ac_exec_ext" -- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 -- break 2 -- fi --done -- done --IFS=$as_save_IFS -- -- ;; --esac --fi --UIC=$ac_cv_path_UIC --if test -n "$UIC"; then -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UIC" >&5 --$as_echo "$UIC" >&6; } --else -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 --$as_echo "no" >&6; } --fi -- -- -- test -n "$UIC" && break --done --test -n "$UIC" || UIC=":" -- -- for ac_prog in lupdate-qt3 lupdate --do -- # Extract the first word of "$ac_prog", so it can be a program name with args. --set dummy $ac_prog; ac_word=$2 --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 --$as_echo_n "checking for $ac_word... " >&6; } --if test "${ac_cv_path_LUPDATE+set}" = set; then : -- $as_echo_n "(cached) " >&6 --else -- case $LUPDATE in -- [\\/]* | ?:[\\/]*) -- ac_cv_path_LUPDATE="$LUPDATE" # Let the user override the test with a path. -- ;; -- *) -- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR --for as_dir in $QTDIR/bin $PATH --do -- IFS=$as_save_IFS -- test -z "$as_dir" && as_dir=. -- for ac_exec_ext in '' $ac_executable_extensions; do -- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then -- ac_cv_path_LUPDATE="$as_dir/$ac_word$ac_exec_ext" -- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 -- break 2 -- fi --done -- done --IFS=$as_save_IFS -- -- ;; --esac --fi --LUPDATE=$ac_cv_path_LUPDATE --if test -n "$LUPDATE"; then -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LUPDATE" >&5 --$as_echo "$LUPDATE" >&6; } --else -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 --$as_echo "no" >&6; } --fi -- -- -- test -n "$LUPDATE" && break --done --test -n "$LUPDATE" || LUPDATE=":" -- -- for ac_prog in lrelease-qt3 lrelease --do -- # Extract the first word of "$ac_prog", so it can be a program name with args. --set dummy $ac_prog; ac_word=$2 --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 --$as_echo_n "checking for $ac_word... " >&6; } --if test "${ac_cv_path_LRELEASE+set}" = set; then : -- $as_echo_n "(cached) " >&6 --else -- case $LRELEASE in -- [\\/]* | ?:[\\/]*) -- ac_cv_path_LRELEASE="$LRELEASE" # Let the user override the test with a path. -- ;; -- *) -- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR --for as_dir in $QTDIR/bin $PATH --do -- IFS=$as_save_IFS -- test -z "$as_dir" && as_dir=. -- for ac_exec_ext in '' $ac_executable_extensions; do -- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then -- ac_cv_path_LRELEASE="$as_dir/$ac_word$ac_exec_ext" -- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 -- break 2 -- fi --done -- done --IFS=$as_save_IFS -- -- ;; --esac --fi --LRELEASE=$ac_cv_path_LRELEASE --if test -n "$LRELEASE"; then -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LRELEASE" >&5 --$as_echo "$LRELEASE" >&6; } --else -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 --$as_echo "no" >&6; } --fi -- -- -- test -n "$LRELEASE" && break --done --test -n "$LRELEASE" || LRELEASE=":" -- -- if test -x "$MOC" ; then : ; else -- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Cannot locate the Qt Meta-Object compiler." >&5 --$as_echo "$as_me: WARNING: Cannot locate the Qt Meta-Object compiler." >&2;} -- ac_has_qt=no -- QTDIR=no -- fi -- fi -- # Execute -- if test "x$ac_has_qt" != xno ; then -- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if a small Qt program runs" >&5 --$as_echo_n "checking if a small Qt program runs... " >&6; } -- 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 -- -- save_CXXFLAGS="$CXXFLAGS" -- save_LIBS="$LIBS" -- CXXFLAGS="$CXXFLAGS $CFLAGS $THREAD_CFLAGS $QT_CFLAGS $X_CFLAGS" -- LIBS="$THREAD_LIBS $QT_LIBS $X_LIBS $LIBS" -- if test "$cross_compiling" = yes; then : -- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 --$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} --as_fn_error "cannot run test program while cross compiling --See \`config.log' for more details." "$LINENO" 5; } --else -- cat confdefs.h - <<_ACEOF >conftest.$ac_ext --/* end confdefs.h. */ -- --#include --#include --#include --int main() { --QFile qf("confout"); if (!qf.open(IO_WriteOnly)) return 1; --QTextStream ts(&qf); ts << QT_VERSION; return 0; --} --_ACEOF --if ac_fn_cxx_try_run "$LINENO"; then : -- okay=yes --else -- okay=no; QTDIR=no --fi --rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ -- conftest.$ac_objext conftest.beam conftest.$ac_ext --fi -- -- CXXFLAGS="$save_CXXFLAGS" -- LIBS="$save_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 -- -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $okay" >&5 --$as_echo "$okay" >&6; } -- if test "x$okay" = xno ; then -- ac_has_qt=no -- fi -- fi -- # Version -- if test "x$ac_has_qt" != xno ; then -- { $as_echo "$as_me:${as_lineno-$LINENO}: checking Qt version" >&5 --$as_echo_n "checking Qt version... " >&6; } -- qt_version=`cat < confout` -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $qt_version" >&5 --$as_echo "$qt_version" >&6; } -- --cat >>confdefs.h <<_ACEOF --#define HAVE_QT $qt_version --_ACEOF -- -- rm confout 2>/dev/null -- fi -- # Execute -- if test "x$ac_has_qt" = xno ; then -- QT_CFLAGS= ; QT_LIBS= ; QTDIR= ; MOC=moc ; -- no_qt=yes -- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Qt3 support is disabled" >&5 --$as_echo "$as_me: WARNING: Qt3 support is disabled" >&2;} -- else -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: setting QT_CFLAGS=$QT_CFLAGS" >&5 --$as_echo "setting QT_CFLAGS=$QT_CFLAGS" >&6; } -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: setting QT_LIBS=$QT_LIBS" >&5 --$as_echo "setting QT_LIBS=$QT_LIBS" >&6; } -- : -- fi -- -- -- # Search X11 and Xt headers -- if test "$no_x" != "yes" ; then -- savedCFLAGS="$CFLAGS" -- CFLAGS="$CFLAGS ${X_CFLAGS}" -- for ac_header in X11/extensions/Xext.h --do : -- ac_fn_cxx_check_header_compile "$LINENO" "X11/extensions/Xext.h" "ac_cv_header_X11_extensions_Xext_h" "include --" --if test "x$ac_cv_header_X11_extensions_Xext_h" = x""yes; then : -- cat >>confdefs.h <<_ACEOF --#define HAVE_X11_EXTENSIONS_XEXT_H 1 --_ACEOF -- --fi -- --done -- -- ac_fn_cxx_check_header_mongrel "$LINENO" "X11/Shell.h" "ac_cv_header_X11_Shell_h" "$ac_includes_default" --if test "x$ac_cv_header_X11_Shell_h" = x""yes; then : -- --else -- no_xt=yes --fi -- -- -- ac_fn_cxx_check_header_mongrel "$LINENO" "X11/IntrinsicP.h" "ac_cv_header_X11_IntrinsicP_h" "$ac_includes_default" --if test "x$ac_cv_header_X11_IntrinsicP_h" = x""yes; then : -- --else -- no_xt=yes --fi -- -- -- CFLAGS="$savedCFLAGS" -- if test "$no_xt" = "yes" ; then -- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Xt include files not found" >&5 --$as_echo "$as_me: WARNING: Xt include files not found" >&2;} -- else -- --$as_echo "#define HAVE_XT 1" >>confdefs.h -- -- fi -- fi -- -- if test x$no_threads = xyes || test x$no_qt = xyes || test x$no_xt = xyes -- then -- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Disabling compilation of djview. ---------------------------------------------------------- --*** The GUI portion of this package will not be compiled. --*** This is probably not what you want. Chech the output --*** of configure for warning messages. Read file INSTALL. --*** Investigate options --with-qt and --enable-threads. --*** Make sure the Xt include files are present. ----------------------------------------------------------" >&5 --$as_echo "$as_me: WARNING: Disabling compilation of djview. ---------------------------------------------------------- --*** The GUI portion of this package will not be compiled. --*** This is probably not what you want. Chech the output --*** of configure for warning messages. Read file INSTALL. --*** Investigate options --with-qt and --enable-threads. --*** Make sure the Xt include files are present. ----------------------------------------------------------" >&2;} -- ac_enable_djview=no; -- fi --fi --if test x$ac_enable_djview != xno ; then -- GUI_YES='' -- GUI_NO='#' --else -- GUI_YES='#' -- GUI_NO='' --fi -- -- -- -- --# Check compilation of i18n files. --# Check whether --enable-i18n was given. --if test "${enable_i18n+set}" = set; then : -- enableval=$enable_i18n; ac_enable_i18n=$enableval --else -- ac_enable_i18n=all --fi -- --if test "$ac_enable_i18n" != xno ; then -- I18N_YES='' -- I18N_NO='#' -- LINGUAS= -- if test "$ac_enable_i18n" = all ; then -- for n in $srcdir/i18n/* ; do -- if test -r $n/Makefile.in ; then -- LINGUAS="$LINGUAS `basename $n`" -- fi -- done -- else -- for n in $ac_enable_i18n ; do -- if test -r $srcdir/i18n/$n/Makefile.in ; then -- LINGUAS="$LINGUAS $n" -- fi -- done -- fi --else -- I18N_YES='#' -- I18N_NO='' --fi -- -- -- -- -- -- --# ---------------------------------------- --# Desktop files --# ---------------------------------------- -- --ac_desktopfiles=yes --# Check whether --enable-desktopfiles was given. --if test "${enable_desktopfiles+set}" = set; then : -- enableval=$enable_desktopfiles; ac_desktopfiles=$enableval --fi -- -- --# Check for xdg tools --# Extract the first word of "xdg-mime", so it can be a program name with args. --set dummy xdg-mime; ac_word=$2 --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 --$as_echo_n "checking for $ac_word... " >&6; } --if test "${ac_cv_path_XDG_MIME+set}" = set; then : -- $as_echo_n "(cached) " >&6 --else -- case $XDG_MIME in -- [\\/]* | ?:[\\/]*) -- ac_cv_path_XDG_MIME="$XDG_MIME" # Let the user override the test with a path. -- ;; -- *) -- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR --for as_dir in $PATH --do -- IFS=$as_save_IFS -- test -z "$as_dir" && as_dir=. -- for ac_exec_ext in '' $ac_executable_extensions; do -- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then -- ac_cv_path_XDG_MIME="$as_dir/$ac_word$ac_exec_ext" -- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 -- break 2 -- fi --done -- done --IFS=$as_save_IFS -- -- ;; --esac --fi --XDG_MIME=$ac_cv_path_XDG_MIME --if test -n "$XDG_MIME"; then -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XDG_MIME" >&5 --$as_echo "$XDG_MIME" >&6; } --else -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 --$as_echo "no" >&6; } --fi -- -- --# Extract the first word of "xdg-icon-resource", so it can be a program name with args. --set dummy xdg-icon-resource; ac_word=$2 --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 --$as_echo_n "checking for $ac_word... " >&6; } --if test "${ac_cv_path_XDG_ICON_RESOURCE+set}" = set; then : -- $as_echo_n "(cached) " >&6 --else -- case $XDG_ICON_RESOURCE in -- [\\/]* | ?:[\\/]*) -- ac_cv_path_XDG_ICON_RESOURCE="$XDG_ICON_RESOURCE" # Let the user override the test with a path. -- ;; -- *) -- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR --for as_dir in $PATH --do -- IFS=$as_save_IFS -- test -z "$as_dir" && as_dir=. -- for ac_exec_ext in '' $ac_executable_extensions; do -- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then -- ac_cv_path_XDG_ICON_RESOURCE="$as_dir/$ac_word$ac_exec_ext" -- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 -- break 2 -- fi --done -- done --IFS=$as_save_IFS -- -- ;; --esac --fi --XDG_ICON_RESOURCE=$ac_cv_path_XDG_ICON_RESOURCE --if test -n "$XDG_ICON_RESOURCE"; then -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XDG_ICON_RESOURCE" >&5 --$as_echo "$XDG_ICON_RESOURCE" >&6; } --else -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 --$as_echo "no" >&6; } --fi -- -- --# Extract the first word of "xdg-desktop-menu", so it can be a program name with args. --set dummy xdg-desktop-menu; ac_word=$2 --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 --$as_echo_n "checking for $ac_word... " >&6; } --if test "${ac_cv_path_XDG_DESKTOP_MENU+set}" = set; then : -- $as_echo_n "(cached) " >&6 --else -- case $XDG_DESKTOP_MENU in -- [\\/]* | ?:[\\/]*) -- ac_cv_path_XDG_DESKTOP_MENU="$XDG_DESKTOP_MENU" # Let the user override the test with a path. -- ;; -- *) -- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR --for as_dir in $PATH --do -- IFS=$as_save_IFS -- test -z "$as_dir" && as_dir=. -- for ac_exec_ext in '' $ac_executable_extensions; do -- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then -- ac_cv_path_XDG_DESKTOP_MENU="$as_dir/$ac_word$ac_exec_ext" -- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 -- break 2 -- fi --done -- done --IFS=$as_save_IFS -- -- ;; --esac --fi --XDG_DESKTOP_MENU=$ac_cv_path_XDG_DESKTOP_MENU --if test -n "$XDG_DESKTOP_MENU"; then -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XDG_DESKTOP_MENU" >&5 --$as_echo "$XDG_DESKTOP_MENU" >&6; } --else -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 --$as_echo "no" >&6; } --fi -+ ;; -+esac -+fi -+XDG_DESKTOP_MENU=$ac_cv_path_XDG_DESKTOP_MENU -+if test -n "$XDG_DESKTOP_MENU"; then -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XDG_DESKTOP_MENU" >&5 -+$as_echo "$XDG_DESKTOP_MENU" >&6; } -+else -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+$as_echo "no" >&6; } -+fi - - - if test -x ${XDG_MIME} && \ -@@ -18726,248 +17312,6 @@ fi - - - -- --# ---------------------------------------- --# Flags for NSDEJAVU.SO --# ---------------------------------------- -- --NSDEJAVU_CFLAGS= --NSDEJAVU_LIBS= --if test x$ac_enable_djview != xno --then -- -- -- -- # Extract the first word of "pkg-config", so it can be a program name with args. --set dummy pkg-config; ac_word=$2 --{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 --$as_echo_n "checking for $ac_word... " >&6; } --if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : -- $as_echo_n "(cached) " >&6 --else -- case $PKG_CONFIG in -- [\\/]* | ?:[\\/]*) -- ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. -- ;; -- *) -- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR --for as_dir in $PATH --do -- IFS=$as_save_IFS -- test -z "$as_dir" && as_dir=. -- for ac_exec_ext in '' $ac_executable_extensions; do -- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then -- ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" -- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 -- break 2 -- fi --done -- done --IFS=$as_save_IFS -- -- ;; --esac --fi --PKG_CONFIG=$ac_cv_path_PKG_CONFIG --if test -n "$PKG_CONFIG"; then -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 --$as_echo "$PKG_CONFIG" >&6; } --else -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 --$as_echo "no" >&6; } --fi -- -- -- if test -z "$PKG_CONFIG" ; then -- : -- else -- : -- fi -- -- -- -- -- -- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for glib" >&5 --$as_echo_n "checking for glib... " >&6; } -- if test -x "$PKG_CONFIG" ; then -- if $PKG_CONFIG glib-2.0 ; then -- ac_glib=yes -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5 --$as_echo "found" >&6; } -- GLIB_LIBS=`$PKG_CONFIG --libs glib-2.0` -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: setting GLIB_LIBS=$GLIB_LIBS" >&5 --$as_echo "setting GLIB_LIBS=$GLIB_LIBS" >&6; } -- GLIB_CFLAGS=`$PKG_CONFIG --cflags glib-2.0` -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: setting GLIB_CFLAGS=$GLIB_CFLAGS" >&5 --$as_echo "setting GLIB_CFLAGS=$GLIB_CFLAGS" >&6; } -- --$as_echo "#define HAVE_GLIB 1" >>confdefs.h -- -- : -- else -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found by pkg-config" >&5 --$as_echo "not found by pkg-config" >&6; } -- ac_glib=no -- : -- fi -- else -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no pkg-config" >&5 --$as_echo "no pkg-config" >&6; } -- ac_glib=no -- : -- fi -- -- NSDEJAVU_CFLAGS=${X_CFLAGS} -- case "$host" in -- *-cygwin* | *-mingw*) -- NSDEJAVU_LIBS="`echo ${X_LIBS} | sed -e 's/-lXext/-lXt -lXext/'`" -- NSDEJAVU_LIBS="-no-undefined $NSDEJAVU_LIBS" -- ;; -- esac --fi -- -- -- --# ----------- --# How to install shared libraries --if test -z "$INSTALL_SHLIB" ; then -- INSTALL_SHLIB="${INSTALL_DATA}" -- case "$host" in -- *-cygwin* | *-mingw*) -- INSTALL_SHLIB="cp" -- ;; -- esac --fi -- -- -- -- --# ---------------------------------------- --# Compiler version check --# ---------------------------------------- -- --# Work around broken compilers with the famous LPR0 bug --if test x$ac_shared_libdjvu != xno && test x$GXX = xyes; then -- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX has the LPR0 bug" >&5 --$as_echo_n "checking if $CXX has the LPR0 bug... " >&6; } -- echo 'extern "C"{inline int sqr(int x)throw(){return x*x;}}int main(){}' \ -- > conftest.cc -- if ${CXX} -fPIC ${OPTS} conftest.cc -o conftest \ -- > /dev/null 2> /dev/null ; then -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 --$as_echo "no" >&6; } -- else -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 --$as_echo "yes" >&6; } -- OPTS=`echo $OPTS | sed -e 's/-mcpu=i686/-mpentium/'` -- fi --fi -- --# What compiler are we using ? --if test x$GXX != xyes ; then -- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The recommended c++ compiler is g++." >&5 --$as_echo "$as_me: WARNING: The recommended c++ compiler is g++." >&2;} -- if test $ac_cv_cxx_exceptions = no ; then -- as_fn_error "Exception support in c++ compiler is mandatory." "$LINENO" 5 -- fi --else -- { $as_echo "$as_me:${as_lineno-$LINENO}: checking g++ version" >&5 --$as_echo_n "checking g++ version... " >&6; } -- cxxver="`$CXX --version | head -1 | -- sed -e 's/^.*[^0-9.]\([2-4]\.[0-9.]*\).*$/\1/'`" -- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cxxver" >&5 --$as_echo "$cxxver" >&6; } -- action=none -- case "$cxxver" in -- 1.*) action=error ;; -- 2.[0-8]*) action=error ;; -- 2.90*) action=error ;; -- 2.91.[6-9]*) ;; -- 2.91*) action=warn2 ;; -- 2.96*) action=redhat ;; -- 2.9*) ;; -- 3.0) action=warn3 ;; -- esac -- case $action in -- error) -- as_fn_error "Your c++ compiler ($cxxver) is outdated." "$LINENO" 5 -- ;; -- warn2) -- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Your c++ compiler ($cxxver) has known problems. --------------------------------------------- --*** Please upgrade to gcc-2.95.3 or better. ---------------------------------------------" >&5 --$as_echo "$as_me: WARNING: Your c++ compiler ($cxxver) has known problems. --------------------------------------------- --*** Please upgrade to gcc-2.95.3 or better. ---------------------------------------------" >&2;} -- ;; -- warn3) -- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Your c++ compiler ($cxxver) has known problems. --------------------------------------------- --*** Please upgrade to gcc-3.0.2 or better. ---------------------------------------------" >&5 --$as_echo "$as_me: WARNING: Your c++ compiler ($cxxver) has known problems. --------------------------------------------- --*** Please upgrade to gcc-3.0.2 or better. ---------------------------------------------" >&2;} -- ;; -- redhat) -- # Check for infamous early 2.96 compiler -- for n in `g++ -v 2>&1 | grep version` ; do rhversion=$n ; done -- case "$rhversion" in -- 2.96-1[0-9][0-9]*) ;; -- 2.96-8[5-9]*) ;; -- 2.96-9*) ;; -- *) -- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Your c++ compiler ($cxxver) has known problems. --------------------------------------------------------- --*** You have an early version of the gcc-2.96 compiler. --*** The good news is that the new version works nicely. --*** Check . --*** Please upgrade. ---------------------------------------------------------" >&5 --$as_echo "$as_me: WARNING: Your c++ compiler ($cxxver) has known problems. --------------------------------------------------------- --*** You have an early version of the gcc-2.96 compiler. --*** The good news is that the new version works nicely. --*** Check . --*** Please upgrade. ---------------------------------------------------------" >&2;} -- ;; -- esac -- esac -- # Do we want the pragmas interface/implementation -- case "$cxxver" in -- 2*) cxxpragmas=yes ;; -- 3.0*) cxxpragmas=yes ;; -- *) cxxpragmas=no ;; -- esac -- if test x$cxxpragmas = xyes ; then -- --$as_echo "#define NEED_GNUG_PRAGMAS 1" >>confdefs.h -- -- fi --fi -- -- -- --# ---------------------------------------- --# Qt version check --# ---------------------------------------- -- --# What version of QT are we using --if test x${qt_version+set} = xset ; then -- if test "$qt_version" -lt 200 ; then -- as_fn_error "We no longer support Qt-1x." "$LINENO" 5 -- elif test "$qt_version" -lt 220 ; then -- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: We suggest using QT-2.2.0 or better." >&5 --$as_echo "$as_me: WARNING: We suggest using QT-2.2.0 or better." >&2;} -- fi --fi -- -- - # ---------------------------------------- - # End - # ---------------------------------------- -@@ -19041,24 +17385,6 @@ ac_config_files="$ac_config_files tools/ - - ac_config_files="$ac_config_files xmltools/Makefile" - --ac_config_files="$ac_config_files gui/Makefile" -- --ac_config_files="$ac_config_files gui/bin2cpp/Makefile" -- --ac_config_files="$ac_config_files gui/djview/Makefile" -- --ac_config_files="$ac_config_files gui/nsdejavu/Makefile" -- --ac_config_files="$ac_config_files i18n/Makefile" -- --ac_config_files="$ac_config_files i18n/ja/Makefile" -- --ac_config_files="$ac_config_files i18n/de/Makefile" -- --ac_config_files="$ac_config_files i18n/fr/Makefile" -- --ac_config_files="$ac_config_files i18n/cs/Makefile" -- - ac_config_files="$ac_config_files desktopfiles/Makefile" - - -@@ -19146,6 +17472,7 @@ DEFS=-DHAVE_CONFIG_H - - ac_libobjs= - ac_ltlibobjs= -+U= - for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue - # 1. Remove the extension, and $U if already installed. - ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' -@@ -19307,19 +17634,19 @@ export LANGUAGE - (unset CDPATH) >/dev/null 2>&1 && unset CDPATH - - --# as_fn_error ERROR [LINENO LOG_FD] --# --------------------------------- -+# as_fn_error STATUS ERROR [LINENO LOG_FD] -+# ---------------------------------------- - # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are - # provided, also output the error to LOG_FD, referencing LINENO. Then exit the --# script with status $?, using 1 if that was 0. -+# script with STATUS, using 1 if that was 0. - as_fn_error () - { -- as_status=$?; test $as_status -eq 0 && as_status=1 -- if test "$3"; then -- as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack -- $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 -+ as_status=$1; test $as_status -eq 0 && as_status=1 -+ if test "$4"; then -+ as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack -+ $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 - fi -- $as_echo "$as_me: error: $1" >&2 -+ $as_echo "$as_me: error: $2" >&2 - as_fn_exit $as_status - } # as_fn_error - -@@ -19515,7 +17842,7 @@ $as_echo X"$as_dir" | - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" -- } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" -+ } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" - - - } # as_fn_mkdir_p -@@ -19569,7 +17896,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_wri - # values after options handling. - ac_log=" - This file was extended by djvulibre $as_me 3.5.24, which was --generated by GNU Autoconf 2.65. Invocation command line was -+generated by GNU Autoconf 2.67. Invocation command line was - - CONFIG_FILES = $CONFIG_FILES - CONFIG_HEADERS = $CONFIG_HEADERS -@@ -19635,10 +17962,10 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_writ - ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" - ac_cs_version="\\ - djvulibre config.status 3.5.24 --configured by $0, generated by GNU Autoconf 2.65, -+configured by $0, generated by GNU Autoconf 2.67, - with options \\"\$ac_cs_config\\" - --Copyright (C) 2009 Free Software Foundation, Inc. -+Copyright (C) 2010 Free Software Foundation, Inc. - This config.status script is free software; the Free Software Foundation - gives unlimited permission to copy, distribute and modify it." - -@@ -19654,11 +17981,16 @@ ac_need_defaults=: - while test $# != 0 - do - case $1 in -- --*=*) -+ --*=?*) - ac_option=`expr "X$1" : 'X\([^=]*\)='` - ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` - ac_shift=: - ;; -+ --*=) -+ ac_option=`expr "X$1" : 'X\([^=]*\)='` -+ ac_optarg= -+ ac_shift=: -+ ;; - *) - ac_option=$1 - ac_optarg=$2 -@@ -19680,6 +18012,7 @@ do - $ac_shift - case $ac_optarg in - *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; -+ '') as_fn_error $? "missing file argument" ;; - esac - as_fn_append CONFIG_FILES " '$ac_optarg'" - ac_need_defaults=false;; -@@ -19692,7 +18025,7 @@ do - ac_need_defaults=false;; - --he | --h) - # Conflict between --help and --header -- as_fn_error "ambiguous option: \`$1' -+ as_fn_error $? "ambiguous option: \`$1' - Try \`$0 --help' for more information.";; - --help | --hel | -h ) - $as_echo "$ac_cs_usage"; exit ;; -@@ -19701,7 +18034,7 @@ Try \`$0 --help' for more information."; - ac_cs_silent=: ;; - - # This is an error. -- -*) as_fn_error "unrecognized option: \`$1' -+ -*) as_fn_error $? "unrecognized option: \`$1' - Try \`$0 --help' for more information." ;; - - *) as_fn_append ac_config_targets " $1" -@@ -20113,18 +18446,9 @@ do - "tools/Makefile") CONFIG_FILES="$CONFIG_FILES tools/Makefile" ;; - "tools/jb2cmp/Makefile") CONFIG_FILES="$CONFIG_FILES tools/jb2cmp/Makefile" ;; - "xmltools/Makefile") CONFIG_FILES="$CONFIG_FILES xmltools/Makefile" ;; -- "gui/Makefile") CONFIG_FILES="$CONFIG_FILES gui/Makefile" ;; -- "gui/bin2cpp/Makefile") CONFIG_FILES="$CONFIG_FILES gui/bin2cpp/Makefile" ;; -- "gui/djview/Makefile") CONFIG_FILES="$CONFIG_FILES gui/djview/Makefile" ;; -- "gui/nsdejavu/Makefile") CONFIG_FILES="$CONFIG_FILES gui/nsdejavu/Makefile" ;; -- "i18n/Makefile") CONFIG_FILES="$CONFIG_FILES i18n/Makefile" ;; -- "i18n/ja/Makefile") CONFIG_FILES="$CONFIG_FILES i18n/ja/Makefile" ;; -- "i18n/de/Makefile") CONFIG_FILES="$CONFIG_FILES i18n/de/Makefile" ;; -- "i18n/fr/Makefile") CONFIG_FILES="$CONFIG_FILES i18n/fr/Makefile" ;; -- "i18n/cs/Makefile") CONFIG_FILES="$CONFIG_FILES i18n/cs/Makefile" ;; - "desktopfiles/Makefile") CONFIG_FILES="$CONFIG_FILES desktopfiles/Makefile" ;; - -- *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;; -+ *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;; - esac - done - -@@ -20162,7 +18486,7 @@ $debug || - { - tmp=./conf$$-$RANDOM - (umask 077 && mkdir "$tmp") --} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5 -+} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 - - # Set up the scripts for CONFIG_FILES section. - # No need to generate them if there are no CONFIG_FILES. -@@ -20179,7 +18503,7 @@ if test "x$ac_cr" = x; then - fi - ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` - if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then -- ac_cs_awk_cr='\r' -+ ac_cs_awk_cr='\\r' - else - ac_cs_awk_cr=$ac_cr - fi -@@ -20193,18 +18517,18 @@ _ACEOF - echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && - echo "_ACEOF" - } >conf$$subs.sh || -- as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 --ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` -+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 -+ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` - ac_delim='%!_!# ' - for ac_last_try in false false false false false :; do - . ./conf$$subs.sh || -- as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 -+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 - - ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` - if test $ac_delim_n = $ac_delim_num; then - break - elif $ac_last_try; then -- as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 -+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -@@ -20293,20 +18617,28 @@ if sed "s/$ac_cr//" < /dev/null > /dev/n - else - cat - fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ -- || as_fn_error "could not setup config files machinery" "$LINENO" 5 -+ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 - _ACEOF - --# VPATH may cause trouble with some makes, so we remove $(srcdir), --# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and -+# VPATH may cause trouble with some makes, so we remove sole $(srcdir), -+# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and - # trailing colons and then remove the whole line if VPATH becomes empty - # (actually we leave an empty line to preserve line numbers). - if test "x$srcdir" = x.; then -- ac_vpsub='/^[ ]*VPATH[ ]*=/{ --s/:*\$(srcdir):*/:/ --s/:*\${srcdir}:*/:/ --s/:*@srcdir@:*/:/ --s/^\([^=]*=[ ]*\):*/\1/ -+ ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ -+h -+s/// -+s/^/:/ -+s/[ ]*$/:/ -+s/:\$(srcdir):/:/g -+s/:\${srcdir}:/:/g -+s/:@srcdir@:/:/g -+s/^:*// - s/:*$// -+x -+s/\(=[ ]*\).*/\1/ -+G -+s/\n// - s/^[^=]*=[ ]*$// - }' - fi -@@ -20334,7 +18666,7 @@ for ac_last_try in false false :; do - if test -z "$ac_t"; then - break - elif $ac_last_try; then -- as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5 -+ as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -@@ -20419,7 +18751,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_writ - _ACAWK - _ACEOF - cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -- as_fn_error "could not setup config headers machinery" "$LINENO" 5 -+ as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 - fi # test -n "$CONFIG_HEADERS" - - -@@ -20432,7 +18764,7 @@ do - esac - case $ac_mode$ac_tag in - :[FHL]*:*);; -- :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;; -+ :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;; - :[FH]-) ac_tag=-:-;; - :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; - esac -@@ -20460,7 +18792,7 @@ do - [\\/$]*) false;; - *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; - esac || -- as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;; -+ as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;; - esac - case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac - as_fn_append ac_file_inputs " '$ac_f'" -@@ -20487,7 +18819,7 @@ $as_echo "$as_me: creating $ac_file" >&6 - - case $ac_tag in - *:-:* | *:-) cat >"$tmp/stdin" \ -- || as_fn_error "could not create $ac_file" "$LINENO" 5 ;; -+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; - esac - ;; - esac -@@ -20618,22 +18950,22 @@ s&@INSTALL@&$ac_INSTALL&;t t - $ac_datarootdir_hack - " - eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ -- || as_fn_error "could not create $ac_file" "$LINENO" 5 -+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - - test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && - { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && - { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' --which seems to be undefined. Please make sure it is defined." >&5 -+which seems to be undefined. Please make sure it is defined" >&5 - $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' --which seems to be undefined. Please make sure it is defined." >&2;} -+which seems to be undefined. Please make sure it is defined" >&2;} - - rm -f "$tmp/stdin" - case $ac_file in - -) cat "$tmp/out" && rm -f "$tmp/out";; - *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; - esac \ -- || as_fn_error "could not create $ac_file" "$LINENO" 5 -+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - ;; - :H) - # -@@ -20644,19 +18976,19 @@ which seems to be undefined. Please mak - $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" - } >"$tmp/config.h" \ -- || as_fn_error "could not create $ac_file" "$LINENO" 5 -+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then - { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 - $as_echo "$as_me: $ac_file is unchanged" >&6;} - else - rm -f "$ac_file" - mv "$tmp/config.h" "$ac_file" \ -- || as_fn_error "could not create $ac_file" "$LINENO" 5 -+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - fi - else - $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ -- || as_fn_error "could not create -" "$LINENO" 5 -+ || as_fn_error $? "could not create -" "$LINENO" 5 - fi - ;; - -@@ -21479,7 +19811,7 @@ _ACEOF - ac_clean_files=$ac_clean_files_save - - test $ac_write_fail = 0 || -- as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5 -+ as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 - - - # configure is writing to config.log, and then calls config.status. -@@ -21500,7 +19832,7 @@ if test "$no_create" != yes; then - exec 5>>config.log - # Use ||, not &&, to avoid exiting from the if with $? = 1, which - # would make configure fail if this is the last instruction. -- $ac_cs_success || as_fn_exit $? -+ $ac_cs_success || as_fn_exit 1 - fi - if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 ---- djvulibre-3.5.24.orig/Makefile.in -+++ djvulibre-3.5.24/Makefile.in -@@ -32,17 +32,9 @@ SUBDIRS_FIRST = libdjvu tools - @XML_YES@SUBDIRS_XML = xmltools - @XML_NO@SUBDIRS_XML = - --@GUI_YES@SUBDIRS_GUI = gui --@GUI_NO@SUBDIRS_GUI = -- --@I18N_YES@SUBDIRS_I18N = i18n --@I18N_NO@SUBDIRS_I18N = -- - SUBDIRS_LAST = desktopfiles - --SUBDIRS = ${SUBDIRS_FIRST} ${SUBDIRS_XML} \ -- ${SUBDIRS_GUI} ${SUBDIRS_I18N} \ -- ${SUBDIRS_LAST} -+SUBDIRS = ${SUBDIRS_FIRST} ${SUBDIRS_XML} ${SUBDIRS_I18N} ${SUBDIRS_LAST} - - world: all - @echo "Congratulations: the compilation was successful!" -@@ -67,10 +59,6 @@ install-utils: install-tools - - @XML_YES@install-utils: install-xmltools - --@GUI_YES@install: install-gui -- --@I18N_YES@install: install-i18n -- - @DESKTOP_YES@install: install-desktopfiles - - install-libdjvu: FORCE -@@ -82,12 +70,6 @@ install-tools: FORCE - install-xmltools: FORCE - ( cd xmltools && ${MAKE} install ) - --install-gui: FORCE -- ( cd gui && ${MAKE} install ) -- --install-i18n: FORCE -- ( cd i18n && ${MAKE} install ) -- - install-desktopfiles: FORCE - ( cd desktopfiles && ${MAKE} install ) - ---- djvulibre-3.5.24.orig/NEWS -+++ djvulibre-3.5.24/NEWS -@@ -1,3 +1,11 @@ -+NEW SINCE VERSION 3.5.24 -+------------------------ -+- Removed the deprecated djview3 code. -+- Removed the deprecated cothreads code. -+- Removed the unmaintained japanese man pages. -+- Added ddjvu option to skip corrupted pages. -+ -+ - NEW IN VERSION 3.5.24 - --------------------- - - Set ddjvuapi_version to 20. ---- djvulibre-3.5.24.orig/INSTALL -+++ djvulibre-3.5.24/INSTALL -@@ -37,22 +37,7 @@ You can also compile DjVuLibre with neit - You might never notice the difference. - - --1.3 - QT ---------- -- --The graphical user interface of the viewer relies on the Qt library --from TrollTech . The command line tools --do not rely on Qt and can be compiled independently. -- --The source code of the Qt library can be downloaded from --. -- --Avoid versions earlier than Qt-2.2.0. --The suggested version is Qt-3.3.6 --Qt-4 support is under development. -- -- --1.4 - THREADS -+1.3 - THREADS - ------------- - - The DjVu viewer makes heavy use of multiple threads of execution. Modern -@@ -60,13 +45,10 @@ Unix operating systems come with the sta - DjVuLibre-3.5 fully supports detecting and using Posix threads. - - For the sake of older operating systems, DjVuLibre-3.5 offers a custom --threading model called CoThreads. CoThreads work best with a two line patch --to the GCC compiler. This is described in files "etc/README.libgcc". The --configuration script will auto-detect the available threading model and suggest --applying the GCC patch when it is needed. -+threading model called CoThreads. This should be considered obsolete. - - --1.5 - MAKE -+1.4 - MAKE - ---------- - - There are various kind of "make" programs around with various capabilities. -@@ -98,31 +80,15 @@ configuration script. A complete list c - * Option "--enable-desktopfiles[=(yes|no)]" - - Installs the scripts -- /usr/share/djvu/osi/desktop/register-djvu-mime and -- /usr/share/djvu/osi/desktop/register-djview-menu -+ /usr/share/djvu/osi/desktop/register-djvu-mime - to setup the xdg mime type database and menu entries. - --* Option "--enable-i18n[=(yes|no|languages)]" -- -- Enable generation of translation files and man pages -- for the specified languages. By default, translation files -- and man pages are generated for all available languages -- - * Options "--with-extra-includes=DIR" - and "--with-extra-libraries=DIR" - - This option defines additional directories for - searching include files or libraries. - --* Option "--with-qt=QTDIR" -- -- This option specifies the base location of the Qt library. -- Without this option, the configuration script will inspect -- environment variable QTDIR as well as a few typical locations. -- When everything else fails (that should not happen), you -- can simply define the environment variables -- QT_CFLAGS, QT_LIBS and MOC. -- - * Option "--with-jpeg=JPEGDIR" - - This option specifies a directory where the JPEG library has been -@@ -176,9 +142,8 @@ successful. You can then proceed with t - The installation procedure will: - - - install the executable programs into "${prefix}/bin". --- possibly install the shared library "${prefix}/lib/libdjvu-3.5.so". -+- possibly install the shared library "${prefix}/lib/libdjvulibre-3.5.so". - - install the man pages under "${prefix}/man or ${prefix}/share/man". --- install the Netscape plug-in as "${prefix}/lib/netscape/plugins/nsdejavu.so". - - install various ancillary files under "${prefix}/share/djvu". - - optionally install information files for desktop environments. - -@@ -193,243 +158,3 @@ Of course you must have the appropriate - perform the installation. Chances are that you need to - be root to install something into /usr or /usr/local. - -- -- -- --3- PLUG-IN ISSUES --================ -- -- --3.1- NETSCAPE 4.7 ------------------- -- -- --The DjVu Netscape plug-in is a shared library which runs program djview --in slave mode. This shared library is normally installed in: -- -- ${prefix}/lib/netscape/plugins/nsdejavu.so. -- --Therefore, unless you specified a different prefix to the configure program, --the shared library is installed in /usr/local/lib/netscape/plugins. This is a --good thing since Netscape 4 always searches this directory for plug-ins. -- --3.1.1- DISABLING PREVIOUS VERSIONS OF THE DJVU PLUG-IN -- --You might have however to first disable any previous version of the plug-in. --Selecting menu "Help->About Plugins" in Netscape displays the current list of --plug-ins. Previous versions of the plug-in were often installed in one of the --following locations. -- -- ${HOME}/.netscape/plugins/nsdejavu.so -- /usr/lib/netscape/plugins/nsdejavu.so -- /opt/netscape/plugins/nsdejavu.so -- --You can safely remove these files to disable the previous version of the DjVu --plug-in. You can also remove the directory "DjVu" that was installed under the --corresponding "netscape" or ".netscape" directory. Note that "nsdejavu.so" --and "DjVu" are often symbolic links to the actual installation directory. --Removing the symbolic links is sufficient to disable the plug-in. -- --3.1.2- ALTERNATIVE PLUG-IN INSTALLATION STRATEGIES -- --More complicated cases can be dealt using one of the following strategies. -- --- You can explicitly set the plug-in search path by setting the -- environment variable NPX_PLUGIN_PATH before starting Netscape. -- Setting this variable overrides Netscape default search directories. -- -- $ NPX_PLUGIN_PATH="${prefix}/lib/netscape/plugins:$HOME/.netscape/plugins" -- $ export NPX_PLUGIN_PATH ; netscape -- --- You can create a symbolic link to nsdejavu.so from a place that -- is normally searched by Netscape. -- -- $ cd $HOME/.netscape ; mkdir plugins ; cd plugins -- $ ln -s ${prefix}/lib/netscape/plugins/nsdejavu.so nsdejavu.so -- -- You must not copy nsdejavu.so but create a symbolic link. This is necessary -- because nsdejavu.so will first locate its normal installation directory by -- following the symbolic link, and then will locate the DjVu viewer djview. -- --You can then restart Netscape and select menu "Help->About Plugins" to check --that the DjVu plug-in is properly recognized. The Netscape plug-in search rules --are explained in the README file that usually comes with the Netscape --distribution. -- --3.1.3- TROUBLESHOOTING -- --Sometimes Netscape creates a huge mess in configuration files --named ${HOME}/.mailcap and ${HOME}/.mime.types. The following --command cleans the djvu related entries in these files: -- -- $ djview -fix -- --Then restart Netscape and hope for the best. -- -- -- --3.2- NETSCAPE 6.1 ------------------- -- --It seems that Netscape 6 only recognize plug-ins installed inside its own --plug-in directory. This can be done using a symbolic link. Let us assume that --Netscape 6 is installed in /usr/local/netscape6 and that the DjVu plug-in is --installed in /usr/local/lib/netscape/plugins. -- -- $ cd /usr/local/netscape6/plugins -- $ ln -s /usr/local/lib/netscape/plugins/nsdejavu.so nsdejavu.so -- --You can then run Netscape 6.1 and view DjVu images. -- -- --3.3- KONQUEROR ---------------- -- --The DjVu plug-in works nicely with the Konqueror web browser. -- --In Konqueror, select "Settings->Configure Konqueror". When the dialog --appears, select the icon "Netscape Plugins". Make sure that directory --"${prefix}/lib/netscape/plugins" appears in the list of plug-in directories. --Then press button "Scan for new plugins". Clicking the "Plugins" tab button --should display a list of recognized plug-ins. Check that "nsdejavu.so" appears --there. You should now be able to use DjVu with Konqueror. -- -- --3.4- MOZILLA -------------- -- --You must establish a link from the mozilla plugin directory. Let us assume --that mozilla is installed under /usr/lib/mozilla-1.1 and that the DjVu plug-in --is installed in /usr/local/lib/netscape/plugins. -- -- $ cd /usr/lib/mozilla-1.1/plugins -- $ ln -s /usr/local/lib/netscape/plugins/nsdejavu.so nsdejavu.so -- --Works nicely. -- -- --3.5- GALEON ------------- -- --Install the plugin for mozilla and it will work for galeon. -- -- --3.6- MOZILLA FIREBIRD/FIREFOX ------------------------------- -- --You must establish a link from the appropriate plugin directory. --Let us assume that mozilla is installed under /usr/lib/mozilla-firefox --and that the DjVu plug-in is installed in /usr/local/lib/netscape/plugins. -- -- $ cd /usr/lib/mozilla-firefox/plugins -- $ ln -s /usr/local/lib/netscape/plugins/nsdejavu.so nsdejavu.so -- --Works nicely. -- -- --3.7- OPERA ------------ -- --You must install openmotif to have plugin support in Opera. --The DjVu plugin then works okay. -- -- -- -- -- --4- PORTING NOTES --================ -- -- --4.1- GNU/LINUX ---------------- -- --Simply typing "configure ; make" should work on most recent distributions. -- --In addition, the tarball contains a valid spec file for the rpm packager. --The following command should perform all the compilation steps. -- -- $ rpm -ta djvulibre-3.5.X.tar.gz -- --The resulting rpm files can be found in the usual places. -- -- --4.2- SGI IRIX 6.5 ------------------- -- --Successful compilation using qt-2.3.0. --Compilation was made with gcc-3.0.2 with the thread patch discussed at --. --The configure command line was: -- $ ./configure --enable-rpo \ -- --with-qt=/home/leonb/djvulibre-3.5/BUILDI/qt-2.3.0 \ -- --with-jpeg=/home/leonb/djvulibre-3.5/BUILDI/libjpeg -- -- -- --4.3- SUN SOLARIS 5 -------------------- -- --SPARC-SUN-SOLARIS-5.6: --Successful compilation using qt-2.3.0 --Compilation was made with gcc-3.0.2 with option -fpermissive. --The configure command line was: -- $ ./configure --enable-rpo \ -- --with-qt=/home/leonb/djvulibre-3.5/BUILDS/qt-2.3.0 \ -- --with-jpeg=/home/leonb/djvulibre-3.5/BUILDS/libjpeg \ -- CXX='g++ -fpermissive' -- --I386-SUN-SOLARIS-5.9: --Successful compilation using qt-3.2 and gcc-3.3. -- 1) Installed gcc 3.3 -- 2) Installed and built Qt -- 3) export QTDIR=/usr/local/qt -- 4) export QT_CFLAGS=-I/usr/local/qt/include -- 5) export QT_LIBS='-L/usr/local/qt/lib -lqt -ldl' -- 6) export PATH=$PATH:/usr/ccs/bin -- 7) export PATH=/usr/local/bin:/opt/sfw/bin:$PATH -- 8) export LD_LIBRARY_PATH=/opt/sfw/qt/lib:$LD_LIBRARY_PATH -- export LD_LIBRARY_PATH=/usr/local/lib:/opt/sfw/lib:$LD_LIBRARY_PATH -- 9) cd DjVu/djvulibre-3.5 -- 11) ./configure --with-qt=/usr/local/qt --prefix=/usr/local \ -- CXX='g++ -fpermissive -DNO_MMX -static-libgcc ' -- 12) make -- 13) make install -- -- -- --4.4- FREEBSD-4.4 ------------------ -- --Successful compilation using gnu-make, qt-2.3.1 and gcc-2.95.3. --The configure command line was: -- $ ./configure \ -- JPEG_LIBS='/usr/local/lib/libjpeg.a' \ -- JPEG_CFLAGS='-I/usr/local/include' -- -- -- --4.5- MAC OS X 10.3.2 ---------------------- -- --We envision two ways to compile DjVuLibre on the Mac. --- either using DarwinPorts or Fink --- or using XCode and the native OS-X utilities. -- --4.5.1- USING XCODE AND THE NATIVE UTILITIES -- --Not much has been done at this point. --Please check the file djvulibre-3.5/mac/README. -- --4.5.2- USING DARWINPORTS OR FINK -- --DjVuLibre assumes that you have DarwinPorts in /opt/local --or Fink in /sw. Required packages: libjpeg libtiff qt3. --The configure command line is -- $ ./configure -- --DjVuLibre should then compile and install without problems. --The DjVuLibre viewer 'djview' runs under X11. --Similarly, the DjVuLibre plugin does not run in Safari or MSIE. --It only runs in X11 based browsers such as mozilla or konqueror. -- ---- djvulibre-3.5.24.orig/share/djvu/osi/fr/messages.xml -+++ djvulibre-3.5.24/share/djvu/osi/fr/messages.xml -@@ -7,10 +7,6 @@ - - - -- -- -- -- - - - ---- djvulibre-3.5.24.orig/share/djvu/osi/en/messages.xml -+++ djvulibre-3.5.24/share/djvu/osi/en/messages.xml -@@ -7,10 +7,6 @@ - - - -- -- -- -- - - - ---- djvulibre-3.5.24.orig/share/djvu/osi/zh/messages.xml -+++ djvulibre-3.5.24/share/djvu/osi/zh/messages.xml -@@ -7,10 +7,6 @@ - - - -- -- -- -- - - - ---- djvulibre-3.5.24.orig/share/djvu/osi/ja/messages.xml -+++ djvulibre-3.5.24/share/djvu/osi/ja/messages.xml -@@ -7,10 +7,6 @@ - - - -- -- -- -- - - - ---- djvulibre-3.5.24.orig/share/djvu/osi/de/messages.xml -+++ djvulibre-3.5.24/share/djvu/osi/de/messages.xml -@@ -7,10 +7,6 @@ - - - -- -- -- -- - - - ---- djvulibre-3.5.24.orig/share/djvu/osi/cs/messages.xml -+++ djvulibre-3.5.24/share/djvu/osi/cs/messages.xml -@@ -7,10 +7,6 @@ - - - -- -- -- -- - - - ---- djvulibre-3.5.24.orig/win32/djvulibre/tools.props -+++ djvulibre-3.5.24/win32/djvulibre/tools.props -@@ -8,5 +8,10 @@ - $(DjVuLibreRoot);$(DjVuLibreRoot)\libdjvu;$(TiffRoot);$(TiffDir);%(AdditionalIncludeDirectories) - HAVE_NAMESPACES;HAVE_TIFF;%(PreprocessorDefinitions) - -+ -+ -+ -+ setargv.obj;%(AdditionalDependencies) -+ - - -\ No newline at end of file ---- djvulibre-3.5.24.orig/win32/djvulibre/djvulibre.nsi -+++ djvulibre-3.5.24/win32/djvulibre/djvulibre.nsi -@@ -2,7 +2,7 @@ - - ; HM NIS Edit Wizard helper defines - !define PRODUCT_NAME "DjVuLibre+DjView" --!define PRODUCT_VERSION "3.5.23d+4.6c" -+!define PRODUCT_VERSION "3.5.24+4.7b" - !define PRODUCT_PUBLISHER "DjVuZone" - !define PRODUCT_WEB_SITE "http://djvu.sourceforge.net" - !define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\djview.exe" ---- djvulibre-3.5.24.orig/desktopfiles/README -+++ djvulibre-3.5.24/desktopfiles/README -@@ -25,9 +25,6 @@ There are two ways to exploit them. - - Calling "${datadir}/djvu/osi/desktop/register-djvu-mime install" - installs icons for the djvu files and registers the djvu mime type. -- Calling "${datadir}/djvu/djview3/desktop/register-djview-menu install", -- installs menu icons and menu entries for the djview3 viewer. -- - - - 2 - Install desktop files by hand. -@@ -67,13 +64,3 @@ There are two ways to exploit them. - because djvu information comes with the freedesktop.org - mime type database. - -- * Menu icons for djview3: -- - Install "hi32-djview3.png" -- as "${datadir}/icons/hicolor/32x32/apps/djvulibre-djview3.png". -- -- * Menu entries for djview3: -- - Install "djvulibre-djview3.desktop" -- as "${datadir}/applications/djvulibre-djview3.desktop". -- - Arrange to execute script "update-desktop-database". -- at installation time. -- ---- djvulibre-3.5.24.orig/desktopfiles/Makefile.in -+++ djvulibre-3.5.24/desktopfiles/Makefile.in -@@ -39,20 +39,13 @@ XDG_DESKTOP_MENU = @XDG_DESKTOP_MENU@ - RM = @RM@ - - datadir_djvu = ${datadir}/djvu/osi/desktop --datadir_djview = ${datadir}/djvu/djview3/desktop - - - # -------- all - --all: djvu-icons register-djvu-mime -+all: icons register-djvu-mime - --@GUI_YES@all: djview-icons register-djview-menu -- --icons: djvu-icons djview-icons -- --djvu-icons: hi22-djvu.png hi32-djvu.png hi48-djvu.png hi64-djvu.png hi-djvu.svgz -- --djview-icons: hi32-djview3.png hi64-djview3.png hi-djview3.svgz -+icons: hi22-djvu.png hi32-djvu.png hi48-djvu.png hi64-djvu.png hi-djvu.svgz - - hi22-djvu.png hi32-djvu.png hi48-djvu.png hi64-djvu.png: djvu.svg - s=`echo $@ | sed -e 's/[a-z]*\([0-9]*\).*/\1/'`; \ -@@ -60,18 +53,9 @@ hi22-djvu.png hi32-djvu.png hi48-djvu.pn - || ${CONVERT} -geometry $${s}x$${s} -depth 8 -background none $< $@ \ - || cp ${srcdir}/prebuilt-$@ $@ - --hi32-djview3.png hi64-djview3.png: djview.svg -- s=`echo $@ | sed -e 's/[a-z]*\([0-9]*\).*/\1/'`; \ -- ${RSVG} -w $${s} -h $${s} $< $@ \ -- || ${CONVERT} -geometry $${s}x$${s} -depth 8 -background none $< $@ \ -- || cp ${srcdir}/prebuilt-$@ $@ -- - hi-djvu.svgz: djvu.svg - cat $< | gzip >$@ - --hi-djview3.svgz: djview.svg -- cat $< | gzip >$@ -- - register-djvu-mime: register-djvu-mime.in - sed < ${srcdir}/register-djvu-mime.in > register-djvu-mime \ - -e 's,XDG_MIME,${XDG_MIME},g' \ -@@ -81,22 +65,12 @@ register-djvu-mime: register-djvu-mime.i - -e 's,MYDIR,${datadir_djvu},g' - chmod a+x register-djvu-mime - --register-djview-menu: register-djview-menu.in -- sed < ${srcdir}/register-djview-menu.in > register-djview-menu \ -- -e 's,XDG_MIME,${XDG_MIME},g' \ -- -e 's,XDG_ICON_RESOURCE,${XDG_ICON_RESOURCE},g' \ -- -e 's,XDG_DESKTOP_MENU,${XDG_DESKTOP_MENU},g' \ -- -e 's,DATADIR,${datadir},g' \ -- -e 's,MYDIR,${datadir_djview},g' -- chmod a+x register-djview-menu - - - # -------- install - - install: install-djvu-files - --@GUI_YES@install: install-djview-files -- - install-djvu-files: FORCE - ${INSTALL} -d ${DESTDIR}${datadir_djvu} - ${INSTALL_PROGRAM} register-djvu-mime ${DESTDIR}${datadir_djvu} -@@ -106,20 +80,10 @@ install-djvu-files: FORCE - -@echo "Run ${datadir_djvu}/register-djvu-mime install" - -@echo " to register the djvu mime types and icons." - --install-djview-files: FORCE -- ${INSTALL} -d ${DESTDIR}${datadir_djview} -- ${INSTALL_PROGRAM} register-djview-menu ${DESTDIR}${datadir_djview} -- ${INSTALL_DATA} *djview3.png ${DESTDIR}${datadir_djview} -- ${INSTALL_DATA} *djview3.svgz ${DESTDIR}${datadir_djview} -- ${INSTALL_PROGRAM} ${srcdir}/*djview3.desktop ${DESTDIR}${datadir_djview} -- -@echo "Run ${datadir_djview}/register-djview-menu install" -- -@echo " to register the djview3 menu entries." -- -- - # -------- misc - - clean: FORCE -- -${RM} 2>/dev/null register-djvu-mime register-djview-menu *.png *.svgz -+ -${RM} 2>/dev/null register-djvu-mime *.png *.svgz - - distclean: clean - -${RM} -r 2>/dev/null Makefile *.rpo ii_files ---- djvulibre-3.5.24.orig/config/acinclude.m4 -+++ djvulibre-3.5.24/config/acinclude.m4 -@@ -404,7 +404,7 @@ case "${host_cpu}-${host_os}" in - ;; - esac - case "${host_os}-${GCC}" in -- *linux*-yes) -+ *linux*-yes | *kfreebsd*-yes ) - # On Linux/GCC, libtool uses -nostdlib for linking, which cancel part - # of the -pthread flag effect (libpthread is not automatically linked). - # So we'll try to link with both -pthread and -lpthread first: -@@ -512,73 +512,9 @@ fi - - - dnl ------------------------------------------------------------------ --dnl @synopsis AC_PATH_COTHREADS([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) --dnl Define HAVE_COTHREAD if cothreads can be used. --dnl Define HAVE_COTHREAD_PATCH if cothread libgcc patch is available --dnl ------------------------------------------------------------------ -- --AC_DEFUN([AC_PATH_COTHREAD], [ --AC_REQUIRE([AC_CANONICAL_HOST]) --acx_cothread=no --if test x$GXX = xyes ; then -- AC_MSG_CHECKING([whether cothreads work with ${host_cpu}]) -- case ${host_cpu} in -- i?86|powerpc*|mips*|alpha*|hppa*) -- acx_cothread=yes -- ;; -- esac -- AC_MSG_RESULT($acx_cothread) --fi --if test x$acx_cothread != xno ; then -- AC_MSG_CHECKING([whether libgcc contains the cothread patch]) -- AC_LANG_PUSH(C++) -- AC_TRY_LINK([extern "C" { void *(*__get_eh_context_ptr)(); -- void *__new_eh_context(void); }], -- [ __get_eh_context_ptr = &__new_eh_context;], -- [acx_cothread_patch=yes], [acx_cothread_patch=no]) -- AC_LANG_POP(C++) -- AC_MSG_RESULT($acx_cothread_patch) -- if test x$acx_cothread_patch = xno ; then -- AC_MSG_CHECKING([if the cothread patch is critical]) -- echo 'void foo() { throw "Hello"; }' > conftest.cc -- compile="$CXX $CXXFLAGS -c conftest.cc" -- check="nm conftest.o | grep sjthrow | cat > conftest.out" -- acx_cothread_patch=yes -- if AC_TRY_EVAL(compile) && AC_TRY_EVAL(check) ; then -- if test -z "`cat conftest.out`" ; then -- acx_cothread_patch=no -- fi -- fi -- AC_MSG_RESULT($acx_cothread_patch) -- rm conftest.* -- if test x$acx_cothread_patch = xyes ; then -- acx_cothread=no -- AC_MSG_WARN([Cothread cannot work without the patch]) -- else -- AC_MSG_WARN([Applying the patch is recommended anyway]) -- fi -- AC_MSG_WARN([See the INSTALL file for more information]) -- fi --fi --# Must do. --if test x$acx_cothread = xyes ; then -- AC_DEFINE(HAVE_COTHREAD,1, -- [Define if cothreads are available.]) -- if test x$acx_cothread_patch = xyes ; then -- AC_DEFINE(HAVE_COTHREAD_PATCH,1, -- [Define if libgcc contains the cothread patch.]) -- fi -- ifelse([$1],,:,[$1]) --else -- ifelse([$2],,:,[$2]) --fi --]) -- --dnl ------------------------------------------------------------------ - dnl @synopsis AC_PATH_THREADS([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) - dnl Process optional option --enable-threads --dnl Check availability of pthreads or cothreads --dnl using AC_PATH_PTHREAD and AC_PATH_COTHREAD. -+dnl Check availability of pthreads or cothreads using AC_PATH_PTHREAD - dnl Set output variable THREADS_LIBS and THREADS_CFLAGS - dnl ------------------------------------------------------------------ - -@@ -614,16 +550,6 @@ if test x$ac_use_threads != xno ; then - ;; - esac - fi -- if test x$ac_threads = xno ; then -- case x$ac_use_threads in -- x|xyes|xauto|xcothread) -- AC_PATH_COTHREAD( -- [ ac_threads=cothread -- THREAD_CFLAGS="-DTHREADMODEL=COTHREADS" -- ] ) -- ;; -- esac -- fi - fi - AC_SUBST(THREAD_LIBS) - AC_SUBST(THREAD_CFLAGS) -@@ -705,213 +631,6 @@ jpeg_CreateDecompress(0,0,0);], - ]) - - dnl ------------------------------------------------------------------ --dnl @synopsis AC_PATH_QT([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) --dnl Process option --with-qt=DIR --dnl Define HAVE_QT and set it to QT_VERSION --dnl Set output variables MOC, UIC, QT_LIBS and QT_CFLAGS. --dnl ------------------------------------------------------------------ -- --AC_DEFUN([AC_PATH_QT], --[ -- AC_REQUIRE([AC_PATH_X]) -- AC_REQUIRE([AC_PATH_XTRA]) -- if test ${no_x-no} != yes ; then -- X_LIBS="$X_LIBS $X_PRE_LIBS -lXext -lX11 $X_EXTRA_LIBS" -- fi -- # Variables -- AC_ARG_VAR(QTDIR,[Location of the Qt3 package.]) -- AC_ARG_VAR(QT_CFLAGS,[Flags for compiling Qt3 programs.]) -- AC_ARG_VAR(QT_LIBS,[Flags for linking Qt3 programs.]) -- AC_ARG_VAR(MOC,[Location of the MOC program.]) -- AC_ARG_VAR(UIC,[Location of the UIC program.]) -- # Arguments -- AC_ARG_WITH(qt, -- AC_HELP_STRING([--with-qt=DIR], -- [where the Qt3 root is installed.]), -- [ test x$withval != xyes && QTDIR=$withval ]) -- test x$no_x = xyes && QTDIR=no -- # Check for the lib64 thing -- lib=`basename "$libdir"` -- case "$lib" in lib*) ;; *) lib="lib" ;; esac -- if test $lib = "lib" -o $lib = "lib64" ; then -- libs="$lib" ; else libs="$lib lib"; fi -- # Standard qt directory -- ac_has_qt=no -- if test x$QTDIR != xno ; then -- AC_MSG_CHECKING([for Qt root directory]) -- ac_has_qt=no -- ac_userdef_qt=no -- if test x${QT_CFLAGS+set} = xset || test x${QT_LIBS+set} = xset ; then -- ac_userdef_qt=yes -- ac_has_qt="user defined QT_CFLAGS and QT_LIBS" # no questions asked -- else -- ac_qt_dirs="/usr/local /usr/X11R6 /usr" -- for lib in $libs ; do -- for n in /usr/$lib/qt* ; do -- test -d $n && ac_qt_dirs="$n $ac_qt_dirs" ; -- done -- done -- if test -d "$QTDIR" ; then -- ac_qt_dirs="$QTDIR $ac_qt_dirs" -- fi -- for dir in $ac_qt_dirs ; do -- if test -r $dir/include/qwidget.h ; then -- ac_has_qt=$dir -- QTDIR=$dir -- break -- fi -- done -- fi -- # Unusual install -- if test "x$ac_has_qt" = xno ; then -- ac_qt_names="qt3 qt2 qt" -- ac_qt_dirs="/usr /usr/X11R6 /usr/local" -- case "$host" in -- *-darwin* | *-macos10*) -- if test -d /opt/local ; then -- ac_qt_dirs="/opt/local $ac_qt_dirs" -- elif test -d /sw ; then -- ac_qt_dirs="/sw $ac_qt_dirs" -- fi -- ;; -- esac -- ac_qt_dirs="$QTDIR $prefix $ac_qt_dirs" -- for d in $ac_qt_dirs ; do -- for n in $ac_qt_names ; do -- if test -r $d/include/$n/qwidget.h ; then -- for lib in $libs ; do -- for l in lib$n.so lib$n-mt.so lib$n-mt.dylib lib$n.a lib$n-mt.a ; do -- if test -r $d/$lib/$l ; then -- QT_CFLAGS="-I$d/include/$n" -- QT_LIBS="-L$d/$lib -l$n" -- QTDIR=$d -- ac_has_qt="bsd-style Qt install" -- break 3 -- fi -- done -- for l in libqt.dll.a libqt-mt.dll.a libqt-mt.la libqt.a libqt-mt.a; do -- if test -r $d/$lib/$n/$lib/$l ; then -- QT_CFLAGS="-I$d/include/$n" -- QT_LIBS="-L$d/$lib/$n/$lib -lqt" -- QTDIR=$d/$lib/$n -- ac_has_qt="cygwin-style Qt install" -- break 3 -- fi -- done -- for l in libqt.so libqt-mt.so libqt-mt.dylib libqt.a libqt-mt.a; do -- if test -r $d/$lib/$l ; then -- QT_CFLAGS="-I$d/include/$n" -- QT_LIBS="-L$d/$lib -lqt" -- QTDIR=$d -- ac_has_qt="debian-style Qt install" -- break 3 -- fi -- done -- done -- fi -- done -- done -- fi -- # Print result -- AC_MSG_RESULT($ac_has_qt) -- fi -- # Programs -- if test "x$ac_has_qt" != xno ; then -- if test "x$ac_userdef_qt" != xyes ; then -- if test x${QT_CFLAGS+set} != xset ; then -- QT_CFLAGS="-I$QTDIR/include" -- fi -- if test x${QT_LIBS+set} != xset ; then -- if test -d $QTDIR/$lib ; then -- QT_LIBS="-L$QTDIR/$lib -lqt" -- else -- QT_LIBS="-L$QTDIR/lib -lqt" -- fi -- fi -- # KDE-3.0 styles require qt-mt even in non KDE applications. -- # Bero dixit. See kde bug #40823. -- qt_libdir= -- qt_libname= -- AC_MSG_CHECKING([for multithreaded Qt3 library]) -- for n in `echo $QT_LIBS` ; do case $n in -- -L*) qt_libdir=`echo "$n" | sed -e 's:^-L::'` ;; -- -l*) qt_libname=`echo "$n" | sed -e 's:^-l::'` ;; -- esac -- done -- ac_has_qt_mt=no -- for n in ${qt_libdir}/lib${qt_libname}-mt.so \ -- ${qt_libdir}/lib${qt_libname}-mt.dylib \ -- ${qt_libdir}/lib${qt_libname}-mt.dll.a; do -- if test -r $n ; then -- ac_has_qt_mt=yes -- fi -- done -- AC_MSG_RESULT($ac_has_qt_mt) -- if test $ac_has_qt_mt = yes ; then -- newqtlibs= -- for n in `echo $QT_LIBS` ; do -- test "$n" = "-l$qt_libname" && n="$n-mt" -- newqtlibs="$newqtlibs $n" -- done -- QT_LIBS="$newqtlibs" -- fi -- fi -- AC_PATH_PROGS(MOC, [moc-qt3 moc], [:], [$QTDIR/bin $PATH]) -- AC_PATH_PROGS(UIC, [uic-qt3 uic], [:], [$QTDIR/bin $PATH]) -- AC_PATH_PROGS(LUPDATE, [lupdate-qt3 lupdate], [:], [$QTDIR/bin $PATH]) -- AC_PATH_PROGS(LRELEASE, [lrelease-qt3 lrelease], [:], [$QTDIR/bin $PATH]) -- if test -x "$MOC" ; then : ; else -- AC_MSG_WARN([Cannot locate the Qt Meta-Object compiler.]) -- ac_has_qt=no -- QTDIR=no -- fi -- fi -- # Execute -- if test "x$ac_has_qt" != xno ; then -- AC_MSG_CHECKING([if a small Qt program runs]) -- AC_LANG_PUSH(C++) -- save_CXXFLAGS="$CXXFLAGS" -- save_LIBS="$LIBS" -- CXXFLAGS="$CXXFLAGS $CFLAGS $THREAD_CFLAGS $QT_CFLAGS $X_CFLAGS" -- LIBS="$THREAD_LIBS $QT_LIBS $X_LIBS $LIBS" -- AC_TRY_RUN([ --#include --#include --#include --int main() { --QFile qf("confout"); if (!qf.open(IO_WriteOnly)) return 1; --QTextStream ts(&qf); ts << QT_VERSION; return 0; --}],[okay=yes],[okay=no; QTDIR=no]) -- CXXFLAGS="$save_CXXFLAGS" -- LIBS="$save_LIBS" -- AC_LANG_POP(C++) -- AC_MSG_RESULT($okay) -- if test "x$okay" = xno ; then -- ac_has_qt=no -- fi -- fi -- # Version -- if test "x$ac_has_qt" != xno ; then -- AC_MSG_CHECKING([Qt version]) -- qt_version=`cat < confout` -- AC_MSG_RESULT($qt_version) -- AC_DEFINE_UNQUOTED(HAVE_QT,$qt_version, -- [Define to Qt version if available]) -- rm confout 2>/dev/null -- fi -- # Execute -- if test "x$ac_has_qt" = xno ; then -- QT_CFLAGS= ; QT_LIBS= ; QTDIR= ; MOC=moc ; -- ifelse([$2],,:,[$2]) -- else -- AC_MSG_RESULT([setting QT_CFLAGS=$QT_CFLAGS]) -- AC_MSG_RESULT([setting QT_LIBS=$QT_LIBS]) -- ifelse([$1],,:,[$1]) -- fi --]) -- -- --dnl ------------------------------------------------------------------ - dnl @synopsis AC_PATH_TIFF([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) - dnl Process option --with-tiff - dnl Search LIBTIFF. Define HAVE_TIFF. -@@ -991,39 +710,6 @@ AC_DEFUN([AC_PROG_PKG_CONFIG], - ]) - - --dnl ------------------------------------------------------------------ --dnl @synopsis AC_PATH_GLIB([action-if-found],[action-if-notfound]) --dnl Search for glib. Defines HAVE_GLIB. --dnl Sets output variables GLIB_CFLAGS and GLIB_LIBS --dnl ------------------------------------------------------------------ -- --AC_DEFUN([AC_PATH_GLIB], --[ -- AC_REQUIRE([AC_PROG_PKG_CONFIG]) -- AC_ARG_VAR(GLIB_LIBS, [Libraries for glib-2.0]) -- AC_ARG_VAR(GLIB_CFLAGS, [Compilation flags for glib-2.0]) -- AC_MSG_CHECKING([for glib]) -- if test -x "$PKG_CONFIG" ; then -- if $PKG_CONFIG glib-2.0 ; then -- ac_glib=yes -- AC_MSG_RESULT([found]) -- GLIB_LIBS=`$PKG_CONFIG --libs glib-2.0` -- AC_MSG_RESULT([setting GLIB_LIBS=$GLIB_LIBS]) -- GLIB_CFLAGS=`$PKG_CONFIG --cflags glib-2.0` -- AC_MSG_RESULT([setting GLIB_CFLAGS=$GLIB_CFLAGS]) -- AC_DEFINE(HAVE_GLIB,1,[Define if you have glib-2.0.]) -- ifelse([$1],,:,[$1]) -- else -- AC_MSG_RESULT([not found by pkg-config]) -- ac_glib=no -- ifelse([$2],,:,[$2]) -- fi -- else -- AC_MSG_RESULT([no pkg-config]) -- ac_glib=no -- ifelse([$2],,:,[$2]) -- fi --]) - - - ---- djvulibre-3.5.24.orig/tools/csepdjvu.cpp -+++ djvulibre-3.5.24/tools/csepdjvu.cpp -@@ -162,6 +162,7 @@ - #include "jb2tune.h" - - #include -+#include - #include - - #undef MIN -@@ -1287,7 +1288,7 @@ Comments::textmark(GP mark) - int shx = (mark->x - lastx) * 100 / fontsize; - int shy = (mark->y - lasty) * 100 / fontsize; - int inter = dirx * shx + diry * shy; -- if ( (dirx == lastdirx) && (diry == lastdiry) && -+ if ( (dirx || diry) && (dirx == lastdirx) && (diry == lastdiry) && - (inter > -150) && (inter < 300) && - abs(diry * shx + dirx * shy) < 80 ) - mark->inter = inter; ---- djvulibre-3.5.24.orig/tools/cjb2.cpp -+++ djvulibre-3.5.24/tools/cjb2.cpp -@@ -120,6 +120,7 @@ - #include "jb2tune.h" - - #include -+#include - #include - #if HAVE_TIFF - #include ---- djvulibre-3.5.24.orig/tools/djvups.cpp -+++ djvulibre-3.5.24/tools/djvups.cpp -@@ -57,6 +57,7 @@ - # include "config.h" - #endif - -+#include - #include - #include - #include ---- djvulibre-3.5.24.orig/tools/ddjvu.cpp -+++ djvulibre-3.5.24/tools/ddjvu.cpp -@@ -62,6 +62,7 @@ - # include "config.h" - #endif - -+#include - #include - #include - #include -@@ -131,6 +132,7 @@ ddjvu_rect_t info_size; - ddjvu_rect_t info_segment; - const char *inputfilename = 0; - const char *outputfilename = 0; -+int flag_skip_corrupted = 0; - - #if HAVE_TIFF2PDF - char *tempfilename = 0; -@@ -163,7 +165,6 @@ handle(int wait) - if (msg->m_error.filename) - fprintf(stderr,"ddjvu: '%s:%d'\n", - msg->m_error.filename, msg->m_error.lineno); -- exit(10); - default: - break; - } -@@ -553,8 +554,16 @@ dopage(int pageno) - while (! ddjvu_page_decoding_done(page)) - handle(TRUE); - if (ddjvu_page_decoding_error(page)) -- die(i18n("Cannot decode page %d."), pageno); -- -+ { -+ handle(FALSE); -+ fprintf(stderr,"ddjvu: "); -+ fprintf(stderr,i18n("Cannot decode page %d."), pageno); -+ fprintf(stderr,"\n"); -+ if (flag_skip_corrupted) -+ return; -+ else -+ exit(10); -+ } - timingdata[1] = ticks(); - /* Open files */ - if (flag_format == 't') -@@ -752,19 +761,20 @@ usage() - i18n("DjVu decompression utility\n\n" - "Usage: ddjvu [options] [ []]\n\n" - "Options:\n" -- " -verbose Prints various informational messages.\n" -- " -format=FMT Selects output format: pbm,pgm,ppm,pnm,rle,tiff.\n" -- " -scale=N Selects display scale.\n" -- " -size=WxH Selects size of rendered image.\n" -- " -subsample=N Selects direct subsampling factor.\n" -- " -aspect=no Authorizes aspect ratio changes\n" -- " -segment=WxH+X+Y Selects which segment of the rendered image\n" -- " -mode=black Renders a meaningful bitonal image.\n" -- " -mode=mask Only renders the mask layer.\n" -- " -mode=foreground Only renders the foreground layer.\n" -- " -mode=background Only renders the background layer.\n" -- " -page=PAGESPEC Selects page(s) to be decoded.\n" -- " -quality=QUALITY Specifies jpeg quality for lossy tiff output.\n" -+ " -verbose Print various informational messages.\n" -+ " -format=FMT Select output format: pbm,pgm,ppm,pnm,rle,tiff.\n" -+ " -scale=N Select display scale.\n" -+ " -size=WxH Select size of rendered image.\n" -+ " -subsample=N Select direct subsampling factor.\n" -+ " -aspect=no Authorize aspect ratio changes\n" -+ " -segment=WxH+X+Y Select which segment of the rendered image\n" -+ " -mode=black Render a meaningful bitonal image.\n" -+ " -mode=mask Only render the mask layer.\n" -+ " -mode=foreground Only render the foreground layer.\n" -+ " -mode=background Only render the background layer.\n" -+ " -page=PAGESPEC Select page(s) to be decoded.\n" -+ " -skip Skip corrupted pages instead of aborting.\n" -+ " -quality=QUALITY Specify jpeg quality for lossy tiff output.\n" - "\n" - "If is a single dash or omitted, the decompressed image\n" - "is sent to the standard output. If is a single dash or\n" -@@ -836,7 +846,6 @@ parse_option(int argc, char **argv, int - arg = opt; - opt = "subsample"; - } -- - /* Parse options */ - if (!strcmp(opt,"v") || - !strcmp(opt,"verbose")) -@@ -845,6 +854,12 @@ parse_option(int argc, char **argv, int - die(i18n(errarg), opt); - flag_verbose = 1; - } -+ else if (!strcmp(opt,"skip")) -+ { -+ if (arg) -+ die(i18n(errarg), opt); -+ flag_skip_corrupted = 1; -+ } - else if (!strcmp(opt,"scale")) - { - if (!arg) -@@ -1011,6 +1026,8 @@ main(int argc, char **argv) - die(i18n("Cannot open djvu document '%s'."), inputfilename); - while (! ddjvu_document_decoding_done(doc)) - handle(TRUE); -+ if (ddjvu_document_decoding_error(doc)) -+ die(i18n("Cannot decode document.")); - - /* Process all pages */ - i = ddjvu_document_get_pagenum(doc); ---- djvulibre-3.5.24.orig/tools/djvudump.1 -+++ djvulibre-3.5.24/tools/djvudump.1 -@@ -27,7 +27,7 @@ - djvudump \- Display internal structure of DjVu files. - - .SH SYNOPSIS --.BI "djvudump " "djvufiles" "..." -+.BI "djvudump [-o " "outputfile" "] " "djvufiles" "..." - - .SH DESCRIPTION - Program ---- djvulibre-3.5.24.orig/tools/djvumake.cpp -+++ djvulibre-3.5.24/tools/djvumake.cpp -@@ -153,6 +153,7 @@ - - #include - #include -+#include - #include - #include - ---- djvulibre-3.5.24.orig/tools/ddjvu.1 -+++ djvulibre-3.5.24/tools/ddjvu.1 -@@ -178,6 +178,13 @@ select specific layers of a DjVu image. - These modes can fail if the DjVu image does - not contain the selected layer. - .RE -+.TP -+.BI "-skip" -+Instead of aborting when encountering a corrupted page, -+this option causes -+.BR ddjvu -+to simply skip the corrupted page and continue with the next. -+This is useful for processing certain damaged files. - - .SH RESOLUTION OPTIONS - The following options control the resolution of the output image. ---- djvulibre-3.5.24.orig/tools/djvused.cpp -+++ djvulibre-3.5.24/tools/djvused.cpp -@@ -61,6 +61,7 @@ - #endif - - #include -+#include - #include - #include - #include ---- djvulibre-3.5.24.orig/tools/tiff2pdf.c -+++ djvulibre-3.5.24/tools/tiff2pdf.c -@@ -721,7 +721,6 @@ tiff2pdf(TIFF *input, FILE *outputfile, - const char *outfilename = ""; - T2P *t2p = NULL; - TIFF *output = NULL; -- tsize_t written=0; - int c; - - /* T2P */ -@@ -874,7 +873,7 @@ tiff2pdf(TIFF *input, FILE *outputfile, - TIFFSeekFile(output, (toff_t) 0, SEEK_SET); - - /* Write */ -- written = t2p_write_pdf(t2p, input, output); -+ t2p_write_pdf(t2p, input, output); - if(t2p->t2p_error != 0){ - TIFFError(TIFF2PDF_MODULE, "An error occurred creating output PDF file"); - goto fail; -@@ -2633,7 +2632,6 @@ static tsize_t t2p_readwrite_pdf_image_t - tsize_t read=0; - uint16 i=0; - ttile_t tilecount=0; -- tsize_t tilesize=0; - ttile_t septilecount=0; - tsize_t septilesize=0; - #ifdef JPEG_SUPPORT -@@ -2819,7 +2817,6 @@ static tsize_t t2p_readwrite_pdf_image_t - if(t2p->pdf_sample == T2P_SAMPLE_PLANAR_SEPARATE_TO_CONTIG){ - septilesize=TIFFTileSize(input); - septilecount=TIFFNumberOfTiles(input); -- tilesize=septilesize*t2p->tiff_samplesperpixel; - tilecount=septilecount/t2p->tiff_samplesperpixel; - buffer = (unsigned char*) _TIFFmalloc(t2p->tiff_datasize); - if(buffer==NULL){ -@@ -3802,7 +3799,6 @@ static tsize_t t2p_write_pdf_info(T2P* t - tsize_t written=0; - char* info; - char buffer[512]; -- int buflen=0; - - if(t2p->pdf_datetime==NULL){ - t2p_pdf_tifftime(t2p, input); -@@ -3815,7 +3811,8 @@ static tsize_t t2p_write_pdf_info(T2P* t - } - written += TIFFWriteFile(output, (tdata_t) "\r/Producer ", 11); - _TIFFmemset((tdata_t)buffer, 0x00, 512); -- buflen=sprintf(buffer, "libtiff / tiff2pdf - %d / %s", TIFFLIB_VERSION, T2P_VERSION); -+ sprintf(buffer, "libtiff / tiff2pdf - %d / %s", -+ TIFFLIB_VERSION, T2P_VERSION); - written += t2p_write_pdf_string(buffer, output); - written += TIFFWriteFile(output, (tdata_t) "\r", 1); - if(t2p->pdf_creator != NULL){ ---- djvulibre-3.5.24.orig/tools/tiff2pdf.h -+++ djvulibre-3.5.24/tools/tiff2pdf.h -@@ -22,6 +22,7 @@ - # endif - # if HAVE_TIFF - # include -+# include - # include - # include - # include ---- djvulibre-3.5.24.orig/tools/c44.cpp -+++ djvulibre-3.5.24/tools/c44.cpp -@@ -226,6 +226,7 @@ - #include - #include - #include -+#include - #include - - // command line data ---- djvulibre-3.5.24.orig/tools/djvuextract.cpp -+++ djvulibre-3.5.24/tools/djvuextract.cpp -@@ -105,6 +105,7 @@ - #include "GOS.h" - #include "DjVuMessage.h" - #include -+#include - #include - - ---- djvulibre-3.5.24.orig/tools/djvm.cpp -+++ djvulibre-3.5.24/tools/djvm.cpp -@@ -135,9 +135,9 @@ - #include "DjVuMessage.h" - - #include -+#include - #include - #include --#include - - static const char * progname; - ---- djvulibre-3.5.24.orig/tools/cpaldjvu.cpp -+++ djvulibre-3.5.24/tools/cpaldjvu.cpp -@@ -118,6 +118,7 @@ - #include "jb2tune.h" - - #include -+#include - #include - #include - ---- djvulibre-3.5.24.orig/tools/bzz.cpp -+++ djvulibre-3.5.24/tools/bzz.cpp -@@ -94,6 +94,7 @@ - #include "GURL.h" - #include "DjVuMessage.h" - #include -+#include - #include - - static const char *program = "(unknown)"; ---- djvulibre-3.5.24.orig/tools/djvudump.cpp -+++ djvulibre-3.5.24/tools/djvudump.cpp -@@ -119,8 +119,12 @@ xxx - #include - #include - #include -+#include - #include - -+const char *outputfile = 0; -+FILE *outputf = stdout; -+ - void - display(const GURL &url) - { -@@ -133,7 +137,7 @@ display(const GURL &url) - obs->seek(0); - obs->readall(buf, size); - GNativeString ns = str; -- fputs((const char*)ns, stdout); -+ fputs((const char*)ns, outputf); - } - - -@@ -145,7 +149,7 @@ usage() - "DJVUDUMP --- DjVuLibre-" DJVULIBRE_VERSION "\n" - #endif - "Describes DjVu and IFF85 files\n\n" -- "Usage: djvudump \n" ); -+ "Usage: djvudump [-o outputfile] \n" ); - exit(1); - } - -@@ -155,24 +159,37 @@ main(int argc, char **argv) - setlocale(LC_ALL,""); - setlocale(LC_NUMERIC,"C"); - djvu_programname(argv[0]); -- GArray dargv(0,argc-1); -+ // get output file name -+ if (argc>2 && !strcmp(argv[1],"-o")) -+ { -+ outputfile = argv[2]; -+ argv += 2; -+ argc -= 2; -+ } -+ // convert iff file name -+ GArray dargv(0, argc-1); - for(int i=0;i - #include - #include - #include ---- djvulibre-3.5.24.orig/tools/djvmcvt.cpp -+++ djvulibre-3.5.24/tools/djvmcvt.cpp -@@ -144,6 +144,7 @@ - - #include - #include -+#include - #include - - static const char * progname; ---- djvulibre-3.5.24.orig/tools/djvuserve.cpp -+++ djvulibre-3.5.24/tools/djvuserve.cpp -@@ -73,6 +73,7 @@ - - #include - #include -+#include - #include - #include - #include ---- djvulibre-3.5.24.orig/tools/jb2cmp/patterns.cpp -+++ djvulibre-3.5.24/tools/jb2cmp/patterns.cpp -@@ -303,11 +303,8 @@ static int32 distance_by_pixeldiff_funct - int32 (*compare_row)(byte *, byte *, int32), - int32 (*compare_with_white)(byte *, int32), int32 ceiling) - { -- byte **p1, **p2; - int32 w1, w2, h1, h2; - int32 shift_x, shift_y; /* of i1's coordinate system with respect to i2 */ -- /*int32 s = 0, i, i_start, i_cap; -- int32 right_margin_start, right_margin_width;*/ - - /* make i1 to be narrower than i2 */ - if (i1->width > i2->width) -@@ -317,8 +314,8 @@ static int32 distance_by_pixeldiff_funct - i2 = img; - } - -- w1 = i1->width; h1 = i1->height; p1 = i1->pixels; -- w2 = i2->width; h2 = i2->height; p2 = i2->pixels; -+ w1 = i1->width; h1 = i1->height; -+ w2 = i2->width; h2 = i2->height; - - /* (shift_x, shift_y) */ - /* is what should be added to i1's coordinates to get i2's coordinates. */ -@@ -339,86 +336,6 @@ static int32 distance_by_pixeldiff_funct - - return distance_by_pixeldiff_functions_by_shift( - i1, i2, compare_row, compare_with_white, ceiling, shift_x, shift_y); -- --/* FIXME */ --#if 0 -- /* Compute difference in the non-overlapping top margin */ -- -- if (shift_y < 0) -- { -- /* i1 has top rows not covered by i2 */ -- i_cap = -shift_y; -- for (i = 0; i < i_cap; i++) -- { -- assert(i >= 0 && i < h1); -- s += compare_with_white(p1[i], w1); -- if (s > ceiling) return maxint; -- } -- i_start = i_cap; /* topmost overlapping row in i1's coords */ -- } -- else -- { -- /* i2 has top rows not covered by i1 */ -- for (i = 0; i < shift_y; i++) -- { -- assert(i >= 0 && i < h2); -- s += compare_with_white(p2[i], w2); -- if (s > ceiling) return maxint; -- } -- i_start = 0; -- } -- -- /* Compute difference in the overlapping area */ -- -- i_cap = h2 - shift_y; -- if (h1 < i_cap) i_cap = h1; -- -- right_margin_start = shift_x + w1; -- right_margin_width = w2 - right_margin_start; -- -- for (i = i_start; i < i_cap; i++) /* i is a coordinate in i1 system */ -- { -- int32 y = i + shift_y; /* same row coordinate in i2 system */ -- assert(y >= 0 && y < h2); -- s += compare_with_white(p2[y], shift_x); -- if (s > ceiling) return maxint; -- assert(i >= 0 && i < h1); -- assert(shift_x + w1 <= w2); -- assert(i < h1); -- s += compare_row(p2[y] + shift_x, p1[i], w1); -- if (s > ceiling) return maxint; -- s += compare_with_white(p2[y] + right_margin_start, right_margin_width); -- if (s > ceiling) return maxint; -- } -- -- -- /* Compute difference in the non-overlapping bottom margin */ -- -- if (i_cap == h1) -- { -- /* i2 has bottom rows not covered by i1 */ -- i_start = i_cap + shift_y; -- for (i = i_start; i < h2; i++) -- { -- assert(i >= 0 && i < h2); -- s += compare_with_white(p2[i], w2); -- if (s > ceiling) return maxint; -- } -- } -- else -- { -- /* i1 has bottom rows not covered by i2 */ -- i_start = i_cap; -- for (i = i_cap; i < h1; i++) -- { -- assert(i >= 0 && i < h1); -- s += compare_with_white(p1[i], w1); -- if (s > ceiling) return maxint; -- } -- } -- -- return s; --#endif - } - - #endif ---- djvulibre-3.5.24.orig/xmltools/djvutoxml.cpp -+++ djvulibre-3.5.24/xmltools/djvutoxml.cpp -@@ -71,6 +71,7 @@ - - #include - #include -+#include - #include - #include - #include ---- djvulibre-3.5.24.orig/xmltools/djvuxmlparser.cpp -+++ djvulibre-3.5.24/xmltools/djvuxmlparser.cpp -@@ -70,6 +70,7 @@ - #include - #include - #include -+#include - #include - - static void ---- djvulibre-3.5.24.orig/libdjvu/GOS.cpp -+++ djvulibre-3.5.24/libdjvu/GOS.cpp -@@ -65,6 +65,7 @@ - #include "GOS.h" - #include "GURL.h" - -+#include - #include - #include - #include ---- djvulibre-3.5.24.orig/libdjvu/GThreads.h -+++ djvulibre-3.5.24/libdjvu/GThreads.h -@@ -81,40 +81,12 @@ - the default when compiling under Unix. - \item[-DTHREADMODEL=WINTHREADS] Windows implementation. - This is the default when compiling under Windows. -- \item[-DTHREADMODEL=MACTHREADS] Macintosh implementation, -- which is based on the MacOS cooperative model. The current -- implementation does not yet fully support synchronization. -- This is the default when compiling under MacOS. - \item[-DTHREADMODEL=POSIXTHREADS] Posix implementation. - This implementation also supports DCE threads. The behavior of - the code is subject to the quality of the system implementation of - Posix threads. -- \item[-DTHREADMODEL=COTHREADS] Custom cooperative threads. -- These custom threads do not redefine system calls. Before executing -- a potentially blocking system function, each thread must explicitly -- check whether it is going to block and yield control explicitly if -- this is the case. This code must be compiled with a patched version -- of egcs-1.1.1 \URL{http://egcs.cygnus.com}. The patch addresses -- exception thread-safety and is provided in #"@Tools/libgcc2.c.diff"#. -- Once you get the right compiler, this implementation is remarkably -- compact and portable. A variety of processors are supported, -- including mips, intel, sparc, hppa, and alpha. -- \item[-DTHREADMODEL=JRITHREADS] Java implementation hooks. -- Multi-threading within a Netscape plugin can be tricky. A simple -- idea however consists of implementing the threading primitives in -- Java and to access them using JRI. The classes just contain a -- JRIGlobalRef. This is not a real implementation since everything -- (Java code, native functions, stubs, exception thread safety) must -- be addressed by the plugin source code. Performance may be a serious -- issue. - \end{description} - -- {\bf Portability}: The simultaneous use of threads and exceptions caused a -- lot of portability headaches under Unix. We eventually decided to -- implement the COTHREADS cooperative threads (because preemptive threads -- have more problems) and to patch EGCS in order to make exception handling -- COTHREAD-safe. -- - @memo - Portable threads - @author -@@ -133,20 +105,14 @@ - #include "GException.h" - - #define NOTHREADS 0 --#define COTHREADS 1 --#define JRITHREADS 2 - #define POSIXTHREADS 10 - #define WINTHREADS 11 --#define MACTHREADS 12 - - // Known platforms - #ifndef THREADMODEL - #if defined(WIN32) - #define THREADMODEL WINTHREADS - #endif --#if defined(macintosh) --#define THREADMODEL MACTHREADS --#endif - #endif - - // Exception emulation is not thread safe -@@ -183,16 +149,6 @@ - #include - #endif - --#if THREADMODEL==JRITHREADS --#include "jri.h" --#endif -- --#if THREADMODEL==COTHREADS --#include --#include --#include --#endif -- - - // ---------------------------------------- - // PORTABLE CLASSES -@@ -260,67 +216,14 @@ public: - static int yield(); - /** Returns a value which uniquely identifies the current thread. */ - static void *current(); -- - #if THREADMODEL==WINTHREADS - private: - HANDLE hthr; - DWORD thrid; --#elif THREADMODEL==MACTHREADS --private: -- unsigned long thid; -- static pascal void *start(void *arg); - #elif THREADMODEL==POSIXTHREADS - private: - pthread_t hthr; - static void *start(void *arg); --#elif THREADMODEL==JRITHREADS --private: -- JRIGlobalRef obj; --#elif THREADMODEL==COTHREADS -- friend class GMonitor; --public: -- class cotask; -- class cotask *task; -- /** Replaces system call #select# (COTHREADS only). The #COTHREADS# model -- does not redefine system function. System functions therefore can -- potentially block the whole process (instead of blocking the current -- thread only) because the system is not aware of the #COTHREADS# -- scheduler. The function #GThread::select# is a #COTHREADS#-aware -- replacement for the well known system function #select#. You can also -- use #GThread::select# for making sure that calls to system functions -- will not block the entire process, as demonstrated below: -- \begin{verbatim} -- int -- gthread_read(int fd, void *buffer, size_t len) -- { -- fd_set rdset; -- FD_ZERO(&rdset); -- FD_SET(fd, &rdset); -- GThread::select(fd+1, &rdset, 0, 0, 0); -- return read(fd, buffer, len); -- } -- \end{verbatim} */ -- static int select(int nfds, fd_set*, fd_set*, fd_set*, struct timeval*); -- /** Provide arguments for system call #select# (COTHREADS only). It may be -- appropriate to call the real system call #select# if the current thread -- is the only thread ready to run. Other threads however may wake up when -- certain file descriptors are ready or when a certain delay expires. -- Function #get_select# returns this information by filling the three -- usual file descriptor sets (similar to the arguments of system call -- #select#). It also returns a timeout #timeout# expressed in -- milliseconds. Note that this timeout is zero is the current thread is -- not the sole thread ready to run. */ -- static void get_select(int &nfds, fd_set*, fd_set*, fd_set*, unsigned long &timeout); -- /** Install hooks in the scheduler (COTHREADS only). The hook function -- #call# is called when a new thread is created (argument is -- #GThread::CallbackCreate#), when a thread terminates (argument is -- #GThread::CallbackTerminate#), or when thread is unblocked (argument is -- #GThread::CallbackUnblock#). This callback can be useful in certain GUI -- toolkits where the most convenient method for scheduling the threads -- consists in setting a timer event that calls \Ref{GThread::yield}. */ -- static void set_scheduling_callback(void (*call)(int)); -- enum { CallbackCreate, CallbackTerminate, CallbackUnblock }; -- - #endif - public: - // Should be considered as private -@@ -401,26 +304,12 @@ private: - CRITICAL_SECTION cs; - struct thr_waiting *head; - struct thr_waiting *tail; --#elif THREADMODEL==MACTHREADS -- int ok; -- int count; -- unsigned long locker; -- int wlock; -- int wsig; - #elif THREADMODEL==POSIXTHREADS - int ok; - int count; - pthread_t locker; - pthread_mutex_t mutex; - pthread_cond_t cond; --#elif THREADMODEL==COTHREADS -- int ok; -- int count; -- void *locker; -- int wlock; -- int wsig; --#elif THREADMODEL==JRITHREADS -- JRIGlobalRef obj; - #endif - private: - // Disable default members ---- djvulibre-3.5.24.orig/libdjvu/JPEGDecoder.h -+++ djvulibre-3.5.24/libdjvu/JPEGDecoder.h -@@ -64,6 +64,7 @@ - - #ifdef NEED_JPEG_DECODER - -+#include - #include - #include - ---- djvulibre-3.5.24.orig/libdjvu/ZPCodec.cpp -+++ djvulibre-3.5.24/libdjvu/ZPCodec.cpp -@@ -66,6 +66,8 @@ - #include "ZPCodec.h" - #include "ByteStream.h" - #include "GException.h" -+ -+#include - #include - #include - #include ---- djvulibre-3.5.24.orig/libdjvu/DjVuGlobal.cpp -+++ djvulibre-3.5.24/libdjvu/DjVuGlobal.cpp -@@ -76,6 +76,8 @@ - #include "GThreads.h" - #include "GException.h" - #include "GContainer.h" -+ -+#include - #include - #include - #include ---- djvulibre-3.5.24.orig/libdjvu/ddjvuapi.h -+++ djvulibre-3.5.24/libdjvu/ddjvuapi.h -@@ -64,6 +64,7 @@ extern "C" { - } - #endif - -+#include - #include - #include - -@@ -1618,7 +1619,7 @@ ddjvu_anno_get_metadata(miniexp_t annota - Returns zero if no such key is present. */ - - DDJVUAPI const char * --ddjvu_anno_get_xmp(miniexp_t annotations, miniexp_t xmp); -+ddjvu_anno_get_xmp(miniexp_t annotations); - - - /* -------------------------------------------------- */ ---- djvulibre-3.5.24.orig/libdjvu/DjVuMessage.cpp -+++ djvulibre-3.5.24/libdjvu/DjVuMessage.cpp -@@ -71,6 +71,7 @@ - #include "debug.h" - #include - #include -+#include - #include - #ifdef WIN32 - # include ---- djvulibre-3.5.24.orig/libdjvu/GThreads.cpp -+++ djvulibre-3.5.24/libdjvu/GThreads.cpp -@@ -71,6 +71,8 @@ - #include "GThreads.h" - #include "GException.h" - #include "DjVuMessageLite.h" -+ -+#include - #include - #include - -@@ -100,13 +102,6 @@ - #if THREADMODEL==WINTHREADS - # include - #endif --#if THREADMODEL==COTHREADS --# include --# include --# include --# include --# include --#endif - - - #ifdef HAVE_NAMESPACES -@@ -378,257 +373,6 @@ GMonitor::wait(unsigned long timeout) - #endif - - -- --// ---------------------------------------- --// MACTHREADS IMPLEMENTATION (obsolete) --// ---------------------------------------- -- --#if THREADMODEL==MACTHREADS -- --// Doubly linked list of waiting threads --struct thr_waiting { -- struct thr_waiting *next; // ptr to next waiting thread record -- struct thr_waiting *prev; // ptr to ptr to this waiting thread -- unsigned long thid; // id of waiting thread -- int *wchan; // cause of the wait --}; --static struct thr_waiting *first_waiting_thr = 0; --static struct thr_waiting *last_waiting_thr = 0; -- -- --// Stops current thread. --// Argument ``self'' must be current thread id. --// Assumes ``ThreadBeginCritical'' has been called before. --static void --macthread_wait(ThreadID self, int *wchan) --{ -- // Prepare and link wait record -- struct thr_waiting wait; // no need to malloc :-) -- wait.thid = self; -- wait.wchan = wchan; -- wait.next = 0; -- wait.prev = last_waiting_thr; -- *(wait.prev ? &wait.prev->next : &first_waiting_thr ) = &wait; -- *(wait.next ? &wait.next->prev : &last_waiting_thr ) = &wait; -- // Leave critical section and start waiting. -- (*wchan)++; -- SetThreadStateEndCritical(self, kStoppedThreadState, kNoThreadID); -- // The Apple documentation says that the above call reschedules a new -- // thread. Therefore it will only return when the thread wakes up. -- ThreadBeginCritical(); -- (*wchan)--; -- // Unlink wait record -- *(wait.prev ? &wait.prev->next : &first_waiting_thr ) = wait.next; -- *(wait.next ? &wait.next->prev : &last_waiting_thr ) = wait.prev; -- // Returns from the wait. --} -- --// Wakeup one thread or all threads waiting on cause wchan --static void --macthread_wakeup(int *wchan, int onlyone) --{ -- if (*wchan == 0) -- return; -- for (struct thr_waiting *q=first_waiting_thr; q; q=q->next) -- if (q->wchan == wchan) { -- // Found a waiting thread -- q->wchan = 0; -- SetThreadState(q->thid, kReadyThreadState, kNoThreadID); -- if (onlyone) -- return; -- } --} -- --GThread::GThread(int stacksize) -- : thid(kNoThreadID), xentry(0), xarg(0) --{ --} -- --GThread::~GThread(void) --{ -- thid = kNoThreadID; --} -- --pascal void * --GThread::start(void *arg) --{ -- GThread *gt = (GThread*)arg; -- try -- { -- G_TRY -- { -- (gt->xentry)(gt->xarg); -- } -- G_CATCH(ex) -- { -- ex.perror(); -- DjVuMessageLite::perror( ERR_MSG("GThreads.uncaught") ); --#ifdef _DEBUG -- abort(); --#endif -- } -- G_ENDCATCH; -- } -- catch(...) -- { -- DjVuMessageLite::perror( ERR_MSG("GThreads.unrecognized") ); --#ifdef _DEBUG -- abort(); --#endif -- } -- return 0; --} -- --int --GThread::create(void (*entry)(void*), void *arg) --{ -- if (xentry || thid!=kNoThreadID) -- return -1; -- xentry = entry; -- xarg = arg; -- int err = NewThread( kCooperativeThread, GThread::start , this, 0, -- kCreateIfNeeded, (void**)nil, &thid ); -- if( err != noErr ) -- return err; -- return 0; --} -- --void --GThread::terminate() --{ -- if (thid != kNoThreadID) { -- DisposeThread( thid, NULL, false ); -- thid = kNoThreadID; -- } --} -- --int --GThread::yield() --{ -- YieldToAnyThread(); -- return 0; --} -- --void* --GThread::current() --{ -- unsigned long thid = kNoThreadID; -- GetCurrentThread(&thid); -- return (void*) thid; --} -- -- --// GMonitor implementation --GMonitor::GMonitor() -- : ok(0), count(1), locker(0), wlock(0), wsig(0) --{ -- locker = kNoThreadID; -- ok = 1; --} -- --GMonitor::~GMonitor() --{ -- ok = 0; -- ThreadBeginCritical(); -- macthread_wakeup(&wsig, 0); -- macthread_wakeup(&wlock, 0); -- ThreadEndCritical(); -- YieldToAnyThread(); --} -- --void --GMonitor::enter() --{ -- ThreadID self; -- GetCurrentThread(&self); -- ThreadBeginCritical(); -- if (count>0 || self!=locker) -- { -- while (ok && count<=0) -- macthread_wait(self, &wlock); -- count = 1; -- locker = self; -- } -- count -= 1; -- ThreadEndCritical(); --} -- --void --GMonitor::leave() --{ -- ThreadID self; -- GetCurrentThread(&self); -- if (ok && (count>0 || self!=locker)) -- G_THROW( ERR_MSG("GThreads.not_acq_leave") ); -- ThreadBeginCritical(); -- if (++count > 0) -- macthread_wakeup(&wlock, 1); -- ThreadEndCritical(); --} -- --void --GMonitor::signal() --{ -- ThreadID self; -- GetCurrentThread(&self); -- if (count>0 || self!=locker) -- G_THROW( ERR_MSG("GThreads.not_acq_signal") ); -- ThreadBeginCritical(); -- macthread_wakeup(&wsig, 1); -- ThreadEndCritical(); --} -- --void --GMonitor::broadcast() --{ -- ThreadID self; -- GetCurrentThread(&self); -- if (count>0 || self!=locker) -- G_THROW( ERR_MSG("GThreads.not_acq_broad") ); -- ThreadBeginCritical(); -- macthread_wakeup(&wsig, 0); -- ThreadEndCritical(); --} -- --void --GMonitor::wait() --{ -- // Check state -- ThreadID self; -- GetCurrentThread(&self); -- if (count>0 || locker!=self) -- G_THROW( ERR_MSG("GThreads.not_acq_wait") ); -- // Wait -- if (ok) -- { -- // Atomically release monitor and wait -- ThreadBeginCritical(); -- int sav_count = count; -- count = 1; -- macthread_wakeup(&wlock, 1); -- macthread_wait(self, &wsig); -- // Re-acquire -- while (ok && count<=0) -- macthread_wait(self, &wlock); -- count = sav_count; -- locker = self; -- ThreadEndCritical(); -- } --} -- --void --GMonitor::wait(unsigned long timeout) --{ -- // Timeouts are not used for anything important. -- // Just ignore the timeout and wait the regular way. -- if (timeout > 0) -- wait(); --} -- --#endif -- -- -- - // ---------------------------------------- - // POSIXTHREADS IMPLEMENTATION - // ---------------------------------------- -@@ -898,922 +642,6 @@ GMonitor::wait(unsigned long timeout) - - - --// ---------------------------------------- --// CUSTOM COOPERATIVE THREADS --// ---------------------------------------- -- --#if THREADMODEL==COTHREADS -- --#ifndef __GNUG__ --#error "COTHREADS require G++" --#endif --#if (__GNUC__<2) || ((__GNUC__==2) && (__GNUC_MINOR__<=90)) --#warning "COTHREADS require EGCS-1.1.1 with Leon's libgcc patch." --#warning "You may have trouble with thread-unsafe exceptions..." --#define NO_LIBGCC_HOOKS --#endif -- --// -------------------------------------- constants -- --// Minimal stack size --#define MINSTACK (32*1024) --// Default stack size --#define DEFSTACK (127*1024) --// Maxtime between checking fdesc (ms) --#define MAXFDWAIT (200) --// Maximum time to wait in any case --#define MAXWAIT (60*60*1000) --// Maximum penalty for hog task (ms) --#define MAXPENALTY (1000) --// Trace task switches --#undef COTHREAD_TRACE --#undef COTHREAD_TRACE_VERBOSE -- --// -------------------------------------- context switch code -- --struct mach_state { -- jmp_buf buf; --}; -- --static void --mach_switch(mach_state *st1, mach_state *st2) --{ --#if #cpu(sparc) -- asm("ta 3"); // save register windows --#endif -- if (! setjmp(st1->buf)) -- longjmp(st2->buf, 1); --} -- --static void --mach_start(mach_state *st1, void *pc, char *stacklo, char *stackhi) --{ --#if #cpu(sparc) -- asm("ta 3"); // save register windows --#endif -- if (! setjmp(st1->buf)) -- { -- // The following code must perform two tasks: -- // -- set stack pointer to a proper value between #stacklo# and #stackhi#. -- // -- branch to or call the function at address #pc#. -- // This function never returns ... so there is no need to save anything --#if #cpu(mips) -- char *sp = (char*)(((unsigned long)stackhi-16) & ~0xff); -- asm volatile ("move $sp,%0\n\t" // set new stack pointer -- "move $25,%1\n\t" // call subroutine via $25 -- "jal $25\n\t" // call subroutine via $25 -- "nop" // delay slot -- : : "r" (sp), "r" (pc) ); --#elif #cpu(i386) -- char *sp = (char*)(((unsigned long)stackhi-16) & ~0xff); -- asm volatile ("movl %0,%%esp\n\t" // set new stack pointer -- "call *%1" // call function -- : : "r" (sp), "r" (pc) ); --#elif #cpu(sparc) -- char *sp = (char*)(((unsigned long)stackhi-16) & ~0xff); -- asm volatile ("ta 3\n\t" // saving the register windows will not hurt. -- "mov %0,%%sp\n\t" // set new stack pointer -- "call %1,0\n\t" // call function -- "nop" // delay slot -- : : "r" (sp), "r" (pc) ); --#elif #cpu(hppa) -- char *sp = (char*)(((unsigned long)stacklo+128+255) & ~0xff); -- asm volatile("copy %0,%%sp\n\t" // set stack pointer -- "copy %1,%%r22\n\t" // set call address -- ".CALL\n\t" // call pseudo instr (why?) -- "bl $$dyncall,%%r31\n\t" // call -- "copy %%r31,%%r2" // delay slot ??? -- : : "r" (sp), "r" (pc) ); --#elif #cpu(alpha) -- char *sp = (char*)(((unsigned long)stackhi-16) & ~0xff); -- asm volatile ("bis $31,%0,$30\n\t" // set new stack pointer -- "bis $31,%1,$27\n\t" // load function pointer -- "jsr $26,($27),0" // call function -- : : "r" (sp), "r" (pc) ); --#elif #cpu(powerpc) -- char *sp = (char*)(((unsigned long)stackhi-16) & ~0xff); -- asm volatile ("mr 1,%0\n\t" // set new stack pointer -- "mr 0,%1\n\t" // load func pointer into r0 -- "mtlr 0\n\t" // load link register with r0 -- "blrl" // branch -- : : "r" (sp), "r" (pc) ); --#elif #cpu(m68k) && defined(COTHREAD_UNTESTED) -- char *sp = (char*)(((unsigned long)stackhi-16) & ~0xff); -- asm volatile ("move%.l %0,%Rsp\n\t" // set new stack pointer -- "jmp %a1" // branch to address %1 -- : : "r" (sp), "a" (pc) ); --#elif #cpu(arm) && defined(COTHREAD_UNTESTED) -- char *sp = (char*)(((unsigned long)stackhi-16) & ~0xff); -- asm volatile ("mov %|sp, %0\n\t" // set new stack pointer --# if defined(__ARM_ARCH_4__) || defined(__ARM_ARCH_4T__) -- "mov %|pc, %1" // branch to address %1 --# else -- "bx %1" // branch to address %1 --# endif -- : : "r" (sp), "r" (pc) ); --#else --#error "COTHREADS not supported on this machine." --#error "Try -DTHREADMODEL=NOTHREADS." --#endif -- // We should never reach this point -- abort(); -- // Note that this call to abort() makes sure -- // that function mach_start() is compiled as a non-leaf -- // function. It is indeed a non-leaf function since the -- // piece of assembly code calls a function, but the compiler -- // would not know without the call to abort() ... -- } --} -- --#ifdef CHECK --// This code can be used to verify that task switching works. --char stack[16384]; --mach_state st1, st2; --void th2() { -- puts("2b"); mach_switch(&st2, &st1); -- puts("4b"); mach_switch(&st2, &st1); -- puts("6b"); mach_switch(&st2, &st1); --} --void th2relay() { -- th2(); puts("ooops\n"); --} --void th1() { -- mach_start(&st1, (void*)th2relay, stack, stack+sizeof(stack)); -- puts("3a"); mach_switch(&st1, &st2); -- puts("5a"); mach_switch(&st1, &st2); --} --int main() { -- puts("1a"); th1(); puts("6a"); --} --#endif -- -- -- --// -------------------------------------- select -- --struct coselect { -- int nfds; -- fd_set rset; -- fd_set wset; -- fd_set eset; --}; -- --static void --coselect_merge(coselect *dest, coselect *from) --{ -- int i; -- int nfds = from->nfds; -- if (nfds > dest->nfds) -- dest->nfds = nfds; -- for (i=0; irset)) FD_SET(i, &dest->rset); -- for (i=0; iwset)) FD_SET(i, &dest->wset); -- for (i=0; ieset)) FD_SET(i, &dest->eset); --} -- --static int --coselect_test(coselect *c) --{ -- static timeval tmzero = {0,0}; -- fd_set copyr = c->rset; -- fd_set copyw = c->wset; -- fd_set copye = c->eset; -- return select(c->nfds, ©r, ©w, ©e, &tmzero); --} -- -- --// -------------------------------------- cotask -- --class GThread::cotask { --public: --#ifndef NO_LIBGCC_HOOKS -- cotask(const int xstacksize,void *); --#else -- cotask(const int xstacksize); --#endif -- ~cotask(); -- class GThread::cotask *next; -- class GThread::cotask *prev; -- // context -- mach_state regs; -- // stack information -- char *stack; -- GPBuffer gstack; -- int stacksize; -- // timing information -- unsigned long over; -- // waiting information -- void *wchan; -- coselect *wselect; -- unsigned long *maxwait; -- // delete after termination -- bool autodelete; -- // egcs exception support --#ifndef NO_LIBGCC_HOOKS -- void *ehctx; --#endif --}; -- --#ifndef NO_LIBGCC_HOOKS --GThread::cotask::cotask(const int xstacksize, void *xehctx) --#else --GThread::cotask::cotask(const int xstacksize) --#endif --: next(0), prev(0), gstack(stack,xstacksize), stacksize(xstacksize), -- over(0), wchan(0), wselect(0), maxwait(0), autodelete(false) --#ifndef NO_LIBGCC_HOOKS -- ,ehctx(xehctx) --#endif --{ -- memset(®s,0,sizeof(regs)); --} -- --static GThread::cotask *maintask = 0; --static GThread::cotask *curtask = 0; --static GThread::cotask *autodeletetask = 0; --static unsigned long globalmaxwait = 0; --static void (*scheduling_callback)(int) = 0; --static timeval time_base; -- -- --GThread::cotask::~cotask() --{ -- gstack.resize(0); --#ifndef NO_LIBGCC_HOOKS -- if (ehctx) -- free(ehctx); -- ehctx = 0; --#endif --} -- --static void --cotask_free(GThread::cotask *task) --{ --#ifdef COTHREAD_TRACE -- DjVuPrintErrorUTF8("cothreads: freeing task %p with autodelete=%d\n", -- task,task->autodelete); --#endif -- if (task!=maintask) -- { -- delete task; -- } --} -- -- --// -------------------------------------- time -- --static unsigned long --time_elapsed(int reset=1) --{ -- timeval tm; -- gettimeofday(&tm, NULL); -- long msec = (tm.tv_usec-time_base.tv_usec)/1000; -- unsigned long elapsed = (long)(tm.tv_sec-time_base.tv_sec)*1000 + msec; -- if (reset && elapsed>0) -- { --#ifdef COTHREAD_TRACE --#ifdef COTHREAD_TRACE_VERBOSE -- DjVuPrintErrorUTF8("cothreads: %4ld ms in task %p\n", elapsed, curtask); --#endif --#endif -- time_base.tv_sec = tm.tv_sec; -- time_base.tv_usec += msec*1000; -- } -- return elapsed; --} -- -- --// -------------------------------------- scheduler -- --static int --cotask_yield() --{ -- // ok -- if (! maintask) -- return 0; -- // get elapsed time and return immediately when it is too small -- unsigned long elapsed = time_elapsed(); -- if (elapsed==0 && curtask->wchan==0 && curtask->prev && curtask->next) -- return 0; -- // adjust task running time -- curtask->over += elapsed; -- if (curtask->over > MAXPENALTY) -- curtask->over = MAXPENALTY; -- // start scheduling -- reschedule: -- // try unblocking tasks -- GThread::cotask *n = curtask->next; -- GThread::cotask *q = n; -- do -- { -- if (q->wchan) -- { -- if (q->maxwait && *q->maxwait<=elapsed) -- { -- *q->maxwait = 0; -- q->wchan=0; -- q->maxwait=0; -- q->wselect=0; -- } -- else if (q->wselect && globalmaxwait<=elapsed && coselect_test(q->wselect)) -- { -- q->wchan=0; -- if (q->maxwait) -- *q->maxwait -= elapsed; -- q->maxwait = 0; -- q->wselect=0; -- } -- if (q->maxwait) -- *q->maxwait -= elapsed; -- } -- q = q->next; -- } -- while (q!=n); -- // adjust globalmaxwait -- if (globalmaxwait < elapsed) -- globalmaxwait = MAXFDWAIT; -- else -- globalmaxwait -= elapsed; -- // find best candidate -- static int count; -- unsigned long best = MAXPENALTY + 1; -- GThread::cotask *r = 0; -- count = 0; -- q = n; -- do -- { -- if (! q->wchan) -- { -- count += 1; -- if (best > q->over) -- { -- r = q; -- best = r->over; -- } -- } -- q = q->next; -- } -- while (q != n); -- // found -- if (count > 0) -- { -- // adjust over -- q = n; -- do -- { -- q->over = (q->over>best ? q->over-best : 0); -- q = q->next; -- } -- while (q != n); -- // Switch -- if (r != curtask) -- { --#ifdef COTHREAD_TRACE -- DjVuPrintErrorUTF8("cothreads: ----- switch to %p [%ld]\n", r, best); --#endif -- GThread::cotask *old = curtask; -- curtask = r; -- mach_switch(&old->regs, &curtask->regs); -- } -- // handle autodelete -- if (autodeletetask && autodeletetask->autodelete) -- cotask_free(autodeletetask); -- autodeletetask = 0; -- // return -- if (count == 1) -- return 1; -- return 0; -- } -- // No task ready -- count = 0; -- unsigned long minwait = MAXWAIT; -- coselect allfds; -- allfds.nfds = 1; -- FD_ZERO(&allfds.rset); -- FD_ZERO(&allfds.wset); -- FD_ZERO(&allfds.eset); -- q = n; -- do -- { -- if (q->maxwait || q->wselect) -- count += 1; -- if (q->maxwait && *q->maxwaitmaxwait; -- if (q->wselect) -- coselect_merge(&allfds, q->wselect); -- q = q->next; -- } -- while (q != n); -- // abort on deadlock -- if (count == 0) { -- DjVuMessageLite::perror( ERR_MSG("GThreads.panic") ); -- abort(); -- } -- // select -- timeval tm; -- tm.tv_sec = minwait/1000; -- tm.tv_usec = 1000*(minwait-1000*tm.tv_sec); -- select(allfds.nfds,&allfds.rset, &allfds.wset, &allfds.eset, &tm); -- // reschedule -- globalmaxwait = 0; -- elapsed = time_elapsed(); -- goto reschedule; --} -- -- --static void --cotask_terminate(GThread::cotask *task) --{ --#ifdef COTHREAD_TRACE -- DjVuPrintErrorUTF8("cothreads: terminating task %p\n", task); --#endif -- if (task && task!=maintask) -- { -- if (task->prev && task->next) -- { -- if (scheduling_callback) -- (*scheduling_callback)(GThread::CallbackTerminate); -- task->prev->next = task->next; -- task->next->prev = task->prev; -- // mark task as terminated -- task->prev = 0; -- // self termination -- if (task == curtask) -- { -- if (task->autodelete) -- autodeletetask = task; -- cotask_yield(); -- } -- } -- } --} -- -- --static void --cotask_wakeup(void *wchan, int onlyone) --{ -- if (maintask && curtask) -- { -- GThread::cotask *n = curtask->next; -- GThread::cotask *q = n; -- do -- { -- if (q->wchan == wchan) -- { -- q->wchan=0; -- q->maxwait=0; -- q->wselect=0; -- q->over = 0; -- if (onlyone) -- return; -- } -- q = q->next; -- } -- while (q!=n); -- } --} -- -- --// -------------------------------------- select / get_select -- --static int --cotask_select(int nfds, -- fd_set *rfds, fd_set *wfds, fd_set *efds, -- struct timeval *tm) --{ -- // bypass -- if (maintask==0 || (tm && tm->tv_sec==0 && tm->tv_usec<1000)) -- return select(nfds, rfds, wfds, efds, tm); -- // copy parameters -- unsigned long maxwait = 0; -- coselect parm; -- // set waiting info -- curtask->wchan = (void*)&parm; -- if (rfds || wfds || efds) -- { -- parm.nfds = nfds; -- if (rfds) { parm.rset=*rfds; } else { FD_ZERO(&parm.rset); } -- if (wfds) { parm.wset=*wfds; } else { FD_ZERO(&parm.wset); } -- if (efds) { parm.eset=*efds; } else { FD_ZERO(&parm.eset); } -- curtask->wselect = &parm; -- } -- if (tm) -- { -- maxwait = time_elapsed(0) + tm->tv_sec*1000 + tm->tv_usec/1000; -- curtask->maxwait = &maxwait; -- } -- // reschedule -- cotask_yield(); -- // call select to update masks -- if (tm) -- { -- tm->tv_sec = maxwait/1000; -- tm->tv_usec = 1000*(maxwait-1000*tm->tv_sec); -- } -- static timeval tmzero = {0,0}; -- return select(nfds, rfds, wfds, efds, &tmzero); --} -- -- --static void --cotask_get_select(int &nfds, fd_set *rfds, fd_set *wfds, fd_set *efds, -- unsigned long &timeout) --{ -- int ready = 1; -- unsigned long minwait = MAXWAIT; -- unsigned long elapsed = time_elapsed(0); -- coselect allfds; -- allfds.nfds=0; -- FD_ZERO(&allfds.rset); -- FD_ZERO(&allfds.wset); -- FD_ZERO(&allfds.eset); -- if (curtask) -- { -- GThread::cotask *q=curtask->next; -- while (q != curtask) -- { -- ready++; -- if (q->wchan) -- { -- if (q->wselect) -- coselect_merge(&allfds, q->wselect); -- if (q->maxwait && *q->maxwaitmaxwait; -- ready--; -- } -- q = q->next; -- } -- } -- timeout = 0; -- nfds=allfds.nfds; -- *rfds=allfds.rset; -- *wfds=allfds.wset; -- *efds=allfds.eset; -- if (ready==1 && minwait>elapsed) -- timeout = minwait-elapsed; --} -- -- -- --// -------------------------------------- libgcc hook -- --#ifndef NO_LIBGCC_HOOKS --// These are exported by Leon's patched version of libgcc.a --// Let's hope that the egcs people will include the patch in --// the distributions. --extern "C" --{ -- extern void* (*__get_eh_context_ptr)(void); -- extern void* __new_eh_context(void); --} -- --// This function is called via the pointer __get_eh_context_ptr --// by the internal mechanisms of egcs. It must return the --// per-thread event handler context. This is necessary to --// implement thread safe exceptions on some machine and/or --// when flag -fsjlj-exception is set. --static void * --cotask_get_eh_context() --{ -- if (curtask) -- return curtask->ehctx; -- else if (maintask) -- return maintask->ehctx; -- DjVuMessageLite::perror( ERR_MSG("GThreads.co_panic") ); -- abort(); --} --#endif -- -- -- --// -------------------------------------- GThread -- --void --GThread::set_scheduling_callback(void (*call)(int)) --{ -- if (scheduling_callback) -- G_THROW( ERR_MSG("GThreads.dupl_callback") ); -- scheduling_callback = call; --} -- -- --GThread::GThread(int stacksize) -- : task(0), xentry(0), xarg(0) --{ -- // check argument -- if (stacksize < 0) -- stacksize = DEFSTACK; -- if (stacksize < MINSTACK) -- stacksize = MINSTACK; -- // initialization -- if (! maintask) -- { --#ifndef NO_LIBGCC_HOOKS -- static GThread::cotask comaintask(0,(*__get_eh_context_ptr)()); -- __get_eh_context_ptr = cotask_get_eh_context; --#else -- static GThread::cotask comaintask(0); --#endif -- maintask = &comaintask; --// memset(maintask, 0, sizeof(GThread::cotask)); -- maintask->next = maintask; -- maintask->prev = maintask; -- gettimeofday(&time_base,NULL); -- curtask = maintask; -- } -- // allocation --#ifndef NO_LIBGCC_HOOKS -- task = new GThread::cotask(stacksize,__new_eh_context()); --#else -- task = new GThread::cotask(stacksize); --#endif --} -- -- --GThread::~GThread() --{ -- if (task && task!=maintask) -- { -- if (task->prev) // running -- task->autodelete = true; -- else -- cotask_free(task); -- task = 0; -- } --} -- --#if __GNUC__ >= 3 --# if __GNUC_MINOR__ >= 4 --# define noinline __attribute__((noinline,used)) --# elif __GNUC_MINOR >= 2 --# define noinline __attribute__((noinline)) --# endif --#endif --#ifndef noinline --# define noinline /**/ --#endif -- --static noinline void startone(void); --static noinline void starttwo(GThread *thr); --static GThread * volatile starter; -- --static void --startone(void) --{ -- GThread *thr = starter; -- mach_switch(&thr->task->regs, &curtask->regs); -- // Registers may still contain an improper pointer -- // to the exception context. We should neither -- // register cleanups nor register handlers. -- starttwo(thr); -- abort(); --} -- --static void --starttwo(GThread *thr) --{ -- // Hopefully this function reacquires -- // an exception context pointer. Therefore -- // we can register the exception handlers. -- // It is placed after ``startone'' to avoid inlining. --#ifdef __EXCEPTIONS -- try -- { --#endif -- G_TRY -- { -- thr->xentry( thr->xarg ); -- } -- G_CATCH(ex) -- { -- ex.perror(); -- DjVuMessageLite::perror( ERR_MSG("GThreads.uncaught") ); --#ifdef _DEBUG -- abort(); --#endif -- } -- G_ENDCATCH; --#ifdef __EXCEPTIONS -- } -- catch(...) -- { -- DjVuMessageLite::perror( ERR_MSG("GThreads.unrecognized") ); --#ifdef _DEBUG -- abort(); --#endif -- } --#endif -- cotask_terminate(curtask); -- GThread::yield(); -- // Do not add anything below this line! -- // Nothing should reach it anyway. -- abort(); --} -- --int --GThread::create(void (*entry)(void*), void *arg) --{ -- if (task->next || task->prev) -- return -1; -- xentry = entry; -- xarg = arg; -- task->wchan = 0; -- task->next = curtask; -- task->prev = curtask->prev; -- task->next->prev = task; -- task->prev->next = task; -- GThread::cotask *old = curtask; -- starter = this; -- mach_start(&old->regs, (void*)startone, -- task->stack, task->stack+task->stacksize); -- if (scheduling_callback) -- (*scheduling_callback)(CallbackCreate); -- return 0; --} -- -- --void --GThread::terminate() --{ -- if (task && task!=maintask) -- cotask_terminate(task); --} -- --int --GThread::yield() --{ -- return cotask_yield(); --} -- --int --GThread::select(int nfds, -- fd_set *readfds, fd_set *writefds, fd_set *exceptfds, -- struct timeval *timeout) --{ -- return cotask_select(nfds, readfds, writefds, exceptfds, timeout); --} -- --void --GThread::get_select(int &nfds, fd_set *rfds, fd_set *wfds, fd_set *efds, -- unsigned long &timeout) --{ -- cotask_get_select(nfds, rfds, wfds, efds, timeout); --} -- --inline void * --GThread::current() --{ -- if (curtask && curtask!=maintask) -- return (void*)curtask; -- return (void*)0; --} -- -- --// -------------------------------------- GMonitor -- --GMonitor::GMonitor() -- : count(1), locker(0), wlock(0), wsig(0) --{ -- locker = 0; -- ok = 1; --} -- --GMonitor::~GMonitor() --{ -- ok = 0; -- cotask_wakeup((void*)&wsig, 0); -- cotask_wakeup((void*)&wlock, 0); -- cotask_yield(); -- // Because we know how the scheduler works, we know that this single call to -- // yield will run all unblocked tasks and given them the chance to leave the -- // scope of the monitor object. --} -- --void --GMonitor::enter() --{ -- void *self = GThread::current(); -- if (count>0 || self!=locker) -- { -- while (ok && count<=0) -- { -- curtask->wchan = (void*)&wlock; -- wlock++; -- cotask_yield(); -- wlock--; -- } -- count = 1; -- locker = self; -- } -- count -= 1; --} -- --void --GMonitor::leave() --{ -- void *self = GThread::current(); -- if (ok && (count>0 || self!=locker)) -- G_THROW( ERR_MSG("GThreads.not_acq_leave") ); -- if (++count > 0 && wlock > 0) -- cotask_wakeup((void*)&wlock, 1); --} -- --void --GMonitor::signal() --{ -- void *self = GThread::current(); -- if (count>0 || self!=locker) -- G_THROW( ERR_MSG("GThreads.not_acq_signal") ); -- if (wsig > 0) -- { -- cotask_wakeup((void*)&wsig, 1); -- if (scheduling_callback) -- (*scheduling_callback)(GThread::CallbackUnblock); -- } --} -- --void --GMonitor::broadcast() --{ -- void *self = GThread::current(); -- if (count>0 || self!=locker) -- G_THROW( ERR_MSG("GThreads.not_acq_broad") ); -- if (wsig > 0) -- { -- cotask_wakeup((void*)&wsig, 0); -- if (scheduling_callback) -- (*scheduling_callback)(GThread::CallbackUnblock); -- } --} -- --void --GMonitor::wait() --{ -- // Check state -- void *self = GThread::current(); -- if (count>0 || locker!=self) -- G_THROW( ERR_MSG("GThreads.not_acq_wait") ); -- // Wait -- if (ok) -- { -- // Atomically release monitor and wait -- int sav_count = count; -- count = 1; -- curtask->wchan = (void*)&wsig; -- cotask_wakeup((void*)&wlock, 1); -- wsig++; -- cotask_yield(); -- wsig--; -- // Re-acquire -- while (ok && count <= 0) -- { -- curtask->wchan = (void*)&wlock; -- wlock++; -- cotask_yield(); -- wlock--; -- } -- count = sav_count; -- locker = self; -- } --} -- --void --GMonitor::wait(unsigned long timeout) --{ -- // Check state -- void *self = GThread::current(); -- if (count>0 || locker!=self) -- G_THROW( ERR_MSG("GThreads.not_acq_wait") ); -- // Wait -- if (ok) -- { -- // Atomically release monitor and wait -- int sav_count = count; -- count = 1; -- unsigned long maxwait = time_elapsed(0) + timeout; -- curtask->maxwait = &maxwait; -- curtask->wchan = (void*)&wsig; -- cotask_wakeup((void*)&wlock, 1); -- wsig++; -- cotask_yield(); -- wsig--; -- // Re-acquire -- while (ok && count<=0) -- { -- curtask->wchan = (void*)&wlock; -- wlock++; -- cotask_yield(); -- wlock--; -- } -- count = sav_count; -- locker = self; -- } --} -- --#endif -- -- -- -- - // ---------------------------------------- - // GSAFEFLAGS - // ---------------------------------------- ---- djvulibre-3.5.24.orig/libdjvu/DjVuMessageLite.cpp -+++ djvulibre-3.5.24/libdjvu/DjVuMessageLite.cpp -@@ -73,8 +73,8 @@ - #include "debug.h" - #include - #include -+#include - #include --// #include - #ifdef WIN32 - #include - #include ---- djvulibre-3.5.24.orig/libdjvu/DjVuPort.h -+++ djvulibre-3.5.24/libdjvu/DjVuPort.h -@@ -65,6 +65,7 @@ - - #include "GThreads.h" - #include "GURL.h" -+#include "stddef.h" - - #ifdef HAVE_NAMESPACES - namespace DJVU { ---- djvulibre-3.5.24.orig/libdjvu/ddjvuapi.cpp -+++ djvulibre-3.5.24/libdjvu/ddjvuapi.cpp -@@ -60,6 +60,7 @@ - # pragma implementation "ddjvuapi.h" - #endif - -+#include - #include - #include - #include ---- djvulibre-3.5.24.orig/libdjvu/ByteStream.cpp -+++ djvulibre-3.5.24/libdjvu/ByteStream.cpp -@@ -73,6 +73,7 @@ - #include "GOS.h" - #include "GURL.h" - #include "DjVuMessage.h" -+#include - #include - #if defined(WIN32) || defined(__CYGWIN32__) - # include ---- djvulibre-3.5.24.orig/libdjvu/miniexp.cpp -+++ djvulibre-3.5.24/libdjvu/miniexp.cpp -@@ -23,6 +23,7 @@ - # pragma implementation "miniexp.h" - #endif - -+#include - #include - #include - #include ---- djvulibre-3.5.24.orig/libdjvu/IW44Image.cpp -+++ djvulibre-3.5.24/libdjvu/IW44Image.cpp -@@ -76,6 +76,7 @@ - #include "IFFByteStream.h" - #include "GRect.h" - -+#include - #include - #include - #include ---- djvulibre-3.5.24.orig/libdjvu/GSmartPointer.h -+++ djvulibre-3.5.24/libdjvu/GSmartPointer.h -@@ -97,6 +97,8 @@ - #include "DjVuGlobal.h" - #include "atomic.h" - -+#include -+ - #ifdef HAVE_NAMESPACES - namespace DJVU { - # ifdef NOT_DEFINED // Just to fool emacs c++ mode -@@ -505,7 +507,8 @@ template - class GPBuffer : public GPBufferBase - { - public: -- GPBuffer(TYPE *&xptr,const size_t n=0) : GPBufferBase((void *&)xptr,n,sizeof(TYPE)) {} -+ GPBuffer(TYPE *&xptr,const size_t n=0) -+ : GPBufferBase((void *&)xptr,n,sizeof(TYPE)) {} - inline void resize(const size_t n) {GPBufferBase::resize(n,sizeof(TYPE));} - inline void clear(void) {GPBufferBase::set(sizeof(TYPE),0);} - inline void set(const char c) {GPBufferBase::set(sizeof(TYPE),c);} ---- djvulibre-3.5.24.orig/libdjvu/BSByteStream.cpp -+++ djvulibre-3.5.24/libdjvu/BSByteStream.cpp -@@ -62,6 +62,7 @@ - - // - Author: Leon Bottou, 07/1998 - -+#include - #include - #include - #include ---- djvulibre-3.5.24.orig/libdjvu/BSEncodeByteStream.cpp -+++ djvulibre-3.5.24/libdjvu/BSEncodeByteStream.cpp -@@ -71,6 +71,7 @@ - #include "GOS.h" - #endif - -+#include - #include - #include - #include ---- djvulibre-3.5.24.orig/libdjvu/Arrays.cpp -+++ djvulibre-3.5.24/libdjvu/Arrays.cpp -@@ -239,9 +239,7 @@ ArrayRep::ins(int n, const void * what, - copy(ndata, lobound-minlo, hibound-minlo, - data, lobound-minlo, hibound-minlo); - destroy(data, lobound-minlo, hibound-minlo); -- void *tmp=data; - data=ndata; -- tmp=data; - maxhi = nmaxhi; - } - ---- djvulibre-3.5.24.orig/libdjvu/miniexp.h -+++ djvulibre-3.5.24/libdjvu/miniexp.h -@@ -38,7 +38,8 @@ extern "C" { - #ifndef MINILISPAPI - # define MINILISPAPI /**/ - #endif -- -+ -+#include - - /* -------------------------------------------------- */ - /* LISP EXPRESSIONS */ ---- djvulibre-3.5.24.orig/libdjvu/MMX.cpp -+++ djvulibre-3.5.24/libdjvu/MMX.cpp -@@ -62,6 +62,7 @@ - - #include "MMX.h" - #include -+#include - #include - - -@@ -166,8 +167,23 @@ MMXControl::enable_mmx() - : "=m" (cpuflags) : - : "eax","ecx","edx"); - #endif -+#if defined(MMX) && defined(__GNUC__) && defined(__x86_64__) -+ // Detection of MMX for GCC -+ __asm__ volatile (// Check that CR0:EM is clear -+ "xorl %%edx,%%edx\n\t" -+ "smsw %%ax\n\t" -+ "andl $4,%%eax\n\t" -+ "jnz 1f\n\t" -+ // Execute CPUID -+ "movl $1,%%eax\n\t" -+ "cpuid\n" -+ // Finish -+ "1:\tmovl %%edx, %0" -+ : "=m" (cpuflags) : -+ : "eax","ebx","ecx","edx"); -+#endif - #if defined(MMX) && defined(_MSC_VER) && defined(_M_IX86) -- // Detection of MMX for MSVC -+ // Detection of MMX for MSVC 32 bits - __asm { pushfd - pop ecx - xor edx,edx ---- djvulibre-3.5.24.orig/libdjvu/IFFByteStream.h -+++ djvulibre-3.5.24/libdjvu/IFFByteStream.h -@@ -124,6 +124,7 @@ - - - #include "DjVuGlobal.h" -+#include - #include - #include - #include ---- djvulibre-3.5.24.orig/libdjvu/MMX.h -+++ djvulibre-3.5.24/libdjvu/MMX.h -@@ -143,17 +143,18 @@ class MMXControl - - #ifndef NO_MMX - --#if defined(__GNUC__) && defined(__i386__) -+#if defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__)) -+typedef struct{ char c[8]; } MMX_t; - #define MMXemms \ - __asm__ volatile("emms" : : : "memory" ) - #define MMXrr(op,src,dst) \ -- __asm__ volatile( #op " %%" #src ",%%" #dst : : : "memory") -+ __asm__ volatile( #op " %%" #src ",%%" #dst : : : "memory" ) - #define MMXir(op,imm,dst) \ -- __asm__ volatile( #op " %0,%%" #dst : : "i" (imm) : "memory") -+ __asm__ volatile( #op " %0,%%" #dst : : "i" (imm) : "memory" ) - #define MMXar(op,addr,dst) \ -- __asm__ volatile( #op " %0,%%" #dst : : "m" (*(addr)) : "memory") -+ __asm__ volatile( #op " %0,%%" #dst : : "m" (*(MMX_t*)(addr)) : "memory" ) - #define MMXra(op,src,addr) \ -- __asm__ volatile( #op " %%" #src ",%0" : : "m" (*(addr)) : "memory") -+ __asm__ volatile( #op " %%" #src ",%0" : "=m" (*(MMX_t*)(addr)) : : "memory") - #define MMX 1 - #endif - ---- djvulibre-3.5.24.orig/libdjvu/DjVuAnno.cpp -+++ djvulibre-3.5.24/libdjvu/DjVuAnno.cpp -@@ -254,24 +254,24 @@ GLObject::print(ByteStream & str, int co - if (!cur_pos) { cur_pos = &local_cur_pos; } - - GUTF8String buffer; -- const char * to_print=0; - switch(type) - { - case NUMBER: -- to_print=buffer.format("%d",number); -+ buffer.format("%d",number); - break; - case STRING: -- to_print=make_c_string(string); -+ buffer = make_c_string(string); - break; - case SYMBOL: -- to_print=buffer.format("%s",(const char *)symbol); -+ buffer.format("%s",(const char *)symbol); - break; - case LIST: -- to_print=buffer.format("(%s",(const char *)name); -+ buffer.format("(%s",(const char *)name); - break; - case INVALID: - break; - } -+ const char * to_print = (const char*)buffer; - if (!compact && *cur_pos+strlen(to_print)>70) - { - char ch='\n'; -@@ -1374,7 +1374,7 @@ DjVuANT::encode_raw(void) const - } - //*** XMP Metadata - del_all_items(XMP_TAG, parser); -- if (!xmpmetadata) -+ if (!!xmpmetadata) - { - GUTF8String mdatabuffer("("); - mdatabuffer += XMP_TAG; -@@ -1384,8 +1384,10 @@ DjVuANT::encode_raw(void) const - //*** Mapareas - del_all_items(GMapArea::MAPAREA_TAG, parser); - for(GPosition pos=map_areas;pos;++pos) -- parser.parse(map_areas[pos]->print()); -- -+ { -+ GUTF8String mapareabuffer = map_areas[pos]->print(); -+ parser.parse(mapareabuffer); -+ } - GP gstr=ByteStream::create(); - ByteStream &str=*gstr; - parser.print(str, 1); ---- djvulibre-3.5.24.orig/libdjvu/IW44EncodeCodec.cpp -+++ djvulibre-3.5.24/libdjvu/IW44EncodeCodec.cpp -@@ -76,6 +76,7 @@ - #include "IFFByteStream.h" - #include "GRect.h" - -+#include - #include - #include - #include ---- djvulibre-3.5.24.orig/libdjvu/DjVuPalette.cpp -+++ djvulibre-3.5.24/libdjvu/DjVuPalette.cpp -@@ -64,6 +64,8 @@ - #include "ByteStream.h" - #include "BSByteStream.h" - #include "DjVuPalette.h" -+ -+#include - #include - #include - ---- djvulibre-3.5.24.orig/libdjvu/GString.cpp -+++ djvulibre-3.5.24/libdjvu/GString.cpp -@@ -73,6 +73,7 @@ - #include "GThreads.h" - #include "debug.h" - -+#include - #include - #include - #include -@@ -642,26 +643,22 @@ GBaseString::UTF8ToNative( - const char *source=(*this); - GP retval; - if(source && source[0]) -- { --#if DO_CHANGELOCALE -- GUTF8String lc_ctype(setlocale(LC_CTYPE,0)); --#endif -- bool repeat; -- for(repeat=!currentlocale;;repeat=false) - { -- retval=(*this)->toNative((GStringRep::EscapeMode)escape); - #if DO_CHANGELOCALE -- if (!repeat || retval || (lc_ctype == setlocale(LC_CTYPE,""))) -+ GUTF8String lc_ctype(setlocale(LC_CTYPE,0)); -+ bool repeat; -+ for(repeat=!currentlocale;;repeat=false) -+ { - #endif -- break; -- } -+ retval=(*this)->toNative((GStringRep::EscapeMode)escape); - #if DO_CHANGELOCALE -- if(!repeat) -- { -+ if (!repeat || retval || (lc_ctype == setlocale(LC_CTYPE,""))) -+ break; -+ } -+ if(!repeat) - setlocale(LC_CTYPE,(const char *)lc_ctype); -- } - #endif -- } -+ } - return GNativeString(retval); - } - -@@ -696,27 +693,19 @@ GBaseString::NativeToUTF8(void) const - const char *source=(*this); - #if DO_CHANGELOCALE - GUTF8String lc_ctype=setlocale(LC_CTYPE,0); --#endif - bool repeat; - for(repeat=true;;repeat=false) -- { -- if( (retval=GStringRep::NativeToUTF8(source)) ) - { -- if(GStringRep::cmp(retval->toNative(),source)) -- { -- retval=GStringRep::UTF8::create((unsigned int)0); -- } -- } --#if DO_CHANGELOCALE -- if(!repeat || retval || (lc_ctype == setlocale(LC_CTYPE,""))) - #endif -- break; -- } -+ if( (retval=GStringRep::NativeToUTF8(source)) ) -+ if(GStringRep::cmp(retval->toNative(),source)) -+ retval=GStringRep::UTF8::create((unsigned int)0); - #if DO_CHANGELOCALE -+ if(!repeat || retval || (lc_ctype == setlocale(LC_CTYPE,""))) -+ break; -+ } - if(!repeat) -- { - setlocale(LC_CTYPE,(const char *)lc_ctype); -- } - #endif - } - return GUTF8String(retval); ---- djvulibre-3.5.24.orig/libdjvu/GPixmap.cpp -+++ djvulibre-3.5.24/libdjvu/GPixmap.cpp -@@ -75,6 +75,8 @@ - #include "GThreads.h" - #include "Arrays.h" - #include "JPEGDecoder.h" -+ -+#include - #include - #include - #include ---- djvulibre-3.5.24.orig/libdjvu/DjVuFileCache.cpp -+++ djvulibre-3.5.24/libdjvu/DjVuFileCache.cpp -@@ -63,6 +63,7 @@ - #include "DjVuFileCache.h" - #include "debug.h" - -+#include - #include - - ---- djvulibre-3.5.24.orig/libdjvu/GString.h -+++ djvulibre-3.5.24/libdjvu/GString.h -@@ -108,6 +108,7 @@ - #include "DjVuGlobal.h" - #include "GContainer.h" - -+#include - #include - #include - #ifdef WIN32 ---- djvulibre-3.5.24.orig/libdjvu/XMLParser.cpp -+++ djvulibre-3.5.24/libdjvu/XMLParser.cpp -@@ -75,6 +75,7 @@ - #include "debug.h" - #include - #include -+#include - #include - - -@@ -645,17 +646,12 @@ lt_XMLParser::Impl::parse(const lt_XMLTa - GPosition datapos=args.contains("data"); - if(datapos) - { -- bool isDjVuType=false; - GPosition typePos(args.contains("type")); - if(typePos) -- { -- if(args[typePos] != mimetype) - { -- // DjVuPrintErrorUTF8("Ignoring %s Object tag\n",mimetype); -+ if(args[typePos] != mimetype) - continue; - } -- isDjVuType=true; -- } - const GURL url = (pdjvufile) ? *pdjvufile - : GURL::UTF8(args[datapos], - (args[datapos][0] == '/') ? codebase.base() : codebase); ---- djvulibre-3.5.24.orig/libdjvu/GException.cpp -+++ djvulibre-3.5.24/libdjvu/GException.cpp -@@ -60,6 +60,7 @@ - # pragma implementation - #endif - -+#include - #include - #include - #include ---- djvulibre-3.5.24.orig/libdjvu/GSmartPointer.cpp -+++ djvulibre-3.5.24/libdjvu/GSmartPointer.cpp -@@ -67,6 +67,7 @@ - // Our original implementation consisted of multiple classes. - // . - -+#include - #include - #if PARANOID_DEBUG - # include ---- djvulibre-3.5.24.orig/libdjvu/JPEGDecoder.cpp -+++ djvulibre-3.5.24/libdjvu/JPEGDecoder.cpp -@@ -153,7 +153,6 @@ JPEGDecoder::decode(ByteStream & bs,GPix - - JSAMPARRAY buffer; /* Output row buffer */ - int row_stride; /* physical row width in output buffer */ -- int full_buf_size; - int isGrey,i; - - cinfo.err = jpeg_std_error(&jerr.pub); -@@ -184,7 +183,6 @@ JPEGDecoder::decode(ByteStream & bs,GPix - - /* JSAMPLEs per row in output buffer */ - row_stride = cinfo.output_width * cinfo.output_components; -- full_buf_size = row_stride * cinfo.output_height; - - /* Make a one-row-high sample array that will go away when done with image */ - buffer = (*cinfo.mem->alloc_sarray) ---- djvulibre-3.5.24.orig/libdjvu/GUnicode.cpp -+++ djvulibre-3.5.24/libdjvu/GUnicode.cpp -@@ -62,6 +62,8 @@ - - #include "GString.h" - -+#include -+ - #if HAS_ICONV - #include - #endif ---- djvulibre-3.5.24.orig/libdjvu/DjVuGlobalMemory.cpp -+++ djvulibre-3.5.24/libdjvu/DjVuGlobalMemory.cpp -@@ -67,6 +67,8 @@ - - #include "DjVuGlobal.h" - #include "GException.h" -+ -+#include - #include - #include - #include "debug.h" ---- djvulibre-3.5.24.orig/libdjvu/DjVuToPS.cpp -+++ djvulibre-3.5.24/libdjvu/DjVuToPS.cpp -@@ -72,6 +72,7 @@ - #include "GPixmap.h" - #include "debug.h" - #include -+#include - #include - #include - #include ---- djvulibre-3.5.24.orig/libdjvu/DjVuDocEditor.cpp -+++ djvulibre-3.5.24/libdjvu/DjVuDocEditor.cpp -@@ -555,27 +555,25 @@ DjVuDocEditor::insert_file(const GURL &f - can_compress_flag); - } - -- // Oh. It does exist... Check that it has IFF structure -+ // Oh. It does exist... Check that it has IFF structure - { -- const GP giff( -- IFFByteStream::create(file_pool->get_stream())); -- IFFByteStream &iff=*giff; -- GUTF8String chkid; -- -- int length; -- length=iff.get_chunk(chkid); -- if (chkid!="FORM:DJVI" && chkid!="FORM:DJVU" && -- chkid!="FORM:BM44" && chkid!="FORM:PM44") -- G_THROW( ERR_MSG("DjVuDocEditor.not_1_page") "\t"+file_url.get_string()); -- -- // Wonderful. It's even a DjVu file. Scan for NDIR chunks. -- // If NDIR chunk is found, ignore the file -- while(iff.get_chunk(chkid)) -- { -- if (chkid=="NDIR") -- return false; -- iff.close_chunk(); -- } -+ const GP giff( -+ IFFByteStream::create(file_pool->get_stream())); -+ IFFByteStream &iff=*giff; -+ GUTF8String chkid; -+ iff.get_chunk(chkid); -+ if (chkid!="FORM:DJVI" && chkid!="FORM:DJVU" && -+ chkid!="FORM:BM44" && chkid!="FORM:PM44") -+ G_THROW( ERR_MSG("DjVuDocEditor.not_1_page") "\t" -+ + file_url.get_string()); -+ // Wonderful. It's even a DjVu file. Scan for NDIR chunks. -+ // If NDIR chunk is found, ignore the file -+ while(iff.get_chunk(chkid)) -+ { -+ if (chkid=="NDIR") -+ return false; -+ iff.close_chunk(); -+ } - } - return insert_file(file_pool,file_url,is_page,file_pos,name2id,source); - } ---- djvulibre-3.5.24.orig/libdjvu/atomic.cpp -+++ djvulibre-3.5.24/libdjvu/atomic.cpp -@@ -28,6 +28,7 @@ - # include "config.h" - #endif - -+#include - #include - #include - #include "atomic.h" ---- djvulibre-3.5.24.orig/libdjvu/GBitmap.cpp -+++ djvulibre-3.5.24/libdjvu/GBitmap.cpp -@@ -66,6 +66,8 @@ - #include "GString.h" - #include "GThreads.h" - #include "GException.h" -+#include -+#include - #include - - // - Author: Leon Bottou, 05/1997 ---- djvulibre-3.5.24.orig/libdjvu/Makefile.in -+++ djvulibre-3.5.24/libdjvu/Makefile.in -@@ -38,7 +38,6 @@ TOUCH = @TOUCH@ - INSTALL = @INSTALL@ - INSTALL_PROGRAM = @INSTALL_PROGRAM@ - INSTALL_DATA = @INSTALL_DATA@ --INSTALL_SHLIB = @INSTALL_SHLIB@ - LIBTOOL = @LIBTOOL@ - - DEFS = @DEFS@ -@@ -101,7 +100,7 @@ install-data: FORCE - install-lib: ${LIBDJVU_LA} FORCE - ${INSTALL} -d ${DESTDIR}${libdir} - ${LIBTOOL} --mode=install \ -- ${INSTALL_SHLIB} ${LIBDJVU_LA} ${DESTDIR}${libdir} -+ ${INSTALL_DATA} ${LIBDJVU_LA} ${DESTDIR}${libdir} - - install-include: FORCE - ${INSTALL} -d ${DESTDIR}${includedir}/libdjvu ---- djvulibre-3.5.24.orig/libdjvu/UnicodeByteStream.h -+++ djvulibre-3.5.24/libdjvu/UnicodeByteStream.h -@@ -88,6 +88,7 @@ - #include "GString.h" - #include "ByteStream.h" - -+#include - - #ifdef HAVE_NAMESPACES - namespace DJVU { ---- djvulibre-3.5.24.orig/libdjvu/GURL.cpp -+++ djvulibre-3.5.24/libdjvu/GURL.cpp -@@ -72,6 +72,7 @@ - #include "GURL.h" - #include "debug.h" - -+#include - #include - #include - #include diff -Nru djvulibre-3.5.24/debian/patches/series djvulibre-3.5.24/debian/patches/series --- djvulibre-3.5.24/debian/patches/series 2011-06-22 10:49:43.000000000 +0000 +++ djvulibre-3.5.24/debian/patches/series 2011-09-28 16:01:00.000000000 +0000 @@ -1 +1 @@ -debian-changes-3.5.24-8 +debian-changes diff -Nru djvulibre-3.5.24/debian/rules djvulibre-3.5.24/debian/rules --- djvulibre-3.5.24/debian/rules 2011-03-21 10:47:05.000000000 +0000 +++ djvulibre-3.5.24/debian/rules 2011-08-08 06:28:46.000000000 +0000 @@ -17,9 +17,13 @@ testlibver: @echo library major version: upstream $(libver0), debian $(libver) $(libver1) $(libver2) -build clean install binary-arch binary-indep binary: +dh_targets=binary binary-arch binary-indep build build-arch build-indep clean install + +$(dh_targets) %: dh $@ --with autotools_dev --parallel +.PHONY: $(dh_targets) + configure_options += --disable-desktopfiles configure_options += --enable-static configure_options += --enable-shared @@ -84,5 +88,4 @@ override_dh_makeshlibs: dh_makeshlibs --version-info --exclude=/plugins -.PHONY: build clean install binary-arch binary-indep binary .PHONY: testlibver