pax_global_header00006660000000000000000000000064117407276070014525gustar00rootroot0000000000000052 comment=78575af1a1b231dd63dc18a1c91c70b01573b6b1 djview4/000077500000000000000000000000001174072760700124455ustar00rootroot00000000000000djview4/.gitignore000066400000000000000000000001361174072760700144350ustar00rootroot00000000000000.libs/ /.pc/ /BUILD* /Makefile /autom4te.cache/ /config.h /config.log /config.status /libtool djview4/COPYING000066400000000000000000000431051174072760700135030ustar00rootroot00000000000000 GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 19yy This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) 19yy name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. djview4/COPYRIGHT000066400000000000000000000044571174072760700137520ustar00rootroot00000000000000 ==================================================================== DjView4 Copyright (c) 2006- Leon Bottou This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, either version 2 of the license or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA02111, USA. ==================================================================== Remark1: This program depends on the DjVuLibre library. Starting with version 3.5.19, DjVuLibre is released under the GNU General Public License, either version 2 or (at your option) any later version. Prior to version 3.5.19, DjVuLibre was released under the GNU General Public License, version 2. Remark2: Part of this software is derived from 'tiff2pdf' which comes with the following notice: | Copyright (c) 2003 Ross Finlayson | | Permission to use, copy, modify, distribute, and sell this software and | its documentation for any purpose is hereby granted without fee, provided | that (i) the above copyright notices and this permission notice appear in | all copies of the software and related documentation, and (ii) the name of | Ross Finlayson may not be used in any advertising or | publicity relating to the software without the specific, prior written | permission of Ross Finlayson. | | THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, | EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY | WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. | | IN NO EVENT SHALL ROSS FINLAYSON BE LIABLE FOR | ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, | OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, | WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF | LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE | OF THIS SOFTWARE. djview4/INSTALL000066400000000000000000000151631174072760700135040ustar00rootroot00000000000000 1- PREREQUISITES ================ 1.1 DJVULIBRE ------------- You need DjVuLibre >= 3.5.18. See http://djvu.sourceforge.net for the source code and for pointers to binary packages. Under debian type "apt-get install libdjvulibre-dev" 1.2 QT4 ------- You need Qt4 >= 4.2.0 See http://trolltech.com for the source code. Select the version of Qt adapted to your platform. Under debian type "apt-get install libqt4-dev qt4-dev-tools 1.3 PKG-CONFIG -------------- Under Unix the configure script uses pkg-config to locate the DjVuLibre library and its ancillary files. See http://pkgconfig.freedesktop.org. If you do not have pkg-config, you will have to specify which compilation options using the variabled DDJVUAPI_CFLAGS and DDJVUAPI_LIBS. 1.4 XDG-UTILS ------------- Optionally, the installation process under unix creates a shell script that installs the djview4 menu entry and icon. This script depends on the XDG "Portland" utilities available at http://portland.freedesktop.org. See file desktopfiles/README for more information. 2 COMPILING AND INSTALLING UNDER UNIX ===================================== 2.1 CONFIGURE ------------- First run the script 'configure' to generate the makefiles. Command 'configure --help' list options and environment variables that affect the generation of makefile. The most useful ones are: --prefix= Indicate the base directory for installing djview. The default prefix is /usr/local. Binary packages are usually compiled with prefix /usr. --mandir= Indicates where the man pages go. The default is ${prefix}/man but many systems prefer to install man pages in ${prefix}/share/man. PKG_CONFIG_PATH= Indicates the path for search pkg-config description files. The default path is /usr/lib/pkgconfig:/usr/share/pkgconfig. If you have installed DjVuLibre with a prefix different from /usr, you probably want to add ${prefix}/lib/pkgconfig to this path. DDJVUAPI_CFLAGS= Compiler flags for using the DjVuLibre api. This is useful when you do not have pkg-config or when pkg-config does not locate DjVuLibre. DDJVUAPI_LIBS= Linker flags for using the DjVuLibre api. This is useful when you do not have pkg-config or when pkg-config does not locate DjVuLibre. QMAKE= Indicate the location of the Qt4 qmake executable. This is useful when configure cannot locate Qt4. Running configure creates all the required makefiles and executes command qmake in directory src. 2.2 MAKE -------- You can then compile djview4 with command % make 2.3 INSTALL ----------- Once the compilation is successful, command % make install copies the binary files to the appropriate location. The following files are created ${bindir}/djview4 ${bindir}/djview --> djview4 ${mandir}/man1/djview4.1 ${mandir}/man1/djview.1 --> djview4.1 ${datadir}/djvu/djview4/... Unless specified otherwise on the configure command line: ${bindir}=${prefix}/bin ${mandir}=${prefix}/man ${datadir}=${prefix}/share File README_packagers contains more information about the installation process. After the installation, you can run % ${datadir}/djview4/desktop/register-djview-menu install to setup the djview4 menu entries and icons. 3 OTHER PLATFORMS ================= In general you can compile the standalone viewer djview4 on non unix platforms. However the browser plugin capability is currently not working on non X11 systems. You will need to compile DjVuLibre. You will need the appropriate version of Qt4. 3.1 MAC OS X ------------ There are two options under Mac OS X. * Installing the X11 system and its development files. First install the X11 version of Qt4. Proceding as for normal Unix systems. Please refer to section 2 for details. * Installing the native Mac OS X version of Qt4. First install the native Mac version of Qt4. We recommend that you first install macports with the libraries zlib, libpng, jpeg and tiff. You must also install Qt and compile djvulibre. Assuming Qt is in the default location and djvulibre in /usr/local, configure with $ ./configure --disable-nsdejavu \ PKG_CONFIG_PATH=/usr/local/lib/pkgconfig \ QMAKE=/Developer/Tools/Qt/qmake \ QMAKESPEC=macx-g++ Then compile with $ make Note1: The Qt4 documentation states that qmake can also be used to generate an XCode project file. But this is more dependent on the exact XCode version you are using. Use QMAKESPEC=macx-xcode Note2: This procedure generates a nice application bundle. However the binaries inside the bundle may depend on shared libraries located elsewhere. To produce a distributable application bundle, you must fix that with command install_name_tool. See the Qt documentation about the deployment of Mac applications. Note3: Do not use command "make install". Simply copy the application bundle where you want it. 3.2 WINDOWS ----------- There are also two ways to compile djview under Windows. * Using Visual C++ 2010 - First you need to compile Qt4 using Visual C++. This used to be require patching the Qt source Starting with Qt-4.3.2, the opensource Qt version supports Visual C++ right out of the box. - Compile djvulibre using the visual C++ method. - Go to directory src - Type command $ qmake -win32 -tp vc to generate a MS Visual C++ project file. - Tweak the project file to properly link with the djvulibre library and the tiff library. One good way to do so is to open the file "djvulibre.sln" that comes with the cvs version of djvulibre. Then add the project "djview.vcproj" and insert the property sheets "dirs", "warnings", "libtiff" and "tools" found in the djvulibre-3.5/win32/djvulibre directory. You also need to add the references to libdjvulibre and libtiff. This works well despite requiring a lot of clicks. * Using the MINGW compiler (not recommended) - Install the binary version of Qt4. - Install the mingw version of zlib, libtiff, libjpeg. - Compile djvulibre using the configure method. - Go to directory djview4/src. - Type command $ qmake DEFINES+=HAVE_TIFF \ LIBS+="-L$HOME/djvulibre-3.5/libdjvu/.libs -ldjvulibre -ltiff" \ QMAKE_CXXFLAGS+="-I$HOME/djvulibre-3.5" where you replace the paths by the actual djvulibre paths. - Then compile using $ mingw32-make SHELL=cmd.exe djview4/Makefile.in000066400000000000000000000060051174072760700145130ustar00rootroot00000000000000#C- This program is free software; you can redistribute it and/or #C- modify it under the terms of the GNU General Public License, #C- version 2 or any later version. The license should have #C- accompanied the program or you may obtain a copy of the #C- license from the Free Software Foundation at http://www.fsf.org. #C- #C- This program is distributed in the hope that it will be useful, #C- but WITHOUT ANY WARRANTY; without even the implied warranty of #C- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #C- GNU General Public License for more details. @SET_MAKE@ SHELL = @SHELL@ VPATH = @srcdir@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ LN_S = @LN_S@ RM = @RM@ TOUCH = @TOUCH@ MKDIR = @MKDIR@ LIBTOOL = @LIBTOOL@ INSTALL = @INSTALL@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_DATA = @INSTALL_DATA@ LRELEASE = @LRELEASE@ srcdir = @srcdir@ prefix = @prefix@ exec_prefix = @exec_prefix@ bindir = @bindir@ datarootdir = @datarootdir@ datadir = @datadir@ libdir = @libdir@ mandir = @mandir@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ top_builddir = . SUBDIRS=src nsdejavu desktopfiles # make all all: all-djview @NSDEJAVU_YES@all: all-nsdejavu @NPDJVU_YES@all: all-npdjvu all: all-desktopfiles all: all-djview-qm all-djview: FORCE cd src && ${MAKE} all-nsdejavu: FORCE cd nsdejavu && ${MAKE} all-npdjvu: FORCE cd npdjvu && ${MAKE} all-desktopfiles: FORCE cd desktopfiles && ${MAKE} all-djview-qm: FORCE -cd src && test -x "${LRELEASE}" && "${LRELEASE}" djview.pro # make install install: install-djview @NSDEJAVU_YES@install: install-nsdejavu @DESKTOP_YES@install: install-desktopfiles install-djview: install-djview-bin install-djview-man install-djview-qm install-djview-bin: FORCE ${INSTALL} -d ${DESTDIR}${bindir} eval `grep '^TARGET *=' src/Makefile | sed -e 's/ *= */=/'` ; \ ${INSTALL_PROGRAM} src/$${TARGET-djview} ${DESTDIR}${bindir}/djview4 cd ${DESTDIR}${bindir} ; ${LN_S} djview4 djview || true install-djview-man: FORCE ${INSTALL} -d ${DESTDIR}${mandir}/man1 ${INSTALL_DATA} ${srcdir}/src/djview.1 \ ${DESTDIR}${mandir}/man1/djview4.1 cd ${DESTDIR}${mandir}/man1 ; ${LN_S} djview4.1 djview.1 || true install-djview-qm: FORCE ${INSTALL} -d ${DESTDIR}${datadir}/djvu/djview4 for qm in src/*.qm ; do test -r $$qm && \ ${INSTALL_DATA} $$qm ${DESTDIR}${datadir}/djvu/djview4 || true ; \ done install-nsdejavu: FORCE ( cd nsdejavu && ${MAKE} install ) install-desktopfiles: FORCE ( cd desktopfiles && ${MAKE} install ) # make clean clean: clean-subdirs FORCE -${RM} 2>/dev/null src/*.qm src/djview @echo "Done." clean-subdirs: FORCE -for d in ${SUBDIRS} ; do ( cd $$d && ${MAKE} clean ) ; done # make distclean distclean: distclean-subdirs FORCE -${RM} 2>/dev/null src/*.qm src/djview -${RM} 2>/dev/null Makefile config.log config.status config.h libtool -${RM} 2>/dev/null -r autom4te.cache @echo "Done." distclean-subdirs: FORCE -for d in ${SUBDIRS} ; do ( cd $$d && ${MAKE} distclean ) ; done # phony targets FORCE: .PHONY: FORCE djview4/NEWS000066400000000000000000000046171174072760700131540ustar00rootroot00000000000000NEW IN VERSION 4.9 ------------------ - Added language selection in preference. - Added option to override printing and saving restrictions. - Automatic reloading of djvu documents when the file is changed. - New chinese translations. - Improved network code (needs Qt>=4.4.) - Remember the last visited position for the last 50 documents. NEW IN VERSION 4.8 -------------------- - Added option to invert luminance. - Added shortcut ctrl+g to go to the page combo. - Fixed export issues under win32. - Mouse wheel can be configured to control the zoom. - Animated page movements. NEW IN VERSION 4.7 -------------------- - Fix for crash on quick PgUp PgDn sequences. - Fix scrollbars in continuous mode. - Fix plugin for some webkit based browsers. NEW IN VERSION 4.6 -------------------- - Show total page number in page combo and page info box. - Decode percent encoding in annotation and outline hyperlinks. - Properly handle non-ascii filenames in export and save dialogs. - Subtle changes to PgUp/PgDn/Home/End/Space/Backspace view changes. - Fixed suffix management in export/save/print dialogs. NEW IN VERSION 4.5 -------------------- - Fixed priority of annotation options. - Fixed plugin for recent versions of gcc. - Added showposition in advanced option copyUrl. - New advanced mode to display hidden text. - Lens display annotations and hidden text. - Nsdejavu can use the XEmbed protocol when available. - Plugin is scriptable from JavaScript. NEW IN VERSION 4.4 -------------------- - Full session management under X11. - Added advanced feature check box. - Added advanced command to copy urls, outline, etc. - New translation (russian) - History in the find dialog. - Option to display hidden text in status bar. - Option to display the first page alone in side-by-side mode. - Option to display side-by-side in right-to-left mode. - Drag'n drop files into the viewer. - Support for Lizardtech's plugin option -showposition. NEW IN VERSION 4.3 ------------------ - Undo/Redo - New translations (german,czech) - Fixed double free bug in plugin mode. NEW IN VERSION 4.2 ------------------ - Better support of Qt/Mac - Escape can be used to exit full screen mode - Recent files menu - Open Location NEW IN VERSION 4.1 ------------------ - Fixes for Qt 4.2 and 4.3. - Fixes to enable compilation on Windows. - TIFF and PDF export. - New translation (ukrainian) NEW IN VERSION 4.0 ------------------ - Initial release djview4/README000066400000000000000000000025021174072760700133240ustar00rootroot00000000000000 DJVIEW4 ------- This package contains the djview4 viewer and browser plugin. This new viewer relies on the DjVulibre library and the Qt4 toolkit. Highlights: - entirely based on the public djvulibre api. - entirely written in portable Qt4. - works natively under Unix/X11, MS Windows, and MacOS X. - continuous scrolling of pages - side-by-side display of pages - ability to specify a url to the djview command - all plugin and cgi options available from the command line - all silly annotations implemented - display thumbnails as a grid - display outlines - page names supported (see djvused command set-page-title) - metadata dialog (see djvused command set-meta) - implemented as reusable Qt widgets Prerequisites: - DjVuLibre >= 3.5.18 - Qt4 >= 4.4 USING DJVIEW4 AS A PLUGIN ------------------------- Under Unix/X11, djview4 can be used as a browser plugin by means of the small shared library named nsdejavu.so. The djview3 distributed with djvulibre uses the same approach. In fact both djview3 and djview4 communicate with nsdejavu.so with the same protocol. You can either install the file nsdejavu.so that comes with djview3 or the one that comes with djview4. The file nsdejavu.so uses the viewer specified with the environment variable NPX_DJVIEW or searches an executable viewer named djview, djview4 or djview3. djview4/README_packagers000066400000000000000000000043511174072760700153500ustar00rootroot00000000000000 PACKAGING SUGGESTIONS FOR DJVIEW4 ================================= The makefile provides fine grain installation targets. In fact, # make install is equivalent to # make install-djview install-nsdejavu install-desktop These three targets are discussed below. 1) MAKE INSTALL-DJVIEW ---------------------- The command # make install-djview installs the djview4 binary as ${bindir}/djview4 the djview4 man page as ${mandir}/man1/djview4.1 and the translation files in ${datadir}/djvu/djview4. It also creates (but does not overwrite) symbolic links named ${bindir}/djview and ${mandir}/man1/djview.1 pointing to ${bindir}/djview4 and ${mandir}/man1/djview4.1 respectively. These symbolic links can be advantageously by alternatives on system that support alternatives such as debian or fedora. 2) MAKE INSTALL-NSDEJAVU ------------------------ The command # make install-nsdejavu installs the djvu browser plugin as ${plugindir}/nsdejavu.so and its man page ${mandir}/man1/nsdejavu.1. Variable ${plugindir} defaults to ${libdir}/netscape/plugins, which may or may not be appropriate for the target system. Note that these installs conflict with the files nsdejavu.so and nsdejavu.1 installed by DjVuLibre. This is not a severe problem since these files are identical, but this calls for a packaging decision. Both the rpm spec file and the debian package provided with the djview4 source code assume that the nsdejavu files will be provided by the djvulibre package(s). Debian splits djvulibre itself into many packages (library, development files, tools, viewer, browser plugin) while the djvulibre rpm spec files constructs a single binary package. Since the djview4 viewer is slated to replace the djview3 viewer that comes with DjVuLibre, the debian approach seems superior. 3) MAKE INSTALL-DESKTOP ----------------------- The command # make install-desktop installs the shell script register-djview-menu and its data files in directory ${datadir}/djvu/djview4/desktop/. This shell script can be used in postinstall and prerm/preun scripts to register xdg menu entries for djview4. This script assumes that you have the xdg portland tools xdg-icon-resource and xdg-desktop-menu installed. See file desktopfiles/README for more information. djview4/README_translations000066400000000000000000000031101174072760700161210ustar00rootroot00000000000000 HOW TO CREATE NEW TRANSLATION FILES FOR DJVIEW. ----------------------------------------------- - Determine the language code for your language. Sometimes language codes have suffixes in capital letters for describing variants. But we always use lowercase. For instance, use 'zh_cn' or 'zh_tw' for the two variants of chinese. In the following explanation we assume 'de' for german. - Go to directory 'src' $ cd src - Add the following line into file 'djview.pro' TRANSLATIONS += djview_de.ts - Run the Qt program 'lupdate' $ lupdate djview.pro - A file named djview_de.ts must have been created. You must edit the translations using the Qt program 'linguist'. $ linguist djview_de.ts See the linguist documentation in the Qt documentation. Alternatively you can use 'kbabel' to edit the ts file. - Run the Qt program 'lrelease' $ lrelease djview.pro - You should have now a file named 'djview_de.qm'. To test your translations, type $ LANGUAGE=de ./djview - Once you are satisfied, send me your translation file 'djview_de.ts' by email (leonb@users.sourceforge.net) Thanks. CONTRIBUTORS ------------ Translations for djview were contributed by: djview_fr.ts Leon Bottou djview_uk.ts Yuri Chornoivan djview_de.ts Marc Feld djview_cs.ts Petr Pisar djview_ru.ts Alexander Potashev djview_zh_cn.ts Lee Chenhwa djview4/aclocal.m4000066400000000000000000000003631174072760700143070ustar00rootroot00000000000000# aclocal.m4 -*-Shell-script-*- # m4_include(config/libtool.m4)dnl m4_include(config/ltoptions.m4)dnl m4_include(config/ltsugar.m4)dnl m4_include(config/ltversion.m4)dnl m4_include(config/lt~obsolete.m4)dnl m4_include(config/acinclude.m4)dnl djview4/config/000077500000000000000000000000001174072760700137125ustar00rootroot00000000000000djview4/config/.gitignore000066400000000000000000000000131174072760700156740ustar00rootroot00000000000000/*.dh-orig djview4/config/acinclude.m4000066400000000000000000000321571174072760700161130ustar00rootroot00000000000000dnl Copyright (c) 2002 Leon Bottou and Yann Le Cun. dnl Copyright (c) 2001 AT&T dnl dnl Most of these macros are derived from macros listed dnl at the GNU Autoconf Macro Archive dnl http://www.gnu.org/software/ac-archive/ dnl dnl This program is free software; you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation; either version 2 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program; if not, write to the Free Software dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA02111 USA dnl dnl ------------------------------------------------------- dnl @synopsis AC_DEFINE_VERSION dnl Defines a hexadecimal version number dnl ------------------------------------------------------- AC_DEFUN([AC_DEFINE_VERSION], [ IFS=. read major minor revis <<__eof__ $2 __eof__ test -z "$major" && major=0 test -z "$minor" && minor=0 test -z "$revis" && revis=0 hexversion=`printf '0x%x%02x%02x' $major $minor $revis` AC_DEFINE_UNQUOTED($1,[$hexversion],[hexadecimal version number]) ]) dnl ------------------------------------------------------- dnl @synopsis AC_DEFINE_INSTALL_PATHS dnl Define various installation paths dnl ------------------------------------------------------- AC_DEFUN([AC_DEFINE_INSTALL_PATHS],[ save_prefix="${prefix}" save_exec_prefix="${exec_prefix}" test "x$prefix" = xNONE && prefix="$ac_default_prefix" test "x$exec_prefix" = xNONE && exec_prefix="$prefix" DIR_PREFIX="`eval echo \"$prefix\"`" AC_DEFINE_UNQUOTED(DIR_PREFIX,["${DIR_PREFIX}"],[directory "prefix"]) DIR_EXEC_PREFIX="`eval echo \"$exec_prefix\"`" DIR_EXEC_PREFIX="`eval echo \"$DIR_EXEC_PREFIX\"`" AC_DEFINE_UNQUOTED(DIR_EXEC_PREFIX,["${DIR_EXEC_PREFIX}"],[directory "exec_prefix"]) DIR_BINDIR="`eval echo \"$bindir\"`" DIR_BINDIR="`eval echo \"$DIR_BINDIR\"`" AC_DEFINE_UNQUOTED(DIR_BINDIR,["${DIR_BINDIR}"],[directory "bindir"]) DIR_LIBDIR="`eval echo \"$libdir\"`" DIR_LIBDIR="`eval echo \"$DIR_LIBDIR\"`" AC_DEFINE_UNQUOTED(DIR_LIBDIR,["${DIR_LIBDIR}"],[directory "libdir"]) DIR_DATADIR="`eval echo \"$datadir\"`" DIR_DATADIR="`eval echo \"$DIR_DATADIR\"`" AC_DEFINE_UNQUOTED(DIR_DATADIR,["${DIR_DATADIR}"],[directory "datadir"]) DIR_MANDIR="`eval echo \"$mandir\"`" DIR_MANDIR="`eval echo \"$DIR_MANDIR\"`" AC_DEFINE_UNQUOTED(DIR_MANDIR,["${DIR_MANDIR}"],[directory "mandir"]) prefix="${save_prefix}" exec_prefix="${save_exec_prefix}" ]) dnl ------------------------------------------------------- dnl @synopsis AC_CHECK_CXX_OPT(OPTION, dnl ACTION-IF-OKAY,ACTION-IF-NOT-OKAY) dnl Check if compiler accepts option OPTION. dnl ------------------------------------------------------- AC_DEFUN(AC_CHECK_CXX_OPT,[ opt="$1" AC_MSG_CHECKING([if $CXX accepts $opt]) echo 'void f(){}' > conftest.cc if test -z "`${CXX} ${CXXFLAGS} ${OPTS} $opt -c conftest.cc 2>&1`"; then AC_MSG_RESULT(yes) rm conftest.* $2 else AC_MSG_RESULT(no) rm conftest.* $3 fi ]) dnl ------------------------------------------------------- dnl @synopsis AC_CXX_OPTIMIZE dnl Setup option --enable-debug dnl Collects optimization/debug option in variable OPTS dnl Filter options from CFLAGS and CXXFLAGS dnl ------------------------------------------------------- AC_DEFUN(AC_CXX_OPTIMIZE,[ AC_ARG_ENABLE(debug, AC_HELP_STRING([--enable-debug], [Compile with debugging options (default: no)]), [ac_debug=$enableval],[ac_debug=no]) OPTS= AC_SUBST(OPTS) saved_CXXFLAGS="$CXXFLAGS" saved_CFLAGS="$CFLAGS" CXXFLAGS= CFLAGS= for opt in $saved_CXXFLAGS ; do case $opt in -g*) test $ac_debug != no && OPTS="$OPTS $opt" ;; -O*) ;; *) CXXFLAGS="$CXXFLAGS $opt" ;; esac done for opt in $saved_CFLAGS ; do case $opt in -O*|-g*) ;; *) CFLAGS="$CFLAGS $opt" ;; esac done if test x$ac_debug = xno ; then OPTS=-DNDEBUG AC_CHECK_CXX_OPT([-Wall],[OPTS="$OPTS -Wall"]) AC_CHECK_CXX_OPT([-O2],[OPTS="$OPTS -O2"]) else AC_CHECK_CXX_OPT([-Wall],[OPTS="$OPTS -Wall"]) 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. dnl Set output variable TIFF_CFLAGS and TIFF_LIBS dnl ------------------------------------------------------------------ AC_DEFUN([AC_PATH_TIFF], [ AC_ARG_VAR(TIFF_LIBS, [Libraries for tiff]) AC_ARG_VAR(TIFF_CFLAGS, [Compilation flags for tiff]) ac_tiff=no AC_ARG_WITH(tiff, AC_HELP_STRING([--with-tiff=DIR], [where libtiff is located]), [ac_tiff=$withval], [ac_tiff=yes] ) # Process specification if test x$ac_tiff = xyes ; then test x${TIFF_LIBS+set} != xset && TIFF_LIBS="-ltiff" elif test x$ac_tiff != xno ; then test x${TIFF_LIBS+set} != xset && TIFF_LIBS="-L$ac_tiff/lib -ltiff" test x${TIFF_CFLAGS+set} != xset && TIFF_CFLAGS="-I$ac_tiff/include" fi # Try linking if test x$ac_tiff != xno ; then AC_MSG_CHECKING([for the libtiff library]) save_CFLAGS="$CFLAGS" save_CXXFLAGS="$CXXFLAGS" save_LIBS="$LIBS" CFLAGS="$CFLAGS $TIFF_CFLAGS" CXXFLAGS="$CXXFLAGS $TIFF_CFLAGS" LIBS="$LIBS $TIFF_LIBS" AC_TRY_LINK([ #ifdef __cplusplus extern "C" { #endif #include #include #ifdef __cplusplus } #endif ],[ TIFFOpen(0,0);], [ac_tiff=yes], [ac_tiff=no] ) CFLAGS="$save_CFLAGS" CXXFLAGS="$save_CXXFLAGS" LIBS="$save_LIBS" AC_MSG_RESULT($ac_tiff) fi # Finish if test x$ac_tiff = xno; then TIFF_CFLAGS= ; TIFF_LIBS= ifelse([$2],,:,[$2]) else AC_DEFINE(HAVE_TIFF,1,[Define if you have libtiff.]) AC_MSG_RESULT([setting TIFF_CFLAGS=$TIFF_CFLAGS]) AC_MSG_RESULT([setting TIFF_LIBS=$TIFF_LIBS]) ifelse([$1],,:,[$1]) fi ]) dnl ------------------------------------------------------------------ dnl @synopsis AC_PROG_PKG_CONFIG([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) dnl Sets output variables PKG_CONFIG dnl ------------------------------------------------------------------ AC_DEFUN([AC_PROG_PKG_CONFIG], [ AC_ARG_VAR(PKG_CONFIG,[Location of the pkg-config program.]) AC_ARG_VAR(PKG_CONFIG_PATH, [Path for pkg-config descriptors.]) AC_PATH_PROG(PKG_CONFIG, pkg-config) if test -z "$PKG_CONFIG" ; then ifelse([$2],,:,[$2]) else ifelse([$1],,:,[$1]) fi ]) dnl ------------------------------------------------------------------ dnl @synopsis AC_PATH_DDJVUUAPI([action-if-found],[action-if-notfound]) dnl Search for ddjvuapi. Defines HAVE_DDJVUAPI. dnl Sets output variables DDJVUAPI_CFLAGS and DDJVUAPI_LIBS dnl ------------------------------------------------------------------ AC_DEFUN([AC_PATH_DDJVUAPI], [ AC_REQUIRE([AC_PROG_PKG_CONFIG]) AC_ARG_VAR(DDJVUAPI_LIBS, [Libraries for ddjvuapi]) AC_ARG_VAR(DDJVUAPI_CFLAGS, [Compilation flags for ddjvuapi]) AC_MSG_CHECKING([for ddjvuapi]) if test -n "$DDJVUAPI_LIBS" ; then AC_MSG_RESULT([user defined]) AC_MSG_RESULT([using DDJVUAPI_LIBS=$DDJVUAPI_LIBS]) AC_MSG_RESULT([using DDJVUAPI_CFLAGS=$DDJVUAPI_CFLAGS]) elif test -x "$PKG_CONFIG" ; then if $PKG_CONFIG ddjvuapi ; then ac_ddjvuapi=yes AC_MSG_RESULT([found]) DDJVUAPI_LIBS=`$PKG_CONFIG --libs ddjvuapi` AC_MSG_RESULT([setting DDJVUAPI_LIBS=$DDJVUAPI_LIBS]) DDJVUAPI_CFLAGS=`$PKG_CONFIG --cflags ddjvuapi` AC_MSG_RESULT([setting DDJVUAPI_CFLAGS=$DDJVUAPI_CFLAGS]) AC_DEFINE(HAVE_DDJVUAPI,1,[Define if you have ddjvuapi.]) ifelse([$1],,:,[$1]) else AC_MSG_RESULT([not found by pkg-config]) ac_ddjvuapi=no ifelse([$2],,:,[$2]) fi else AC_MSG_RESULT([no pkg-config]) ac_ddjvuapi=no ifelse([$2],,:,[$2]) fi ]) 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 ]) dnl ------------------------------------------------------------------ dnl @synopsis AC_PROGS_QT4 dnl Sets output variables QMAKE, MOC, UIC, RCC, LUPDATE, LRELEASE dnl Prints an error message if QMAKE is not found or not suitable dnl ------------------------------------------------------------------ AC_DEFUN([AC_PROGS_QT4], [ AC_REQUIRE([AC_PATH_X]) AC_REQUIRE([AC_PATH_XTRA]) AC_ARG_VAR(QMAKE,[Location of the QMAKE program.]) AC_ARG_VAR(QMAKESPEC,[Location of the QMAKE specifications.]) AC_ARG_VAR(MOC,[Location of the MOC program.]) AC_ARG_VAR(UIC,[Location of the UIC program.]) AC_ARG_VAR(RCC,[Location of the RCC program.]) AC_ARG_VAR(LUPDATE,[Location of the LUPDATE program.]) AC_ARG_VAR(LRELEASE,[Location of the LRELEASE program.]) AC_ARG_VAR(QTDIR,[Location of the Qt package (deprecated).]) path=$PATH if test -n "QTDIR" && test -d "$QTDIR/include" ; then if test -d "$QTDIR/include/Qt" ; then : elif test -f "$QTDIR/include/qobject.h" ; then AC_MSG_ERROR([We want Qt4 but your QTDIR variable points to a Qt3 install. Please check variables QTDIR, QMAKE, QMAKESPEC, etc.. Unsetting them is better than setting them wrong.]) fi fi if test -n "$QTDIR" && test -d "$QTDIR/bin" ; then path=$QTDIR/bin:$PATH fi if test -z "$QMAKE" ; then AC_PATH_PROGS([QMAKE], [qmake-qt4 qmake], [], [$path]) fi if test -z "$QMAKE" ; then AC_MSG_ERROR([Cannot find the Qt4 program qmake. Please define variable QMAKE and possibly QMAKESPEC. Defining QTDIR can help although it is deprecated.]) fi mkdir conftest.d cat > conftest.d/conftest.pro <<\EOF changequote(<<, >>)dnl message(QMAKE_UIC="$$QMAKE_UIC") message(QMAKE_MOC="$$QMAKE_MOC") message(QT_VERSION="$$[QT_VERSION]") message(QT_INSTALL_PREFIX="$$[QT_INSTALL_PREFIX]") message(QT_INSTALL_DATA="$$[QT_INSTALL_DATA]") message(QT_INSTALL_HEADERS="$$[QT_INSTALL_HEADERS]") message(QT_INSTALL_BINS="$$[QT_INSTALL_BINS]") changequote([, ])dnl EOF if ( cd conftest.d && $QMAKE > conftest.out 2>&1 ) ; then sed -e 's/^.*: *//' < conftest.d/conftest.out > conftest.d/conftest.sh . conftest.d/conftest.sh rm -rf conftest.d else rm -rf conftest.d AC_MSG_ERROR([Cannot successfully run Qt4 program qmake. Please define variable QMAKE to a working qmake. If you define QMAKESPEC, make sure it is correct.]) fi case "$QT_VERSION" in 4.*) AC_MSG_RESULT([Program qmake reports Qt version $QT_VERSION.]) ;; *) AC_MSG_ERROR([Qt version $QT_VERSION is insufficient. Please define variable QMAKE to a suitable qmake.]) ;; esac if test -z "$QTDIR" && test -n "$QT_INSTALL_DATA" && test -d "$QT_INSTALL_DATA/bin" ; then QTDIR="$QT_INSTALL_DATA" AC_MSG_RESULT([Defining QTDIR=$QTDIR]) fi path=$PATH if test -n "$QTDIR" && test -d "$QTDIR/bin" ; then path=$QTDIR/bin:$path fi if test -d "$QT_INSTALL_BINS" ; then path=$QT_INSTALL_BINS:$path fi if test -z "$MOC" ; then if test -x "$QMAKE_MOC" ; then MOC=$QMAKE_MOC AC_MSG_RESULT([Defining MOC=$MOC]) elif test -d "$QTDIR" && test -d "$QTDIR/bin" && test -x "$QTDIR/bin/moc" ; then MOC="$QTDIR/bin/moc" AC_MSG_RESULT([Defining MOC=$MOC]) else AC_PATH_PROGS([MOC], [moc-qt4 moc], [], [$path]) fi fi if test -z "$UIC" ; then if test -x "$QMAKE_UIC" ; then UIC=$QMAKE_UIC AC_MSG_RESULT([Defining UIC=$UIC]) elif test -d "$QTDIR" && test -d "$QTDIR/bin" && test -x "$QTDIR/bin/uic" ; then UIC="$QTDIR/bin/uic" AC_MSG_RESULT([Defining UIC=$UIC]) else AC_PATH_PROGS([UIC], [uic-qt4 uic], [], [$path]) fi fi if test -z "$RCC" ; then AC_PATH_PROGS([RCC], [rcc-qt4 rcc], [], [$path]) fi if test -z "$LUPDATE" ; then AC_PATH_PROGS([LUPDATE], [lupdate-qt4 lupdate], [], [$path]) fi if test -z "$LRELEASE" ; then AC_PATH_PROGS([LRELEASE], [lrelease-qt4 lrelease], [], [$path]) fi PATH=$path ]) djview4/config/config.guess000077500000000000000000001267301174072760700162430ustar00rootroot00000000000000#! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, # 2011 Free Software Foundation, Inc. timestamp='2011-05-11' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA # 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Per Bothner. Please send patches (context # diff format) to and include a ChangeLog # entry. # # This script attempts to guess a canonical system name similar to # config.sub. If it succeeds, it prints the system name on stdout, and # exits with 0. Otherwise, it exits with 1. # # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" >&2 exit 1 ;; * ) break ;; esac done if test $# != 0; then echo "$me: too many arguments$help" >&2 exit 1 fi trap 'exit 1' 1 2 15 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a # headache to deal with in a portable fashion. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. # Portable tmp directory creation inspired by the Autoconf team. set_cc_for_build=' trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; : ${TMPDIR=/tmp} ; { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; dummy=$tmp/dummy ; tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; case $CC_FOR_BUILD,$HOST_CC,$CC in ,,) echo "int x;" > $dummy.c ; for c in cc gcc c89 c99 ; do if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then CC_FOR_BUILD="$c"; break ; fi ; done ; if test x"$CC_FOR_BUILD" = x ; then CC_FOR_BUILD=no_compiler_found ; fi ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; esac ; set_cc_for_build= ;' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) if (test -f /.attbin/uname) >/dev/null 2>&1 ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward # compatibility and a consistent mechanism for selecting the # object file format. # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ /usr/sbin/$sysctl 2>/dev/null || echo unknown)` case "${UNAME_MACHINE_ARCH}" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; sh5el) machine=sh5le-unknown ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently, or will in the future. case "${UNAME_MACHINE_ARCH}" in arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ELF__ then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? os=netbsd else os=netbsdelf fi ;; *) os=netbsd ;; esac # The OS release # Debian GNU/NetBSD machines have a different userland, and # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. case "${UNAME_VERSION}" in Debian*) release='-gnu' ;; *) release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} exit ;; *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} exit ;; *:SolidBSD:*:*) echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} exit ;; macppc:MirBSD:*:*) echo powerpc-unknown-mirbsd${UNAME_RELEASE} exit ;; *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` ;; *5.*) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ;; esac # According to Compaq, /usr/sbin/psrinfo has been available on # OSF/1 and Tru64 systems produced since 1995. I hope that # covers most systems running today. This code pipes the CPU # types through head -n 1, so we only detect the type of CPU 0. ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` case "$ALPHA_CPU_TYPE" in "EV4 (21064)") UNAME_MACHINE="alpha" ;; "EV4.5 (21064)") UNAME_MACHINE="alpha" ;; "LCA4 (21066/21068)") UNAME_MACHINE="alpha" ;; "EV5 (21164)") UNAME_MACHINE="alphaev5" ;; "EV5.6 (21164A)") UNAME_MACHINE="alphaev56" ;; "EV5.6 (21164PC)") UNAME_MACHINE="alphapca56" ;; "EV5.7 (21164PC)") UNAME_MACHINE="alphapca57" ;; "EV6 (21264)") UNAME_MACHINE="alphaev6" ;; "EV6.7 (21264A)") UNAME_MACHINE="alphaev67" ;; "EV6.8CB (21264C)") UNAME_MACHINE="alphaev68" ;; "EV6.8AL (21264B)") UNAME_MACHINE="alphaev68" ;; "EV6.8CX (21264D)") UNAME_MACHINE="alphaev68" ;; "EV6.9A (21264/EV69A)") UNAME_MACHINE="alphaev69" ;; "EV7 (21364)") UNAME_MACHINE="alphaev7" ;; "EV7.9 (21364A)") UNAME_MACHINE="alphaev79" ;; esac # A Pn.n version is a patched version. # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` # Reset EXIT trap before exiting to avoid spurious non-zero exit code. exitcode=$? trap '' 0 exit $exitcode ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead # of the specific Alpha model? echo alpha-pc-interix exit ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit ;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit ;; *:[Mm]orph[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-morphos exit ;; *:OS/390:*:*) echo i370-ibm-openedition exit ;; *:z/VM:*:*) echo s390-ibm-zvmoe exit ;; *:OS400:*:*) echo powerpc-ibm-os400 exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit ;; arm:riscos:*:*|arm:RISCOS:*:*) echo arm-unknown-riscos exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit ;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then echo pyramid-pyramid-sysv3 else echo pyramid-pyramid-bsd fi exit ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit ;; DRS?6000:unix:4.0:6*) echo sparc-icl-nx6 exit ;; DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case `/usr/bin/uname -p` in sparc) echo sparc-icl-nx7; exit ;; esac ;; s390x:SunOS:*:*) echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) echo i386-pc-auroraux${UNAME_RELEASE} exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) eval $set_cc_for_build SUN_ARCH="i386" # If there is a compiler, see if it is configured for 64-bit objects. # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. # This test works for both compilers. if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then SUN_ARCH="x86_64" fi fi echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in Series*|S4*) UNAME_RELEASE=`uname -v` ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` exit ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} exit ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) echo m68k-sun-sunos${UNAME_RELEASE} ;; sun4) echo sparc-sun-sunos${UNAME_RELEASE} ;; esac exit ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor # > m68000). The system name ranges from "MiNT" over "FreeMiNT" # to the lowercase version "mint" (or "freemint"). Finally # the system name "TOS" denotes a system which is actually not # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} exit ;; m68k:machten:*:*) echo m68k-apple-machten${UNAME_RELEASE} exit ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} exit ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} exit ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} exit ;; mips:*:*:UMIPS | mips:*:*:RISCos) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); #endif #endif exit (-1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && SYSTEM_NAME=`$dummy $dummyarg` && { echo "$SYSTEM_NAME"; exit; } echo mips-mips-riscos${UNAME_RELEASE} exit ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit ;; Motorola:*:4.3:PL8-*) echo powerpc-harris-powermax exit ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) echo powerpc-harris-powermax exit ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ [ ${TARGET_BINARY_INTERFACE}x = x ] then echo m88k-dg-dgux${UNAME_RELEASE} else echo m88k-dg-dguxbcs${UNAME_RELEASE} fi else echo i586-dg-dgux${UNAME_RELEASE} fi exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 exit ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 exit ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` exit ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix exit ;; ia64:AIX:*:*) if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} exit ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include main() { if (!__power_pc()) exit(1); puts("powerpc-ibm-aix3.2.5"); exit(0); } EOF if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` then echo "$SYSTEM_NAME" else echo rs6000-ibm-aix3.2.5 fi elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 else echo rs6000-ibm-aix3.2 fi exit ;; *:AIX:*:[4567]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} exit ;; *:AIX:*:*) echo rs6000-ibm-aix exit ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 exit ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd exit ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit ;; 9000/[34678]??:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` case "${UNAME_MACHINE}" in 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` case "${sc_cpu_version}" in 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 case "${sc_kernel_bits}" in 32) HP_ARCH="hppa2.0n" ;; 64) HP_ARCH="hppa2.0w" ;; '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 esac ;; esac fi if [ "${HP_ARCH}" = "" ]; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #define _HPUX_SOURCE #include #include int main () { #if defined(_SC_KERNEL_BITS) long bits = sysconf(_SC_KERNEL_BITS); #endif long cpu = sysconf (_SC_CPU_VERSION); switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0"); break; case CPU_PA_RISC1_1: puts ("hppa1.1"); break; case CPU_PA_RISC2_0: #if defined(_SC_KERNEL_BITS) switch (bits) { case 64: puts ("hppa2.0w"); break; case 32: puts ("hppa2.0n"); break; default: puts ("hppa2.0"); break; } break; #else /* !defined(_SC_KERNEL_BITS) */ puts ("hppa2.0"); break; #endif default: puts ("hppa1.0"); break; } exit (0); } EOF (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac if [ ${HP_ARCH} = "hppa2.0w" ] then eval $set_cc_for_build # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler # generating 64-bit code. GNU and HP use different nomenclature: # # $ CC_FOR_BUILD=cc ./config.guess # => hppa2.0w-hp-hpux11.23 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess # => hppa64-hp-hpux11.23 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | grep -q __LP64__ then HP_ARCH="hppa2.0w" else HP_ARCH="hppa64" fi fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} exit ;; 3050*:HI-UX:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include int main () { long cpu = sysconf (_SC_CPU_VERSION); /* The order matters, because CPU_IS_HP_MC68K erroneously returns true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct results, however. */ if (CPU_IS_PA_RISC (cpu)) { switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; default: puts ("hppa-hitachi-hiuxwe2"); break; } } else if (CPU_IS_HP_MC68K (cpu)) puts ("m68k-hitachi-hiuxwe2"); else puts ("unknown-hitachi-hiuxwe2"); exit (0); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } echo unknown-hitachi-hiuxwe2 exit ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd exit ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf exit ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi exit ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd exit ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd exit ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' exit ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; *:UNICOS/mp:*:*) echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; 5000:UNIX_System_V:4.*:*) FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} exit ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit ;; *:FreeBSD:*:*) case ${UNAME_MACHINE} in pc98) echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; amd64) echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; *) echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; esac exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; i*:windows32*:*) # uname -m includes "-pc" on this system. echo ${UNAME_MACHINE}-mingw32 exit ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; *:Interix*:*) case ${UNAME_MACHINE} in x86) echo i586-pc-interix${UNAME_RELEASE} exit ;; authenticamd | genuineintel | EM64T) echo x86_64-unknown-interix${UNAME_RELEASE} exit ;; IA64) echo ia64-unknown-interix${UNAME_RELEASE} exit ;; esac ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit ;; 8664:Windows_NT:*) echo x86_64-pc-mks exit ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # UNAME_MACHINE based on the output of uname instead of i386? echo i586-pc-interix exit ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) echo x86_64-unknown-cygwin exit ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin exit ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; *:GNU:*:*) # the GNU system echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; EV56) UNAME_MACHINE=alphaev56 ;; PCA56) UNAME_MACHINE=alphapca56 ;; PCA57) UNAME_MACHINE=alphapca56 ;; EV6) UNAME_MACHINE=alphaev6 ;; EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep -q ld.so.1 if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} exit ;; arm*:Linux:*:*) eval $set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then echo ${UNAME_MACHINE}-unknown-linux-gnu else if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_PCS_VFP then echo ${UNAME_MACHINE}-unknown-linux-gnueabi else echo ${UNAME_MACHINE}-unknown-linux-gnueabihf fi fi exit ;; avr32*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; cris:Linux:*:*) echo cris-axis-linux-gnu exit ;; crisv32:Linux:*:*) echo crisv32-axis-linux-gnu exit ;; frv:Linux:*:*) echo frv-unknown-linux-gnu exit ;; i*86:Linux:*:*) LIBC=gnu eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __dietlibc__ LIBC=dietlibc #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` echo "${UNAME_MACHINE}-pc-linux-${LIBC}" exit ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; m32r*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; mips:Linux:*:* | mips64:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef ${UNAME_MACHINE} #undef ${UNAME_MACHINE}el #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=${UNAME_MACHINE}el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=${UNAME_MACHINE} #else CPU= #endif #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; or32:Linux:*:*) echo or32-unknown-linux-gnu exit ;; padre:Linux:*:*) echo sparc-unknown-linux-gnu exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-gnu exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in PA7*) echo hppa1.1-unknown-linux-gnu ;; PA8*) echo hppa2.0-unknown-linux-gnu ;; *) echo hppa-unknown-linux-gnu ;; esac exit ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-gnu exit ;; ppc:Linux:*:*) echo powerpc-unknown-linux-gnu exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux exit ;; sh64*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; tile*:Linux:*:*) echo ${UNAME_MACHINE}-tilera-linux-gnu exit ;; vax:Linux:*:*) echo ${UNAME_MACHINE}-dec-linux-gnu exit ;; x86_64:Linux:*:*) echo x86_64-unknown-linux-gnu exit ;; xtensa*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. echo i386-sequent-sysv4 exit ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. echo ${UNAME_MACHINE}-pc-os2-emx exit ;; i*86:XTS-300:*:STOP) echo ${UNAME_MACHINE}-unknown-stop exit ;; i*86:atheos:*:*) echo ${UNAME_MACHINE}-unknown-atheos exit ;; i*86:syllable:*:*) echo ${UNAME_MACHINE}-pc-syllable exit ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp exit ;; i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} else echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi exit ;; i*86:*:5:[678]*) # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} exit ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else echo ${UNAME_MACHINE}-pc-sysv32 fi exit ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i586. # Note: whatever this is, it MUST be the same as what config.sub # prints for the "djgpp" host, or else GDB configury will decide that # this is a cross-build. echo i586-pc-msdosdjgpp exit ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit ;; paragon:*:*:*) echo i860-intel-osf1 exit ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 fi exit ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv exit ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv exit ;; M680?0:D-NIX:5.3:*) echo m68k-diab-dnix exit ;; M68*:*:R3V[5678]*:*) test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4; exit; } ;; NCR*:*:4.2:* | MPRAS*:*:4.2:*) OS_REL='.3' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 exit ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` echo ${UNAME_MACHINE}-sni-sysv4 else echo ns32k-sni-sysv fi exit ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 exit ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 exit ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. echo ${UNAME_MACHINE}-stratus-vos exit ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv${UNAME_RELEASE} else echo mips-unknown-sysv${UNAME_RELEASE} fi exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos exit ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit ;; BePC:Haiku:*:*) # Haiku running on Intel PC compatible. echo i586-pc-haiku exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} exit ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} exit ;; SX-7:SUPER-UX:*:*) echo sx7-nec-superux${UNAME_RELEASE} exit ;; SX-8:SUPER-UX:*:*) echo sx8-nec-superux${UNAME_RELEASE} exit ;; SX-8R:SUPER-UX:*:*) echo sx8r-nec-superux${UNAME_RELEASE} exit ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown case $UNAME_PROCESSOR in i386) eval $set_cc_for_build if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then UNAME_PROCESSOR="x86_64" fi fi ;; unknown) UNAME_PROCESSOR=powerpc ;; esac echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = "x86"; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} exit ;; *:QNX:*:4*) echo i386-pc-qnx exit ;; NEO-?:NONSTOP_KERNEL:*:*) echo neo-tandem-nsk${UNAME_RELEASE} exit ;; NSE-?:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit ;; NSR-?:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv exit ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} exit ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. if test "$cputype" = "386"; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" fi echo ${UNAME_MACHINE}-unknown-plan9 exit ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 exit ;; *:TENEX:*:*) echo pdp10-unknown-tenex exit ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 exit ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 exit ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 exit ;; *:ITS:*:*) echo pdp10-unknown-its exit ;; SEI:*:*:SEIUX) echo mips-sei-seiux${UNAME_RELEASE} exit ;; *:DragonFly:*:*) echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` case "${UNAME_MACHINE}" in A*) echo alpha-dec-vms ; exit ;; I*) echo ia64-dec-vms ; exit ;; V*) echo vax-dec-vms ; exit ;; esac ;; *:XENIX:*:SysV) echo i386-pc-xenix exit ;; i*86:skyos:*:*) echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' exit ;; i*86:rdos:*:*) echo ${UNAME_MACHINE}-pc-rdos exit ;; i*86:AROS:*:*) echo ${UNAME_MACHINE}-pc-aros exit ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 eval $set_cc_for_build cat >$dummy.c < # include #endif main () { #if defined (sony) #if defined (MIPSEB) /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, I don't know.... */ printf ("mips-sony-bsd\n"); exit (0); #else #include printf ("m68k-sony-newsos%s\n", #ifdef NEWSOS4 "4" #else "" #endif ); exit (0); #endif #endif #if defined (__arm) && defined (__acorn) && defined (__unix) printf ("arm-acorn-riscix\n"); exit (0); #endif #if defined (hp300) && !defined (hpux) printf ("m68k-hp-bsd\n"); exit (0); #endif #if defined (NeXT) #if !defined (__ARCHITECTURE__) #define __ARCHITECTURE__ "m68k" #endif int version; version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; if (version < 4) printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); else printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); exit (0); #endif #if defined (MULTIMAX) || defined (n16) #if defined (UMAXV) printf ("ns32k-encore-sysv\n"); exit (0); #else #if defined (CMU) printf ("ns32k-encore-mach\n"); exit (0); #else printf ("ns32k-encore-bsd\n"); exit (0); #endif #endif #endif #if defined (__386BSD__) printf ("i386-pc-bsd\n"); exit (0); #endif #if defined (sequent) #if defined (i386) printf ("i386-sequent-dynix\n"); exit (0); #endif #if defined (ns32000) printf ("ns32k-sequent-dynix\n"); exit (0); #endif #endif #if defined (_SEQUENT_) struct utsname un; uname(&un); if (strncmp(un.version, "V2", 2) == 0) { printf ("i386-sequent-ptx2\n"); exit (0); } if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ printf ("i386-sequent-ptx1\n"); exit (0); } printf ("i386-sequent-ptx\n"); exit (0); #endif #if defined (vax) # if !defined (ultrix) # include # if defined (BSD) # if BSD == 43 printf ("vax-dec-bsd4.3\n"); exit (0); # else # if BSD == 199006 printf ("vax-dec-bsd4.3reno\n"); exit (0); # else printf ("vax-dec-bsd\n"); exit (0); # endif # endif # else printf ("vax-dec-bsd\n"); exit (0); # endif # else printf ("vax-dec-ultrix\n"); exit (0); # endif #endif #if defined (alliant) && defined (i860) printf ("i860-alliant-bsd\n"); exit (0); #endif exit (1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } # Apollos put the system type in the environment. test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } # Convex versions that predate uname can use getsysinfo(1) if [ -x /usr/convex/getsysinfo ] then case `getsysinfo -f cpu_type` in c1*) echo c1-convex-bsd exit ;; c2*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; c34*) echo c34-convex-bsd exit ;; c38*) echo c38-convex-bsd exit ;; c4*) echo c4-convex-bsd exit ;; esac fi cat >&2 < in order to provide the needed information to handle your system. config.guess timestamp = $timestamp uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` /bin/uname -X = `(/bin/uname -X) 2>/dev/null` hostinfo = `(hostinfo) 2>/dev/null` /bin/universe = `(/bin/universe) 2>/dev/null` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` /bin/arch = `(/bin/arch) 2>/dev/null` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` UNAME_MACHINE = ${UNAME_MACHINE} UNAME_RELEASE = ${UNAME_RELEASE} UNAME_SYSTEM = ${UNAME_SYSTEM} UNAME_VERSION = ${UNAME_VERSION} EOF exit 1 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: djview4/config/config.h.in000066400000000000000000000070461174072760700157440ustar00rootroot00000000000000/* config/config.h.in. Generated from configure.ac by autoheader. */ /* directory "bindir" */ #undef DIR_BINDIR /* directory "datadir" */ #undef DIR_DATADIR /* directory "exec_prefix" */ #undef DIR_EXEC_PREFIX /* directory "libdir" */ #undef DIR_LIBDIR /* directory "mandir" */ #undef DIR_MANDIR /* directory "prefix" */ #undef DIR_PREFIX /* hexadecimal version number */ #undef DJVIEW_VERSION /* string */ #undef DJVIEW_VERSION_STR /* Define if you have ddjvuapi. */ #undef HAVE_DDJVUAPI /* Define to 1 if you have the header file, and it defines `DIR'. */ #undef HAVE_DIRENT_H /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H /* Define to 1 if you have the `fork' function. */ #undef HAVE_FORK /* Define if you have glib-2.0. */ #undef HAVE_GLIB /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* Define to 1 if you have the header file, and it defines `DIR'. */ #undef HAVE_NDIR_H /* Define to 1 if you have the `sigaction' function. */ #undef HAVE_SIGACTION /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H /* Define to 1 if you have the `strerror' function. */ #undef HAVE_STRERROR /* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H /* Define to 1 if you have the header file, and it defines `DIR'. */ #undef HAVE_SYS_DIR_H /* Define to 1 if you have the header file, and it defines `DIR'. */ #undef HAVE_SYS_NDIR_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if you have that is POSIX.1 compatible. */ #undef HAVE_SYS_WAIT_H /* Define if you have libtiff. */ #undef HAVE_TIFF /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* Define to 1 if you have the `vfork' function. */ #undef HAVE_VFORK /* Define to 1 if you have the header file. */ #undef HAVE_VFORK_H /* Define to 1 if you have the `wait3' function. */ #undef HAVE_WAIT3 /* Define to 1 if you have the `waitpid' function. */ #undef HAVE_WAITPID /* Define to 1 if `fork' works. */ #undef HAVE_WORKING_FORK /* Define to 1 if `vfork' works. */ #undef HAVE_WORKING_VFORK /* Define if you have xt include files. */ #undef HAVE_XT /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #undef LT_OBJDIR /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the home page for this package. */ #undef PACKAGE_URL /* Define to the version of this package. */ #undef PACKAGE_VERSION /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* Define to 1 if you can safely include both and . */ #undef TIME_WITH_SYS_TIME /* Define to 1 if the X Window System is missing or not being used. */ #undef X_DISPLAY_MISSING /* Define to `int' if does not define. */ #undef pid_t /* Define as `fork' if `vfork' does not work. */ #undef vfork djview4/config/config.sub000077500000000000000000001046061174072760700157040ustar00rootroot00000000000000#! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, # 2011 Free Software Foundation, Inc. timestamp='2011-03-23' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software # can handle that machine. It does not imply ALL GNU software can. # # This file is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA # 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Please send patches to . Submit a context # diff and a properly formatted GNU ChangeLog entry. # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. # Each package is responsible for reporting which valid configurations # it does not support. The user should be able to distinguish # a failure to support a valid configuration from a meaningless # configuration. # The goal of this file is to map all the various variations of a given # machine specification into a single specification in the form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or in some cases, the newer four-part form: # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] CPU-MFR-OPSYS $0 [OPTION] ALIAS Canonicalize a configuration name. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.sub ($timestamp) Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" exit 1 ;; *local*) # First pass through any local machine types. echo $1 exit ;; * ) break ;; esac done case $# in 0) echo "$me: missing argument$help" >&2 exit 1;; 1) ;; *) echo "$me: too many arguments$help" >&2 exit 1;; esac # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ knetbsd*-gnu* | netbsd*-gnu* | \ kopensolaris*-gnu* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] then os=`echo $1 | sed 's/.*-/-/'` else os=; fi ;; esac ### Let's recognize common machines as not being operating systems so ### that things like config.sub decstation-3100 work. We also ### recognize some manufacturers as not being operating systems, so we ### can provide default operating systems below. case $os in -sun*os*) # Prevent following clause from handling this invalid input. ;; -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -apple | -axis | -knuth | -cray | -microblaze) os= basic_machine=$1 ;; -bluegene*) os=-cnk ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 ;; -scout) ;; -wrs) os=-vxworks basic_machine=$1 ;; -chorusos*) os=-chorusos basic_machine=$1 ;; -chorusrdb) os=-chorusrdb basic_machine=$1 ;; -hiux*) os=-hiuxwe2 ;; -sco6) os=-sco5v6 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5) os=-sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco4) os=-sco3.2v4 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2.[4-9]*) os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2v[4-9]*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5v6*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco*) os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -udk*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -isc) os=-isc2.2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -clix*) basic_machine=clipper-intergraph ;; -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -lynx*) os=-lynxos ;; -ptx*) basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` ;; -windowsnt*) os=`echo $os | sed -e 's/windowsnt/winnt/'` ;; -psos*) os=-psos ;; -mint | -mint[0-9]*) basic_machine=m68k-atari os=-mint ;; esac # Decode aliases for certain CPU-COMPANY combinations. case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. 1750a | 580 \ | a29k \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ | bfin \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ | fido | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ | lm32 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ | maxq | mb | microblaze | mcore | mep | metag \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ | mips64octeon | mips64octeonel \ | mips64orion | mips64orionel \ | mips64r5900 | mips64r5900el \ | mips64vr | mips64vrel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | moxie \ | mt \ | msp430 \ | nds32 | nds32le | nds32be \ | nios | nios2 \ | ns16k | ns32k \ | open8 \ | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle \ | pyramid \ | rx \ | score \ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ | spu \ | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ | ubicom32 \ | v850 | v850e \ | we32k \ | x86 | xc16x | xstormy16 | xtensa \ | z8k | z80) basic_machine=$basic_machine-unknown ;; c54x) basic_machine=tic54x-unknown ;; c55x) basic_machine=tic55x-unknown ;; c6x) basic_machine=tic6x-unknown ;; m6811 | m68hc11 | m6812 | m68hc12 | picochip) # Motorola 68HC11/12. basic_machine=$basic_machine-unknown os=-none ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; ms1) basic_machine=mt-unknown ;; strongarm | thumb | xscale) basic_machine=arm-unknown ;; xscaleeb) basic_machine=armeb-unknown ;; xscaleel) basic_machine=armel-unknown ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. i*86 | x86_64) basic_machine=$basic_machine-pc ;; # Object if more than one company name word. *-*-*) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; # Recognize the basic CPU types with company name. 580-* \ | a29k-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* \ | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ | lm32-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ | mips64octeon-* | mips64octeonel-* \ | mips64orion-* | mips64orionel-* \ | mips64r5900-* | mips64r5900el-* \ | mips64vr-* | mips64vrel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | mt-* \ | msp430-* \ | nds32-* | nds32le-* | nds32be-* \ | nios-* | nios2-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | open8-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ | pyramid-* \ | romp-* | rs6000-* | rx-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparclite-* \ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \ | tahoe-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tile-* | tilegx-* \ | tron-* \ | ubicom32-* \ | v850-* | v850e-* | vax-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* \ | xstormy16-* | xtensa*-* \ | ymp-* \ | z8k-* | z80-*) ;; # Recognize the basic CPU types without company name, with glob match. xtensa*) basic_machine=$basic_machine-unknown ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) basic_machine=i386-unknown os=-bsd ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) basic_machine=m68000-att ;; 3b*) basic_machine=we32k-att ;; a29khif) basic_machine=a29k-amd os=-udi ;; abacus) basic_machine=abacus-unknown ;; adobe68k) basic_machine=m68010-adobe os=-scout ;; alliant | fx80) basic_machine=fx80-alliant ;; altos | altos3068) basic_machine=m68k-altos ;; am29k) basic_machine=a29k-none os=-bsd ;; amd64) basic_machine=x86_64-pc ;; amd64-*) basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; amdahl) basic_machine=580-amdahl os=-sysv ;; amiga | amiga-*) basic_machine=m68k-unknown ;; amigaos | amigados) basic_machine=m68k-unknown os=-amigaos ;; amigaunix | amix) basic_machine=m68k-unknown os=-sysv4 ;; apollo68) basic_machine=m68k-apollo os=-sysv ;; apollo68bsd) basic_machine=m68k-apollo os=-bsd ;; aros) basic_machine=i386-pc os=-aros ;; aux) basic_machine=m68k-apple os=-aux ;; balance) basic_machine=ns32k-sequent os=-dynix ;; blackfin) basic_machine=bfin-unknown os=-linux ;; blackfin-*) basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; bluegene*) basic_machine=powerpc-ibm os=-cnk ;; c54x-*) basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c55x-*) basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c6x-*) basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c90) basic_machine=c90-cray os=-unicos ;; cegcc) basic_machine=arm-unknown os=-cegcc ;; convex-c1) basic_machine=c1-convex os=-bsd ;; convex-c2) basic_machine=c2-convex os=-bsd ;; convex-c32) basic_machine=c32-convex os=-bsd ;; convex-c34) basic_machine=c34-convex os=-bsd ;; convex-c38) basic_machine=c38-convex os=-bsd ;; cray | j90) basic_machine=j90-cray os=-unicos ;; craynv) basic_machine=craynv-cray os=-unicosmp ;; cr16 | cr16-*) basic_machine=cr16-unknown os=-elf ;; crds | unos) basic_machine=m68k-crds ;; crisv32 | crisv32-* | etraxfs*) basic_machine=crisv32-axis ;; cris | cris-* | etrax*) basic_machine=cris-axis ;; crx) basic_machine=crx-unknown os=-elf ;; da30 | da30-*) basic_machine=m68k-da30 ;; decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) basic_machine=mips-dec ;; decsystem10* | dec10*) basic_machine=pdp10-dec os=-tops10 ;; decsystem20* | dec20*) basic_machine=pdp10-dec os=-tops20 ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) basic_machine=m68k-motorola ;; delta88) basic_machine=m88k-motorola os=-sysv3 ;; dicos) basic_machine=i686-pc os=-dicos ;; djgpp) basic_machine=i586-pc os=-msdosdjgpp ;; dpx20 | dpx20-*) basic_machine=rs6000-bull os=-bosx ;; dpx2* | dpx2*-bull) basic_machine=m68k-bull os=-sysv3 ;; ebmon29k) basic_machine=a29k-amd os=-ebmon ;; elxsi) basic_machine=elxsi-elxsi os=-bsd ;; encore | umax | mmax) basic_machine=ns32k-encore ;; es1800 | OSE68k | ose68k | ose | OSE) basic_machine=m68k-ericsson os=-ose ;; fx2800) basic_machine=i860-alliant ;; genix) basic_machine=ns32k-ns ;; gmicro) basic_machine=tron-gmicro os=-sysv ;; go32) basic_machine=i386-pc os=-go32 ;; h3050r* | hiux*) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; h8300hms) basic_machine=h8300-hitachi os=-hms ;; h8300xray) basic_machine=h8300-hitachi os=-xray ;; h8500hms) basic_machine=h8500-hitachi os=-hms ;; harris) basic_machine=m88k-harris os=-sysv3 ;; hp300-*) basic_machine=m68k-hp ;; hp300bsd) basic_machine=m68k-hp os=-bsd ;; hp300hpux) basic_machine=m68k-hp os=-hpux ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) basic_machine=m68000-hp ;; hp9k3[2-9][0-9]) basic_machine=m68k-hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) basic_machine=hppa1.1-hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) basic_machine=hppa1.1-hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) basic_machine=hppa1.0-hp ;; hppa-next) os=-nextstep3 ;; hppaosf) basic_machine=hppa1.1-hp os=-osf ;; hppro) basic_machine=hppa1.1-hp os=-proelf ;; i370-ibm* | ibm*) basic_machine=i370-ibm ;; # I'm not sure what "Sysv32" means. Should this be sysv3.2? i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; i*86v4*) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; i*86v) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv ;; i*86sol2) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; i386mach) basic_machine=i386-mach os=-mach ;; i386-vsta | vsta) basic_machine=i386-unknown os=-vsta ;; iris | iris4d) basic_machine=mips-sgi case $os in -irix*) ;; *) os=-irix4 ;; esac ;; isi68 | isi) basic_machine=m68k-isi os=-sysv ;; m68knommu) basic_machine=m68k-unknown os=-linux ;; m68knommu-*) basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; m88k-omron*) basic_machine=m88k-omron ;; magnum | m3230) basic_machine=mips-mips os=-sysv ;; merlin) basic_machine=ns32k-utek os=-sysv ;; microblaze) basic_machine=microblaze-xilinx ;; mingw32) basic_machine=i386-pc os=-mingw32 ;; mingw32ce) basic_machine=arm-unknown os=-mingw32ce ;; miniframe) basic_machine=m68000-convergent ;; *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) basic_machine=m68k-atari os=-mint ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` ;; mips3*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; monitor) basic_machine=m68k-rom68k os=-coff ;; morphos) basic_machine=powerpc-unknown os=-morphos ;; msdos) basic_machine=i386-pc os=-msdos ;; ms1-*) basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ;; mvs) basic_machine=i370-ibm os=-mvs ;; ncr3000) basic_machine=i486-ncr os=-sysv4 ;; netbsd386) basic_machine=i386-unknown os=-netbsd ;; netwinder) basic_machine=armv4l-rebel os=-linux ;; news | news700 | news800 | news900) basic_machine=m68k-sony os=-newsos ;; news1000) basic_machine=m68030-sony os=-newsos ;; news-3600 | risc-news) basic_machine=mips-sony os=-newsos ;; necv70) basic_machine=v70-nec os=-sysv ;; next | m*-next ) basic_machine=m68k-next case $os in -nextstep* ) ;; -ns2*) os=-nextstep2 ;; *) os=-nextstep3 ;; esac ;; nh3000) basic_machine=m68k-harris os=-cxux ;; nh[45]000) basic_machine=m88k-harris os=-cxux ;; nindy960) basic_machine=i960-intel os=-nindy ;; mon960) basic_machine=i960-intel os=-mon960 ;; nonstopux) basic_machine=mips-compaq os=-nonstopux ;; np1) basic_machine=np1-gould ;; neo-tandem) basic_machine=neo-tandem ;; nse-tandem) basic_machine=nse-tandem ;; nsr-tandem) basic_machine=nsr-tandem ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf ;; openrisc | openrisc-*) basic_machine=or32-unknown ;; os400) basic_machine=powerpc-ibm os=-os400 ;; OSE68000 | ose68000) basic_machine=m68000-ericsson os=-ose ;; os68k) basic_machine=m68k-none os=-os68k ;; pa-hitachi) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; paragon) basic_machine=i860-intel os=-osf ;; parisc) basic_machine=hppa-unknown os=-linux ;; parisc-*) basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; pbd) basic_machine=sparc-tti ;; pbb) basic_machine=m68k-tti ;; pc532 | pc532-*) basic_machine=ns32k-pc532 ;; pc98) basic_machine=i386-pc ;; pc98-*) basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; pentiumpro | p6 | 6x86 | athlon | athlon_*) basic_machine=i686-pc ;; pentiumii | pentium2 | pentiumiii | pentium3) basic_machine=i686-pc ;; pentium4) basic_machine=i786-pc ;; pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium4-*) basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould ;; power) basic_machine=power-ibm ;; ppc | ppcbe) basic_machine=powerpc-unknown ;; ppc-* | ppcbe-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown ;; ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64) basic_machine=powerpc64-unknown ;; ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64le | powerpc64little | ppc64-le | powerpc64-little) basic_machine=powerpc64le-unknown ;; ppc64le-* | powerpc64little-*) basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ps2) basic_machine=i386-ibm ;; pw32) basic_machine=i586-unknown os=-pw32 ;; rdos) basic_machine=i386-pc os=-rdos ;; rom68k) basic_machine=m68k-rom68k os=-coff ;; rm[46]00) basic_machine=mips-siemens ;; rtpc | rtpc-*) basic_machine=romp-ibm ;; s390 | s390-*) basic_machine=s390-ibm ;; s390x | s390x-*) basic_machine=s390x-ibm ;; sa29200) basic_machine=a29k-amd os=-udi ;; sb1) basic_machine=mipsisa64sb1-unknown ;; sb1el) basic_machine=mipsisa64sb1el-unknown ;; sde) basic_machine=mipsisa32-sde os=-elf ;; sei) basic_machine=mips-sei os=-seiux ;; sequent) basic_machine=i386-sequent ;; sh) basic_machine=sh-hitachi os=-hms ;; sh5el) basic_machine=sh5le-unknown ;; sh64) basic_machine=sh64-unknown ;; sparclite-wrs | simso-wrs) basic_machine=sparclite-wrs os=-vxworks ;; sps7) basic_machine=m68k-bull os=-sysv2 ;; spur) basic_machine=spur-unknown ;; st2000) basic_machine=m68k-tandem ;; stratus) basic_machine=i860-stratus os=-sysv4 ;; strongarm-* | thumb-*) basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'` ;; sun2) basic_machine=m68000-sun ;; sun2os3) basic_machine=m68000-sun os=-sunos3 ;; sun2os4) basic_machine=m68000-sun os=-sunos4 ;; sun3os3) basic_machine=m68k-sun os=-sunos3 ;; sun3os4) basic_machine=m68k-sun os=-sunos4 ;; sun4os3) basic_machine=sparc-sun os=-sunos3 ;; sun4os4) basic_machine=sparc-sun os=-sunos4 ;; sun4sol2) basic_machine=sparc-sun os=-solaris2 ;; sun3 | sun3-*) basic_machine=m68k-sun ;; sun4) basic_machine=sparc-sun ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun ;; sv1) basic_machine=sv1-cray os=-unicos ;; symmetry) basic_machine=i386-sequent os=-dynix ;; t3e) basic_machine=alphaev5-cray os=-unicos ;; t90) basic_machine=t90-cray os=-unicos ;; # This must be matched before tile*. tilegx*) basic_machine=tilegx-unknown os=-linux-gnu ;; tile*) basic_machine=tile-unknown os=-linux-gnu ;; tx39) basic_machine=mipstx39-unknown ;; tx39el) basic_machine=mipstx39el-unknown ;; toad1) basic_machine=pdp10-xkl os=-tops20 ;; tower | tower-32) basic_machine=m68k-ncr ;; tpf) basic_machine=s390x-ibm os=-tpf ;; udi29k) basic_machine=a29k-amd os=-udi ;; ultra3) basic_machine=a29k-nyu os=-sym1 ;; v810 | necv810) basic_machine=v810-nec os=-none ;; vaxv) basic_machine=vax-dec os=-sysv ;; vms) basic_machine=vax-dec os=-vms ;; vpp*|vx|vx-*) basic_machine=f301-fujitsu ;; vxworks960) basic_machine=i960-wrs os=-vxworks ;; vxworks68) basic_machine=m68k-wrs os=-vxworks ;; vxworks29k) basic_machine=a29k-wrs os=-vxworks ;; w65*) basic_machine=w65-wdc os=-none ;; w89k-*) basic_machine=hppa1.1-winbond os=-proelf ;; xbox) basic_machine=i686-pc os=-mingw32 ;; xps | xps100) basic_machine=xps100-honeywell ;; xscale-* | xscalee[bl]-*) basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'` ;; ymp) basic_machine=ymp-cray os=-unicos ;; z8k-*-coff) basic_machine=z8k-unknown os=-sim ;; z80-*-coff) basic_machine=z80-unknown os=-sim ;; none) basic_machine=none-none os=-none ;; # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. w89k) basic_machine=hppa1.1-winbond ;; op50n) basic_machine=hppa1.1-oki ;; op60c) basic_machine=hppa1.1-oki ;; romp) basic_machine=romp-ibm ;; mmix) basic_machine=mmix-knuth ;; rs6000) basic_machine=rs6000-ibm ;; vax) basic_machine=vax-dec ;; pdp10) # there are many clones, so DEC is not a safe bet basic_machine=pdp10-unknown ;; pdp11) basic_machine=pdp11-dec ;; we32k) basic_machine=we32k-att ;; sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) basic_machine=sparc-sun ;; cydra) basic_machine=cydra-cydrome ;; orion) basic_machine=orion-highlevel ;; orion105) basic_machine=clipper-highlevel ;; mac | mpw | mac-mpw) basic_machine=m68k-apple ;; pmac | pmac-mpw) basic_machine=powerpc-apple ;; *-unknown) # Make sure to match an already-canonicalized machine name. ;; *) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; esac # Here we canonicalize certain aliases for manufacturers. case $basic_machine in *-digital*) basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` ;; *-commodore*) basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` ;; *) ;; esac # Decode manufacturer-specific aliases for certain operating systems. if [ x"$os" != x"" ] then case $os in # First match some system type aliases # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. -auroraux) os=-auroraux ;; -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; -solaris) os=-solaris2 ;; -svr4*) os=-sysv4 ;; -unixware*) os=-sysv4.2uw ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; # First accept the basic system types. # The portable systems comes first. # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ | -sym* | -kopensolaris* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* | -aros* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ | -openbsd* | -solidbsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* | -cegcc* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -linux-gnu* | -linux-android* \ | -linux-newlib* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) case $basic_machine in x86-* | i*86-*) ;; *) os=-nto$os ;; esac ;; -nto-qnx*) ;; -nto*) os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) os=`echo $os | sed -e 's|mac|macos|'` ;; -linux-dietlibc) os=-linux-dietlibc ;; -linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; -sunos5*) os=`echo $os | sed -e 's|sunos5|solaris2|'` ;; -sunos6*) os=`echo $os | sed -e 's|sunos6|solaris3|'` ;; -opened*) os=-openedition ;; -os400*) os=-os400 ;; -wince*) os=-wince ;; -osfrose*) os=-osfrose ;; -osf*) os=-osf ;; -utek*) os=-bsd ;; -dynix*) os=-bsd ;; -acis*) os=-aos ;; -atheos*) os=-atheos ;; -syllable*) os=-syllable ;; -386bsd) os=-bsd ;; -ctix* | -uts*) os=-sysv ;; -nova*) os=-rtmk-nova ;; -ns2 ) os=-nextstep2 ;; -nsk*) os=-nsk ;; # Preserve the version number of sinix5. -sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` ;; -sinix*) os=-sysv4 ;; -tpf*) os=-tpf ;; -triton*) os=-sysv3 ;; -oss*) os=-sysv3 ;; -svr4) os=-sysv4 ;; -svr3) os=-sysv3 ;; -sysvr4) os=-sysv4 ;; # This must come after -sysvr4. -sysv*) ;; -ose*) os=-ose ;; -es1800*) os=-ose ;; -xenix) os=-xenix ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) os=-mint ;; -aros*) os=-aros ;; -kaos*) os=-kaos ;; -zvmoe) os=-zvmoe ;; -dicos*) os=-dicos ;; -nacl*) ;; -none) ;; *) # Get rid of the `-' at the beginning of $os. os=`echo $os | sed 's/[^-]*-//'` echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 exit 1 ;; esac else # Here we handle the default operating systems that come with various machines. # The value should be what the vendor currently ships out the door with their # machine or put another way, the most popular os provided with the machine. # Note that if you're going to try to match "-MANUFACTURER" here (say, # "-sun"), then you have to tell the case statement up towards the top # that MANUFACTURER isn't an operating system. Otherwise, code above # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. case $basic_machine in score-*) os=-elf ;; spu-*) os=-elf ;; *-acorn) os=-riscix1.2 ;; arm*-rebel) os=-linux ;; arm*-semi) os=-aout ;; c4x-* | tic4x-*) os=-coff ;; tic54x-*) os=-coff ;; tic55x-*) os=-coff ;; tic6x-*) os=-coff ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 ;; pdp11-*) os=-none ;; *-dec | vax-*) os=-ultrix4.2 ;; m68*-apollo) os=-domain ;; i386-sun) os=-sunos4.0.2 ;; m68000-sun) os=-sunos3 # This also exists in the configure program, but was not the # default. # os=-sunos4 ;; m68*-cisco) os=-aout ;; mep-*) os=-elf ;; mips*-cisco) os=-elf ;; mips*-*) os=-elf ;; or32-*) os=-coff ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 ;; sparc-* | *-sun) os=-sunos4.1.1 ;; *-be) os=-beos ;; *-haiku) os=-haiku ;; *-ibm) os=-aix ;; *-knuth) os=-mmixware ;; *-wec) os=-proelf ;; *-winbond) os=-proelf ;; *-oki) os=-proelf ;; *-hp) os=-hpux ;; *-hitachi) os=-hiux ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) os=-sysv ;; *-cbm) os=-amigaos ;; *-dg) os=-dgux ;; *-dolphin) os=-sysv3 ;; m68k-ccur) os=-rtu ;; m88k-omron*) os=-luna ;; *-next ) os=-nextstep ;; *-sequent) os=-ptx ;; *-crds) os=-unos ;; *-ns) os=-genix ;; i370-*) os=-mvs ;; *-next) os=-nextstep3 ;; *-gould) os=-sysv ;; *-highlevel) os=-bsd ;; *-encore) os=-bsd ;; *-sgi) os=-irix ;; *-siemens) os=-sysv4 ;; *-masscomp) os=-rtu ;; f30[01]-fujitsu | f700-fujitsu) os=-uxpv ;; *-rom68k) os=-coff ;; *-*bug) os=-coff ;; *-apple) os=-macos ;; *-atari*) os=-mint ;; *) os=-none ;; esac fi # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. vendor=unknown case $basic_machine in *-unknown) case $os in -riscix*) vendor=acorn ;; -sunos*) vendor=sun ;; -cnk*|-aix*) vendor=ibm ;; -beos*) vendor=be ;; -hpux*) vendor=hp ;; -mpeix*) vendor=hp ;; -hiux*) vendor=hitachi ;; -unos*) vendor=crds ;; -dgux*) vendor=dg ;; -luna*) vendor=omron ;; -genix*) vendor=ns ;; -mvs* | -opened*) vendor=ibm ;; -os400*) vendor=ibm ;; -ptx*) vendor=sequent ;; -tpf*) vendor=ibm ;; -vxsim* | -vxworks* | -windiss*) vendor=wrs ;; -aux*) vendor=apple ;; -hms*) vendor=hitachi ;; -mpw* | -macos*) vendor=apple ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) vendor=atari ;; -vos*) vendor=stratus ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac echo $basic_machine$os exit # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: djview4/config/install-sh000077500000000000000000000324641174072760700157270ustar00rootroot00000000000000#!/bin/sh # install - install a program, script, or datafile scriptversion=2006-12-25.00 # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the # following copyright and license. # # Copyright (C) 1994 X Consortium # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including without limitation the # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or # sell copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- # TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # # Except as contained in this notice, the name of the X Consortium shall not # be used in advertising or otherwise to promote the sale, use or other deal- # ings in this Software without prior written authorization from the X Consor- # tium. # # # FSF changes to this file are in the public domain. # # Calling this script install-sh is preferred over install.sh, to prevent # `make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. nl=' ' IFS=" "" $nl" # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit=${DOITPROG-} if test -z "$doit"; then doit_exec=exec else doit_exec=$doit fi # Put in absolute file names if you don't have them in your path; # or use environment vars. chgrpprog=${CHGRPPROG-chgrp} chmodprog=${CHMODPROG-chmod} chownprog=${CHOWNPROG-chown} cmpprog=${CMPPROG-cmp} cpprog=${CPPROG-cp} mkdirprog=${MKDIRPROG-mkdir} mvprog=${MVPROG-mv} rmprog=${RMPROG-rm} stripprog=${STRIPPROG-strip} posix_glob='?' initialize_posix_glob=' test "$posix_glob" != "?" || { if (set -f) 2>/dev/null; then posix_glob= else posix_glob=: fi } ' posix_mkdir= # Desired mode of installed file. mode=0755 chgrpcmd= chmodcmd=$chmodprog chowncmd= mvcmd=$mvprog rmcmd="$rmprog -f" stripcmd= src= dst= dir_arg= dst_arg= copy_on_change=false no_target_directory= usage="\ Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE or: $0 [OPTION]... SRCFILES... DIRECTORY or: $0 [OPTION]... -t DIRECTORY SRCFILES... or: $0 [OPTION]... -d DIRECTORIES... In the 1st form, copy SRCFILE to DSTFILE. In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. In the 4th, create DIRECTORIES. Options: --help display this help and exit. --version display version info and exit. -c (ignored) -C install only if different (preserve the last data modification time) -d create directories instead of installing files. -g GROUP $chgrpprog installed files to GROUP. -m MODE $chmodprog installed files to MODE. -o USER $chownprog installed files to USER. -s $stripprog installed files. -t DIRECTORY install into DIRECTORY. -T report an error if DSTFILE is a directory. Environment variables override the default commands: CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG " while test $# -ne 0; do case $1 in -c) ;; -C) copy_on_change=true;; -d) dir_arg=true;; -g) chgrpcmd="$chgrpprog $2" shift;; --help) echo "$usage"; exit $?;; -m) mode=$2 case $mode in *' '* | *' '* | *' '* | *'*'* | *'?'* | *'['*) echo "$0: invalid mode: $mode" >&2 exit 1;; esac shift;; -o) chowncmd="$chownprog $2" shift;; -s) stripcmd=$stripprog;; -t) dst_arg=$2 shift;; -T) no_target_directory=true;; --version) echo "$0 $scriptversion"; exit $?;; --) shift break;; -*) echo "$0: invalid option: $1" >&2 exit 1;; *) break;; esac shift done if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. # Otherwise, the last argument is the destination. Remove it from $@. for arg do if test -n "$dst_arg"; then # $@ is not empty: it contains at least $arg. set fnord "$@" "$dst_arg" shift # fnord fi shift # arg dst_arg=$arg done fi if test $# -eq 0; then if test -z "$dir_arg"; then echo "$0: no input file specified." >&2 exit 1 fi # It's OK to call `install-sh -d' without argument. # This can happen when creating conditional directories. exit 0 fi if test -z "$dir_arg"; then trap '(exit $?); exit' 1 2 13 15 # Set umask so as not to create temps with too-generous modes. # However, 'strip' requires both read and write access to temps. case $mode in # Optimize common cases. *644) cp_umask=133;; *755) cp_umask=22;; *[0-7]) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw='% 200' fi cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; *) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw=,u+rw fi cp_umask=$mode$u_plus_rw;; esac fi for src do # Protect names starting with `-'. case $src in -*) src=./$src;; esac if test -n "$dir_arg"; then dst=$src dstdir=$dst test -d "$dstdir" dstdir_status=$? else # Waiting for this to be detected by the "$cpprog $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if test ! -f "$src" && test ! -d "$src"; then echo "$0: $src does not exist." >&2 exit 1 fi if test -z "$dst_arg"; then echo "$0: no destination specified." >&2 exit 1 fi dst=$dst_arg # Protect names starting with `-'. case $dst in -*) dst=./$dst;; esac # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. if test -d "$dst"; then if test -n "$no_target_directory"; then echo "$0: $dst_arg: Is a directory" >&2 exit 1 fi dstdir=$dst dst=$dstdir/`basename "$src"` dstdir_status=0 else # Prefer dirname, but fall back on a substitute if dirname fails. dstdir=` (dirname "$dst") 2>/dev/null || expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$dst" : 'X\(//\)[^/]' \| \ X"$dst" : 'X\(//\)$' \| \ X"$dst" : 'X\(/\)' \| . 2>/dev/null || echo X"$dst" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q' ` test -d "$dstdir" dstdir_status=$? fi fi obsolete_mkdir_used=false if test $dstdir_status != 0; then case $posix_mkdir in '') # Create intermediate dirs using mode 755 as modified by the umask. # This is like FreeBSD 'install' as of 1997-10-28. umask=`umask` case $stripcmd.$umask in # Optimize common cases. *[2367][2367]) mkdir_umask=$umask;; .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; *[0-7]) mkdir_umask=`expr $umask + 22 \ - $umask % 100 % 40 + $umask % 20 \ - $umask % 10 % 4 + $umask % 2 `;; *) mkdir_umask=$umask,go-w;; esac # With -d, create the new directory with the user-specified mode. # Otherwise, rely on $mkdir_umask. if test -n "$dir_arg"; then mkdir_mode=-m$mode else mkdir_mode= fi posix_mkdir=false case $umask in *[123567][0-7][0-7]) # POSIX mkdir -p sets u+wx bits regardless of umask, which # is incompatible with FreeBSD 'install' when (umask & 300) != 0. ;; *) tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 if (umask $mkdir_umask && exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 then if test -z "$dir_arg" || { # Check for POSIX incompatibilities with -m. # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or # other-writeable bit of parent directory when it shouldn't. # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. ls_ld_tmpdir=`ls -ld "$tmpdir"` case $ls_ld_tmpdir in d????-?r-*) different_mode=700;; d????-?--*) different_mode=755;; *) false;; esac && $mkdirprog -m$different_mode -p -- "$tmpdir" && { ls_ld_tmpdir_1=`ls -ld "$tmpdir"` test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" } } then posix_mkdir=: fi rmdir "$tmpdir/d" "$tmpdir" else # Remove any dirs left behind by ancient mkdir implementations. rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null fi trap '' 0;; esac;; esac if $posix_mkdir && ( umask $mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" ) then : else # The umask is ridiculous, or mkdir does not conform to POSIX, # or it failed possibly due to a race condition. Create the # directory the slow way, step by step, checking for races as we go. case $dstdir in /*) prefix='/';; -*) prefix='./';; *) prefix='';; esac eval "$initialize_posix_glob" oIFS=$IFS IFS=/ $posix_glob set -f set fnord $dstdir shift $posix_glob set +f IFS=$oIFS prefixes= for d do test -z "$d" && continue prefix=$prefix$d if test -d "$prefix"; then prefixes= else if $posix_mkdir; then (umask=$mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break # Don't fail if two instances are running concurrently. test -d "$prefix" || exit 1 else case $prefix in *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; *) qprefix=$prefix;; esac prefixes="$prefixes '$qprefix'" fi fi prefix=$prefix/ done if test -n "$prefixes"; then # Don't fail if two instances are running concurrently. (umask $mkdir_umask && eval "\$doit_exec \$mkdirprog $prefixes") || test -d "$dstdir" || exit 1 obsolete_mkdir_used=true fi fi fi if test -n "$dir_arg"; then { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 else # Make a couple of temp file names in the proper directory. dsttmp=$dstdir/_inst.$$_ rmtmp=$dstdir/_rm.$$_ # Trap to clean up those temp files at exit. trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 # Copy the file name to the temp name. (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && # and set any options; do chmod last to preserve setuid bits. # # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $cpprog $src $dsttmp" command. # { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && # If -C, don't bother to copy if it wouldn't change the file. if $copy_on_change && old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && eval "$initialize_posix_glob" && $posix_glob set -f && set X $old && old=:$2:$4:$5:$6 && set X $new && new=:$2:$4:$5:$6 && $posix_glob set +f && test "$old" = "$new" && $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 then rm -f "$dsttmp" else # Rename the file to the real destination. $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || # The rename failed, perhaps because mv can't rename something else # to itself, or perhaps because mv is so ancient that it does not # support -f. { # Now remove or move aside any old file at destination location. # We try this two ways since rm can't unlink itself on some # systems and the destination file might be busy for other # reasons. In this case, the final cleanup might fail but the new # file should still install successfully. { test ! -f "$dst" || $doit $rmcmd -f "$dst" 2>/dev/null || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } } || { echo "$0: cannot unlink or rename $dst" >&2 (exit 1); exit 1 } } && # Now rename the file to the real destination. $doit $mvcmd "$dsttmp" "$dst" } fi || exit 1 trap '' 0 fi done # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-end: "$" # End: djview4/config/libtool.m4000066400000000000000000007746471174072760700156510ustar00rootroot00000000000000# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # 2006, 2007, 2008 Free Software Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. m4_define([_LT_COPYING], [dnl # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # 2006, 2007, 2008 Free Software Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is part of GNU Libtool. # # GNU Libtool is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of # the License, or (at your option) any later version. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with GNU Libtool; see the file COPYING. If not, a copy # can be downloaded from http://www.gnu.org/licenses/gpl.html, or # obtained by writing to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ]) # serial 56 LT_INIT # LT_PREREQ(VERSION) # ------------------ # Complain and exit if this libtool version is less that VERSION. m4_defun([LT_PREREQ], [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, [m4_default([$3], [m4_fatal([Libtool version $1 or higher is required], 63)])], [$2])]) # _LT_CHECK_BUILDDIR # ------------------ # Complain if the absolute build directory name contains unusual characters m4_defun([_LT_CHECK_BUILDDIR], [case `pwd` in *\ * | *\ *) AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; esac ]) # LT_INIT([OPTIONS]) # ------------------ AC_DEFUN([LT_INIT], [AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT AC_BEFORE([$0], [LT_LANG])dnl AC_BEFORE([$0], [LT_OUTPUT])dnl AC_BEFORE([$0], [LTDL_INIT])dnl m4_require([_LT_CHECK_BUILDDIR])dnl dnl Autoconf doesn't catch unexpanded LT_ macros by default: m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 dnl unless we require an AC_DEFUNed macro: AC_REQUIRE([LTOPTIONS_VERSION])dnl AC_REQUIRE([LTSUGAR_VERSION])dnl AC_REQUIRE([LTVERSION_VERSION])dnl AC_REQUIRE([LTOBSOLETE_VERSION])dnl m4_require([_LT_PROG_LTMAIN])dnl dnl Parse OPTIONS _LT_SET_OPTIONS([$0], [$1]) # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ltmain" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' AC_SUBST(LIBTOOL)dnl _LT_SETUP # Only expand once: m4_define([LT_INIT]) ])# LT_INIT # Old names: AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_PROG_LIBTOOL], []) dnl AC_DEFUN([AM_PROG_LIBTOOL], []) # _LT_CC_BASENAME(CC) # ------------------- # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. m4_defun([_LT_CC_BASENAME], [for cc_temp in $1""; do case $cc_temp in compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` ]) # _LT_FILEUTILS_DEFAULTS # ---------------------- # It is okay to use these file commands and assume they have been set # sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. m4_defun([_LT_FILEUTILS_DEFAULTS], [: ${CP="cp -f"} : ${MV="mv -f"} : ${RM="rm -f"} ])# _LT_FILEUTILS_DEFAULTS # _LT_SETUP # --------- m4_defun([_LT_SETUP], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl _LT_DECL([], [host_alias], [0], [The host system])dnl _LT_DECL([], [host], [0])dnl _LT_DECL([], [host_os], [0])dnl dnl _LT_DECL([], [build_alias], [0], [The build system])dnl _LT_DECL([], [build], [0])dnl _LT_DECL([], [build_os], [0])dnl dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([LT_PATH_LD])dnl AC_REQUIRE([LT_PATH_NM])dnl dnl AC_REQUIRE([AC_PROG_LN_S])dnl test -z "$LN_S" && LN_S="ln -s" _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl dnl AC_REQUIRE([LT_CMD_MAX_LEN])dnl _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_CHECK_SHELL_FEATURES])dnl m4_require([_LT_CMD_RELOAD])dnl m4_require([_LT_CHECK_MAGIC_METHOD])dnl m4_require([_LT_CMD_OLD_ARCHIVE])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl _LT_CONFIG_LIBTOOL_INIT([ # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes INIT. if test -n "\${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi ]) if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi _LT_CHECK_OBJDIR m4_require([_LT_TAG_COMPILER])dnl _LT_PROG_ECHO_BACKSLASH case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\([["`\\]]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to delay expansion of an escaped single quote. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' # Global variables: ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a with_gnu_ld="$lt_cv_prog_gnu_ld" old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$LD" && LD=ld test -z "$ac_objext" && ac_objext=o _LT_CC_BASENAME([$compiler]) # Only perform the check for file, if the check method requires it test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then _LT_PATH_MAGIC fi ;; esac # Use C for the default configuration in the libtool script LT_SUPPORTED_TAG([CC]) _LT_LANG_C_CONFIG _LT_LANG_DEFAULT_CONFIG _LT_CONFIG_COMMANDS ])# _LT_SETUP # _LT_PROG_LTMAIN # --------------- # Note that this code is called both from `configure', and `config.status' # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, # `config.status' has no value for ac_aux_dir unless we are using Automake, # so we pass a copy along to make sure it has a sensible value anyway. m4_defun([_LT_PROG_LTMAIN], [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) ltmain="$ac_aux_dir/ltmain.sh" ])# _LT_PROG_LTMAIN ## ------------------------------------- ## ## Accumulate code for creating libtool. ## ## ------------------------------------- ## # So that we can recreate a full libtool script including additional # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS # in macros and then make a single call at the end using the `libtool' # label. # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) # ---------------------------------------- # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. m4_define([_LT_CONFIG_LIBTOOL_INIT], [m4_ifval([$1], [m4_append([_LT_OUTPUT_LIBTOOL_INIT], [$1 ])])]) # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_INIT]) # _LT_CONFIG_LIBTOOL([COMMANDS]) # ------------------------------ # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. m4_define([_LT_CONFIG_LIBTOOL], [m4_ifval([$1], [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], [$1 ])])]) # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) # ----------------------------------------------------- m4_defun([_LT_CONFIG_SAVE_COMMANDS], [_LT_CONFIG_LIBTOOL([$1]) _LT_CONFIG_LIBTOOL_INIT([$2]) ]) # _LT_FORMAT_COMMENT([COMMENT]) # ----------------------------- # Add leading comment marks to the start of each line, and a trailing # full-stop to the whole comment if one is not present already. m4_define([_LT_FORMAT_COMMENT], [m4_ifval([$1], [ m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) )]) ## ------------------------ ## ## FIXME: Eliminate VARNAME ## ## ------------------------ ## # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) # ------------------------------------------------------------------- # CONFIGNAME is the name given to the value in the libtool script. # VARNAME is the (base) name used in the configure script. # VALUE may be 0, 1 or 2 for a computed quote escaped value based on # VARNAME. Any other value will be used directly. m4_define([_LT_DECL], [lt_if_append_uniq([lt_decl_varnames], [$2], [, ], [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], [m4_ifval([$1], [$1], [$2])]) lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) m4_ifval([$4], [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) lt_dict_add_subkey([lt_decl_dict], [$2], [tagged?], [m4_ifval([$5], [yes], [no])])]) ]) # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) # -------------------------------------------------------- m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) # ------------------------------------------------ m4_define([lt_decl_tag_varnames], [_lt_decl_filter([tagged?], [yes], $@)]) # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) # --------------------------------------------------------- m4_define([_lt_decl_filter], [m4_case([$#], [0], [m4_fatal([$0: too few arguments: $#])], [1], [m4_fatal([$0: too few arguments: $#: $1])], [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], [lt_dict_filter([lt_decl_dict], $@)])[]dnl ]) # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) # -------------------------------------------------- m4_define([lt_decl_quote_varnames], [_lt_decl_filter([value], [1], $@)]) # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) # --------------------------------------------------- m4_define([lt_decl_dquote_varnames], [_lt_decl_filter([value], [2], $@)]) # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) # --------------------------------------------------- m4_define([lt_decl_varnames_tagged], [m4_assert([$# <= 2])dnl _$0(m4_quote(m4_default([$1], [[, ]])), m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) m4_define([_lt_decl_varnames_tagged], [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) # lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) # ------------------------------------------------ m4_define([lt_decl_all_varnames], [_$0(m4_quote(m4_default([$1], [[, ]])), m4_if([$2], [], m4_quote(lt_decl_varnames), m4_quote(m4_shift($@))))[]dnl ]) m4_define([_lt_decl_all_varnames], [lt_join($@, lt_decl_varnames_tagged([$1], lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl ]) # _LT_CONFIG_STATUS_DECLARE([VARNAME]) # ------------------------------------ # Quote a variable value, and forward it to `config.status' so that its # declaration there will have the same value as in `configure'. VARNAME # must have a single quote delimited value for this to work. m4_define([_LT_CONFIG_STATUS_DECLARE], [$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`']) # _LT_CONFIG_STATUS_DECLARATIONS # ------------------------------ # We delimit libtool config variables with single quotes, so when # we write them to config.status, we have to be sure to quote all # embedded single quotes properly. In configure, this macro expands # each variable declared with _LT_DECL (and _LT_TAGDECL) into: # # ='`$ECHO "X$" | $Xsed -e "$delay_single_quote_subst"`' m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) # _LT_LIBTOOL_TAGS # ---------------- # Output comment and list of tags supported by the script m4_defun([_LT_LIBTOOL_TAGS], [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl available_tags="_LT_TAGS"dnl ]) # _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) # ----------------------------------- # Extract the dictionary values for VARNAME (optionally with TAG) and # expand to a commented shell variable setting: # # # Some comment about what VAR is for. # visible_name=$lt_internal_name m4_define([_LT_LIBTOOL_DECLARE], [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [description])))[]dnl m4_pushdef([_libtool_name], m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), [0], [_libtool_name=[$]$1], [1], [_libtool_name=$lt_[]$1], [2], [_libtool_name=$lt_[]$1], [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl ]) # _LT_LIBTOOL_CONFIG_VARS # ----------------------- # Produce commented declarations of non-tagged libtool config variables # suitable for insertion in the LIBTOOL CONFIG section of the `libtool' # script. Tagged libtool config variables (even for the LIBTOOL CONFIG # section) are produced by _LT_LIBTOOL_TAG_VARS. m4_defun([_LT_LIBTOOL_CONFIG_VARS], [m4_foreach([_lt_var], m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) # _LT_LIBTOOL_TAG_VARS(TAG) # ------------------------- m4_define([_LT_LIBTOOL_TAG_VARS], [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) # _LT_TAGVAR(VARNAME, [TAGNAME]) # ------------------------------ m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) # _LT_CONFIG_COMMANDS # ------------------- # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of # variables for single and double quote escaping we saved from calls # to _LT_DECL, we can put quote escaped variables declarations # into `config.status', and then the shell code to quote escape them in # for loops in `config.status'. Finally, any additional code accumulated # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. m4_defun([_LT_CONFIG_COMMANDS], [AC_PROVIDE_IFELSE([LT_OUTPUT], dnl If the libtool generation code has been placed in $CONFIG_LT, dnl instead of duplicating it all over again into config.status, dnl then we will have config.status run $CONFIG_LT later, so it dnl needs to know what name is stored there: [AC_CONFIG_COMMANDS([libtool], [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], dnl If the libtool generation code is destined for config.status, dnl expand the accumulated commands and init code now: [AC_CONFIG_COMMANDS([libtool], [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) ])#_LT_CONFIG_COMMANDS # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], [ # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' _LT_CONFIG_STATUS_DECLARATIONS LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' # Quote evaled strings. for var in lt_decl_all_varnames([[ \ ]], lt_decl_quote_varnames); do case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in *[[\\\\\\\`\\"\\\$]]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Double-quote double-evaled strings. for var in lt_decl_all_varnames([[ \ ]], lt_decl_dquote_varnames); do case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in *[[\\\\\\\`\\"\\\$]]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Fix-up fallback echo if it was mangled by the above quoting rules. case \$lt_ECHO in *'\\\[$]0 --fallback-echo"')dnl " lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\` ;; esac _LT_OUTPUT_LIBTOOL_INIT ]) # LT_OUTPUT # --------- # This macro allows early generation of the libtool script (before # AC_OUTPUT is called), incase it is used in configure for compilation # tests. AC_DEFUN([LT_OUTPUT], [: ${CONFIG_LT=./config.lt} AC_MSG_NOTICE([creating $CONFIG_LT]) cat >"$CONFIG_LT" <<_LTEOF #! $SHELL # Generated by $as_me. # Run this file to recreate a libtool stub with the current configuration. lt_cl_silent=false SHELL=\${CONFIG_SHELL-$SHELL} _LTEOF cat >>"$CONFIG_LT" <<\_LTEOF AS_SHELL_SANITIZE _AS_PREPARE exec AS_MESSAGE_FD>&1 exec AS_MESSAGE_LOG_FD>>config.log { echo AS_BOX([Running $as_me.]) } >&AS_MESSAGE_LOG_FD lt_cl_help="\ \`$as_me' creates a local libtool stub from the current configuration, for use in further configure time tests before the real libtool is generated. Usage: $[0] [[OPTIONS]] -h, --help print this help, then exit -V, --version print version number, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files Report bugs to ." lt_cl_version="\ m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) configured by $[0], generated by m4_PACKAGE_STRING. Copyright (C) 2008 Free Software Foundation, Inc. This config.lt script is free software; the Free Software Foundation gives unlimited permision to copy, distribute and modify it." while test $[#] != 0 do case $[1] in --version | --v* | -V ) echo "$lt_cl_version"; exit 0 ;; --help | --h* | -h ) echo "$lt_cl_help"; exit 0 ;; --debug | --d* | -d ) debug=: ;; --quiet | --q* | --silent | --s* | -q ) lt_cl_silent=: ;; -*) AC_MSG_ERROR([unrecognized option: $[1] Try \`$[0] --help' for more information.]) ;; *) AC_MSG_ERROR([unrecognized argument: $[1] Try \`$[0] --help' for more information.]) ;; esac shift done if $lt_cl_silent; then exec AS_MESSAGE_FD>/dev/null fi _LTEOF cat >>"$CONFIG_LT" <<_LTEOF _LT_OUTPUT_LIBTOOL_COMMANDS_INIT _LTEOF cat >>"$CONFIG_LT" <<\_LTEOF AC_MSG_NOTICE([creating $ofile]) _LT_OUTPUT_LIBTOOL_COMMANDS AS_EXIT(0) _LTEOF chmod +x "$CONFIG_LT" # configure is writing to config.log, but config.lt does its own redirection, # appending to config.log, which fails on DOS, as config.log is still kept # open by configure. Here we exec the FD to /dev/null, effectively closing # config.log, so it can be properly (re)opened and appended to by config.lt. if test "$no_create" != yes; then lt_cl_success=: test "$silent" = yes && lt_config_lt_args="$lt_config_lt_args --quiet" exec AS_MESSAGE_LOG_FD>/dev/null $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false exec AS_MESSAGE_LOG_FD>>config.log $lt_cl_success || AS_EXIT(1) fi ])# LT_OUTPUT # _LT_CONFIG(TAG) # --------------- # If TAG is the built-in tag, create an initial libtool script with a # default configuration from the untagged config vars. Otherwise add code # to config.status for appending the configuration named by TAG from the # matching tagged config vars. m4_defun([_LT_CONFIG], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl _LT_CONFIG_SAVE_COMMANDS([ m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl m4_if(_LT_TAG, [C], [ # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi cfgfile="${ofile}T" trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # _LT_COPYING _LT_LIBTOOL_TAGS # ### BEGIN LIBTOOL CONFIG _LT_LIBTOOL_CONFIG_VARS _LT_LIBTOOL_TAG_VARS # ### END LIBTOOL CONFIG _LT_EOF case $host_os in aix3*) cat <<\_LT_EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi _LT_EOF ;; esac _LT_PROG_LTMAIN # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) _LT_PROG_XSI_SHELLFNS sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" ], [cat <<_LT_EOF >> "$ofile" dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded dnl in a comment (ie after a #). # ### BEGIN LIBTOOL TAG CONFIG: $1 _LT_LIBTOOL_TAG_VARS(_LT_TAG) # ### END LIBTOOL TAG CONFIG: $1 _LT_EOF ])dnl /m4_if ], [m4_if([$1], [], [ PACKAGE='$PACKAGE' VERSION='$VERSION' TIMESTAMP='$TIMESTAMP' RM='$RM' ofile='$ofile'], []) ])dnl /_LT_CONFIG_SAVE_COMMANDS ])# _LT_CONFIG # LT_SUPPORTED_TAG(TAG) # --------------------- # Trace this macro to discover what tags are supported by the libtool # --tag option, using: # autoconf --trace 'LT_SUPPORTED_TAG:$1' AC_DEFUN([LT_SUPPORTED_TAG], []) # C support is built-in for now m4_define([_LT_LANG_C_enabled], []) m4_define([_LT_TAGS], []) # LT_LANG(LANG) # ------------- # Enable libtool support for the given language if not already enabled. AC_DEFUN([LT_LANG], [AC_BEFORE([$0], [LT_OUTPUT])dnl m4_case([$1], [C], [_LT_LANG(C)], [C++], [_LT_LANG(CXX)], [Java], [_LT_LANG(GCJ)], [Fortran 77], [_LT_LANG(F77)], [Fortran], [_LT_LANG(FC)], [Windows Resource], [_LT_LANG(RC)], [m4_ifdef([_LT_LANG_]$1[_CONFIG], [_LT_LANG($1)], [m4_fatal([$0: unsupported language: "$1"])])])dnl ])# LT_LANG # _LT_LANG(LANGNAME) # ------------------ m4_defun([_LT_LANG], [m4_ifdef([_LT_LANG_]$1[_enabled], [], [LT_SUPPORTED_TAG([$1])dnl m4_append([_LT_TAGS], [$1 ])dnl m4_define([_LT_LANG_]$1[_enabled], [])dnl _LT_LANG_$1_CONFIG($1)])dnl ])# _LT_LANG # _LT_LANG_DEFAULT_CONFIG # ----------------------- m4_defun([_LT_LANG_DEFAULT_CONFIG], [AC_PROVIDE_IFELSE([AC_PROG_CXX], [LT_LANG(CXX)], [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) AC_PROVIDE_IFELSE([AC_PROG_F77], [LT_LANG(F77)], [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) AC_PROVIDE_IFELSE([AC_PROG_FC], [LT_LANG(FC)], [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal dnl pulling things in needlessly. AC_PROVIDE_IFELSE([AC_PROG_GCJ], [LT_LANG(GCJ)], [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], [LT_LANG(GCJ)], [AC_PROVIDE_IFELSE([LT_PROG_GCJ], [LT_LANG(GCJ)], [m4_ifdef([AC_PROG_GCJ], [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) m4_ifdef([A][M_PROG_GCJ], [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) m4_ifdef([LT_PROG_GCJ], [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) AC_PROVIDE_IFELSE([LT_PROG_RC], [LT_LANG(RC)], [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) ])# _LT_LANG_DEFAULT_CONFIG # Obsolete macros: AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_CXX], []) dnl AC_DEFUN([AC_LIBTOOL_F77], []) dnl AC_DEFUN([AC_LIBTOOL_FC], []) dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) # _LT_TAG_COMPILER # ---------------- m4_defun([_LT_TAG_COMPILER], [AC_REQUIRE([AC_PROG_CC])dnl _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC ])# _LT_TAG_COMPILER # _LT_COMPILER_BOILERPLATE # ------------------------ # Check for compiler boilerplate output or warnings with # the simple compiler test code. m4_defun([_LT_COMPILER_BOILERPLATE], [m4_require([_LT_DECL_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ])# _LT_COMPILER_BOILERPLATE # _LT_LINKER_BOILERPLATE # ---------------------- # Check for linker boilerplate output or warnings with # the simple link test code. m4_defun([_LT_LINKER_BOILERPLATE], [m4_require([_LT_DECL_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* ])# _LT_LINKER_BOILERPLATE # _LT_REQUIRED_DARWIN_CHECKS # ------------------------- m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ case $host_os in rhapsody* | darwin*) AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) AC_CHECK_TOOL([LIPO], [lipo], [:]) AC_CHECK_TOOL([OTOOL], [otool], [:]) AC_CHECK_TOOL([OTOOL64], [otool64], [:]) _LT_DECL([], [DSYMUTIL], [1], [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) _LT_DECL([], [NMEDIT], [1], [Tool to change global to local symbols on Mac OS X]) _LT_DECL([], [LIPO], [1], [Tool to manipulate fat objects and archives on Mac OS X]) _LT_DECL([], [OTOOL], [1], [ldd/readelf like tool for Mach-O binaries on Mac OS X]) _LT_DECL([], [OTOOL64], [1], [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], [lt_cv_apple_cc_single_mod=no if test -z "${LT_MULTI_MODULE}"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. rm -rf libconftest.dylib* echo "int foo(void){return 1;}" > conftest.c echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&AS_MESSAGE_LOG_FD fi rm -rf libconftest.dylib* rm -f conftest.* fi]) AC_CACHE_CHECK([for -exported_symbols_list linker flag], [lt_cv_ld_exported_symbols_list], [lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [lt_cv_ld_exported_symbols_list=yes], [lt_cv_ld_exported_symbols_list=no]) LDFLAGS="$save_LDFLAGS" ]) case $host_os in rhapsody* | darwin1.[[012]]) _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 10.[[012]]*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test "$lt_cv_apple_cc_single_mod" = "yes"; then _lt_dar_single_mod='$single_module' fi if test "$lt_cv_ld_exported_symbols_list" = "yes"; then _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' else _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' fi if test "$DSYMUTIL" != ":"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= fi ;; esac ]) # _LT_DARWIN_LINKER_FEATURES # -------------------------- # Checks for linker and compiler features on darwin m4_defun([_LT_DARWIN_LINKER_FEATURES], [ m4_require([_LT_REQUIRED_DARWIN_CHECKS]) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(whole_archive_flag_spec, $1)='' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" case $cc_basename in ifort*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test "$_lt_dar_can_shared" = "yes"; then output_verbose_link_cmd=echo _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" m4_if([$1], [CXX], [ if test "$lt_cv_apple_cc_single_mod" != "yes"; then _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" fi ],[]) else _LT_TAGVAR(ld_shlibs, $1)=no fi ]) # _LT_SYS_MODULE_PATH_AIX # ----------------------- # Links a minimal program and checks the executable # for the system default hardcoded library path. In most cases, # this is /usr/lib:/lib, but when the MPI compilers are used # the location of the communication and MPI libs are included too. # If we don't find anything, use the default library path according # to the aix ld manual. m4_defun([_LT_SYS_MODULE_PATH_AIX], [m4_require([_LT_DECL_SED])dnl AC_LINK_IFELSE(AC_LANG_PROGRAM,[ lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi],[]) if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ])# _LT_SYS_MODULE_PATH_AIX # _LT_SHELL_INIT(ARG) # ------------------- m4_define([_LT_SHELL_INIT], [ifdef([AC_DIVERSION_NOTICE], [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], [AC_DIVERT_PUSH(NOTICE)]) $1 AC_DIVERT_POP ])# _LT_SHELL_INIT # _LT_PROG_ECHO_BACKSLASH # ----------------------- # Add some code to the start of the generated configure script which # will find an echo command which doesn't interpret backslashes. m4_defun([_LT_PROG_ECHO_BACKSLASH], [_LT_SHELL_INIT([ # Check that we are running under the correct shell. SHELL=${CONFIG_SHELL-/bin/sh} case X$lt_ECHO in X*--fallback-echo) # Remove one level of quotation (which was required for Make). ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` ;; esac ECHO=${lt_ECHO-echo} if test "X[$]1" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test "X[$]1" = X--fallback-echo; then # Avoid inline document here, it may be left over : elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then # Yippee, $ECHO works! : else # Restart under the correct shell. exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} fi if test "X[$]1" = X--fallback-echo; then # used as fallback echo shift cat <<_LT_EOF [$]* _LT_EOF exit 0 fi # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH if test -z "$lt_ECHO"; then if test "X${echo_test_string+set}" != Xset; then # find a string as large as possible, as long as the shell can cope with it for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... if { echo_test_string=`eval $cmd`; } 2>/dev/null && { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null then break fi done fi if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then : else # The Solaris, AIX, and Digital Unix default echo programs unquote # backslashes. This makes it impossible to quote backslashes using # echo "$something" | sed 's/\\/\\\\/g' # # So, first we look for a working echo in the user's PATH. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for dir in $PATH /usr/ucb; do IFS="$lt_save_ifs" if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then ECHO="$dir/echo" break fi done IFS="$lt_save_ifs" if test "X$ECHO" = Xecho; then # We didn't find a better echo, so look for alternatives. if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' && echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # This shell has a builtin print -r that does the trick. ECHO='print -r' elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } && test "X$CONFIG_SHELL" != X/bin/ksh; then # If we have ksh, try running configure again with it. ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} export ORIGINAL_CONFIG_SHELL CONFIG_SHELL=/bin/ksh export CONFIG_SHELL exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} else # Try using printf. ECHO='printf %s\n' if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # Cool, printf works : elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL export CONFIG_SHELL SHELL="$CONFIG_SHELL" export SHELL ECHO="$CONFIG_SHELL [$]0 --fallback-echo" elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then ECHO="$CONFIG_SHELL [$]0 --fallback-echo" else # maybe with a smaller string... prev=: for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null then break fi prev="$cmd" done if test "$prev" != 'sed 50q "[$]0"'; then echo_test_string=`eval $prev` export echo_test_string exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} else # Oops. We lost completely, so just stick with echo. ECHO=echo fi fi fi fi fi fi # Copy echo and quote the copy suitably for passing to libtool from # the Makefile, instead of quoting the original, which is used later. lt_ECHO=$ECHO if test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" fi AC_SUBST(lt_ECHO) ]) _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) _LT_DECL([], [ECHO], [1], [An echo program that does not interpret backslashes]) ])# _LT_PROG_ECHO_BACKSLASH # _LT_ENABLE_LOCK # --------------- m4_defun([_LT_ENABLE_LOCK], [AC_ARG_ENABLE([libtool-lock], [AS_HELP_STRING([--disable-libtool-lock], [avoid locking (might break parallel builds)])]) test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" ;; *ELF-64*) HPUX_IA64_MODE="64" ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out which ABI we are using. echo '[#]line __oline__ "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; ppc64-*linux*|powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; ppc*-*linux*|powerpc*-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, [AC_LANG_PUSH(C) AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) AC_LANG_POP]) if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; sparc*-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) LD="${LD-ld} -m elf64_sparc" ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; esac need_locks="$enable_libtool_lock" ])# _LT_ENABLE_LOCK # _LT_CMD_OLD_ARCHIVE # ------------------- m4_defun([_LT_CMD_OLD_ARCHIVE], [AC_CHECK_TOOL(AR, ar, false) test -z "$AR" && AR=ar test -z "$AR_FLAGS" && AR_FLAGS=cru _LT_DECL([], [AR], [1], [The archiver]) _LT_DECL([], [AR_FLAGS], [1]) AC_CHECK_TOOL(STRIP, strip, :) test -z "$STRIP" && STRIP=: _LT_DECL([], [STRIP], [1], [A symbol stripping program]) AC_CHECK_TOOL(RANLIB, ranlib, :) test -z "$RANLIB" && RANLIB=: _LT_DECL([], [RANLIB], [1], [Commands used to install an old-style archive]) # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" fi _LT_DECL([], [old_postinstall_cmds], [2]) _LT_DECL([], [old_postuninstall_cmds], [2]) _LT_TAGDECL([], [old_archive_cmds], [2], [Commands used to build an old-style archive]) ])# _LT_CMD_OLD_ARCHIVE # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------------------- # Check whether the given compiler option works AC_DEFUN([_LT_COMPILER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$3" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -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:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 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. $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi fi $RM conftest* ]) if test x"[$]$2" = xyes; then m4_if([$5], , :, [$5]) else m4_if([$6], , :, [$6]) fi ])# _LT_COMPILER_OPTION # Old name: AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------- # Check whether the given linker option works AC_DEFUN([_LT_LINKER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $3" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&AS_MESSAGE_LOG_FD $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi else $2=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" ]) if test x"[$]$2" = xyes; then m4_if([$4], , :, [$4]) else m4_if([$5], , :, [$5]) fi ])# _LT_LINKER_OPTION # Old name: AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) # LT_CMD_MAX_LEN #--------------- AC_DEFUN([LT_CMD_MAX_LEN], [AC_REQUIRE([AC_CANONICAL_HOST])dnl # find the maximum length of command line arguments AC_MSG_CHECKING([the maximum length of command line arguments]) AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl i=0 teststring="ABCD" case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw* | cegcc*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else # Make teststring a little bigger before we do anything with it. # a 1K string should be a reasonable start. for i in 1 2 3 4 5 6 7 8 ; do teststring=$teststring$teststring done SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \ = "XX$teststring$teststring"; } >/dev/null 2>&1 && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done # Only check the string length outside the loop. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` teststring= # Add a significant safety factor because C++ compilers can tack on # massive amounts of additional arguments before passing them to the # linker. It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac ]) if test -n $lt_cv_sys_max_cmd_len ; then AC_MSG_RESULT($lt_cv_sys_max_cmd_len) else AC_MSG_RESULT(none) fi max_cmd_len=$lt_cv_sys_max_cmd_len _LT_DECL([], [max_cmd_len], [0], [What is the maximum length of a command?]) ])# LT_CMD_MAX_LEN # Old name: AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) # _LT_HEADER_DLFCN # ---------------- m4_defun([_LT_HEADER_DLFCN], [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl ])# _LT_HEADER_DLFCN # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) # ---------------------------------------------------------------- m4_defun([_LT_TRY_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl if test "$cross_compiling" = yes; then : [$4] else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF [#line __oline__ "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } else puts (dlerror ()); return status; }] _LT_EOF if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) $1 ;; x$lt_dlneed_uscore) $2 ;; x$lt_dlunknown|x*) $3 ;; esac else : # compilation failed $3 fi fi rm -fr conftest* ])# _LT_TRY_DLOPEN_SELF # LT_SYS_DLOPEN_SELF # ------------------ AC_DEFUN([LT_SYS_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32* | cegcc*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ]) ;; *) AC_CHECK_FUNC([shl_load], [lt_cv_dlopen="shl_load"], [AC_CHECK_LIB([dld], [shl_load], [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], [AC_CHECK_FUNC([dlopen], [lt_cv_dlopen="dlopen"], [AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], [AC_CHECK_LIB([svld], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], [AC_CHECK_LIB([dld], [dld_link], [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) ]) ]) ]) ]) ]) ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" AC_CACHE_CHECK([whether a program can dlopen itself], lt_cv_dlopen_self, [dnl _LT_TRY_DLOPEN_SELF( lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) ]) if test "x$lt_cv_dlopen_self" = xyes; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" AC_CACHE_CHECK([whether a statically linked program can dlopen itself], lt_cv_dlopen_self_static, [dnl _LT_TRY_DLOPEN_SELF( lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) ]) fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi _LT_DECL([dlopen_support], [enable_dlopen], [0], [Whether dlopen is supported]) _LT_DECL([dlopen_self], [enable_dlopen_self], [0], [Whether dlopen of programs is supported]) _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], [Whether dlopen of statically linked programs is supported]) ])# LT_SYS_DLOPEN_SELF # Old name: AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) # _LT_COMPILER_C_O([TAGNAME]) # --------------------------- # Check to see if options -c and -o are simultaneously supported by compiler. # This macro does not hard code the compiler like AC_PROG_CC_C_O. m4_defun([_LT_COMPILER_C_O], [m4_require([_LT_DECL_SED])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_TAG_COMPILER])dnl AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -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:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes fi fi chmod u+w . 2>&AS_MESSAGE_LOG_FD $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* ]) _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], [Does compiler simultaneously support -c and -o options?]) ])# _LT_COMPILER_C_O # _LT_COMPILER_FILE_LOCKS([TAGNAME]) # ---------------------------------- # Check to see if we can do hard links to lock some files if needed m4_defun([_LT_COMPILER_FILE_LOCKS], [m4_require([_LT_ENABLE_LOCK])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl _LT_COMPILER_C_O([$1]) hard_links="nottested" if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user AC_MSG_CHECKING([if we can lock with hard links]) hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no AC_MSG_RESULT([$hard_links]) if test "$hard_links" = no; then AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) need_locks=warn fi else need_locks=no fi _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) ])# _LT_COMPILER_FILE_LOCKS # _LT_CHECK_OBJDIR # ---------------- m4_defun([_LT_CHECK_OBJDIR], [AC_CACHE_CHECK([for objdir], [lt_cv_objdir], [rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null]) objdir=$lt_cv_objdir _LT_DECL([], [objdir], [0], [The name of the directory that contains temporary libtool files])dnl m4_pattern_allow([LT_OBJDIR])dnl AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", [Define to the sub-directory in which libtool stores uninstalled libraries.]) ])# _LT_CHECK_OBJDIR # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) # -------------------------------------- # Check hardcoding attributes. m4_defun([_LT_LINKER_HARDCODE_LIBPATH], [AC_MSG_CHECKING([how to hardcode library paths into programs]) _LT_TAGVAR(hardcode_action, $1)= if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || test -n "$_LT_TAGVAR(runpath_var, $1)" || test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then # We can hardcode non-existent directories. if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then # Linking always hardcodes the temporary library directory. _LT_TAGVAR(hardcode_action, $1)=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. _LT_TAGVAR(hardcode_action, $1)=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. _LT_TAGVAR(hardcode_action, $1)=unsupported fi AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) if test "$_LT_TAGVAR(hardcode_action, $1)" = relink || test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi _LT_TAGDECL([], [hardcode_action], [0], [How to hardcode a shared library path into an executable]) ])# _LT_LINKER_HARDCODE_LIBPATH # _LT_CMD_STRIPLIB # ---------------- m4_defun([_LT_CMD_STRIPLIB], [m4_require([_LT_DECL_EGREP]) striplib= old_striplib= AC_MSG_CHECKING([whether stripping libraries is possible]) if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" AC_MSG_RESULT([yes]) else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" old_striplib="$STRIP -S" AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) fi ;; *) AC_MSG_RESULT([no]) ;; esac fi _LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) _LT_DECL([], [striplib], [1]) ])# _LT_CMD_STRIPLIB # _LT_SYS_DYNAMIC_LINKER([TAG]) # ----------------------------- # PORTME Fill in your ld.so characteristics m4_defun([_LT_SYS_DYNAMIC_LINKER], [AC_REQUIRE([AC_CANONICAL_HOST])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_OBJDUMP])dnl m4_require([_LT_DECL_SED])dnl AC_MSG_CHECKING([dynamic linker characteristics]) m4_if([$1], [], [ if test "$GCC" = yes; then case $host_os in darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; *) lt_awk_arg="/^libraries:/" ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'` else lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary. lt_tmp_lt_search_path_spec= lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path/$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" else test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk ' BEGIN {RS=" "; FS="/|\n";} { lt_foo=""; lt_count=0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo="/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[[lt_foo]]++; } if (lt_freq[[lt_foo]] == 1) { print lt_foo; } }'` sys_lib_search_path_spec=`$ECHO $lt_search_path_spec` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi]) library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[[4-9]]*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[[01]] | aix4.[[01]].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[[45]]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' m4_if([$1], [],[ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[[123]]*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[[01]]* | freebsdelf3.[[01]]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; interix[[3-9]]*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], [shlibpath_overrides_runpath=yes])]) LDFLAGS=$save_LDFLAGS libdir=$save_libdir # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsdelf*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='NetBSD ld.elf_so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[[89]] | openbsd2.[[89]].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac AC_MSG_RESULT([$dynamic_linker]) test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" fi if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" fi _LT_DECL([], [variables_saved_for_relink], [1], [Variables whose values should be saved in libtool wrapper scripts and restored at link time]) _LT_DECL([], [need_lib_prefix], [0], [Do we need the "lib" prefix for modules?]) _LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) _LT_DECL([], [version_type], [0], [Library versioning type]) _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) _LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) _LT_DECL([], [shlibpath_overrides_runpath], [0], [Is shlibpath searched before the hard-coded library search path?]) _LT_DECL([], [libname_spec], [1], [Format of library name prefix]) _LT_DECL([], [library_names_spec], [1], [[List of archive names. First name is the real one, the rest are links. The last name is the one that the linker finds with -lNAME]]) _LT_DECL([], [soname_spec], [1], [[The coded name of the library, if different from the real name]]) _LT_DECL([], [postinstall_cmds], [2], [Command to use after installation of a shared archive]) _LT_DECL([], [postuninstall_cmds], [2], [Command to use after uninstallation of a shared archive]) _LT_DECL([], [finish_cmds], [2], [Commands used to finish a libtool library installation in a directory]) _LT_DECL([], [finish_eval], [1], [[As "finish_cmds", except a single script fragment to be evaled but not shown]]) _LT_DECL([], [hardcode_into_libs], [0], [Whether we should hardcode library paths into libraries]) _LT_DECL([], [sys_lib_search_path_spec], [2], [Compile-time system search path for libraries]) _LT_DECL([], [sys_lib_dlsearch_path_spec], [2], [Run-time system search path for libraries]) ])# _LT_SYS_DYNAMIC_LINKER # _LT_PATH_TOOL_PREFIX(TOOL) # -------------------------- # find a file program which can recognize shared library AC_DEFUN([_LT_PATH_TOOL_PREFIX], [m4_require([_LT_DECL_EGREP])dnl AC_MSG_CHECKING([for $1]) AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, [case $MAGIC_CMD in [[\\/*] | ?:[\\/]*]) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR dnl $ac_dummy forces splitting on constant user-supplied paths. dnl POSIX.2 word splitting is done only on the output of word expansions, dnl not every word. This closes a longstanding sh security hole. ac_dummy="m4_if([$2], , $PATH, [$2])" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$1; then lt_cv_path_MAGIC_CMD="$ac_dir/$1" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac]) MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then AC_MSG_RESULT($MAGIC_CMD) else AC_MSG_RESULT(no) fi _LT_DECL([], [MAGIC_CMD], [0], [Used to examine libraries when file_magic_cmd begins with "file"])dnl ])# _LT_PATH_TOOL_PREFIX # Old name: AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) # _LT_PATH_MAGIC # -------------- # find a file program which can recognize a shared library m4_defun([_LT_PATH_MAGIC], [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) else MAGIC_CMD=: fi fi ])# _LT_PATH_MAGIC # LT_PATH_LD # ---------- # find the pathname to the GNU or non-GNU linker AC_DEFUN([LT_PATH_LD], [AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_DECL_EGREP])dnl AC_ARG_WITH([gnu-ld], [AS_HELP_STRING([--with-gnu-ld], [assume the C compiler uses GNU ld @<:@default=no@:>@])], [test "$withval" = no || with_gnu_ld=yes], [with_gnu_ld=no])dnl ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. AC_MSG_CHECKING([for ld used by $CC]) case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [[\\/]]* | ?:[[\\/]]*) re_direlt='/[[^/]][[^/]]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then AC_MSG_CHECKING([for GNU ld]) else AC_MSG_CHECKING([for non-GNU ld]) fi AC_CACHE_VAL(lt_cv_path_LD, [if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &1 /dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; cegcc) # use the weaker test based on 'objdump'. See mingw*. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; gnu*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'] lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[[3-9]]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be Linux ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) lt_cv_deplibs_check_method=pass_all ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; *nto* | *qnx*) lt_cv_deplibs_check_method=pass_all ;; openbsd*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; tpf*) lt_cv_deplibs_check_method=pass_all ;; esac ]) file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown _LT_DECL([], [deplibs_check_method], [1], [Method to check whether dependent libraries are shared objects]) _LT_DECL([], [file_magic_cmd], [1], [Command to use when deplibs_check_method == "file_magic"]) ])# _LT_CHECK_MAGIC_METHOD # LT_PATH_NM # ---------- # find the pathname to a BSD- or MS-compatible name lister AC_DEFUN([LT_PATH_NM], [AC_REQUIRE([AC_PROG_CC])dnl AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, [if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else lt_nm_to_check="${ac_tool_prefix}nm" if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. tmp_nm="$ac_dir/$lt_tmp_nm" if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS="$lt_save_ifs" done : ${lt_cv_path_NM=no} fi]) if test "$lt_cv_path_NM" != "no"; then NM="$lt_cv_path_NM" else # Didn't find any BSD compatible name lister, look for dumpbin. AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :) AC_SUBST([DUMPBIN]) if test "$DUMPBIN" != ":"; then NM="$DUMPBIN" fi fi test -z "$NM" && NM=nm AC_SUBST([NM]) _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], [lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&AS_MESSAGE_LOG_FD (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&AS_MESSAGE_LOG_FD (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD) cat conftest.out >&AS_MESSAGE_LOG_FD if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi rm -f conftest*]) ])# LT_PATH_NM # Old names: AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_PROG_NM], []) dnl AC_DEFUN([AC_PROG_NM], []) # LT_LIB_M # -------- # check for math library AC_DEFUN([LT_LIB_M], [AC_REQUIRE([AC_CANONICAL_HOST])dnl LIBM= case $host in *-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) # These system don't have libm, or don't need it ;; *-ncr-sysv4.3*) AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") ;; *) AC_CHECK_LIB(m, cos, LIBM="-lm") ;; esac AC_SUBST([LIBM]) ])# LT_LIB_M # Old name: AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_CHECK_LIBM], []) # _LT_COMPILER_NO_RTTI([TAGNAME]) # ------------------------------- m4_defun([_LT_COMPILER_NO_RTTI], [m4_require([_LT_TAG_COMPILER])dnl _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= if test "$GCC" = yes; then _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], lt_cv_prog_compiler_rtti_exceptions, [-fno-rtti -fno-exceptions], [], [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) fi _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], [Compiler flag to turn off builtin functions]) ])# _LT_COMPILER_NO_RTTI # _LT_CMD_GLOBAL_SYMBOLS # ---------------------- m4_defun([_LT_CMD_GLOBAL_SYMBOLS], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([LT_PATH_NM])dnl AC_REQUIRE([LT_PATH_LD])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_TAG_COMPILER])dnl # Check for command to grab the raw symbol name followed by C symbol from nm. AC_MSG_CHECKING([command to parse $NM output from $compiler object]) AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [ # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[[BCDEGRST]]' # Regexp to match symbols that can be accessed directly from C. sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' # Define system-specific variables. case $host_os in aix*) symcode='[[BCDT]]' ;; cygwin* | mingw* | pw32* | cegcc*) symcode='[[ABCDGISTW]]' ;; hpux*) if test "$host_cpu" = ia64; then symcode='[[ABCDEGRST]]' fi ;; irix* | nonstopux*) symcode='[[BCDEGRST]]' ;; osf*) symcode='[[BCDEGQRST]]' ;; solaris*) symcode='[[BDRT]]' ;; sco3.2v5*) symcode='[[DT]]' ;; sysv4.2uw2*) symcode='[[DT]]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[[ABDT]]' ;; sysv4) symcode='[[DFNSTU]]' ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[[ABCDGIRSTW]]' ;; esac # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'" # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # Try without a prefix underscore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Fake it for dumpbin and say T for any non-static function # and D for any global variable. # Also find C++ and __fastcall symbols from MSVC++, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK ['"\ " {last_section=section; section=\$ 3};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ " s[1]~/^[@?]/{print s[1], s[1]; next};"\ " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx]" else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <<_LT_EOF #ifdef __cplusplus extern "C" { #endif char nm_test_var; void nm_test_func(void); void nm_test_func(void){} #ifdef __cplusplus } #endif int main(){nm_test_var='a';nm_test_func();return(0);} _LT_EOF if AC_TRY_EVAL(ac_compile); then # Now try to grab the symbols. nlist=conftest.nm if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext #ifdef __cplusplus extern "C" { #endif _LT_EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ const struct { const char *name; void *address; } lt__PROGRAM__LTX_preloaded_symbols[[]] = { { "@PROGRAM@", (void *) 0 }, _LT_EOF $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt__PROGRAM__LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_save_LIBS="$LIBS" lt_save_CFLAGS="$CFLAGS" LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS="$lt_save_LIBS" CFLAGS="$lt_save_CFLAGS" else echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD fi else echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= fi done ]) if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then AC_MSG_RESULT(failed) else AC_MSG_RESULT(ok) fi _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], [Take the output of nm and produce a listing of raw symbols and C names]) _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], [Transform the output of nm in a proper C declaration]) _LT_DECL([global_symbol_to_c_name_address], [lt_cv_sys_global_symbol_to_c_name_address], [1], [Transform the output of nm in a C name address pair]) _LT_DECL([global_symbol_to_c_name_address_lib_prefix], [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], [Transform the output of nm in a C name address pair when lib prefix is needed]) ]) # _LT_CMD_GLOBAL_SYMBOLS # _LT_COMPILER_PIC([TAGNAME]) # --------------------------- m4_defun([_LT_COMPILER_PIC], [m4_require([_LT_TAG_COMPILER])dnl _LT_TAGVAR(lt_prog_compiler_wl, $1)= _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)= AC_MSG_CHECKING([for $compiler option to produce PIC]) m4_if([$1], [CXX], [ # C++ specific cases for pic, static, wl, etc. if test "$GXX" = yes; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac else case $host_os in aix[[4-9]]*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68*) # Green Hills C++ Compiler # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; dgux*) case $cc_basename in ec++*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; ghcx*) # Green Hills C++ Compiler _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; freebsd* | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' if test "$host_cpu" != ia64; then _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' fi ;; aCC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac ;; *) ;; esac ;; interix*) # This is c89, which is MS Visual C++ (no shared libs) # Anyone wants to do a port? ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in KCC*) # KAI C++ Compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; ecpc* ) # old Intel C++ for x86_64 which still supported -KPIC. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; icpc* ) # Intel C++, used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; pgCC* | pgcpp*) # Portland Group C++ compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; cxx*) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; xlc* | xlC*) # IBM XL 8.0 on PPC _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; esac ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' ;; *) ;; esac ;; netbsd* | netbsdelf*-gnu) ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' ;; RCC*) # Rational C++ 2.4.1 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; cxx*) # Digital/Compaq C++ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; *) ;; esac ;; psos*) ;; solaris*) case $cc_basename in CC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; gcx*) # Green Hills C++ Compiler _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; lcc*) # Lucid _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; *) ;; esac ;; vxworks*) ;; *) _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ], [ if test "$GCC" = yes; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no enable_shared=no ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; hpux9* | hpux10* | hpux11*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC (with -KPIC) is the default. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in # old Intel for x86_64 which still supported -KPIC. ecc*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; # Lahey Fortran 8.1. lf95*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' ;; pgcc* | pgf77* | pgf90* | pgf95*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; ccc*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All Alpha code is PIC. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; xl*) # IBM XL C 8.0/Fortran 10.1 on PPC _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ;; *Sun\ F*) # Sun Fortran 8.3 passes all unrecognized flags to the linker _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='' ;; esac ;; esac ;; newsos6) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; osf3* | osf4* | osf5*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All OSF/1 code is PIC. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; rdos*) _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; solaris*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' case $cc_basename in f77* | f90* | f95*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; *) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; esac ;; sunos4*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; unicos*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; uts4*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *) _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ]) case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" ;; esac AC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], [How to pass a linker flag through the compiler]) # # Check to make sure the PIC flag actually works. # if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in "" | " "*) ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; esac], [_LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) fi _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], [Additional compiler flags for building library objects]) # # Check to make sure the static flag actually works. # wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), $lt_tmp_static_flag, [], [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], [Compiler flag to prevent dynamic linking]) ])# _LT_COMPILER_PIC # _LT_LINKER_SHLIBS([TAGNAME]) # ---------------------------- # See if the linker supports building shared libraries. m4_defun([_LT_LINKER_SHLIBS], [AC_REQUIRE([LT_PATH_LD])dnl AC_REQUIRE([LT_PATH_NM])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl m4_require([_LT_TAG_COMPILER])dnl AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) m4_if([$1], [CXX], [ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' case $host_os in aix[[4-9]]*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi ;; pw32*) _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" ;; cygwin* | mingw* | cegcc*) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' ;; linux* | k*bsd*-gnu) _LT_TAGVAR(link_all_deplibs, $1)=no ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] ], [ runpath_var= _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_cmds, $1)= _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(compiler_needs_object, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(old_archive_from_new_cmds, $1)= _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= _LT_TAGVAR(thread_safe_flag_spec, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list _LT_TAGVAR(include_expsyms, $1)= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. dnl Note also adjust exclude_expsyms for C++ above. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; linux* | k*bsd*-gnu) _LT_TAGVAR(link_all_deplibs, $1)=no ;; esac _LT_TAGVAR(ld_shlibs, $1)=yes if test "$with_gnu_ld" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= fi supports_anon_versioning=no case `$LD -v 2>&1` in *GNU\ gold*) supports_anon_versioning=yes ;; *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[[3-9]]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: the GNU linker, at least up to release 2.9.1, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to modify your PATH *** so that a non-GNU linker is found, and then restart. _LT_EOF fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no if test "$host_os" = linux-dietlibc; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test "$tmp_diet" = no then tmp_addflag= tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; lf95*) # Lahey Fortran 8.1 _LT_TAGVAR(whole_archive_flag_spec, $1)= tmp_sharedflag='--shared' ;; xl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi case $cc_basename in xlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; sunos4*) _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then runpath_var= _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. _LT_TAGVAR(hardcode_minus_L, $1)=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. _LT_TAGVAR(hardcode_direct, $1)=unsupported fi ;; aix[[4-9]]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_TAGVAR(archive_cmds, $1)='' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' if test "$GCC" = yes; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 _LT_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi _LT_TAGVAR(link_all_deplibs, $1)=no else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. _LT_TAGVAR(always_export_symbols, $1)=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' _LT_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds its shared libraries. _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac ;; bsdi[[45]]*) _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic ;; cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' # FIXME: Should let the user specify the lib program. _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; darwin* | rhapsody*) _LT_DARWIN_LINKER_FEATURES($1) ;; dgux*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; freebsd1*) _LT_TAGVAR(ld_shlibs, $1)=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; hpux9*) if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; hpux10*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes fi ;; hpux11*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac fi if test "$with_gnu_ld" = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" AC_LINK_IFELSE(int foo(void) {}, _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' ) LDFLAGS="$save_LDFLAGS" else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes _LT_TAGVAR(link_all_deplibs, $1)=yes ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; newsos6) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *nto* | *qnx*) ;; openbsd*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' else case $host_os in openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' ;; esac fi else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; os2*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_separator, $1)=: ;; solaris*) _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' if test "$GCC" = yes; then wlarc='${wl}' _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) wlarc='' _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' ;; *) wlarc='${wl}' _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. GCC discards it without `$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test "$GCC" = yes; then _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' fi ;; esac _LT_TAGVAR(link_all_deplibs, $1)=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4) case $host_vendor in sni) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' _LT_TAGVAR(hardcode_direct, $1)=no ;; motorola) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4.3*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes _LT_TAGVAR(ld_shlibs, $1)=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(ld_shlibs, $1)=no ;; esac if test x$host_vendor = xsni; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' ;; esac fi fi ]) AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl _LT_DECL([], [extract_expsyms_cmds], [2], [The commands to extract the exported symbol list from a shared archive]) # # Do we need to explicitly link libc? # case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in x|xyes) # Assume -lc should be added _LT_TAGVAR(archive_cmds_need_lc, $1)=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $_LT_TAGVAR(archive_cmds, $1) in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. AC_MSG_CHECKING([whether -lc should be explicitly linked in]) $RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if AC_TRY_EVAL(ac_compile) 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) _LT_TAGVAR(allow_undefined_flag, $1)= if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) then _LT_TAGVAR(archive_cmds_need_lc, $1)=no else _LT_TAGVAR(archive_cmds_need_lc, $1)=yes fi _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)]) ;; esac fi ;; esac _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], [Whether or not to add -lc for building shared libraries]) _LT_TAGDECL([allow_libtool_libs_with_static_runtimes], [enable_shared_with_static_runtimes], [0], [Whether or not to disallow shared libs when runtime libs are static]) _LT_TAGDECL([], [export_dynamic_flag_spec], [1], [Compiler flag to allow reflexive dlopens]) _LT_TAGDECL([], [whole_archive_flag_spec], [1], [Compiler flag to generate shared objects directly from archives]) _LT_TAGDECL([], [compiler_needs_object], [1], [Whether the compiler copes with passing no objects directly]) _LT_TAGDECL([], [old_archive_from_new_cmds], [2], [Create an old-style archive from a shared archive]) _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], [Create a temporary old-style archive to link instead of a shared archive]) _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) _LT_TAGDECL([], [archive_expsym_cmds], [2]) _LT_TAGDECL([], [module_cmds], [2], [Commands used to build a loadable module if different from building a shared archive.]) _LT_TAGDECL([], [module_expsym_cmds], [2]) _LT_TAGDECL([], [with_gnu_ld], [1], [Whether we are building with GNU ld or not]) _LT_TAGDECL([], [allow_undefined_flag], [1], [Flag that allows shared libraries with undefined symbols to be built]) _LT_TAGDECL([], [no_undefined_flag], [1], [Flag that enforces no undefined symbols]) _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], [Flag to hardcode $libdir into a binary during linking. This must work even if $libdir does not exist]) _LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1], [[If ld is used when linking, flag to hardcode $libdir into a binary during linking. This must work even if $libdir does not exist]]) _LT_TAGDECL([], [hardcode_libdir_separator], [1], [Whether we need a single "-rpath" flag with a separated argument]) _LT_TAGDECL([], [hardcode_direct], [0], [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_direct_absolute], [0], [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the resulting binary and the resulting library dependency is "absolute", i.e impossible to change by setting ${shlibpath_var} if the library is relocated]) _LT_TAGDECL([], [hardcode_minus_L], [0], [Set to "yes" if using the -LDIR flag during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_shlibpath_var], [0], [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_automatic], [0], [Set to "yes" if building a shared library automatically hardcodes DIR into the library and all subsequent libraries and executables linked against it]) _LT_TAGDECL([], [inherit_rpath], [0], [Set to yes if linker adds runtime paths of dependent libraries to runtime path list]) _LT_TAGDECL([], [link_all_deplibs], [0], [Whether libtool must link a program against all its dependency libraries]) _LT_TAGDECL([], [fix_srcfile_path], [1], [Fix the shell variable $srcfile for the compiler]) _LT_TAGDECL([], [always_export_symbols], [0], [Set to "yes" if exported symbols are required]) _LT_TAGDECL([], [export_symbols_cmds], [2], [The commands to list exported symbols]) _LT_TAGDECL([], [exclude_expsyms], [1], [Symbols that should not be listed in the preloaded symbols]) _LT_TAGDECL([], [include_expsyms], [1], [Symbols that must always be exported]) _LT_TAGDECL([], [prelink_cmds], [2], [Commands necessary for linking programs (against libraries) with templates]) _LT_TAGDECL([], [file_list_spec], [1], [Specify filename containing input files]) dnl FIXME: Not yet implemented dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], dnl [Compiler flag to generate thread safe objects]) ])# _LT_LINKER_SHLIBS # _LT_LANG_C_CONFIG([TAG]) # ------------------------ # Ensure that the configuration variables for a C compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write # the compiler configuration to `libtool'. m4_defun([_LT_LANG_C_CONFIG], [m4_require([_LT_DECL_EGREP])dnl lt_save_CC="$CC" AC_LANG_PUSH(C) # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' _LT_TAG_COMPILER # Save the default compiler, since it gets overwritten when the other # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. compiler_DEFAULT=$CC # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) LT_SYS_DLOPEN_SELF _LT_CMD_STRIPLIB # Report which library types will actually be built AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_CONFIG($1) fi AC_LANG_POP CC="$lt_save_CC" ])# _LT_LANG_C_CONFIG # _LT_PROG_CXX # ------------ # Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++ # compiler, we have our own version here. m4_defun([_LT_PROG_CXX], [ pushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes]) AC_PROG_CXX if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then AC_PROG_CXXCPP else _lt_caught_CXX_error=yes fi popdef([AC_MSG_ERROR]) ])# _LT_PROG_CXX dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([_LT_PROG_CXX], []) # _LT_LANG_CXX_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for a C++ compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write # the compiler configuration to `libtool'. m4_defun([_LT_LANG_CXX_CONFIG], [AC_REQUIRE([_LT_PROG_CXX])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl AC_LANG_PUSH(C++) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(compiler_needs_object, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for C++ test sources. ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the CXX compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_caught_CXX_error" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_LD=$LD lt_save_GCC=$GCC GCC=$GXX lt_save_with_gnu_ld=$with_gnu_ld lt_save_path_LD=$lt_cv_path_LD if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx else $as_unset lt_cv_prog_gnu_ld fi if test -n "${lt_cv_path_LDCXX+set}"; then lt_cv_path_LD=$lt_cv_path_LDCXX else $as_unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) if test -n "$compiler"; then # We don't want -fno-exception when compiling C++ code, so set the # no_builtin_flag separately if test "$GXX" = yes; then _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' else _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= fi if test "$GXX" = yes; then # Set up default GNU C++ configuration LT_PATH_LD # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test "$with_gnu_ld" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) wlarc='${wl}' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | $GREP 'no-whole-archive' > /dev/null; then _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= fi else with_gnu_ld=no wlarc= # A generic and very simple default shared library creation # command for GNU C++ for the case where it uses the native # linker, instead of GNU ld. If possible, this setting should # overridden to take advantage of the native linker features on # the platform it is being used on. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' else GXX=no with_gnu_ld=no wlarc= fi # PORTME: fill in a description of your system's C++ link characteristics AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) _LT_TAGVAR(ld_shlibs, $1)=yes case $host_os in aix3*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aix[[4-9]]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_TAGVAR(archive_cmds, $1)='' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' if test "$GXX" = yes; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 _LT_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)= fi esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to # export. _LT_TAGVAR(always_export_symbols, $1)=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an empty # executable. _LT_SYS_MODULE_PATH_AIX _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' _LT_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds its shared # libraries. _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; darwin* | rhapsody*) _LT_DARWIN_LINKER_FEATURES($1) ;; dgux*) case $cc_basename in ec++*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; freebsd[[12]]*) # C++ shared libraries reported to be fairly broken before # switch to ELF _LT_TAGVAR(ld_shlibs, $1)=no ;; freebsd-elf*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; freebsd* | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions _LT_TAGVAR(ld_shlibs, $1)=yes ;; gnu*) ;; hpux9*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aCC*) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' ;; *) if test "$GXX" = yes; then _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; hpux10*|hpux11*) if test $with_gnu_ld = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) ;; *) _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; esac fi case $host_cpu in hppa*64*|ia64*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. ;; esac case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aCC*) case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' ;; *) if test "$GXX" = yes; then if test $with_gnu_ld = no; then case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) if test "$GXX" = yes; then if test "$with_gnu_ld" = no; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib' fi fi _LT_TAGVAR(link_all_deplibs, $1)=yes ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; icpc* | ecpc* ) # Intel C++ with_gnu_ld=yes # version 8.0 and above of icpc choke on multiply defined symbols # if we add $predep_objects and $postdep_objects, however 7.1 and # earlier do not add the objects themselves. case `$CC -V 2>&1` in *"Version 7."*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; esac _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' ;; pgCC* | pgcpp*) # Portland Group C++ compiler case `$CC -V` in *pgCC\ [[1-5]]* | *pgcpp\ [[1-5]]*) _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"' _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~ $RANLIB $oldlib' _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; *) # Version 6 will use weak symbols _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' ;; cxx*) # Compaq C++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' ;; xl*) # IBM XL 8.0 on PPC, with GNU ld _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes # Not sure whether something based on # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 # would be better. output_verbose_link_cmd='echo' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; esac ;; esac ;; lynxos*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; m88k*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; mvs*) case $cc_basename in cxx*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no fi # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; *nto* | *qnx*) _LT_TAGVAR(ld_shlibs, $1)=yes ;; openbsd2*) # C++ shared libraries are fairly broken _LT_TAGVAR(ld_shlibs, $1)=no ;; openbsd*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' fi output_verbose_link_cmd=echo else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Archives containing C++ object files must be created using # the KAI C++ compiler. case $host in osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; esac ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; cxx*) case $host in osf3*) _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' ;; *) _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~ $RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' ;; esac _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' case $host in osf3*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; lcc*) # Lucid # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; solaris*) case $cc_basename in CC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(archive_cmds_need_lc,$1)=yes _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. # Supported since Solaris 2.6 (maybe 2.5.1?) _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; esac _LT_TAGVAR(link_all_deplibs, $1)=yes output_verbose_link_cmd='echo' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; gcx*) # Green Hills C++ Compiler _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' if $CC --version | $GREP -v '^2\.7' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' else # g++ 2.7 appears to require `-G' NOT `-shared' on this # platform. _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' ;; esac fi ;; esac ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no _LT_TAGVAR(GCC, $1)="$GXX" _LT_TAGVAR(LD, $1)="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_SYS_HIDDEN_LIBDEPS($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" CC=$lt_save_CC LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC with_gnu_ld=$lt_save_with_gnu_ld lt_cv_path_LDCXX=$lt_cv_path_LD lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld fi # test "$_lt_caught_CXX_error" != yes AC_LANG_POP ])# _LT_LANG_CXX_CONFIG # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) # --------------------------------- # Figure out "hidden" library dependencies from verbose # compiler output when linking a shared library. # Parse the compiler output and extract the necessary # objects, libraries and library flags. m4_defun([_LT_SYS_HIDDEN_LIBDEPS], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl # Dependencies to place before and after the object being linked: _LT_TAGVAR(predep_objects, $1)= _LT_TAGVAR(postdep_objects, $1)= _LT_TAGVAR(predeps, $1)= _LT_TAGVAR(postdeps, $1)= _LT_TAGVAR(compiler_lib_search_path, $1)= dnl we can't use the lt_simple_compile_test_code here, dnl because it contains code intended for an executable, dnl not a library. It's possible we should let each dnl tag define a new lt_????_link_test_code variable, dnl but it's only used here... m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF int a; void foo (void) { a = 0; } _LT_EOF ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF class Foo { public: Foo (void) { a = 0; } private: int a; }; _LT_EOF ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF subroutine foo implicit none integer*4 a a=0 return end _LT_EOF ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF subroutine foo implicit none integer a a=0 return end _LT_EOF ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF public class foo { private int a; public void bar (void) { a = 0; } }; _LT_EOF ]) dnl Parse the compiler output and extract the necessary dnl objects, libraries and library flags. if AC_TRY_EVAL(ac_compile); then # Parse the compiler output and extract the necessary # objects, libraries and library flags. # Sentinel used to keep track of whether or not we are before # the conftest object file. pre_test_object_deps_done=no for p in `eval "$output_verbose_link_cmd"`; do case $p in -L* | -R* | -l*) # Some compilers place space between "-{L,R}" and the path. # Remove the space. if test $p = "-L" || test $p = "-R"; then prev=$p continue else prev= fi if test "$pre_test_object_deps_done" = no; then case $p in -L* | -R*) # Internal compiler library paths should come after those # provided the user. The postdeps already come after the # user supplied libs so there is no need to process them. if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" else _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" fi ;; # The "-l" case would never come before the object being # linked, so don't bother handling this case. esac else if test -z "$_LT_TAGVAR(postdeps, $1)"; then _LT_TAGVAR(postdeps, $1)="${prev}${p}" else _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" fi fi ;; *.$objext) # This assumes that the test object file only shows up # once in the compiler output. if test "$p" = "conftest.$objext"; then pre_test_object_deps_done=yes continue fi if test "$pre_test_object_deps_done" = no; then if test -z "$_LT_TAGVAR(predep_objects, $1)"; then _LT_TAGVAR(predep_objects, $1)="$p" else _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" fi else if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then _LT_TAGVAR(postdep_objects, $1)="$p" else _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" fi fi ;; *) ;; # Ignore the rest. esac done # Clean up. rm -f a.out a.exe else echo "libtool.m4: error: problem compiling $1 test program" fi $RM -f confest.$objext # PORTME: override above test on systems where it is broken m4_if([$1], [CXX], [case $host_os in interix[[3-9]]*) # Interix 3.5 installs completely hosed .la files for C++, so rather than # hack all around it, let's just trust "g++" to DTRT. _LT_TAGVAR(predep_objects,$1)= _LT_TAGVAR(postdep_objects,$1)= _LT_TAGVAR(postdeps,$1)= ;; linux*) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac if test "$solaris_use_stlport4" != yes; then _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' fi ;; esac ;; solaris*) case $cc_basename in CC*) # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac # Adding this requires a known-good setup of shared libraries for # Sun compiler versions before 5.6, else PIC objects from an old # archive will be linked into the output, leading to subtle bugs. if test "$solaris_use_stlport4" != yes; then _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' fi ;; esac ;; esac ]) case " $_LT_TAGVAR(postdeps, $1) " in *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; esac _LT_TAGVAR(compiler_lib_search_dirs, $1)= if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` fi _LT_TAGDECL([], [compiler_lib_search_dirs], [1], [The directories searched by this compiler when creating a shared library]) _LT_TAGDECL([], [predep_objects], [1], [Dependencies to place before and after the objects being linked to create a shared library]) _LT_TAGDECL([], [postdep_objects], [1]) _LT_TAGDECL([], [predeps], [1]) _LT_TAGDECL([], [postdeps], [1]) _LT_TAGDECL([], [compiler_lib_search_path], [1], [The library search path used internally by the compiler when linking a shared library]) ])# _LT_SYS_HIDDEN_LIBDEPS # _LT_PROG_F77 # ------------ # Since AC_PROG_F77 is broken, in that it returns the empty string # if there is no fortran compiler, we have our own version here. m4_defun([_LT_PROG_F77], [ pushdef([AC_MSG_ERROR], [_lt_disable_F77=yes]) AC_PROG_F77 if test -z "$F77" || test "X$F77" = "Xno"; then _lt_disable_F77=yes fi popdef([AC_MSG_ERROR]) ])# _LT_PROG_F77 dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([_LT_PROG_F77], []) # _LT_LANG_F77_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for a Fortran 77 compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_F77_CONFIG], [AC_REQUIRE([_LT_PROG_F77])dnl AC_LANG_PUSH(Fortran 77) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for f77 test sources. ac_ext=f # Object file extension for compiled f77 test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the F77 compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_disable_F77" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_GCC=$GCC CC=${F77-"f77"} compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) GCC=$G77 if test -n "$compiler"; then AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_TAGVAR(GCC, $1)="$G77" _LT_TAGVAR(LD, $1)="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" GCC=$lt_save_GCC CC="$lt_save_CC" fi # test "$_lt_disable_F77" != yes AC_LANG_POP ])# _LT_LANG_F77_CONFIG # _LT_PROG_FC # ----------- # Since AC_PROG_FC is broken, in that it returns the empty string # if there is no fortran compiler, we have our own version here. m4_defun([_LT_PROG_FC], [ pushdef([AC_MSG_ERROR], [_lt_disable_FC=yes]) AC_PROG_FC if test -z "$FC" || test "X$FC" = "Xno"; then _lt_disable_FC=yes fi popdef([AC_MSG_ERROR]) ])# _LT_PROG_FC dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([_LT_PROG_FC], []) # _LT_LANG_FC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for a Fortran compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_FC_CONFIG], [AC_REQUIRE([_LT_PROG_FC])dnl AC_LANG_PUSH(Fortran) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for fc test sources. ac_ext=${ac_fc_srcext-f} # Object file extension for compiled fc test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the FC compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_disable_FC" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_GCC=$GCC CC=${FC-"f95"} compiler=$CC GCC=$ac_cv_fc_compiler_gnu _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) if test -n "$compiler"; then AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" _LT_TAGVAR(LD, $1)="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_SYS_HIDDEN_LIBDEPS($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" GCC=$lt_save_GCC CC="$lt_save_CC" fi # test "$_lt_disable_FC" != yes AC_LANG_POP ])# _LT_LANG_FC_CONFIG # _LT_LANG_GCJ_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for the GNU Java Compiler compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_GCJ_CONFIG], [AC_REQUIRE([LT_PROG_GCJ])dnl AC_LANG_SAVE # Source file extension for Java test sources. ac_ext=java # Object file extension for compiled Java test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="class foo {}" # Code to be used in simple link tests lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_GCC=$GCC GCC=yes CC=${GCJ-"gcj"} compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_TAGVAR(LD, $1)="$LD" _LT_CC_BASENAME([$compiler]) # GCJ did not exist at the time GCC didn't implicitly link libc in. _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi AC_LANG_RESTORE GCC=$lt_save_GCC CC="$lt_save_CC" ])# _LT_LANG_GCJ_CONFIG # _LT_LANG_RC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for the Windows resource compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_RC_CONFIG], [AC_REQUIRE([LT_PROG_RC])dnl AC_LANG_SAVE # Source file extension for RC test sources. ac_ext=rc # Object file extension for compiled RC test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' # Code to be used in simple link tests lt_simple_link_test_code="$lt_simple_compile_test_code" # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_GCC=$GCC GCC= CC=${RC-"windres"} compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes if test -n "$compiler"; then : _LT_CONFIG($1) fi GCC=$lt_save_GCC AC_LANG_RESTORE CC="$lt_save_CC" ])# _LT_LANG_RC_CONFIG # LT_PROG_GCJ # ----------- AC_DEFUN([LT_PROG_GCJ], [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], [AC_CHECK_TOOL(GCJ, gcj,) test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" AC_SUBST(GCJFLAGS)])])[]dnl ]) # Old name: AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_GCJ], []) # LT_PROG_RC # ---------- AC_DEFUN([LT_PROG_RC], [AC_CHECK_TOOL(RC, windres,) ]) # Old name: AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_RC], []) # _LT_DECL_EGREP # -------------- # If we don't have a new enough Autoconf to choose the best grep # available, choose the one first in the user's PATH. m4_defun([_LT_DECL_EGREP], [AC_REQUIRE([AC_PROG_EGREP])dnl AC_REQUIRE([AC_PROG_FGREP])dnl test -z "$GREP" && GREP=grep _LT_DECL([], [GREP], [1], [A grep program that handles long lines]) _LT_DECL([], [EGREP], [1], [An ERE matcher]) _LT_DECL([], [FGREP], [1], [A literal string matcher]) dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too AC_SUBST([GREP]) ]) # _LT_DECL_OBJDUMP # -------------- # If we don't have a new enough Autoconf to choose the best objdump # available, choose the one first in the user's PATH. m4_defun([_LT_DECL_OBJDUMP], [AC_CHECK_TOOL(OBJDUMP, objdump, false) test -z "$OBJDUMP" && OBJDUMP=objdump _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) AC_SUBST([OBJDUMP]) ]) # _LT_DECL_SED # ------------ # Check for a fully-functional sed program, that truncates # as few characters as possible. Prefer GNU sed if found. m4_defun([_LT_DECL_SED], [AC_PROG_SED test -z "$SED" && SED=sed Xsed="$SED -e 1s/^X//" _LT_DECL([], [SED], [1], [A sed program that does not truncate output]) _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], [Sed that helps us avoid accidentally triggering echo(1) options like -n]) ])# _LT_DECL_SED m4_ifndef([AC_PROG_SED], [ ############################################################ # NOTE: This macro has been submitted for inclusion into # # GNU Autoconf as AC_PROG_SED. When it is available in # # a released version of Autoconf we should remove this # # macro and use it instead. # ############################################################ m4_defun([AC_PROG_SED], [AC_MSG_CHECKING([for a sed that does not truncate output]) AC_CACHE_VAL(lt_cv_path_SED, [# Loop through the user's path and test for sed and gsed. # Then use that list of sed's as ones to test for truncation. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for lt_ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" fi done done done IFS=$as_save_IFS lt_ac_max=0 lt_ac_count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris # along with /bin/sed that truncates output. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do test ! -f $lt_ac_sed && continue cat /dev/null > conftest.in lt_ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >conftest.in # Check for GNU sed and select it if it is found. if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then lt_cv_path_SED=$lt_ac_sed break fi while true; do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo >>conftest.nl $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break cmp -s conftest.out conftest.nl || break # 10000 chars as input seems more than enough test $lt_ac_count -gt 10 && break lt_ac_count=`expr $lt_ac_count + 1` if test $lt_ac_count -gt $lt_ac_max; then lt_ac_max=$lt_ac_count lt_cv_path_SED=$lt_ac_sed fi done done ]) SED=$lt_cv_path_SED AC_SUBST([SED]) AC_MSG_RESULT([$SED]) ])#AC_PROG_SED ])#m4_ifndef # Old name: AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_SED], []) # _LT_CHECK_SHELL_FEATURES # ------------------------ # Find out whether the shell is Bourne or XSI compatible, # or has some other useful features. m4_defun([_LT_CHECK_SHELL_FEATURES], [AC_MSG_CHECKING([whether the shell understands some XSI constructs]) # Try some XSI features xsi_shell=no ( _lt_dummy="a/b/c" test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ = c,a/b,, \ && eval 'test $(( 1 + 1 )) -eq 2 \ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ && xsi_shell=yes AC_MSG_RESULT([$xsi_shell]) _LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) AC_MSG_CHECKING([whether the shell understands "+="]) lt_shell_append=no ( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ >/dev/null 2>&1 \ && lt_shell_append=yes AC_MSG_RESULT([$lt_shell_append]) _LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else lt_unset=false fi _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl # test EBCDIC or ASCII case `echo X|tr X '\101'` in A) # ASCII based system # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr lt_SP2NL='tr \040 \012' lt_NL2SP='tr \015\012 \040\040' ;; *) # EBCDIC based system lt_SP2NL='tr \100 \n' lt_NL2SP='tr \r\n \100\100' ;; esac _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl ])# _LT_CHECK_SHELL_FEATURES # _LT_PROG_XSI_SHELLFNS # --------------------- # Bourne and XSI compatible variants of some useful shell functions. m4_defun([_LT_PROG_XSI_SHELLFNS], [case $xsi_shell in yes) cat << \_LT_EOF >> "$cfgfile" # func_dirname file append nondir_replacement # Compute the dirname of FILE. If nonempty, add APPEND to the result, # otherwise set result to NONDIR_REPLACEMENT. func_dirname () { case ${1} in */*) func_dirname_result="${1%/*}${2}" ;; * ) func_dirname_result="${3}" ;; esac } # func_basename file func_basename () { func_basename_result="${1##*/}" } # func_dirname_and_basename file append nondir_replacement # perform func_basename and func_dirname in a single function # call: # dirname: Compute the dirname of FILE. If nonempty, # add APPEND to the result, otherwise set result # to NONDIR_REPLACEMENT. # value returned in "$func_dirname_result" # basename: Compute filename of FILE. # value retuned in "$func_basename_result" # Implementation must be kept synchronized with func_dirname # and func_basename. For efficiency, we do not delegate to # those functions but instead duplicate the functionality here. func_dirname_and_basename () { case ${1} in */*) func_dirname_result="${1%/*}${2}" ;; * ) func_dirname_result="${3}" ;; esac func_basename_result="${1##*/}" } # func_stripname prefix suffix name # strip PREFIX and SUFFIX off of NAME. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). func_stripname () { # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are # positional parameters, so assign one to ordinary parameter first. func_stripname_result=${3} func_stripname_result=${func_stripname_result#"${1}"} func_stripname_result=${func_stripname_result%"${2}"} } # func_opt_split func_opt_split () { func_opt_split_opt=${1%%=*} func_opt_split_arg=${1#*=} } # func_lo2o object func_lo2o () { case ${1} in *.lo) func_lo2o_result=${1%.lo}.${objext} ;; *) func_lo2o_result=${1} ;; esac } # func_xform libobj-or-source func_xform () { func_xform_result=${1%.*}.lo } # func_arith arithmetic-term... func_arith () { func_arith_result=$(( $[*] )) } # func_len string # STRING may not start with a hyphen. func_len () { func_len_result=${#1} } _LT_EOF ;; *) # Bourne compatible functions. cat << \_LT_EOF >> "$cfgfile" # func_dirname file append nondir_replacement # Compute the dirname of FILE. If nonempty, add APPEND to the result, # otherwise set result to NONDIR_REPLACEMENT. func_dirname () { # Extract subdirectory from the argument. func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` if test "X$func_dirname_result" = "X${1}"; then func_dirname_result="${3}" else func_dirname_result="$func_dirname_result${2}" fi } # func_basename file func_basename () { func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` } dnl func_dirname_and_basename dnl A portable version of this function is already defined in general.m4sh dnl so there is no need for it here. # func_stripname prefix suffix name # strip PREFIX and SUFFIX off of NAME. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). # func_strip_suffix prefix name func_stripname () { case ${2} in .*) func_stripname_result=`$ECHO "X${3}" \ | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;; *) func_stripname_result=`$ECHO "X${3}" \ | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;; esac } # sed scripts: my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q' my_sed_long_arg='1s/^-[[^=]]*=//' # func_opt_split func_opt_split () { func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"` func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"` } # func_lo2o object func_lo2o () { func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"` } # func_xform libobj-or-source func_xform () { func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'` } # func_arith arithmetic-term... func_arith () { func_arith_result=`expr "$[@]"` } # func_len string # STRING may not start with a hyphen. func_len () { func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len` } _LT_EOF esac case $lt_shell_append in yes) cat << \_LT_EOF >> "$cfgfile" # func_append var value # Append VALUE to the end of shell variable VAR. func_append () { eval "$[1]+=\$[2]" } _LT_EOF ;; *) cat << \_LT_EOF >> "$cfgfile" # func_append var value # Append VALUE to the end of shell variable VAR. func_append () { eval "$[1]=\$$[1]\$[2]" } _LT_EOF ;; esac ]) djview4/config/ltmain.sh000077500000000000000000007333771174072760700155610ustar00rootroot00000000000000# Generated from ltmain.m4sh. # ltmain.sh (GNU libtool) 2.2.6b # Written by Gordon Matzigkeit , 1996 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007 2008 Free Software Foundation, Inc. # This is free software; see the source for copying conditions. There is NO # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # GNU Libtool is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with GNU Libtool; see the file COPYING. If not, a copy # can be downloaded from http://www.gnu.org/licenses/gpl.html, # or obtained by writing to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # Usage: $progname [OPTION]... [MODE-ARG]... # # Provide generalized library-building support services. # # --config show all configuration variables # --debug enable verbose shell tracing # -n, --dry-run display commands without modifying any files # --features display basic configuration information and exit # --mode=MODE use operation mode MODE # --preserve-dup-deps don't remove duplicate dependency libraries # --quiet, --silent don't print informational messages # --tag=TAG use configuration variables from tag TAG # -v, --verbose print informational messages (default) # --version print version information # -h, --help print short or long help message # # MODE must be one of the following: # # clean remove files from the build directory # compile compile a source file into a libtool object # execute automatically set library path, then run a program # finish complete the installation of libtool libraries # install install libraries or executables # link create a library or an executable # uninstall remove libraries from an installed directory # # MODE-ARGS vary depending on the MODE. # Try `$progname --help --mode=MODE' for a more detailed description of MODE. # # When reporting a bug, please describe a test case to reproduce it and # include the following information: # # host-triplet: $host # shell: $SHELL # compiler: $LTCC # compiler flags: $LTCFLAGS # linker: $LD (gnu? $with_gnu_ld) # $progname: (GNU libtool) 2.2.6b Debian-2.2.6b-2 # automake: $automake_version # autoconf: $autoconf_version # # Report bugs to . PROGRAM=ltmain.sh PACKAGE=libtool VERSION="2.2.6b Debian-2.2.6b-2" TIMESTAMP="" package_revision=1.3017 # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac fi BIN_SH=xpg4; export BIN_SH # for Tru64 DUALCASE=1; export DUALCASE # for MKS sh # NLS nuisances: We save the old values to restore during execute mode. # Only set LANG and LC_ALL to C if already set. # These must not be set unconditionally because not all systems understand # e.g. LANG=C (notably SCO). lt_user_locale= lt_safe_locale= for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do eval "if test \"\${$lt_var+set}\" = set; then save_$lt_var=\$$lt_var $lt_var=C export $lt_var lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\" lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\" fi" done $lt_unset CDPATH : ${CP="cp -f"} : ${ECHO="echo"} : ${EGREP="/bin/grep -E"} : ${FGREP="/bin/grep -F"} : ${GREP="/bin/grep"} : ${LN_S="ln -s"} : ${MAKE="make"} : ${MKDIR="mkdir"} : ${MV="mv -f"} : ${RM="rm -f"} : ${SED="/bin/sed"} : ${SHELL="${CONFIG_SHELL-/bin/sh}"} : ${Xsed="$SED -e 1s/^X//"} # Global variables: EXIT_SUCCESS=0 EXIT_FAILURE=1 EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing. EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake. exit_status=$EXIT_SUCCESS # Make sure IFS has a sensible default lt_nl=' ' IFS=" $lt_nl" dirname="s,/[^/]*$,," basename="s,^.*/,," # func_dirname_and_basename file append nondir_replacement # perform func_basename and func_dirname in a single function # call: # dirname: Compute the dirname of FILE. If nonempty, # add APPEND to the result, otherwise set result # to NONDIR_REPLACEMENT. # value returned in "$func_dirname_result" # basename: Compute filename of FILE. # value retuned in "$func_basename_result" # Implementation must be kept synchronized with func_dirname # and func_basename. For efficiency, we do not delegate to # those functions but instead duplicate the functionality here. func_dirname_and_basename () { # Extract subdirectory from the argument. func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` if test "X$func_dirname_result" = "X${1}"; then func_dirname_result="${3}" else func_dirname_result="$func_dirname_result${2}" fi func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` } # Generated shell functions inserted here. # Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh # is ksh but when the shell is invoked as "sh" and the current value of # the _XPG environment variable is not equal to 1 (one), the special # positional parameter $0, within a function call, is the name of the # function. progpath="$0" # The name of this program: # In the unlikely event $progname began with a '-', it would play havoc with # func_echo (imagine progname=-n), so we prepend ./ in that case: func_dirname_and_basename "$progpath" progname=$func_basename_result case $progname in -*) progname=./$progname ;; esac # Make sure we have an absolute path for reexecution: case $progpath in [\\/]*|[A-Za-z]:\\*) ;; *[\\/]*) progdir=$func_dirname_result progdir=`cd "$progdir" && pwd` progpath="$progdir/$progname" ;; *) save_IFS="$IFS" IFS=: for progdir in $PATH; do IFS="$save_IFS" test -x "$progdir/$progname" && break done IFS="$save_IFS" test -n "$progdir" || progdir=`pwd` progpath="$progdir/$progname" ;; esac # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. Xsed="${SED}"' -e 1s/^X//' sed_quote_subst='s/\([`"$\\]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\(["`\\]\)/\\\1/g' # Re-`\' parameter expansions in output of double_quote_subst that were # `\'-ed in input to the same. If an odd number of `\' preceded a '$' # in input to double_quote_subst, that '$' was protected from expansion. # Since each input `\' is now two `\'s, look for any number of runs of # four `\'s followed by two `\'s and then a '$'. `\' that '$'. bs='\\' bs2='\\\\' bs4='\\\\\\\\' dollar='\$' sed_double_backslash="\ s/$bs4/&\\ /g s/^$bs2$dollar/$bs&/ s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g s/\n//g" # Standard options: opt_dry_run=false opt_help=false opt_quiet=false opt_verbose=false opt_warning=: # func_echo arg... # Echo program name prefixed message, along with the current mode # name if it has been set yet. func_echo () { $ECHO "$progname${mode+: }$mode: $*" } # func_verbose arg... # Echo program name prefixed message in verbose mode only. func_verbose () { $opt_verbose && func_echo ${1+"$@"} # A bug in bash halts the script if the last line of a function # fails when set -e is in force, so we need another command to # work around that: : } # func_error arg... # Echo program name prefixed message to standard error. func_error () { $ECHO "$progname${mode+: }$mode: "${1+"$@"} 1>&2 } # func_warning arg... # Echo program name prefixed warning message to standard error. func_warning () { $opt_warning && $ECHO "$progname${mode+: }$mode: warning: "${1+"$@"} 1>&2 # bash bug again: : } # func_fatal_error arg... # Echo program name prefixed message to standard error, and exit. func_fatal_error () { func_error ${1+"$@"} exit $EXIT_FAILURE } # func_fatal_help arg... # Echo program name prefixed message to standard error, followed by # a help hint, and exit. func_fatal_help () { func_error ${1+"$@"} func_fatal_error "$help" } help="Try \`$progname --help' for more information." ## default # func_grep expression filename # Check whether EXPRESSION matches any line of FILENAME, without output. func_grep () { $GREP "$1" "$2" >/dev/null 2>&1 } # func_mkdir_p directory-path # Make sure the entire path to DIRECTORY-PATH is available. func_mkdir_p () { my_directory_path="$1" my_dir_list= if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then # Protect directory names starting with `-' case $my_directory_path in -*) my_directory_path="./$my_directory_path" ;; esac # While some portion of DIR does not yet exist... while test ! -d "$my_directory_path"; do # ...make a list in topmost first order. Use a colon delimited # list incase some portion of path contains whitespace. my_dir_list="$my_directory_path:$my_dir_list" # If the last portion added has no slash in it, the list is done case $my_directory_path in */*) ;; *) break ;; esac # ...otherwise throw away the child directory and loop my_directory_path=`$ECHO "X$my_directory_path" | $Xsed -e "$dirname"` done my_dir_list=`$ECHO "X$my_dir_list" | $Xsed -e 's,:*$,,'` save_mkdir_p_IFS="$IFS"; IFS=':' for my_dir in $my_dir_list; do IFS="$save_mkdir_p_IFS" # mkdir can fail with a `File exist' error if two processes # try to create one of the directories concurrently. Don't # stop in that case! $MKDIR "$my_dir" 2>/dev/null || : done IFS="$save_mkdir_p_IFS" # Bail out if we (or some other process) failed to create a directory. test -d "$my_directory_path" || \ func_fatal_error "Failed to create \`$1'" fi } # func_mktempdir [string] # Make a temporary directory that won't clash with other running # libtool processes, and avoids race conditions if possible. If # given, STRING is the basename for that directory. func_mktempdir () { my_template="${TMPDIR-/tmp}/${1-$progname}" if test "$opt_dry_run" = ":"; then # Return a directory name, but don't create it in dry-run mode my_tmpdir="${my_template}-$$" else # If mktemp works, use that first and foremost my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null` if test ! -d "$my_tmpdir"; then # Failing that, at least try and use $RANDOM to avoid a race my_tmpdir="${my_template}-${RANDOM-0}$$" save_mktempdir_umask=`umask` umask 0077 $MKDIR "$my_tmpdir" umask $save_mktempdir_umask fi # If we're not in dry-run mode, bomb out on failure test -d "$my_tmpdir" || \ func_fatal_error "cannot create temporary directory \`$my_tmpdir'" fi $ECHO "X$my_tmpdir" | $Xsed } # func_quote_for_eval arg # Aesthetically quote ARG to be evaled later. # This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT # is double-quoted, suitable for a subsequent eval, whereas # FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters # which are still active within double quotes backslashified. func_quote_for_eval () { case $1 in *[\\\`\"\$]*) func_quote_for_eval_unquoted_result=`$ECHO "X$1" | $Xsed -e "$sed_quote_subst"` ;; *) func_quote_for_eval_unquoted_result="$1" ;; esac case $func_quote_for_eval_unquoted_result in # Double-quote args containing shell metacharacters to delay # word splitting, command substitution and and variable # expansion for a subsequent eval. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\"" ;; *) func_quote_for_eval_result="$func_quote_for_eval_unquoted_result" esac } # func_quote_for_expand arg # Aesthetically quote ARG to be evaled later; same as above, # but do not quote variable references. func_quote_for_expand () { case $1 in *[\\\`\"]*) my_arg=`$ECHO "X$1" | $Xsed \ -e "$double_quote_subst" -e "$sed_double_backslash"` ;; *) my_arg="$1" ;; esac case $my_arg in # Double-quote args containing shell metacharacters to delay # word splitting and command substitution for a subsequent eval. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") my_arg="\"$my_arg\"" ;; esac func_quote_for_expand_result="$my_arg" } # func_show_eval cmd [fail_exp] # Unless opt_silent is true, then output CMD. Then, if opt_dryrun is # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP # is given, then evaluate it. func_show_eval () { my_cmd="$1" my_fail_exp="${2-:}" ${opt_silent-false} || { func_quote_for_expand "$my_cmd" eval "func_echo $func_quote_for_expand_result" } if ${opt_dry_run-false}; then :; else eval "$my_cmd" my_status=$? if test "$my_status" -eq 0; then :; else eval "(exit $my_status); $my_fail_exp" fi fi } # func_show_eval_locale cmd [fail_exp] # Unless opt_silent is true, then output CMD. Then, if opt_dryrun is # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP # is given, then evaluate it. Use the saved locale for evaluation. func_show_eval_locale () { my_cmd="$1" my_fail_exp="${2-:}" ${opt_silent-false} || { func_quote_for_expand "$my_cmd" eval "func_echo $func_quote_for_expand_result" } if ${opt_dry_run-false}; then :; else eval "$lt_user_locale $my_cmd" my_status=$? eval "$lt_safe_locale" if test "$my_status" -eq 0; then :; else eval "(exit $my_status); $my_fail_exp" fi fi } # func_version # Echo version message to standard output and exit. func_version () { $SED -n '/^# '$PROGRAM' (GNU /,/# warranty; / { s/^# // s/^# *$// s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/ p }' < "$progpath" exit $? } # func_usage # Echo short help message to standard output and exit. func_usage () { $SED -n '/^# Usage:/,/# -h/ { s/^# // s/^# *$// s/\$progname/'$progname'/ p }' < "$progpath" $ECHO $ECHO "run \`$progname --help | more' for full usage" exit $? } # func_help # Echo long help message to standard output and exit. func_help () { $SED -n '/^# Usage:/,/# Report bugs to/ { s/^# // s/^# *$// s*\$progname*'$progname'* s*\$host*'"$host"'* s*\$SHELL*'"$SHELL"'* s*\$LTCC*'"$LTCC"'* s*\$LTCFLAGS*'"$LTCFLAGS"'* s*\$LD*'"$LD"'* s/\$with_gnu_ld/'"$with_gnu_ld"'/ s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/ s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/ p }' < "$progpath" exit $? } # func_missing_arg argname # Echo program name prefixed message to standard error and set global # exit_cmd. func_missing_arg () { func_error "missing argument for $1" exit_cmd=exit } exit_cmd=: # Check that we have a working $ECHO. if test "X$1" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test "X$1" = X--fallback-echo; then # Avoid inline document here, it may be left over : elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t'; then # Yippee, $ECHO works! : else # Restart under the correct shell, and then maybe $ECHO will work. exec $SHELL "$progpath" --no-reexec ${1+"$@"} fi if test "X$1" = X--fallback-echo; then # used as fallback echo shift cat </dev/null 2>&1; then taglist="$taglist $tagname" # Evaluate the configuration. Be careful to quote the path # and the sed script, to avoid splitting on whitespace, but # also don't use non-portable quotes within backquotes within # quotes we have to do it in 2 steps: extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"` eval "$extractedcf" else func_error "ignoring unknown tag $tagname" fi ;; esac } # Parse options once, thoroughly. This comes as soon as possible in # the script to make things like `libtool --version' happen quickly. { # Shorthand for --mode=foo, only valid as the first argument case $1 in clean|clea|cle|cl) shift; set dummy --mode clean ${1+"$@"}; shift ;; compile|compil|compi|comp|com|co|c) shift; set dummy --mode compile ${1+"$@"}; shift ;; execute|execut|execu|exec|exe|ex|e) shift; set dummy --mode execute ${1+"$@"}; shift ;; finish|finis|fini|fin|fi|f) shift; set dummy --mode finish ${1+"$@"}; shift ;; install|instal|insta|inst|ins|in|i) shift; set dummy --mode install ${1+"$@"}; shift ;; link|lin|li|l) shift; set dummy --mode link ${1+"$@"}; shift ;; uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) shift; set dummy --mode uninstall ${1+"$@"}; shift ;; esac # Parse non-mode specific arguments: while test "$#" -gt 0; do opt="$1" shift case $opt in --config) func_config ;; --debug) preserve_args="$preserve_args $opt" func_echo "enabling shell trace mode" opt_debug='set -x' $opt_debug ;; -dlopen) test "$#" -eq 0 && func_missing_arg "$opt" && break execute_dlfiles="$execute_dlfiles $1" shift ;; --dry-run | -n) opt_dry_run=: ;; --features) func_features ;; --finish) mode="finish" ;; --mode) test "$#" -eq 0 && func_missing_arg "$opt" && break case $1 in # Valid mode arguments: clean) ;; compile) ;; execute) ;; finish) ;; install) ;; link) ;; relink) ;; uninstall) ;; # Catch anything else as an error *) func_error "invalid argument for $opt" exit_cmd=exit break ;; esac mode="$1" shift ;; --preserve-dup-deps) opt_duplicate_deps=: ;; --quiet|--silent) preserve_args="$preserve_args $opt" opt_silent=: ;; --verbose| -v) preserve_args="$preserve_args $opt" opt_silent=false ;; --tag) test "$#" -eq 0 && func_missing_arg "$opt" && break preserve_args="$preserve_args $opt $1" func_enable_tag "$1" # tagname is set here shift ;; # Separate optargs to long options: -dlopen=*|--mode=*|--tag=*) func_opt_split "$opt" set dummy "$func_opt_split_opt" "$func_opt_split_arg" ${1+"$@"} shift ;; -\?|-h) func_usage ;; --help) opt_help=: ;; --version) func_version ;; -*) func_fatal_help "unrecognized option \`$opt'" ;; *) nonopt="$opt" break ;; esac done case $host in *cygwin* | *mingw* | *pw32* | *cegcc*) # don't eliminate duplications in $postdeps and $predeps opt_duplicate_compiler_generated_deps=: ;; *) opt_duplicate_compiler_generated_deps=$opt_duplicate_deps ;; esac # Having warned about all mis-specified options, bail out if # anything was wrong. $exit_cmd $EXIT_FAILURE } # func_check_version_match # Ensure that we are using m4 macros, and libtool script from the same # release of libtool. func_check_version_match () { if test "$package_revision" != "$macro_revision"; then if test "$VERSION" != "$macro_version"; then if test -z "$macro_version"; then cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, but the $progname: definition of this LT_INIT comes from an older release. $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION $progname: and run autoconf again. _LT_EOF else cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, but the $progname: definition of this LT_INIT comes from $PACKAGE $macro_version. $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION $progname: and run autoconf again. _LT_EOF fi else cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, $progname: but the definition of this LT_INIT comes from revision $macro_revision. $progname: You should recreate aclocal.m4 with macros from revision $package_revision $progname: of $PACKAGE $VERSION and run autoconf again. _LT_EOF fi exit $EXIT_MISMATCH fi } ## ----------- ## ## Main. ## ## ----------- ## $opt_help || { # Sanity checks first: func_check_version_match if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then func_fatal_configuration "not configured to build any kind of library" fi test -z "$mode" && func_fatal_error "error: you must specify a MODE." # Darwin sucks eval std_shrext=\"$shrext_cmds\" # Only execute mode is allowed to have -dlopen flags. if test -n "$execute_dlfiles" && test "$mode" != execute; then func_error "unrecognized option \`-dlopen'" $ECHO "$help" 1>&2 exit $EXIT_FAILURE fi # Change the help message to a mode-specific one. generic_help="$help" help="Try \`$progname --help --mode=$mode' for more information." } # func_lalib_p file # True iff FILE is a libtool `.la' library or `.lo' object file. # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_lalib_p () { test -f "$1" && $SED -e 4q "$1" 2>/dev/null \ | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 } # func_lalib_unsafe_p file # True iff FILE is a libtool `.la' library or `.lo' object file. # This function implements the same check as func_lalib_p without # resorting to external programs. To this end, it redirects stdin and # closes it afterwards, without saving the original file descriptor. # As a safety measure, use it only where a negative result would be # fatal anyway. Works if `file' does not exist. func_lalib_unsafe_p () { lalib_p=no if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then for lalib_p_l in 1 2 3 4 do read lalib_p_line case "$lalib_p_line" in \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;; esac done exec 0<&5 5<&- fi test "$lalib_p" = yes } # func_ltwrapper_script_p file # True iff FILE is a libtool wrapper script # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_script_p () { func_lalib_p "$1" } # func_ltwrapper_executable_p file # True iff FILE is a libtool wrapper executable # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_executable_p () { func_ltwrapper_exec_suffix= case $1 in *.exe) ;; *) func_ltwrapper_exec_suffix=.exe ;; esac $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1 } # func_ltwrapper_scriptname file # Assumes file is an ltwrapper_executable # uses $file to determine the appropriate filename for a # temporary ltwrapper_script. func_ltwrapper_scriptname () { func_ltwrapper_scriptname_result="" if func_ltwrapper_executable_p "$1"; then func_dirname_and_basename "$1" "" "." func_stripname '' '.exe' "$func_basename_result" func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper" fi } # func_ltwrapper_p file # True iff FILE is a libtool wrapper script or wrapper executable # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_p () { func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1" } # func_execute_cmds commands fail_cmd # Execute tilde-delimited COMMANDS. # If FAIL_CMD is given, eval that upon failure. # FAIL_CMD may read-access the current command in variable CMD! func_execute_cmds () { $opt_debug save_ifs=$IFS; IFS='~' for cmd in $1; do IFS=$save_ifs eval cmd=\"$cmd\" func_show_eval "$cmd" "${2-:}" done IFS=$save_ifs } # func_source file # Source FILE, adding directory component if necessary. # Note that it is not necessary on cygwin/mingw to append a dot to # FILE even if both FILE and FILE.exe exist: automatic-append-.exe # behavior happens only for exec(3), not for open(2)! Also, sourcing # `FILE.' does not work on cygwin managed mounts. func_source () { $opt_debug case $1 in */* | *\\*) . "$1" ;; *) . "./$1" ;; esac } # func_infer_tag arg # Infer tagged configuration to use if any are available and # if one wasn't chosen via the "--tag" command line option. # Only attempt this if the compiler in the base compile # command doesn't match the default compiler. # arg is usually of the form 'gcc ...' func_infer_tag () { $opt_debug if test -n "$available_tags" && test -z "$tagname"; then CC_quoted= for arg in $CC; do func_quote_for_eval "$arg" CC_quoted="$CC_quoted $func_quote_for_eval_result" done case $@ in # Blanks in the command may have been stripped by the calling shell, # but not from the CC environment variable when configure was run. " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*) ;; # Blanks at the start of $base_compile will cause this to fail # if we don't check for them as well. *) for z in $available_tags; do if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then # Evaluate the configuration. eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" CC_quoted= for arg in $CC; do # Double-quote args containing other shell metacharacters. func_quote_for_eval "$arg" CC_quoted="$CC_quoted $func_quote_for_eval_result" done case "$@ " in " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*) # The compiler in the base compile command matches # the one in the tagged configuration. # Assume this is the tagged configuration we want. tagname=$z break ;; esac fi done # If $tagname still isn't set, then no tagged configuration # was found and let the user know that the "--tag" command # line option must be used. if test -z "$tagname"; then func_echo "unable to infer tagged configuration" func_fatal_error "specify a tag with \`--tag'" # else # func_verbose "using $tagname tagged configuration" fi ;; esac fi } # func_write_libtool_object output_name pic_name nonpic_name # Create a libtool object file (analogous to a ".la" file), # but don't create it if we're doing a dry run. func_write_libtool_object () { write_libobj=${1} if test "$build_libtool_libs" = yes; then write_lobj=\'${2}\' else write_lobj=none fi if test "$build_old_libs" = yes; then write_oldobj=\'${3}\' else write_oldobj=none fi $opt_dry_run || { cat >${write_libobj}T <?"'"'"' &()|`$[]' \ && func_warning "libobj name \`$libobj' may not contain shell special characters." func_dirname_and_basename "$obj" "/" "" objname="$func_basename_result" xdir="$func_dirname_result" lobj=${xdir}$objdir/$objname test -z "$base_compile" && \ func_fatal_help "you must specify a compilation command" # Delete any leftover library objects. if test "$build_old_libs" = yes; then removelist="$obj $lobj $libobj ${libobj}T" else removelist="$lobj $libobj ${libobj}T" fi # On Cygwin there's no "real" PIC flag so we must build both object types case $host_os in cygwin* | mingw* | pw32* | os2* | cegcc*) pic_mode=default ;; esac if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then # non-PIC code in shared libraries is not supported pic_mode=default fi # Calculate the filename of the output object if compiler does # not support -o with -c if test "$compiler_c_o" = no; then output_obj=`$ECHO "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext} lockfile="$output_obj.lock" else output_obj= need_locks=no lockfile= fi # Lock this critical section if it is needed # We use this script file to make the link, it avoids creating a new file if test "$need_locks" = yes; then until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do func_echo "Waiting for $lockfile to be removed" sleep 2 done elif test "$need_locks" = warn; then if test -f "$lockfile"; then $ECHO "\ *** ERROR, $lockfile exists and contains: `cat $lockfile 2>/dev/null` This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi removelist="$removelist $output_obj" $ECHO "$srcfile" > "$lockfile" fi $opt_dry_run || $RM $removelist removelist="$removelist $lockfile" trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15 if test -n "$fix_srcfile_path"; then eval srcfile=\"$fix_srcfile_path\" fi func_quote_for_eval "$srcfile" qsrcfile=$func_quote_for_eval_result # Only build a PIC object if we are building libtool libraries. if test "$build_libtool_libs" = yes; then # Without this assignment, base_compile gets emptied. fbsd_hideous_sh_bug=$base_compile if test "$pic_mode" != no; then command="$base_compile $qsrcfile $pic_flag" else # Don't build PIC code command="$base_compile $qsrcfile" fi func_mkdir_p "$xdir$objdir" if test -z "$output_obj"; then # Place PIC objects in $objdir command="$command -o $lobj" fi func_show_eval_locale "$command" \ 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE' if test "$need_locks" = warn && test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then $ECHO "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi # Just move the object if needed, then go on to compile the next one if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then func_show_eval '$MV "$output_obj" "$lobj"' \ 'error=$?; $opt_dry_run || $RM $removelist; exit $error' fi # Allow error messages only from the first compilation. if test "$suppress_opt" = yes; then suppress_output=' >/dev/null 2>&1' fi fi # Only build a position-dependent object if we build old libraries. if test "$build_old_libs" = yes; then if test "$pic_mode" != yes; then # Don't build PIC code command="$base_compile $qsrcfile$pie_flag" else command="$base_compile $qsrcfile $pic_flag" fi if test "$compiler_c_o" = yes; then command="$command -o $obj" fi # Suppress compiler output if we already did a PIC compilation. command="$command$suppress_output" func_show_eval_locale "$command" \ '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' if test "$need_locks" = warn && test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then $ECHO "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi # Just move the object if needed if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then func_show_eval '$MV "$output_obj" "$obj"' \ 'error=$?; $opt_dry_run || $RM $removelist; exit $error' fi fi $opt_dry_run || { func_write_libtool_object "$libobj" "$objdir/$objname" "$objname" # Unlock the critical section if it was locked if test "$need_locks" != no; then removelist=$lockfile $RM "$lockfile" fi } exit $EXIT_SUCCESS } $opt_help || { test "$mode" = compile && func_mode_compile ${1+"$@"} } func_mode_help () { # We need to display help for each of the modes. case $mode in "") # Generic help is extracted from the usage comments # at the start of this file. func_help ;; clean) $ECHO \ "Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE... Remove files from the build directory. RM is the name of the program to use to delete files associated with each FILE (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed to RM. If FILE is a libtool library, object or program, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; compile) $ECHO \ "Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE Compile a source file into a libtool library object. This mode accepts the following additional options: -o OUTPUT-FILE set the output file name to OUTPUT-FILE -no-suppress do not suppress compiler output for multiple passes -prefer-pic try to building PIC objects only -prefer-non-pic try to building non-PIC objects only -shared do not build a \`.o' file suitable for static linking -static only build a \`.o' file suitable for static linking COMPILE-COMMAND is a command to be used in creating a \`standard' object file from the given SOURCEFILE. The output file name is determined by removing the directory component from SOURCEFILE, then substituting the C source code suffix \`.c' with the library object suffix, \`.lo'." ;; execute) $ECHO \ "Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]... Automatically set library path, then run a program. This mode accepts the following additional options: -dlopen FILE add the directory containing FILE to the library path This mode sets the library path environment variable according to \`-dlopen' flags. If any of the ARGS are libtool executable wrappers, then they are translated into their corresponding uninstalled binary, and any of their required library directories are added to the library path. Then, COMMAND is executed, with ARGS as arguments." ;; finish) $ECHO \ "Usage: $progname [OPTION]... --mode=finish [LIBDIR]... Complete the installation of libtool libraries. Each LIBDIR is a directory that contains libtool libraries. The commands that this mode executes may require superuser privileges. Use the \`--dry-run' option if you just want to see what would be executed." ;; install) $ECHO \ "Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND... Install executables or libraries. INSTALL-COMMAND is the installation command. The first component should be either the \`install' or \`cp' program. The following components of INSTALL-COMMAND are treated specially: -inst-prefix PREFIX-DIR Use PREFIX-DIR as a staging area for installation The rest of the components are interpreted as arguments to that command (only BSD-compatible install options are recognized)." ;; link) $ECHO \ "Usage: $progname [OPTION]... --mode=link LINK-COMMAND... Link object files or libraries together to form another library, or to create an executable program. LINK-COMMAND is a command using the C compiler that you would use to create a program from several object files. The following components of LINK-COMMAND are treated specially: -all-static do not do any dynamic linking at all -avoid-version do not add a version suffix if possible -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) -export-symbols SYMFILE try to export only the symbols listed in SYMFILE -export-symbols-regex REGEX try to export only the symbols matching REGEX -LLIBDIR search LIBDIR for required installed libraries -lNAME OUTPUT-FILE requires the installed library libNAME -module build a library that can dlopened -no-fast-install disable the fast-install mode -no-install link a not-installable executable -no-undefined declare that a library does not refer to external symbols -o OUTPUT-FILE create OUTPUT-FILE from the specified objects -objectlist FILE Use a list of object files found in FILE to specify objects -precious-files-regex REGEX don't remove output files matching REGEX -release RELEASE specify package release information -rpath LIBDIR the created library will eventually be installed in LIBDIR -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries -shared only do dynamic linking of libtool libraries -shrext SUFFIX override the standard shared library file extension -static do not do any dynamic linking of uninstalled libtool libraries -static-libtool-libs do not do any dynamic linking of libtool libraries -version-info CURRENT[:REVISION[:AGE]] specify library version info [each variable defaults to 0] -weak LIBNAME declare that the target provides the LIBNAME interface All other options (arguments beginning with \`-') are ignored. Every other argument is treated as a filename. Files ending in \`.la' are treated as uninstalled libtool libraries, other files are standard or library object files. If the OUTPUT-FILE ends in \`.la', then a libtool library is created, only library objects (\`.lo' files) may be specified, and \`-rpath' is required, except when creating a convenience library. If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created using \`ar' and \`ranlib', or on Windows using \`lib'. If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file is created, otherwise an executable program is created." ;; uninstall) $ECHO \ "Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... Remove libraries from an installation directory. RM is the name of the program to use to delete files associated with each FILE (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed to RM. If FILE is a libtool library, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; *) func_fatal_help "invalid operation mode \`$mode'" ;; esac $ECHO $ECHO "Try \`$progname --help' for more information about other modes." exit $? } # Now that we've collected a possible --mode arg, show help if necessary $opt_help && func_mode_help # func_mode_execute arg... func_mode_execute () { $opt_debug # The first argument is the command name. cmd="$nonopt" test -z "$cmd" && \ func_fatal_help "you must specify a COMMAND" # Handle -dlopen flags immediately. for file in $execute_dlfiles; do test -f "$file" \ || func_fatal_help "\`$file' is not a file" dir= case $file in *.la) # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ || func_fatal_help "\`$lib' is not a valid libtool archive" # Read the libtool library. dlname= library_names= func_source "$file" # Skip this library if it cannot be dlopened. if test -z "$dlname"; then # Warn if it was a shared library. test -n "$library_names" && \ func_warning "\`$file' was not linked with \`-export-dynamic'" continue fi func_dirname "$file" "" "." dir="$func_dirname_result" if test -f "$dir/$objdir/$dlname"; then dir="$dir/$objdir" else if test ! -f "$dir/$dlname"; then func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" fi fi ;; *.lo) # Just add the directory containing the .lo file. func_dirname "$file" "" "." dir="$func_dirname_result" ;; *) func_warning "\`-dlopen' is ignored for non-libtool libraries and objects" continue ;; esac # Get the absolute pathname. absdir=`cd "$dir" && pwd` test -n "$absdir" && dir="$absdir" # Now add the directory to shlibpath_var. if eval "test -z \"\$$shlibpath_var\""; then eval "$shlibpath_var=\"\$dir\"" else eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" fi done # This variable tells wrapper scripts just to set shlibpath_var # rather than running their programs. libtool_execute_magic="$magic" # Check if any of the arguments is a wrapper script. args= for file do case $file in -*) ;; *) # Do a test to see if this is really a libtool program. if func_ltwrapper_script_p "$file"; then func_source "$file" # Transform arg to wrapped name. file="$progdir/$program" elif func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" func_source "$func_ltwrapper_scriptname_result" # Transform arg to wrapped name. file="$progdir/$program" fi ;; esac # Quote arguments (to preserve shell metacharacters). func_quote_for_eval "$file" args="$args $func_quote_for_eval_result" done if test "X$opt_dry_run" = Xfalse; then if test -n "$shlibpath_var"; then # Export the shlibpath_var. eval "export $shlibpath_var" fi # Restore saved environment variables for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do eval "if test \"\${save_$lt_var+set}\" = set; then $lt_var=\$save_$lt_var; export $lt_var else $lt_unset $lt_var fi" done # Now prepare to actually exec the command. exec_cmd="\$cmd$args" else # Display what would be done. if test -n "$shlibpath_var"; then eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\"" $ECHO "export $shlibpath_var" fi $ECHO "$cmd$args" exit $EXIT_SUCCESS fi } test "$mode" = execute && func_mode_execute ${1+"$@"} # func_mode_finish arg... func_mode_finish () { $opt_debug libdirs="$nonopt" admincmds= if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then for dir do libdirs="$libdirs $dir" done for libdir in $libdirs; do if test -n "$finish_cmds"; then # Do each command in the finish commands. func_execute_cmds "$finish_cmds" 'admincmds="$admincmds '"$cmd"'"' fi if test -n "$finish_eval"; then # Do the single finish_eval. eval cmds=\"$finish_eval\" $opt_dry_run || eval "$cmds" || admincmds="$admincmds $cmds" fi done fi # Exit here if they wanted silent mode. $opt_silent && exit $EXIT_SUCCESS $ECHO "X----------------------------------------------------------------------" | $Xsed $ECHO "Libraries have been installed in:" for libdir in $libdirs; do $ECHO " $libdir" done $ECHO $ECHO "If you ever happen to want to link against installed libraries" $ECHO "in a given directory, LIBDIR, you must either use libtool, and" $ECHO "specify the full pathname of the library, or use the \`-LLIBDIR'" $ECHO "flag during linking and do at least one of the following:" if test -n "$shlibpath_var"; then $ECHO " - add LIBDIR to the \`$shlibpath_var' environment variable" $ECHO " during execution" fi if test -n "$runpath_var"; then $ECHO " - add LIBDIR to the \`$runpath_var' environment variable" $ECHO " during linking" fi if test -n "$hardcode_libdir_flag_spec"; then libdir=LIBDIR eval flag=\"$hardcode_libdir_flag_spec\" $ECHO " - use the \`$flag' linker flag" fi if test -n "$admincmds"; then $ECHO " - have your system administrator run these commands:$admincmds" fi if test -f /etc/ld.so.conf; then $ECHO " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" fi $ECHO $ECHO "See any operating system documentation about shared libraries for" case $host in solaris2.[6789]|solaris2.1[0-9]) $ECHO "more information, such as the ld(1), crle(1) and ld.so(8) manual" $ECHO "pages." ;; *) $ECHO "more information, such as the ld(1) and ld.so(8) manual pages." ;; esac $ECHO "X----------------------------------------------------------------------" | $Xsed exit $EXIT_SUCCESS } test "$mode" = finish && func_mode_finish ${1+"$@"} # func_mode_install arg... func_mode_install () { $opt_debug # There may be an optional sh(1) argument at the beginning of # install_prog (especially on Windows NT). if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || # Allow the use of GNU shtool's install command. $ECHO "X$nonopt" | $GREP shtool >/dev/null; then # Aesthetically quote it. func_quote_for_eval "$nonopt" install_prog="$func_quote_for_eval_result " arg=$1 shift else install_prog= arg=$nonopt fi # The real first argument should be the name of the installation program. # Aesthetically quote it. func_quote_for_eval "$arg" install_prog="$install_prog$func_quote_for_eval_result" # We need to accept at least all the BSD install flags. dest= files= opts= prev= install_type= isdir=no stripme= for arg do if test -n "$dest"; then files="$files $dest" dest=$arg continue fi case $arg in -d) isdir=yes ;; -f) case " $install_prog " in *[\\\ /]cp\ *) ;; *) prev=$arg ;; esac ;; -g | -m | -o) prev=$arg ;; -s) stripme=" -s" continue ;; -*) ;; *) # If the previous option needed an argument, then skip it. if test -n "$prev"; then prev= else dest=$arg continue fi ;; esac # Aesthetically quote the argument. func_quote_for_eval "$arg" install_prog="$install_prog $func_quote_for_eval_result" done test -z "$install_prog" && \ func_fatal_help "you must specify an install program" test -n "$prev" && \ func_fatal_help "the \`$prev' option requires an argument" if test -z "$files"; then if test -z "$dest"; then func_fatal_help "no file or destination specified" else func_fatal_help "you must specify a destination" fi fi # Strip any trailing slash from the destination. func_stripname '' '/' "$dest" dest=$func_stripname_result # Check to see that the destination is a directory. test -d "$dest" && isdir=yes if test "$isdir" = yes; then destdir="$dest" destname= else func_dirname_and_basename "$dest" "" "." destdir="$func_dirname_result" destname="$func_basename_result" # Not a directory, so check to see that there is only one file specified. set dummy $files; shift test "$#" -gt 1 && \ func_fatal_help "\`$dest' is not a directory" fi case $destdir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) for file in $files; do case $file in *.lo) ;; *) func_fatal_help "\`$destdir' must be an absolute directory name" ;; esac done ;; esac # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic="$magic" staticlibs= future_libdirs= current_libdirs= for file in $files; do # Do each installation. case $file in *.$libext) # Do the static libraries later. staticlibs="$staticlibs $file" ;; *.la) # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ || func_fatal_help "\`$file' is not a valid libtool archive" library_names= old_library= relink_command= func_source "$file" # Add the libdir to current_libdirs if it is the destination. if test "X$destdir" = "X$libdir"; then case "$current_libdirs " in *" $libdir "*) ;; *) current_libdirs="$current_libdirs $libdir" ;; esac else # Note the libdir as a future libdir. case "$future_libdirs " in *" $libdir "*) ;; *) future_libdirs="$future_libdirs $libdir" ;; esac fi func_dirname "$file" "/" "" dir="$func_dirname_result" dir="$dir$objdir" if test -n "$relink_command"; then # Determine the prefix the user has applied to our future dir. inst_prefix_dir=`$ECHO "X$destdir" | $Xsed -e "s%$libdir\$%%"` # Don't allow the user to place us outside of our expected # location b/c this prevents finding dependent libraries that # are installed to the same prefix. # At present, this check doesn't affect windows .dll's that # are installed into $libdir/../bin (currently, that works fine) # but it's something to keep an eye on. test "$inst_prefix_dir" = "$destdir" && \ func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir" if test -n "$inst_prefix_dir"; then # Stick the inst_prefix_dir data into the link command. relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` else relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%%"` fi func_warning "relinking \`$file'" func_show_eval "$relink_command" \ 'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"' fi # See the names of the shared library. set dummy $library_names; shift if test -n "$1"; then realname="$1" shift srcname="$realname" test -n "$relink_command" && srcname="$realname"T # Install the shared library and build the symlinks. func_show_eval "$install_prog $dir/$srcname $destdir/$realname" \ 'exit $?' tstripme="$stripme" case $host_os in cygwin* | mingw* | pw32* | cegcc*) case $realname in *.dll.a) tstripme="" ;; esac ;; esac if test -n "$tstripme" && test -n "$striplib"; then func_show_eval "$striplib $destdir/$realname" 'exit $?' fi if test "$#" -gt 0; then # Delete the old symlinks, and create new ones. # Try `ln -sf' first, because the `ln' binary might depend on # the symlink we replace! Solaris /bin/ln does not understand -f, # so we also need to try rm && ln -s. for linkname do test "$linkname" != "$realname" \ && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })" done fi # Do each command in the postinstall commands. lib="$destdir/$realname" func_execute_cmds "$postinstall_cmds" 'exit $?' fi # Install the pseudo-library for information purposes. func_basename "$file" name="$func_basename_result" instname="$dir/$name"i func_show_eval "$install_prog $instname $destdir/$name" 'exit $?' # Maybe install the static library, too. test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library" ;; *.lo) # Install (i.e. copy) a libtool object. # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile="$destdir/$destname" else func_basename "$file" destfile="$func_basename_result" destfile="$destdir/$destfile" fi # Deduce the name of the destination old-style object file. case $destfile in *.lo) func_lo2o "$destfile" staticdest=$func_lo2o_result ;; *.$objext) staticdest="$destfile" destfile= ;; *) func_fatal_help "cannot copy a libtool object to \`$destfile'" ;; esac # Install the libtool object if requested. test -n "$destfile" && \ func_show_eval "$install_prog $file $destfile" 'exit $?' # Install the old object if enabled. if test "$build_old_libs" = yes; then # Deduce the name of the old-style object file. func_lo2o "$file" staticobj=$func_lo2o_result func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?' fi exit $EXIT_SUCCESS ;; *) # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile="$destdir/$destname" else func_basename "$file" destfile="$func_basename_result" destfile="$destdir/$destfile" fi # If the file is missing, and there is a .exe on the end, strip it # because it is most likely a libtool script we actually want to # install stripped_ext="" case $file in *.exe) if test ! -f "$file"; then func_stripname '' '.exe' "$file" file=$func_stripname_result stripped_ext=".exe" fi ;; esac # Do a test to see if this is really a libtool program. case $host in *cygwin* | *mingw*) if func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" wrapper=$func_ltwrapper_scriptname_result else func_stripname '' '.exe' "$file" wrapper=$func_stripname_result fi ;; *) wrapper=$file ;; esac if func_ltwrapper_script_p "$wrapper"; then notinst_deplibs= relink_command= func_source "$wrapper" # Check the variables that should have been set. test -z "$generated_by_libtool_version" && \ func_fatal_error "invalid libtool wrapper script \`$wrapper'" finalize=yes for lib in $notinst_deplibs; do # Check to see that each library is installed. libdir= if test -f "$lib"; then func_source "$lib" fi libfile="$libdir/"`$ECHO "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test if test -n "$libdir" && test ! -f "$libfile"; then func_warning "\`$lib' has not been installed in \`$libdir'" finalize=no fi done relink_command= func_source "$wrapper" outputname= if test "$fast_install" = no && test -n "$relink_command"; then $opt_dry_run || { if test "$finalize" = yes; then tmpdir=`func_mktempdir` func_basename "$file$stripped_ext" file="$func_basename_result" outputname="$tmpdir/$file" # Replace the output file specification. relink_command=`$ECHO "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'` $opt_silent || { func_quote_for_expand "$relink_command" eval "func_echo $func_quote_for_expand_result" } if eval "$relink_command"; then : else func_error "error: relink \`$file' with the above command before installing it" $opt_dry_run || ${RM}r "$tmpdir" continue fi file="$outputname" else func_warning "cannot relink \`$file'" fi } else # Install the binary that we compiled earlier. file=`$ECHO "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"` fi fi # remove .exe since cygwin /usr/bin/install will append another # one anyway case $install_prog,$host in */usr/bin/install*,*cygwin*) case $file:$destfile in *.exe:*.exe) # this is ok ;; *.exe:*) destfile=$destfile.exe ;; *:*.exe) func_stripname '' '.exe' "$destfile" destfile=$func_stripname_result ;; esac ;; esac func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?' $opt_dry_run || if test -n "$outputname"; then ${RM}r "$tmpdir" fi ;; esac done for file in $staticlibs; do func_basename "$file" name="$func_basename_result" # Set up the ranlib parameters. oldlib="$destdir/$name" func_show_eval "$install_prog \$file \$oldlib" 'exit $?' if test -n "$stripme" && test -n "$old_striplib"; then func_show_eval "$old_striplib $oldlib" 'exit $?' fi # Do each command in the postinstall commands. func_execute_cmds "$old_postinstall_cmds" 'exit $?' done test -n "$future_libdirs" && \ func_warning "remember to run \`$progname --finish$future_libdirs'" if test -n "$current_libdirs"; then # Maybe just do a dry run. $opt_dry_run && current_libdirs=" -n$current_libdirs" exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' else exit $EXIT_SUCCESS fi } test "$mode" = install && func_mode_install ${1+"$@"} # func_generate_dlsyms outputname originator pic_p # Extract symbols from dlprefiles and create ${outputname}S.o with # a dlpreopen symbol table. func_generate_dlsyms () { $opt_debug my_outputname="$1" my_originator="$2" my_pic_p="${3-no}" my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'` my_dlsyms= if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then if test -n "$NM" && test -n "$global_symbol_pipe"; then my_dlsyms="${my_outputname}S.c" else func_error "not configured to extract global symbols from dlpreopened files" fi fi if test -n "$my_dlsyms"; then case $my_dlsyms in "") ;; *.c) # Discover the nlist of each of the dlfiles. nlist="$output_objdir/${my_outputname}.nm" func_show_eval "$RM $nlist ${nlist}S ${nlist}T" # Parse the name list into a source file. func_verbose "creating $output_objdir/$my_dlsyms" $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\ /* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */ /* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */ #ifdef __cplusplus extern \"C\" { #endif /* External symbol declarations for the compiler. */\ " if test "$dlself" = yes; then func_verbose "generating symbol list for \`$output'" $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist" # Add our own program objects to the symbol list. progfiles=`$ECHO "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` for progfile in $progfiles; do func_verbose "extracting global C symbols from \`$progfile'" $opt_dry_run || eval "$NM $progfile | $global_symbol_pipe >> '$nlist'" done if test -n "$exclude_expsyms"; then $opt_dry_run || { eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' } fi if test -n "$export_symbols_regex"; then $opt_dry_run || { eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' } fi # Prepare the list of exported symbols if test -z "$export_symbols"; then export_symbols="$output_objdir/$outputname.exp" $opt_dry_run || { $RM $export_symbols eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' case $host in *cygwin* | *mingw* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' ;; esac } else $opt_dry_run || { eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' case $host in *cygwin | *mingw* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' ;; esac } fi fi for dlprefile in $dlprefiles; do func_verbose "extracting global C symbols from \`$dlprefile'" func_basename "$dlprefile" name="$func_basename_result" $opt_dry_run || { eval '$ECHO ": $name " >> "$nlist"' eval "$NM $dlprefile 2>/dev/null | $global_symbol_pipe >> '$nlist'" } done $opt_dry_run || { # Make sure we have at least an empty file. test -f "$nlist" || : > "$nlist" if test -n "$exclude_expsyms"; then $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T $MV "$nlist"T "$nlist" fi # Try sorting and uniquifying the output. if $GREP -v "^: " < "$nlist" | if sort -k 3 /dev/null 2>&1; then sort -k 3 else sort +2 fi | uniq > "$nlist"S; then : else $GREP -v "^: " < "$nlist" > "$nlist"S fi if test -f "$nlist"S; then eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"' else $ECHO '/* NONE */' >> "$output_objdir/$my_dlsyms" fi $ECHO >> "$output_objdir/$my_dlsyms" "\ /* The mapping between symbol names and symbols. */ typedef struct { const char *name; void *address; } lt_dlsymlist; " case $host in *cygwin* | *mingw* | *cegcc* ) $ECHO >> "$output_objdir/$my_dlsyms" "\ /* DATA imports from DLLs on WIN32 con't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */" lt_dlsym_const= ;; *osf5*) echo >> "$output_objdir/$my_dlsyms" "\ /* This system does not cope well with relocations in const data */" lt_dlsym_const= ;; *) lt_dlsym_const=const ;; esac $ECHO >> "$output_objdir/$my_dlsyms" "\ extern $lt_dlsym_const lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[]; $lt_dlsym_const lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[] = {\ { \"$my_originator\", (void *) 0 }," case $need_lib_prefix in no) eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms" ;; *) eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms" ;; esac $ECHO >> "$output_objdir/$my_dlsyms" "\ {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt_${my_prefix}_LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif\ " } # !$opt_dry_run pic_flag_for_symtable= case "$compile_command " in *" -static "*) ;; *) case $host in # compiling the symbol table file with pic_flag works around # a FreeBSD bug that causes programs to crash when -lm is # linked before any other PIC object. But we must not use # pic_flag when linking with -static. The problem exists in # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;; *-*-hpux*) pic_flag_for_symtable=" $pic_flag" ;; *) if test "X$my_pic_p" != Xno; then pic_flag_for_symtable=" $pic_flag" fi ;; esac ;; esac symtab_cflags= for arg in $LTCFLAGS; do case $arg in -pie | -fpie | -fPIE) ;; *) symtab_cflags="$symtab_cflags $arg" ;; esac done # Now compile the dynamic symbol file. func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?' # Clean up the generated files. func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"' # Transform the symbol file into the correct name. symfileobj="$output_objdir/${my_outputname}S.$objext" case $host in *cygwin* | *mingw* | *cegcc* ) if test -f "$output_objdir/$my_outputname.def"; then compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` else compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` fi ;; *) compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` ;; esac ;; *) func_fatal_error "unknown suffix for \`$my_dlsyms'" ;; esac else # We keep going just in case the user didn't refer to # lt_preloaded_symbols. The linker will fail if global_symbol_pipe # really was required. # Nullify the symbol file. compile_command=`$ECHO "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"` finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"` fi } # func_win32_libid arg # return the library type of file 'arg' # # Need a lot of goo to handle *both* DLLs and import libs # Has to be a shell function in order to 'eat' the argument # that is supplied when $file_magic_command is called. func_win32_libid () { $opt_debug win32_libid_type="unknown" win32_fileres=`file -L $1 2>/dev/null` case $win32_fileres in *ar\ archive\ import\ library*) # definitely import win32_libid_type="x86 archive import" ;; *ar\ archive*) # could be an import, or static if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | $EGREP 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then win32_nmres=`eval $NM -f posix -A $1 | $SED -n -e ' 1,100{ / I /{ s,.*,import, p q } }'` case $win32_nmres in import*) win32_libid_type="x86 archive import";; *) win32_libid_type="x86 archive static";; esac fi ;; *DLL*) win32_libid_type="x86 DLL" ;; *executable*) # but shell scripts are "executable" too... case $win32_fileres in *MS\ Windows\ PE\ Intel*) win32_libid_type="x86 DLL" ;; esac ;; esac $ECHO "$win32_libid_type" } # func_extract_an_archive dir oldlib func_extract_an_archive () { $opt_debug f_ex_an_ar_dir="$1"; shift f_ex_an_ar_oldlib="$1" func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" 'exit $?' if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then : else func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" fi } # func_extract_archives gentop oldlib ... func_extract_archives () { $opt_debug my_gentop="$1"; shift my_oldlibs=${1+"$@"} my_oldobjs="" my_xlib="" my_xabs="" my_xdir="" for my_xlib in $my_oldlibs; do # Extract the objects. case $my_xlib in [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;; *) my_xabs=`pwd`"/$my_xlib" ;; esac func_basename "$my_xlib" my_xlib="$func_basename_result" my_xlib_u=$my_xlib while :; do case " $extracted_archives " in *" $my_xlib_u "*) func_arith $extracted_serial + 1 extracted_serial=$func_arith_result my_xlib_u=lt$extracted_serial-$my_xlib ;; *) break ;; esac done extracted_archives="$extracted_archives $my_xlib_u" my_xdir="$my_gentop/$my_xlib_u" func_mkdir_p "$my_xdir" case $host in *-darwin*) func_verbose "Extracting $my_xabs" # Do not bother doing anything if just a dry run $opt_dry_run || { darwin_orig_dir=`pwd` cd $my_xdir || exit $? darwin_archive=$my_xabs darwin_curdir=`pwd` darwin_base_archive=`basename "$darwin_archive"` darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true` if test -n "$darwin_arches"; then darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'` darwin_arch= func_verbose "$darwin_base_archive has multiple architectures $darwin_arches" for darwin_arch in $darwin_arches ; do func_mkdir_p "unfat-$$/${darwin_base_archive}-${darwin_arch}" $LIPO -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}" cd "unfat-$$/${darwin_base_archive}-${darwin_arch}" func_extract_an_archive "`pwd`" "${darwin_base_archive}" cd "$darwin_curdir" $RM "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" done # $darwin_arches ## Okay now we've a bunch of thin objects, gotta fatten them up :) darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$basename" | sort -u` darwin_file= darwin_files= for darwin_file in $darwin_filelist; do darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP` $LIPO -create -output "$darwin_file" $darwin_files done # $darwin_filelist $RM -rf unfat-$$ cd "$darwin_orig_dir" else cd $darwin_orig_dir func_extract_an_archive "$my_xdir" "$my_xabs" fi # $darwin_arches } # !$opt_dry_run ;; *) func_extract_an_archive "$my_xdir" "$my_xabs" ;; esac my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP` done func_extract_archives_result="$my_oldobjs" } # func_emit_wrapper_part1 [arg=no] # # Emit the first part of a libtool wrapper script on stdout. # For more information, see the description associated with # func_emit_wrapper(), below. func_emit_wrapper_part1 () { func_emit_wrapper_part1_arg1=no if test -n "$1" ; then func_emit_wrapper_part1_arg1=$1 fi $ECHO "\ #! $SHELL # $output - temporary wrapper script for $objdir/$outputname # Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION # # The $output program cannot be directly executed until all the libtool # libraries that it depends on are installed. # # This wrapper script should never be moved out of the build directory. # If it is, it will not operate correctly. # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. Xsed='${SED} -e 1s/^X//' sed_quote_subst='$sed_quote_subst' # Be Bourne compatible if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac fi BIN_SH=xpg4; export BIN_SH # for Tru64 DUALCASE=1; export DUALCASE # for MKS sh # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH relink_command=\"$relink_command\" # This environment variable determines our operation mode. if test \"\$libtool_install_magic\" = \"$magic\"; then # install mode needs the following variables: generated_by_libtool_version='$macro_version' notinst_deplibs='$notinst_deplibs' else # When we are sourced in execute mode, \$file and \$ECHO are already set. if test \"\$libtool_execute_magic\" != \"$magic\"; then ECHO=\"$qecho\" file=\"\$0\" # Make sure echo works. if test \"X\$1\" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test \"X\`{ \$ECHO '\t'; } 2>/dev/null\`\" = 'X\t'; then # Yippee, \$ECHO works! : else # Restart under the correct shell, and then maybe \$ECHO will work. exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"} fi fi\ " $ECHO "\ # Find the directory that this script lives in. thisdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\` test \"x\$thisdir\" = \"x\$file\" && thisdir=. # Follow symbolic links until we get to the real thisdir. file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\` while test -n \"\$file\"; do destdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\` # If there was a directory component, then change thisdir. if test \"x\$destdir\" != \"x\$file\"; then case \"\$destdir\" in [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; *) thisdir=\"\$thisdir/\$destdir\" ;; esac fi file=\`\$ECHO \"X\$file\" | \$Xsed -e 's%^.*/%%'\` file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\` done " } # end: func_emit_wrapper_part1 # func_emit_wrapper_part2 [arg=no] # # Emit the second part of a libtool wrapper script on stdout. # For more information, see the description associated with # func_emit_wrapper(), below. func_emit_wrapper_part2 () { func_emit_wrapper_part2_arg1=no if test -n "$1" ; then func_emit_wrapper_part2_arg1=$1 fi $ECHO "\ # Usually 'no', except on cygwin/mingw when embedded into # the cwrapper. WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_part2_arg1 if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then # special case for '.' if test \"\$thisdir\" = \".\"; then thisdir=\`pwd\` fi # remove .libs from thisdir case \"\$thisdir\" in *[\\\\/]$objdir ) thisdir=\`\$ECHO \"X\$thisdir\" | \$Xsed -e 's%[\\\\/][^\\\\/]*$%%'\` ;; $objdir ) thisdir=. ;; esac fi # Try to get the absolute directory name. absdir=\`cd \"\$thisdir\" && pwd\` test -n \"\$absdir\" && thisdir=\"\$absdir\" " if test "$fast_install" = yes; then $ECHO "\ program=lt-'$outputname'$exeext progdir=\"\$thisdir/$objdir\" if test ! -f \"\$progdir/\$program\" || { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ test \"X\$file\" != \"X\$progdir/\$program\"; }; then file=\"\$\$-\$program\" if test ! -d \"\$progdir\"; then $MKDIR \"\$progdir\" else $RM \"\$progdir/\$file\" fi" $ECHO "\ # relink executable if necessary if test -n \"\$relink_command\"; then if relink_command_output=\`eval \$relink_command 2>&1\`; then : else $ECHO \"\$relink_command_output\" >&2 $RM \"\$progdir/\$file\" exit 1 fi fi $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || { $RM \"\$progdir/\$program\"; $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; } $RM \"\$progdir/\$file\" fi" else $ECHO "\ program='$outputname' progdir=\"\$thisdir/$objdir\" " fi $ECHO "\ if test -f \"\$progdir/\$program\"; then" # Export our shlibpath_var if we have one. if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then $ECHO "\ # Add our own library path to $shlibpath_var $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" # Some systems cannot cope with colon-terminated $shlibpath_var # The second colon is a workaround for a bug in BeOS R4 sed $shlibpath_var=\`\$ECHO \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\` export $shlibpath_var " fi # fixup the dll searchpath if we need to. if test -n "$dllsearchpath"; then $ECHO "\ # Add the dll search path components to the executable PATH PATH=$dllsearchpath:\$PATH " fi $ECHO "\ if test \"\$libtool_execute_magic\" != \"$magic\"; then # Run the actual program with our arguments. " case $host in # Backslashes separate directories on plain windows *-*-mingw | *-*-os2* | *-cegcc*) $ECHO "\ exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} " ;; *) $ECHO "\ exec \"\$progdir/\$program\" \${1+\"\$@\"} " ;; esac $ECHO "\ \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2 exit 1 fi else # The program doesn't exist. \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2 \$ECHO \"This script is just a wrapper for \$program.\" 1>&2 $ECHO \"See the $PACKAGE documentation for more information.\" 1>&2 exit 1 fi fi\ " } # end: func_emit_wrapper_part2 # func_emit_wrapper [arg=no] # # Emit a libtool wrapper script on stdout. # Don't directly open a file because we may want to # incorporate the script contents within a cygwin/mingw # wrapper executable. Must ONLY be called from within # func_mode_link because it depends on a number of variables # set therein. # # ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR # variable will take. If 'yes', then the emitted script # will assume that the directory in which it is stored is # the $objdir directory. This is a cygwin/mingw-specific # behavior. func_emit_wrapper () { func_emit_wrapper_arg1=no if test -n "$1" ; then func_emit_wrapper_arg1=$1 fi # split this up so that func_emit_cwrapperexe_src # can call each part independently. func_emit_wrapper_part1 "${func_emit_wrapper_arg1}" func_emit_wrapper_part2 "${func_emit_wrapper_arg1}" } # func_to_host_path arg # # Convert paths to host format when used with build tools. # Intended for use with "native" mingw (where libtool itself # is running under the msys shell), or in the following cross- # build environments: # $build $host # mingw (msys) mingw [e.g. native] # cygwin mingw # *nix + wine mingw # where wine is equipped with the `winepath' executable. # In the native mingw case, the (msys) shell automatically # converts paths for any non-msys applications it launches, # but that facility isn't available from inside the cwrapper. # Similar accommodations are necessary for $host mingw and # $build cygwin. Calling this function does no harm for other # $host/$build combinations not listed above. # # ARG is the path (on $build) that should be converted to # the proper representation for $host. The result is stored # in $func_to_host_path_result. func_to_host_path () { func_to_host_path_result="$1" if test -n "$1" ; then case $host in *mingw* ) lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' case $build in *mingw* ) # actually, msys # awkward: cmd appends spaces to result lt_sed_strip_trailing_spaces="s/[ ]*\$//" func_to_host_path_tmp1=`( cmd //c echo "$1" |\ $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""` func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\ $SED -e "$lt_sed_naive_backslashify"` ;; *cygwin* ) func_to_host_path_tmp1=`cygpath -w "$1"` func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\ $SED -e "$lt_sed_naive_backslashify"` ;; * ) # Unfortunately, winepath does not exit with a non-zero # error code, so we are forced to check the contents of # stdout. On the other hand, if the command is not # found, the shell will set an exit code of 127 and print # *an error message* to stdout. So we must check for both # error code of zero AND non-empty stdout, which explains # the odd construction: func_to_host_path_tmp1=`winepath -w "$1" 2>/dev/null` if test "$?" -eq 0 && test -n "${func_to_host_path_tmp1}"; then func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\ $SED -e "$lt_sed_naive_backslashify"` else # Allow warning below. func_to_host_path_result="" fi ;; esac if test -z "$func_to_host_path_result" ; then func_error "Could not determine host path corresponding to" func_error " '$1'" func_error "Continuing, but uninstalled executables may not work." # Fallback: func_to_host_path_result="$1" fi ;; esac fi } # end: func_to_host_path # func_to_host_pathlist arg # # Convert pathlists to host format when used with build tools. # See func_to_host_path(), above. This function supports the # following $build/$host combinations (but does no harm for # combinations not listed here): # $build $host # mingw (msys) mingw [e.g. native] # cygwin mingw # *nix + wine mingw # # Path separators are also converted from $build format to # $host format. If ARG begins or ends with a path separator # character, it is preserved (but converted to $host format) # on output. # # ARG is a pathlist (on $build) that should be converted to # the proper representation on $host. The result is stored # in $func_to_host_pathlist_result. func_to_host_pathlist () { func_to_host_pathlist_result="$1" if test -n "$1" ; then case $host in *mingw* ) lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' # Remove leading and trailing path separator characters from # ARG. msys behavior is inconsistent here, cygpath turns them # into '.;' and ';.', and winepath ignores them completely. func_to_host_pathlist_tmp2="$1" # Once set for this call, this variable should not be # reassigned. It is used in tha fallback case. func_to_host_pathlist_tmp1=`echo "$func_to_host_pathlist_tmp2" |\ $SED -e 's|^:*||' -e 's|:*$||'` case $build in *mingw* ) # Actually, msys. # Awkward: cmd appends spaces to result. lt_sed_strip_trailing_spaces="s/[ ]*\$//" func_to_host_pathlist_tmp2=`( cmd //c echo "$func_to_host_pathlist_tmp1" |\ $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""` func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\ $SED -e "$lt_sed_naive_backslashify"` ;; *cygwin* ) func_to_host_pathlist_tmp2=`cygpath -w -p "$func_to_host_pathlist_tmp1"` func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\ $SED -e "$lt_sed_naive_backslashify"` ;; * ) # unfortunately, winepath doesn't convert pathlists func_to_host_pathlist_result="" func_to_host_pathlist_oldIFS=$IFS IFS=: for func_to_host_pathlist_f in $func_to_host_pathlist_tmp1 ; do IFS=$func_to_host_pathlist_oldIFS if test -n "$func_to_host_pathlist_f" ; then func_to_host_path "$func_to_host_pathlist_f" if test -n "$func_to_host_path_result" ; then if test -z "$func_to_host_pathlist_result" ; then func_to_host_pathlist_result="$func_to_host_path_result" else func_to_host_pathlist_result="$func_to_host_pathlist_result;$func_to_host_path_result" fi fi fi IFS=: done IFS=$func_to_host_pathlist_oldIFS ;; esac if test -z "$func_to_host_pathlist_result" ; then func_error "Could not determine the host path(s) corresponding to" func_error " '$1'" func_error "Continuing, but uninstalled executables may not work." # Fallback. This may break if $1 contains DOS-style drive # specifications. The fix is not to complicate the expression # below, but for the user to provide a working wine installation # with winepath so that path translation in the cross-to-mingw # case works properly. lt_replace_pathsep_nix_to_dos="s|:|;|g" func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp1" |\ $SED -e "$lt_replace_pathsep_nix_to_dos"` fi # Now, add the leading and trailing path separators back case "$1" in :* ) func_to_host_pathlist_result=";$func_to_host_pathlist_result" ;; esac case "$1" in *: ) func_to_host_pathlist_result="$func_to_host_pathlist_result;" ;; esac ;; esac fi } # end: func_to_host_pathlist # func_emit_cwrapperexe_src # emit the source code for a wrapper executable on stdout # Must ONLY be called from within func_mode_link because # it depends on a number of variable set therein. func_emit_cwrapperexe_src () { cat < #include #ifdef _MSC_VER # include # include # include # define setmode _setmode #else # include # include # ifdef __CYGWIN__ # include # define HAVE_SETENV # ifdef __STRICT_ANSI__ char *realpath (const char *, char *); int putenv (char *); int setenv (const char *, const char *, int); # endif # endif #endif #include #include #include #include #include #include #include #include #if defined(PATH_MAX) # define LT_PATHMAX PATH_MAX #elif defined(MAXPATHLEN) # define LT_PATHMAX MAXPATHLEN #else # define LT_PATHMAX 1024 #endif #ifndef S_IXOTH # define S_IXOTH 0 #endif #ifndef S_IXGRP # define S_IXGRP 0 #endif #ifdef _MSC_VER # define S_IXUSR _S_IEXEC # define stat _stat # ifndef _INTPTR_T_DEFINED # define intptr_t int # endif #endif #ifndef DIR_SEPARATOR # define DIR_SEPARATOR '/' # define PATH_SEPARATOR ':' #endif #if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ defined (__OS2__) # define HAVE_DOS_BASED_FILE_SYSTEM # define FOPEN_WB "wb" # ifndef DIR_SEPARATOR_2 # define DIR_SEPARATOR_2 '\\' # endif # ifndef PATH_SEPARATOR_2 # define PATH_SEPARATOR_2 ';' # endif #endif #ifndef DIR_SEPARATOR_2 # define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) #else /* DIR_SEPARATOR_2 */ # define IS_DIR_SEPARATOR(ch) \ (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) #endif /* DIR_SEPARATOR_2 */ #ifndef PATH_SEPARATOR_2 # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) #else /* PATH_SEPARATOR_2 */ # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) #endif /* PATH_SEPARATOR_2 */ #ifdef __CYGWIN__ # define FOPEN_WB "wb" #endif #ifndef FOPEN_WB # define FOPEN_WB "w" #endif #ifndef _O_BINARY # define _O_BINARY 0 #endif #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) #define XFREE(stale) do { \ if (stale) { free ((void *) stale); stale = 0; } \ } while (0) #undef LTWRAPPER_DEBUGPRINTF #if defined DEBUGWRAPPER # define LTWRAPPER_DEBUGPRINTF(args) ltwrapper_debugprintf args static void ltwrapper_debugprintf (const char *fmt, ...) { va_list args; va_start (args, fmt); (void) vfprintf (stderr, fmt, args); va_end (args); } #else # define LTWRAPPER_DEBUGPRINTF(args) #endif const char *program_name = NULL; void *xmalloc (size_t num); char *xstrdup (const char *string); const char *base_name (const char *name); char *find_executable (const char *wrapper); char *chase_symlinks (const char *pathspec); int make_executable (const char *path); int check_executable (const char *path); char *strendzap (char *str, const char *pat); void lt_fatal (const char *message, ...); void lt_setenv (const char *name, const char *value); char *lt_extend_str (const char *orig_value, const char *add, int to_end); void lt_opt_process_env_set (const char *arg); void lt_opt_process_env_prepend (const char *arg); void lt_opt_process_env_append (const char *arg); int lt_split_name_value (const char *arg, char** name, char** value); void lt_update_exe_path (const char *name, const char *value); void lt_update_lib_path (const char *name, const char *value); static const char *script_text_part1 = EOF func_emit_wrapper_part1 yes | $SED -e 's/\([\\"]\)/\\\1/g' \ -e 's/^/ "/' -e 's/$/\\n"/' echo ";" cat <"))); for (i = 0; i < newargc; i++) { LTWRAPPER_DEBUGPRINTF (("(main) newargz[%d] : %s\n", i, (newargz[i] ? newargz[i] : ""))); } EOF case $host_os in mingw*) cat <<"EOF" /* execv doesn't actually work on mingw as expected on unix */ rval = _spawnv (_P_WAIT, lt_argv_zero, (const char * const *) newargz); if (rval == -1) { /* failed to start process */ LTWRAPPER_DEBUGPRINTF (("(main) failed to launch target \"%s\": errno = %d\n", lt_argv_zero, errno)); return 127; } return rval; EOF ;; *) cat <<"EOF" execv (lt_argv_zero, newargz); return rval; /* =127, but avoids unused variable warning */ EOF ;; esac cat <<"EOF" } void * xmalloc (size_t num) { void *p = (void *) malloc (num); if (!p) lt_fatal ("Memory exhausted"); return p; } char * xstrdup (const char *string) { return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL; } const char * base_name (const char *name) { const char *base; #if defined (HAVE_DOS_BASED_FILE_SYSTEM) /* Skip over the disk name in MSDOS pathnames. */ if (isalpha ((unsigned char) name[0]) && name[1] == ':') name += 2; #endif for (base = name; *name; name++) if (IS_DIR_SEPARATOR (*name)) base = name + 1; return base; } int check_executable (const char *path) { struct stat st; LTWRAPPER_DEBUGPRINTF (("(check_executable) : %s\n", path ? (*path ? path : "EMPTY!") : "NULL!")); if ((!path) || (!*path)) return 0; if ((stat (path, &st) >= 0) && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))) return 1; else return 0; } int make_executable (const char *path) { int rval = 0; struct stat st; LTWRAPPER_DEBUGPRINTF (("(make_executable) : %s\n", path ? (*path ? path : "EMPTY!") : "NULL!")); if ((!path) || (!*path)) return 0; if (stat (path, &st) >= 0) { rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR); } return rval; } /* Searches for the full path of the wrapper. Returns newly allocated full path name if found, NULL otherwise Does not chase symlinks, even on platforms that support them. */ char * find_executable (const char *wrapper) { int has_slash = 0; const char *p; const char *p_next; /* static buffer for getcwd */ char tmp[LT_PATHMAX + 1]; int tmp_len; char *concat_name; LTWRAPPER_DEBUGPRINTF (("(find_executable) : %s\n", wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!")); if ((wrapper == NULL) || (*wrapper == '\0')) return NULL; /* Absolute path? */ #if defined (HAVE_DOS_BASED_FILE_SYSTEM) if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':') { concat_name = xstrdup (wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } else { #endif if (IS_DIR_SEPARATOR (wrapper[0])) { concat_name = xstrdup (wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } #if defined (HAVE_DOS_BASED_FILE_SYSTEM) } #endif for (p = wrapper; *p; p++) if (*p == '/') { has_slash = 1; break; } if (!has_slash) { /* no slashes; search PATH */ const char *path = getenv ("PATH"); if (path != NULL) { for (p = path; *p; p = p_next) { const char *q; size_t p_len; for (q = p; *q; q++) if (IS_PATH_SEPARATOR (*q)) break; p_len = q - p; p_next = (*q == '\0' ? q : q + 1); if (p_len == 0) { /* empty path: current directory */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal ("getcwd failed"); tmp_len = strlen (tmp); concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, tmp, tmp_len); concat_name[tmp_len] = '/'; strcpy (concat_name + tmp_len + 1, wrapper); } else { concat_name = XMALLOC (char, p_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, p, p_len); concat_name[p_len] = '/'; strcpy (concat_name + p_len + 1, wrapper); } if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } } /* not found in PATH; assume curdir */ } /* Relative path | not found in path: prepend cwd */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal ("getcwd failed"); tmp_len = strlen (tmp); concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, tmp, tmp_len); concat_name[tmp_len] = '/'; strcpy (concat_name + tmp_len + 1, wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); return NULL; } char * chase_symlinks (const char *pathspec) { #ifndef S_ISLNK return xstrdup (pathspec); #else char buf[LT_PATHMAX]; struct stat s; char *tmp_pathspec = xstrdup (pathspec); char *p; int has_symlinks = 0; while (strlen (tmp_pathspec) && !has_symlinks) { LTWRAPPER_DEBUGPRINTF (("checking path component for symlinks: %s\n", tmp_pathspec)); if (lstat (tmp_pathspec, &s) == 0) { if (S_ISLNK (s.st_mode) != 0) { has_symlinks = 1; break; } /* search backwards for last DIR_SEPARATOR */ p = tmp_pathspec + strlen (tmp_pathspec) - 1; while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) p--; if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) { /* no more DIR_SEPARATORS left */ break; } *p = '\0'; } else { char *errstr = strerror (errno); lt_fatal ("Error accessing file %s (%s)", tmp_pathspec, errstr); } } XFREE (tmp_pathspec); if (!has_symlinks) { return xstrdup (pathspec); } tmp_pathspec = realpath (pathspec, buf); if (tmp_pathspec == 0) { lt_fatal ("Could not follow symlinks for %s", pathspec); } return xstrdup (tmp_pathspec); #endif } char * strendzap (char *str, const char *pat) { size_t len, patlen; assert (str != NULL); assert (pat != NULL); len = strlen (str); patlen = strlen (pat); if (patlen <= len) { str += len - patlen; if (strcmp (str, pat) == 0) *str = '\0'; } return str; } static void lt_error_core (int exit_status, const char *mode, const char *message, va_list ap) { fprintf (stderr, "%s: %s: ", program_name, mode); vfprintf (stderr, message, ap); fprintf (stderr, ".\n"); if (exit_status >= 0) exit (exit_status); } void lt_fatal (const char *message, ...) { va_list ap; va_start (ap, message); lt_error_core (EXIT_FAILURE, "FATAL", message, ap); va_end (ap); } void lt_setenv (const char *name, const char *value) { LTWRAPPER_DEBUGPRINTF (("(lt_setenv) setting '%s' to '%s'\n", (name ? name : ""), (value ? value : ""))); { #ifdef HAVE_SETENV /* always make a copy, for consistency with !HAVE_SETENV */ char *str = xstrdup (value); setenv (name, str, 1); #else int len = strlen (name) + 1 + strlen (value) + 1; char *str = XMALLOC (char, len); sprintf (str, "%s=%s", name, value); if (putenv (str) != EXIT_SUCCESS) { XFREE (str); } #endif } } char * lt_extend_str (const char *orig_value, const char *add, int to_end) { char *new_value; if (orig_value && *orig_value) { int orig_value_len = strlen (orig_value); int add_len = strlen (add); new_value = XMALLOC (char, add_len + orig_value_len + 1); if (to_end) { strcpy (new_value, orig_value); strcpy (new_value + orig_value_len, add); } else { strcpy (new_value, add); strcpy (new_value + add_len, orig_value); } } else { new_value = xstrdup (add); } return new_value; } int lt_split_name_value (const char *arg, char** name, char** value) { const char *p; int len; if (!arg || !*arg) return 1; p = strchr (arg, (int)'='); if (!p) return 1; *value = xstrdup (++p); len = strlen (arg) - strlen (*value); *name = XMALLOC (char, len); strncpy (*name, arg, len-1); (*name)[len - 1] = '\0'; return 0; } void lt_opt_process_env_set (const char *arg) { char *name = NULL; char *value = NULL; if (lt_split_name_value (arg, &name, &value) != 0) { XFREE (name); XFREE (value); lt_fatal ("bad argument for %s: '%s'", env_set_opt, arg); } lt_setenv (name, value); XFREE (name); XFREE (value); } void lt_opt_process_env_prepend (const char *arg) { char *name = NULL; char *value = NULL; char *new_value = NULL; if (lt_split_name_value (arg, &name, &value) != 0) { XFREE (name); XFREE (value); lt_fatal ("bad argument for %s: '%s'", env_prepend_opt, arg); } new_value = lt_extend_str (getenv (name), value, 0); lt_setenv (name, new_value); XFREE (new_value); XFREE (name); XFREE (value); } void lt_opt_process_env_append (const char *arg) { char *name = NULL; char *value = NULL; char *new_value = NULL; if (lt_split_name_value (arg, &name, &value) != 0) { XFREE (name); XFREE (value); lt_fatal ("bad argument for %s: '%s'", env_append_opt, arg); } new_value = lt_extend_str (getenv (name), value, 1); lt_setenv (name, new_value); XFREE (new_value); XFREE (name); XFREE (value); } void lt_update_exe_path (const char *name, const char *value) { LTWRAPPER_DEBUGPRINTF (("(lt_update_exe_path) modifying '%s' by prepending '%s'\n", (name ? name : ""), (value ? value : ""))); if (name && *name && value && *value) { char *new_value = lt_extend_str (getenv (name), value, 0); /* some systems can't cope with a ':'-terminated path #' */ int len = strlen (new_value); while (((len = strlen (new_value)) > 0) && IS_PATH_SEPARATOR (new_value[len-1])) { new_value[len-1] = '\0'; } lt_setenv (name, new_value); XFREE (new_value); } } void lt_update_lib_path (const char *name, const char *value) { LTWRAPPER_DEBUGPRINTF (("(lt_update_lib_path) modifying '%s' by prepending '%s'\n", (name ? name : ""), (value ? value : ""))); if (name && *name && value && *value) { char *new_value = lt_extend_str (getenv (name), value, 0); lt_setenv (name, new_value); XFREE (new_value); } } EOF } # end: func_emit_cwrapperexe_src # func_mode_link arg... func_mode_link () { $opt_debug case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) # It is impossible to link a dll without this setting, and # we shouldn't force the makefile maintainer to figure out # which system we are compiling for in order to pass an extra # flag for every libtool invocation. # allow_undefined=no # FIXME: Unfortunately, there are problems with the above when trying # to make a dll which has undefined symbols, in which case not # even a static library is built. For now, we need to specify # -no-undefined on the libtool link line when we can be certain # that all symbols are satisfied, otherwise we get a static library. allow_undefined=yes ;; *) allow_undefined=yes ;; esac libtool_args=$nonopt base_compile="$nonopt $@" compile_command=$nonopt finalize_command=$nonopt compile_rpath= finalize_rpath= compile_shlibpath= finalize_shlibpath= convenience= old_convenience= deplibs= old_deplibs= compiler_flags= linker_flags= dllsearchpath= lib_search_path=`pwd` inst_prefix_dir= new_inherited_linker_flags= avoid_version=no dlfiles= dlprefiles= dlself=no export_dynamic=no export_symbols= export_symbols_regex= generated= libobjs= ltlibs= module=no no_install=no objs= non_pic_objects= precious_files_regex= prefer_static_libs=no preload=no prev= prevarg= release= rpath= xrpath= perm_rpath= temp_rpath= thread_safe=no vinfo= vinfo_number=no weak_libs= single_module="${wl}-single_module" func_infer_tag $base_compile # We need to know -static, to get the right output filenames. for arg do case $arg in -shared) test "$build_libtool_libs" != yes && \ func_fatal_configuration "can not build a shared library" build_old_libs=no break ;; -all-static | -static | -static-libtool-libs) case $arg in -all-static) if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then func_warning "complete static linking is impossible in this configuration" fi if test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=yes ;; -static) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=built ;; -static-libtool-libs) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=yes ;; esac build_libtool_libs=no build_old_libs=yes break ;; esac done # See if our shared archives depend on static archives. test -n "$old_archive_from_new_cmds" && build_old_libs=yes # Go through the arguments, transforming them on the way. while test "$#" -gt 0; do arg="$1" shift func_quote_for_eval "$arg" qarg=$func_quote_for_eval_unquoted_result func_append libtool_args " $func_quote_for_eval_result" # If the previous option needs an argument, assign it. if test -n "$prev"; then case $prev in output) func_append compile_command " @OUTPUT@" func_append finalize_command " @OUTPUT@" ;; esac case $prev in dlfiles|dlprefiles) if test "$preload" = no; then # Add the symbol object into the linking commands. func_append compile_command " @SYMFILE@" func_append finalize_command " @SYMFILE@" preload=yes fi case $arg in *.la | *.lo) ;; # We handle these cases below. force) if test "$dlself" = no; then dlself=needless export_dynamic=yes fi prev= continue ;; self) if test "$prev" = dlprefiles; then dlself=yes elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then dlself=yes else dlself=needless export_dynamic=yes fi prev= continue ;; *) if test "$prev" = dlfiles; then dlfiles="$dlfiles $arg" else dlprefiles="$dlprefiles $arg" fi prev= continue ;; esac ;; expsyms) export_symbols="$arg" test -f "$arg" \ || func_fatal_error "symbol file \`$arg' does not exist" prev= continue ;; expsyms_regex) export_symbols_regex="$arg" prev= continue ;; framework) case $host in *-*-darwin*) case "$deplibs " in *" $qarg.ltframework "*) ;; *) deplibs="$deplibs $qarg.ltframework" # this is fixed later ;; esac ;; esac prev= continue ;; inst_prefix) inst_prefix_dir="$arg" prev= continue ;; objectlist) if test -f "$arg"; then save_arg=$arg moreargs= for fil in `cat "$save_arg"` do # moreargs="$moreargs $fil" arg=$fil # A libtool-controlled object. # Check to see that this really is a libtool object. if func_lalib_unsafe_p "$arg"; then pic_object= non_pic_object= # Read the .lo file func_source "$arg" if test -z "$pic_object" || test -z "$non_pic_object" || test "$pic_object" = none && test "$non_pic_object" = none; then func_fatal_error "cannot find name of object for \`$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" if test "$pic_object" != none; then # Prepend the subdirectory the object is found in. pic_object="$xdir$pic_object" if test "$prev" = dlfiles; then if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then dlfiles="$dlfiles $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test "$prev" = dlprefiles; then # Preload the old-style object. dlprefiles="$dlprefiles $pic_object" prev= fi # A PIC object. func_append libobjs " $pic_object" arg="$pic_object" fi # Non-PIC object. if test "$non_pic_object" != none; then # Prepend the subdirectory the object is found in. non_pic_object="$xdir$non_pic_object" # A standard non-PIC object func_append non_pic_objects " $non_pic_object" if test -z "$pic_object" || test "$pic_object" = none ; then arg="$non_pic_object" fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. non_pic_object="$pic_object" func_append non_pic_objects " $non_pic_object" fi else # Only an error if not doing a dry-run. if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result non_pic_object=$xdir$func_lo2o_result func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else func_fatal_error "\`$arg' is not a valid libtool object" fi fi done else func_fatal_error "link input file \`$arg' does not exist" fi arg=$save_arg prev= continue ;; precious_regex) precious_files_regex="$arg" prev= continue ;; release) release="-$arg" prev= continue ;; rpath | xrpath) # We need an absolute path. case $arg in [\\/]* | [A-Za-z]:[\\/]*) ;; *) func_fatal_error "only absolute run-paths are allowed" ;; esac if test "$prev" = rpath; then case "$rpath " in *" $arg "*) ;; *) rpath="$rpath $arg" ;; esac else case "$xrpath " in *" $arg "*) ;; *) xrpath="$xrpath $arg" ;; esac fi prev= continue ;; shrext) shrext_cmds="$arg" prev= continue ;; weak) weak_libs="$weak_libs $arg" prev= continue ;; xcclinker) linker_flags="$linker_flags $qarg" compiler_flags="$compiler_flags $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xcompiler) compiler_flags="$compiler_flags $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xlinker) linker_flags="$linker_flags $qarg" compiler_flags="$compiler_flags $wl$qarg" prev= func_append compile_command " $wl$qarg" func_append finalize_command " $wl$qarg" continue ;; *) eval "$prev=\"\$arg\"" prev= continue ;; esac fi # test -n "$prev" prevarg="$arg" case $arg in -all-static) if test -n "$link_static_flag"; then # See comment for -static flag below, for more details. func_append compile_command " $link_static_flag" func_append finalize_command " $link_static_flag" fi continue ;; -allow-undefined) # FIXME: remove this flag sometime in the future. func_fatal_error "\`-allow-undefined' must not be used because it is the default" ;; -avoid-version) avoid_version=yes continue ;; -dlopen) prev=dlfiles continue ;; -dlpreopen) prev=dlprefiles continue ;; -export-dynamic) export_dynamic=yes continue ;; -export-symbols | -export-symbols-regex) if test -n "$export_symbols" || test -n "$export_symbols_regex"; then func_fatal_error "more than one -exported-symbols argument is not allowed" fi if test "X$arg" = "X-export-symbols"; then prev=expsyms else prev=expsyms_regex fi continue ;; -framework) prev=framework continue ;; -inst-prefix-dir) prev=inst_prefix continue ;; # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* # so, if we see these flags be careful not to treat them like -L -L[A-Z][A-Z]*:*) case $with_gcc/$host in no/*-*-irix* | /*-*-irix*) func_append compile_command " $arg" func_append finalize_command " $arg" ;; esac continue ;; -L*) func_stripname '-L' '' "$arg" dir=$func_stripname_result if test -z "$dir"; then if test "$#" -gt 0; then func_fatal_error "require no space between \`-L' and \`$1'" else func_fatal_error "need path for \`-L' option" fi fi # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) absdir=`cd "$dir" && pwd` test -z "$absdir" && \ func_fatal_error "cannot determine absolute directory name of \`$dir'" dir="$absdir" ;; esac case "$deplibs " in *" -L$dir "*) ;; *) deplibs="$deplibs -L$dir" lib_search_path="$lib_search_path $dir" ;; esac case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) testbindir=`$ECHO "X$dir" | $Xsed -e 's*/lib$*/bin*'` case :$dllsearchpath: in *":$dir:"*) ;; ::) dllsearchpath=$dir;; *) dllsearchpath="$dllsearchpath:$dir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; *) dllsearchpath="$dllsearchpath:$testbindir";; esac ;; esac continue ;; -l*) if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc*) # These systems don't actually have a C or math library (as such) continue ;; *-*-os2*) # These systems don't actually have a C library (as such) test "X$arg" = "X-lc" && continue ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc due to us having libc/libc_r. test "X$arg" = "X-lc" && continue ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C and math libraries are in the System framework deplibs="$deplibs System.ltframework" continue ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype test "X$arg" = "X-lc" && continue ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work test "X$arg" = "X-lc" && continue ;; esac elif test "X$arg" = "X-lc_r"; then case $host in *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc_r directly, use -pthread flag. continue ;; esac fi deplibs="$deplibs $arg" continue ;; -module) module=yes continue ;; # Tru64 UNIX uses -model [arg] to determine the layout of C++ # classes, name mangling, and exception handling. # Darwin uses the -arch flag to determine output architecture. -model|-arch|-isysroot) compiler_flags="$compiler_flags $arg" func_append compile_command " $arg" func_append finalize_command " $arg" prev=xcompiler continue ;; -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) compiler_flags="$compiler_flags $arg" func_append compile_command " $arg" func_append finalize_command " $arg" case "$new_inherited_linker_flags " in *" $arg "*) ;; * ) new_inherited_linker_flags="$new_inherited_linker_flags $arg" ;; esac continue ;; -multi_module) single_module="${wl}-multi_module" continue ;; -no-fast-install) fast_install=no continue ;; -no-install) case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*) # The PATH hackery in wrapper scripts is required on Windows # and Darwin in order for the loader to find any dlls it needs. func_warning "\`-no-install' is ignored for $host" func_warning "assuming \`-no-fast-install' instead" fast_install=no ;; *) no_install=yes ;; esac continue ;; -no-undefined) allow_undefined=no continue ;; -objectlist) prev=objectlist continue ;; -o) prev=output ;; -precious-files-regex) prev=precious_regex continue ;; -release) prev=release continue ;; -rpath) prev=rpath continue ;; -R) prev=xrpath continue ;; -R*) func_stripname '-R' '' "$arg" dir=$func_stripname_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) func_fatal_error "only absolute run-paths are allowed" ;; esac case "$xrpath " in *" $dir "*) ;; *) xrpath="$xrpath $dir" ;; esac continue ;; -shared) # The effects of -shared are defined in a previous loop. continue ;; -shrext) prev=shrext continue ;; -static | -static-libtool-libs) # The effects of -static are defined in a previous loop. # We used to do the same as -all-static on platforms that # didn't have a PIC flag, but the assumption that the effects # would be equivalent was wrong. It would break on at least # Digital Unix and AIX. continue ;; -thread-safe) thread_safe=yes continue ;; -version-info) prev=vinfo continue ;; -version-number) prev=vinfo vinfo_number=yes continue ;; -weak) prev=weak continue ;; -Wc,*) func_stripname '-Wc,' '' "$arg" args=$func_stripname_result arg= save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" func_quote_for_eval "$flag" arg="$arg $wl$func_quote_for_eval_result" compiler_flags="$compiler_flags $func_quote_for_eval_result" done IFS="$save_ifs" func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; -Wl,*) func_stripname '-Wl,' '' "$arg" args=$func_stripname_result arg= save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" func_quote_for_eval "$flag" arg="$arg $wl$func_quote_for_eval_result" compiler_flags="$compiler_flags $wl$func_quote_for_eval_result" linker_flags="$linker_flags $func_quote_for_eval_result" done IFS="$save_ifs" func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; -Xcompiler) prev=xcompiler continue ;; -Xlinker) prev=xlinker continue ;; -XCClinker) prev=xcclinker continue ;; # -msg_* for osf cc -msg_*) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" ;; # -64, -mips[0-9] enable 64-bit mode on the SGI compiler # -r[0-9][0-9]* specifies the processor on the SGI compiler # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler # +DA*, +DD* enable 64-bit mode on the HP compiler # -q* pass through compiler args for the IBM compiler # -m*, -t[45]*, -txscale* pass through architecture-specific # compiler args for GCC # -F/path gives path to uninstalled frameworks, gcc on darwin # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC # @file GCC response files -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" func_append compile_command " $arg" func_append finalize_command " $arg" compiler_flags="$compiler_flags $arg" continue ;; # Some other compiler flag. -* | +*) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" ;; *.$objext) # A standard object. objs="$objs $arg" ;; *.lo) # A libtool-controlled object. # Check to see that this really is a libtool object. if func_lalib_unsafe_p "$arg"; then pic_object= non_pic_object= # Read the .lo file func_source "$arg" if test -z "$pic_object" || test -z "$non_pic_object" || test "$pic_object" = none && test "$non_pic_object" = none; then func_fatal_error "cannot find name of object for \`$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" if test "$pic_object" != none; then # Prepend the subdirectory the object is found in. pic_object="$xdir$pic_object" if test "$prev" = dlfiles; then if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then dlfiles="$dlfiles $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test "$prev" = dlprefiles; then # Preload the old-style object. dlprefiles="$dlprefiles $pic_object" prev= fi # A PIC object. func_append libobjs " $pic_object" arg="$pic_object" fi # Non-PIC object. if test "$non_pic_object" != none; then # Prepend the subdirectory the object is found in. non_pic_object="$xdir$non_pic_object" # A standard non-PIC object func_append non_pic_objects " $non_pic_object" if test -z "$pic_object" || test "$pic_object" = none ; then arg="$non_pic_object" fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. non_pic_object="$pic_object" func_append non_pic_objects " $non_pic_object" fi else # Only an error if not doing a dry-run. if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result non_pic_object=$xdir$func_lo2o_result func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else func_fatal_error "\`$arg' is not a valid libtool object" fi fi ;; *.$libext) # An archive. deplibs="$deplibs $arg" old_deplibs="$old_deplibs $arg" continue ;; *.la) # A libtool-controlled library. if test "$prev" = dlfiles; then # This library was specified with -dlopen. dlfiles="$dlfiles $arg" prev= elif test "$prev" = dlprefiles; then # The library was specified with -dlpreopen. dlprefiles="$dlprefiles $arg" prev= else deplibs="$deplibs $arg" fi continue ;; # Some other compiler argument. *) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" ;; esac # arg # Now actually substitute the argument into the commands. if test -n "$arg"; then func_append compile_command " $arg" func_append finalize_command " $arg" fi done # argument parsing loop test -n "$prev" && \ func_fatal_help "the \`$prevarg' option requires an argument" if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then eval arg=\"$export_dynamic_flag_spec\" func_append compile_command " $arg" func_append finalize_command " $arg" fi oldlibs= # calculate the name of the file, without its directory func_basename "$output" outputname="$func_basename_result" libobjs_save="$libobjs" if test -n "$shlibpath_var"; then # get the directories listed in $shlibpath_var eval shlib_search_path=\`\$ECHO \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\` else shlib_search_path= fi eval sys_lib_search_path=\"$sys_lib_search_path_spec\" eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" func_dirname "$output" "/" "" output_objdir="$func_dirname_result$objdir" # Create the object directory. func_mkdir_p "$output_objdir" # Determine the type of output case $output in "") func_fatal_help "you must specify an output file" ;; *.$libext) linkmode=oldlib ;; *.lo | *.$objext) linkmode=obj ;; *.la) linkmode=lib ;; *) linkmode=prog ;; # Anything else should be a program. esac specialdeplibs= libs= # Find all interdependent deplibs by searching for libraries # that are linked more than once (e.g. -la -lb -la) for deplib in $deplibs; do if $opt_duplicate_deps ; then case "$libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi libs="$libs $deplib" done if test "$linkmode" = lib; then libs="$predeps $libs $compiler_lib_search_path $postdeps" # Compute libraries that are listed more than once in $predeps # $postdeps and mark them as special (i.e., whose duplicates are # not to be eliminated). pre_post_deps= if $opt_duplicate_compiler_generated_deps; then for pre_post_dep in $predeps $postdeps; do case "$pre_post_deps " in *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;; esac pre_post_deps="$pre_post_deps $pre_post_dep" done fi pre_post_deps= fi deplibs= newdependency_libs= newlib_search_path= need_relink=no # whether we're linking any uninstalled libtool libraries notinst_deplibs= # not-installed libtool libraries notinst_path= # paths that contain not-installed libtool libraries case $linkmode in lib) passes="conv dlpreopen link" for file in $dlfiles $dlprefiles; do case $file in *.la) ;; *) func_fatal_help "libraries can \`-dlopen' only libtool libraries: $file" ;; esac done ;; prog) compile_deplibs= finalize_deplibs= alldeplibs=no newdlfiles= newdlprefiles= passes="conv scan dlopen dlpreopen link" ;; *) passes="conv" ;; esac for pass in $passes; do # The preopen pass in lib mode reverses $deplibs; put it back here # so that -L comes before libs that need it for instance... if test "$linkmode,$pass" = "lib,link"; then ## FIXME: Find the place where the list is rebuilt in the wrong ## order, and fix it there properly tmp_deplibs= for deplib in $deplibs; do tmp_deplibs="$deplib $tmp_deplibs" done deplibs="$tmp_deplibs" fi if test "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan"; then libs="$deplibs" deplibs= fi if test "$linkmode" = prog; then case $pass in dlopen) libs="$dlfiles" ;; dlpreopen) libs="$dlprefiles" ;; link) libs="$deplibs %DEPLIBS%" test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs" ;; esac fi if test "$linkmode,$pass" = "lib,dlpreopen"; then # Collect and forward deplibs of preopened libtool libs for lib in $dlprefiles; do # Ignore non-libtool-libs dependency_libs= case $lib in *.la) func_source "$lib" ;; esac # Collect preopened libtool deplibs, except any this library # has declared as weak libs for deplib in $dependency_libs; do deplib_base=`$ECHO "X$deplib" | $Xsed -e "$basename"` case " $weak_libs " in *" $deplib_base "*) ;; *) deplibs="$deplibs $deplib" ;; esac done done libs="$dlprefiles" fi if test "$pass" = dlopen; then # Collect dlpreopened libraries save_deplibs="$deplibs" deplibs= fi for deplib in $libs; do lib= found=no case $deplib in -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else compiler_flags="$compiler_flags $deplib" if test "$linkmode" = lib ; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;; esac fi fi continue ;; -l*) if test "$linkmode" != lib && test "$linkmode" != prog; then func_warning "\`-l' is ignored for archives/objects" continue fi func_stripname '-l' '' "$deplib" name=$func_stripname_result if test "$linkmode" = lib; then searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path" else searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path" fi for searchdir in $searchdirs; do for search_ext in .la $std_shrext .so .a; do # Search the libtool library lib="$searchdir/lib${name}${search_ext}" if test -f "$lib"; then if test "$search_ext" = ".la"; then found=yes else found=no fi break 2 fi done done if test "$found" != yes; then # deplib doesn't seem to be a libtool library if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" fi continue else # deplib is a libtool library # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, # We need to do some special things here, and not later. if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $deplib "*) if func_lalib_p "$lib"; then library_names= old_library= func_source "$lib" for l in $old_library $library_names; do ll="$l" done if test "X$ll" = "X$old_library" ; then # only static version available found=no func_dirname "$lib" "" "." ladir="$func_dirname_result" lib=$ladir/$old_library if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" fi continue fi fi ;; *) ;; esac fi fi ;; # -l *.ltframework) if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" if test "$linkmode" = lib ; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;; esac fi fi continue ;; -L*) case $linkmode in lib) deplibs="$deplib $deplibs" test "$pass" = conv && continue newdependency_libs="$deplib $newdependency_libs" func_stripname '-L' '' "$deplib" newlib_search_path="$newlib_search_path $func_stripname_result" ;; prog) if test "$pass" = conv; then deplibs="$deplib $deplibs" continue fi if test "$pass" = scan; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi func_stripname '-L' '' "$deplib" newlib_search_path="$newlib_search_path $func_stripname_result" ;; *) func_warning "\`-L' is ignored for archives/objects" ;; esac # linkmode continue ;; # -L -R*) if test "$pass" = link; then func_stripname '-R' '' "$deplib" dir=$func_stripname_result # Make sure the xrpath contains only unique directories. case "$xrpath " in *" $dir "*) ;; *) xrpath="$xrpath $dir" ;; esac fi deplibs="$deplib $deplibs" continue ;; *.la) lib="$deplib" ;; *.$libext) if test "$pass" = conv; then deplibs="$deplib $deplibs" continue fi case $linkmode in lib) # Linking convenience modules into shared libraries is allowed, # but linking other static libraries is non-portable. case " $dlpreconveniencelibs " in *" $deplib "*) ;; *) valid_a_lib=no case $deplibs_check_method in match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` if eval "\$ECHO \"X$deplib\"" 2>/dev/null | $Xsed -e 10q \ | $EGREP "$match_pattern_regex" > /dev/null; then valid_a_lib=yes fi ;; pass_all) valid_a_lib=yes ;; esac if test "$valid_a_lib" != yes; then $ECHO $ECHO "*** Warning: Trying to link with static lib archive $deplib." $ECHO "*** I have the capability to make that library automatically link in when" $ECHO "*** you link to this library. But I can only do this if you have a" $ECHO "*** shared version of the library, which you do not appear to have" $ECHO "*** because the file extensions .$libext of this argument makes me believe" $ECHO "*** that it is just a static archive that I should not use here." else $ECHO $ECHO "*** Warning: Linking the shared library $output against the" $ECHO "*** static library $deplib is not portable!" deplibs="$deplib $deplibs" fi ;; esac continue ;; prog) if test "$pass" != link; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi continue ;; esac # linkmode ;; # *.$libext *.lo | *.$objext) if test "$pass" = conv; then deplibs="$deplib $deplibs" elif test "$linkmode" = prog; then if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then # If there is no dlopen support or we're linking statically, # we need to preload. newdlprefiles="$newdlprefiles $deplib" compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else newdlfiles="$newdlfiles $deplib" fi fi continue ;; %DEPLIBS%) alldeplibs=yes continue ;; esac # case $deplib if test "$found" = yes || test -f "$lib"; then : else func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'" fi # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$lib" \ || func_fatal_error "\`$lib' is not a valid libtool archive" func_dirname "$lib" "" "." ladir="$func_dirname_result" dlname= dlopen= dlpreopen= libdir= library_names= old_library= inherited_linker_flags= # If the library was installed with an old release of libtool, # it will not redefine variables installed, or shouldnotlink installed=yes shouldnotlink=no avoidtemprpath= # Read the .la file func_source "$lib" # Convert "-framework foo" to "foo.ltframework" if test -n "$inherited_linker_flags"; then tmp_inherited_linker_flags=`$ECHO "X$inherited_linker_flags" | $Xsed -e 's/-framework \([^ $]*\)/\1.ltframework/g'` for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do case " $new_inherited_linker_flags " in *" $tmp_inherited_linker_flag "*) ;; *) new_inherited_linker_flags="$new_inherited_linker_flags $tmp_inherited_linker_flag";; esac done fi dependency_libs=`$ECHO "X $dependency_libs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` if test "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan" || { test "$linkmode" != prog && test "$linkmode" != lib; }; then test -n "$dlopen" && dlfiles="$dlfiles $dlopen" test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen" fi if test "$pass" = conv; then # Only check for convenience libraries deplibs="$lib $deplibs" if test -z "$libdir"; then if test -z "$old_library"; then func_fatal_error "cannot find name of link library for \`$lib'" fi # It is a libtool convenience library, so add in its objects. convenience="$convenience $ladir/$objdir/$old_library" old_convenience="$old_convenience $ladir/$objdir/$old_library" tmp_libs= for deplib in $dependency_libs; do deplibs="$deplib $deplibs" if $opt_duplicate_deps ; then case "$tmp_libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi tmp_libs="$tmp_libs $deplib" done elif test "$linkmode" != prog && test "$linkmode" != lib; then func_fatal_error "\`$lib' is not a convenience library" fi continue fi # $pass = conv # Get the name of the library we link against. linklib= for l in $old_library $library_names; do linklib="$l" done if test -z "$linklib"; then func_fatal_error "cannot find name of link library for \`$lib'" fi # This library was specified with -dlopen. if test "$pass" = dlopen; then if test -z "$libdir"; then func_fatal_error "cannot -dlopen a convenience library: \`$lib'" fi if test -z "$dlname" || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then # If there is no dlname, no dlopen support or we're linking # statically, we need to preload. We also need to preload any # dependent libraries so libltdl's deplib preloader doesn't # bomb out in the load deplibs phase. dlprefiles="$dlprefiles $lib $dependency_libs" else newdlfiles="$newdlfiles $lib" fi continue fi # $pass = dlopen # We need an absolute path. case $ladir in [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;; *) abs_ladir=`cd "$ladir" && pwd` if test -z "$abs_ladir"; then func_warning "cannot determine absolute directory name of \`$ladir'" func_warning "passing it literally to the linker, although it might fail" abs_ladir="$ladir" fi ;; esac func_basename "$lib" laname="$func_basename_result" # Find the relevant object directory and library name. if test "X$installed" = Xyes; then if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then func_warning "library \`$lib' was moved." dir="$ladir" absdir="$abs_ladir" libdir="$abs_ladir" else dir="$libdir" absdir="$libdir" fi test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes else if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then dir="$ladir" absdir="$abs_ladir" # Remove this search path later notinst_path="$notinst_path $abs_ladir" else dir="$ladir/$objdir" absdir="$abs_ladir/$objdir" # Remove this search path later notinst_path="$notinst_path $abs_ladir" fi fi # $installed = yes func_stripname 'lib' '.la' "$laname" name=$func_stripname_result # This library was specified with -dlpreopen. if test "$pass" = dlpreopen; then if test -z "$libdir" && test "$linkmode" = prog; then func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'" fi # Prefer using a static library (so that no silly _DYNAMIC symbols # are required to link). if test -n "$old_library"; then newdlprefiles="$newdlprefiles $dir/$old_library" # Keep a list of preopened convenience libraries to check # that they are being used correctly in the link pass. test -z "$libdir" && \ dlpreconveniencelibs="$dlpreconveniencelibs $dir/$old_library" # Otherwise, use the dlname, so that lt_dlopen finds it. elif test -n "$dlname"; then newdlprefiles="$newdlprefiles $dir/$dlname" else newdlprefiles="$newdlprefiles $dir/$linklib" fi fi # $pass = dlpreopen if test -z "$libdir"; then # Link the convenience library if test "$linkmode" = lib; then deplibs="$dir/$old_library $deplibs" elif test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$dir/$old_library $compile_deplibs" finalize_deplibs="$dir/$old_library $finalize_deplibs" else deplibs="$lib $deplibs" # used for prog,scan pass fi continue fi if test "$linkmode" = prog && test "$pass" != link; then newlib_search_path="$newlib_search_path $ladir" deplibs="$lib $deplibs" linkalldeplibs=no if test "$link_all_deplibs" != no || test -z "$library_names" || test "$build_libtool_libs" = no; then linkalldeplibs=yes fi tmp_libs= for deplib in $dependency_libs; do case $deplib in -L*) func_stripname '-L' '' "$deplib" newlib_search_path="$newlib_search_path $func_stripname_result" ;; esac # Need to link against all dependency_libs? if test "$linkalldeplibs" = yes; then deplibs="$deplib $deplibs" else # Need to hardcode shared library paths # or/and link against static libraries newdependency_libs="$deplib $newdependency_libs" fi if $opt_duplicate_deps ; then case "$tmp_libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi tmp_libs="$tmp_libs $deplib" done # for deplib continue fi # $linkmode = prog... if test "$linkmode,$pass" = "prog,link"; then if test -n "$library_names" && { { test "$prefer_static_libs" = no || test "$prefer_static_libs,$installed" = "built,yes"; } || test -z "$old_library"; }; then # We need to hardcode the library path if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then # Make sure the rpath contains only unique directories. case "$temp_rpath:" in *"$absdir:"*) ;; *) temp_rpath="$temp_rpath$absdir:" ;; esac fi # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) compile_rpath="$compile_rpath $absdir" esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" esac ;; esac fi # $linkmode,$pass = prog,link... if test "$alldeplibs" = yes && { test "$deplibs_check_method" = pass_all || { test "$build_libtool_libs" = yes && test -n "$library_names"; }; }; then # We only need to search for static libraries continue fi fi link_static=no # Whether the deplib will be linked statically use_static_libs=$prefer_static_libs if test "$use_static_libs" = built && test "$installed" = yes; then use_static_libs=no fi if test -n "$library_names" && { test "$use_static_libs" = no || test -z "$old_library"; }; then case $host in *cygwin* | *mingw* | *cegcc*) # No point in relinking DLLs because paths are not encoded notinst_deplibs="$notinst_deplibs $lib" need_relink=no ;; *) if test "$installed" = no; then notinst_deplibs="$notinst_deplibs $lib" need_relink=yes fi ;; esac # This is a shared library # Warn about portability, can't link against -module's on some # systems (darwin). Don't bleat about dlopened modules though! dlopenmodule="" for dlpremoduletest in $dlprefiles; do if test "X$dlpremoduletest" = "X$lib"; then dlopenmodule="$dlpremoduletest" break fi done if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then $ECHO if test "$linkmode" = prog; then $ECHO "*** Warning: Linking the executable $output against the loadable module" else $ECHO "*** Warning: Linking the shared library $output against the loadable module" fi $ECHO "*** $linklib is not portable!" fi if test "$linkmode" = lib && test "$hardcode_into_libs" = yes; then # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) compile_rpath="$compile_rpath $absdir" esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" esac ;; esac fi if test -n "$old_archive_from_expsyms_cmds"; then # figure out the soname set dummy $library_names shift realname="$1" shift libname=`eval "\\$ECHO \"$libname_spec\""` # use dlname if we got it. it's perfectly good, no? if test -n "$dlname"; then soname="$dlname" elif test -n "$soname_spec"; then # bleh windows case $host in *cygwin* | mingw* | *cegcc*) func_arith $current - $age major=$func_arith_result versuffix="-$major" ;; esac eval soname=\"$soname_spec\" else soname="$realname" fi # Make a new name for the extract_expsyms_cmds to use soroot="$soname" func_basename "$soroot" soname="$func_basename_result" func_stripname 'lib' '.dll' "$soname" newlib=libimp-$func_stripname_result.a # If the library has no export list, then create one now if test -f "$output_objdir/$soname-def"; then : else func_verbose "extracting exported symbol list from \`$soname'" func_execute_cmds "$extract_expsyms_cmds" 'exit $?' fi # Create $newlib if test -f "$output_objdir/$newlib"; then :; else func_verbose "generating import library for \`$soname'" func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?' fi # make sure the library variables are pointing to the new library dir=$output_objdir linklib=$newlib fi # test -n "$old_archive_from_expsyms_cmds" if test "$linkmode" = prog || test "$mode" != relink; then add_shlibpath= add_dir= add= lib_linked=yes case $hardcode_action in immediate | unsupported) if test "$hardcode_direct" = no; then add="$dir/$linklib" case $host in *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;; *-*-sysv4*uw2*) add_dir="-L$dir" ;; *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ *-*-unixware7*) add_dir="-L$dir" ;; *-*-darwin* ) # if the lib is a (non-dlopened) module then we can not # link against it, someone is ignoring the earlier warnings if /usr/bin/file -L $add 2> /dev/null | $GREP ": [^:]* bundle" >/dev/null ; then if test "X$dlopenmodule" != "X$lib"; then $ECHO "*** Warning: lib $linklib is a module, not a shared library" if test -z "$old_library" ; then $ECHO $ECHO "*** And there doesn't seem to be a static archive available" $ECHO "*** The link will probably fail, sorry" else add="$dir/$old_library" fi elif test -n "$old_library"; then add="$dir/$old_library" fi fi esac elif test "$hardcode_minus_L" = no; then case $host in *-*-sunos*) add_shlibpath="$dir" ;; esac add_dir="-L$dir" add="-l$name" elif test "$hardcode_shlibpath_var" = no; then add_shlibpath="$dir" add="-l$name" else lib_linked=no fi ;; relink) if test "$hardcode_direct" = yes && test "$hardcode_direct_absolute" = no; then add="$dir/$linklib" elif test "$hardcode_minus_L" = yes; then add_dir="-L$dir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) add_dir="$add_dir -L$inst_prefix_dir$libdir" ;; esac fi add="-l$name" elif test "$hardcode_shlibpath_var" = yes; then add_shlibpath="$dir" add="-l$name" else lib_linked=no fi ;; *) lib_linked=no ;; esac if test "$lib_linked" != yes; then func_fatal_configuration "unsupported hardcode properties" fi if test -n "$add_shlibpath"; then case :$compile_shlibpath: in *":$add_shlibpath:"*) ;; *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;; esac fi if test "$linkmode" = prog; then test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" test -n "$add" && compile_deplibs="$add $compile_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" if test "$hardcode_direct" != yes && test "$hardcode_minus_L" != yes && test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; esac fi fi fi if test "$linkmode" = prog || test "$mode" = relink; then add_shlibpath= add_dir= add= # Finalize command for both is simple: just hardcode it. if test "$hardcode_direct" = yes && test "$hardcode_direct_absolute" = no; then add="$libdir/$linklib" elif test "$hardcode_minus_L" = yes; then add_dir="-L$libdir" add="-l$name" elif test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; esac add="-l$name" elif test "$hardcode_automatic" = yes; then if test -n "$inst_prefix_dir" && test -f "$inst_prefix_dir$libdir/$linklib" ; then add="$inst_prefix_dir$libdir/$linklib" else add="$libdir/$linklib" fi else # We cannot seem to hardcode it, guess we'll fake it. add_dir="-L$libdir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) add_dir="$add_dir -L$inst_prefix_dir$libdir" ;; esac fi add="-l$name" fi if test "$linkmode" = prog; then test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" test -n "$add" && finalize_deplibs="$add $finalize_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" fi fi elif test "$linkmode" = prog; then # Here we assume that one of hardcode_direct or hardcode_minus_L # is not unsupported. This is valid on all known static and # shared platforms. if test "$hardcode_direct" != unsupported; then test -n "$old_library" && linklib="$old_library" compile_deplibs="$dir/$linklib $compile_deplibs" finalize_deplibs="$dir/$linklib $finalize_deplibs" else compile_deplibs="-l$name -L$dir $compile_deplibs" finalize_deplibs="-l$name -L$dir $finalize_deplibs" fi elif test "$build_libtool_libs" = yes; then # Not a shared library if test "$deplibs_check_method" != pass_all; then # We're trying link a shared library against a static one # but the system doesn't support it. # Just print a warning and add the library to dependency_libs so # that the program can be linked against the static library. $ECHO $ECHO "*** Warning: This system can not link to static lib archive $lib." $ECHO "*** I have the capability to make that library automatically link in when" $ECHO "*** you link to this library. But I can only do this if you have a" $ECHO "*** shared version of the library, which you do not appear to have." if test "$module" = yes; then $ECHO "*** But as you try to build a module library, libtool will still create " $ECHO "*** a static module, that should work as long as the dlopening application" $ECHO "*** is linked with the -dlopen flag to resolve symbols at runtime." if test -z "$global_symbol_pipe"; then $ECHO $ECHO "*** However, this would only work if libtool was able to extract symbol" $ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could" $ECHO "*** not find such a program. So, this module is probably useless." $ECHO "*** \`nm' from GNU binutils and a full rebuild may help." fi if test "$build_old_libs" = no; then build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi else deplibs="$dir/$old_library $deplibs" link_static=yes fi fi # link shared/static library? if test "$linkmode" = lib; then if test -n "$dependency_libs" && { test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes || test "$link_static" = yes; }; then # Extract -R from dependency_libs temp_deplibs= for libdir in $dependency_libs; do case $libdir in -R*) func_stripname '-R' '' "$libdir" temp_xrpath=$func_stripname_result case " $xrpath " in *" $temp_xrpath "*) ;; *) xrpath="$xrpath $temp_xrpath";; esac;; *) temp_deplibs="$temp_deplibs $libdir";; esac done dependency_libs="$temp_deplibs" fi newlib_search_path="$newlib_search_path $absdir" # Link against this library test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" # ... and its dependency_libs tmp_libs= for deplib in $dependency_libs; do newdependency_libs="$deplib $newdependency_libs" if $opt_duplicate_deps ; then case "$tmp_libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi tmp_libs="$tmp_libs $deplib" done if test "$link_all_deplibs" != no; then # Add the search paths of all dependency libraries for deplib in $dependency_libs; do path= case $deplib in -L*) path="$deplib" ;; *.la) func_dirname "$deplib" "" "." dir="$func_dirname_result" # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; *) absdir=`cd "$dir" && pwd` if test -z "$absdir"; then func_warning "cannot determine absolute directory name of \`$dir'" absdir="$dir" fi ;; esac if $GREP "^installed=no" $deplib > /dev/null; then case $host in *-*-darwin*) depdepl= eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` if test -n "$deplibrary_names" ; then for tmp in $deplibrary_names ; do depdepl=$tmp done if test -f "$absdir/$objdir/$depdepl" ; then depdepl="$absdir/$objdir/$depdepl" darwin_install_name=`${OTOOL} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` if test -z "$darwin_install_name"; then darwin_install_name=`${OTOOL64} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` fi compiler_flags="$compiler_flags ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}" linker_flags="$linker_flags -dylib_file ${darwin_install_name}:${depdepl}" path= fi fi ;; *) path="-L$absdir/$objdir" ;; esac else eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` test -z "$libdir" && \ func_fatal_error "\`$deplib' is not a valid libtool archive" test "$absdir" != "$libdir" && \ func_warning "\`$deplib' seems to be moved" path="-L$absdir" fi ;; esac case " $deplibs " in *" $path "*) ;; *) deplibs="$path $deplibs" ;; esac done fi # link_all_deplibs != no fi # linkmode = lib done # for deplib in $libs if test "$pass" = link; then if test "$linkmode" = "prog"; then compile_deplibs="$new_inherited_linker_flags $compile_deplibs" finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs" else compiler_flags="$compiler_flags "`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` fi fi dependency_libs="$newdependency_libs" if test "$pass" = dlpreopen; then # Link the dlpreopened libraries before other libraries for deplib in $save_deplibs; do deplibs="$deplib $deplibs" done fi if test "$pass" != dlopen; then if test "$pass" != conv; then # Make sure lib_search_path contains only unique directories. lib_search_path= for dir in $newlib_search_path; do case "$lib_search_path " in *" $dir "*) ;; *) lib_search_path="$lib_search_path $dir" ;; esac done newlib_search_path= fi if test "$linkmode,$pass" != "prog,link"; then vars="deplibs" else vars="compile_deplibs finalize_deplibs" fi for var in $vars dependency_libs; do # Add libraries to $var in reverse order eval tmp_libs=\"\$$var\" new_libs= for deplib in $tmp_libs; do # FIXME: Pedantically, this is the right thing to do, so # that some nasty dependency loop isn't accidentally # broken: #new_libs="$deplib $new_libs" # Pragmatically, this seems to cause very few problems in # practice: case $deplib in -L*) new_libs="$deplib $new_libs" ;; -R*) ;; *) # And here is the reason: when a library appears more # than once as an explicit dependence of a library, or # is implicitly linked in more than once by the # compiler, it is considered special, and multiple # occurrences thereof are not removed. Compare this # with having the same library being listed as a # dependency of multiple other libraries: in this case, # we know (pedantically, we assume) the library does not # need to be listed more than once, so we keep only the # last copy. This is not always right, but it is rare # enough that we require users that really mean to play # such unportable linking tricks to link the library # using -Wl,-lname, so that libtool does not consider it # for duplicate removal. case " $specialdeplibs " in *" $deplib "*) new_libs="$deplib $new_libs" ;; *) case " $new_libs " in *" $deplib "*) ;; *) new_libs="$deplib $new_libs" ;; esac ;; esac ;; esac done tmp_libs= for deplib in $new_libs; do case $deplib in -L*) case " $tmp_libs " in *" $deplib "*) ;; *) tmp_libs="$tmp_libs $deplib" ;; esac ;; *) tmp_libs="$tmp_libs $deplib" ;; esac done eval $var=\"$tmp_libs\" done # for var fi # Last step: remove runtime libs from dependency_libs # (they stay in deplibs) tmp_libs= for i in $dependency_libs ; do case " $predeps $postdeps $compiler_lib_search_path " in *" $i "*) i="" ;; esac if test -n "$i" ; then tmp_libs="$tmp_libs $i" fi done dependency_libs=$tmp_libs done # for pass if test "$linkmode" = prog; then dlfiles="$newdlfiles" fi if test "$linkmode" = prog || test "$linkmode" = lib; then dlprefiles="$newdlprefiles" fi case $linkmode in oldlib) if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then func_warning "\`-dlopen' is ignored for archives" fi case " $deplibs" in *\ -l* | *\ -L*) func_warning "\`-l' and \`-L' are ignored for archives" ;; esac test -n "$rpath" && \ func_warning "\`-rpath' is ignored for archives" test -n "$xrpath" && \ func_warning "\`-R' is ignored for archives" test -n "$vinfo" && \ func_warning "\`-version-info/-version-number' is ignored for archives" test -n "$release" && \ func_warning "\`-release' is ignored for archives" test -n "$export_symbols$export_symbols_regex" && \ func_warning "\`-export-symbols' is ignored for archives" # Now set the variables for building old libraries. build_libtool_libs=no oldlibs="$output" objs="$objs$old_deplibs" ;; lib) # Make sure we only generate libraries of the form `libNAME.la'. case $outputname in lib*) func_stripname 'lib' '.la' "$outputname" name=$func_stripname_result eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" ;; *) test "$module" = no && \ func_fatal_help "libtool library \`$output' must begin with \`lib'" if test "$need_lib_prefix" != no; then # Add the "lib" prefix for modules if required func_stripname '' '.la' "$outputname" name=$func_stripname_result eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" else func_stripname '' '.la' "$outputname" libname=$func_stripname_result fi ;; esac if test -n "$objs"; then if test "$deplibs_check_method" != pass_all; then func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs" else $ECHO $ECHO "*** Warning: Linking the shared library $output against the non-libtool" $ECHO "*** objects $objs is not portable!" libobjs="$libobjs $objs" fi fi test "$dlself" != no && \ func_warning "\`-dlopen self' is ignored for libtool libraries" set dummy $rpath shift test "$#" -gt 1 && \ func_warning "ignoring multiple \`-rpath's for a libtool library" install_libdir="$1" oldlibs= if test -z "$rpath"; then if test "$build_libtool_libs" = yes; then # Building a libtool convenience library. # Some compilers have problems with a `.al' extension so # convenience libraries should have the same extension an # archive normally would. oldlibs="$output_objdir/$libname.$libext $oldlibs" build_libtool_libs=convenience build_old_libs=yes fi test -n "$vinfo" && \ func_warning "\`-version-info/-version-number' is ignored for convenience libraries" test -n "$release" && \ func_warning "\`-release' is ignored for convenience libraries" else # Parse the version information argument. save_ifs="$IFS"; IFS=':' set dummy $vinfo 0 0 0 shift IFS="$save_ifs" test -n "$7" && \ func_fatal_help "too many parameters to \`-version-info'" # convert absolute version numbers to libtool ages # this retains compatibility with .la files and attempts # to make the code below a bit more comprehensible case $vinfo_number in yes) number_major="$1" number_minor="$2" number_revision="$3" # # There are really only two kinds -- those that # use the current revision as the major version # and those that subtract age and use age as # a minor version. But, then there is irix # which has an extra 1 added just for fun # case $version_type in darwin|linux|osf|windows|none) func_arith $number_major + $number_minor current=$func_arith_result age="$number_minor" revision="$number_revision" ;; freebsd-aout|freebsd-elf|sunos) current="$number_major" revision="$number_minor" age="0" ;; irix|nonstopux) func_arith $number_major + $number_minor current=$func_arith_result age="$number_minor" revision="$number_minor" lt_irix_increment=no ;; *) func_fatal_configuration "$modename: unknown library version type \`$version_type'" ;; esac ;; no) current="$1" revision="$2" age="$3" ;; esac # Check that each of the things are valid numbers. case $current in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "CURRENT \`$current' must be a nonnegative integer" func_fatal_error "\`$vinfo' is not valid version information" ;; esac case $revision in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "REVISION \`$revision' must be a nonnegative integer" func_fatal_error "\`$vinfo' is not valid version information" ;; esac case $age in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "AGE \`$age' must be a nonnegative integer" func_fatal_error "\`$vinfo' is not valid version information" ;; esac if test "$age" -gt "$current"; then func_error "AGE \`$age' is greater than the current interface number \`$current'" func_fatal_error "\`$vinfo' is not valid version information" fi # Calculate the version variables. major= versuffix= verstring= case $version_type in none) ;; darwin) # Like Linux, but with the current version available in # verstring for coding it into the library header func_arith $current - $age major=.$func_arith_result versuffix="$major.$age.$revision" # Darwin ld doesn't like 0 for these options... func_arith $current + 1 minor_current=$func_arith_result xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" ;; freebsd-aout) major=".$current" versuffix=".$current.$revision"; ;; freebsd-elf) major=".$current" versuffix=".$current" ;; irix | nonstopux) if test "X$lt_irix_increment" = "Xno"; then func_arith $current - $age else func_arith $current - $age + 1 fi major=$func_arith_result case $version_type in nonstopux) verstring_prefix=nonstopux ;; *) verstring_prefix=sgi ;; esac verstring="$verstring_prefix$major.$revision" # Add in all the interfaces that we are compatible with. loop=$revision while test "$loop" -ne 0; do func_arith $revision - $loop iface=$func_arith_result func_arith $loop - 1 loop=$func_arith_result verstring="$verstring_prefix$major.$iface:$verstring" done # Before this point, $major must not contain `.'. major=.$major versuffix="$major.$revision" ;; linux) func_arith $current - $age major=.$func_arith_result versuffix="$major.$age.$revision" ;; osf) func_arith $current - $age major=.$func_arith_result versuffix=".$current.$age.$revision" verstring="$current.$age.$revision" # Add in all the interfaces that we are compatible with. loop=$age while test "$loop" -ne 0; do func_arith $current - $loop iface=$func_arith_result func_arith $loop - 1 loop=$func_arith_result verstring="$verstring:${iface}.0" done # Make executables depend on our current version. verstring="$verstring:${current}.0" ;; qnx) major=".$current" versuffix=".$current" ;; sunos) major=".$current" versuffix=".$current.$revision" ;; windows) # Use '-' rather than '.', since we only want one # extension on DOS 8.3 filesystems. func_arith $current - $age major=$func_arith_result versuffix="-$major" ;; *) func_fatal_configuration "unknown library version type \`$version_type'" ;; esac # Clear the version info if we defaulted, and they specified a release. if test -z "$vinfo" && test -n "$release"; then major= case $version_type in darwin) # we can't check for "0.0" in archive_cmds due to quoting # problems, so we reset it completely verstring= ;; *) verstring="0.0" ;; esac if test "$need_version" = no; then versuffix= else versuffix=".0.0" fi fi # Remove version info from name if versioning should be avoided if test "$avoid_version" = yes && test "$need_version" = no; then major= versuffix= verstring="" fi # Check to see if the archive will have undefined symbols. if test "$allow_undefined" = yes; then if test "$allow_undefined_flag" = unsupported; then func_warning "undefined symbols not allowed in $host shared libraries" build_libtool_libs=no build_old_libs=yes fi else # Don't allow undefined symbols. allow_undefined_flag="$no_undefined_flag" fi fi func_generate_dlsyms "$libname" "$libname" "yes" libobjs="$libobjs $symfileobj" test "X$libobjs" = "X " && libobjs= if test "$mode" != relink; then # Remove our outputs, but don't remove object files since they # may have been created when compiling PIC objects. removelist= tempremovelist=`$ECHO "$output_objdir/*"` for p in $tempremovelist; do case $p in *.$objext | *.gcno) ;; $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) if test "X$precious_files_regex" != "X"; then if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 then continue fi fi removelist="$removelist $p" ;; *) ;; esac done test -n "$removelist" && \ func_show_eval "${RM}r \$removelist" fi # Now set the variables for building old libraries. if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then oldlibs="$oldlibs $output_objdir/$libname.$libext" # Transform .lo files to .o files. oldobjs="$objs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP` fi # Eliminate all temporary directories. #for path in $notinst_path; do # lib_search_path=`$ECHO "X$lib_search_path " | $Xsed -e "s% $path % %g"` # deplibs=`$ECHO "X$deplibs " | $Xsed -e "s% -L$path % %g"` # dependency_libs=`$ECHO "X$dependency_libs " | $Xsed -e "s% -L$path % %g"` #done if test -n "$xrpath"; then # If the user specified any rpath flags, then add them. temp_xrpath= for libdir in $xrpath; do temp_xrpath="$temp_xrpath -R$libdir" case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" ;; esac done if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then dependency_libs="$temp_xrpath $dependency_libs" fi fi # Make sure dlfiles contains only unique files that won't be dlpreopened old_dlfiles="$dlfiles" dlfiles= for lib in $old_dlfiles; do case " $dlprefiles $dlfiles " in *" $lib "*) ;; *) dlfiles="$dlfiles $lib" ;; esac done # Make sure dlprefiles contains only unique files old_dlprefiles="$dlprefiles" dlprefiles= for lib in $old_dlprefiles; do case "$dlprefiles " in *" $lib "*) ;; *) dlprefiles="$dlprefiles $lib" ;; esac done if test "$build_libtool_libs" = yes; then if test -n "$rpath"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc*) # these systems don't actually have a c library (as such)! ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C library is in the System framework deplibs="$deplibs System.ltframework" ;; *-*-netbsd*) # Don't link with libc until the a.out ld.so is fixed. ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc due to us having libc/libc_r. ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work ;; *) # Add libc to deplibs on all other systems if necessary. if test "$build_libtool_need_lc" = "yes"; then deplibs="$deplibs -lc" fi ;; esac fi # Transform deplibs into only deplibs that can be linked in shared. name_save=$name libname_save=$libname release_save=$release versuffix_save=$versuffix major_save=$major # I'm not sure if I'm treating the release correctly. I think # release should show up in the -l (ie -lgmp5) so we don't want to # add it in twice. Is that correct? release="" versuffix="" major="" newdeplibs= droppeddeps=no case $deplibs_check_method in pass_all) # Don't check for shared/static. Everything works. # This might be a little naive. We might want to check # whether the library exists or not. But this is on # osf3 & osf4 and I'm not really sure... Just # implementing what was already the behavior. newdeplibs=$deplibs ;; test_compile) # This code stresses the "libraries are programs" paradigm to its # limits. Maybe even breaks it. We compile a program, linking it # against the deplibs as a proxy for the library. Then we can check # whether they linked in statically or dynamically with ldd. $opt_dry_run || $RM conftest.c cat > conftest.c </dev/null` for potent_lib in $potential_libs; do # Follow soft links. if ls -lLd "$potent_lib" 2>/dev/null | $GREP " -> " >/dev/null; then continue fi # The statement above tries to avoid entering an # endless loop below, in case of cyclic links. # We might still enter an endless loop, since a link # loop can be closed while we follow links, # but so what? potlib="$potent_lib" while test -h "$potlib" 2>/dev/null; do potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` case $potliblink in [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; *) potlib=`$ECHO "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";; esac done if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | $SED -e 10q | $EGREP "$file_magic_regex" > /dev/null; then newdeplibs="$newdeplibs $a_deplib" a_deplib="" break 2 fi done done fi if test -n "$a_deplib" ; then droppeddeps=yes $ECHO $ECHO "*** Warning: linker path does not have real file for library $a_deplib." $ECHO "*** I have the capability to make that library automatically link in when" $ECHO "*** you link to this library. But I can only do this if you have a" $ECHO "*** shared version of the library, which you do not appear to have" $ECHO "*** because I did check the linker path looking for a file starting" if test -z "$potlib" ; then $ECHO "*** with $libname but no candidates were found. (...for file magic test)" else $ECHO "*** with $libname and none of the candidates passed a file format test" $ECHO "*** using a file magic. Last file checked: $potlib" fi fi ;; *) # Add a -L argument. newdeplibs="$newdeplibs $a_deplib" ;; esac done # Gone through all deplibs. ;; match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` for a_deplib in $deplibs; do case $a_deplib in -l*) func_stripname -l '' "$a_deplib" name=$func_stripname_result if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $a_deplib "*) newdeplibs="$newdeplibs $a_deplib" a_deplib="" ;; esac fi if test -n "$a_deplib" ; then libname=`eval "\\$ECHO \"$libname_spec\""` for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do potential_libs=`ls $i/$libname[.-]* 2>/dev/null` for potent_lib in $potential_libs; do potlib="$potent_lib" # see symlink-check above in file_magic test if eval "\$ECHO \"X$potent_lib\"" 2>/dev/null | $Xsed -e 10q | \ $EGREP "$match_pattern_regex" > /dev/null; then newdeplibs="$newdeplibs $a_deplib" a_deplib="" break 2 fi done done fi if test -n "$a_deplib" ; then droppeddeps=yes $ECHO $ECHO "*** Warning: linker path does not have real file for library $a_deplib." $ECHO "*** I have the capability to make that library automatically link in when" $ECHO "*** you link to this library. But I can only do this if you have a" $ECHO "*** shared version of the library, which you do not appear to have" $ECHO "*** because I did check the linker path looking for a file starting" if test -z "$potlib" ; then $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)" else $ECHO "*** with $libname and none of the candidates passed a file format test" $ECHO "*** using a regex pattern. Last file checked: $potlib" fi fi ;; *) # Add a -L argument. newdeplibs="$newdeplibs $a_deplib" ;; esac done # Gone through all deplibs. ;; none | unknown | *) newdeplibs="" tmp_deplibs=`$ECHO "X $deplibs" | $Xsed \ -e 's/ -lc$//' -e 's/ -[LR][^ ]*//g'` if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then for i in $predeps $postdeps ; do # can't use Xsed below, because $i might contain '/' tmp_deplibs=`$ECHO "X $tmp_deplibs" | $Xsed -e "s,$i,,"` done fi if $ECHO "X $tmp_deplibs" | $Xsed -e 's/[ ]//g' | $GREP . >/dev/null; then $ECHO if test "X$deplibs_check_method" = "Xnone"; then $ECHO "*** Warning: inter-library dependencies are not supported in this platform." else $ECHO "*** Warning: inter-library dependencies are not known to be supported." fi $ECHO "*** All declared inter-library dependencies are being dropped." droppeddeps=yes fi ;; esac versuffix=$versuffix_save major=$major_save release=$release_save libname=$libname_save name=$name_save case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library with the System framework newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's/ -lc / System.ltframework /'` ;; esac if test "$droppeddeps" = yes; then if test "$module" = yes; then $ECHO $ECHO "*** Warning: libtool could not satisfy all declared inter-library" $ECHO "*** dependencies of module $libname. Therefore, libtool will create" $ECHO "*** a static module, that should work as long as the dlopening" $ECHO "*** application is linked with the -dlopen flag." if test -z "$global_symbol_pipe"; then $ECHO $ECHO "*** However, this would only work if libtool was able to extract symbol" $ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could" $ECHO "*** not find such a program. So, this module is probably useless." $ECHO "*** \`nm' from GNU binutils and a full rebuild may help." fi if test "$build_old_libs" = no; then oldlibs="$output_objdir/$libname.$libext" build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi else $ECHO "*** The inter-library dependencies that have been dropped here will be" $ECHO "*** automatically added whenever a program is linked with this library" $ECHO "*** or is declared to -dlopen it." if test "$allow_undefined" = no; then $ECHO $ECHO "*** Since this library must not contain undefined symbols," $ECHO "*** because either the platform does not support them or" $ECHO "*** it was explicitly requested with -no-undefined," $ECHO "*** libtool will only create a static version of it." if test "$build_old_libs" = no; then oldlibs="$output_objdir/$libname.$libext" build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi fi fi # Done checking deplibs! deplibs=$newdeplibs fi # Time to change all our "foo.ltframework" stuff back to "-framework foo" case $host in *-*-darwin*) newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` new_inherited_linker_flags=`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` deplibs=`$ECHO "X $deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` ;; esac # move library search paths that coincide with paths to not yet # installed libraries to the beginning of the library search list new_libs= for path in $notinst_path; do case " $new_libs " in *" -L$path/$objdir "*) ;; *) case " $deplibs " in *" -L$path/$objdir "*) new_libs="$new_libs -L$path/$objdir" ;; esac ;; esac done for deplib in $deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) new_libs="$new_libs $deplib" ;; esac ;; *) new_libs="$new_libs $deplib" ;; esac done deplibs="$new_libs" # All the library-specific variables (install_libdir is set above). library_names= old_library= dlname= # Test again, we may have decided not to build it any more if test "$build_libtool_libs" = yes; then if test "$hardcode_into_libs" = yes; then # Hardcode the library paths hardcode_libdirs= dep_rpath= rpath="$finalize_rpath" test "$mode" != relink && rpath="$compile_rpath$rpath" for libdir in $rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" dep_rpath="$dep_rpath $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) perm_rpath="$perm_rpath $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" if test -n "$hardcode_libdir_flag_spec_ld"; then eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" else eval dep_rpath=\"$hardcode_libdir_flag_spec\" fi fi if test -n "$runpath_var" && test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do rpath="$rpath$dir:" done eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" fi test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" fi shlibpath="$finalize_shlibpath" test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath" if test -n "$shlibpath"; then eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" fi # Get the real and link names of the library. eval shared_ext=\"$shrext_cmds\" eval library_names=\"$library_names_spec\" set dummy $library_names shift realname="$1" shift if test -n "$soname_spec"; then eval soname=\"$soname_spec\" else soname="$realname" fi if test -z "$dlname"; then dlname=$soname fi lib="$output_objdir/$realname" linknames= for link do linknames="$linknames $link" done # Use standard objects if they are pic test -z "$pic_flag" && libobjs=`$ECHO "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` test "X$libobjs" = "X " && libobjs= delfiles= if test -n "$export_symbols" && test -n "$include_expsyms"; then $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp" export_symbols="$output_objdir/$libname.uexp" delfiles="$delfiles $export_symbols" fi orig_export_symbols= case $host_os in cygwin* | mingw* | cegcc*) if test -n "$export_symbols" && test -z "$export_symbols_regex"; then # exporting using user supplied symfile if test "x`$SED 1q $export_symbols`" != xEXPORTS; then # and it's NOT already a .def file. Must figure out # which of the given symbols are data symbols and tag # them as such. So, trigger use of export_symbols_cmds. # export_symbols gets reassigned inside the "prepare # the list of exported symbols" if statement, so the # include_expsyms logic still works. orig_export_symbols="$export_symbols" export_symbols= always_export_symbols=yes fi fi ;; esac # Prepare the list of exported symbols if test -z "$export_symbols"; then if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then func_verbose "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" $opt_dry_run || $RM $export_symbols cmds=$export_symbols_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" func_len " $cmd" len=$func_len_result if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then func_show_eval "$cmd" 'exit $?' skipped_export=false else # The command line is too long to execute in one step. func_verbose "using reloadable object file for export list..." skipped_export=: # Break out early, otherwise skipped_export may be # set to false by a later but shorter cmd. break fi done IFS="$save_ifs" if test -n "$export_symbols_regex" && test "X$skipped_export" != "X:"; then func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' func_show_eval '$MV "${export_symbols}T" "$export_symbols"' fi fi fi if test -n "$export_symbols" && test -n "$include_expsyms"; then tmp_export_symbols="$export_symbols" test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"' fi if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then # The given exports_symbols file has to be filtered, so filter it. func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" # FIXME: $output_objdir/$libname.filter potentially contains lots of # 's' commands which not all seds can handle. GNU sed should be fine # though. Also, the filter scales superlinearly with the number of # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter delfiles="$delfiles $export_symbols $output_objdir/$libname.filter" export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi tmp_deplibs= for test_deplib in $deplibs; do case " $convenience " in *" $test_deplib "*) ;; *) tmp_deplibs="$tmp_deplibs $test_deplib" ;; esac done deplibs="$tmp_deplibs" if test -n "$convenience"; then if test -n "$whole_archive_flag_spec" && test "$compiler_needs_object" = yes && test -z "$libobjs"; then # extract the archives, so we have objects to list. # TODO: could optimize this to just extract one archive. whole_archive_flag_spec= fi if test -n "$whole_archive_flag_spec"; then save_libobjs=$libobjs eval libobjs=\"\$libobjs $whole_archive_flag_spec\" test "X$libobjs" = "X " && libobjs= else gentop="$output_objdir/${outputname}x" generated="$generated $gentop" func_extract_archives $gentop $convenience libobjs="$libobjs $func_extract_archives_result" test "X$libobjs" = "X " && libobjs= fi fi if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then eval flag=\"$thread_safe_flag_spec\" linker_flags="$linker_flags $flag" fi # Make a backup of the uninstalled library when relinking if test "$mode" = relink; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $? fi # Do each of the archive commands. if test "$module" = yes && test -n "$module_cmds" ; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then eval test_cmds=\"$module_expsym_cmds\" cmds=$module_expsym_cmds else eval test_cmds=\"$module_cmds\" cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then eval test_cmds=\"$archive_expsym_cmds\" cmds=$archive_expsym_cmds else eval test_cmds=\"$archive_cmds\" cmds=$archive_cmds fi fi if test "X$skipped_export" != "X:" && func_len " $test_cmds" && len=$func_len_result && test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then : else # The command line is too long to link in one step, link piecewise # or, if using GNU ld and skipped_export is not :, use a linker # script. # Save the value of $output and $libobjs because we want to # use them later. If we have whole_archive_flag_spec, we # want to use save_libobjs as it was before # whole_archive_flag_spec was expanded, because we can't # assume the linker understands whole_archive_flag_spec. # This may have to be revisited, in case too many # convenience libraries get linked in and end up exceeding # the spec. if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then save_libobjs=$libobjs fi save_output=$output output_la=`$ECHO "X$output" | $Xsed -e "$basename"` # Clear the reloadable object creation command queue and # initialize k to one. test_cmds= concat_cmds= objlist= last_robj= k=1 if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then output=${output_objdir}/${output_la}.lnkscript func_verbose "creating GNU ld script: $output" $ECHO 'INPUT (' > $output for obj in $save_libobjs do $ECHO "$obj" >> $output done $ECHO ')' >> $output delfiles="$delfiles $output" elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then output=${output_objdir}/${output_la}.lnk func_verbose "creating linker input file list: $output" : > $output set x $save_libobjs shift firstobj= if test "$compiler_needs_object" = yes; then firstobj="$1 " shift fi for obj do $ECHO "$obj" >> $output done delfiles="$delfiles $output" output=$firstobj\"$file_list_spec$output\" else if test -n "$save_libobjs"; then func_verbose "creating reloadable object files..." output=$output_objdir/$output_la-${k}.$objext eval test_cmds=\"$reload_cmds\" func_len " $test_cmds" len0=$func_len_result len=$len0 # Loop over the list of objects to be linked. for obj in $save_libobjs do func_len " $obj" func_arith $len + $func_len_result len=$func_arith_result if test "X$objlist" = X || test "$len" -lt "$max_cmd_len"; then func_append objlist " $obj" else # The command $test_cmds is almost too long, add a # command to the queue. if test "$k" -eq 1 ; then # The first file doesn't have a previous command to add. eval concat_cmds=\"$reload_cmds $objlist $last_robj\" else # All subsequent reloadable object files will link in # the last one created. eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj~\$RM $last_robj\" fi last_robj=$output_objdir/$output_la-${k}.$objext func_arith $k + 1 k=$func_arith_result output=$output_objdir/$output_la-${k}.$objext objlist=$obj func_len " $last_robj" func_arith $len0 + $func_len_result len=$func_arith_result fi done # Handle the remaining objects by creating one last # reloadable object file. All subsequent reloadable object # files will link in the last one created. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\" if test -n "$last_robj"; then eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\" fi delfiles="$delfiles $output" else output= fi if ${skipped_export-false}; then func_verbose "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" $opt_dry_run || $RM $export_symbols libobjs=$output # Append the command to create the export file. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\" if test -n "$last_robj"; then eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" fi fi test -n "$save_libobjs" && func_verbose "creating a temporary reloadable object file: $output" # Loop through the commands generated above and execute them. save_ifs="$IFS"; IFS='~' for cmd in $concat_cmds; do IFS="$save_ifs" $opt_silent || { func_quote_for_expand "$cmd" eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test "$mode" = relink; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) fi exit $lt_exit } done IFS="$save_ifs" if test -n "$export_symbols_regex" && ${skipped_export-false}; then func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' func_show_eval '$MV "${export_symbols}T" "$export_symbols"' fi fi if ${skipped_export-false}; then if test -n "$export_symbols" && test -n "$include_expsyms"; then tmp_export_symbols="$export_symbols" test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"' fi if test -n "$orig_export_symbols"; then # The given exports_symbols file has to be filtered, so filter it. func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" # FIXME: $output_objdir/$libname.filter potentially contains lots of # 's' commands which not all seds can handle. GNU sed should be fine # though. Also, the filter scales superlinearly with the number of # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter delfiles="$delfiles $export_symbols $output_objdir/$libname.filter" export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi fi libobjs=$output # Restore the value of output. output=$save_output if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then eval libobjs=\"\$libobjs $whole_archive_flag_spec\" test "X$libobjs" = "X " && libobjs= fi # Expand the library linking commands again to reset the # value of $libobjs for piecewise linking. # Do each of the archive commands. if test "$module" = yes && test -n "$module_cmds" ; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then cmds=$module_expsym_cmds else cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then cmds=$archive_expsym_cmds else cmds=$archive_cmds fi fi fi if test -n "$delfiles"; then # Append the command to remove temporary files to $cmds. eval cmds=\"\$cmds~\$RM $delfiles\" fi # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then gentop="$output_objdir/${outputname}x" generated="$generated $gentop" func_extract_archives $gentop $dlprefiles libobjs="$libobjs $func_extract_archives_result" test "X$libobjs" = "X " && libobjs= fi save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $opt_silent || { func_quote_for_expand "$cmd" eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test "$mode" = relink; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) fi exit $lt_exit } done IFS="$save_ifs" # Restore the uninstalled library and exit if test "$mode" = relink; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $? if test -n "$convenience"; then if test -z "$whole_archive_flag_spec"; then func_show_eval '${RM}r "$gentop"' fi fi exit $EXIT_SUCCESS fi # Create links to the real library. for linkname in $linknames; do if test "$realname" != "$linkname"; then func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?' fi done # If -module or -export-dynamic was specified, set the dlname. if test "$module" = yes || test "$export_dynamic" = yes; then # On all known operating systems, these are identical. dlname="$soname" fi fi ;; obj) if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then func_warning "\`-dlopen' is ignored for objects" fi case " $deplibs" in *\ -l* | *\ -L*) func_warning "\`-l' and \`-L' are ignored for objects" ;; esac test -n "$rpath" && \ func_warning "\`-rpath' is ignored for objects" test -n "$xrpath" && \ func_warning "\`-R' is ignored for objects" test -n "$vinfo" && \ func_warning "\`-version-info' is ignored for objects" test -n "$release" && \ func_warning "\`-release' is ignored for objects" case $output in *.lo) test -n "$objs$old_deplibs" && \ func_fatal_error "cannot build library object \`$output' from non-libtool objects" libobj=$output func_lo2o "$libobj" obj=$func_lo2o_result ;; *) libobj= obj="$output" ;; esac # Delete the old objects. $opt_dry_run || $RM $obj $libobj # Objects from convenience libraries. This assumes # single-version convenience libraries. Whenever we create # different ones for PIC/non-PIC, this we'll have to duplicate # the extraction. reload_conv_objs= gentop= # reload_cmds runs $LD directly, so let us get rid of # -Wl from whole_archive_flag_spec and hope we can get by with # turning comma into space.. wl= if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" reload_conv_objs=$reload_objs\ `$ECHO "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'` else gentop="$output_objdir/${obj}x" generated="$generated $gentop" func_extract_archives $gentop $convenience reload_conv_objs="$reload_objs $func_extract_archives_result" fi fi # Create the old-style object. reload_objs="$objs$old_deplibs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test output="$obj" func_execute_cmds "$reload_cmds" 'exit $?' # Exit if we aren't doing a library object file. if test -z "$libobj"; then if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi exit $EXIT_SUCCESS fi if test "$build_libtool_libs" != yes; then if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi # Create an invalid libtool object if no PIC, so that we don't # accidentally link it into a program. # $show "echo timestamp > $libobj" # $opt_dry_run || eval "echo timestamp > $libobj" || exit $? exit $EXIT_SUCCESS fi if test -n "$pic_flag" || test "$pic_mode" != default; then # Only do commands if we really have different PIC objects. reload_objs="$libobjs $reload_conv_objs" output="$libobj" func_execute_cmds "$reload_cmds" 'exit $?' fi if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi exit $EXIT_SUCCESS ;; prog) case $host in *cygwin*) func_stripname '' '.exe' "$output" output=$func_stripname_result.exe;; esac test -n "$vinfo" && \ func_warning "\`-version-info' is ignored for programs" test -n "$release" && \ func_warning "\`-release' is ignored for programs" test "$preload" = yes \ && test "$dlopen_support" = unknown \ && test "$dlopen_self" = unknown \ && test "$dlopen_self_static" = unknown && \ func_warning "\`LT_INIT([dlopen])' not used. Assuming no dlopen support." case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library is the System framework compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'` finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'` ;; esac case $host in *-*-darwin*) # Don't allow lazy linking, it breaks C++ global constructors # But is supposedly fixed on 10.4 or later (yay!). if test "$tagname" = CXX ; then case ${MACOSX_DEPLOYMENT_TARGET-10.0} in 10.[0123]) compile_command="$compile_command ${wl}-bind_at_load" finalize_command="$finalize_command ${wl}-bind_at_load" ;; esac fi # Time to change all our "foo.ltframework" stuff back to "-framework foo" compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` ;; esac # move library search paths that coincide with paths to not yet # installed libraries to the beginning of the library search list new_libs= for path in $notinst_path; do case " $new_libs " in *" -L$path/$objdir "*) ;; *) case " $compile_deplibs " in *" -L$path/$objdir "*) new_libs="$new_libs -L$path/$objdir" ;; esac ;; esac done for deplib in $compile_deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) new_libs="$new_libs $deplib" ;; esac ;; *) new_libs="$new_libs $deplib" ;; esac done compile_deplibs="$new_libs" compile_command="$compile_command $compile_deplibs" finalize_command="$finalize_command $finalize_deplibs" if test -n "$rpath$xrpath"; then # If the user specified any rpath flags, then add them. for libdir in $rpath $xrpath; do # This is the magic to use -rpath. case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" ;; esac done fi # Now hardcode the library paths rpath= hardcode_libdirs= for libdir in $compile_rpath $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" rpath="$rpath $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) perm_rpath="$perm_rpath $libdir" ;; esac fi case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'` case :$dllsearchpath: in *":$libdir:"*) ;; ::) dllsearchpath=$libdir;; *) dllsearchpath="$dllsearchpath:$libdir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; *) dllsearchpath="$dllsearchpath:$testbindir";; esac ;; esac done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" eval rpath=\" $hardcode_libdir_flag_spec\" fi compile_rpath="$rpath" rpath= hardcode_libdirs= for libdir in $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" rpath="$rpath $flag" fi elif test -n "$runpath_var"; then case "$finalize_perm_rpath " in *" $libdir "*) ;; *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" eval rpath=\" $hardcode_libdir_flag_spec\" fi finalize_rpath="$rpath" if test -n "$libobjs" && test "$build_old_libs" = yes; then # Transform all the library objects into standard objects. compile_command=`$ECHO "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` finalize_command=`$ECHO "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` fi func_generate_dlsyms "$outputname" "@PROGRAM@" "no" # template prelinking step if test -n "$prelink_cmds"; then func_execute_cmds "$prelink_cmds" 'exit $?' fi wrappers_required=yes case $host in *cygwin* | *mingw* ) if test "$build_libtool_libs" != yes; then wrappers_required=no fi ;; *cegcc) # Disable wrappers for cegcc, we are cross compiling anyway. wrappers_required=no ;; *) if test "$need_relink" = no || test "$build_libtool_libs" != yes; then wrappers_required=no fi ;; esac if test "$wrappers_required" = no; then # Replace the output file specification. compile_command=`$ECHO "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` link_command="$compile_command$compile_rpath" # We have no uninstalled library dependencies, so finalize right now. exit_status=0 func_show_eval "$link_command" 'exit_status=$?' # Delete the generated files. if test -f "$output_objdir/${outputname}S.${objext}"; then func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"' fi exit $exit_status fi if test -n "$compile_shlibpath$finalize_shlibpath"; then compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" fi if test -n "$finalize_shlibpath"; then finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" fi compile_var= finalize_var= if test -n "$runpath_var"; then if test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do rpath="$rpath$dir:" done compile_var="$runpath_var=\"$rpath\$$runpath_var\" " fi if test -n "$finalize_perm_rpath"; then # We should set the runpath_var. rpath= for dir in $finalize_perm_rpath; do rpath="$rpath$dir:" done finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " fi fi if test "$no_install" = yes; then # We don't need to create a wrapper script. link_command="$compile_var$compile_command$compile_rpath" # Replace the output file specification. link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` # Delete the old output file. $opt_dry_run || $RM $output # Link the executable and exit func_show_eval "$link_command" 'exit $?' exit $EXIT_SUCCESS fi if test "$hardcode_action" = relink; then # Fast installation is not supported link_command="$compile_var$compile_command$compile_rpath" relink_command="$finalize_var$finalize_command$finalize_rpath" func_warning "this platform does not like uninstalled shared libraries" func_warning "\`$output' will be relinked during installation" else if test "$fast_install" != no; then link_command="$finalize_var$compile_command$finalize_rpath" if test "$fast_install" = yes; then relink_command=`$ECHO "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'` else # fast_install is set to needless relink_command= fi else link_command="$compile_var$compile_command$compile_rpath" relink_command="$finalize_var$finalize_command$finalize_rpath" fi fi # Replace the output file specification. link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` # Delete the old output files. $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname func_show_eval "$link_command" 'exit $?' # Now create the wrapper script. func_verbose "creating $output" # Quote the relink command for shipping. if test -n "$relink_command"; then # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else func_quote_for_eval "$var_value" relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" fi done relink_command="(cd `pwd`; $relink_command)" relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"` fi # Quote $ECHO for shipping. if test "X$ECHO" = "X$SHELL $progpath --fallback-echo"; then case $progpath in [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";; *) qecho="$SHELL `pwd`/$progpath --fallback-echo";; esac qecho=`$ECHO "X$qecho" | $Xsed -e "$sed_quote_subst"` else qecho=`$ECHO "X$ECHO" | $Xsed -e "$sed_quote_subst"` fi # Only actually do things if not in dry run mode. $opt_dry_run || { # win32 will think the script is a binary if it has # a .exe suffix, so we strip it off here. case $output in *.exe) func_stripname '' '.exe' "$output" output=$func_stripname_result ;; esac # test for cygwin because mv fails w/o .exe extensions case $host in *cygwin*) exeext=.exe func_stripname '' '.exe' "$outputname" outputname=$func_stripname_result ;; *) exeext= ;; esac case $host in *cygwin* | *mingw* ) func_dirname_and_basename "$output" "" "." output_name=$func_basename_result output_path=$func_dirname_result cwrappersource="$output_path/$objdir/lt-$output_name.c" cwrapper="$output_path/$output_name.exe" $RM $cwrappersource $cwrapper trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 func_emit_cwrapperexe_src > $cwrappersource # The wrapper executable is built using the $host compiler, # because it contains $host paths and files. If cross- # compiling, it, like the target executable, must be # executed on the $host or under an emulation environment. $opt_dry_run || { $LTCC $LTCFLAGS -o $cwrapper $cwrappersource $STRIP $cwrapper } # Now, create the wrapper script for func_source use: func_ltwrapper_scriptname $cwrapper $RM $func_ltwrapper_scriptname_result trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15 $opt_dry_run || { # note: this script will not be executed, so do not chmod. if test "x$build" = "x$host" ; then $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result else func_emit_wrapper no > $func_ltwrapper_scriptname_result fi } ;; * ) $RM $output trap "$RM $output; exit $EXIT_FAILURE" 1 2 15 func_emit_wrapper no > $output chmod +x $output ;; esac } exit $EXIT_SUCCESS ;; esac # See if we need to build an old-fashioned archive. for oldlib in $oldlibs; do if test "$build_libtool_libs" = convenience; then oldobjs="$libobjs_save $symfileobj" addlibs="$convenience" build_libtool_libs=no else if test "$build_libtool_libs" = module; then oldobjs="$libobjs_save" build_libtool_libs=no else oldobjs="$old_deplibs $non_pic_objects" if test "$preload" = yes && test -f "$symfileobj"; then oldobjs="$oldobjs $symfileobj" fi fi addlibs="$old_convenience" fi if test -n "$addlibs"; then gentop="$output_objdir/${outputname}x" generated="$generated $gentop" func_extract_archives $gentop $addlibs oldobjs="$oldobjs $func_extract_archives_result" fi # Do each command in the archive commands. if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then cmds=$old_archive_from_new_cmds else # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then gentop="$output_objdir/${outputname}x" generated="$generated $gentop" func_extract_archives $gentop $dlprefiles oldobjs="$oldobjs $func_extract_archives_result" fi # POSIX demands no paths to be encoded in archives. We have # to avoid creating archives with duplicate basenames if we # might have to extract them afterwards, e.g., when creating a # static archive out of a convenience library, or when linking # the entirety of a libtool archive into another (currently # not supported by libtool). if (for obj in $oldobjs do func_basename "$obj" $ECHO "$func_basename_result" done | sort | sort -uc >/dev/null 2>&1); then : else $ECHO "copying selected object files to avoid basename conflicts..." gentop="$output_objdir/${outputname}x" generated="$generated $gentop" func_mkdir_p "$gentop" save_oldobjs=$oldobjs oldobjs= counter=1 for obj in $save_oldobjs do func_basename "$obj" objbase="$func_basename_result" case " $oldobjs " in " ") oldobjs=$obj ;; *[\ /]"$objbase "*) while :; do # Make sure we don't pick an alternate name that also # overlaps. newobj=lt$counter-$objbase func_arith $counter + 1 counter=$func_arith_result case " $oldobjs " in *[\ /]"$newobj "*) ;; *) if test ! -f "$gentop/$newobj"; then break; fi ;; esac done func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" oldobjs="$oldobjs $gentop/$newobj" ;; *) oldobjs="$oldobjs $obj" ;; esac done fi eval cmds=\"$old_archive_cmds\" func_len " $cmds" len=$func_len_result if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then cmds=$old_archive_cmds else # the command line is too long to link in one step, link in parts func_verbose "using piecewise archive linking..." save_RANLIB=$RANLIB RANLIB=: objlist= concat_cmds= save_oldobjs=$oldobjs oldobjs= # Is there a better way of finding the last object in the list? for obj in $save_oldobjs do last_oldobj=$obj done eval test_cmds=\"$old_archive_cmds\" func_len " $test_cmds" len0=$func_len_result len=$len0 for obj in $save_oldobjs do func_len " $obj" func_arith $len + $func_len_result len=$func_arith_result func_append objlist " $obj" if test "$len" -lt "$max_cmd_len"; then : else # the above command should be used before it gets too long oldobjs=$objlist if test "$obj" = "$last_oldobj" ; then RANLIB=$save_RANLIB fi test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" objlist= len=$len0 fi done RANLIB=$save_RANLIB oldobjs=$objlist if test "X$oldobjs" = "X" ; then eval cmds=\"\$concat_cmds\" else eval cmds=\"\$concat_cmds~\$old_archive_cmds\" fi fi fi func_execute_cmds "$cmds" 'exit $?' done test -n "$generated" && \ func_show_eval "${RM}r$generated" # Now create the libtool archive. case $output in *.la) old_library= test "$build_old_libs" = yes && old_library="$libname.$libext" func_verbose "creating $output" # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else func_quote_for_eval "$var_value" relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" fi done # Quote the link command for shipping. relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"` if test "$hardcode_automatic" = yes ; then relink_command= fi # Only create the output if not a dry run. $opt_dry_run || { for installed in no yes; do if test "$installed" = yes; then if test -z "$install_libdir"; then break fi output="$output_objdir/$outputname"i # Replace all uninstalled libtool libraries with the installed ones newdependency_libs= for deplib in $dependency_libs; do case $deplib in *.la) func_basename "$deplib" name="$func_basename_result" eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` test -z "$libdir" && \ func_fatal_error "\`$deplib' is not a valid libtool archive" newdependency_libs="$newdependency_libs $libdir/$name" ;; *) newdependency_libs="$newdependency_libs $deplib" ;; esac done dependency_libs="$newdependency_libs" newdlfiles= for lib in $dlfiles; do case $lib in *.la) func_basename "$lib" name="$func_basename_result" eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ func_fatal_error "\`$lib' is not a valid libtool archive" newdlfiles="$newdlfiles $libdir/$name" ;; *) newdlfiles="$newdlfiles $lib" ;; esac done dlfiles="$newdlfiles" newdlprefiles= for lib in $dlprefiles; do case $lib in *.la) # Only pass preopened files to the pseudo-archive (for # eventual linking with the app. that links it) if we # didn't already link the preopened objects directly into # the library: func_basename "$lib" name="$func_basename_result" eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ func_fatal_error "\`$lib' is not a valid libtool archive" newdlprefiles="$newdlprefiles $libdir/$name" ;; esac done dlprefiles="$newdlprefiles" else newdlfiles= for lib in $dlfiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; *) abs=`pwd`"/$lib" ;; esac newdlfiles="$newdlfiles $abs" done dlfiles="$newdlfiles" newdlprefiles= for lib in $dlprefiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; *) abs=`pwd`"/$lib" ;; esac newdlprefiles="$newdlprefiles $abs" done dlprefiles="$newdlprefiles" fi $RM $output # place dlname in correct position for cygwin tdlname=$dlname case $host,$output,$installed,$module,$dlname in *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;; esac $ECHO > $output "\ # $outputname - a libtool library file # Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION # # Please DO NOT delete this file! # It is necessary for linking the library. # The name that we can dlopen(3). dlname='$tdlname' # Names of this library. library_names='$library_names' # The name of the static archive. old_library='$old_library' # Linker flags that can not go in dependency_libs. inherited_linker_flags='$new_inherited_linker_flags' # Libraries that this one depends upon. dependency_libs='$dependency_libs' # Names of additional weak libraries provided by this library weak_library_names='$weak_libs' # Version information for $libname. current=$current age=$age revision=$revision # Is this an already installed library? installed=$installed # Should we warn about portability when linking against -modules? shouldnotlink=$module # Files to dlopen/dlpreopen dlopen='$dlfiles' dlpreopen='$dlprefiles' # Directory that this library needs to be installed in: libdir='$install_libdir'" if test "$installed" = no && test "$need_relink" = yes; then $ECHO >> $output "\ relink_command=\"$relink_command\"" fi done } # Do a symbolic link so that the libtool archive can be found in # LD_LIBRARY_PATH before the program is installed. func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?' ;; esac exit $EXIT_SUCCESS } { test "$mode" = link || test "$mode" = relink; } && func_mode_link ${1+"$@"} # func_mode_uninstall arg... func_mode_uninstall () { $opt_debug RM="$nonopt" files= rmforce= exit_status=0 # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic="$magic" for arg do case $arg in -f) RM="$RM $arg"; rmforce=yes ;; -*) RM="$RM $arg" ;; *) files="$files $arg" ;; esac done test -z "$RM" && \ func_fatal_help "you must specify an RM program" rmdirs= origobjdir="$objdir" for file in $files; do func_dirname "$file" "" "." dir="$func_dirname_result" if test "X$dir" = X.; then objdir="$origobjdir" else objdir="$dir/$origobjdir" fi func_basename "$file" name="$func_basename_result" test "$mode" = uninstall && objdir="$dir" # Remember objdir for removal later, being careful to avoid duplicates if test "$mode" = clean; then case " $rmdirs " in *" $objdir "*) ;; *) rmdirs="$rmdirs $objdir" ;; esac fi # Don't error if the file doesn't exist and rm -f was used. if { test -L "$file"; } >/dev/null 2>&1 || { test -h "$file"; } >/dev/null 2>&1 || test -f "$file"; then : elif test -d "$file"; then exit_status=1 continue elif test "$rmforce" = yes; then continue fi rmfiles="$file" case $name in *.la) # Possibly a libtool archive, so verify it. if func_lalib_p "$file"; then func_source $dir/$name # Delete the libtool libraries and symlinks. for n in $library_names; do rmfiles="$rmfiles $objdir/$n" done test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library" case "$mode" in clean) case " $library_names " in # " " in the beginning catches empty $dlname *" $dlname "*) ;; *) rmfiles="$rmfiles $objdir/$dlname" ;; esac test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i" ;; uninstall) if test -n "$library_names"; then # Do each command in the postuninstall commands. func_execute_cmds "$postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' fi if test -n "$old_library"; then # Do each command in the old_postuninstall commands. func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' fi # FIXME: should reinstall the best remaining shared library. ;; esac fi ;; *.lo) # Possibly a libtool object, so verify it. if func_lalib_p "$file"; then # Read the .lo file func_source $dir/$name # Add PIC object to the list of files to remove. if test -n "$pic_object" && test "$pic_object" != none; then rmfiles="$rmfiles $dir/$pic_object" fi # Add non-PIC object to the list of files to remove. if test -n "$non_pic_object" && test "$non_pic_object" != none; then rmfiles="$rmfiles $dir/$non_pic_object" fi fi ;; *) if test "$mode" = clean ; then noexename=$name case $file in *.exe) func_stripname '' '.exe' "$file" file=$func_stripname_result func_stripname '' '.exe' "$name" noexename=$func_stripname_result # $file with .exe has already been added to rmfiles, # add $file without .exe rmfiles="$rmfiles $file" ;; esac # Do a test to see if this is a libtool program. if func_ltwrapper_p "$file"; then if func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" relink_command= func_source $func_ltwrapper_scriptname_result rmfiles="$rmfiles $func_ltwrapper_scriptname_result" else relink_command= func_source $dir/$noexename fi # note $name still contains .exe if it was in $file originally # as does the version of $file that was added into $rmfiles rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}" if test "$fast_install" = yes && test -n "$relink_command"; then rmfiles="$rmfiles $objdir/lt-$name" fi if test "X$noexename" != "X$name" ; then rmfiles="$rmfiles $objdir/lt-${noexename}.c" fi fi fi ;; esac func_show_eval "$RM $rmfiles" 'exit_status=1' done objdir="$origobjdir" # Try to remove the ${objdir}s in the directories where we deleted files for dir in $rmdirs; do if test -d "$dir"; then func_show_eval "rmdir $dir >/dev/null 2>&1" fi done exit $exit_status } { test "$mode" = uninstall || test "$mode" = clean; } && func_mode_uninstall ${1+"$@"} test -z "$mode" && { help="$generic_help" func_fatal_help "you must specify a MODE" } test -z "$exec_cmd" && \ func_fatal_help "invalid operation mode \`$mode'" if test -n "$exec_cmd"; then eval exec "$exec_cmd" exit $EXIT_FAILURE fi exit $exit_status # The TAGs below are defined such that we never get into a situation # in which we disable both kinds of libraries. Given conflicting # choices, we go for a static library, that is the most portable, # since we can't tell whether shared libraries were disabled because # the user asked for that or because the platform doesn't support # them. This is particularly important on AIX, because we don't # support having both static and shared libraries enabled at the same # time on that platform, so we default to a shared-only configuration. # If a disable-shared tag is given, we'll fallback to a static-only # configuration. But we'll never go from static-only to shared-only. # ### BEGIN LIBTOOL TAG CONFIG: disable-shared build_libtool_libs=no build_old_libs=yes # ### END LIBTOOL TAG CONFIG: disable-shared # ### BEGIN LIBTOOL TAG CONFIG: disable-static build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` # ### END LIBTOOL TAG CONFIG: disable-static # Local Variables: # mode:shell-script # sh-indentation:2 # End: # vi:sw=2 djview4/config/ltoptions.m4000066400000000000000000000272421174072760700162160ustar00rootroot00000000000000# Helper functions for option handling. -*- Autoconf -*- # # Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. # Written by Gary V. Vaughan, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # serial 6 ltoptions.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) # _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) # ------------------------------------------ m4_define([_LT_MANGLE_OPTION], [[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) # _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) # --------------------------------------- # Set option OPTION-NAME for macro MACRO-NAME, and if there is a # matching handler defined, dispatch to it. Other OPTION-NAMEs are # saved as a flag. m4_define([_LT_SET_OPTION], [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), _LT_MANGLE_DEFUN([$1], [$2]), [m4_warning([Unknown $1 option `$2'])])[]dnl ]) # _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) # ------------------------------------------------------------ # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. m4_define([_LT_IF_OPTION], [m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) # _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) # ------------------------------------------------------- # Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME # are set. m4_define([_LT_UNLESS_OPTIONS], [m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), [m4_define([$0_found])])])[]dnl m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 ])[]dnl ]) # _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) # ---------------------------------------- # OPTION-LIST is a space-separated list of Libtool options associated # with MACRO-NAME. If any OPTION has a matching handler declared with # LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about # the unknown option and exit. m4_defun([_LT_SET_OPTIONS], [# Set options m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), [_LT_SET_OPTION([$1], _LT_Option)]) m4_if([$1],[LT_INIT],[ dnl dnl Simply set some default values (i.e off) if boolean options were not dnl specified: _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no ]) _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no ]) dnl dnl If no reference was made to various pairs of opposing options, then dnl we run the default mode handler for the pair. For example, if neither dnl `shared' nor `disable-shared' was passed, we enable building of shared dnl archives by default: _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], [_LT_ENABLE_FAST_INSTALL]) ]) ])# _LT_SET_OPTIONS ## --------------------------------- ## ## Macros to handle LT_INIT options. ## ## --------------------------------- ## # _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) # ----------------------------------------- m4_define([_LT_MANGLE_DEFUN], [[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) # LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) # ----------------------------------------------- m4_define([LT_OPTION_DEFINE], [m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl ])# LT_OPTION_DEFINE # dlopen # ------ LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes ]) AU_DEFUN([AC_LIBTOOL_DLOPEN], [_LT_SET_OPTION([LT_INIT], [dlopen]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `dlopen' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) # win32-dll # --------- # Declare package support for building win32 dll's. LT_OPTION_DEFINE([LT_INIT], [win32-dll], [enable_win32_dll=yes case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*) AC_CHECK_TOOL(AS, as, false) AC_CHECK_TOOL(DLLTOOL, dlltool, false) AC_CHECK_TOOL(OBJDUMP, objdump, false) ;; esac test -z "$AS" && AS=as _LT_DECL([], [AS], [0], [Assembler program])dnl test -z "$DLLTOOL" && DLLTOOL=dlltool _LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl test -z "$OBJDUMP" && OBJDUMP=objdump _LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl ])# win32-dll AU_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_REQUIRE([AC_CANONICAL_HOST])dnl _LT_SET_OPTION([LT_INIT], [win32-dll]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `win32-dll' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) # _LT_ENABLE_SHARED([DEFAULT]) # ---------------------------- # implement the --enable-shared flag, and supports the `shared' and # `disable-shared' LT_INIT options. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. m4_define([_LT_ENABLE_SHARED], [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([shared], [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) _LT_DECL([build_libtool_libs], [enable_shared], [0], [Whether or not to build shared libraries]) ])# _LT_ENABLE_SHARED LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) # Old names: AC_DEFUN([AC_ENABLE_SHARED], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) ]) AC_DEFUN([AC_DISABLE_SHARED], [_LT_SET_OPTION([LT_INIT], [disable-shared]) ]) AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_ENABLE_SHARED], []) dnl AC_DEFUN([AM_DISABLE_SHARED], []) # _LT_ENABLE_STATIC([DEFAULT]) # ---------------------------- # implement the --enable-static flag, and support the `static' and # `disable-static' LT_INIT options. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. m4_define([_LT_ENABLE_STATIC], [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([static], [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_static=]_LT_ENABLE_STATIC_DEFAULT) _LT_DECL([build_old_libs], [enable_static], [0], [Whether or not to build static libraries]) ])# _LT_ENABLE_STATIC LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) # Old names: AC_DEFUN([AC_ENABLE_STATIC], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) ]) AC_DEFUN([AC_DISABLE_STATIC], [_LT_SET_OPTION([LT_INIT], [disable-static]) ]) AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_ENABLE_STATIC], []) dnl AC_DEFUN([AM_DISABLE_STATIC], []) # _LT_ENABLE_FAST_INSTALL([DEFAULT]) # ---------------------------------- # implement the --enable-fast-install flag, and support the `fast-install' # and `disable-fast-install' LT_INIT options. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. m4_define([_LT_ENABLE_FAST_INSTALL], [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([fast-install], [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) _LT_DECL([fast_install], [enable_fast_install], [0], [Whether or not to optimize for fast installation])dnl ])# _LT_ENABLE_FAST_INSTALL LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) # Old names: AU_DEFUN([AC_ENABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `fast-install' option into LT_INIT's first parameter.]) ]) AU_DEFUN([AC_DISABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], [disable-fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `disable-fast-install' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) # _LT_WITH_PIC([MODE]) # -------------------- # implement the --with-pic flag, and support the `pic-only' and `no-pic' # LT_INIT options. # MODE is either `yes' or `no'. If omitted, it defaults to `both'. m4_define([_LT_WITH_PIC], [AC_ARG_WITH([pic], [AS_HELP_STRING([--with-pic], [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], [pic_mode="$withval"], [pic_mode=default]) test -z "$pic_mode" && pic_mode=m4_default([$1], [default]) _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl ])# _LT_WITH_PIC LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) # Old name: AU_DEFUN([AC_LIBTOOL_PICMODE], [_LT_SET_OPTION([LT_INIT], [pic-only]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `pic-only' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) ## ----------------- ## ## LTDL_INIT Options ## ## ----------------- ## m4_define([_LTDL_MODE], []) LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], [m4_define([_LTDL_MODE], [nonrecursive])]) LT_OPTION_DEFINE([LTDL_INIT], [recursive], [m4_define([_LTDL_MODE], [recursive])]) LT_OPTION_DEFINE([LTDL_INIT], [subproject], [m4_define([_LTDL_MODE], [subproject])]) m4_define([_LTDL_TYPE], []) LT_OPTION_DEFINE([LTDL_INIT], [installable], [m4_define([_LTDL_TYPE], [installable])]) LT_OPTION_DEFINE([LTDL_INIT], [convenience], [m4_define([_LTDL_TYPE], [convenience])]) djview4/config/ltsugar.m4000066400000000000000000000104241174072760700156360ustar00rootroot00000000000000# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- # # Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. # Written by Gary V. Vaughan, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # serial 6 ltsugar.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) # lt_join(SEP, ARG1, [ARG2...]) # ----------------------------- # Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their # associated separator. # Needed until we can rely on m4_join from Autoconf 2.62, since all earlier # versions in m4sugar had bugs. m4_define([lt_join], [m4_if([$#], [1], [], [$#], [2], [[$2]], [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) m4_define([_lt_join], [m4_if([$#$2], [2], [], [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) # lt_car(LIST) # lt_cdr(LIST) # ------------ # Manipulate m4 lists. # These macros are necessary as long as will still need to support # Autoconf-2.59 which quotes differently. m4_define([lt_car], [[$1]]) m4_define([lt_cdr], [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], [$#], 1, [], [m4_dquote(m4_shift($@))])]) m4_define([lt_unquote], $1) # lt_append(MACRO-NAME, STRING, [SEPARATOR]) # ------------------------------------------ # Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. # Note that neither SEPARATOR nor STRING are expanded; they are appended # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). # No SEPARATOR is output if MACRO-NAME was previously undefined (different # than defined and empty). # # This macro is needed until we can rely on Autoconf 2.62, since earlier # versions of m4sugar mistakenly expanded SEPARATOR but not STRING. m4_define([lt_append], [m4_define([$1], m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) # lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) # ---------------------------------------------------------- # Produce a SEP delimited list of all paired combinations of elements of # PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list # has the form PREFIXmINFIXSUFFIXn. # Needed until we can rely on m4_combine added in Autoconf 2.62. m4_define([lt_combine], [m4_if(m4_eval([$# > 3]), [1], [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl [[m4_foreach([_Lt_prefix], [$2], [m4_foreach([_Lt_suffix], ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) # lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) # ----------------------------------------------------------------------- # Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited # by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. m4_define([lt_if_append_uniq], [m4_ifdef([$1], [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], [lt_append([$1], [$2], [$3])$4], [$5])], [lt_append([$1], [$2], [$3])$4])]) # lt_dict_add(DICT, KEY, VALUE) # ----------------------------- m4_define([lt_dict_add], [m4_define([$1($2)], [$3])]) # lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) # -------------------------------------------- m4_define([lt_dict_add_subkey], [m4_define([$1($2:$3)], [$4])]) # lt_dict_fetch(DICT, KEY, [SUBKEY]) # ---------------------------------- m4_define([lt_dict_fetch], [m4_ifval([$3], m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) # lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) # ----------------------------------------------------------------- m4_define([lt_if_dict_fetch], [m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], [$5], [$6])]) # lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) # -------------------------------------------------------------- m4_define([lt_dict_filter], [m4_if([$5], [], [], [lt_join(m4_quote(m4_default([$4], [[, ]])), lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl ]) djview4/config/ltversion.m4000066400000000000000000000012771174072760700162100ustar00rootroot00000000000000# ltversion.m4 -- version numbers -*- Autoconf -*- # # Copyright (C) 2004 Free Software Foundation, Inc. # Written by Scott James Remnant, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # Generated from ltversion.in. # serial 3017 ltversion.m4 # This file is part of GNU Libtool m4_define([LT_PACKAGE_VERSION], [2.2.6b]) m4_define([LT_PACKAGE_REVISION], [1.3017]) AC_DEFUN([LTVERSION_VERSION], [macro_version='2.2.6b' macro_revision='1.3017' _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) _LT_DECL(, macro_revision, 0) ]) djview4/config/lt~obsolete.m4000066400000000000000000000131131174072760700165250ustar00rootroot00000000000000# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- # # Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc. # Written by Scott James Remnant, 2004. # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # serial 4 lt~obsolete.m4 # These exist entirely to fool aclocal when bootstrapping libtool. # # In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) # which have later been changed to m4_define as they aren't part of the # exported API, or moved to Autoconf or Automake where they belong. # # The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN # in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us # using a macro with the same name in our local m4/libtool.m4 it'll # pull the old libtool.m4 in (it doesn't see our shiny new m4_define # and doesn't know about Autoconf macros at all.) # # So we provide this file, which has a silly filename so it's always # included after everything else. This provides aclocal with the # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything # because those macros already exist, or will be overwritten later. # We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. # # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. # Yes, that means every name once taken will need to remain here until # we give up compatibility with versions before 1.7, at which point # we need to keep only those names which we still refer to. # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) m4_ifndef([AC_LIBTOOL_RC], [AC_DEFUN([AC_LIBTOOL_RC])]) m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) djview4/configure000077500000000000000000022071611174072760700143650ustar00rootroot00000000000000#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.67 for djview 4.9. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software # Foundation, Inc. # # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi " as_required="as_fn_return () { (exit \$1); } as_fn_success () { as_fn_return 0; } as_fn_failure () { as_fn_return 1; } as_fn_ret_success () { return 0; } as_fn_ret_failure () { return 1; } exitcode=0 as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : else exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 test \$(( 1 + 1 )) = 2 || exit 1" if (eval "$as_required") 2>/dev/null; then : as_have_required=yes else as_have_required=no fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. as_shell=$as_dir/$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : CONFIG_SHELL=$as_shell as_have_required=yes if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : break 2 fi fi done;; esac as_found=false done $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : CONFIG_SHELL=$SHELL as_have_required=yes fi; } IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV export CONFIG_SHELL exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} fi if test x$as_have_required = xno; then : $as_echo "$0: This script requires a shell more modern than all" $as_echo "$0: the shells that I found on your system." if test x${ZSH_VERSION+set} = xset ; then $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" $as_echo "$0: be upgraded to zsh 4.3.4 or later." else $as_echo "$0: Please tell bug-autoconf@gnu.org about your system, $0: including any error possibly output before this $0: message. Then install a modern shell, or manually run $0: the script under such a shell if you do have one." fi exit 1 fi fi fi SHELL=${CONFIG_SHELL-/bin/sh} export SHELL # Unset more variables known to interfere with behavior of common tools. CLICOLOR_FORCE= GREP_OPTIONS= unset CLICOLOR_FORCE GREP_OPTIONS ## --------------------- ## ## M4sh Shell Functions. ## ## --------------------- ## # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` 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" } # as_fn_mkdir_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith # 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. as_fn_error () { 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: $2" >&2 as_fn_exit $as_status } # as_fn_error if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_lineno_1=$LINENO as_lineno_1a=$LINENO as_lineno_2=$LINENO as_lineno_2a=$LINENO eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in #( -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" # Check that we are running under the correct shell. SHELL=${CONFIG_SHELL-/bin/sh} case X$lt_ECHO in X*--fallback-echo) # Remove one level of quotation (which was required for Make). ECHO=`echo "$lt_ECHO" | sed 's,\\\\\$\\$0,'$0','` ;; esac ECHO=${lt_ECHO-echo} if test "X$1" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test "X$1" = X--fallback-echo; then # Avoid inline document here, it may be left over : elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then # Yippee, $ECHO works! : else # Restart under the correct shell. exec $SHELL "$0" --no-reexec ${1+"$@"} fi if test "X$1" = X--fallback-echo; then # used as fallback echo shift cat <<_LT_EOF $* _LT_EOF exit 0 fi # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH if test -z "$lt_ECHO"; then if test "X${echo_test_string+set}" != Xset; then # find a string as large as possible, as long as the shell can cope with it for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... if { echo_test_string=`eval $cmd`; } 2>/dev/null && { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null then break fi done fi if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then : else # The Solaris, AIX, and Digital Unix default echo programs unquote # backslashes. This makes it impossible to quote backslashes using # echo "$something" | sed 's/\\/\\\\/g' # # So, first we look for a working echo in the user's PATH. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for dir in $PATH /usr/ucb; do IFS="$lt_save_ifs" if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then ECHO="$dir/echo" break fi done IFS="$lt_save_ifs" if test "X$ECHO" = Xecho; then # We didn't find a better echo, so look for alternatives. if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' && echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # This shell has a builtin print -r that does the trick. ECHO='print -r' elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } && test "X$CONFIG_SHELL" != X/bin/ksh; then # If we have ksh, try running configure again with it. ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} export ORIGINAL_CONFIG_SHELL CONFIG_SHELL=/bin/ksh export CONFIG_SHELL exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"} else # Try using printf. ECHO='printf %s\n' if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # Cool, printf works : elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL export CONFIG_SHELL SHELL="$CONFIG_SHELL" export SHELL ECHO="$CONFIG_SHELL $0 --fallback-echo" elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then ECHO="$CONFIG_SHELL $0 --fallback-echo" else # maybe with a smaller string... prev=: for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null then break fi prev="$cmd" done if test "$prev" != 'sed 50q "$0"'; then echo_test_string=`eval $prev` export echo_test_string exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"} else # Oops. We lost completely, so just stick with echo. ECHO=echo fi fi fi fi fi fi # Copy echo and quote the copy suitably for passing to libtool from # the Makefile, instead of quoting the original, which is used later. lt_ECHO=$ECHO if test "X$lt_ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then lt_ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo" fi test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. # 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` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= # Identity of this package. PACKAGE_NAME='djview' PACKAGE_TARNAME='djview' PACKAGE_VERSION='4.9' PACKAGE_STRING='djview 4.9' PACKAGE_BUGREPORT='' PACKAGE_URL='' ac_unique_file="README" ac_default_prefix=/usr/local # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef STDC_HEADERS # include # include #else # ifdef HAVE_STDLIB_H # include # endif #endif #ifdef HAVE_STRING_H # if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" ac_subst_vars='LTLIBOBJS LIBOBJS DESKTOP_NO DESKTOP_YES XDG_DESKTOP_MENU XDG_ICON_RESOURCE XDG_MIME NPDJVU_NO NPDJVU_YES NSDEJAVU_NO NSDEJAVU_YES INSTALL_SHLIB NSDEJAVU_LIBS NSDEJAVU_CFLAGS GLIB_CFLAGS GLIB_LIBS TIFF_CFLAGS TIFF_LIBS DDJVUAPI_CFLAGS DDJVUAPI_LIBS QTDIR LRELEASE LUPDATE RCC UIC MOC QMAKESPEC QMAKE X_EXTRA_LIBS X_LIBS X_PRE_LIBS X_CFLAGS XMKMF PKG_CONFIG_PATH PKG_CONFIG CXXCPP CPP OTOOL64 OTOOL LIPO NMEDIT DSYMUTIL lt_ECHO RANLIB STRIP AR OBJDUMP NM ac_ct_DUMPBIN DUMPBIN LD FGREP EGREP GREP SED LIBTOOL OPTS ac_ct_CXX CXXFLAGS CXX OBJEXT EXEEXT ac_ct_CC CPPFLAGS LDFLAGS CFLAGS CC INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM INKSCAPE CONVERT RSVG MKDIR TOUCH RM LN_S SET_MAKE host_os host_vendor host_cpu host build_os build_vendor build_cpu build target_alias host_alias build_alias LIBS ECHO_T ECHO_N ECHO_C DEFS mandir localedir libdir psdir pdfdir dvidir htmldir infodir docdir oldincludedir includedir localstatedir sharedstatedir sysconfdir datadir datarootdir libexecdir sbindir bindir program_transform_name prefix exec_prefix PACKAGE_URL PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking with_extra_includes with_extra_libraries enable_debug enable_static enable_shared with_pic enable_fast_install with_gnu_ld enable_libtool_lock with_x with_tiff enable_nsdejavu enable_npdjvu enable_desktopfiles ' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS CXX CXXFLAGS CCC CPP CXXCPP PKG_CONFIG PKG_CONFIG_PATH XMKMF QMAKE QMAKESPEC MOC UIC RCC LUPDATE LRELEASE QTDIR DDJVUAPI_LIBS DDJVUAPI_CFLAGS TIFF_LIBS TIFF_CFLAGS GLIB_LIBS GLIB_CFLAGS' # Initialize some variables set by options. ac_init_help= ac_init_version=false ac_unrecognized_opts= ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *=) ac_optarg= ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) 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" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) 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" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) 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" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) 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" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --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" ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # 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'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` 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" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi # Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` eval $ac_var=\$ac_val;; esac # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac 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' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. 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 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- 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" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$as_myself" || $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no 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" 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" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures djview 4.9 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --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 --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 --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/djview] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _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] _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of djview 4.9:";; esac cat <<\_ACEOF Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-debug Compile with debugging options (default: no) --enable-static[=PKGS] build static libraries [default=no] --enable-shared[=PKGS] build shared libraries [default=yes] --enable-fast-install[=PKGS] optimize for fast installation [default=yes] --disable-libtool-lock avoid locking (might break parallel builds) --disable-nsdejavu Do not compile the nsdejavu browser plugin. --enable-npdjvu Compile the npdjvu browser plugin. --disable-desktopfiles Do not install scripts to register icons and menus. Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-extra-includes=DIR Define an additional directory for include files --with-extra-libraries=DIR Define an additional directory for library files --with-pic try to use only PIC/non-PIC objects [default=use both] --with-gnu-ld assume the C compiler uses GNU ld [default=no] --with-x use the X Window System --with-tiff=DIR where libtiff is located Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CXX C++ compiler command CXXFLAGS C++ compiler flags CPP C preprocessor CXXCPP C++ preprocessor PKG_CONFIG Location of the pkg-config program. PKG_CONFIG_PATH Path for pkg-config descriptors. XMKMF Path to xmkmf, Makefile generator for X Window System QMAKE Location of the QMAKE program. QMAKESPEC Location of the QMAKE specifications. MOC Location of the MOC program. UIC Location of the UIC program. RCC Location of the RCC program. LUPDATE Location of the LUPDATE program. LRELEASE Location of the LRELEASE program. QTDIR Location of the Qt package (deprecated). DDJVUAPI_LIBS Libraries for ddjvuapi DDJVUAPI_CFLAGS Compilation flags for ddjvuapi TIFF_LIBS Libraries for tiff TIFF_CFLAGS Compilation flags for tiff 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. Report bugs to the package provider. _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF djview configure 4.9 generated by GNU Autoconf 2.67 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 exit fi ## ------------------------ ## ## Autoconf initialization. ## ## ------------------------ ## # ac_fn_c_try_compile LINENO # -------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} as_fn_set_status $ac_retval } # ac_fn_c_try_compile # ac_fn_cxx_try_compile LINENO # ---------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_cxx_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} as_fn_set_status $ac_retval } # ac_fn_cxx_try_compile # ac_fn_c_try_link LINENO # ----------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} as_fn_set_status $ac_retval } # ac_fn_c_try_link # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists and can be compiled using the include files in # INCLUDES, setting the cache variable VAR accordingly. 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 eval "test \"\${$3+set}\"" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} } # ac_fn_c_check_header_compile # ac_fn_c_try_cpp LINENO # ---------------------- # Try to preprocess conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} as_fn_set_status $ac_retval } # ac_fn_c_try_cpp # ac_fn_c_try_run LINENO # ---------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes # that executables *can* be run. ac_fn_c_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then : ac_retval=0 else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} as_fn_set_status $ac_retval } # ac_fn_c_try_run # ac_fn_c_check_func LINENO FUNC VAR # ---------------------------------- # Tests whether FUNC exists, setting the cache variable VAR accordingly 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 eval "test \"\${$3+set}\"" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Define $2 to an innocuous variant, in case declares $2. For example, HP-UX 11i declares gettimeofday. */ #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $2 (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $2 /* 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 $2 (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$2 || defined __stub___$2 choke me #endif int main () { return $2 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} } # ac_fn_c_check_func # ac_fn_cxx_try_cpp LINENO # ------------------------ # Try to preprocess conftest.$ac_ext, and return whether this succeeded. ac_fn_cxx_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} as_fn_set_status $ac_retval } # ac_fn_cxx_try_cpp # ac_fn_cxx_try_link LINENO # ------------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_cxx_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} as_fn_set_status $ac_retval } # ac_fn_cxx_try_link # ac_fn_cxx_try_run LINENO # ------------------------ # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes # that executables *can* be run. ac_fn_cxx_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then : ac_retval=0 else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} as_fn_set_status $ac_retval } # ac_fn_cxx_try_run # ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES # --------------------------------------------------------- # Tests whether HEADER exists, giving a warning if it cannot be compiled using # the include files in INCLUDES and setting the cache variable VAR # accordingly. ac_fn_cxx_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 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 eval "test \"\${$3+set}\"" = set; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 $as_echo_n "checking $2 usability... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_header_compiler=yes else ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 $as_echo_n "checking $2 presence... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <$2> _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : ac_header_preproc=yes else ac_header_preproc=no fi 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; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #(( yes:no: ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ;; no:yes:* ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval "test \"\${$3+set}\"" = set; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} } # ac_fn_cxx_check_header_mongrel # ac_fn_cxx_check_type LINENO TYPE VAR INCLUDES # --------------------------------------------- # Tests whether TYPE exists after having included INCLUDES, setting cache # variable VAR accordingly. 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 eval "test \"\${$3+set}\"" = set; then : $as_echo_n "(cached) " >&6 else eval "$3=no" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { if (sizeof ($2)) return 0; ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { if (sizeof (($2))) return 0; ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : else eval "$3=yes" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} } # ac_fn_cxx_check_type # ac_fn_cxx_check_func LINENO FUNC VAR # ------------------------------------ # Tests whether FUNC exists, setting the cache variable VAR accordingly 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 eval "test \"\${$3+set}\"" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Define $2 to an innocuous variant, in case declares $2. For example, HP-UX 11i declares gettimeofday. */ #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $2 (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $2 /* 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 $2 (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$2 || defined __stub___$2 choke me #endif int main () { return $2 (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} } # ac_fn_cxx_check_func # ac_fn_cxx_check_decl LINENO SYMBOL VAR INCLUDES # ----------------------------------------------- # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR # accordingly. ac_fn_cxx_check_decl () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack as_decl_name=`echo $2|sed 's/ *(.*//'` as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 $as_echo_n "checking whether $as_decl_name is declared... " >&6; } if eval "test \"\${$3+set}\"" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { #ifndef $as_decl_name #ifdef __cplusplus (void) $as_decl_use; #else (void) $as_decl_name; #endif #endif ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} } # ac_fn_cxx_check_decl cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by djview $as_me 4.9, which was generated by GNU Autoconf 2.67. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. $as_echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) as_fn_append ac_configure_args1 " '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done { ac_configure_args0=; unset ac_configure_args0;} { ac_configure_args1=; unset ac_configure_args1;} # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo $as_echo "## ---------------- ## ## Cache variables. ## ## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo $as_echo "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then $as_echo "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then $as_echo "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo cat confdefs.h echo fi test "$ac_signal" != 0 && $as_echo "$as_me: caught signal $ac_signal" $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h $as_echo "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_URL "$PACKAGE_URL" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then # 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 else ac_site_file1=$ac_default_prefix/share/config.site ac_site_file2=$ac_default_prefix/etc/config.site fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then { $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" \ || { { $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 if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special files # actually), so we avoid doing that. DJGPP emulates it as a regular file. if test /dev/null != "$cache_file" && test -f "$cache_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 $as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then # differences in whitespace do not lead to failure. ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $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 fi ## -------------------- ## ## Main body of script. ## ## -------------------- ## ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_aux_dir= for ac_dir in config "$srcdir"/config; do 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 fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. ac_config_headers="$ac_config_headers config.h:config/config.h.in" # 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_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } if test "${ac_cv_build+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_build_alias=$build_alias 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 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 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 ;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' set x $ac_cv_build shift build_cpu=$1 build_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: build_os=$* IFS=$ac_save_IFS case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 $as_echo_n "checking host system type... " >&6; } if test "${ac_cv_host+set}" = set; then : $as_echo_n "(cached) " >&6 else if test "x$host_alias" = x; then 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 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5 ;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' set x $ac_cv_host shift host_cpu=$1 host_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: host_os=$* IFS=$ac_save_IFS case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac # Additional libraries # Check whether --with-extra-includes was given. if test "${with_extra_includes+set}" = set; then : withval=$with_extra_includes; if test -d "$withval" ; then CFLAGS="$CFLAGS -I$withval" CXXFLAGS="$CXXFLAGS -I$withval" else as_fn_error $? "Cannot stat directory $withval" "$LINENO" 5 fi fi # Check whether --with-extra-libraries was given. if test "${with_extra_libraries+set}" = set; then : withval=$with_extra_libraries; if test -d "$withval" ; then LDFLAGS="$LDFLAGS -L$withval" else as_fn_error $? "Cannot stat directory $withval" "$LINENO" 5 fi fi # Always look into a "gnu" directory. curwd=`pwd` if test -d $curwd/gnu/include ; then CFLAGS="$CFLAGS -I$curwd/gnu/include" CXXFLAGS="$CXXFLAGS -I$curwd/gnu/include" fi if test -d $curwd/gnu/lib ; then LDFLAGS="$LDFLAGS -L$curwd/gnu/lib" fi # Special cases case "$host" in *-darwin* | *-macos10*) if test -d /opt/local ; then CFLAGS="$CFLAGS -I/opt/local/include" CXXFLAGS="$CXXFLAGS -I/opt/local/include" CPPFLAGS="$CPPFLAGS -I/opt/local/include" LDFLAGS="$LDFLAGS -L/opt/local/lib" elif test -d /sw ; then CFLAGS="$CFLAGS -I/sw/include" CXXFLAGS="$CXXFLAGS -I/sw/include" CPPFLAGS="$CPPFLAGS -I/sw/include" LDFLAGS="$LDFLAGS -L/sw/lib" fi ;; esac # ---------------------------------------- # Programs # ---------------------------------------- # Does make set variable $(MAKE) { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $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 eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\"" = set; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # 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;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi # Programs { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 $as_echo_n "checking whether ln -s works... " >&6; } LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 $as_echo "no, using $LN_S" >&6; } fi # Extract the first word of "rm", so it can be a program name with args. set dummy rm; 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_RM+set}" = set; then : $as_echo_n "(cached) " >&6 else case $RM in [\\/]* | ?:[\\/]*) ac_cv_path_RM="$RM" # 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_RM="$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 RM=$ac_cv_path_RM if test -n "$RM"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5 $as_echo "$RM" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # Extract the first word of "touch", so it can be a program name with args. set dummy touch; 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_TOUCH+set}" = set; then : $as_echo_n "(cached) " >&6 else case $TOUCH in [\\/]* | ?:[\\/]*) ac_cv_path_TOUCH="$TOUCH" # 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_TOUCH="$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 TOUCH=$ac_cv_path_TOUCH if test -n "$TOUCH"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5 $as_echo "$TOUCH" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # Extract the first word of "mkdir", so it can be a program name with args. set dummy mkdir; 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_MKDIR+set}" = set; then : $as_echo_n "(cached) " >&6 else case $MKDIR in [\\/]* | ?:[\\/]*) ac_cv_path_MKDIR="$MKDIR" # 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_MKDIR="$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 MKDIR=$ac_cv_path_MKDIR if test -n "$MKDIR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5 $as_echo "$MKDIR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # Extract the first word of "rsvg-convert", so it can be a program name with args. set dummy rsvg-convert; 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_RSVG+set}" = set; then : $as_echo_n "(cached) " >&6 else case $RSVG in [\\/]* | ?:[\\/]*) ac_cv_path_RSVG="$RSVG" # 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_RSVG="$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 test -z "$ac_cv_path_RSVG" && ac_cv_path_RSVG="false" ;; esac fi RSVG=$ac_cv_path_RSVG if test -n "$RSVG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RSVG" >&5 $as_echo "$RSVG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # Extract the first word of "convert", so it can be a program name with args. set dummy convert; 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_CONVERT+set}" = set; then : $as_echo_n "(cached) " >&6 else case $CONVERT in [\\/]* | ?:[\\/]*) ac_cv_path_CONVERT="$CONVERT" # 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_CONVERT="$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 test -z "$ac_cv_path_CONVERT" && ac_cv_path_CONVERT="false" ;; esac fi CONVERT=$ac_cv_path_CONVERT if test -n "$CONVERT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONVERT" >&5 $as_echo "$CONVERT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # Extract the first word of "inkscape", so it can be a program name with args. set dummy inkscape; 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_INKSCAPE+set}" = set; then : $as_echo_n "(cached) " >&6 else case $INKSCAPE in [\\/]* | ?:[\\/]*) ac_cv_path_INKSCAPE="$INKSCAPE" # 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_INKSCAPE="$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 test -z "$ac_cv_path_INKSCAPE" && ac_cv_path_INKSCAPE="false" ;; esac fi INKSCAPE=$ac_cv_path_INKSCAPE if test -n "$INKSCAPE"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INKSCAPE" >&5 $as_echo "$INKSCAPE" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in #(( ./ | .// | /[cC]/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else rm -rf conftest.one conftest.two conftest.dir echo one > conftest.one echo two > conftest.two mkdir conftest.dir if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi fi done done ;; esac done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 $as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' # Libtool & Compilers ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; 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_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else 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_prog_CC="${ac_tool_prefix}gcc" $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 fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; 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_prog_ac_ct_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else 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_prog_ac_ct_CC="gcc" $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 fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; 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_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else 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_prog_CC="${ac_tool_prefix}cc" $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 fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; 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_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no 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 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $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 if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$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_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else 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_prog_CC="$ac_tool_prefix$ac_prog" $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 fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe 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_prog_ac_ct_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else 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_prog_ac_ct_CC="$ac_prog" $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 fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi 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 ; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 $as_echo_n "checking whether the C compiler works... " >&6; } ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { { ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi if test -z "$ac_file"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } $as_echo "$as_me: failed program was:" >&5 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 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; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 $as_echo_n "checking for C compiler default output file name... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 $as_echo "$ac_file" >&6; } ac_exeext=$ac_cv_exeext rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 $as_echo_n "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac 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 ; } fi rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { FILE *f = fopen ("conftest.out", "w"); return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF ac_clean_files="$ac_clean_files conftest.out" # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 $as_echo_n "checking whether we are cross compiling... " >&6; } if test "$cross_compiling" != yes; then { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if { ac_try='./conftest$ac_cv_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes 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. If you meant to cross compile, use \`--host'. See \`config.log' for more details" "$LINENO" 5 ; } fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 $as_echo "$cross_compiling" >&6; } rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } if test "${ac_cv_objext+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else $as_echo "$as_me: failed program was:" >&5 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 ; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 $as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if test "${ac_cv_c_compiler_gnu+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if test "${ac_cv_prog_cc_g+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if test "${ac_cv_prog_cc_c89+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_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 if test -z "$CXX"; then if test -n "$CCC"; then CXX=$CCC else if test -n "$ac_tool_prefix"; then for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$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_prog_CXX+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # Let the user override the test. else 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_prog_CXX="$ac_tool_prefix$ac_prog" $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 fi fi CXX=$ac_cv_prog_CXX if test -n "$CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 $as_echo "$CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CXX" && break done fi if test -z "$CXX"; then ac_ct_CXX=$CXX for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC 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_prog_ac_ct_CXX+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CXX"; then ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. else 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_prog_ac_ct_CXX="$ac_prog" $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 fi fi ac_ct_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 $as_echo "$ac_ct_CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CXX" && break done if test "x$ac_ct_CXX" = x; then CXX="g++" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CXX=$ac_ct_CXX fi fi fi fi # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } if test "${ac_cv_cxx_compiler_gnu+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_cxx_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GXX=yes else GXX= fi ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 $as_echo_n "checking whether $CXX accepts -g... " >&6; } if test "${ac_cv_prog_cxx_g+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_save_cxx_werror_flag=$ac_cxx_werror_flag ac_cxx_werror_flag=yes ac_cv_prog_cxx_g=no CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_g=yes else CXXFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : else ac_cxx_werror_flag=$ac_save_cxx_werror_flag CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cxx_werror_flag=$ac_save_cxx_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 $as_echo "$ac_cv_prog_cxx_g" >&6; } if test "$ac_test_CXXFLAGS" = set; then CXXFLAGS=$ac_save_CXXFLAGS elif test $ac_cv_prog_cxx_g = yes; then if test "$GXX" = yes; then CXXFLAGS="-g -O2" else CXXFLAGS="-g" fi else if test "$GXX" = yes; then CXXFLAGS="-O2" else CXXFLAGS= fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_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 # Check whether --enable-debug was given. if test "${enable_debug+set}" = set; then : enableval=$enable_debug; ac_debug=$enableval else ac_debug=no fi OPTS= saved_CXXFLAGS="$CXXFLAGS" saved_CFLAGS="$CFLAGS" CXXFLAGS= CFLAGS= for opt in $saved_CXXFLAGS ; do case $opt in -g*) test $ac_debug != no && OPTS="$OPTS $opt" ;; -O*) ;; *) CXXFLAGS="$CXXFLAGS $opt" ;; esac done for opt in $saved_CFLAGS ; do case $opt in -O*|-g*) ;; *) CFLAGS="$CFLAGS $opt" ;; esac done if test x$ac_debug = xno ; then OPTS=-DNDEBUG opt="-Wall" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX accepts $opt" >&5 $as_echo_n "checking if $CXX accepts $opt... " >&6; } echo 'void f(){}' > conftest.cc if test -z "`${CXX} ${CXXFLAGS} ${OPTS} $opt -c conftest.cc 2>&1`"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } rm conftest.* OPTS="$OPTS -Wall" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } rm conftest.* fi opt="-O2" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX accepts $opt" >&5 $as_echo_n "checking if $CXX accepts $opt... " >&6; } echo 'void f(){}' > conftest.cc if test -z "`${CXX} ${CXXFLAGS} ${OPTS} $opt -c conftest.cc 2>&1`"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } rm conftest.* OPTS="$OPTS -O2" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } rm conftest.* fi else opt="-Wall" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CXX accepts $opt" >&5 $as_echo_n "checking if $CXX accepts $opt... " >&6; } echo 'void f(){}' > conftest.cc if test -z "`${CXX} ${CXXFLAGS} ${OPTS} $opt -c conftest.cc 2>&1`"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } rm conftest.* OPTS="$OPTS -Wall" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } rm conftest.* fi fi # Only nsdejavu needs libtool. # But some combinations of libtool and autoconf # break when libtool is in a conditional path. RM="$RM -f" # Check whether --enable-static was given. if test "${enable_static+set}" = set; then : enableval=$enable_static; p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$lt_save_ifs" ;; esac else enable_static=no fi case `pwd` in *\ * | *\ *) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 $as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; esac macro_version='2.2.6b' macro_revision='1.3017' ltmain="$ac_aux_dir/ltmain.sh" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 $as_echo_n "checking for a sed that does not truncate output... " >&6; } if test "${ac_cv_path_SED+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ for ac_i in 1 2 3 4 5 6 7; do ac_script="$ac_script$as_nl$ac_script" done echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed { ac_script=; unset ac_script;} if test -z "$SED"; then ac_path_SED_found=false # Loop through the user's path and test for each of PROGNAME-LIST 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_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue # Check for GNU ac_path_SED and select it if it is found. # Check for GNU $ac_path_SED case `"$ac_path_SED" --version 2>&1` in *GNU*) ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo '' >> "conftest.nl" "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_SED_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_SED="$ac_path_SED" ac_path_SED_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_SED_found && break 3 done done 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 fi else ac_cv_path_SED=$SED fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 $as_echo "$ac_cv_path_SED" >&6; } SED="$ac_cv_path_SED" rm -f conftest.sed test -z "$SED" && SED=sed Xsed="$SED -e 1s/^X//" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } if test "${ac_cv_path_GREP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_GREP_found && break 3 done done 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 fi else ac_cv_path_GREP=$GREP fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 $as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } if test "${ac_cv_path_EGREP+set}" = set; then : $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else if test -z "$EGREP"; then ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done 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 fi else ac_cv_path_EGREP=$EGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 $as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 $as_echo_n "checking for fgrep... " >&6; } if test "${ac_cv_path_FGREP+set}" = set; then : $as_echo_n "(cached) " >&6 else if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 then ac_cv_path_FGREP="$GREP -F" else if test -z "$FGREP"; then ac_path_FGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in fgrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue # Check for GNU ac_path_FGREP and select it if it is found. # Check for GNU $ac_path_FGREP case `"$ac_path_FGREP" --version 2>&1` in *GNU*) ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'FGREP' >> "conftest.nl" "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_FGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_FGREP_found && break 3 done done 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 fi else ac_cv_path_FGREP=$FGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 $as_echo "$ac_cv_path_FGREP" >&6; } FGREP="$ac_cv_path_FGREP" test -z "$GREP" && GREP=grep # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then : withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 $as_echo_n "checking for ld used by $CC... " >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi if test "${lt_cv_path_LD+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 $as_echo "$LD" >&6; } 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 { $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 : $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 $as_echo "$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 $as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } if test "${lt_cv_path_NM+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else lt_nm_to_check="${ac_tool_prefix}nm" if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. tmp_nm="$ac_dir/$lt_tmp_nm" if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS="$lt_save_ifs" done : ${lt_cv_path_NM=no} fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 $as_echo "$lt_cv_path_NM" >&6; } if test "$lt_cv_path_NM" != "no"; then NM="$lt_cv_path_NM" else # Didn't find any BSD compatible name lister, look for dumpbin. if test -n "$ac_tool_prefix"; then for ac_prog in "dumpbin -symbols" "link -dump -symbols" do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$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_prog_DUMPBIN+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$DUMPBIN"; then ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. else 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_prog_DUMPBIN="$ac_tool_prefix$ac_prog" $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 fi fi DUMPBIN=$ac_cv_prog_DUMPBIN if test -n "$DUMPBIN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 $as_echo "$DUMPBIN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$DUMPBIN" && break done fi if test -z "$DUMPBIN"; then ac_ct_DUMPBIN=$DUMPBIN for ac_prog in "dumpbin -symbols" "link -dump -symbols" 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_prog_ac_ct_DUMPBIN+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DUMPBIN"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test. else 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_prog_ac_ct_DUMPBIN="$ac_prog" $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 fi fi ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN if test -n "$ac_ct_DUMPBIN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 $as_echo "$ac_ct_DUMPBIN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_DUMPBIN" && break done if test "x$ac_ct_DUMPBIN" = x; then DUMPBIN=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DUMPBIN=$ac_ct_DUMPBIN fi fi if test "$DUMPBIN" != ":"; then NM="$DUMPBIN" fi fi test -z "$NM" && NM=nm { $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 $as_echo_n "checking the name lister ($NM) interface... " >&6; } if test "${lt_cv_nm_interface+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:5027: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 (eval echo "\"\$as_me:5030: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 (eval echo "\"\$as_me:5033: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 $as_echo "$lt_cv_nm_interface" >&6; } # find the maximum length of command line arguments { $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 $as_echo_n "checking the maximum length of command line arguments... " >&6; } if test "${lt_cv_sys_max_cmd_len+set}" = set; then : $as_echo_n "(cached) " >&6 else i=0 teststring="ABCD" case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw* | cegcc*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else # Make teststring a little bigger before we do anything with it. # a 1K string should be a reasonable start. for i in 1 2 3 4 5 6 7 8 ; do teststring=$teststring$teststring done SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. while { test "X"`$SHELL $0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \ = "XX$teststring$teststring"; } >/dev/null 2>&1 && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done # Only check the string length outside the loop. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` teststring= # Add a significant safety factor because C++ compilers can tack on # massive amounts of additional arguments before passing them to the # linker. It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac fi if test -n $lt_cv_sys_max_cmd_len ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 $as_echo "$lt_cv_sys_max_cmd_len" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 $as_echo "none" >&6; } fi max_cmd_len=$lt_cv_sys_max_cmd_len : ${CP="cp -f"} : ${MV="mv -f"} : ${RM="rm -f"} { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5 $as_echo_n "checking whether the shell understands some XSI constructs... " >&6; } # Try some XSI features xsi_shell=no ( _lt_dummy="a/b/c" test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ = c,a/b,, \ && eval 'test $(( 1 + 1 )) -eq 2 \ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ && xsi_shell=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5 $as_echo "$xsi_shell" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5 $as_echo_n "checking whether the shell understands \"+=\"... " >&6; } lt_shell_append=no ( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \ >/dev/null 2>&1 \ && lt_shell_append=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5 $as_echo "$lt_shell_append" >&6; } if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else lt_unset=false fi # test EBCDIC or ASCII case `echo X|tr X '\101'` in A) # ASCII based system # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr lt_SP2NL='tr \040 \012' lt_NL2SP='tr \015\012 \040\040' ;; *) # EBCDIC based system lt_SP2NL='tr \100 \n' lt_NL2SP='tr \r\n \100\100' ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 $as_echo_n "checking for $LD option to reload object files... " >&6; } if test "${lt_cv_ld_reload_flag+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_reload_flag='-r' fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 $as_echo "$lt_cv_ld_reload_flag" >&6; } reload_flag=$lt_cv_ld_reload_flag case $reload_flag in "" | " "*) ;; *) reload_flag=" $reload_flag" ;; esac reload_cmds='$LD$reload_flag -o $output$reload_objs' case $host_os in darwin*) if test "$GCC" = yes; then reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' else reload_cmds='$LD$reload_flag -o $output$reload_objs' fi ;; esac if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. set dummy ${ac_tool_prefix}objdump; 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_prog_OBJDUMP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$OBJDUMP"; then ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. else 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_prog_OBJDUMP="${ac_tool_prefix}objdump" $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 fi fi OBJDUMP=$ac_cv_prog_OBJDUMP if test -n "$OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 $as_echo "$OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OBJDUMP"; then ac_ct_OBJDUMP=$OBJDUMP # Extract the first word of "objdump", so it can be a program name with args. set dummy objdump; 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_prog_ac_ct_OBJDUMP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OBJDUMP"; then ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. else 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_prog_ac_ct_OBJDUMP="objdump" $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 fi fi ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP if test -n "$ac_ct_OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 $as_echo "$ac_ct_OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OBJDUMP" = x; then OBJDUMP="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OBJDUMP=$ac_ct_OBJDUMP fi else OBJDUMP="$ac_cv_prog_OBJDUMP" fi test -z "$OBJDUMP" && OBJDUMP=objdump { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 $as_echo_n "checking how to recognize dependent libraries... " >&6; } if test "${lt_cv_deplibs_check_method+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_file_magic_cmd='$MAGIC_CMD' lt_cv_file_magic_test_file= lt_cv_deplibs_check_method='unknown' # Need to set the preceding variable on all platforms that support # interlibrary dependencies. # 'none' -- dependencies not supported. # `unknown' -- same as none, but documents that we really don't know. # 'pass_all' -- all dependencies passed with no checks. # 'test_compile' -- check by making test program. # 'file_magic [[regex]]' -- check by looking for files in library path # which responds to the $file_magic_cmd with a given extended regex. # If you have `file' or equivalent on your system and you're not sure # whether `pass_all' will *always* work, you probably want this one. case $host_os in aix[4-9]*) lt_cv_deplibs_check_method=pass_all ;; beos*) lt_cv_deplibs_check_method=pass_all ;; bsdi[45]*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' lt_cv_file_magic_cmd='/usr/bin/file -L' lt_cv_file_magic_test_file=/shlib/libc.so ;; cygwin*) # func_win32_libid is a shell function defined in ltmain.sh lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' ;; mingw* | pw32*) # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump', # unless we find 'file', for example because we are cross-compiling. if ( file / ) >/dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; cegcc) # use the weaker test based on 'objdump'. See mingw*. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; gnu*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]' lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[3-9]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be Linux ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) lt_cv_deplibs_check_method=pass_all ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; *nto* | *qnx*) lt_cv_deplibs_check_method=pass_all ;; openbsd*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; tpf*) lt_cv_deplibs_check_method=pass_all ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 $as_echo "$lt_cv_deplibs_check_method" >&6; } file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; 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_prog_AR+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else 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_prog_AR="${ac_tool_prefix}ar" $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 fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 $as_echo "$AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_AR"; then ac_ct_AR=$AR # Extract the first word of "ar", so it can be a program name with args. set dummy ar; 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_prog_ac_ct_AR+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_AR"; then ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. else 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_prog_ac_ct_AR="ar" $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 fi fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 $as_echo "$ac_ct_AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_AR" = x; then AR="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac AR=$ac_ct_AR fi else AR="$ac_cv_prog_AR" fi test -z "$AR" && AR=ar test -z "$AR_FLAGS" && AR_FLAGS=cru if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; 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_prog_STRIP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else 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_prog_STRIP="${ac_tool_prefix}strip" $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 fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; 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_prog_ac_ct_STRIP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else 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_prog_ac_ct_STRIP="strip" $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 fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi test -z "$STRIP" && STRIP=: if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; 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_prog_RANLIB+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else 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_prog_RANLIB="${ac_tool_prefix}ranlib" $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 fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 $as_echo "$RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; 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_prog_ac_ct_RANLIB+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else 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_prog_ac_ct_RANLIB="ranlib" $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 fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 $as_echo "$ac_ct_RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then RANLIB=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac RANLIB=$ac_ct_RANLIB fi else RANLIB="$ac_cv_prog_RANLIB" fi test -z "$RANLIB" && RANLIB=: # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" fi # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Check for command to grab the raw symbol name followed by C symbol from nm. { $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 $as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then : $as_echo_n "(cached) " >&6 else # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[BCDEGRST]' # Regexp to match symbols that can be accessed directly from C. sympat='\([_A-Za-z][_A-Za-z0-9]*\)' # Define system-specific variables. case $host_os in aix*) symcode='[BCDT]' ;; cygwin* | mingw* | pw32* | cegcc*) symcode='[ABCDGISTW]' ;; hpux*) if test "$host_cpu" = ia64; then symcode='[ABCDEGRST]' fi ;; irix* | nonstopux*) symcode='[BCDEGRST]' ;; osf*) symcode='[BCDEGQRST]' ;; solaris*) symcode='[BDRT]' ;; sco3.2v5*) symcode='[DT]' ;; sysv4.2uw2*) symcode='[DT]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[ABDT]' ;; sysv4) symcode='[DFNSTU]' ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[ABCDGIRSTW]' ;; esac # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # Try without a prefix underscore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Fake it for dumpbin and say T for any non-static function # and D for any global variable. # Also find C++ and __fastcall symbols from MSVC++, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK '"\ " {last_section=section; section=\$ 3};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ " s[1]~/^[@?]/{print s[1], s[1]; next};"\ " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx" else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <<_LT_EOF #ifdef __cplusplus extern "C" { #endif char nm_test_var; void nm_test_func(void); void nm_test_func(void){} #ifdef __cplusplus } #endif int main(){nm_test_var='a';nm_test_func();return(0);} _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then # Now try to grab the symbols. nlist=conftest.nm if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\""; } >&5 (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext #ifdef __cplusplus extern "C" { #endif _LT_EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ const struct { const char *name; void *address; } lt__PROGRAM__LTX_preloaded_symbols[] = { { "@PROGRAM@", (void *) 0 }, _LT_EOF $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt__PROGRAM__LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_save_LIBS="$LIBS" lt_save_CFLAGS="$CFLAGS" LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS="$lt_save_LIBS" CFLAGS="$lt_save_CFLAGS" else echo "cannot find nm_test_func in $nlist" >&5 fi else echo "cannot find nm_test_var in $nlist" >&5 fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 fi else echo "$progname: failed program was:" >&5 cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= fi done fi if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5 $as_echo "failed" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 $as_echo "ok" >&6; } fi # Check whether --enable-libtool-lock was given. if test "${enable_libtool_lock+set}" = set; then : enableval=$enable_libtool_lock; fi test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" ;; *ELF-64*) HPUX_IA64_MODE="64" ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out which ABI we are using. echo '#line 6228 "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; ppc64-*linux*|powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; ppc*-*linux*|powerpc*-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 $as_echo_n "checking whether the C compiler needs -belf... " >&6; } if test "${lt_cv_cc_needs_belf+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_cc_needs_belf=yes else lt_cv_cc_needs_belf=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 $as_echo "$lt_cv_cc_needs_belf" >&6; } if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; sparc*-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) LD="${LD-ld} -m elf64_sparc" ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; esac need_locks="$enable_libtool_lock" case $host_os in rhapsody* | darwin*) if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. set dummy ${ac_tool_prefix}dsymutil; 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_prog_DSYMUTIL+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$DSYMUTIL"; then ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. else 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_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" $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 fi fi DSYMUTIL=$ac_cv_prog_DSYMUTIL if test -n "$DSYMUTIL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 $as_echo "$DSYMUTIL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_DSYMUTIL"; then ac_ct_DSYMUTIL=$DSYMUTIL # Extract the first word of "dsymutil", so it can be a program name with args. set dummy dsymutil; 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_prog_ac_ct_DSYMUTIL+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DSYMUTIL"; then ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. else 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_prog_ac_ct_DSYMUTIL="dsymutil" $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 fi fi ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL if test -n "$ac_ct_DSYMUTIL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 $as_echo "$ac_ct_DSYMUTIL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_DSYMUTIL" = x; then DSYMUTIL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DSYMUTIL=$ac_ct_DSYMUTIL fi else DSYMUTIL="$ac_cv_prog_DSYMUTIL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. set dummy ${ac_tool_prefix}nmedit; 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_prog_NMEDIT+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$NMEDIT"; then ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. else 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_prog_NMEDIT="${ac_tool_prefix}nmedit" $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 fi fi NMEDIT=$ac_cv_prog_NMEDIT if test -n "$NMEDIT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 $as_echo "$NMEDIT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_NMEDIT"; then ac_ct_NMEDIT=$NMEDIT # Extract the first word of "nmedit", so it can be a program name with args. set dummy nmedit; 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_prog_ac_ct_NMEDIT+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_NMEDIT"; then ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. else 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_prog_ac_ct_NMEDIT="nmedit" $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 fi fi ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT if test -n "$ac_ct_NMEDIT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 $as_echo "$ac_ct_NMEDIT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_NMEDIT" = x; then NMEDIT=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac NMEDIT=$ac_ct_NMEDIT fi else NMEDIT="$ac_cv_prog_NMEDIT" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. set dummy ${ac_tool_prefix}lipo; 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_prog_LIPO+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$LIPO"; then ac_cv_prog_LIPO="$LIPO" # Let the user override the test. else 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_prog_LIPO="${ac_tool_prefix}lipo" $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 fi fi LIPO=$ac_cv_prog_LIPO if test -n "$LIPO"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 $as_echo "$LIPO" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_LIPO"; then ac_ct_LIPO=$LIPO # Extract the first word of "lipo", so it can be a program name with args. set dummy lipo; 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_prog_ac_ct_LIPO+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_LIPO"; then ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test. else 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_prog_ac_ct_LIPO="lipo" $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 fi fi ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO if test -n "$ac_ct_LIPO"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 $as_echo "$ac_ct_LIPO" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_LIPO" = x; then LIPO=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac LIPO=$ac_ct_LIPO fi else LIPO="$ac_cv_prog_LIPO" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. set dummy ${ac_tool_prefix}otool; 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_prog_OTOOL+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL"; then ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test. else 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_prog_OTOOL="${ac_tool_prefix}otool" $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 fi fi OTOOL=$ac_cv_prog_OTOOL if test -n "$OTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 $as_echo "$OTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OTOOL"; then ac_ct_OTOOL=$OTOOL # Extract the first word of "otool", so it can be a program name with args. set dummy otool; 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_prog_ac_ct_OTOOL+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL"; then ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test. else 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_prog_ac_ct_OTOOL="otool" $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 fi fi ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL if test -n "$ac_ct_OTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 $as_echo "$ac_ct_OTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OTOOL" = x; then OTOOL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL=$ac_ct_OTOOL fi else OTOOL="$ac_cv_prog_OTOOL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. set dummy ${ac_tool_prefix}otool64; 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_prog_OTOOL64+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL64"; then ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test. else 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_prog_OTOOL64="${ac_tool_prefix}otool64" $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 fi fi OTOOL64=$ac_cv_prog_OTOOL64 if test -n "$OTOOL64"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 $as_echo "$OTOOL64" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OTOOL64"; then ac_ct_OTOOL64=$OTOOL64 # Extract the first word of "otool64", so it can be a program name with args. set dummy otool64; 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_prog_ac_ct_OTOOL64+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL64"; then ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test. else 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_prog_ac_ct_OTOOL64="otool64" $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 fi fi ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 if test -n "$ac_ct_OTOOL64"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 $as_echo "$ac_ct_OTOOL64" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OTOOL64" = x; then OTOOL64=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL64=$ac_ct_OTOOL64 fi else OTOOL64="$ac_cv_prog_OTOOL64" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 $as_echo_n "checking for -single_module linker flag... " >&6; } if test "${lt_cv_apple_cc_single_mod+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_apple_cc_single_mod=no if test -z "${LT_MULTI_MODULE}"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. rm -rf libconftest.dylib* echo "int foo(void){return 1;}" > conftest.c echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c" >&5 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&5 fi rm -rf libconftest.dylib* rm -f conftest.* fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 $as_echo "$lt_cv_apple_cc_single_mod" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 $as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } if test "${lt_cv_ld_exported_symbols_list+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_ld_exported_symbols_list=yes else lt_cv_ld_exported_symbols_list=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 $as_echo "$lt_cv_ld_exported_symbols_list" >&6; } case $host_os in rhapsody* | darwin1.[012]) _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[91]*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 10.[012]*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test "$lt_cv_apple_cc_single_mod" = "yes"; then _lt_dar_single_mod='$single_module' fi if test "$lt_cv_ld_exported_symbols_list" = "yes"; then _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' else _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' fi if test "$DSYMUTIL" != ":"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= fi ;; esac ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 $as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if test "${ac_cv_prog_CPP+set}" = set; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 $as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. 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 ; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if test "${ac_cv_header_stdc+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "#define STDC_HEADERS 1" >>confdefs.h fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h 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 " 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 fi done for ac_header in dlfcn.h do : ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default " if test "x$ac_cv_header_dlfcn_h" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_DLFCN_H 1 _ACEOF fi done 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 if test -z "$CXX"; then if test -n "$CCC"; then CXX=$CCC else if test -n "$ac_tool_prefix"; then for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$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_prog_CXX+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # Let the user override the test. else 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_prog_CXX="$ac_tool_prefix$ac_prog" $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 fi fi CXX=$ac_cv_prog_CXX if test -n "$CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 $as_echo "$CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CXX" && break done fi if test -z "$CXX"; then ac_ct_CXX=$CXX for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC 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_prog_ac_ct_CXX+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CXX"; then ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. else 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_prog_ac_ct_CXX="$ac_prog" $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 fi fi ac_ct_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 $as_echo "$ac_ct_CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CXX" && break done if test "x$ac_ct_CXX" = x; then CXX="g++" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CXX=$ac_ct_CXX fi fi fi fi # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } if test "${ac_cv_cxx_compiler_gnu+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_cxx_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GXX=yes else GXX= fi ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 $as_echo_n "checking whether $CXX accepts -g... " >&6; } if test "${ac_cv_prog_cxx_g+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_save_cxx_werror_flag=$ac_cxx_werror_flag ac_cxx_werror_flag=yes ac_cv_prog_cxx_g=no CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_g=yes else CXXFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : else ac_cxx_werror_flag=$ac_save_cxx_werror_flag CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cxx_werror_flag=$ac_save_cxx_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 $as_echo "$ac_cv_prog_cxx_g" >&6; } if test "$ac_test_CXXFLAGS" = set; then CXXFLAGS=$ac_save_CXXFLAGS elif test $ac_cv_prog_cxx_g = yes; then if test "$GXX" = yes; then CXXFLAGS="-g -O2" else CXXFLAGS="-g" fi else if test "$GXX" = yes; then CXXFLAGS="-O2" else CXXFLAGS= fi fi 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 if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then 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}: checking how to run the C++ preprocessor" >&5 $as_echo_n "checking how to run the C++ preprocessor... " >&6; } if test -z "$CXXCPP"; then if test "${ac_cv_prog_CXXCPP+set}" = set; then : $as_echo_n "(cached) " >&6 else # Double quotes because CXXCPP needs to be expanded for CXXCPP in "$CXX -E" "/lib/cpp" do ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi done ac_cv_prog_CXXCPP=$CXXCPP fi CXXCPP=$ac_cv_prog_CXXCPP else ac_cv_prog_CXXCPP=$CXXCPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5 $as_echo "$CXXCPP" >&6; } ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. 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;} _lt_caught_CXX_error=yes; } fi 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 else _lt_caught_CXX_error=yes fi # Set options enable_dlopen=no enable_win32_dll=no # Check whether --enable-shared was given. if test "${enable_shared+set}" = set; then : enableval=$enable_shared; p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$lt_save_ifs" ;; esac else enable_shared=yes fi # Check whether --with-pic was given. if test "${with_pic+set}" = set; then : withval=$with_pic; pic_mode="$withval" else pic_mode=default fi test -z "$pic_mode" && pic_mode=default # Check whether --enable-fast-install was given. if test "${enable_fast_install+set}" = set; then : enableval=$enable_fast_install; p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$lt_save_ifs" ;; esac else enable_fast_install=yes fi # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ltmain" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' test -z "$LN_S" && LN_S="ln -s" if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 $as_echo_n "checking for objdir... " >&6; } if test "${lt_cv_objdir+set}" = set; then : $as_echo_n "(cached) " >&6 else rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 $as_echo "$lt_cv_objdir" >&6; } objdir=$lt_cv_objdir cat >>confdefs.h <<_ACEOF #define LT_OBJDIR "$lt_cv_objdir/" _ACEOF case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. sed_quote_subst='s/\(["`$\\]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\(["`\\]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to delay expansion of an escaped single quote. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' # Global variables: ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a with_gnu_ld="$lt_cv_prog_gnu_ld" old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$LD" && LD=ld test -z "$ac_objext" && ac_objext=o for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` # Only perform the check for file, if the check method requires it test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 $as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } if test "${lt_cv_path_MAGIC_CMD+set}" = set; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/${ac_tool_prefix}file; then lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5 $as_echo_n "checking for file... " >&6; } if test "${lt_cv_path_MAGIC_CMD+set}" = set; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/file; then lt_cv_path_MAGIC_CMD="$ac_dir/file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi else MAGIC_CMD=: fi fi fi ;; esac # Use C for the default configuration in the libtool script lt_save_CC="$CC" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o objext=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Save the default compiler, since it gets overwritten when the other # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. compiler_DEFAULT=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then lt_prog_compiler_no_builtin_flag= if test "$GCC" = yes; then lt_prog_compiler_no_builtin_flag=' -fno-builtin' { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 $as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-fno-rtti -fno-exceptions" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -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:8127: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:8131: \$? = $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. $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_rtti_exceptions=yes fi fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 $as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" else : fi fi lt_prog_compiler_wl= lt_prog_compiler_pic= lt_prog_compiler_static= { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 $as_echo_n "checking for $compiler option to produce PIC... " >&6; } if test "$GCC" = yes; then lt_prog_compiler_wl='-Wl,' lt_prog_compiler_static='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support lt_prog_compiler_pic='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic='-fno-common' ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) # +Z the default ;; *) lt_prog_compiler_pic='-fPIC' ;; esac ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. lt_prog_compiler_can_build_shared=no enable_shared=no ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic='-fPIC -shared' ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic=-Kconform_pic fi ;; *) lt_prog_compiler_pic='-fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) lt_prog_compiler_wl='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' else lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' fi ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic='-DDLL_EXPORT' ;; hpux9* | hpux10* | hpux11*) lt_prog_compiler_wl='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? lt_prog_compiler_static='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) lt_prog_compiler_wl='-Wl,' # PIC (with -KPIC) is the default. lt_prog_compiler_static='-non_shared' ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in # old Intel for x86_64 which still supported -KPIC. ecc*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-static' ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; # Lahey Fortran 8.1. lf95*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='--shared' lt_prog_compiler_static='--static' ;; pgcc* | pgf77* | pgf90* | pgf95*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fpic' lt_prog_compiler_static='-Bstatic' ;; ccc*) lt_prog_compiler_wl='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static='-non_shared' ;; xl*) # IBM XL C 8.0/Fortran 10.1 on PPC lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-qpic' lt_prog_compiler_static='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='-Wl,' ;; *Sun\ F*) # Sun Fortran 8.3 passes all unrecognized flags to the linker lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='' ;; esac ;; esac ;; newsos6) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic='-fPIC -shared' ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static='-non_shared' ;; rdos*) lt_prog_compiler_static='-non_shared' ;; solaris*) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' case $cc_basename in f77* | f90* | f95*) lt_prog_compiler_wl='-Qoption ld ';; *) lt_prog_compiler_wl='-Wl,';; esac ;; sunos4*) lt_prog_compiler_wl='-Qoption ld ' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then lt_prog_compiler_pic='-Kconform_pic' lt_prog_compiler_static='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; unicos*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_can_build_shared=no ;; uts4*) lt_prog_compiler_pic='-pic' lt_prog_compiler_static='-Bstatic' ;; *) lt_prog_compiler_can_build_shared=no ;; esac fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic= ;; *) lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic" >&5 $as_echo "$lt_prog_compiler_pic" >&6; } # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } if test "${lt_cv_prog_compiler_pic_works+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic -DPIC" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -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:8466: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:8470: \$? = $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. $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works=yes fi fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 $as_echo "$lt_cv_prog_compiler_pic_works" >&6; } if test x"$lt_cv_prog_compiler_pic_works" = xyes; then case $lt_prog_compiler_pic in "" | " "*) ;; *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; esac else lt_prog_compiler_pic= lt_prog_compiler_can_build_shared=no fi fi # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } if test "${lt_cv_prog_compiler_static_works+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works=yes fi else lt_cv_prog_compiler_static_works=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 $as_echo "$lt_cv_prog_compiler_static_works" >&6; } if test x"$lt_cv_prog_compiler_static_works" = xyes; then : else lt_prog_compiler_static= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if test "${lt_cv_prog_compiler_c_o+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -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:8571: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:8575: \$? = $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 # So say no if there are warnings $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if test "${lt_cv_prog_compiler_c_o+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -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:8626: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:8630: \$? = $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 # So say no if there are warnings $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } hard_links="nottested" if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 $as_echo_n "checking if we can lock with hard links... " >&6; } hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 $as_echo "$hard_links" >&6; } if test "$hard_links" = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 $as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } runpath_var= allow_undefined_flag= always_export_symbols=no archive_cmds= archive_expsym_cmds= compiler_needs_object=no enable_shared_with_static_runtimes=no export_dynamic_flag_spec= export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' hardcode_automatic=no hardcode_direct=no hardcode_direct_absolute=no hardcode_libdir_flag_spec= hardcode_libdir_flag_spec_ld= hardcode_libdir_separator= hardcode_minus_L=no hardcode_shlibpath_var=unsupported inherit_rpath=no link_all_deplibs=unknown module_cmds= module_expsym_cmds= old_archive_from_new_cmds= old_archive_from_expsyms_cmds= thread_safe_flag_spec= whole_archive_flag_spec= # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; linux* | k*bsd*-gnu) link_all_deplibs=no ;; esac ld_shlibs=yes if test "$with_gnu_ld" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' export_dynamic_flag_spec='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec= fi supports_anon_versioning=no case `$LD -v 2>&1` in *GNU\ gold*) supports_anon_versioning=yes ;; *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[3-9]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: the GNU linker, at least up to release 2.9.1, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to modify your PATH *** so that a non-GNU linker is found, and then restart. _LT_EOF fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then allow_undefined_flag=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' allow_undefined_flag=unsupported always_export_symbols=no enable_shared_with_static_runtimes=yes export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs=no fi ;; interix[3-9]*) hardcode_direct=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='${wl}-rpath,$libdir' export_dynamic_flag_spec='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no if test "$host_os" = linux-dietlibc; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test "$tmp_diet" = no then tmp_addflag= tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; lf95*) # Lahey Fortran 8.1 whole_archive_flag_spec= tmp_sharedflag='--shared' ;; xl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' compiler_needs_object=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi case $cc_basename in xlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' hardcode_libdir_flag_spec= hardcode_libdir_flag_spec_ld='-rpath $libdir' archive_cmds='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' if test "x$supports_anon_versioning" = xyes; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac else ld_shlibs=no fi ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac ;; sunos4*) archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= hardcode_direct=yes hardcode_shlibpath_var=no ;; *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac if test "$ld_shlibs" = no; then runpath_var= hardcode_libdir_flag_spec= export_dynamic_flag_spec= whole_archive_flag_spec= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) allow_undefined_flag=unsupported always_export_symbols=yes archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct=unsupported fi ;; aix[4-9]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds='' hardcode_direct=yes hardcode_direct_absolute=yes hardcode_libdir_separator=':' link_all_deplibs=yes file_list_spec='${wl}-f,' if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L=yes hardcode_libdir_flag_spec='-L$libdir' hardcode_libdir_separator= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi link_all_deplibs=no else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi export_dynamic_flag_spec='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag='-berok' # Determine the default libpath from the value encoded in an # empty executable. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag="-z nodefs" archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag=' ${wl}-bernotok' allow_undefined_flag=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec='$convenience' archive_cmds_need_lc=yes # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; bsdi[45]*) export_dynamic_flag_spec=-rdynamic ;; cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_from_new_cmds='true' # FIXME: Should let the user specify the lib program. old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' fix_srcfile_path='`cygpath -w "$srcfile"`' enable_shared_with_static_runtimes=yes ;; darwin* | rhapsody*) archive_cmds_need_lc=no hardcode_direct=no hardcode_automatic=yes hardcode_shlibpath_var=unsupported whole_archive_flag_spec='' link_all_deplibs=yes allow_undefined_flag="$_lt_dar_allow_undefined" case $cc_basename in ifort*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test "$_lt_dar_can_shared" = "yes"; then output_verbose_link_cmd=echo archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" else ld_shlibs=no fi ;; dgux*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; freebsd1*) ld_shlibs=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; hpux9*) if test "$GCC" = yes; then archive_cmds='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes export_dynamic_flag_spec='${wl}-E' ;; hpux10*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_flag_spec_ld='+b $libdir' hardcode_libdir_separator=: hardcode_direct=yes hardcode_direct_absolute=yes export_dynamic_flag_spec='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes fi ;; hpux11*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: case $host_cpu in hppa*64*|ia64*) hardcode_direct=no hardcode_shlibpath_var=no ;; *) hardcode_direct=yes hardcode_direct_absolute=yes export_dynamic_flag_spec='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int foo(void) {} _ACEOF if ac_fn_c_try_link "$LINENO"; then : archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS="$save_LDFLAGS" else archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: inherit_rpath=yes link_all_deplibs=yes ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; newsos6) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: hardcode_shlibpath_var=no ;; *nto* | *qnx*) ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct=yes hardcode_shlibpath_var=no hardcode_direct_absolute=yes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' export_dynamic_flag_spec='${wl}-E' else case $host_os in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-R$libdir' ;; *) archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ;; esac fi else ld_shlibs=no fi ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' fi archive_cmds_need_lc='no' hardcode_libdir_separator=: ;; solaris*) no_undefined_flag=' -z defs' if test "$GCC" = yes; then wlarc='${wl}' archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) wlarc='' archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' ;; *) wlarc='${wl}' archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi hardcode_libdir_flag_spec='-R$libdir' hardcode_shlibpath_var=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. GCC discards it without `$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test "$GCC" = yes; then whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else whole_archive_flag_spec='-z allextract$convenience -z defaultextract' fi ;; esac link_all_deplibs=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; sysv4) case $host_vendor in sni) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' reload_cmds='$CC -r -o $output$reload_objs' hardcode_direct=no ;; motorola) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' hardcode_shlibpath_var=no ;; sysv4.3*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no export_dynamic_flag_spec='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ld_shlibs=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag='${wl}-z,text' archive_cmds_need_lc=no hardcode_shlibpath_var=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag='${wl}-z,text' allow_undefined_flag='${wl}-z,nodefs' archive_cmds_need_lc=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='${wl}-R,$libdir' hardcode_libdir_separator=':' link_all_deplibs=yes export_dynamic_flag_spec='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; *) ld_shlibs=no ;; esac if test x$host_vendor = xsni; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) export_dynamic_flag_spec='${wl}-Blargedynsym' ;; esac fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 $as_echo "$ld_shlibs" >&6; } test "$ld_shlibs" = no && can_build_shared=no with_gnu_ld=$with_gnu_ld # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc" in x|xyes) # Assume -lc should be added archive_cmds_need_lc=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } $RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl pic_flag=$lt_prog_compiler_pic compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag allow_undefined_flag= if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then archive_cmds_need_lc=no else archive_cmds_need_lc=yes fi allow_undefined_flag=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* { $as_echo "$as_me:${as_lineno-$LINENO}: result: $archive_cmds_need_lc" >&5 $as_echo "$archive_cmds_need_lc" >&6; } ;; esac fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } if test "$GCC" = yes; then case $host_os in darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; *) lt_awk_arg="/^libraries:/" ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'` else lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary. lt_tmp_lt_search_path_spec= lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path/$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" else test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk ' BEGIN {RS=" "; FS="/|\n";} { lt_foo=""; lt_count=0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo="/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[lt_foo]++; } if (lt_freq[lt_foo] == 1) { print lt_foo; } }'` sys_lib_search_path_spec=`$ECHO $lt_search_path_spec` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[4-9]*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[123]*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; interix[3-9]*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : shlibpath_overrides_runpath=yes fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS libdir=$save_libdir # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsdelf*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='NetBSD ld.elf_so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 $as_echo "$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" fi if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 $as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action= if test -n "$hardcode_libdir_flag_spec" || test -n "$runpath_var" || test "X$hardcode_automatic" = "Xyes" ; then # We can hardcode non-existent directories. if test "$hardcode_direct" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no && test "$hardcode_minus_L" != no; then # Linking always hardcodes the temporary library directory. hardcode_action=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action=unsupported fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 $as_echo "$hardcode_action" >&6; } if test "$hardcode_action" = relink || test "$inherit_rpath" = yes; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32* | cegcc*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if test "${ac_cv_lib_dl_dlopen+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $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 dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else ac_cv_lib_dl_dlopen=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_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = x""yes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes fi ;; *) ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" if test "x$ac_cv_func_shl_load" = x""yes; then : lt_cv_dlopen="shl_load" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 $as_echo_n "checking for shl_load in -ldld... " >&6; } if test "${ac_cv_lib_dld_shl_load+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $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 shl_load (); int main () { return shl_load (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_shl_load=yes else ac_cv_lib_dld_shl_load=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_dld_shl_load" >&5 $as_echo "$ac_cv_lib_dld_shl_load" >&6; } if test "x$ac_cv_lib_dld_shl_load" = x""yes; then : lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" else ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" if test "x$ac_cv_func_dlopen" = x""yes; then : lt_cv_dlopen="dlopen" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if test "${ac_cv_lib_dl_dlopen+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $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 dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else ac_cv_lib_dl_dlopen=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_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = x""yes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 $as_echo_n "checking for dlopen in -lsvld... " >&6; } if test "${ac_cv_lib_svld_dlopen+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsvld $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 dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_svld_dlopen=yes else ac_cv_lib_svld_dlopen=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_svld_dlopen" >&5 $as_echo "$ac_cv_lib_svld_dlopen" >&6; } if test "x$ac_cv_lib_svld_dlopen" = x""yes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 $as_echo_n "checking for dld_link in -ldld... " >&6; } if test "${ac_cv_lib_dld_dld_link+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $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 dld_link (); int main () { return dld_link (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_dld_link=yes else ac_cv_lib_dld_dld_link=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_dld_dld_link" >&5 $as_echo "$ac_cv_lib_dld_dld_link" >&6; } if test "x$ac_cv_lib_dld_dld_link" = x""yes; then : lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" fi fi fi fi fi fi ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 $as_echo_n "checking whether a program can dlopen itself... " >&6; } if test "${lt_cv_dlopen_self+set}" = set; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF #line 11010 "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } else puts (dlerror ()); return status; } _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; esac else : # compilation failed lt_cv_dlopen_self=no fi fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 $as_echo "$lt_cv_dlopen_self" >&6; } if test "x$lt_cv_dlopen_self" = xyes; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 $as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } if test "${lt_cv_dlopen_self_static+set}" = set; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self_static=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF #line 11106 "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } else puts (dlerror ()); return status; } _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; esac else : # compilation failed lt_cv_dlopen_self_static=no fi fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 $as_echo "$lt_cv_dlopen_self_static" >&6; } fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi striplib= old_striplib= { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 $as_echo_n "checking whether stripping libraries is possible... " >&6; } if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" old_striplib="$STRIP -S" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ;; esac fi # Report which library types will actually be built { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 $as_echo_n "checking if libtool supports shared libraries... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 $as_echo "$can_build_shared" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 $as_echo_n "checking whether to build shared libraries... " >&6; } test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[4-9]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 $as_echo "$enable_shared" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 $as_echo_n "checking whether to build static libraries... " >&6; } # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 $as_echo "$enable_static" >&6; } fi 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 CC="$lt_save_CC" 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 archive_cmds_need_lc_CXX=no allow_undefined_flag_CXX= always_export_symbols_CXX=no archive_expsym_cmds_CXX= compiler_needs_object_CXX=no export_dynamic_flag_spec_CXX= hardcode_direct_CXX=no hardcode_direct_absolute_CXX=no hardcode_libdir_flag_spec_CXX= hardcode_libdir_flag_spec_ld_CXX= hardcode_libdir_separator_CXX= hardcode_minus_L_CXX=no hardcode_shlibpath_var_CXX=unsupported hardcode_automatic_CXX=no inherit_rpath_CXX=no module_cmds_CXX= module_expsym_cmds_CXX= link_all_deplibs_CXX=unknown old_archive_cmds_CXX=$old_archive_cmds no_undefined_flag_CXX= whole_archive_flag_spec_CXX= enable_shared_with_static_runtimes_CXX=no # Source file extension for C++ test sources. ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o objext_CXX=$objext # No sense in running all these tests if we already determined that # the CXX compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_caught_CXX_error" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *[]) { return(0); }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_LD=$LD lt_save_GCC=$GCC GCC=$GXX lt_save_with_gnu_ld=$with_gnu_ld lt_save_path_LD=$lt_cv_path_LD if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx else $as_unset lt_cv_prog_gnu_ld fi if test -n "${lt_cv_path_LDCXX+set}"; then lt_cv_path_LD=$lt_cv_path_LDCXX else $as_unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} compiler=$CC compiler_CXX=$CC for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` if test -n "$compiler"; then # We don't want -fno-exception when compiling C++ code, so set the # no_builtin_flag separately if test "$GXX" = yes; then lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin' else lt_prog_compiler_no_builtin_flag_CXX= fi if test "$GXX" = yes; then # Set up default GNU C++ configuration # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then : withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 $as_echo_n "checking for ld used by $CC... " >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi if test "${lt_cv_path_LD+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 $as_echo "$LD" >&6; } 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 { $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 : $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 $as_echo "$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test "$with_gnu_ld" = yes; then archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) wlarc='${wl}' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | $GREP 'no-whole-archive' > /dev/null; then whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec_CXX= fi else with_gnu_ld=no wlarc= # A generic and very simple default shared library creation # command for GNU C++ for the case where it uses the native # linker, instead of GNU ld. If possible, this setting should # overridden to take advantage of the native linker features on # the platform it is being used on. archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' else GXX=no with_gnu_ld=no wlarc= fi # PORTME: fill in a description of your system's C++ link characteristics { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } ld_shlibs_CXX=yes case $host_os in aix3*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aix[4-9]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds_CXX='' hardcode_direct_CXX=yes hardcode_direct_absolute_CXX=yes hardcode_libdir_separator_CXX=':' link_all_deplibs_CXX=yes file_list_spec_CXX='${wl}-f,' if test "$GXX" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct_CXX=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L_CXX=yes hardcode_libdir_flag_spec_CXX='-L$libdir' hardcode_libdir_separator_CXX= fi esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi export_dynamic_flag_spec_CXX='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to # export. always_export_symbols_CXX=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag_CXX='-berok' # Determine the default libpath from the value encoded in an empty # executable. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag_CXX="-z nodefs" archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag_CXX=' ${wl}-bernotok' allow_undefined_flag_CXX=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec_CXX='$convenience' archive_cmds_need_lc_CXX=yes # This is similar to how AIX traditionally builds its shared # libraries. archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then allow_undefined_flag_CXX=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs_CXX=no fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec_CXX='-L$libdir' allow_undefined_flag_CXX=unsupported always_export_symbols_CXX=no enable_shared_with_static_runtimes_CXX=yes if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs_CXX=no fi ;; darwin* | rhapsody*) archive_cmds_need_lc_CXX=no hardcode_direct_CXX=no hardcode_automatic_CXX=yes hardcode_shlibpath_var_CXX=unsupported whole_archive_flag_spec_CXX='' link_all_deplibs_CXX=yes allow_undefined_flag_CXX="$_lt_dar_allow_undefined" case $cc_basename in ifort*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test "$_lt_dar_can_shared" = "yes"; then output_verbose_link_cmd=echo archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" module_expsym_cmds_CXX="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" if test "$lt_cv_apple_cc_single_mod" != "yes"; then archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" fi else ld_shlibs_CXX=no fi ;; dgux*) case $cc_basename in ec++*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; freebsd[12]*) # C++ shared libraries reported to be fairly broken before # switch to ELF ld_shlibs_CXX=no ;; freebsd-elf*) archive_cmds_need_lc_CXX=no ;; freebsd* | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions ld_shlibs_CXX=yes ;; gnu*) ;; hpux9*) hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' hardcode_libdir_separator_CXX=: export_dynamic_flag_spec_CXX='${wl}-E' hardcode_direct_CXX=yes hardcode_minus_L_CXX=yes # Not in the search PATH, # but as the default # location of the library. case $cc_basename in CC*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aCC*) archive_cmds_CXX='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' ;; *) if test "$GXX" = yes; then archive_cmds_CXX='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; hpux10*|hpux11*) if test $with_gnu_ld = no; then hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' hardcode_libdir_separator_CXX=: case $host_cpu in hppa*64*|ia64*) ;; *) export_dynamic_flag_spec_CXX='${wl}-E' ;; esac fi case $host_cpu in hppa*64*|ia64*) hardcode_direct_CXX=no hardcode_shlibpath_var_CXX=no ;; *) hardcode_direct_CXX=yes hardcode_direct_absolute_CXX=yes hardcode_minus_L_CXX=yes # Not in the search PATH, # but as the default # location of the library. ;; esac case $cc_basename in CC*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aCC*) case $host_cpu in hppa*64*) archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' ;; *) if test "$GXX" = yes; then if test $with_gnu_ld = no; then case $host_cpu in hppa*64*) archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; interix[3-9]*) hardcode_direct_CXX=no hardcode_shlibpath_var_CXX=no hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' export_dynamic_flag_spec_CXX='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds_CXX='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) if test "$GXX" = yes; then if test "$with_gnu_ld" = no; then archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib' fi fi link_all_deplibs_CXX=yes ;; esac hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: inherit_rpath_CXX=yes ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; icpc* | ecpc* ) # Intel C++ with_gnu_ld=yes # version 8.0 and above of icpc choke on multiply defined symbols # if we add $predep_objects and $postdep_objects, however 7.1 and # earlier do not add the objects themselves. case `$CC -V 2>&1` in *"Version 7."*) archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; esac archive_cmds_need_lc_CXX=no hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' ;; pgCC* | pgcpp*) # Portland Group C++ compiler case `$CC -V` in *pgCC\ [1-5]* | *pgcpp\ [1-5]*) prelink_cmds_CXX='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"' old_archive_cmds_CXX='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~ $RANLIB $oldlib' archive_cmds_CXX='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' archive_expsym_cmds_CXX='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; *) # Version 6 will use weak symbols archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; esac hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' ;; cxx*) # Compaq C++ archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec_CXX='-rpath $libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' ;; xl*) # IBM XL 8.0 on PPC, with GNU ld hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' archive_cmds_CXX='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then archive_expsym_cmds_CXX='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 no_undefined_flag_CXX=' -zdefs' archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' archive_expsym_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' hardcode_libdir_flag_spec_CXX='-R$libdir' whole_archive_flag_spec_CXX='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' compiler_needs_object_CXX=yes # Not sure whether something based on # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 # would be better. output_verbose_link_cmd='echo' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' ;; esac ;; esac ;; lynxos*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; m88k*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; mvs*) case $cc_basename in cxx*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= hardcode_libdir_flag_spec_CXX='-R$libdir' hardcode_direct_CXX=yes hardcode_shlibpath_var_CXX=no fi # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; *nto* | *qnx*) ld_shlibs_CXX=yes ;; openbsd2*) # C++ shared libraries are fairly broken ld_shlibs_CXX=no ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct_CXX=yes hardcode_shlibpath_var_CXX=no hardcode_direct_absolute_CXX=yes archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' export_dynamic_flag_spec_CXX='${wl}-E' whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' fi output_verbose_link_cmd=echo else ld_shlibs_CXX=no fi ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' hardcode_libdir_separator_CXX=: # Archives containing C++ object files must be created using # the KAI C++ compiler. case $host in osf3*) old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; *) old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' ;; esac ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; cxx*) case $host in osf3*) allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' ;; *) allow_undefined_flag_CXX=' -expect_unresolved \*' archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~ $RM $lib.exp' hardcode_libdir_flag_spec_CXX='-rpath $libdir' ;; esac hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' case $host in osf3*) archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; *) archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; esac hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; lcc*) # Lucid # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; solaris*) case $cc_basename in CC*) # Sun C++ 4.2, 5.x and Centerline C++ archive_cmds_need_lc_CXX=yes no_undefined_flag_CXX=' -zdefs' archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' hardcode_libdir_flag_spec_CXX='-R$libdir' hardcode_shlibpath_var_CXX=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. # Supported since Solaris 2.6 (maybe 2.5.1?) whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract' ;; esac link_all_deplibs_CXX=yes output_verbose_link_cmd='echo' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' ;; gcx*) # Green Hills C++ Compiler archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker if test "$GXX" = yes && test "$with_gnu_ld" = no; then no_undefined_flag_CXX=' ${wl}-z ${wl}defs' if $CC --version | $GREP -v '^2\.7' > /dev/null; then archive_cmds_CXX='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' else # g++ 2.7 appears to require `-G' NOT `-shared' on this # platform. archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' fi hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir' case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' ;; esac fi ;; esac ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag_CXX='${wl}-z,text' archive_cmds_need_lc_CXX=no hardcode_shlibpath_var_CXX=no runpath_var='LD_RUN_PATH' case $cc_basename in CC*) archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag_CXX='${wl}-z,text' allow_undefined_flag_CXX='${wl}-z,nodefs' archive_cmds_need_lc_CXX=no hardcode_shlibpath_var_CXX=no hardcode_libdir_flag_spec_CXX='${wl}-R,$libdir' hardcode_libdir_separator_CXX=':' link_all_deplibs_CXX=yes export_dynamic_flag_spec_CXX='${wl}-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 $as_echo "$ld_shlibs_CXX" >&6; } test "$ld_shlibs_CXX" = no && can_build_shared=no GCC_CXX="$GXX" LD_CXX="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... # Dependencies to place before and after the object being linked: predep_objects_CXX= postdep_objects_CXX= predeps_CXX= postdeps_CXX= compiler_lib_search_path_CXX= cat > conftest.$ac_ext <<_LT_EOF class Foo { public: Foo (void) { a = 0; } private: int a; }; _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then # Parse the compiler output and extract the necessary # objects, libraries and library flags. # Sentinel used to keep track of whether or not we are before # the conftest object file. pre_test_object_deps_done=no for p in `eval "$output_verbose_link_cmd"`; do case $p in -L* | -R* | -l*) # Some compilers place space between "-{L,R}" and the path. # Remove the space. if test $p = "-L" || test $p = "-R"; then prev=$p continue else prev= fi if test "$pre_test_object_deps_done" = no; then case $p in -L* | -R*) # Internal compiler library paths should come after those # provided the user. The postdeps already come after the # user supplied libs so there is no need to process them. if test -z "$compiler_lib_search_path_CXX"; then compiler_lib_search_path_CXX="${prev}${p}" else compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}" fi ;; # The "-l" case would never come before the object being # linked, so don't bother handling this case. esac else if test -z "$postdeps_CXX"; then postdeps_CXX="${prev}${p}" else postdeps_CXX="${postdeps_CXX} ${prev}${p}" fi fi ;; *.$objext) # This assumes that the test object file only shows up # once in the compiler output. if test "$p" = "conftest.$objext"; then pre_test_object_deps_done=yes continue fi if test "$pre_test_object_deps_done" = no; then if test -z "$predep_objects_CXX"; then predep_objects_CXX="$p" else predep_objects_CXX="$predep_objects_CXX $p" fi else if test -z "$postdep_objects_CXX"; then postdep_objects_CXX="$p" else postdep_objects_CXX="$postdep_objects_CXX $p" fi fi ;; *) ;; # Ignore the rest. esac done # Clean up. rm -f a.out a.exe else echo "libtool.m4: error: problem compiling CXX test program" fi $RM -f confest.$objext # PORTME: override above test on systems where it is broken case $host_os in interix[3-9]*) # Interix 3.5 installs completely hosed .la files for C++, so rather than # hack all around it, let's just trust "g++" to DTRT. predep_objects_CXX= postdep_objects_CXX= postdeps_CXX= ;; linux*) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac if test "$solaris_use_stlport4" != yes; then postdeps_CXX='-library=Cstd -library=Crun' fi ;; esac ;; solaris*) case $cc_basename in CC*) # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac # Adding this requires a known-good setup of shared libraries for # Sun compiler versions before 5.6, else PIC objects from an old # archive will be linked into the output, leading to subtle bugs. if test "$solaris_use_stlport4" != yes; then postdeps_CXX='-library=Cstd -library=Crun' fi ;; esac ;; esac case " $postdeps_CXX " in *" -lc "*) archive_cmds_need_lc_CXX=no ;; esac compiler_lib_search_dirs_CXX= if test -n "${compiler_lib_search_path_CXX}"; then compiler_lib_search_dirs_CXX=`echo " ${compiler_lib_search_path_CXX}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` fi lt_prog_compiler_wl_CXX= lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX= { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 $as_echo_n "checking for $compiler option to produce PIC... " >&6; } # C++ specific cases for pic, static, wl, etc. if test "$GXX" = yes; then lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_CXX='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support lt_prog_compiler_pic_CXX='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic_CXX='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic_CXX='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all lt_prog_compiler_pic_CXX= ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic_CXX=-Kconform_pic fi ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) ;; *) lt_prog_compiler_pic_CXX='-fPIC' ;; esac ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic_CXX='-fPIC -shared' ;; *) lt_prog_compiler_pic_CXX='-fPIC' ;; esac else case $host_os in aix[4-9]*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_CXX='-Bstatic' else lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68*) # Green Hills C++ Compiler # _LT_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; dgux*) case $cc_basename in ec++*) lt_prog_compiler_pic_CXX='-KPIC' ;; ghcx*) # Green Hills C++ Compiler lt_prog_compiler_pic_CXX='-pic' ;; *) ;; esac ;; freebsd* | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' if test "$host_cpu" != ia64; then lt_prog_compiler_pic_CXX='+Z' fi ;; aCC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_CXX='+Z' ;; esac ;; *) ;; esac ;; interix*) # This is c89, which is MS Visual C++ (no shared libs) # Anyone wants to do a port? ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in KCC*) # KAI C++ Compiler lt_prog_compiler_wl_CXX='--backend -Wl,' lt_prog_compiler_pic_CXX='-fPIC' ;; ecpc* ) # old Intel C++ for x86_64 which still supported -KPIC. lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-static' ;; icpc* ) # Intel C++, used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-fPIC' lt_prog_compiler_static_CXX='-static' ;; pgCC* | pgcpp*) # Portland Group C++ compiler lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-fpic' lt_prog_compiler_static_CXX='-Bstatic' ;; cxx*) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX='-non_shared' ;; xlc* | xlC*) # IBM XL 8.0 on PPC lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-qpic' lt_prog_compiler_static_CXX='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' lt_prog_compiler_wl_CXX='-Qoption ld ' ;; esac ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx*) lt_prog_compiler_pic_CXX='-W c,exportall' ;; *) ;; esac ;; netbsd* | netbsdelf*-gnu) ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic_CXX='-fPIC -shared' ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) lt_prog_compiler_wl_CXX='--backend -Wl,' ;; RCC*) # Rational C++ 2.4.1 lt_prog_compiler_pic_CXX='-pic' ;; cxx*) # Digital/Compaq C++ lt_prog_compiler_wl_CXX='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX='-non_shared' ;; *) ;; esac ;; psos*) ;; solaris*) case $cc_basename in CC*) # Sun C++ 4.2, 5.x and Centerline C++ lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' lt_prog_compiler_wl_CXX='-Qoption ld ' ;; gcx*) # Green Hills C++ Compiler lt_prog_compiler_pic_CXX='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x lt_prog_compiler_pic_CXX='-pic' lt_prog_compiler_static_CXX='-Bstatic' ;; lcc*) # Lucid lt_prog_compiler_pic_CXX='-pic' ;; *) ;; esac ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 lt_prog_compiler_pic_CXX='-KPIC' ;; *) ;; esac ;; vxworks*) ;; *) lt_prog_compiler_can_build_shared_CXX=no ;; esac fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic_CXX= ;; *) lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC" ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic_CXX" >&5 $as_echo "$lt_prog_compiler_pic_CXX" >&6; } # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic_CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... " >&6; } if test "${lt_cv_prog_compiler_pic_works_CXX+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works_CXX=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -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:13062: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:13066: \$? = $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. $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works_CXX=yes fi fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_CXX" >&5 $as_echo "$lt_cv_prog_compiler_pic_works_CXX" >&6; } if test x"$lt_cv_prog_compiler_pic_works_CXX" = xyes; then case $lt_prog_compiler_pic_CXX in "" | " "*) ;; *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;; esac else lt_prog_compiler_pic_CXX= lt_prog_compiler_can_build_shared_CXX=no fi fi # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } if test "${lt_cv_prog_compiler_static_works_CXX+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works_CXX=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works_CXX=yes fi else lt_cv_prog_compiler_static_works_CXX=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_CXX" >&5 $as_echo "$lt_cv_prog_compiler_static_works_CXX" >&6; } if test x"$lt_cv_prog_compiler_static_works_CXX" = xyes; then : else lt_prog_compiler_static_CXX= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o_CXX=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -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:13161: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:13165: \$? = $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 # So say no if there are warnings $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_CXX=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5 $as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o_CXX=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -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:13213: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:13217: \$? = $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 # So say no if there are warnings $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_CXX=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5 $as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; } hard_links="nottested" if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 $as_echo_n "checking if we can lock with hard links... " >&6; } hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 $as_echo "$hard_links" >&6; } if test "$hard_links" = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 $as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' case $host_os in aix[4-9]*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi ;; pw32*) export_symbols_cmds_CXX="$ltdll_cmds" ;; cygwin* | mingw* | cegcc*) export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;/^.*[ ]__nm__/s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' ;; linux* | k*bsd*-gnu) link_all_deplibs_CXX=no ;; *) export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 $as_echo "$ld_shlibs_CXX" >&6; } test "$ld_shlibs_CXX" = no && can_build_shared=no with_gnu_ld_CXX=$with_gnu_ld # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc_CXX" in x|xyes) # Assume -lc should be added archive_cmds_need_lc_CXX=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds_CXX in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } $RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl_CXX pic_flag=$lt_prog_compiler_pic_CXX compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag_CXX allow_undefined_flag_CXX= if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 (eval $archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then archive_cmds_need_lc_CXX=no else archive_cmds_need_lc_CXX=yes fi allow_undefined_flag_CXX=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* { $as_echo "$as_me:${as_lineno-$LINENO}: result: $archive_cmds_need_lc_CXX" >&5 $as_echo "$archive_cmds_need_lc_CXX" >&6; } ;; esac fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[4-9]*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[123]*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; interix[3-9]*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_CXX\"; \ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_CXX\"" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : shlibpath_overrides_runpath=yes fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS libdir=$save_libdir # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsdelf*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='NetBSD ld.elf_so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 $as_echo "$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" fi if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 $as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action_CXX= if test -n "$hardcode_libdir_flag_spec_CXX" || test -n "$runpath_var_CXX" || test "X$hardcode_automatic_CXX" = "Xyes" ; then # We can hardcode non-existent directories. if test "$hardcode_direct_CXX" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_TAGVAR(hardcode_shlibpath_var, CXX)" != no && test "$hardcode_minus_L_CXX" != no; then # Linking always hardcodes the temporary library directory. hardcode_action_CXX=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action_CXX=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action_CXX=unsupported fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action_CXX" >&5 $as_echo "$hardcode_action_CXX" >&6; } if test "$hardcode_action_CXX" = relink || test "$inherit_rpath_CXX" = yes; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi fi # test -n "$compiler" CC=$lt_save_CC LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC with_gnu_ld=$lt_save_with_gnu_ld lt_cv_path_LDCXX=$lt_cv_path_LD lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld fi # test "$_lt_caught_CXX_error" != yes ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu ac_config_commands="$ac_config_commands libtool" # Only expand once: # ---------------------------------------- # Header Files # ---------------------------------------- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if test "${ac_cv_header_stdc+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF if ac_fn_cxx_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "#define STDC_HEADERS 1" >>confdefs.h fi ac_header_dirent=no for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do 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 eval "test \"\${$as_ac_Header+set}\"" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include <$ac_hdr> int main () { if ((DIR *) 0) return 0; ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : eval "$as_ac_Header=yes" else eval "$as_ac_Header=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$as_ac_Header { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } 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 ac_header_dirent=$ac_hdr; break fi done # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. if test $ac_header_dirent = dirent.h; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 $as_echo_n "checking for library containing opendir... " >&6; } if test "${ac_cv_search_opendir+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_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 opendir (); int main () { return opendir (); ; return 0; } _ACEOF for ac_lib in '' dir; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_search_opendir=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if test "${ac_cv_search_opendir+set}" = set; then : break fi done if test "${ac_cv_search_opendir+set}" = set; then : else ac_cv_search_opendir=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5 $as_echo "$ac_cv_search_opendir" >&6; } ac_res=$ac_cv_search_opendir if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 $as_echo_n "checking for library containing opendir... " >&6; } if test "${ac_cv_search_opendir+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_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 opendir (); int main () { return opendir (); ; return 0; } _ACEOF for ac_lib in '' x; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_search_opendir=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if test "${ac_cv_search_opendir+set}" = set; then : break fi done if test "${ac_cv_search_opendir+set}" = set; then : else ac_cv_search_opendir=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5 $as_echo "$ac_cv_search_opendir" >&6; } ac_res=$ac_cv_search_opendir if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5 $as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; } if test "${ac_cv_header_time+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include int main () { if ((struct tm *) 0) return 0; ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_header_time=yes else ac_cv_header_time=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5 $as_echo "$ac_cv_header_time" >&6; } if test $ac_cv_header_time = yes; then $as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5 $as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; } if test "${ac_cv_header_sys_wait_h+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #ifndef WEXITSTATUS # define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8) #endif #ifndef WIFEXITED # define WIFEXITED(stat_val) (((stat_val) & 255) == 0) #endif int main () { int s; wait (&s); s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_header_sys_wait_h=yes else ac_cv_header_sys_wait_h=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5 $as_echo "$ac_cv_header_sys_wait_h" >&6; } if test $ac_cv_header_sys_wait_h = yes; then $as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h fi for ac_header in unistd.h string.h strings.h 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" 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 fi done # ---------------------------------------- # Functions # ---------------------------------------- ac_fn_cxx_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default" if test "x$ac_cv_type_pid_t" = x""yes; then : else cat >>confdefs.h <<_ACEOF #define pid_t int _ACEOF fi for ac_header in vfork.h do : ac_fn_cxx_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default" if test "x$ac_cv_header_vfork_h" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_VFORK_H 1 _ACEOF fi done 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" 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 fi done if test "x$ac_cv_func_fork" = xyes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5 $as_echo_n "checking for working fork... " >&6; } if test "${ac_cv_func_fork_works+set}" = set; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ac_cv_func_fork_works=cross else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int main () { /* By Ruediger Kuhlmann. */ return fork () < 0; ; return 0; } _ACEOF if ac_fn_cxx_try_run "$LINENO"; then : ac_cv_func_fork_works=yes else ac_cv_func_fork_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5 $as_echo "$ac_cv_func_fork_works" >&6; } else ac_cv_func_fork_works=$ac_cv_func_fork fi if test "x$ac_cv_func_fork_works" = xcross; then case $host in *-*-amigaos* | *-*-msdosdjgpp*) # Override, as these systems have only a dummy fork() stub ac_cv_func_fork_works=no ;; *) ac_cv_func_fork_works=yes ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5 $as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;} fi ac_cv_func_vfork_works=$ac_cv_func_vfork if test "x$ac_cv_func_vfork" = xyes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5 $as_echo_n "checking for working vfork... " >&6; } if test "${ac_cv_func_vfork_works+set}" = set; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ac_cv_func_vfork_works=cross else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Thanks to Paul Eggert for this test. */ $ac_includes_default #include #ifdef HAVE_VFORK_H # include #endif /* On some sparc systems, changes by the child to local and incoming argument registers are propagated back to the parent. The compiler is told about this with #include , but some compilers (e.g. gcc -O) don't grok . Test for this by using a static variable whose address is put into a register that is clobbered by the vfork. */ static void #ifdef __cplusplus sparc_address_test (int arg) # else sparc_address_test (arg) int arg; #endif { static pid_t child; if (!child) { child = vfork (); if (child < 0) { perror ("vfork"); _exit(2); } if (!child) { arg = getpid(); write(-1, "", 0); _exit (arg); } } } int main () { pid_t parent = getpid (); pid_t child; sparc_address_test (0); child = vfork (); if (child == 0) { /* Here is another test for sparc vfork register problems. This test uses lots of local variables, at least as many local variables as main has allocated so far including compiler temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should reuse the register of parent for one of the local variables, since it will think that parent can't possibly be used any more in this routine. Assigning to the local variable will thus munge parent in the parent process. */ pid_t p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); /* Convince the compiler that p..p7 are live; otherwise, it might use the same hardware register for all 8 local variables. */ if (p != p1 || p != p2 || p != p3 || p != p4 || p != p5 || p != p6 || p != p7) _exit(1); /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent from child file descriptors. If the child closes a descriptor before it execs or exits, this munges the parent's descriptor as well. Test for this by closing stdout in the child. */ _exit(close(fileno(stdout)) != 0); } else { int status; struct stat st; while (wait(&status) != child) ; return ( /* Was there some problem with vforking? */ child < 0 /* Did the child fail? (This shouldn't happen.) */ || status /* Did the vfork/compiler bug occur? */ || parent != getpid() /* Did the file descriptor bug occur? */ || fstat(fileno(stdout), &st) != 0 ); } } _ACEOF if ac_fn_cxx_try_run "$LINENO"; then : ac_cv_func_vfork_works=yes else ac_cv_func_vfork_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5 $as_echo "$ac_cv_func_vfork_works" >&6; } fi; if test "x$ac_cv_func_fork_works" = xcross; then ac_cv_func_vfork_works=$ac_cv_func_vfork { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5 $as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;} fi if test "x$ac_cv_func_vfork_works" = xyes; then $as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h else $as_echo "#define vfork fork" >>confdefs.h fi if test "x$ac_cv_func_fork_works" = xyes; then $as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h fi for ac_func in sigaction strerror waitpid wait3 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" 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 fi done # ---------------------------------------- # Packages # ---------------------------------------- # 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 as_fn_error $? "Cannot find required program pkg-config." "$LINENO" 5 else : fi { $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= 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 fi done fi rm -f conftest.err conftest.i 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= else LIBS=$ac_save_LIBS for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g` 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 done fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi # $ac_x_libraries = no 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 : { $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. */ 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" 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 fi # 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 path=$PATH if test -n "QTDIR" && test -d "$QTDIR/include" ; then if test -d "$QTDIR/include/Qt" ; then : elif test -f "$QTDIR/include/qobject.h" ; then as_fn_error $? "We want Qt4 but your QTDIR variable points to a Qt3 install. Please check variables QTDIR, QMAKE, QMAKESPEC, etc.. Unsetting them is better than setting them wrong." "$LINENO" 5 fi fi if test -n "$QTDIR" && test -d "$QTDIR/bin" ; then path=$QTDIR/bin:$PATH fi if test -z "$QMAKE" ; then for ac_prog in qmake-qt4 qmake 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_QMAKE+set}" = set; then : $as_echo_n "(cached) " >&6 else case $QMAKE in [\\/]* | ?:[\\/]*) ac_cv_path_QMAKE="$QMAKE" # 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_QMAKE="$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 QMAKE=$ac_cv_path_QMAKE if test -n "$QMAKE"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $QMAKE" >&5 $as_echo "$QMAKE" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$QMAKE" && break done fi if test -z "$QMAKE" ; then as_fn_error $? "Cannot find the Qt4 program qmake. Please define variable QMAKE and possibly QMAKESPEC. Defining QTDIR can help although it is deprecated." "$LINENO" 5 fi mkdir conftest.d cat > conftest.d/conftest.pro <<\EOF message(QMAKE_UIC="$$QMAKE_UIC") message(QMAKE_MOC="$$QMAKE_MOC") message(QT_VERSION="$$[QT_VERSION]") message(QT_INSTALL_PREFIX="$$[QT_INSTALL_PREFIX]") message(QT_INSTALL_DATA="$$[QT_INSTALL_DATA]") message(QT_INSTALL_HEADERS="$$[QT_INSTALL_HEADERS]") message(QT_INSTALL_BINS="$$[QT_INSTALL_BINS]") EOF if ( cd conftest.d && $QMAKE > conftest.out 2>&1 ) ; then sed -e 's/^.*: *//' < conftest.d/conftest.out > conftest.d/conftest.sh . conftest.d/conftest.sh rm -rf conftest.d else rm -rf conftest.d as_fn_error $? "Cannot successfully run Qt4 program qmake. Please define variable QMAKE to a working qmake. If you define QMAKESPEC, make sure it is correct." "$LINENO" 5 fi case "$QT_VERSION" in 4.*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: Program qmake reports Qt version $QT_VERSION." >&5 $as_echo "Program qmake reports Qt version $QT_VERSION." >&6; } ;; *) as_fn_error $? "Qt version $QT_VERSION is insufficient. Please define variable QMAKE to a suitable qmake." "$LINENO" 5 ;; esac if test -z "$QTDIR" && test -n "$QT_INSTALL_DATA" && test -d "$QT_INSTALL_DATA/bin" ; then QTDIR="$QT_INSTALL_DATA" { $as_echo "$as_me:${as_lineno-$LINENO}: result: Defining QTDIR=$QTDIR" >&5 $as_echo "Defining QTDIR=$QTDIR" >&6; } fi path=$PATH if test -n "$QTDIR" && test -d "$QTDIR/bin" ; then path=$QTDIR/bin:$path fi if test -d "$QT_INSTALL_BINS" ; then path=$QT_INSTALL_BINS:$path fi if test -z "$MOC" ; then if test -x "$QMAKE_MOC" ; then MOC=$QMAKE_MOC { $as_echo "$as_me:${as_lineno-$LINENO}: result: Defining MOC=$MOC" >&5 $as_echo "Defining MOC=$MOC" >&6; } elif test -d "$QTDIR" && test -d "$QTDIR/bin" && test -x "$QTDIR/bin/moc" ; then MOC="$QTDIR/bin/moc" { $as_echo "$as_me:${as_lineno-$LINENO}: result: Defining MOC=$MOC" >&5 $as_echo "Defining MOC=$MOC" >&6; } else for ac_prog in moc-qt4 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 $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 fi fi if test -z "$UIC" ; then if test -x "$QMAKE_UIC" ; then UIC=$QMAKE_UIC { $as_echo "$as_me:${as_lineno-$LINENO}: result: Defining UIC=$UIC" >&5 $as_echo "Defining UIC=$UIC" >&6; } elif test -d "$QTDIR" && test -d "$QTDIR/bin" && test -x "$QTDIR/bin/uic" ; then UIC="$QTDIR/bin/uic" { $as_echo "$as_me:${as_lineno-$LINENO}: result: Defining UIC=$UIC" >&5 $as_echo "Defining UIC=$UIC" >&6; } else for ac_prog in uic-qt4 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 $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 fi fi if test -z "$RCC" ; then for ac_prog in rcc-qt4 rcc 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_RCC+set}" = set; then : $as_echo_n "(cached) " >&6 else case $RCC in [\\/]* | ?:[\\/]*) ac_cv_path_RCC="$RCC" # 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_RCC="$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 RCC=$ac_cv_path_RCC if test -n "$RCC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RCC" >&5 $as_echo "$RCC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$RCC" && break done fi if test -z "$LUPDATE" ; then for ac_prog in lupdate-qt4 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 $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 fi if test -z "$LRELEASE" ; then for ac_prog in lrelease-qt4 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 $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 fi PATH=$path { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ddjvuapi" >&5 $as_echo_n "checking for ddjvuapi... " >&6; } if test -n "$DDJVUAPI_LIBS" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: user defined" >&5 $as_echo "user defined" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: using DDJVUAPI_LIBS=$DDJVUAPI_LIBS" >&5 $as_echo "using DDJVUAPI_LIBS=$DDJVUAPI_LIBS" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: using DDJVUAPI_CFLAGS=$DDJVUAPI_CFLAGS" >&5 $as_echo "using DDJVUAPI_CFLAGS=$DDJVUAPI_CFLAGS" >&6; } elif test -x "$PKG_CONFIG" ; then if $PKG_CONFIG ddjvuapi ; then ac_ddjvuapi=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5 $as_echo "found" >&6; } DDJVUAPI_LIBS=`$PKG_CONFIG --libs ddjvuapi` { $as_echo "$as_me:${as_lineno-$LINENO}: result: setting DDJVUAPI_LIBS=$DDJVUAPI_LIBS" >&5 $as_echo "setting DDJVUAPI_LIBS=$DDJVUAPI_LIBS" >&6; } DDJVUAPI_CFLAGS=`$PKG_CONFIG --cflags ddjvuapi` { $as_echo "$as_me:${as_lineno-$LINENO}: result: setting DDJVUAPI_CFLAGS=$DDJVUAPI_CFLAGS" >&5 $as_echo "setting DDJVUAPI_CFLAGS=$DDJVUAPI_CFLAGS" >&6; } $as_echo "#define HAVE_DDJVUAPI 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_ddjvuapi=no as_fn_error $? "Cannot find required package ddjvuapi." "$LINENO" 5 fi else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no pkg-config" >&5 $as_echo "no pkg-config" >&6; } ac_ddjvuapi=no as_fn_error $? "Cannot find required package ddjvuapi." "$LINENO" 5 fi ac_tiff=no # Check whether --with-tiff was given. if test "${with_tiff+set}" = set; then : withval=$with_tiff; ac_tiff=$withval else ac_tiff=yes fi # Process specification if test x$ac_tiff = xyes ; then test x${TIFF_LIBS+set} != xset && TIFF_LIBS="-ltiff" elif test x$ac_tiff != xno ; then test x${TIFF_LIBS+set} != xset && TIFF_LIBS="-L$ac_tiff/lib -ltiff" test x${TIFF_CFLAGS+set} != xset && TIFF_CFLAGS="-I$ac_tiff/include" fi # Try linking if test x$ac_tiff != xno ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the libtiff library" >&5 $as_echo_n "checking for the libtiff library... " >&6; } save_CFLAGS="$CFLAGS" save_CXXFLAGS="$CXXFLAGS" save_LIBS="$LIBS" CFLAGS="$CFLAGS $TIFF_CFLAGS" CXXFLAGS="$CXXFLAGS $TIFF_CFLAGS" LIBS="$LIBS $TIFF_LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __cplusplus extern "C" { #endif #include #include #ifdef __cplusplus } #endif int main () { TIFFOpen(0,0); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : ac_tiff=yes else ac_tiff=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext CFLAGS="$save_CFLAGS" CXXFLAGS="$save_CXXFLAGS" LIBS="$save_LIBS" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_tiff" >&5 $as_echo "$ac_tiff" >&6; } fi # Finish if test x$ac_tiff = xno; then TIFF_CFLAGS= ; TIFF_LIBS= { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Cannot find libtiff (required for tiff export)." >&5 $as_echo "$as_me: WARNING: Cannot find libtiff (required for tiff export)." >&2;} else $as_echo "#define HAVE_TIFF 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: result: setting TIFF_CFLAGS=$TIFF_CFLAGS" >&5 $as_echo "setting TIFF_CFLAGS=$TIFF_CFLAGS" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: setting TIFF_LIBS=$TIFF_LIBS" >&5 $as_echo "setting TIFF_LIBS=$TIFF_LIBS" >&6; } : fi # ---------------------------------------- # nsdejavu # ---------------------------------------- ac_nsdejavu=yes # Check whether --enable-nsdejavu was given. if test "${enable_nsdejavu+set}" = set; then : enableval=$enable_nsdejavu; ac_nsdejavu=$enableval fi if test "$ac_nsdejavu" != no ; then { $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= 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 fi done fi rm -f conftest.err conftest.i 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= else LIBS=$ac_save_LIBS for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g` 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 done fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi # $ac_x_libraries = no 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 : { $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. */ 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" 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 fi # 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" = yes; then ac_nsdejavu=no { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Disabling plugin compilation (missing X11 include files)." >&5 $as_echo "$as_me: WARNING: Disabling plugin compilation (missing X11 include files)." >&2;} fi ac_xt=yes ac_glib=yes { $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 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 ac_glib=no fi savedCFLAGS="$CFLAGS" CFLAGS="$CFLAGS ${X_CFLAGS}" 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 ac_xt=no 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 ac_xt=no fi CFLAGS="$savedCFLAGS" if test "$ac_xt" != no ; then $as_echo "#define HAVE_XT 1" >>confdefs.h if test "$ac_glib" = no ; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: GLib not found. Compiling plugin without XEmbed." >&5 $as_echo "$as_me: WARNING: GLib not found. Compiling plugin without XEmbed." >&2;} fi else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Xt not found. Compiling plugin with XEmbed only." >&5 $as_echo "$as_me: WARNING: Xt not found. Compiling plugin with XEmbed only." >&2;} if test "$ac_glib" = no ; then ac_nsdejavu=no { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Disabling plugin compilation (need Xt and/or Glib2.)" >&5 $as_echo "$as_me: WARNING: Disabling plugin compilation (need Xt and/or Glib2.)" >&2;} fi fi fi if test "$ac_nsdejavu" != no ; then ac_qt_x11=no 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 saved_CXXFLAGS=$CXXFLAGS CXXFLAGS="$CXXFLAGS -I$QT_INSTALL_HEADERS -I$QT_INSTALL_HEADERS/QtCore" ac_fn_cxx_check_decl "$LINENO" "Q_WS_X11" "ac_cv_have_decl_Q_WS_X11" "#include " if test "x$ac_cv_have_decl_Q_WS_X11" = x""yes; then : ac_qt_x11=yes fi CXXFLAGS=$saved_CXXFLAGS 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 if test "$ac_qt_x11" != yes ; then ac_nsdejavu=no { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Disabling plugin compilation (need X11-based version of Qt.)" >&5 $as_echo "$as_me: WARNING: Disabling plugin compilation (need X11-based version of Qt.)" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: If you have an X11-supporting Qt, try:" >&5 $as_echo "$as_me: If you have an X11-supporting Qt, try:" >&6;} { $as_echo "$as_me:${as_lineno-$LINENO}: CPPFLAGS=-D__USE_WS_X11__ ./configure ..." >&5 $as_echo "$as_me: CPPFLAGS=-D__USE_WS_X11__ ./configure ..." >&6;} fi fi if test "$ac_nsdejavu" != no ; then # prepare flags NSDEJAVU_CFLAGS= NSDEJAVU_LIBS= 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 # nsdejavu install if test -z "$INSTALL_SHLIB" ; then INSTALL_SHLIB="${INSTALL_DATA}" case "$host" in *-cygwin* | *-mingw*) INSTALL_SHLIB="cp" ;; esac fi NSDEJAVU_YES='' NSDEJAVU_NO='#' else NSDEJAVU_YES='#' NSDEJAVU_NO='' fi # ---------------------------------------- # npdjvu # ---------------------------------------- ac_npdjvu=no # Check whether --enable-npdjvu was given. if test "${enable_npdjvu+set}" = set; then : enableval=$enable_npdjvu; ac_npdjvu=$enableval fi if test "$ac_npdjvu" != no ; then NPDJVU_YES='' NPDJVU_NO='#' { $as_echo "$as_me:${as_lineno-$LINENO}: Enabling compilation of the **experimental** plugin npdjvu," >&5 $as_echo "$as_me: Enabling compilation of the **experimental** plugin npdjvu," >&6;} else NPDJVU_YES='#' NPDJVU_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 if test -x ${XDG_MIME} && \ test -x ${XDG_ICON_RESOURCE} && \ test -x ${XDG_DESKTOP_MENU} then true elif test "$ac_desktopfiles" = yes ; then ac_desktopfiles=no { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Cannot find the Xdg Portland tools. -------------------------------------------------------- *** The scripts to register icons and menus *** ${datadir}/djvu/osi/desktop/register-djvu-mimetype, and *** ${datadir}/djvu/djview3/desktop/register-djview3-menu *** will not be installed. --------------------------------------------------------" >&5 $as_echo "$as_me: WARNING: Cannot find the Xdg Portland tools. -------------------------------------------------------- *** The scripts to register icons and menus *** ${datadir}/djvu/osi/desktop/register-djvu-mimetype, and *** ${datadir}/djvu/djview3/desktop/register-djview3-menu *** will not be installed. --------------------------------------------------------" >&2;} fi if test ${ac_desktopfiles} != no ; then DESKTOP_YES='' DESKTOP_NO='#' else DESKTOP_YES='#' DESKTOP_NO='' fi # ---------------------------------------- # Paths # ---------------------------------------- # Define installation paths and version string save_prefix="${prefix}" save_exec_prefix="${exec_prefix}" test "x$prefix" = xNONE && prefix="$ac_default_prefix" test "x$exec_prefix" = xNONE && exec_prefix="$prefix" DIR_PREFIX="`eval echo \"$prefix\"`" cat >>confdefs.h <<_ACEOF #define DIR_PREFIX "${DIR_PREFIX}" _ACEOF DIR_EXEC_PREFIX="`eval echo \"$exec_prefix\"`" DIR_EXEC_PREFIX="`eval echo \"$DIR_EXEC_PREFIX\"`" cat >>confdefs.h <<_ACEOF #define DIR_EXEC_PREFIX "${DIR_EXEC_PREFIX}" _ACEOF DIR_BINDIR="`eval echo \"$bindir\"`" DIR_BINDIR="`eval echo \"$DIR_BINDIR\"`" cat >>confdefs.h <<_ACEOF #define DIR_BINDIR "${DIR_BINDIR}" _ACEOF DIR_LIBDIR="`eval echo \"$libdir\"`" DIR_LIBDIR="`eval echo \"$DIR_LIBDIR\"`" cat >>confdefs.h <<_ACEOF #define DIR_LIBDIR "${DIR_LIBDIR}" _ACEOF DIR_DATADIR="`eval echo \"$datadir\"`" DIR_DATADIR="`eval echo \"$DIR_DATADIR\"`" cat >>confdefs.h <<_ACEOF #define DIR_DATADIR "${DIR_DATADIR}" _ACEOF DIR_MANDIR="`eval echo \"$mandir\"`" DIR_MANDIR="`eval echo \"$DIR_MANDIR\"`" cat >>confdefs.h <<_ACEOF #define DIR_MANDIR "${DIR_MANDIR}" _ACEOF prefix="${save_prefix}" exec_prefix="${save_exec_prefix}" IFS=. read major minor revis <<__eof__ ${PACKAGE_VERSION} __eof__ test -z "$major" && major=0 test -z "$minor" && minor=0 test -z "$revis" && revis=0 hexversion=`printf '0x%x%02x%02x' $major $minor $revis` cat >>confdefs.h <<_ACEOF #define DJVIEW_VERSION $hexversion _ACEOF cat >>confdefs.h <<_ACEOF #define DJVIEW_VERSION_STR "${PACKAGE_VERSION}" _ACEOF # ---------------------------------------- # Run qmake # ---------------------------------------- # autoconf QARG="CONFIG+=autoconf" AUTO_LIBS="$DDJVUAPI_LIBS $TIFF_LIBS $LIBS" AUTO_FLAGS="-I.. $DDJVUAPI_CFLAGS $TIFF_CFLAGS" # note: AUTO_FLAGS does not contain $OPTS # because qmake determines itself # its optimization flags... # out-of-tree? if test -d src && test -r src/qdjvu.cpp ; then : ; else test -d src || mkdir src test -d npdjvu || mkdir npdjvu for n in $srcdir/src/*.pro $srcdir/src/*.ts ; do m=`basename $n` test -r $n && ( cmp -s $n src/$m || cp $n src/$m ) done for n in $srcdir/npdjvu/*.pro ; do m=`basename $n` test -r $n && ( cmp -s $n npdjvu/$m || cp $n npdjvu/$m ) done fi nsrcdir="$srcdir" case "$srcdir" in .*) nsrcdir="../$srcdir" ;; esac AUTO_FLAGS="-I$nsrcdir/src $AUTO_FLAGS" # debug if test "$ac_debug" = yes ; then QARG="$QARG CONFIG+=debug" else QARG="$QARG CONFIG+=release" fi # qmake arguments QARG="$QARG QMAKE_UIC="'"'"$UIC"'"' QARG="$QARG QMAKE_MOC="'"'"$MOC"'"' QARG="$QARG QMAKE_RCC="'"'"$RCC"'"' QARG="$QARG LIBS+="'"'"$AUTO_LIBS"'"' QARG="$QARG QMAKE_LFLAGS+="'"'"$LDFLAGS"'"' QARG="$QARG QMAKE_CFLAGS+="'"'"$CFLAGS $AUTO_FLAGS"'"' QARG="$QARG QMAKE_CXXFLAGS+="'"'"$CXXFLAGS $AUTO_FLAGS"'"' QARG="$QARG QMAKE_CPPFLAGS+="'"'"$CPPFLAGS $AUTO_FLAGS"'"' # qmake environment variables if test -n "$QMAKESPEC" ; then QARG="-spec "'"'"$QMAKESPEC"'"'" $QARG" fi # run ac_config_commands="$ac_config_commands qmake_src" if test "$ac_npdjvu" != "no" ; then ac_config_commands="$ac_config_commands qmake_npdjvu" fi # ---------------------------------------- # Outputs # ---------------------------------------- ac_config_files="$ac_config_files Makefile" ac_config_files="$ac_config_files nsdejavu/Makefile" ac_config_files="$ac_config_files desktopfiles/Makefile" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes: double-quote # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then test "x$cache_file" != "x/dev/null" && { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} cat confcache >$cache_file else { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' 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$//' ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs : ${CONFIG_STATUS=./config.status} ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # 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. as_fn_error () { 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: $2" >&2 as_fn_exit $as_status } # as_fn_error # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` 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" } # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in #( -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 ## ----------------------------------- ## ## Main body of $CONFIG_STATUS script. ## ## ----------------------------------- ## _ASEOF test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by djview $as_me 4.9, which was generated by GNU Autoconf 2.67. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF case $ac_config_files in *" "*) set x $ac_config_files; shift; ac_config_files=$*;; esac case $ac_config_headers in *" "*) set x $ac_config_headers; shift; ac_config_headers=$*;; esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" config_headers="$ac_config_headers" config_commands="$ac_config_commands" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files and other configuration actions from templates according to the current configuration. Unless the files and actions are specified as TAGs, all are instantiated by default. Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit --config print configuration, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Configuration commands: $config_commands Report bugs to the package provider." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ djview config.status 4.9 configured by $0, generated by GNU Autoconf 2.67, with options \\"\$ac_cs_config\\" 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." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' test -n "\$AWK" || AWK=awk _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # The default lists apply if the user does not specify any file. 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 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $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;; --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append CONFIG_HEADERS " '$ac_optarg'" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header as_fn_error $? "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) as_fn_error $? "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX $as_echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # # INIT-COMMANDS # # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' enable_static='`$ECHO "X$enable_static" | $Xsed -e "$delay_single_quote_subst"`' macro_version='`$ECHO "X$macro_version" | $Xsed -e "$delay_single_quote_subst"`' macro_revision='`$ECHO "X$macro_revision" | $Xsed -e "$delay_single_quote_subst"`' enable_shared='`$ECHO "X$enable_shared" | $Xsed -e "$delay_single_quote_subst"`' pic_mode='`$ECHO "X$pic_mode" | $Xsed -e "$delay_single_quote_subst"`' enable_fast_install='`$ECHO "X$enable_fast_install" | $Xsed -e "$delay_single_quote_subst"`' host_alias='`$ECHO "X$host_alias" | $Xsed -e "$delay_single_quote_subst"`' host='`$ECHO "X$host" | $Xsed -e "$delay_single_quote_subst"`' host_os='`$ECHO "X$host_os" | $Xsed -e "$delay_single_quote_subst"`' build_alias='`$ECHO "X$build_alias" | $Xsed -e "$delay_single_quote_subst"`' build='`$ECHO "X$build" | $Xsed -e "$delay_single_quote_subst"`' build_os='`$ECHO "X$build_os" | $Xsed -e "$delay_single_quote_subst"`' SED='`$ECHO "X$SED" | $Xsed -e "$delay_single_quote_subst"`' Xsed='`$ECHO "X$Xsed" | $Xsed -e "$delay_single_quote_subst"`' GREP='`$ECHO "X$GREP" | $Xsed -e "$delay_single_quote_subst"`' EGREP='`$ECHO "X$EGREP" | $Xsed -e "$delay_single_quote_subst"`' FGREP='`$ECHO "X$FGREP" | $Xsed -e "$delay_single_quote_subst"`' LD='`$ECHO "X$LD" | $Xsed -e "$delay_single_quote_subst"`' NM='`$ECHO "X$NM" | $Xsed -e "$delay_single_quote_subst"`' LN_S='`$ECHO "X$LN_S" | $Xsed -e "$delay_single_quote_subst"`' max_cmd_len='`$ECHO "X$max_cmd_len" | $Xsed -e "$delay_single_quote_subst"`' ac_objext='`$ECHO "X$ac_objext" | $Xsed -e "$delay_single_quote_subst"`' exeext='`$ECHO "X$exeext" | $Xsed -e "$delay_single_quote_subst"`' lt_unset='`$ECHO "X$lt_unset" | $Xsed -e "$delay_single_quote_subst"`' lt_SP2NL='`$ECHO "X$lt_SP2NL" | $Xsed -e "$delay_single_quote_subst"`' lt_NL2SP='`$ECHO "X$lt_NL2SP" | $Xsed -e "$delay_single_quote_subst"`' reload_flag='`$ECHO "X$reload_flag" | $Xsed -e "$delay_single_quote_subst"`' reload_cmds='`$ECHO "X$reload_cmds" | $Xsed -e "$delay_single_quote_subst"`' OBJDUMP='`$ECHO "X$OBJDUMP" | $Xsed -e "$delay_single_quote_subst"`' deplibs_check_method='`$ECHO "X$deplibs_check_method" | $Xsed -e "$delay_single_quote_subst"`' file_magic_cmd='`$ECHO "X$file_magic_cmd" | $Xsed -e "$delay_single_quote_subst"`' AR='`$ECHO "X$AR" | $Xsed -e "$delay_single_quote_subst"`' AR_FLAGS='`$ECHO "X$AR_FLAGS" | $Xsed -e "$delay_single_quote_subst"`' STRIP='`$ECHO "X$STRIP" | $Xsed -e "$delay_single_quote_subst"`' RANLIB='`$ECHO "X$RANLIB" | $Xsed -e "$delay_single_quote_subst"`' old_postinstall_cmds='`$ECHO "X$old_postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' old_postuninstall_cmds='`$ECHO "X$old_postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' old_archive_cmds='`$ECHO "X$old_archive_cmds" | $Xsed -e "$delay_single_quote_subst"`' CC='`$ECHO "X$CC" | $Xsed -e "$delay_single_quote_subst"`' CFLAGS='`$ECHO "X$CFLAGS" | $Xsed -e "$delay_single_quote_subst"`' compiler='`$ECHO "X$compiler" | $Xsed -e "$delay_single_quote_subst"`' GCC='`$ECHO "X$GCC" | $Xsed -e "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_pipe='`$ECHO "X$lt_cv_sys_global_symbol_pipe" | $Xsed -e "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_cdecl='`$ECHO "X$lt_cv_sys_global_symbol_to_cdecl" | $Xsed -e "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address" | $Xsed -e "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`' objdir='`$ECHO "X$objdir" | $Xsed -e "$delay_single_quote_subst"`' SHELL='`$ECHO "X$SHELL" | $Xsed -e "$delay_single_quote_subst"`' ECHO='`$ECHO "X$ECHO" | $Xsed -e "$delay_single_quote_subst"`' MAGIC_CMD='`$ECHO "X$MAGIC_CMD" | $Xsed -e "$delay_single_quote_subst"`' lt_prog_compiler_no_builtin_flag='`$ECHO "X$lt_prog_compiler_no_builtin_flag" | $Xsed -e "$delay_single_quote_subst"`' lt_prog_compiler_wl='`$ECHO "X$lt_prog_compiler_wl" | $Xsed -e "$delay_single_quote_subst"`' lt_prog_compiler_pic='`$ECHO "X$lt_prog_compiler_pic" | $Xsed -e "$delay_single_quote_subst"`' lt_prog_compiler_static='`$ECHO "X$lt_prog_compiler_static" | $Xsed -e "$delay_single_quote_subst"`' lt_cv_prog_compiler_c_o='`$ECHO "X$lt_cv_prog_compiler_c_o" | $Xsed -e "$delay_single_quote_subst"`' need_locks='`$ECHO "X$need_locks" | $Xsed -e "$delay_single_quote_subst"`' DSYMUTIL='`$ECHO "X$DSYMUTIL" | $Xsed -e "$delay_single_quote_subst"`' NMEDIT='`$ECHO "X$NMEDIT" | $Xsed -e "$delay_single_quote_subst"`' LIPO='`$ECHO "X$LIPO" | $Xsed -e "$delay_single_quote_subst"`' OTOOL='`$ECHO "X$OTOOL" | $Xsed -e "$delay_single_quote_subst"`' OTOOL64='`$ECHO "X$OTOOL64" | $Xsed -e "$delay_single_quote_subst"`' libext='`$ECHO "X$libext" | $Xsed -e "$delay_single_quote_subst"`' shrext_cmds='`$ECHO "X$shrext_cmds" | $Xsed -e "$delay_single_quote_subst"`' extract_expsyms_cmds='`$ECHO "X$extract_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`' archive_cmds_need_lc='`$ECHO "X$archive_cmds_need_lc" | $Xsed -e "$delay_single_quote_subst"`' enable_shared_with_static_runtimes='`$ECHO "X$enable_shared_with_static_runtimes" | $Xsed -e "$delay_single_quote_subst"`' export_dynamic_flag_spec='`$ECHO "X$export_dynamic_flag_spec" | $Xsed -e "$delay_single_quote_subst"`' whole_archive_flag_spec='`$ECHO "X$whole_archive_flag_spec" | $Xsed -e "$delay_single_quote_subst"`' compiler_needs_object='`$ECHO "X$compiler_needs_object" | $Xsed -e "$delay_single_quote_subst"`' old_archive_from_new_cmds='`$ECHO "X$old_archive_from_new_cmds" | $Xsed -e "$delay_single_quote_subst"`' old_archive_from_expsyms_cmds='`$ECHO "X$old_archive_from_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`' archive_cmds='`$ECHO "X$archive_cmds" | $Xsed -e "$delay_single_quote_subst"`' archive_expsym_cmds='`$ECHO "X$archive_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`' module_cmds='`$ECHO "X$module_cmds" | $Xsed -e "$delay_single_quote_subst"`' module_expsym_cmds='`$ECHO "X$module_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`' with_gnu_ld='`$ECHO "X$with_gnu_ld" | $Xsed -e "$delay_single_quote_subst"`' allow_undefined_flag='`$ECHO "X$allow_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`' no_undefined_flag='`$ECHO "X$no_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`' hardcode_libdir_flag_spec='`$ECHO "X$hardcode_libdir_flag_spec" | $Xsed -e "$delay_single_quote_subst"`' hardcode_libdir_flag_spec_ld='`$ECHO "X$hardcode_libdir_flag_spec_ld" | $Xsed -e "$delay_single_quote_subst"`' hardcode_libdir_separator='`$ECHO "X$hardcode_libdir_separator" | $Xsed -e "$delay_single_quote_subst"`' hardcode_direct='`$ECHO "X$hardcode_direct" | $Xsed -e "$delay_single_quote_subst"`' hardcode_direct_absolute='`$ECHO "X$hardcode_direct_absolute" | $Xsed -e "$delay_single_quote_subst"`' hardcode_minus_L='`$ECHO "X$hardcode_minus_L" | $Xsed -e "$delay_single_quote_subst"`' hardcode_shlibpath_var='`$ECHO "X$hardcode_shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`' hardcode_automatic='`$ECHO "X$hardcode_automatic" | $Xsed -e "$delay_single_quote_subst"`' inherit_rpath='`$ECHO "X$inherit_rpath" | $Xsed -e "$delay_single_quote_subst"`' link_all_deplibs='`$ECHO "X$link_all_deplibs" | $Xsed -e "$delay_single_quote_subst"`' fix_srcfile_path='`$ECHO "X$fix_srcfile_path" | $Xsed -e "$delay_single_quote_subst"`' always_export_symbols='`$ECHO "X$always_export_symbols" | $Xsed -e "$delay_single_quote_subst"`' export_symbols_cmds='`$ECHO "X$export_symbols_cmds" | $Xsed -e "$delay_single_quote_subst"`' exclude_expsyms='`$ECHO "X$exclude_expsyms" | $Xsed -e "$delay_single_quote_subst"`' include_expsyms='`$ECHO "X$include_expsyms" | $Xsed -e "$delay_single_quote_subst"`' prelink_cmds='`$ECHO "X$prelink_cmds" | $Xsed -e "$delay_single_quote_subst"`' file_list_spec='`$ECHO "X$file_list_spec" | $Xsed -e "$delay_single_quote_subst"`' variables_saved_for_relink='`$ECHO "X$variables_saved_for_relink" | $Xsed -e "$delay_single_quote_subst"`' need_lib_prefix='`$ECHO "X$need_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`' need_version='`$ECHO "X$need_version" | $Xsed -e "$delay_single_quote_subst"`' version_type='`$ECHO "X$version_type" | $Xsed -e "$delay_single_quote_subst"`' runpath_var='`$ECHO "X$runpath_var" | $Xsed -e "$delay_single_quote_subst"`' shlibpath_var='`$ECHO "X$shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`' shlibpath_overrides_runpath='`$ECHO "X$shlibpath_overrides_runpath" | $Xsed -e "$delay_single_quote_subst"`' libname_spec='`$ECHO "X$libname_spec" | $Xsed -e "$delay_single_quote_subst"`' library_names_spec='`$ECHO "X$library_names_spec" | $Xsed -e "$delay_single_quote_subst"`' soname_spec='`$ECHO "X$soname_spec" | $Xsed -e "$delay_single_quote_subst"`' postinstall_cmds='`$ECHO "X$postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' postuninstall_cmds='`$ECHO "X$postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' finish_cmds='`$ECHO "X$finish_cmds" | $Xsed -e "$delay_single_quote_subst"`' finish_eval='`$ECHO "X$finish_eval" | $Xsed -e "$delay_single_quote_subst"`' hardcode_into_libs='`$ECHO "X$hardcode_into_libs" | $Xsed -e "$delay_single_quote_subst"`' sys_lib_search_path_spec='`$ECHO "X$sys_lib_search_path_spec" | $Xsed -e "$delay_single_quote_subst"`' sys_lib_dlsearch_path_spec='`$ECHO "X$sys_lib_dlsearch_path_spec" | $Xsed -e "$delay_single_quote_subst"`' hardcode_action='`$ECHO "X$hardcode_action" | $Xsed -e "$delay_single_quote_subst"`' enable_dlopen='`$ECHO "X$enable_dlopen" | $Xsed -e "$delay_single_quote_subst"`' enable_dlopen_self='`$ECHO "X$enable_dlopen_self" | $Xsed -e "$delay_single_quote_subst"`' enable_dlopen_self_static='`$ECHO "X$enable_dlopen_self_static" | $Xsed -e "$delay_single_quote_subst"`' old_striplib='`$ECHO "X$old_striplib" | $Xsed -e "$delay_single_quote_subst"`' striplib='`$ECHO "X$striplib" | $Xsed -e "$delay_single_quote_subst"`' compiler_lib_search_dirs='`$ECHO "X$compiler_lib_search_dirs" | $Xsed -e "$delay_single_quote_subst"`' predep_objects='`$ECHO "X$predep_objects" | $Xsed -e "$delay_single_quote_subst"`' postdep_objects='`$ECHO "X$postdep_objects" | $Xsed -e "$delay_single_quote_subst"`' predeps='`$ECHO "X$predeps" | $Xsed -e "$delay_single_quote_subst"`' postdeps='`$ECHO "X$postdeps" | $Xsed -e "$delay_single_quote_subst"`' compiler_lib_search_path='`$ECHO "X$compiler_lib_search_path" | $Xsed -e "$delay_single_quote_subst"`' LD_CXX='`$ECHO "X$LD_CXX" | $Xsed -e "$delay_single_quote_subst"`' old_archive_cmds_CXX='`$ECHO "X$old_archive_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' compiler_CXX='`$ECHO "X$compiler_CXX" | $Xsed -e "$delay_single_quote_subst"`' GCC_CXX='`$ECHO "X$GCC_CXX" | $Xsed -e "$delay_single_quote_subst"`' lt_prog_compiler_no_builtin_flag_CXX='`$ECHO "X$lt_prog_compiler_no_builtin_flag_CXX" | $Xsed -e "$delay_single_quote_subst"`' lt_prog_compiler_wl_CXX='`$ECHO "X$lt_prog_compiler_wl_CXX" | $Xsed -e "$delay_single_quote_subst"`' lt_prog_compiler_pic_CXX='`$ECHO "X$lt_prog_compiler_pic_CXX" | $Xsed -e "$delay_single_quote_subst"`' lt_prog_compiler_static_CXX='`$ECHO "X$lt_prog_compiler_static_CXX" | $Xsed -e "$delay_single_quote_subst"`' lt_cv_prog_compiler_c_o_CXX='`$ECHO "X$lt_cv_prog_compiler_c_o_CXX" | $Xsed -e "$delay_single_quote_subst"`' archive_cmds_need_lc_CXX='`$ECHO "X$archive_cmds_need_lc_CXX" | $Xsed -e "$delay_single_quote_subst"`' enable_shared_with_static_runtimes_CXX='`$ECHO "X$enable_shared_with_static_runtimes_CXX" | $Xsed -e "$delay_single_quote_subst"`' export_dynamic_flag_spec_CXX='`$ECHO "X$export_dynamic_flag_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`' whole_archive_flag_spec_CXX='`$ECHO "X$whole_archive_flag_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`' compiler_needs_object_CXX='`$ECHO "X$compiler_needs_object_CXX" | $Xsed -e "$delay_single_quote_subst"`' old_archive_from_new_cmds_CXX='`$ECHO "X$old_archive_from_new_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' old_archive_from_expsyms_cmds_CXX='`$ECHO "X$old_archive_from_expsyms_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' archive_cmds_CXX='`$ECHO "X$archive_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' archive_expsym_cmds_CXX='`$ECHO "X$archive_expsym_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' module_cmds_CXX='`$ECHO "X$module_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' module_expsym_cmds_CXX='`$ECHO "X$module_expsym_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' with_gnu_ld_CXX='`$ECHO "X$with_gnu_ld_CXX" | $Xsed -e "$delay_single_quote_subst"`' allow_undefined_flag_CXX='`$ECHO "X$allow_undefined_flag_CXX" | $Xsed -e "$delay_single_quote_subst"`' no_undefined_flag_CXX='`$ECHO "X$no_undefined_flag_CXX" | $Xsed -e "$delay_single_quote_subst"`' hardcode_libdir_flag_spec_CXX='`$ECHO "X$hardcode_libdir_flag_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`' hardcode_libdir_flag_spec_ld_CXX='`$ECHO "X$hardcode_libdir_flag_spec_ld_CXX" | $Xsed -e "$delay_single_quote_subst"`' hardcode_libdir_separator_CXX='`$ECHO "X$hardcode_libdir_separator_CXX" | $Xsed -e "$delay_single_quote_subst"`' hardcode_direct_CXX='`$ECHO "X$hardcode_direct_CXX" | $Xsed -e "$delay_single_quote_subst"`' hardcode_direct_absolute_CXX='`$ECHO "X$hardcode_direct_absolute_CXX" | $Xsed -e "$delay_single_quote_subst"`' hardcode_minus_L_CXX='`$ECHO "X$hardcode_minus_L_CXX" | $Xsed -e "$delay_single_quote_subst"`' hardcode_shlibpath_var_CXX='`$ECHO "X$hardcode_shlibpath_var_CXX" | $Xsed -e "$delay_single_quote_subst"`' hardcode_automatic_CXX='`$ECHO "X$hardcode_automatic_CXX" | $Xsed -e "$delay_single_quote_subst"`' inherit_rpath_CXX='`$ECHO "X$inherit_rpath_CXX" | $Xsed -e "$delay_single_quote_subst"`' link_all_deplibs_CXX='`$ECHO "X$link_all_deplibs_CXX" | $Xsed -e "$delay_single_quote_subst"`' fix_srcfile_path_CXX='`$ECHO "X$fix_srcfile_path_CXX" | $Xsed -e "$delay_single_quote_subst"`' always_export_symbols_CXX='`$ECHO "X$always_export_symbols_CXX" | $Xsed -e "$delay_single_quote_subst"`' export_symbols_cmds_CXX='`$ECHO "X$export_symbols_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' exclude_expsyms_CXX='`$ECHO "X$exclude_expsyms_CXX" | $Xsed -e "$delay_single_quote_subst"`' include_expsyms_CXX='`$ECHO "X$include_expsyms_CXX" | $Xsed -e "$delay_single_quote_subst"`' prelink_cmds_CXX='`$ECHO "X$prelink_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' file_list_spec_CXX='`$ECHO "X$file_list_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`' hardcode_action_CXX='`$ECHO "X$hardcode_action_CXX" | $Xsed -e "$delay_single_quote_subst"`' compiler_lib_search_dirs_CXX='`$ECHO "X$compiler_lib_search_dirs_CXX" | $Xsed -e "$delay_single_quote_subst"`' predep_objects_CXX='`$ECHO "X$predep_objects_CXX" | $Xsed -e "$delay_single_quote_subst"`' postdep_objects_CXX='`$ECHO "X$postdep_objects_CXX" | $Xsed -e "$delay_single_quote_subst"`' predeps_CXX='`$ECHO "X$predeps_CXX" | $Xsed -e "$delay_single_quote_subst"`' postdeps_CXX='`$ECHO "X$postdeps_CXX" | $Xsed -e "$delay_single_quote_subst"`' compiler_lib_search_path_CXX='`$ECHO "X$compiler_lib_search_path_CXX" | $Xsed -e "$delay_single_quote_subst"`' LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' # Quote evaled strings. for var in SED \ GREP \ EGREP \ FGREP \ LD \ NM \ LN_S \ lt_SP2NL \ lt_NL2SP \ reload_flag \ OBJDUMP \ deplibs_check_method \ file_magic_cmd \ AR \ AR_FLAGS \ STRIP \ RANLIB \ CC \ CFLAGS \ compiler \ lt_cv_sys_global_symbol_pipe \ lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ SHELL \ ECHO \ lt_prog_compiler_no_builtin_flag \ lt_prog_compiler_wl \ lt_prog_compiler_pic \ lt_prog_compiler_static \ lt_cv_prog_compiler_c_o \ need_locks \ DSYMUTIL \ NMEDIT \ LIPO \ OTOOL \ OTOOL64 \ shrext_cmds \ export_dynamic_flag_spec \ whole_archive_flag_spec \ compiler_needs_object \ with_gnu_ld \ allow_undefined_flag \ no_undefined_flag \ hardcode_libdir_flag_spec \ hardcode_libdir_flag_spec_ld \ hardcode_libdir_separator \ fix_srcfile_path \ exclude_expsyms \ include_expsyms \ file_list_spec \ variables_saved_for_relink \ libname_spec \ library_names_spec \ soname_spec \ finish_eval \ old_striplib \ striplib \ compiler_lib_search_dirs \ predep_objects \ postdep_objects \ predeps \ postdeps \ compiler_lib_search_path \ LD_CXX \ compiler_CXX \ lt_prog_compiler_no_builtin_flag_CXX \ lt_prog_compiler_wl_CXX \ lt_prog_compiler_pic_CXX \ lt_prog_compiler_static_CXX \ lt_cv_prog_compiler_c_o_CXX \ export_dynamic_flag_spec_CXX \ whole_archive_flag_spec_CXX \ compiler_needs_object_CXX \ with_gnu_ld_CXX \ allow_undefined_flag_CXX \ no_undefined_flag_CXX \ hardcode_libdir_flag_spec_CXX \ hardcode_libdir_flag_spec_ld_CXX \ hardcode_libdir_separator_CXX \ fix_srcfile_path_CXX \ exclude_expsyms_CXX \ include_expsyms_CXX \ file_list_spec_CXX \ compiler_lib_search_dirs_CXX \ predep_objects_CXX \ postdep_objects_CXX \ predeps_CXX \ postdeps_CXX \ compiler_lib_search_path_CXX; do case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Double-quote double-evaled strings. for var in reload_cmds \ old_postinstall_cmds \ old_postuninstall_cmds \ old_archive_cmds \ extract_expsyms_cmds \ old_archive_from_new_cmds \ old_archive_from_expsyms_cmds \ archive_cmds \ archive_expsym_cmds \ module_cmds \ module_expsym_cmds \ export_symbols_cmds \ prelink_cmds \ postinstall_cmds \ postuninstall_cmds \ finish_cmds \ sys_lib_search_path_spec \ sys_lib_dlsearch_path_spec \ old_archive_cmds_CXX \ old_archive_from_new_cmds_CXX \ old_archive_from_expsyms_cmds_CXX \ archive_cmds_CXX \ archive_expsym_cmds_CXX \ module_cmds_CXX \ module_expsym_cmds_CXX \ export_symbols_cmds_CXX \ prelink_cmds_CXX; do case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Fix-up fallback echo if it was mangled by the above quoting rules. case \$lt_ECHO in *'\\\$0 --fallback-echo"') lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\$0 --fallback-echo"\$/\$0 --fallback-echo"/'\` ;; esac ac_aux_dir='$ac_aux_dir' xsi_shell='$xsi_shell' lt_shell_append='$lt_shell_append' # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes INIT. if test -n "\${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi PACKAGE='$PACKAGE' VERSION='$VERSION' TIMESTAMP='$TIMESTAMP' RM='$RM' ofile='$ofile' read QMAKE_COMMAND1 <>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config/config.h.in" ;; "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; "qmake_src") CONFIG_COMMANDS="$CONFIG_COMMANDS qmake_src" ;; "qmake_npdjvu") CONFIG_COMMANDS="$CONFIG_COMMANDS qmake_npdjvu" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "nsdejavu/Makefile") CONFIG_FILES="$CONFIG_FILES nsdejavu/Makefile" ;; "desktopfiles/Makefile") CONFIG_FILES="$CONFIG_FILES desktopfiles/Makefile" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= trap 'exit_status=$? { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || 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. # This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then ac_cr=`echo X | tr X '\015'` # On cygwin, bash can eat \r inside `` if the user requested igncr. # But we know of no other shell where ac_cr would be empty at this # point, so we can use a bashism as a fallback. if test "x$ac_cr" = x; then eval ac_cr=\$\'\\r\' 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' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$tmp/subs1.awk" && _ACEOF { echo "cat >conf$$subs.awk <<_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 '^'` 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 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 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>"\$tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h s/^/S["/; s/!.*/"]=/ p g s/^[^!]*!// :repl t repl s/'"$ac_delim"'$// t delim :nl h s/\(.\{148\}\)..*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p n b repl :more1 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t nl :delim h s/\(.\{148\}\)..*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p b :more2 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t delim ' >$CONFIG_STATUS || ac_write_fail=1 rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK cat >>"\$tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" } { line = $ 0 nfields = split(line, field, "@") substed = 0 len = length(field[1]) for (i = 2; i < nfields; i++) { key = field[i] keylen = length(key) if (S_is_set[key]) { value = S[key] line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) len += length(value) + length(field[++i]) substed = 1 } else len += 1 + keylen } print line } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF # 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[ ]*=[ ]*/{ h s/// s/^/:/ s/[ ]*$/:/ s/:\$(srcdir):/:/g s/:\${srcdir}:/:/g s/:@srcdir@:/:/g s/^:*// s/:*$// x s/\(=[ ]*\).*/\1/ G s/\n// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" # Set up the scripts for CONFIG_HEADERS section. # No need to generate them if there are no CONFIG_HEADERS. # This happens for instance with `./config.status Makefile'. if test -n "$CONFIG_HEADERS"; then cat >"$tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF # Transform confdefs.h into an awk script `defines.awk', embedded as # here-document in config.status, that substitutes the proper values into # config.h.in to produce config.h. # Create a delimiter string that does not exist in confdefs.h, to ease # handling of long lines. ac_delim='%!_!# ' for ac_last_try in false false :; do ac_t=`sed -n "/$ac_delim/p" confdefs.h` if test -z "$ac_t"; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done # For the awk script, D is an array of macro values keyed by name, # likewise P contains macro parameters if any. Preserve backslash # newline sequences. ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* sed -n ' s/.\{148\}/&'"$ac_delim"'/g t rset :rset s/^[ ]*#[ ]*define[ ][ ]*/ / t def d :def s/\\$// t bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3"/p s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p d :bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3\\\\\\n"\\/p t cont s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p t cont d :cont n s/.\{148\}/&'"$ac_delim"'/g t clear :clear s/\\$// t bsnlc s/["\\]/\\&/g; s/^/"/; s/$/"/p d :bsnlc s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p b cont ' >$CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 for (key in D) D_is_set[key] = 1 FS = "" } /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { line = \$ 0 split(line, arg, " ") if (arg[1] == "#") { defundef = arg[2] mac1 = arg[3] } else { defundef = substr(arg[1], 2) mac1 = arg[2] } split(mac1, mac2, "(") #) macro = mac2[1] prefix = substr(line, 1, index(line, defundef) - 1) if (D_is_set[macro]) { # Preserve the white space surrounding the "#". print prefix "define", macro P[macro] D[macro] next } else { # Replace #undef with comments. This is necessary, for example, # in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. if (defundef == "undef") { print "/*", prefix defundef, macro, "*/" next } } } { print } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 fi # test -n "$CONFIG_HEADERS" eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" shift for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || 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'" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`$as_echo "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac case $ac_tag in *:-:* | *:-) cat >"$tmp/stdin" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= ac_sed_dataroot=' /datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_sed_extra="$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t 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 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 $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;} 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 ;; :H) # # CONFIG_HEADER # if test x"$ac_file" != x-; then { $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 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 fi else $as_echo "/* $configure_input */" \ && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ || as_fn_error $? "could not create -" "$LINENO" 5 fi ;; :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 $as_echo "$as_me: executing $ac_file commands" >&6;} ;; esac case $ac_file$ac_mode in "libtool":C) # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi cfgfile="${ofile}T" trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # 2006, 2007, 2008 Free Software Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is part of GNU Libtool. # # GNU Libtool is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of # the License, or (at your option) any later version. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with GNU Libtool; see the file COPYING. If not, a copy # can be downloaded from http://www.gnu.org/licenses/gpl.html, or # obtained by writing to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # The names of the tagged configurations supported by this script. available_tags="CXX " # ### BEGIN LIBTOOL CONFIG # Whether or not to build static libraries. build_old_libs=$enable_static # Which release of libtool.m4 was used? macro_version=$macro_version macro_revision=$macro_revision # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # What type of objects to build. pic_mode=$pic_mode # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # A sed program that does not truncate output. SED=$lt_SED # Sed that helps us avoid accidentally triggering echo(1) options like -n. Xsed="\$SED -e 1s/^X//" # A grep program that handles long lines. GREP=$lt_GREP # An ERE matcher. EGREP=$lt_EGREP # A literal string matcher. FGREP=$lt_FGREP # A BSD- or MS-compatible name lister. NM=$lt_NM # Whether we need soft or hard links. LN_S=$lt_LN_S # What is the maximum length of a command? max_cmd_len=$max_cmd_len # Object file suffix (normally "o"). objext=$ac_objext # Executable file suffix (normally ""). exeext=$exeext # whether the shell understands "unset". lt_unset=$lt_unset # turn spaces into newlines. SP2NL=$lt_lt_SP2NL # turn newlines into spaces. NL2SP=$lt_lt_NL2SP # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # An object symbol dumper. OBJDUMP=$lt_OBJDUMP # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == "file_magic". file_magic_cmd=$lt_file_magic_cmd # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A symbol stripping program. STRIP=$lt_STRIP # Commands used to install an old-style archive. RANLIB=$lt_RANLIB old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # A C compiler. LTCC=$lt_CC # LTCC compiler flags. LTCFLAGS=$lt_CFLAGS # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration. global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair. global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # Transform the output of nm in a C name address pair when lib prefix is needed. global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix # The name of the directory that contains temporary libtool files. objdir=$objdir # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # An echo program that does not interpret backslashes. ECHO=$lt_ECHO # Used to examine libraries when file_magic_cmd begins with "file". MAGIC_CMD=$MAGIC_CMD # Must we lock files when doing compilation? need_locks=$lt_need_locks # Tool to manipulate archived DWARF debug symbol files on Mac OS X. DSYMUTIL=$lt_DSYMUTIL # Tool to change global to local symbols on Mac OS X. NMEDIT=$lt_NMEDIT # Tool to manipulate fat objects and archives on Mac OS X. LIPO=$lt_LIPO # ldd/readelf like tool for Mach-O binaries on Mac OS X. OTOOL=$lt_OTOOL # ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4. OTOOL64=$lt_OTOOL64 # Old archive suffix (normally "a"). libext=$libext # Shared library suffix (normally ".so"). shrext_cmds=$lt_shrext_cmds # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Variables whose values should be saved in libtool wrapper scripts and # restored at link time. variables_saved_for_relink=$lt_variables_saved_for_relink # Do we need the "lib" prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Library versioning type. version_type=$version_type # Shared library runtime path variable. runpath_var=$runpath_var # Shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Command to use after installation of a shared archive. postinstall_cmds=$lt_postinstall_cmds # Command to use after uninstallation of a shared archive. postuninstall_cmds=$lt_postuninstall_cmds # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # As "finish_cmds", except a single script fragment to be evaled but # not shown. finish_eval=$lt_finish_eval # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Compile-time system search path for libraries. sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries. sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # The linker used to build libraries. LD=$lt_LD # Commands used to build an old-style archive. old_archive_cmds=$lt_old_archive_cmds # A language specific compiler. CC=$lt_compiler # Is the compiler the GNU compiler? with_gcc=$GCC # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc # Whether or not to disallow shared libs when runtime libs are static. allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec # Whether the compiler copes with passing no objects directly. compiler_needs_object=$lt_compiler_needs_object # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds # Commands used to build a shared archive. archive_cmds=$lt_archive_cmds archive_expsym_cmds=$lt_archive_expsym_cmds # Commands used to build a loadable module if different from building # a shared archive. module_cmds=$lt_module_cmds module_expsym_cmds=$lt_module_expsym_cmds # Whether we are building with GNU ld or not. with_gnu_ld=$lt_with_gnu_ld # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag # Flag that enforces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec # If ld is used when linking, flag to hardcode \$libdir into a binary # during linking. This must work even if \$libdir does not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld # Whether we need a single "-rpath" flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes # DIR into the resulting binary. hardcode_direct=$hardcode_direct # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes # DIR into the resulting binary and the resulting library dependency is # "absolute",i.e impossible to change by setting \${shlibpath_var} if the # library is relocated. hardcode_direct_absolute=$hardcode_direct_absolute # Set to "yes" if using the -LDIR flag during linking hardcodes DIR # into the resulting binary. hardcode_minus_L=$hardcode_minus_L # Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR # into the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var # Set to "yes" if building a shared library automatically hardcodes DIR # into the library and all subsequent libraries and executables linked # against it. hardcode_automatic=$hardcode_automatic # Set to yes if linker adds runtime paths of dependent libraries # to runtime path list. inherit_rpath=$inherit_rpath # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path=$lt_fix_srcfile_path # Set to "yes" if exported symbols are required. always_export_symbols=$always_export_symbols # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms # Symbols that must always be exported. include_expsyms=$lt_include_expsyms # Commands necessary for linking programs (against libraries) with templates. prelink_cmds=$lt_prelink_cmds # Specify filename containing input files. file_list_spec=$lt_file_list_spec # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action # The directories searched by this compiler when creating a shared library. compiler_lib_search_dirs=$lt_compiler_lib_search_dirs # Dependencies to place before and after the objects being linked to # create a shared library. predep_objects=$lt_predep_objects postdep_objects=$lt_postdep_objects predeps=$lt_predeps postdeps=$lt_postdeps # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path # ### END LIBTOOL CONFIG _LT_EOF case $host_os in aix3*) cat <<\_LT_EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi _LT_EOF ;; esac ltmain="$ac_aux_dir/ltmain.sh" # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) case $xsi_shell in yes) cat << \_LT_EOF >> "$cfgfile" # func_dirname file append nondir_replacement # Compute the dirname of FILE. If nonempty, add APPEND to the result, # otherwise set result to NONDIR_REPLACEMENT. func_dirname () { case ${1} in */*) func_dirname_result="${1%/*}${2}" ;; * ) func_dirname_result="${3}" ;; esac } # func_basename file func_basename () { func_basename_result="${1##*/}" } # func_dirname_and_basename file append nondir_replacement # perform func_basename and func_dirname in a single function # call: # dirname: Compute the dirname of FILE. If nonempty, # add APPEND to the result, otherwise set result # to NONDIR_REPLACEMENT. # value returned in "$func_dirname_result" # basename: Compute filename of FILE. # value retuned in "$func_basename_result" # Implementation must be kept synchronized with func_dirname # and func_basename. For efficiency, we do not delegate to # those functions but instead duplicate the functionality here. func_dirname_and_basename () { case ${1} in */*) func_dirname_result="${1%/*}${2}" ;; * ) func_dirname_result="${3}" ;; esac func_basename_result="${1##*/}" } # func_stripname prefix suffix name # strip PREFIX and SUFFIX off of NAME. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). func_stripname () { # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are # positional parameters, so assign one to ordinary parameter first. func_stripname_result=${3} func_stripname_result=${func_stripname_result#"${1}"} func_stripname_result=${func_stripname_result%"${2}"} } # func_opt_split func_opt_split () { func_opt_split_opt=${1%%=*} func_opt_split_arg=${1#*=} } # func_lo2o object func_lo2o () { case ${1} in *.lo) func_lo2o_result=${1%.lo}.${objext} ;; *) func_lo2o_result=${1} ;; esac } # func_xform libobj-or-source func_xform () { func_xform_result=${1%.*}.lo } # func_arith arithmetic-term... func_arith () { func_arith_result=$(( $* )) } # func_len string # STRING may not start with a hyphen. func_len () { func_len_result=${#1} } _LT_EOF ;; *) # Bourne compatible functions. cat << \_LT_EOF >> "$cfgfile" # func_dirname file append nondir_replacement # Compute the dirname of FILE. If nonempty, add APPEND to the result, # otherwise set result to NONDIR_REPLACEMENT. func_dirname () { # Extract subdirectory from the argument. func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` if test "X$func_dirname_result" = "X${1}"; then func_dirname_result="${3}" else func_dirname_result="$func_dirname_result${2}" fi } # func_basename file func_basename () { func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` } # func_stripname prefix suffix name # strip PREFIX and SUFFIX off of NAME. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). # func_strip_suffix prefix name func_stripname () { case ${2} in .*) func_stripname_result=`$ECHO "X${3}" \ | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;; *) func_stripname_result=`$ECHO "X${3}" \ | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;; esac } # sed scripts: my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q' my_sed_long_arg='1s/^-[^=]*=//' # func_opt_split func_opt_split () { func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"` func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"` } # func_lo2o object func_lo2o () { func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"` } # func_xform libobj-or-source func_xform () { func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[^.]*$/.lo/'` } # func_arith arithmetic-term... func_arith () { func_arith_result=`expr "$@"` } # func_len string # STRING may not start with a hyphen. func_len () { func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` } _LT_EOF esac case $lt_shell_append in yes) cat << \_LT_EOF >> "$cfgfile" # func_append var value # Append VALUE to the end of shell variable VAR. func_append () { eval "$1+=\$2" } _LT_EOF ;; *) cat << \_LT_EOF >> "$cfgfile" # func_append var value # Append VALUE to the end of shell variable VAR. func_append () { eval "$1=\$$1\$2" } _LT_EOF ;; esac sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" cat <<_LT_EOF >> "$ofile" # ### BEGIN LIBTOOL TAG CONFIG: CXX # The linker used to build libraries. LD=$lt_LD_CXX # Commands used to build an old-style archive. old_archive_cmds=$lt_old_archive_cmds_CXX # A language specific compiler. CC=$lt_compiler_CXX # Is the compiler the GNU compiler? with_gcc=$GCC_CXX # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl_CXX # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_CXX # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_CXX # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc_CXX # Whether or not to disallow shared libs when runtime libs are static. allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX # Whether the compiler copes with passing no objects directly. compiler_needs_object=$lt_compiler_needs_object_CXX # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX # Commands used to build a shared archive. archive_cmds=$lt_archive_cmds_CXX archive_expsym_cmds=$lt_archive_expsym_cmds_CXX # Commands used to build a loadable module if different from building # a shared archive. module_cmds=$lt_module_cmds_CXX module_expsym_cmds=$lt_module_expsym_cmds_CXX # Whether we are building with GNU ld or not. with_gnu_ld=$lt_with_gnu_ld_CXX # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag_CXX # Flag that enforces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag_CXX # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX # If ld is used when linking, flag to hardcode \$libdir into a binary # during linking. This must work even if \$libdir does not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_CXX # Whether we need a single "-rpath" flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes # DIR into the resulting binary. hardcode_direct=$hardcode_direct_CXX # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes # DIR into the resulting binary and the resulting library dependency is # "absolute",i.e impossible to change by setting \${shlibpath_var} if the # library is relocated. hardcode_direct_absolute=$hardcode_direct_absolute_CXX # Set to "yes" if using the -LDIR flag during linking hardcodes DIR # into the resulting binary. hardcode_minus_L=$hardcode_minus_L_CXX # Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR # into the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX # Set to "yes" if building a shared library automatically hardcodes DIR # into the library and all subsequent libraries and executables linked # against it. hardcode_automatic=$hardcode_automatic_CXX # Set to yes if linker adds runtime paths of dependent libraries # to runtime path list. inherit_rpath=$inherit_rpath_CXX # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_CXX # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path=$lt_fix_srcfile_path_CXX # Set to "yes" if exported symbols are required. always_export_symbols=$always_export_symbols_CXX # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds_CXX # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms_CXX # Symbols that must always be exported. include_expsyms=$lt_include_expsyms_CXX # Commands necessary for linking programs (against libraries) with templates. prelink_cmds=$lt_prelink_cmds_CXX # Specify filename containing input files. file_list_spec=$lt_file_list_spec_CXX # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action_CXX # The directories searched by this compiler when creating a shared library. compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_CXX # Dependencies to place before and after the objects being linked to # create a shared library. predep_objects=$lt_predep_objects_CXX postdep_objects=$lt_postdep_objects_CXX predeps=$lt_predeps_CXX postdeps=$lt_postdeps_CXX # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path_CXX # ### END LIBTOOL TAG CONFIG: CXX _LT_EOF ;; "qmake_src":C) echo "config.status: running $QMAKE_COMMAND1." ( cd src ; eval "$QMAKE_COMMAND1" ) ;; "qmake_npdjvu":C) echo "config.status (npdjvu) running $QMAKE_COMMAND2." ( cd npdjvu ; eval "$QMAKE_COMMAND2" ) ;; esac done # for ac_tag as_fn_exit 0 _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false 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 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 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi # ---------------------------------------- # Fin # ---------------------------------------- echo "" echo "Configuration is done." echo "Compile with command:" echo " $ make" echo "Then install the binaries in $prefix with command:" echo " # make install" djview4/configure.ac000066400000000000000000000250531174072760700147400ustar00rootroot00000000000000# -*-Shell-script-*- # # DjVuLibre DjView # Copyright (c) 2006- Leon Bottou # # This software is subject to, and may be distributed under, # the GNU General Public License, either version 2 of the license # or (at your option) any later version. # The license should have accompanied the software or # you may obtain a copy of the license from the # Free Software Foundation at http://www.fsf.org . # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # ---------------------------------------- # Initialization # ---------------------------------------- AC_PREREQ([2.67]) AC_INIT([djview],[4.9]) AC_CONFIG_AUX_DIR(config) AC_CONFIG_MACRO_DIR([config]) AC_CONFIG_SRCDIR(README) AC_CONFIG_HEADER(config.h:config/config.h.in) AC_PREFIX_DEFAULT(/usr/local) AC_CANONICAL_HOST # Additional libraries AC_ARG_WITH(extra-includes, AS_HELP_STRING([--with-extra-includes=DIR],[Define an additional directory for include files]), [ if test -d "$withval" ; then CFLAGS="$CFLAGS -I$withval" CXXFLAGS="$CXXFLAGS -I$withval" else AC_MSG_ERROR([Cannot stat directory $withval]) fi ] ) AC_ARG_WITH(extra-libraries, AS_HELP_STRING([--with-extra-libraries=DIR],[Define an additional directory for library files]), [ if test -d "$withval" ; then LDFLAGS="$LDFLAGS -L$withval" else AC_MSG_ERROR([Cannot stat directory $withval]) fi ] ) # Always look into a "gnu" directory. curwd=`pwd` if test -d $curwd/gnu/include ; then CFLAGS="$CFLAGS -I$curwd/gnu/include" CXXFLAGS="$CXXFLAGS -I$curwd/gnu/include" fi if test -d $curwd/gnu/lib ; then LDFLAGS="$LDFLAGS -L$curwd/gnu/lib" fi # Special cases case "$host" in *-darwin* | *-macos10*) if test -d /opt/local ; then CFLAGS="$CFLAGS -I/opt/local/include" CXXFLAGS="$CXXFLAGS -I/opt/local/include" CPPFLAGS="$CPPFLAGS -I/opt/local/include" LDFLAGS="$LDFLAGS -L/opt/local/lib" elif test -d /sw ; then CFLAGS="$CFLAGS -I/sw/include" CXXFLAGS="$CXXFLAGS -I/sw/include" CPPFLAGS="$CPPFLAGS -I/sw/include" LDFLAGS="$LDFLAGS -L/sw/lib" fi ;; esac # ---------------------------------------- # Programs # ---------------------------------------- # Does make set variable $(MAKE) AC_PROG_MAKE_SET # Programs AC_PROG_LN_S AC_PATH_PROG(RM, rm) AC_PATH_PROG(TOUCH, touch) AC_PATH_PROG(MKDIR, mkdir) AC_PATH_PROG(RSVG, rsvg-convert, false) AC_PATH_PROG(CONVERT, convert, false) AC_PATH_PROG(INKSCAPE, inkscape, false) AC_PROG_INSTALL # Libtool & Compilers AC_PROG_CC AC_PROG_CXX AC_LANG(C++) AC_CXX_OPTIMIZE # Only nsdejavu needs libtool. # But some combinations of libtool and autoconf # break when libtool is in a conditional path. RM="$RM -f" AC_DISABLE_STATIC LT_INIT # ---------------------------------------- # Header Files # ---------------------------------------- AC_HEADER_STDC AC_HEADER_DIRENT AC_HEADER_TIME AC_HEADER_SYS_WAIT AC_CHECK_HEADERS(unistd.h string.h strings.h) # ---------------------------------------- # Functions # ---------------------------------------- AC_FUNC_FORK AC_CHECK_FUNCS(sigaction strerror waitpid wait3) # ---------------------------------------- # Packages # ---------------------------------------- AC_PROG_PKG_CONFIG([],[ AC_MSG_ERROR([Cannot find required program pkg-config.]) ]) AC_PROGS_QT4([],[ AC_MSG_ERROR([Cannot find required Qt4 programs.]) ]) AC_PATH_DDJVUAPI([],[ AC_MSG_ERROR([Cannot find required package ddjvuapi.]) ]) AC_PATH_TIFF([],[ AC_MSG_WARN([Cannot find libtiff (required for tiff export).]) ]) # ---------------------------------------- # nsdejavu # ---------------------------------------- ac_nsdejavu=yes AC_ARG_ENABLE(nsdejavu, AS_HELP_STRING([--disable-nsdejavu],[Do not compile the nsdejavu browser plugin.]), [ac_nsdejavu=$enableval]) if test "$ac_nsdejavu" != no ; then AC_PATH_X AC_PATH_XTRA if test "$no_x" = yes; then ac_nsdejavu=no AC_MSG_WARN([Disabling plugin compilation (missing X11 include files).]) fi ac_xt=yes ac_glib=yes AC_PATH_GLIB([],[ac_glib=no]) savedCFLAGS="$CFLAGS" CFLAGS="$CFLAGS ${X_CFLAGS}" AC_CHECK_HEADER(X11/Shell.h, [], [ac_xt=no]) AC_CHECK_HEADER(X11/IntrinsicP.h, [], [ac_xt=no]) CFLAGS="$savedCFLAGS" if test "$ac_xt" != no ; then AC_DEFINE(HAVE_XT,1,[Define if you have xt include files.]) if test "$ac_glib" = no ; then AC_MSG_WARN([GLib not found. Compiling plugin without XEmbed.]) fi else AC_MSG_WARN([Xt not found. Compiling plugin with XEmbed only.]) if test "$ac_glib" = no ; then ac_nsdejavu=no AC_MSG_WARN([Disabling plugin compilation (need Xt and/or Glib2.)]) fi fi fi if test "$ac_nsdejavu" != no ; then ac_qt_x11=no AC_LANG_PUSH(C++) saved_CXXFLAGS=$CXXFLAGS CXXFLAGS="$CXXFLAGS -I$QT_INSTALL_HEADERS -I$QT_INSTALL_HEADERS/QtCore" AC_CHECK_DECL(Q_WS_X11, ac_qt_x11=yes, , [#include ]) CXXFLAGS=$saved_CXXFLAGS AC_LANG_POP(C++) if test "$ac_qt_x11" != yes ; then ac_nsdejavu=no AC_MSG_WARN([Disabling plugin compilation (need X11-based version of Qt.)]) AC_MSG_NOTICE([If you have an X11-supporting Qt, try:]) AC_MSG_NOTICE([ CPPFLAGS=-D__USE_WS_X11__ ./configure ...]) fi fi if test "$ac_nsdejavu" != no ; then # prepare flags NSDEJAVU_CFLAGS= NSDEJAVU_LIBS= 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 AC_SUBST(NSDEJAVU_CFLAGS) AC_SUBST(NSDEJAVU_LIBS) # nsdejavu install if test -z "$INSTALL_SHLIB" ; then INSTALL_SHLIB="${INSTALL_DATA}" case "$host" in *-cygwin* | *-mingw*) INSTALL_SHLIB="cp" ;; esac fi AC_SUBST(INSTALL_SHLIB) NSDEJAVU_YES='' NSDEJAVU_NO='#' else NSDEJAVU_YES='#' NSDEJAVU_NO='' fi AC_SUBST(NSDEJAVU_YES) AC_SUBST(NSDEJAVU_NO) # ---------------------------------------- # npdjvu # ---------------------------------------- ac_npdjvu=no AC_ARG_ENABLE(npdjvu, AS_HELP_STRING([--enable-npdjvu],[Compile the npdjvu browser plugin.]), [ac_npdjvu=$enableval]) if test "$ac_npdjvu" != no ; then NPDJVU_YES='' NPDJVU_NO='#' AC_MSG_NOTICE([Enabling compilation of the **experimental** plugin npdjvu,]) else NPDJVU_YES='#' NPDJVU_NO='' fi AC_SUBST(NPDJVU_YES) AC_SUBST(NPDJVU_NO) # ---------------------------------------- # Desktop files # ---------------------------------------- ac_desktopfiles=yes AC_ARG_ENABLE(desktopfiles, AS_HELP_STRING([--disable-desktopfiles],[Do not install scripts to register icons and menus.]), [ac_desktopfiles=$enableval]) # Check for xdg tools AC_PATH_PROG(XDG_MIME, xdg-mime) AC_PATH_PROG(XDG_ICON_RESOURCE, xdg-icon-resource) AC_PATH_PROG(XDG_DESKTOP_MENU, xdg-desktop-menu) if test -x ${XDG_MIME} && \ test -x ${XDG_ICON_RESOURCE} && \ test -x ${XDG_DESKTOP_MENU} then true elif test "$ac_desktopfiles" = yes ; then ac_desktopfiles=no AC_MSG_WARN([Cannot find the Xdg Portland tools. -------------------------------------------------------- *** The scripts to register icons and menus *** ${datadir}/djvu/osi/desktop/register-djvu-mimetype, and *** ${datadir}/djvu/djview3/desktop/register-djview3-menu *** will not be installed. --------------------------------------------------------]) fi if test ${ac_desktopfiles} != no ; then DESKTOP_YES='' DESKTOP_NO='#' else DESKTOP_YES='#' DESKTOP_NO='' fi AC_SUBST(DESKTOP_YES) AC_SUBST(DESKTOP_NO) # ---------------------------------------- # Paths # ---------------------------------------- # Define installation paths and version string AC_DEFINE_INSTALL_PATHS AC_DEFINE_VERSION([DJVIEW_VERSION], [${PACKAGE_VERSION}]) AC_DEFINE_UNQUOTED([DJVIEW_VERSION_STR], ["${PACKAGE_VERSION}"], [string]) # ---------------------------------------- # Run qmake # ---------------------------------------- # autoconf QARG="CONFIG+=autoconf" AUTO_LIBS="$DDJVUAPI_LIBS $TIFF_LIBS $LIBS" AUTO_FLAGS="-I.. $DDJVUAPI_CFLAGS $TIFF_CFLAGS" # note: AUTO_FLAGS does not contain $OPTS # because qmake determines itself # its optimization flags... # out-of-tree? if test -d src && test -r src/qdjvu.cpp ; then : ; else test -d src || mkdir src test -d npdjvu || mkdir npdjvu for n in $srcdir/src/*.pro $srcdir/src/*.ts ; do m=`basename $n` test -r $n && ( cmp -s $n src/$m || cp $n src/$m ) done for n in $srcdir/npdjvu/*.pro ; do m=`basename $n` test -r $n && ( cmp -s $n npdjvu/$m || cp $n npdjvu/$m ) done fi nsrcdir="$srcdir" case "$srcdir" in .*) nsrcdir="../$srcdir" ;; esac AUTO_FLAGS="-I$nsrcdir/src $AUTO_FLAGS" # debug if test "$ac_debug" = yes ; then QARG="$QARG CONFIG+=debug" else QARG="$QARG CONFIG+=release" fi # qmake arguments QARG="$QARG QMAKE_UIC="'"'"$UIC"'"' QARG="$QARG QMAKE_MOC="'"'"$MOC"'"' QARG="$QARG QMAKE_RCC="'"'"$RCC"'"' QARG="$QARG LIBS+="'"'"$AUTO_LIBS"'"' QARG="$QARG QMAKE_LFLAGS+="'"'"$LDFLAGS"'"' QARG="$QARG QMAKE_CFLAGS+="'"'"$CFLAGS $AUTO_FLAGS"'"' QARG="$QARG QMAKE_CXXFLAGS+="'"'"$CXXFLAGS $AUTO_FLAGS"'"' QARG="$QARG QMAKE_CPPFLAGS+="'"'"$CPPFLAGS $AUTO_FLAGS"'"' # qmake environment variables if test -n "$QMAKESPEC" ; then QARG="-spec "'"'"$QMAKESPEC"'"'" $QARG" fi # run AC_CONFIG_COMMANDS([qmake_src], [ echo "config.status: running $QMAKE_COMMAND1." ( cd src ; eval "$QMAKE_COMMAND1" ) ],[ read QMAKE_COMMAND1 < Sat, 31 Mar 2012 21:39:45 +0100 djview4 (4.8-3) unstable; urgency=low * upstream change giving user ability to allow print/save in plugin -- Barak A. Pearlmutter Sat, 26 Nov 2011 23:11:19 +0000 djview4 (4.8-2) unstable; urgency=low * single debian patch source option (closes: #643093) * ensure rsvg in build dependencies * silence lintian regarding duplicate sections * silence lintian regarding unneeded encoding in desktop file -- Barak A. Pearlmutter Fri, 07 Oct 2011 20:28:47 +0100 djview4 (4.8-1) unstable; urgency=low * new upstream release * tweak plugin installation location * silence some lintian issues: - bump debian standards version - add build-arch build-indep as debian/rules targets - convert djvulibre-djview4.xpm from PNG to XPM - switch empty binary package djvulibre-plugin to arch independent - generate and install not PNG but XPM icon files * work around rejection-inducing lintian bug -- Barak A. Pearlmutter Fri, 29 Jul 2011 14:05:56 +0100 djview4 (4.7-1) unstable; urgency=low * New upstream release -- Barak A. Pearlmutter Mon, 07 Mar 2011 17:21:01 +0000 djview4 (4.6-3) unstable; urgency=low * changes to debian/control - fiddle with sections - have djview-plugin conflict with old versions of djvulibre-plugin which contain the same plugin library (closes: #613352, #613374) * arch patch for Renesas SH from Nobuhiro Iwamatsu (closes: #613310) -- Barak A. Pearlmutter Wed, 16 Feb 2011 17:24:16 +0000 djview4 (4.6-2) unstable; urgency=low * move some debian maintenance to git (debian/README.Debian) - point to debian collab-maint repo (debian/control) - upstream has moved to git (debian/copyright, rm debian/README.Debian) * use dh autotools-dev stuff to update config.* files * enable nsdjvu plugin - generate package djview-plugin - generate transition package djvulibre-plugin * bump to debhelper 8 * dh --parallel -- Barak A. Pearlmutter Thu, 02 Dec 2010 13:45:14 +0000 djview4 (4.6-1) unstable; urgency=low * New upstream release * switch to dpkg-source 3.0 (quilt) format * really automatically clean generated bitmaps in debian/ (debian/clean) * bump policy (debian/control) -- Barak A. Pearlmutter Mon, 16 Aug 2010 22:17:28 +0200 djview4 (4.5-6) unstable; urgency=low * source depend (debian/control) on librsvg2-bin binary used by new imagemagick, and work around failure of direct conversion by convert via step-by-step manual convertion in debian/rules (closes: #574297) * automatically clean generated bitmaps in debian/ (debian/clean) -- Barak A. Pearlmutter Thu, 18 Mar 2010 14:51:54 +0000 djview4 (4.5-5) unstable; urgency=low * rev deb std * work around autobuilder inability to install B when build-dep: A | B -- Barak A. Pearlmutter Thu, 28 Jan 2010 20:34:54 +0100 djview4 (4.5-4) unstable; urgency=low * Build dependency on libwmf-bin for wmf2eps (closes: #556813) or libmagickcore2-extra to allow convert to do the job -- Barak A. Pearlmutter Mon, 30 Nov 2009 21:09:05 +0000 djview4 (4.5-3) unstable; urgency=low * missing dh debian/control misc:depends -- Barak A. Pearlmutter Tue, 29 Sep 2009 15:40:28 -0400 djview4 (4.5-2) unstable; urgency=low * rev deb std * fancier shorter debian/rules * lintian issues (stop ignoring errors in installation scripts) -- Barak A. Pearlmutter Mon, 28 Sep 2009 10:53:40 -0400 djview4 (4.5-1) unstable; urgency=low * Upstream release 4.5 * Man page typos (closes: #526091) thanks to "A. Costa" * Ack upstream fix, open dialog allows un-narrowed list (closes: #504281) -- Barak A. Pearlmutter Wed, 29 Apr 2009 09:36:07 +0100 djview4 (4.4-1) unstable; urgency=low * Upstream release 4.4 * Fully dh7-ianize * Upstream builds PNG from SVG using /usr/bin/convert, requiring build dependency upon imagemagick * Integrate new upstream icons -- Barak A. Pearlmutter Mon, 08 Sep 2008 08:37:16 +0100 djview4 (4.3-6) unstable; urgency=low * Gentler dependencies, update x-dev dependency * Upstream mods for man and GCC 4.x warnings * Include more upstream translated text * Minor lintian issues (debian/rules clean; deb scripts w/ command path) * Fix user interaction language selection issue harder (closes: #460714) -- Barak A. Pearlmutter Tue, 19 Aug 2008 13:10:25 +0100 djview4 (4.3-5) unstable; urgency=low * Upstream fix for disappearing search box (closes: #484522) * Unable to manifrest save-as giving zero-length file (closes: #468389) * Upstream fix for user interaction language selection (closes: #460714) * Provide virtual package djvu-viewer (see: #491012) * Minor updates to debian packaging info, rev to debhelper 7 -- Barak A. Pearlmutter Mon, 04 Aug 2008 11:34:53 +0100 djview4 (4.3-4) unstable; urgency=low * Add build dependency on pkg-config (closes: #477029) * Fix update-alternatives in installation scripts (closes: #476434) -- Barak A. Pearlmutter Wed, 23 Apr 2008 07:45:17 +0100 djview4 (4.3-3) unstable; urgency=low * Conflict with old djview containing /usr/bin/djview (closes: #473341) * Raise version number of qt4 needed for build (closes: #475021) -- Barak A. Pearlmutter Mon, 07 Apr 2008 23:53:08 -0700 djview4 (4.3-2) unstable; urgency=low * Upstream __sync_... build error fixes in libdjvu/atomic.cpp for sparc, mips, arm, hppa, mipsel, armel. -- Barak A. Pearlmutter Sun, 16 Mar 2008 18:58:53 +0000 djview4 (4.3-1) unstable; urgency=low * Upstream release * New german and czech translation * Remove xlibs-dev build dependency (closes #460254) * Menu section changed from Apps to Applications * avoid empty /usr/sbin/ -- Barak A. Pearlmutter Wed, 30 Jan 2008 11:36:31 +0000 djview4 (4.2-1) unstable; urgency=low * New feature "Undo/Redo". * New entry "Open Location" in "File" menu. * Add vcs-cvs and homepage fields to debian/control * Include (treating as Debian patch) mods in upstream release 4.2-1, which includes fix for bug number 452947 which occurs here as well as in djvulibre against which it was first reported. -- Barak A. Pearlmutter Tue, 20 Nov 2007 18:02:38 +0000 djview4 (4.1-2) unstable; urgency=low * Compatibility fixes for Qt-4.2. * New entry "Open recent" in "File" menu. -- Barak A. Pearlmutter Tue, 31 Jul 2007 23:26:46 +0500 djview4 (4.1-1) unstable; urgency=low * Bug fixes for Qt-4.2 and Qt-4.3. * PDF and TIFF Export. -- Barak A. Pearlmutter Sun, 7 Jul 2007 12:00:46 +0500 djview4 (4.0-1) unstable; urgency=low * Initial release. * Binary dependency on libdjvulibre should be deb-o-matic! * License clarification of mozilla plugin code. -- Barak A. Pearlmutter Thu, 26 Apr 2007 17:50:46 +0300 djview4/debian/clean000066400000000000000000000000001174072760700146620ustar00rootroot00000000000000djview4/debian/compat000066400000000000000000000000021174072760700150650ustar00rootroot000000000000008 djview4/debian/control000066400000000000000000000031701174072760700152730ustar00rootroot00000000000000Source: djview4 Section: graphics Priority: optional Maintainer: Barak A. Pearlmutter Build-Depends: debhelper (>= 8), dh-autoreconf, pkg-config, libdjvulibre-dev (>= 3.5.20), x11proto-core-dev, libx11-dev, libxext-dev, libxt-dev, libqt4-dev (>= 4.4), libtiff4-dev | libtiff3g-dev | libtiff-dev, netpbm, librsvg2-bin, imagemagick Vcs-Git: git://git.debian.org/git/collab-maint/djview4.git Vcs-Browser: http://git.debian.org/?p=collab-maint/djview4.git Homepage: http://djvu.sourceforge.net/ Standards-Version: 3.9.2 Package: djview4 Architecture: any Provides: djvu-viewer Conflicts: djview (<= 3.5.20-5) Depends: ${shlibs:Depends}, ${misc:Depends} Recommends: djvulibre-desktop Suggests: djvulibre-bin, djview-plugin Description: Viewer for the DjVu image format DjVu viewer djview. Package: djview-plugin Section: web Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, djview4 | djview3 Provides: djvulibre-plugin Enhances: chromium-browser, mozilla-browser, mozilla, firefox, iceweasel, iceape-browser, konqueror, galeon Recommends: chromium-browser | mozilla-browser | mozilla | firefox | iceweasel | iceape-browser | konqueror | galeon Suggests: mime-support Conflicts: djvulibre-bin (<< 3.5.19), djvulibre-plugin (<= 3.5.23-4) Description: Browser plugin for the DjVu image format DjVu browser plugin. Package: djvulibre-plugin Section: web Architecture: all Depends: ${shlibs:Depends}, ${misc:Depends}, djview-plugin Description: Transition package, djvulibre-plugin to djview-plugin Dummy dependency package to transition from djvulibre-plugin to djview-plugin. djview4/debian/copyright000066400000000000000000000057561174072760700156370ustar00rootroot00000000000000This package was debianized by Barak Pearlmutter on Tue, 16 Jan 2007 20:01:58 -0500. It was downloaded from http://djvu.sourceforge.net/ git://djvu.git.sourceforge.net/gitroot/djvu/djview.git Upstream Authors: Leon Bottou Copyright: DjView4, Copyright (c) 2006-2008 Leon Bottou This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, either version 2 of the license or (at your option) any later version. This program depends on the DjVuLibre library. Starting with version 3.5.19, DjVuLibre is released under the GNU General Public License, either version 2 or (at your option) any later version. Prior to version 3.5.19, DjVuLibre was released under the GNU General Public License, version 2. On Debian GNU/Linux systems, the complete text of the GNU General Public License version 2 can be found in `/usr/share/common-licenses/GPL-2'. == Upstream copyright remarks: == In directory nsdejavu/npsdk, the source distribution contains files extracted from the Mozilla project. These files are available under the Mozilla Public License version 1.1 with permission to redistribute under either the GNU General Public License version 2 or the GNU Library General Public License version 2.1. These files are NOT USED for the compilation of the program djview4 under Debian. ==================================================================== Remark1: This program depends on the DjVuLibre library. Starting with version 3.5.19, DjVuLibre is released under the GNU General Public License, either version 2 or (at your option) any later version. Prior to version 3.5.19, DjVuLibre was released under the GNU General Public License, version 2. Remark2: Part of this software is derived from 'tiff2pdf' which comes with the following notice: | Copyright (c) 2003 Ross Finlayson | | Permission to use, copy, modify, distribute, and sell this software and | its documentation for any purpose is hereby granted without fee, provided | that (i) the above copyright notices and this permission notice appear in | all copies of the software and related documentation, and (ii) the name of | Ross Finlayson may not be used in any advertising or | publicity relating to the software without the specific, prior written | permission of Ross Finlayson. | | THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, | EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY | WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. | | IN NO EVENT SHALL ROSS FINLAYSON BE LIABLE FOR | ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, | OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, | WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF | LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE | OF THIS SOFTWARE. djview4/debian/djview-plugin.install000066400000000000000000000000651174072760700200440ustar00rootroot00000000000000usr/lib/*/plugins/*.so usr/share/man/man*/nsdejavu.* djview4/debian/djview4.docs000066400000000000000000000000101174072760700161040ustar00rootroot00000000000000README* djview4/debian/djview4.install000066400000000000000000000003111174072760700166260ustar00rootroot00000000000000usr/bin/djview4 usr/share/man/*/djview4.* usr/share/djvu usr/share/icons debian/djvulibre-djview4.xpm usr/share/icons/hicolor/32x32/apps/ desktopfiles/djvulibre-djview4.desktop usr/share/applications/ djview4/debian/djview4.menu000066400000000000000000000004071174072760700161320ustar00rootroot00000000000000?package(djview4):needs="X11" \ section="Applications/Viewers" \ title="DjView4" command="/usr/bin/djview4" \ icon="/usr/share/icons/hicolor/32x32/apps/djvulibre-djview4.xpm" \ icon32x32="/usr/share/icons/hicolor/32x32/apps/djvulibre-djview4.xpm" djview4/debian/djview4.mime000066400000000000000000000005361174072760700161200ustar00rootroot00000000000000image/vnd.djvu; /usr/bin/djview4 %s; test=test -n "$DISPLAY"; description=DjVu file; nametemplate=%s.djvu; priority=6 image/x.djvu; /usr/bin/djview4 %s; test=test -n "$DISPLAY"; description=DjVu file; nametemplate=%s.djvu; priority=6 image/x-djvu; /usr/bin/djview4 %s; test=test -n "$DISPLAY"; description=DjVu file; nametemplate=%s.djvu; priority=6 djview4/debian/djview4.postinst000066400000000000000000000004111174072760700170440ustar00rootroot00000000000000#! /bin/sh set -e case "$1" in configure) update-alternatives --quiet \ --install /usr/bin/djview djview /usr/bin/djview4 40 \ --slave \ /usr/share/man/man1/djview.1.gz djview.1.gz \ /usr/share/man/man1/djview4.1.gz ;; esac #DEBHELPER# djview4/debian/djview4.prerm000066400000000000000000000002151174072760700163100ustar00rootroot00000000000000#! /bin/sh set -e case "$1" in remove|deconfigure) update-alternatives --quiet --remove djview /usr/bin/djview4 ;; esac #DEBHELPER# djview4/debian/djvulibre-djview4.xpm000066400000000000000000000143651174072760700177660ustar00rootroot00000000000000/* XPM */ static char *djvulibre_djview4[] = { /* columns rows colors chars-per-pixel */ "32 32 256 2 ", " c #2F3B62", ". c #3D3165", "X c #783C54", "o c #5B2E62", "O c #443067", "+ c #4E336E", "@ c #563066", "# c #55336B", "$ c #5B316A", "% c #4E3977", "& c #453B7C", "* c #4D3B7A", "= c #523572", "- c #5A3776", "; c #672B61", ": c #64326D", "> c #78306D", ", c #713576", "< c #29436E", "1 c #2C4671", "2 c #7E475E", "3 c #764D5E", "4 c #7D495F", "5 c #6E575F", "6 c #68585A", "7 c #71525E", "8 c #6B5B61", "9 c #645364", "0 c #735F67", "q c #765966", "w c #6F6267", "e c #6D6D6D", "r c #7D616C", "t c #757575", "y c #7C7C7C", "u c #7B7875", "i c #BD7C1C", "p c #AA732A", "a c #B67A2F", "s c #C27D21", "d c #802A5E", "f c #932A58", "g c #883F5D", "h c #823853", "j c #923057", "k c #922D6A", "l c #8F3D62", "z c #973562", "x c #993967", "c c #9B3C68", "v c #863275", "b c #A12D63", "n c #A6376C", "m c #A12F72", "M c #967040", "N c #BC6648", "B c #854361", "V c #8B4866", "C c #895E6E", "Z c #A2406E", "A c #8B6C6D", "S c #8A6374", "D c #94637A", "F c #936A7C", "G c #89737D", "H c #BE822E", "J c #D9890C", "K c #C5841A", "L c #D78911", "P c #DC8C11", "I c #DE931E", "U c #C3892C", "Y c #D69D3C", "T c #EEAF3D", "R c #B08B53", "E c #A08B7E", "W c #C38F45", "Q c #D0A86F", "! c #D1AB72", "~ c #EDC574", "^ c #F1CC73", "/ c #3E3F80", "( c #643C80", ") c #7A3F80", "_ c #314586", "` c #3C4282", "' c #405599", "] c #485B9D", "[ c #585997", "{ c #794B89", "} c #725E89", "| c #57609F", " . c #5A62A3", ".. c #6565A2", "X. c #7E6DA2", "o. c #864181", "O. c #8C558A", "+. c #955D83", "@. c #976B89", "#. c #857F81", "$. c #8B7B83", "%. c #8A6D98", "&. c #7788A3", "*. c #858484", "=. c #8B8B8B", "-. c #99858C", ";. c #86869E", ":. c #9D8A93", ">. c #929292", ",. c #9B9B9B", "<. c #A49495", "1. c #8C8DA3", "2. c #9292A7", "3. c #9A9BAD", "4. c #9595A9", "5. c #9F9FB1", "6. c #959FBC", "7. c #9FA0B3", "8. c #9EA5B9", "9. c #ABA9A9", "0. c #A7A4A5", "q. c #B0AEAE", "w. c #B6A9A6", "e. c #A0A0B3", "r. c #AFAFBF", "t. c #A5AABE", "y. c #AFB0BF", "u. c #B3B3B3", "i. c #BBBBBB", "p. c #CBAF83", "a. c #DCBA87", "s. c #BAD5A9", "d. c #F5D181", "f. c #FDDE80", "g. c #CEC7BE", "h. c #C8E2BD", "j. c #C3F0BE", "k. c #94A6C6", "l. c #97A8C8", "z. c #98A9C9", "x. c #9BA7C4", "c. c #A6ADC3", "v. c #AEB1C0", "b. c #A5B3C6", "n. c #B2B2C1", "m. c #BABAC7", "M. c #B5BBCA", "N. c #BEBECB", "B. c #AFBED4", "V. c #81B6E0", "C. c #84BCE5", "Z. c #8DC0DE", "A. c #9AC9DD", "S. c #9EDCDA", "D. c #B9C3CF", "F. c #A9CDDB", "G. c #A2CADA", "H. c #B3CDDA", "J. c #B7DCDD", "K. c #A9E6DD", "L. c #8AC3EB", "P. c #93C6E1", "I. c #97CAEC", "U. c #9DD2ED", "Y. c #95CBF5", "T. c #9BCAF3", "R. c #9DD1F7", "E. c #9ED6F8", "W. c #A4CDEA", "Q. c #A8CEEB", "!. c #B5CEEA", "~. c #A5D2E2", "^. c #ACD6E5", "/. c #A2D1EA", "(. c #A6D8EC", "). c #B3DAE4", "_. c #B3DBEC", "`. c #B4D5E7", "'. c #A3D4F4", "]. c #A3D9F5", "[. c #ADDDF3", "{. c #A2DAF9", "}. c #AADDFA", "|. c #B3DFF0", " X c #B5D8F5", ".X c #A9E2EF", "XX c #A9E2E2", "oX c #B7E1EC", "OX c #B5E5E3", "+X c #B8F2E6", "@X c #ADE1FA", "#X c #BDE6F1", "$X c #B4E4FA", "%X c #BCE9FA", "&X c #BAE5F5", "*X c #C3C3C3", "=X c #C7C8CA", "-X c #CBCBCB", ";X c #C7C7D2", ":X c #CBCBD4", ">X c #D6D6D6", ",X c #D3D4DC", " :.IXwXk.!.Y.{.}.cX_.zX~.kX+X+XoXoXVXZX;XIXIXLXy 3 = UXUXUX", "UXUXk q.LXk.x.T.Y.].U.zXkXZXP.~.hXjXA.).).VXM.&.IXDXy 3 = UXUXUX", "UXUXb =XLXx.c.T.E.}.U.&X`.#XoX~.hXOXF.xXG.CXM.< KXDXy 4 = UXUXUX", "UX& z >XLXl.c.Y.].@XV./.Z.#XVX`.hX).uXBXF.CXD.1 KXSXy 2 % UXUXUX", "UX- V AXLXx.6.I.L.C.I.|.P.xXNXxXjXJ.GXJXH.sX8.< KXAX*.B % UXUXUX", "UX, S AXKXdXy.W.U././.P.~.VXNXHX7X6XPXPXFXbX3.=XLX.SXSXDXKXy.Q.$X%XmXVXCXaXGX7X9XPXLXDXe.SXKXLX>X=.l & UXUXUX", "UXn ,.DXDXSXDXAXt.Q.%X%XMXVXaXCX7X9XPXFXM.e.n.KXDX>X=.z ` UXUXUX", "* c u.SXDXSXSXDX,X8.`.#XMXVXaXHXHXGXbXy.e.r.M.DX2X-X=.c / UXUXUX", "( V i.SXSXSXSXSXDX>X5.b.`.xXxXgXiXD.1.y.N.>X:X! I ! =.c ` UXUXUX", ") r *XSXSXSXSXSXSXSXSX:X5.4.;.2.2.m.SXSXSX,Xa.^ T P R Z _ UXUXUX", "o.q *.=.=.=.,.,.,.9.i.-XAXSX*XSXSXSXSXSXSX! ^ qXd.T P N _ UXUXUX", "UX{ { O.O.+.+.D F C r 0 w *.*.*.=.>.0.q.*Xg.Y f.qXd.T P M UXUXUX", "UXUXUXUXUXUXUXUXUXUX] | .. . .X.%.%.@.@.F F A U f.qXd.T L s UXUX", "UXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUX' [ } H f.qXd.T P i UX", "UXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXK f.qXd.T L a ", "UXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXK f.qX^ W -.", "UXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXK f.p.w.;.", "UXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXp <.1.UX", "UXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUX", "UXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUXUX" }; djview4/debian/rules000077500000000000000000000022021174072760700147430ustar00rootroot00000000000000#!/usr/bin/make -f override_dh_auto_configure: dh_auto_configure -- --disable-desktopfiles icon=djvulibre-djview4 iconbasedir=debian/tmp/usr/share/icons/hicolor plugsubdir=mozilla/plugins plug=$(plugsubdir)/nsdejavu.so override_dh_auto_install: dh_auto_install -- \ plugindir=/usr/lib/$(plugsubdir) \ DESTDIR=$(CURDIR)/debian/tmp @echo "flush djview links, handled with debian alternatives system" rm debian/tmp/usr/bin/djview rm debian/tmp/usr/share/man/man1/djview.* @echo "install djview4 icons" mkdir --parents $(iconbasedir)/scalable/apps mkdir --parents $(iconbasedir)/32x32/apps mkdir --parents $(iconbasedir)/64x64/apps cp desktopfiles/hi-djview4.svgz \ $(iconbasedir)/scalable/apps/$(icon).svgz pngtopnm < desktopfiles/hi32-djview4.png \ | ppmtoxpm > $(iconbasedir)/32x32/apps/$(icon).xpm pngtopnm < desktopfiles/hi64-djview4.png \ | ppmtoxpm > $(iconbasedir)/64x64/apps/$(icon).xpm override_dh_makeshlibs: dh_makeshlibs --version-info --exclude=/plugins targets=build clean install binary-arch binary-indep binary build-arch build-indep $(targets) %: dh $@ --with autoreconf --parallel .PHONY: $(targets) djview4/debian/source/000077500000000000000000000000001174072760700151675ustar00rootroot00000000000000djview4/debian/source/format000066400000000000000000000000141174072760700163750ustar00rootroot000000000000003.0 (quilt) djview4/debian/source/include-binaries000066400000000000000000000000351174072760700203250ustar00rootroot00000000000000debian/djvulibre-djview4.xpm djview4/debian/source/local-options000066400000000000000000000000241174072760700176710ustar00rootroot00000000000000single-debian-patch djview4/debian/watch000066400000000000000000000000631174072760700147170ustar00rootroot00000000000000version=3 http://sf.net/djvu/djview4-(.*)\.tar\.gz djview4/desktopfiles/000077500000000000000000000000001174072760700151415ustar00rootroot00000000000000djview4/desktopfiles/.gitignore000066400000000000000000000000121174072760700171220ustar00rootroot00000000000000/Makefile djview4/desktopfiles/Makefile.in000066400000000000000000000053351174072760700172140ustar00rootroot00000000000000#C- This program is free software; you can redistribute it and/or #C- modify it under the terms of the GNU General Public License, #C- either version 2 of the license or (at your option) any later #C- version. The license should have accompanied the program #C- or you may obtain a copy of the license from the Free Software #C- Foundation at http://www.fsf.org. #C- #C- This program is distributed in the hope that it will be useful, #C- but WITHOUT ANY WARRANTY; without even the implied warranty of #C- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #C- GNU General Public License for more details. @SET_MAKE@ SHELL = @SHELL@ VPATH = @srcdir@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ top_builddir = .. prefix = @prefix@ exec_prefix = @exec_prefix@ bindir = @bindir@ datarootdir = @datarootdir@ datadir = @datadir@ libdir = @libdir@ mandir = @mandir@ INSTALL = @INSTALL@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_DATA = @INSTALL_DATA@ RSVG = @RSVG@ CONVERT = @CONVERT@ INKSCAPE = @INKSCAPE@ XDG_MIME = @XDG_MIME@ XDG_ICON_RESOURCE = @XDG_ICON_RESOURCE@ XDG_DESKTOP_MENU = @XDG_DESKTOP_MENU@ RM = @RM@ datadir_djview = ${datadir}/djvu/djview4/desktop # -------- all all: icons register-djview-menu icons: hi-djview4.svgz hi32-djview4.png hi64-djview4.png hi32-djview4.png hi64-djview4.png: djview.svg s=`echo $@ | sed -e 's/[a-z]*\([0-9]*\).*/\1/'`; \ ${RSVG} -w $${s} -h $${s} -o $@ $< \ || ${CONVERT} -geometry $${s}x$${s} -depth 8 -background none $< $@ \ || ${INKSCAPE} --without-gui --export-width=$${s} \ --export-height=$${s} --export-png=$@ $< \ || cp ${srcdir}/prebuilt-$@ $@ hi-djview4.svgz: djview.svg gzip <$< >$@ 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-djview-files install-djview-files: FORCE ${INSTALL} -d ${DESTDIR}${datadir_djview} ${INSTALL_PROGRAM} register-djview-menu ${DESTDIR}${datadir_djview} ${INSTALL_DATA} *djview4.png ${DESTDIR}${datadir_djview} ${INSTALL_DATA} *djview4.svgz ${DESTDIR}${datadir_djview} ${INSTALL_PROGRAM} ${srcdir}/*djview4.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-djview-menu distclean: clean -${RM} -r 2>/dev/null Makefile *.rpo ii_files depend: FORCE: .PHONY: FORCE djview4/desktopfiles/README000066400000000000000000000035431174072760700160260ustar00rootroot00000000000000 This directory contains various files that can be used for registering the djvu icons, the djvu mime types, and the djview menu entries. There are two ways to exploit them. 1 - Install desktop files with Portland tools. ---------------------------------------------- When you pass option "--enable-desktopfiles" to the "configure" script, the "make install" procedure installs a scripts named "${datadir}/djvu/djview4/desktop/register-djview-menu". The directory "${datadir}" is usually "${prefix}/share". This is "/usr/local/share" unless you specify an alternate prefix when running "configure". This script relies on the so called XDG Portland tools to install or uninstall icons and menu entries for various desktop environment. Calling "${datadir}/djvu/djview4/desktop/register-djview-menu install", installs menu icons and menu entries for the djview4 viewer. 2 - Install desktop files by hand. ---------------------------------- The XDG Portland tools are not very desirable when preparing binary packages because they do not implement the DESTDIR variable (as of version 1.0.1.) Although it is possible to call the scripts during the postinstallation or the preremove phases, it is usually preferable to install the desktop files by hand. In the following we assume that "${prefix}" is "/usr" and "${datadir}" is then "/usr/share". We also assume that the desktop environment were installed with the same prefixes. The following files should be installed: * Menu icons for djview4: - Install "hi32-djview4.png" as "${datadir}/icons/hicolor/32x32/apps/djvulibre-djview4.png". * Menu entries for djview4: - Install "djvulibre-djview4.desktop" as "${datadir}/applications/djvulibre-djview4.desktop". - Arrange to execute script "update-desktop-database". at installation time. djview4/desktopfiles/djview.svg000066400000000000000000001175701174072760700171650ustar00rootroot00000000000000 image/svg+xml djview4/desktopfiles/djvu.svg000066400000000000000000000417441174072760700166440ustar00rootroot00000000000000 image/svg+xml djview4/desktopfiles/djvulibre-djview4.desktop000066400000000000000000000045351174072760700221030ustar00rootroot00000000000000[Desktop Entry] Type=Application Categories=Qt;Graphics;Viewer; MimeType=image/x-djvu;image/x.djvu;image/vnd.djvu; Name=DjView4 Exec=djview4 %f Terminal=false Icon=djvulibre-djview4 StartupWMClass=Djview4 GenericName=DjVu Viewer GenericName[ar]=عارض Ù…Ù„ÙØ§Øª DjVu GenericName[az]=DjVu Nümayişçisi GenericName[bg]=Преглед на документи DjVu GenericName[br]=Gweler DjVu GenericName[bs]=Preglednik DjVu dokumenata GenericName[ca]=Visualitzador de DjVu GenericName[cs]=ProhlížeÄ DjVu souborů GenericName[cy]=Gwelydd DjVu GenericName[da]=DjVu-fremviser GenericName[de]=DjVu-Betrachter GenericName[el]=ΠÏοβολέας DjVu GenericName[eo]=DjVu-rigardilo GenericName[es]=Visor de DjVu GenericName[et]=DjVu-failide näitaja GenericName[eu]=DjVu ikustailua GenericName[fi]=DjVu-näytin GenericName[fr]=Afficheur DjVu GenericName[ga]=Amharcán DjVu GenericName[gl]=Visor DjVu GenericName[he]=מציג DjVu GenericName[hr]=Preglednik DjVu dokumenata GenericName[hu]=DjVu-nézegetÅ‘ GenericName[id]=Viewer DjVu GenericName[is]=DjVu sjá GenericName[it]=Visore DjVu GenericName[ja]=DjVuビューア GenericName[km]=កម្មវិធី​មើល DjVu GenericName[lt]=DjVu ŽiÅ«riklis GenericName[lv]=DjVu SkatÄ«tÄjs GenericName[mk]=Прикажувач на DjVu датотеки GenericName[ms]=Pemapar DjVu GenericName[mt]=Werrej DjVu GenericName[nb]=DjVu-fremviser GenericName[nl]=DjVu-weergaveprogramma GenericName[nn]=DjVu-lesar GenericName[pa]=DjVu ਦਰਸ਼ਕ GenericName[pl]=PrzeglÄ…darka plików DjVu GenericName[pt]=Visualizador de DjVus GenericName[pt_BR]=Visualizador de arquivos DjVu GenericName[ro]=Vizualizor DjVu GenericName[ru]=Чтение документов DjVu GenericName[rw]=Mugaragaza DjVu GenericName[se]=DjVu-Äájeheaddji GenericName[sk]=PrehliadaÄ DjVu GenericName[sl]=Pregledovalnik datotek DjVu GenericName[sr]=DjVu приказивач GenericName[sr@Latn]=DjVu prikazivaÄ GenericName[sv]=DjVu-visare GenericName[ta]=DjVu காடà¯à®šà®¿ GenericName[tg]=Хондани Ñанадоти DjVu GenericName[th]=ตัวà¹à¸ªà¸”งผล DjVu GenericName[tr]=DjVu Görüntüleyici GenericName[uk]=ПереглÑдач DjVu GenericName[uz]=DjVu кўрувчи GenericName[ven]=Tshivhoni tsha DjVu GenericName[xh]=Umboniseli we DjVu GenericName[zh_CN]=DjVu 查看器 GenericName[zh_HK]=DjVu 檢視器 GenericName[zu]=Umboniseli we DjVu djview4/desktopfiles/prebuilt-hi32-djview4.png000066400000000000000000000041241174072760700216130ustar00rootroot00000000000000‰PNG  IHDR szzôsBIT|dˆ pHYsvv}Õ‚ÌtEXtSoftwarewww.inkscape.org›î<ÑIDATX…½–[l\ÅÇ3s.{öêݵ×Yßâ81q”K0ˆˆ’T¥õ¥T„JU!A%D+µTB¥< D_« ©¨}¨ZÔª ¨DkA¤@P-7‰:›Å&‘;»ñÚ{ßsÎLŒW±H[ i¤£93ß÷;ÿù¾ÑÆÎÖŽ+î¹5&ƒ+-'iÙ¦8ᩈծE•ß°dXŽ:¦&&&¾ ÄÙÝWß7üÓúüÇ—=z'×íÝ”¥B¤”4›Mfgg9úþÑðàS/‘=õR÷pÂnF[–'NŸ. …7€×&&&ŠÿÀž+îy|_bé¾üg„¤¯ÕjüëÌÛØFrÕÐõùÅÅE¦§§ùèèTxüðÔâÉwŽMfÚ/ ×Í À»wL?㯮µÎØ«ƒÞÖÿ(9@½^§ê—‰8Ñ5óétšññqÆÇÇЭµÞóÐÏÚ3ùÏ©GfO'»~¸ºVž½1£õHꢡ &6ÆÐnûÔjujÍ2UYûÜõRJâ‰8•| ;Ï~×q wíOÒ÷†a<·ùüZkÊå*A Ylj*m…MŒ{œV£M½Þ$|&„ïû !Â>/€òkié³qó¦s6W*uŠKMÞœw)ú e+l 0 è#ã)¼SË$Ô"ƒƒòÜ# ‚ŒPáwVtx¶5ÃÃÃk6‹e&O´ùÛq¢P¸q›hL‰(l©ÑnŠÕbZ¤8eâLžf}k¯ý9ƒAp]³Û#•Ju^ÖëMf‹¯—]"1I2.IÅ1¸6,˜ebžbÙóÓ9Ž]“ÜC†Ÿˆ5wG [›íÞÖ½Ö†ONy½èJbIÜÄ"ЕØRIE,ªˆ;’˜#ˆ¹‚zÌ£ΜY^ûõB B¥u.@ß ?“=Z÷§FÐZ³ÿÐ4ÿúE>ªD¨iƒ ÚD#‚z¥ŠôÛŽŸB·Û¤bqG1W,1wrXÔÆÈsìØ'kÏ_J”Îë€#}:´²›úÑZ35»@2¢8X(i:¤VobBŸ¸%IX’vÛ§X®ðl‹KKxnÈôÇÇQ1‹…â"ßýñcc:–h¡Î°á²„ðÉ÷å1Æ`Œ!›°¨Št2B"êR­ú´Û>s¥:¥z‹‹6¦0 ª5Ÿ¤#éËtѨ¶Æ -›7Þ&|ßÿÔ–ò\€Í~°»êd³Y´Ö+…ƒÁG ƒ£C*Õ¥bƒùraA_.A&®Â†{âDm ¾²–’h­ñ}¥–6èu]`ô…æêF·‹mÛh­1Æ0_ªÓ=Øb~ÉОoÒÛã‘Îx4ü]Q%º31jA‰¨«ÊeQR’‰(šÕ&Ç>˜Á±t@J‰ZJÿz´ec¦cÿí7neÇh’¤h³!ë²e0Aܶ9R8CÔǵ‚€|&‰c‡d“WJ\`|ÛÝžM&aóìã?ZS„V( ×áàÞ‡c½¡ÉЛÀ²,´ÖD½Û¶mÆ©Îc¡ˆÆ"d»¢lJ°u8‡R´Fƒ!F(c°ÁÒ†å…2ù|/ù|!DÇ;„R­s@ˆKúuˆÕÅq´^±-™Œ5 ¼z ŒA¹Š®TËR±r¹` M[´P€2†f¥Îßüƒññ±N¬Ul-Yw mvزE6›EJÙ©­5;vlÅÿøÂJmeN€Ñfeƒ0 [DBÍr­ÉÁßd``‡½×‰ÁJ‚p}l Â#>™LfMr­5R ®ßJíÝ7hÌ~B»Ò6†Ð€´1l”#äÍFæN–xæÉÄ£|¿M$âR­ÔiL=K¬ä´¥"bÖ†ËËYÉh$Ò)ÂU !H§Ü|ó5¼úê{/Èõáç3x]ŹÕb™â‰Sœœ™cçÎKYZª38ØKø”^~Äég±»¿…Û±•…¿® ,[‰žJÚÂó¼Î°š|FJÁîÝ—S«5˜™™§ðÚ;ÌÏŸ&™L24ÔÃö-}ìÛuigïR¹†ž~šÜh:~%¢ð4—˜S”¬‹Ö ¤ k-üõ9^Šºø:IJ,”RH)‰Åbär9r¹½½½Œ rñÅ™ššbË–-ØUx!æ£ß“ÏÎám¿›–`lúf.­ãùf{ À[¶}ë¦êÈݹ÷Õ• KõG-qm-\K£T€‹ås¢MU·hJ—MaG#ìŸxŽC<'‘HÉdÈår¤Sûh¾ÿ(c±'pGî  ‡¯q¿Óú<ð@Çéõ?›oþ¥Bt !3!e!3GnÈ:V~9$ô”8}Iܺ)iÑçšVÚ£é8º‰60´hÑdûÀAnøöõˆ‘;i^¤U8HùÃCá‰åž?ìzxæ®óü¯ºø;¿K£0ºß=Ðk1:d5¶Ý6ú§}7Þ¶+!×@¼Ò.”rÜû‹Ù»þoŸ¥'ïÛïÏU÷_{Ë-»Î†(}øºþ°4ü[yá_L·=v¤Z8¿é•§þrHžÀù:Φ½Ì˜Ýr®û{êKw`U¿ùþX|¸¯ºÏí·ìzûpKîU¼59ÿWð«;Æâ¹œz¾¶éÞÒ\Ù9<99ýÈW p>}é5p!ý©GÐ[›š0IEND®B`‚djview4/desktopfiles/prebuilt-hi64-djview4.png000066400000000000000000000131171174072760700216220ustar00rootroot00000000000000‰PNG  IHDR@@ªiqÞsBIT|dˆ pHYsììu85tEXtSoftwarewww.inkscape.org›î<ÌIDATxœíšyŒ]×}ß?¿sîòö™y³¯äPEQ$¥P #ÉZ¬%*£lű'iÿiÓµÐÂEÒi`$@‹È)šh¤…ÑuÔTJ­Å¶"×ÔFk_)Râ6Üf8û¼õ.çœþñæ8ä gh9u,ô78óî{÷¾{¿ÏùžßùÝó®8çØÈºoþ—y`U`væ‡ØØð‹?&¸þÆ_û³]qü•gü¹œ¥ZbÏbµÐ&mÁ%J\*X£Nph8çN"r ˜pÎÒZ¿ýØcMý¿n3vY=·|õK/ÍüÅÖ4æþ”Ÿùgñ©O} A)…ˆ¬jíÏ.Ü—¦)§Nbbb‚“'O211áŽ=ö²1é7'''ÿø•W^I|ðÁZë X‘I`jiiéü³Ï>›þDü̾þý¯-¿ëõþ”¡/ÜÉÃ?ŒÖúc_ôÌ™3|ó›ßäÕg_2åÐ4oüÂ]™ ;«u¥„!Iâ8&I*•Š;}úôü©S§Þ´Öþ8ÇñKO?ýtíc;ÂeôìXÝ5–~¹:—f<å?=þd³ÙÇ5WìðáÃL4ßç¶ëïÃᘩ̰µ¸uÍc“$áôéÓœø¥ÿjã„v‘yëídû IòþH÷=x€r¹Ìɳ)uêÄÄëëû>ãã㌷܃¡4M?ÿá‡~þ·ßæý¾Á¿ºç¡¸´dç¶.éwë^Þžù¥ÿêìzç]"{‡LJÝw oùÑ"ÜÀ*• qT߀µÌóˆïû›vÀZÇâb•ÅÅ ¾ïã “©šÐL¡ž‚q …,tû1¥¸ÆâÜïNcd¤ŽŽÂ•E¾lI’,ûaÑN0" bÖ;~m"{‡Ó„šÃ[6?þ«Õ:33 xžÆe:xù¼pfÉí9D+´¥„Zê ¶­÷ý€±r[áÈ‘ r¹«¯#6V+@;Á"\½CÆ0›·›ÿ³³‹,,TðóE^›ò8¾$è@ÐY…§@iY~¹‰"Šb¬K0YEU<>¨du‘íc˜›äÕW±{÷vŠÅÜÀs‚}Y¬™uº­¹©` ™Í8{vš…… IÐÁãG4Ç‚ŸÓÁ?Tøx>hOð´àið}A)¾!õcÈ&_q¸¢X( Rîíæ•WÞcvváŠXkÑFÂ4æ:a!ØÀùósT«Mf]ß>®°Y « 2d„0#¡àBà+|¥4ECW1Ò@¼­ZÀ‚¼b.Qœ »Ù:Êk¯¦R©o @;8çÐV°ä€K Þñëc&Í B¥ Z÷b ffˆ‚Î:üœ& …ЇL „¾"ãCƇ¬'BO†í92“ê& –Äák…ï)‚œ+Åù°ÄÀ`//¾ø6Qtù:Á9‡1­X­µxË9€+S€ìIR¬¥ñ!”Z{nN’”‰‰)¼BÏœTx9MA øžh!ÔøÒÊÖµŽË™Œ ÀÓ!¥à„8ž¯ð³Š¦R˜¾!òù o¾yä²ÚÁ·ahF)DÖO‚—F'²wؤ,…–-[×—ÿ¹s3„aÀKg.ãø ßß|M+pÏúB*2¡P((< Ä •%Wô–A)Qn}_A(-€aÖca`ûV&&¦˜Ÿ¯¬ëS[þp¡W¤¹~Ðæ³2þs«Z½ÞäüùyjºÄt¤ñ|ÁóÀ÷[úz‚'(,ÊP a ð€C¬1(O,K^œef¶‚¯„ÞÎ V‹•˜z3!”…l{—|Ï‘ZÇùé%òÙ€Îr›Ñ˜ÈÑ»mŒžzŽjµN¡péÔØÐ6ÆŠl~ºë7ÂÁÔŒ ²¢kí „?ùë7ùÆ_¾Ž˜ãgYˆ¡[R“âœ%Næë,VšøºÕƒ¥Œ¦àƒg Ú¦œZàÔäÕZO z„ž&P-õLž_àÔÔ,§¦f©Õð•k ­@ˆCŸr¹Ä‰çÖU@{9Î9‡ï¤¥€ÍB»†R£E„z§O¹\ÆZ»BÕ9Ë@WHÆf“ Êl’ ñÀX‡I ÍØE1ÅŒO! ðÅQÊúx&1­…ùZоÆh‹Õ‚³)Óó‹ød|¡˜™ž]¾ž‰Õôô•yùµ#<÷ö[GzxàŽ=k* U « KáÕ9@dïˆI1 ÊãC$I²jìléËâùгPÊQÌ(²akŠ+OƒÒPoÄàKµ&Õz„‰cbC½y|ÝZÒ9?=‡(ך•brf ´= NsâÔ4ÇOžÇ¦)ž:»©,.ñü5_ÿÿ$Ž?ZçhPJµ€\ÙhM­8<2²ª¨h[1£ñ=zªð}M>—! |üÀ#ãgÐJi©E Èr›«G4,Œt“ ­¡Rk"Ê(105SA†zËhXi.M~&$M ÙÀ£Z­’¦éJ]š[•à¦uî†>c™ SWN~!„®‚Æ÷4‘DÑj"(À˜žiR©$c1j LÕ8_‹Ð<-Œñ4d<4µx(âØ!Ö¡ž¢Og±¸ €¶­°ÎRÈø+~µ}»€çVÔæo††Œ¹A‰0¤ìÀZ»*xçù°•d ,޵ /€f#¦ZµD!f95]Ã÷ Wk´nõüPO‘Z¥I QìÈç,‰iŸ`°§ ½|îv)ZCÉ ¢}nmm_=§0lR#Ÿþ­¾¡Ô”a.Hèíí]E¸}‘…jL%øÊ‘¦†z”PR*•&µ8¡X ѪU+ÅÊí¯^Ùg¶v°Øˆ[3)¢ZzK>…(f‚LÏTp©AC³шÌ%s±|iMƒ—+„.P€ìI ¡YÈd2h­W€Ù¥˜j­A˜3TR¨G ¾Q”àŒ¡¿?C>çQÎpvåö7ãkD¾j9–rä‚y¬I1$he)…0ÐÝ…nEDoGŽŒ’Ô1=Se´¿Œ‰Sâ(¦%äVAX5 ‹ZYÙD),ÂÞ‘ÔÐô,Ã}DQ„ïû—(`©‘R©4Èiƒ§d%Ñi%Ôë óÓ5 (÷v`éîÊÒS è-ç u«wêQ„§ãC8c±¤ˆ¶ô=Jùüª±¿c´L!r¡•ijØÖ'„¾¬òïBˆuÈ&n‡/TÀžÑÔ0¦ôõõ­Ìÿ*à÷ÿÉNÞÿêµ*ý¡a)ÊE…¯QŠÞLJ>P­Y^>7I6Tärš0phíaÄ¡pz»Š4«³¤$d2–nUhUîôÌ@w']ÅõFqŽSGO“Ëy|ã7™sçέLym´ß+ÛJΛÎíë´Ž~BOOÏ%Á\³c;×ìØÎã?W›ÅêÅŽ\ëNÏ/ŸÇ÷`æÔ J 5“X % ôQ"€s+raH J[2¾‡¾€£U.ã„F­ÉÑ£§¹õÖ¸öÚkÙµkWë˜5†€ZQÀ&†Àè=¿£‡³Sf3)årÏó.‘{{h¨Lev†Æ|´à*Ë¿›ŽöåèP w [û2 ö}tžåÀÛM‰`HIu Ö.¯åÔ4€±8ci,,111ÉÎ[WùÓnƘ•BˆtsC ZØ1’š@D˜õc:::Vÿ‹/¶mÛ0gÏN3À&J°í ¼VT,dß2ÈÖ±!z{{ÐZ· ¢5ÐhRŒN1.E/;¥hååi’bã˜>ÿ&ccýtu/ þâ°¢€V|— ÈÞQc„¨;DDÃpÍ‹8çèèȳe˳'Ž“3 Òö}¸s8}áБ þ_pÑV©Øêm))F"­ß`Rƒ5†óg¦yã#<ðÀÏ®ëW;o‰Ê´sÀæÖöŒ$†Šg(ôtE™LfÍÞo·}ûv099KWmÛHH’Ö5D ¢ÚÙÙ®úNû\®2)IûOZ÷Ö9K%Ô–j|÷©)sø¾·¦?°ºÔ––Ô&–ÄDdïhj™ b:;;ÑZ¯8¹íl6äöÛ÷ðîëïÒߘ"ª7W ´T°|×JdíªÍƒö<\ë#EBJBJê³òyb,µfL½ñ·ß9ÈéÓç¹í¶ø›¿yžééù  í€\vIÌèO;¬ƒ™0¡X,ÁJðkY{†Ø±c„©©YÞõuvÜr ª·Uød=‡eYíË¥iŠçym6xø”â# ã{ ¤©%Žb¢fÌë/¾ÍÁƒïð¥/}ß×4Ѫ©ïBÚI@™€tƒiPÝ÷»é­˜ c …Šüדڅïo¿}år‰wž{‘ŽÙ ’¥:Q-&M—ïñU»fëq’ ´^Hȵrª‹ Qj¹¸¼öŒZ‹hÅl³#›%ŸÏ¯ÙûkÕ>x¼ÉÁg_dï×!£[©™.ïá2>*ÓúÝ×9G’¦ æ‚óXc‰RƒI ¤)sg¦yæÉ˜˜˜ä«_ýŠÅ=ö}î¿?•J'Ÿ|‰›nÚIÕÈú¼Ò0¥Û~kEÎ9w}}Ý<úè3\ýÕŒŽö355G£qúäúN~Ûx›æt“$Xû©ÖPˆVËuÀå ìÝâ, ™„l!O’$kXÏ.sÝuãlß>Âoñƒï \î °‡á«Ç‘r'6ôðBã)HR$I±QÌÙ£§ùðÐ Nœ8G6ð•¯|†Ý»·qôè}ô{<ðÀ~ææ*:tç;¯¤ùü×È…ò™ fþ‹'¿ËˆwŽ)¹ã#h…iåòË)€-À1?&—ˆá%½½^ï¯õyxÜ{ï>n½uï¼sŒ·Þ:Ê+?|—0 ÈåB|_ãûÍfD½Þ`a¡NzìÙs¿ø‹÷±k×Ö•ó^uÕ0W]5 @gg·Þ:F¹#Kó¥C¡3GgÏu˜ùÖêpÇüQ’¦e—‹xÙÝŠ‡ByŠtƒ:Àë¶tžbÚÈdº.éýËI=r¹ ·Ü²‹[nÙE³199ÏÒR—_~±±ŠÅ¥RžÎ΃ƒÝ«–³×»^¹#@Þü]J[·Ó{Íõ˜ùc«ö÷ÌÇÄŽ½’ð†i­Áe+A¯ÇÙ.QŠiÝĤ)“““8pkíÊ’x;¨µžÕZ“Ïç)•J‹EJ¥Ò%T„aÀ–-ýˆ³³Üu׫`­ôÅà‰±¯ü&åÅð·aýþ5ê›?Ž1·«Ž¼>L*‰§}ý'DN)õRªåê-¶ÈùCóœ:<Ía9HCšÊ’(‡¨VÀµ¶e2:;;c||œ­[·R,[KÕ-²´Ÿº\ð&ªÏOPq0ù=ÔÀ}x]ÛÖ jãØ²#Ùóöð=ëö>€ŒÝÿõ‘=ξv‹Ð;¤…¢§(iEÉS<Zh(C]Rê¤ÔI¨·¶mBÕFÔlLÍÄÔlLÃ¥°°þþ~¶mk9Ü××G½^§R©´~Ãó<‚ Õ×|>OWW]]­a)"4ÏâìÿšÝ{ …í÷ÂÀ}X¿ŸtþfþØòëqÒùc¤óÇ9³0ÆfvØ}å ÿ®ß~oMˆsŽ­?÷{ ‘;¹‘!´H¹ ¤§¨T±¨EŠË`ŠZÑá)о¢ÃW-h˯B‰¡fcªiD-¨™ˆjQI#ã4¢š6©»´¥0O¯!ˆöv6›]Qbûúà†,Å«7†ðÁÜg¬÷-ãô—ïýw—BØðqy€í>¢Ê‚”éF¤,\ô*ÒÍò~O¤\ò¥§¨U¾FÓ°Žê–غ7uøý7”t¶7z|EQ >MjI“JÜ`)jPIšT—[%mÒ %ÖhG.âÓÝoqëÏú”vl áøüPµ–dŸ0Vù3__ aS~TÛõП eÊ %ÞýÖ?šÝýÅÿš> n¯ƒa#ZÜp—'£Ý>ÅnOèö…Êz4tk( xÖR#íQéqn¹]Ó± Gg‡ªÕ¸áüþGþNü(¶ë¡?+€vÎ ƒÁ­l;çF:5£]šÞ…ÏL²¿ÿrÇŠŽkîÛ‘éÁj%jAø‡ÿþPk†üû`3¶ãsäáÜ ¸á;;^»û³/þÛ»ï ²A˜;ÎûSƒÕÅeŸÿƒCö§ÀÅö?¾zíþÀ7OÝuw¶³kçÆÞi.ÖƒÇS«¿ü‰ðßÿŵûCß<õé{³å ij'xîØv“nÿÄøo¿víþ00OÝ_¶³|íÚ’Ùc<ÿµÂÍ1Û¿ØûñÏþ{d¿òLJÖê§ž®/̾÷½VŘLáumCwmCŠ[xáÕˆJñVæÊÄ33 ×}¢üãÿòþÁZC?ðí'ë 3@Â(ßÿß/‘tÝDv×/P­ÖíÌÌÂÜ'j\hÿùWwîÏæ©Ï>˜ë,_sOü¯“è®Ýt]ÿçÎÍò oo6ãíŸXÿñ+;÷gBûbG¦°˜¹Ù]uÏ?Õï¼s49rääÙz½ùsþç¿}ä ྼóæÐ··ÿŸè ‡K¥ü­KK×­5O|ë[¿ÁOi!ôã´O\¼Rûÿ~Òü¤íÿq„7µIÙaIEND®B`‚djview4/desktopfiles/register-djview-menu.in000066400000000000000000000041771174072760700215560ustar00rootroot00000000000000#!/bin/sh #C- This program is free software; you can redistribute it and/or #C- modify it under the terms of the GNU General Public License, #C- either Version 2 of the License or (at your option) any later #C- version. The license should have accompanied the program #C- or you may obtain a copy of the license from the Free Software #C- Foundation at http://www.fsf.org. #C- #C- This program is distributed in the hope that it will be useful, #C- but WITHOUT ANY WARRANTY; without even the implied warranty of #C- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #C- GNU General Public License for more details. xdg_mime=XDG_MIME xdg_icon_resource=XDG_ICON_RESOURCE xdg_desktop_menu=XDG_DESKTOP_MENU datadir=DATADIR mydir=MYDIR # test directory if test -d "$mydir" then cd $mydir else echo 1>&2 "Unable to find directory ${mydir}" exit 10 fi # check presence of xdg utils test -n "$xdg_mime" || xdg_mime=`which xdg-mime` test -n "$xdg_icon_resource" || xdg_icon_resource=`which xdg-icon-resource` test -n "$xdg_desktop_menu" || xdg_desktop_menu=`which xdg-desktop-menu` if test -x "$xdg_mime" && test -x "$xdg_icon_resource" && test -x "$xdg_desktop_menu" then true else echo 1>&2 "Unable to find the Xdg Portland utils" echo 1>&2 " These are needed to run $0". echo 1>&2 " Please check http://portland.freedesktop.org." exit 10 fi if test -n "$XDG_DATA_DIRS" ; then XDG_DATA_DIRS="$datadir:$XDG_DATA_DIRS" else XDG_DATA_DIRS="$datadir:/usr/local/share/:/usr/share/" fi export XDG_DATA_DIRS # proceed case "$1" in install) "$xdg_icon_resource" install --context apps \ --size 32 ./hi32-djview4.png djvulibre-djview4 "$xdg_icon_resource" install --context apps \ --size 64 ./hi64-djview4.png djvulibre-djview4 "$xdg_desktop_menu" install ./djvulibre-djview4.desktop ;; uninstall) "$xdg_icon_resource" uninstall --context apps \ --size 32 djvulibre-djview4 "$xdg_icon_resource" uninstall --context apps \ --size 64 djvulibre-djview4 "$xdg_desktop_menu" uninstall djvulibre-djview4.desktop ;; *) echo 1>&2 "Usage: $0 {install|uninstall}" exit 10 ;; esac djview4/djview4.spec000066400000000000000000000054111174072760700146760ustar00rootroot00000000000000%define release 1 %define version 4.9 Summary: DjVu viewer Name: djview4 Version: %{version} Release: %{release} License: GPL Group: Applications/Publishing Source: djview4-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-root URL: http://djvu.sourceforge.net # BuildRequires: qt4-devel >= 4.2 # BuildRequires: qt4-designer >= 4.2 # BuildRequires: libjpeg-devel # BuildRequires: libtiff-devel # BuildRequires: glibc-devel # BuildRequires: gcc-c++ # BuildRequires: djvulibre >= 3.5.19 # BuildRequires: xdg-utils # Requires xdg-utils %description DjView4 is a viewer and browser plugin for DjVu documents, based on the DjVuLibre-3.5 library and the Qt4 toolkit. %prep %setup -q %build %configure make %install rm -rf %{buildroot} make DESTDIR=%{buildroot} install # Remove symlinks to djview when there are alternatives if test -x /usr/sbin/update-alternatives ; then test -h %{buildroot}%{_bindir}/djview \ && rm %{buildroot}%{_bindir}/djview test -h %{buildroot}%{_mandir}/man1/djview.1 \ && rm %{buildroot}%{_mandir}/man1/djview.1 fi %clean rm -rf %{buildroot} %post # ALTERNATIVES if test -x /usr/sbin/update-alternatives ; then m1=`ls -1 %{_mandir}/man1/djview4.* | head -1` m2=`echo $m1 | sed -e 's/djview4/djview/'` /usr/sbin/update-alternatives \ --install %{_bindir}/djview djview %{_bindir}/djview4 104 \ --slave $m2 `basename $m2` $m1 fi # MENU test -x %{_datadir}/djvu/djview4/desktop/register-djview-menu && %{_datadir}/djvu/djview4/desktop/register-djview-menu install 2>/dev/null # HACK: Create links to nsdejavu.so in mozilla dirs ( for n in %{_prefix}/lib/mozilla* ; do \ if [ -d $n ] ; then \ test -d $n/plugins || mkdir $n/plugins ; \ test -h $n/plugins/nsdjvu.so && rm $n/plugins/nsdjvu.so ; \ test -h $n/plugins/nsdejavu.so && rm $n/plugins/nsdejavu.so ; \ ln -s ../../netscape/plugins/nsdejavu.so $n/plugins/nsdejavu.so ; \ fi ; done ) 2>/dev/null || true exit 0 %preun if test "$1" = 0 ; then # HACK: Remove links to nsdejavu.so in all mozilla dirs ( if [ ! -r %{_prefix}/lib/netscape/plugins/nsdejavu.so ] ; then \ for n in %{_prefix}/lib/mozilla* ; do \ if [ -h $n/plugins/nsdejavu.so ] ; then \ rm $n/plugins/nsdejavu.so ; \ rmdir $n/plugins ; \ fi ; done ; fi ) 2>/dev/null || true # MENU test -x %{_datadir}/djvu/djview4/desktop/register-djview-menu && %{_datadir}/djvu/djview4/desktop/register-djview-menu uninstall 2>/dev/null # ALTERNATIVES if test -x /usr/sbin/update-alternatives ; then /usr/sbin/update-alternatives --remove djview %{_bindir}/djview4 fi fi exit 0 %files %defattr(-, root, root) %doc README* COPYRIGHT COPYING INSTALL NEWS TODO %{_bindir} %{_datadir}/djvu/djview4 %{_mandir} %changelog * Sat Jan 27 2007 Leon Bottou 4.0-1 - initial release. djview4/npdjvu/000077500000000000000000000000001174072760700137535ustar00rootroot00000000000000djview4/npdjvu/LICENSE.GPL000066400000000000000000000436741174072760700154170ustar00rootroot00000000000000The Qt Solutions are copyright (C) 2003-2005 Trolltech AS You may use, distribute and copy the Qt Solution(s) under the terms of GNU General Public License version 2, which is displayed below. ------------------------------------------------------------------------- GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 51 Franklin Steet, Fifth Floor, Boston, MA 02110-1301, USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Steet, Fifth Floor, Boston, MA 02110-1301, USA. Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. ------------------------------------------------------------------------- djview4/npdjvu/README000066400000000000000000000015501174072760700146340ustar00rootroot00000000000000This directory contains an experimental portable plugin dll partially based on the Qt solution qtbrowserplugin. You need to compile with --enable-npdjvu to compile this. Warning: This plugin does not work with konqueror or Qt based browsers because of symbol conflicts between the Qt library used by the browser and the Qt library used by the plugin. Static compilation would fix that at the expense of considerable bloat. --------------------------------------------------------- The following files are the genuine qt solution files: qtbrowserplugin_mac.cpp (does not work) qtbrowserplugin_x11.cpp qtbrowserplugin_win.cpp qtbrowserplugin.def qtnpapi.h This files is a slightly modified qt solution file: qtbrowserplugin_p.h These files are derived from the qt solution code: qtbrowserplugin.h qtnpapi.cpp This is the main file: npdjvu.cpp djview4/npdjvu/npdjvu.cpp000066400000000000000000000632401174072760700157720ustar00rootroot00000000000000//C- -*- C++ -*- //C- ------------------------------------------------------------------- //C- DjView4 //C- Copyright (c) 2009- Leon Bottou //C- //C- This software is subject to, and may be distributed under, the //C- GNU General Public License, either version 2 of the license, //C- or (at your option) any later version. The license should have //C- accompanied the software or you may obtain a copy of the license //C- from the Free Software Foundation at http://www.fsf.org . //C- //C- This program is distributed in the hope that it will be useful, //C- but WITHOUT ANY WARRANTY; without even the implied warranty of //C- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //C- GNU General Public License for more details. //C- ------------------------------------------------------------------ #include "config.h" #include #include #include // Qt includes #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #ifdef Q_WS_X11 # include #endif // Djview includes #include "qdjvu.h" #include "qdjvuwidget.h" #include "qdjview.h" // Npdjvu includes #include "npdjvu.h" #include "qtbrowserplugin.h" #include "qtbrowserplugin_p.h" /* ------------------------------------------------------------- */ class QtNPForwarder: public QObject { Q_OBJECT public: QtNPForwarder(QtNPInstance *instance, QObject *parent = 0); public slots: void showStatus(QString message); void getUrl(QUrl url, QString target); void onChange(); private: QtNPInstance *instance; }; struct QtNPStream { QUrl url; QtNPInstance *instance; int streamid; bool started; bool checked; bool closed; QtNPStream(int streamid, QUrl url, QtNPInstance *instance); ~QtNPStream(); }; class QtNPDocument : public QDjVuDocument { Q_OBJECT public: QtNPDocument(QtNPInstance *instance); virtual void newstream(int streamid, QString name, QUrl url); private: QtNPInstance *instance; }; /* ------------------------------------------------------------- */ /* Setup application */ static QPointer theApp; static QPointer djvuContext; static bool verbose = true; static void qtMessageHandler(QtMsgType type, const char *msg) { switch (type) { case QtFatalMsg: fprintf(stderr,"djview fatal error: %s\n", msg); abort(); case QtCriticalMsg: fprintf(stderr,"djview critical error: %s\n", msg); break; case QtWarningMsg: if (verbose) fprintf(stderr,"djview: %s\n", msg); break; default: if (verbose) fprintf(stderr,"%s\n", msg); break; } } #ifdef Q_WS_X11 static bool x11EventFilter(void *message, long *) { // We define a low level handler because we need to make // the window active before calling the QX11EmbedWidget event filter. XEvent *event = reinterpret_cast(message); if (event->type == ButtonPress) { QWidget *w = QWidget::find(event->xbutton.window); if (w && qobject_cast(w->window())) theApp->setActiveWindow(w->window()); } return false; } #endif static void addDirectory(QStringList &dirs, QString path) { QString dirname = QDir::cleanPath(path); if (! dirs.contains(dirname)) dirs << dirname; } static void setupApplication(QtNPInstance *instance) { // quick if (theApp) { qtns_initialize(instance); if (! djvuContext) djvuContext = new QDjVuContext; return; } // globals QApplication::setOrganizationName(DJVIEW_ORG); QApplication::setOrganizationDomain(DJVIEW_DOMAIN); QApplication::setApplicationName(DJVIEW_APP); qInstallMsgHandler(qtMessageHandler); // mac #ifdef Q_WS_MAC extern void qt_mac_set_native_menubar(bool); qt_mac_set_native_menubar(false); #endif // application qtns_initialize(instance); if (! djvuContext) djvuContext = new QDjVuContext; theApp = (QApplication*)QCoreApplication::instance(); #ifdef Q_WS_X11 theApp->setEventFilter(x11EventFilter); #endif #ifdef LC_NUMERIC // This is needed in the pdf export code in order to make // sure numbers are represented properly. But is it really // good to change the global state of the browser? ::setlocale(LC_NUMERIC, "C"); #endif // translators QTranslator *qtTrans = new QTranslator(theApp); QTranslator *djviewTrans = new QTranslator(theApp); // - determine preferred languages QStringList langs; QString varLanguage = ::getenv("LANGUAGE"); if (varLanguage.size()) langs += varLanguage.toLower().split(":", QString::SkipEmptyParts); #ifdef LC_MESSAGES QString varLcMessages = ::setlocale(LC_MESSAGES, 0); if (varLcMessages.size()) langs += varLcMessages.toLower(); #else # ifdef LC_ALL QString varLcMessages = ::setlocale(LC_ALL, 0); if (varLcMessages.size()) langs += varLcMessages.toLower(); # endif #endif #ifdef Q_WS_MAC langs += QSettings(".", "globalPreferences") .value("AppleLanguages").toStringList(); #endif QString qtLocale = QLocale::system().name(); if (qtLocale.size()) langs += qtLocale.toLower(); // - determine potential directories QStringList dirs; QDir dir = QApplication::applicationDirPath(); QString dirPath = dir.canonicalPath(); addDirectory(dirs, dirPath); #ifdef DIR_DATADIR QString datadir = DIR_DATADIR; addDirectory(dirs, datadir + "/djvu/djview4"); addDirectory(dirs, datadir + "/djview4"); #endif #ifdef Q_WS_MAC addDirectory(dirs, dirPath + "/Resources/$LANG.lproj"); addDirectory(dirs, dirPath + "/../Resources/$LANG.lproj"); addDirectory(dirs, dirPath + "/../../Resources/$LANG.lproj"); #endif addDirectory(dirs, dirPath + "/share/djvu/djview4"); addDirectory(dirs, dirPath + "/share/djview4"); addDirectory(dirs, dirPath + "/../share/djvu/djview4"); addDirectory(dirs, dirPath + "/../share/djview4"); addDirectory(dirs, dirPath + "/../../share/djvu/djview4"); addDirectory(dirs, dirPath + "/../../share/djview4"); addDirectory(dirs, "/usr/share/djvu/djview4"); addDirectory(dirs, "/usr/share/djview4"); addDirectory(dirs, QLibraryInfo::location(QLibraryInfo::TranslationsPath)); // - load translators bool qtTransValid = false; bool djviewTransValid = false; foreach (QString lang, langs) { foreach (QString dir, dirs) { dir = dir.replace(QRegExp("\\$LANG(?!\\w)"),lang); QDir qdir(dir); if (! qtTransValid && qdir.exists()) qtTransValid = qtTrans->load("qt_" + lang, dir, "_.-"); if (! djviewTransValid && qdir.exists()) djviewTransValid= djviewTrans->load("djview_" + lang, dir, "_.-"); } if (lang == "en" || lang.startsWith("en_") || lang == "c") break; } // - install tranlators if (qtTransValid) theApp->installTranslator(qtTrans); if (djviewTransValid) theApp->installTranslator(djviewTrans); } void NPP_Shutdown() { delete djvuContext; djvuContext = 0; } /* ------------------------------------------------------------- */ /* Forwarder */ QtNPForwarder::QtNPForwarder(QtNPInstance *instance, QObject *parent) : QObject(parent), instance(instance) { } void QtNPForwarder::showStatus(QString message) { message.replace(QRegExp("\\s"), " "); QByteArray utf8 = message.toUtf8(); NPN_Status(instance->npp, utf8.constData()); } void QtNPForwarder::getUrl(QUrl url, QString target) { if (instance) { QByteArray bUrl = url.toEncoded(); QByteArray bTarget = target.toUtf8(); NPN_GetURL(instance->npp, bUrl.constData(), bTarget.isEmpty() ? 0 : bTarget.constData()); } } void QtNPForwarder::onChange() { if (instance && instance->npobject && instance->onchange.type == NPVariant::String) { NPVariant res; NPString *code = &instance->onchange.value.stringValue; NPN_Evaluate(instance->npp, instance->npobject, code, &res); NPN_ReleaseVariantValue(&res); } } /* ------------------------------------------------------------- */ /* Stream */ QtNPStream::QtNPStream(int streamid, QUrl url, QtNPInstance *instance) : url(url), instance(instance), streamid(streamid), started(false), checked(false), closed(false) { instance->streams.insert(this); } QtNPStream::~QtNPStream() { if (instance && instance->streams.contains(this)) if (instance->document && started && !closed) ddjvu_stream_close(*instance->document, streamid, true); closed = true; started = checked = false; instance->streams.remove(this); } /* ------------------------------------------------------------- */ /* Document */ QtNPDocument::QtNPDocument(QtNPInstance *instance) : QDjVuDocument(true), instance(instance) { QUrl docurl = QDjView::removeDjVuCgiArguments(instance->url); setUrl(djvuContext, docurl); } void QtNPDocument::newstream(int streamid, QString, QUrl url) { if (streamid > 0) { new QtNPStream(streamid, url, instance); QString message = tr("Requesting %1.").arg(url.toString()); instance->forwarder->showStatus(message); instance->forwarder->getUrl(url, QString()); } } /* ------------------------------------------------------------- */ /* Open/Close djview */ static QByteArray saveData(QDjVuWidget *widget) { if (! widget) return QByteArray(); QDjVuWidget::Position pos = widget->position(); QBuffer buffer; buffer.open(QIODevice::WriteOnly); QDataStream s(&buffer); s << widget->zoom() << widget->rotation(); s << widget->sideBySide() << widget->continuous(); s << widget->displayMode(); s << pos.pageNo << pos.posView; buffer.close(); return buffer.data(); } static void restoreData(QDjVuWidget *widget, QByteArray data) { if (data.isEmpty()) return; QBuffer buffer(&data); buffer.open(QIODevice::ReadOnly); QDataStream s(&buffer); int zoom, rotation, mode; bool sideBySide, continuous; QDjVuWidget::Position pos; s >> zoom >> rotation >> continuous >> sideBySide; s >> mode >> pos.pageNo >> pos.posView; pos.inPage = false; buffer.close(); if (s.status() != QDataStream::Ok) return; // apply widget->setZoom(zoom); widget->setRotation(rotation); widget->setSideBySide(sideBySide); widget->setContinuous(continuous); widget->setDisplayMode((QDjVuWidget::DisplayMode)mode); widget->setPosition(pos); } static void openInstance(QtNPInstance *instance) { if (! instance->document && instance->url.isValid()) { instance->document = new QtNPDocument(instance); instance->document->ref(); } if (instance->document && instance->djview) if (! instance->djview->getDocument()) { instance->djview->open(instance->document, instance->url); restoreData(instance->djview->getDjVuWidget(), instance->savedData); instance->djview->show(); } } static void closeInstance(QtNPInstance *instance) { if (instance->djview) { instance->savedData = saveData(instance->djview->getDjVuWidget()); instance->djview->close(); delete instance->djview; instance->djview = 0; instance->qt.object = 0; qtns_destroy(instance); } } /* ------------------------------------------------------------- */ /* NPRuntime */ static NPIdentifier npid_getdjvuopt; static NPIdentifier npid_setdjvuopt; static NPIdentifier npid_onchange; static NPIdentifier npid_version; static bool np_hasmethod(NPObject*, NPIdentifier name) { if (name == npid_getdjvuopt || name == npid_setdjvuopt ) return 1; return 0; } static bool np_invoke(NPObject *npobj, NPIdentifier name, const NPVariant *args, uint32_t argCount, NPVariant *result) { QVariant res; QtNPInstance *instance = (npobj && npobj->_class) ? npobj->_class->qtnp : 0; if (instance && name == npid_getdjvuopt) { // GetDjVuOpt ------------ if (argCount != 1) NPN_SetException(npobj, "Exactly one argument is expected"); else if (args[0].type != NPVariant::String) NPN_SetException(npobj, "First argument should be a string"); else if (instance->djview) { res = instance->djview->getArgument(QVariant(args[0]).toString()); *result = NPVariant::fromQVariant(instance, res); return 1; } return 0; } else if (instance && name == npid_setdjvuopt) { // SetDjVuOpt ------------ if (argCount != 2) NPN_SetException(npobj, "Exactly two arguments were expected"); else if (args[0].type != NPVariant::String) NPN_SetException(npobj, "First argument should be a string"); else { QVariant key = QVariant(args[0]).toString(); QVariant val = QVariant(args[1]).toString(); if (val.canConvert(QVariant::String)) { if (instance->djview) instance->djview->parseArgument(key.toString(), val.toString()); else instance->args += key.toString() + "=" + val.toString(); *result = NPVariant::fromQVariant(instance, res); return 1; } NPN_SetException(npobj, "Arg 2 should be a string or a number"); } return 0; } NPN_SetException(npobj, "Unrecognized method"); return 0; } static bool np_hasproperty(NPObject*, NPIdentifier name) { if (name == npid_onchange || name == npid_version) return 1; return 0; } static bool np_getproperty(NPObject *npobj, NPIdentifier name, NPVariant *result) { QtNPInstance *instance = (npobj && npobj->_class) ? npobj->_class->qtnp : 0; if (instance && name == npid_onchange) { QVariant var = instance->onchange; *result = NPVariant::fromQVariant(instance, var); return 1; } else if (instance && name == npid_version) { *result = NPVariant::fromQVariant(instance, QString("npdjvu+djview4")); return 1; } return 0; } static bool np_setproperty(NPObject *npobj, NPIdentifier name, const NPVariant *value) { QtNPInstance *instance = (npobj && npobj->_class) ? npobj->_class->qtnp : 0; if (instance && name == npid_onchange) { if (value->type == NPVariant::String || value->type == NPVariant::Null ) { NPN_ReleaseVariantValue(&instance->onchange); QVariant var = *value; instance->onchange = NPVariant::fromQVariant(instance, var); return 1; } NPN_SetException(npobj, "String or null expected"); return 0; } return 0; } static void createObject(QtNPInstance *instance) { if (! npid_getdjvuopt) npid_getdjvuopt = NPN_GetStringIdentifier("getdjvuopt"); if (! npid_setdjvuopt) npid_setdjvuopt = NPN_GetStringIdentifier("setdjvuopt"); if (! npid_onchange) npid_onchange = NPN_GetStringIdentifier("onchange"); if (! npid_version) npid_version = NPN_GetStringIdentifier("version"); NPClass *npclass = new NPClass(instance); npclass->hasMethod = np_hasmethod; npclass->invoke = np_invoke; npclass->hasProperty = np_hasproperty; npclass->getProperty = np_getproperty; npclass->setProperty = np_setproperty; instance->npobject = NPN_CreateObject(instance->npp, npclass); } /* ------------------------------------------------------------- */ /* NPP functions */ NPError NPP_New(NPMIMEType mime, NPP npp, uint16 mode, int16 argc, char* argn[], char* argv[], NPSavedData* saved) { Q_UNUSED(mime) if (! npp) return NPERR_INVALID_INSTANCE_ERROR; QtNPInstance *instance = new QtNPInstance; if (! instance) return NPERR_OUT_OF_MEMORY_ERROR; // initialize npp->pdata = instance; instance->fMode = mode; instance->forwarder = 0; instance->document = 0; instance->djview = 0; instance->npobject = 0; instance->npp = npp; instance->qt.object = 0; #ifdef Q_WS_MAC instance->rootWidget = 0; #endif createObject(instance); if (saved && saved->len) instance->savedData = QByteArray((const char*)saved->buf, saved->len); // arguments for (int i = 0; i < argc; i++) { QString key = QString::fromUtf8(argn[i]); QString val = QString::fromUtf8(argv[i]); QString k = key.toLower(); if (k == "flags") instance->args += val.split(QRegExp("\\s+"), QString::SkipEmptyParts); else instance->args += key + QString("=") + val; } fprintf(stderr,"npdjvu: using the QtBrowserPlugin%s\n", #if defined(Q_WS_X11) "/XEmbed" #elif defined(Q_WS_MAC) "/Mac" #elif defined(Q_WS_Win) "/Windows" #else "" #endif ); return NPERR_NO_ERROR; } NPError NPP_Destroy(NPP npp, NPSavedData** save) { QtNPInstance *instance = (npp) ? (QtNPInstance*)(npp->pdata) : 0; if (! instance) return NPERR_INVALID_INSTANCE_ERROR; closeInstance(instance); delete instance->forwarder; instance->forwarder = 0; if (instance->document) instance->document->deref(); instance->document = 0; if (save && !instance->savedData.isEmpty()) { int len = instance->savedData.size(); void *data = NPN_MemAlloc(len); NPSavedData *saved = (NPSavedData*)NPN_MemAlloc(sizeof(NPSavedData)); if (saved && data) { memcpy(data, instance->savedData.constData(), len); saved->len = len; saved->buf = data; *save = saved; } } instance->npp->pdata = 0; if (instance->onchange.type) NPN_ReleaseVariantValue(&instance->onchange); if (instance->npobject) NPN_ReleaseObject(instance->npobject); delete instance; return NPERR_NO_ERROR; } NPError NPP_SetWindow(NPP npp, NPWindow* window) { QtNPInstance *instance = (npp) ? (QtNPInstance*)(npp->pdata) : 0; if (! instance) return NPERR_INVALID_INSTANCE_ERROR; QRect clipRect; if (window) { clipRect = QRect(window->clipRect.left, window->clipRect.top, window->clipRect.right - window->clipRect.left, window->clipRect.bottom - window->clipRect.top); instance->geometry = QRect(window->x, window->y, window->width, window->height); } // take a shortcut if all that was changed is the geometry if (instance->djview && window && instance->window == (QtNPInstance::Widget)window->window) { qtns_setGeometry(instance, instance->geometry, clipRect); return NPERR_NO_ERROR; } if (instance->djview) closeInstance(instance); if (! window) { instance->window = 0; return NPERR_NO_ERROR; } instance->window = (QtNPInstance::Widget)window->window; setupApplication(instance); if (! instance->forwarder) instance->forwarder = new QtNPForwarder(instance); QDjView::ViewerMode mode = (instance->fMode == NP_FULL) ? QDjView::FULLPAGE_PLUGIN : QDjView::EMBEDDED_PLUGIN; QDjView *djview = new QDjView(*djvuContext, mode); djview->setWindowFlags(djview->windowFlags() & ~Qt::Window); djview->setAttribute(Qt::WA_DeleteOnClose, false); djview->setObjectName("npdjvu"); djview->setAutoFillBackground(true); instance->djview = djview; instance->qt.widget = djview; QObject::connect(djview, SIGNAL(pluginStatusMessage(QString)), instance->forwarder, SLOT(showStatus(QString)) ); QObject::connect(djview, SIGNAL(pluginGetUrl(QUrl,QString)), instance->forwarder, SLOT(getUrl(QUrl,QString)) ); QObject::connect(djview, SIGNAL(pluginOnChange()), instance->forwarder, SLOT(onChange()) ); qtns_embed(instance); QEvent e(QEvent::EmbeddingControl); QApplication::sendEvent(instance->qt.widget, &e); if (!instance->qt.widget->testAttribute(Qt::WA_PaintOnScreen)) instance->qt.widget->setAutoFillBackground(true); instance->qt.widget->raise(); qtns_setGeometry(instance, instance->geometry, clipRect); while (instance->args.size() > 0) djview->parseArgument(instance->args.takeFirst()); openInstance(instance); return NPERR_NO_ERROR; } NPError NPP_NewStream(NPP npp, NPMIMEType mime, NPStream* stream, NPBool seekable, uint16 *stype) { Q_UNUSED(mime) Q_UNUSED(seekable) Q_UNUSED(stype) QtNPInstance *instance = (npp) ? (QtNPInstance*)(npp->pdata) : 0; QUrl url = QUrl::fromEncoded(stream->url); if (instance) { if (! url.isValid() ) { qWarning("npdjvu: invalid url '%s'.", stream->url); return NPERR_GENERIC_ERROR; } // first stream if (! instance->url.isValid()) { instance->url = url; url = QDjView::removeDjVuCgiArguments(url); QtNPStream *s = new QtNPStream(0, url, instance); s->checked = true; } // search streams QtNPStream *npstream = 0; foreach(QtNPStream *s, instance->streams) if (!npstream && !s->started) if (s->url == url) npstream = s; // mark started stream if (npstream) { stream->pdata = npstream; npstream->started = true; if (npstream->streamid == 0) openInstance(instance); } } return NPERR_NO_ERROR; } NPError NPP_DestroyStream(NPP npp, NPStream* stream, NPReason reason) { QtNPInstance *instance = (npp) ? (QtNPInstance*)(npp->pdata) : 0; QtNPStream *npstream = (stream) ? (QtNPStream*)(stream->pdata) : 0; bool okay = (reason == NPRES_DONE); if (instance && npstream && instance->streams.contains(npstream)) { if (instance->document && !npstream->closed) ddjvu_stream_close(*instance->document, npstream->streamid, !okay); npstream->closed = true; if (instance->forwarder) instance->forwarder->showStatus(QString()); delete npstream; } return NPERR_NO_ERROR; } int32 NPP_WriteReady(NPP npp, NPStream* stream) { Q_UNUSED(npp) Q_UNUSED(stream) return 0x7fffffff; } int32 NPP_Write(NPP npp, NPStream* stream, int32 offset, int32 len, void *buffer) { Q_UNUSED(offset) QtNPInstance *instance = (npp) ? (QtNPInstance*)(npp->pdata) : 0; QtNPStream *npstream = (stream) ? (QtNPStream*)(stream->pdata) : 0; const char *cdata = (const char*)buffer; if (instance && npstream && instance->streams.contains(npstream)) { if (!npstream->checked && len > 0) { // -- if the stream is not a djvu file, // this is probably a html error message. // But we need at least 8 bytes to check npstream->checked = true; if (instance->forwarder && len >= 8) { if (strncmp(cdata, "FORM", 4) && strncmp(cdata+4, "FORM", 4)) { instance->forwarder->getUrl(npstream->url, QString("_self")); return len; } } } // pass data QtNPDocument *document = instance->document; if (document) ddjvu_stream_write(*document, npstream->streamid, cdata, len); } return len; } void NPP_StreamAsFile(NPP npp, NPStream* stream, const char* fname) { Q_UNUSED(npp) Q_UNUSED(stream) Q_UNUSED(fname) } void NPP_Print(NPP npp, NPPrint* platformPrint) { QtNPInstance *instance = (npp) ? (QtNPInstance*)(npp->pdata) : 0; if (instance && instance->djview) { instance->djview->print(); if (platformPrint && platformPrint->mode==NP_FULL) platformPrint->print.fullPrint.pluginPrinted=TRUE; } } int16 NPP_HandleEvent(NPP npp, NPEvent* event) { QtNPInstance *instance = (npp) ? (QtNPInstance*)(npp->pdata) : 0; if (instance) return qtns_event(instance, event) ? 1 : 0; return NPERR_INVALID_INSTANCE_ERROR; } void NPP_URLNotify(NPP npp, const char *url, NPReason reason, void *data) { Q_UNUSED(npp) Q_UNUSED(url) Q_UNUSED(reason) Q_UNUSED(data) } NPError NPP_GetValue(NPP npp, NPPVariable variable, void *value) { Q_UNUSED(npp) NPError err = NPERR_GENERIC_ERROR; QtNPInstance *instance = (npp) ? (QtNPInstance*)(npp->pdata) : 0; switch (variable) { case NPPVpluginNameString: *((const char **)value) = "DjView-" DJVIEW_VERSION_STR " (npdjvu)"; err = NPERR_NO_ERROR; break; case NPPVpluginDescriptionString: *((const char **)value) = "This is the " "DjView-" DJVIEW_VERSION_STR " (npdjvu) version of " "the DjVu plugin.
" "See DjVuLibre."; err = NPERR_NO_ERROR; break; case NPPVpluginNeedsXEmbed: *((NPBool*)value) = TRUE; err = NPERR_NO_ERROR; break; case NPPVpluginScriptableNPObject: if (!instance || !instance->npobject) break; NPN_RetainObject(instance->npobject); *((NPObject**)value) = instance->npobject; err = NPERR_NO_ERROR; break; default: break; } return err; } NPError NPP_SetValue(NPP npp, NPPVariable variable, void *value) { Q_UNUSED(npp) Q_UNUSED(variable) Q_UNUSED(value) return NPERR_GENERIC_ERROR; } /* ------------------------------------------------------------- */ #ifdef Q_WS_X11 const char* NP_GetMIMEDescription(void) { return "image/x-djvu:djvu,djv:DjVu File;" "image/x.djvu::DjVu File;" "image/djvu::DjVu File;" "image/x-dejavu::DjVu File (obsolete);" "image/x-iw44::DjVu File (obsolete);" "image/vnd.djvu::DjVu File;" ; } NPError NP_GetValue(void*, NPPVariable aVariable, void *aValue) { return NPP_GetValue(0, aVariable, aValue); } #endif /* ------------------------------------------------------------- */ #include "npdjvu.moc" /* ------------------------------------------------------------- Local Variables: c++-font-lock-extra-types: ( "\\sw+_t" "[A-Z]\\sw*[a-z]\\sw*" "NPP" "QtNP\\sw*") End: ------------------------------------------------------------- */ djview4/npdjvu/npdjvu.h000066400000000000000000000046361174072760700154430ustar00rootroot00000000000000//C- -*- C++ -*- //C- ------------------------------------------------------------------- //C- DjView4 //C- Copyright (c) 2009- Leon Bottou //C- //C- This software is subject to, and may be distributed under, the //C- GNU General Public License, either version 2 of the license, //C- or (at your option) any later version. The license should have //C- accompanied the software or you may obtain a copy of the license //C- from the Free Software Foundation at http://www.fsf.org . //C- //C- This program is distributed in the hope that it will be useful, //C- but WITHOUT ANY WARRANTY; without even the implied warranty of //C- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //C- GNU General Public License for more details. //C- ------------------------------------------------------------------ #include "qtnpapi.h" extern "C" NPError NPP_New(NPMIMEType pluginType, NPP instance, uint16 mode, int16 argc, char* argn[], char* argv[], NPSavedData* saved); extern "C" NPError NPP_Destroy(NPP instance, NPSavedData** save); extern "C" NPError NPP_SetWindow(NPP instance, NPWindow* window); extern "C" NPError NPP_NewStream(NPP instance, NPMIMEType type, NPStream* stream, NPBool seekable, uint16* stype); extern "C" NPError NPP_DestroyStream(NPP instance, NPStream* stream, NPReason reason); extern "C" int32 NPP_WriteReady(NPP instance, NPStream* stream); extern "C" int32 NPP_Write(NPP instance, NPStream* stream, int32 offset, int32 len, void* buffer); extern "C" void NPP_StreamAsFile(NPP instance, NPStream* stream, const char* fname); extern "C" void NPP_Print(NPP instance, NPPrint* platformPrint); extern "C" int16 NPP_HandleEvent(NPP instance, NPEvent* event); extern "C" void NPP_URLNotify(NPP instance, const char* url, NPReason reason, void* notifyData); extern "C" NPError NPP_GetValue(NPP instance, NPPVariable variable, void *value); extern "C" NPError NPP_SetValue(NPP instance, NPPVariable variable, void *value); extern "C" void NPP_Shutdown(); #ifdef Q_WS_X11 extern "C" const char *NP_GetMIMEDescription(void); extern "C" NPError NP_GetValue(void*, NPPVariable aVariable, void *aValue); #endif djview4/npdjvu/npdjvu.plist000066400000000000000000000031531174072760700163400ustar00rootroot00000000000000 CFBundleDevelopmentRegion English CFBundleExecutable npdjvu CFBundleInfoDictionaryVersion 6.0 CFBundlePackageType BRPL CFBundleSignature DJVU CFBundleGetInfoString npdjvu - DjView4 browser plugin CSResourcesFileMapped WebPluginDescription The DjView browser plug-in WebPluginMIMETypes image/x-djvu WebPluginExtensions djvu djv WebPluginTypeDescription DjVu File image/x.djvu WebPluginTypeDescription DjVu File image/djvu WebPluginTypeDescription DjVu File image/x-dejavu WebPluginTypeDescription DjVu File (obsolete) image/x-iw44 WebPluginTypeDescription DjVu File (obsolete) image/vnd.djvu WebPluginTypeDescription DjVu File WebPluginName The DjView4 browser plugin djview4/npdjvu/npdjvu.pro000066400000000000000000000070321174072760700160050ustar00rootroot00000000000000#C- -*- shell-script -*- #C- ------------------------------------------------------------------- #C- DjView4 #C- Copyright (c) 2006 Leon Bottou #C- #C- This software is subject to, and may be distributed under, the #C- GNU General Public License. The license should have #C- accompanied the software or you may obtain a copy of the license #C- from the Free Software Foundation at http:#www.fsf.org . #C- #C- This program is distributed in the hope that it will be useful, #C- but WITHOUT ANY WARRANTY; without even the implied warranty of #C- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #C- GNU General Public License for more details. #C- ------------------------------------------------------------------ TARGET = npdjvu TEMPLATE = lib # ============ qtbrowserplugin code HEADERS += qtnpapi.h HEADERS += npdjvu.h HEADERS += qtbrowserplugin.h HEADERS += qtbrowserplugin_p.h SOURCES += qtnpapi.cpp SOURCES += npdjvu.cpp # ============ test for X11 win32 { contains(DEFINES,__USE_WS_X11__) { CONFIG += x11 } } else:mac { contains(DEFINES,__USE_WS_X11__) { CONFIG += x11 } } else { CONFIG += x11 } # ============ plugin stuff x11 { CONFIG += dll CONFIG += plugin SOURCES += qtbrowserplugin_x11.cpp } else:win32 { CONFIG += dll SOURCES += qtbrowserplugin_win.cpp RC_FILE = npdjvu.rc DEF_FILE += qtbrowserplugin.def LIBS += -luser32 } else:mac { CONFIG += dll CONFIG += plugin CONFIG += plugin_bundle SOURCES += qtbrowserplugin_mac.cpp REZ_FILES += npdjvu.r RESOURCES.path = Contents/Resources RESOURCES.files = npdjvu.rsrc QMAKE_BUNDLE_DATA += RESOURCES QMAKE_INFO_PLIST = npdjvu.plist } # ============ djview stuff CONFIG(autoconf) { # for use with autoconf DEFINES += AUTOCONF # Autoconf calls qmake with the following variables # LIBS += ... # QMAKE_CXXFLAGS += ... # QMAKE_CFLAGS += ... # QMAKE_LFLAGS += ... } else:unix:!macx { # for use under unix with pkgconfig CONFIG += link_pkgconfig PKGCONFIG += ddjvuapi } else { # for use on other platforms # LIBS += -ldjvulibre # QMAKE_CXXFLAGS += ... (c++ flags) # QMAKE_CFLAGS += ... (c flags) # QMAKE_LFLAGS += ... (link flags) # DEFINES += ... (definitions) } # -- config CONFIG += qt thread warn_on QT += network CONFIG(release,debug|release) { DEFINES += NDEBUG QT_NO_DEBUG QT_NO_DEBUG_STREAM } # -- djvu HEADERS += ../src/qdjvu.h HEADERS += ../src/qdjvuhttp.h HEADERS += ../src/qdjvuwidget.h SOURCES += ../src/qdjvu.cpp SOURCES += ../src/qdjvuhttp.cpp SOURCES += ../src/qdjvuwidget.cpp RESOURCES += ../src/qdjvuwidget.qrc # -- djview HEADERS += ../src/qdjviewprefs.h HEADERS += ../src/qdjviewsidebar.h HEADERS += ../src/qdjviewdialogs.h HEADERS += ../src/qdjviewexporters.h HEADERS += ../src/qdjview.h SOURCES += ../src/qdjviewprefs.cpp SOURCES += ../src/qdjviewsidebar.cpp SOURCES += ../src/qdjviewdialogs.cpp SOURCES += ../src/qdjviewexporters.cpp SOURCES += ../src/qdjview.cpp RESOURCES += ../src/qdjview.qrc FORMS += ../src/qdjviewerrordialog.ui FORMS += ../src/qdjviewinfodialog.ui FORMS += ../src/qdjviewmetadialog.ui FORMS += ../src/qdjviewsavedialog.ui FORMS += ../src/qdjviewprintdialog.ui FORMS += ../src/qdjviewexportdialog.ui FORMS += ../src/qdjviewexportps1.ui FORMS += ../src/qdjviewexportps2.ui FORMS += ../src/qdjviewexportps3.ui FORMS += ../src/qdjviewexporttiff.ui FORMS += ../src/qdjviewexportprn.ui FORMS += ../src/qdjviewprefsdialog.ui # -- helper files HEADERS += ../src/tiff2pdf.h SOURCES += ../src/tiff2pdf.c djview4/npdjvu/npdjvu.r000066400000000000000000000007061174072760700154470ustar00rootroot00000000000000#define SystemSevenOrLater 1 #include resource 'STR#' (127) {{ "DjVu File", "DjVu File", "DjVu File", "DjVu File (obsolete)", "DjVu File (obsolete)", "DjVu File" }}; resource 'STR#' (128) {{ "image/x-djvu", "djvu,djv", "image/x.djvu", "", "image/djvu", "", "image/x-dejavu", "", "image/x-iw44", "", "image/vnd.djvu", "" }}; resource 'STR#' (126) {{ "The DjView4 browser plugin" }}; djview4/npdjvu/npdjvu.rc000066400000000000000000000022511174072760700156070ustar00rootroot00000000000000 1 ICON DISCARDABLE "../src/images/DjVuApp.ico" 1 VERSIONINFO FILEVERSION 1,0,0,1 PRODUCTVERSION 1,0,0,1 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L #else FILEFLAGS 0x0L #endif FILEOS 0x4L FILETYPE 0x2L FILESUBTYPE 0x0L BEGIN BLOCK "StringFileInfo" BEGIN BLOCK "040904e4" BEGIN VALUE "Comments", "\0" VALUE "CompanyName", "\0" VALUE "FileDescription", "npdjvu\0" VALUE "FileOpenName", "DjVu File|DjVu File|DjVu File|DjVu File (obsolete)|DjVu File (obsolete)|DjVu File" VALUE "FileExtents", "djvu,djv|||||\0" VALUE "FileVersion", "1, 0, 0, 1\0" VALUE "InternalName", "npdjvu\0" VALUE "LegalCopyright", "\0" VALUE "LegalTrademarks", "\0" VALUE "MIMEType", "image/x-djvu|image/x.djvu|image/djvu|image/x-dejavu|image/x-iw44|image/vnd.djvu\0" VALUE "PrivateBuild", "\0" VALUE "ProductName", "DjView4 browser plugin\0" VALUE "ProductVersion", "1, 0, 0, 1\0" VALUE "SpecialBuild", "\0" END END BLOCK "VarFileInfo" BEGIN VALUE "Translation", 0x409, 1252 END END djview4/npdjvu/qtbrowserplugin.def000066400000000000000000000001201174072760700176730ustar00rootroot00000000000000EXPORTS NP_GetEntryPoints @1 NP_Initialize @2 NP_Shutdown @3 djview4/npdjvu/qtbrowserplugin.h000066400000000000000000000024351174072760700173770ustar00rootroot00000000000000//C- -*- C++ -*- //C- ------------------------------------------------------------------- //C- DjView4 //C- Copyright (c) 2009- Leon Bottou //C- //C- This software is subject to, and may be distributed under, the //C- GNU General Public License, either version 2 of the license, //C- or (at your option) any later version. The license should have //C- accompanied the software or you may obtain a copy of the license //C- from the Free Software Foundation at http://www.fsf.org . //C- //C- This program is distributed in the hope that it will be useful, //C- but WITHOUT ANY WARRANTY; without even the implied warranty of //C- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //C- GNU General Public License for more details. //C- ------------------------------------------------------------------ // Replacement for trolltech's main file #include #include #include #include #include #include "qtnpapi.h" extern "C" bool qtns_event(QtNPInstance*, NPEvent*); extern "C" void qtns_initialize(QtNPInstance* This); extern "C" void qtns_destroy(QtNPInstance* This); extern "C" void qtns_shutdown(void); extern "C" void qtns_embed(QtNPInstance *This); extern "C" void qtns_setGeometry(QtNPInstance *This, const QRect &rect, const QRect &); djview4/npdjvu/qtbrowserplugin_mac.cpp000066400000000000000000000455401174072760700205560ustar00rootroot00000000000000/**************************************************************************** ** ** Copyright (C) 2003-2008 Trolltech ASA. All rights reserved. ** ** This file is part of a Qt Solutions component. ** ** This file may be used under the terms of the GNU General Public ** License version 2.0 as published by the Free Software Foundation ** and appearing in the file LICENSE.GPL included in the packaging of ** this file. Please review the following information to ensure GNU ** General Public Licensing requirements will be met: ** http://www.trolltech.com/products/qt/opensource.html ** ** If you are unsure which license is appropriate for your use, please ** review the following information: ** http://www.trolltech.com/products/qt/licensing.html or contact the ** Trolltech sales department at sales@trolltech.com. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ** ****************************************************************************/ #include #include #include #include #include #include #include #include #include #include #include #include "qtnpapi.h" #include "qtbrowserplugin.h" #include "qtbrowserplugin_p.h" static bool ownsqapp = false; extern void qt_mac_set_native_menubar(bool b); const UInt32 kWidgetCreatorQt = 'cute'; enum { kWidgetPropertyQWidget = 'QWId' //QWidget * }; class QMacBrowserRoot : public QWidget { Q_OBJECT public: QMacBrowserRoot(HIViewRef root) : QWidget() { // make sure we're not registered with Qt before create WindowRef window = HIViewGetWindow(root); QWidget *oldwindow=0; OSErr err; err = GetWindowProperty(window, kWidgetCreatorQt, kWidgetPropertyQWidget, sizeof(oldwindow), 0, &oldwindow); if (err == noErr) RemoveWindowProperty(window, kWidgetCreatorQt, kWidgetPropertyQWidget); create((WId)root); // re-register the root window with Qt err = SetWindowProperty(window, kWidgetCreatorQt, kWidgetPropertyQWidget, sizeof(oldwindow), &oldwindow); if (err != noErr) { qWarning("Error, couldn't register Window with Qt: (%s:%d:%d)", __FILE__, __LINE__, err); } QPalette pal = palette(); pal.setColor(QPalette::Window,Qt::transparent); setPalette(pal); setAttribute(Qt::WA_WState_Polished); } ~QMacBrowserRoot() { } }; #include "qtbrowserplugin_mac.moc" struct key_sym { int mac_code; int qt_code; const char *desc; }; static key_sym modifier_syms[] = { { shiftKey, Qt::ShiftModifier, "Qt::ShiftModifier" }, { controlKey, Qt::MetaModifier, "Qt::MetaModifier" }, { rightControlKey, Qt::MetaModifier, "Qt::MetaModifier" }, { optionKey, Qt::AltModifier, "Qt::AltModifier" }, { rightOptionKey, Qt::AltModifier, "Qt::AltModifier" }, { cmdKey, Qt::ControlModifier, "Qt::ControlModifier" }, { 0, 0, NULL } }; static Qt::KeyboardModifiers get_modifiers(int key) { Qt::KeyboardModifiers ret = 0; for(int i = 0; modifier_syms[i].desc; i++) { if(key & modifier_syms[i].mac_code) { ret |= Qt::KeyboardModifier(modifier_syms[i].qt_code); } } return ret; } static key_sym key_syms[] = { { kHomeCharCode, Qt::Key_Home, "Qt::Home" }, { kEnterCharCode, Qt::Key_Enter, "Qt::Key_Enter" }, { kEndCharCode, Qt::Key_End, "Qt::Key_End" }, { kBackspaceCharCode, Qt::Key_Backspace, "Qt::Backspace" }, { kTabCharCode, Qt::Key_Tab, "Qt::Tab" }, { kPageUpCharCode, Qt::Key_PageUp, "Qt::PageUp" }, { kPageDownCharCode, Qt::Key_PageDown, "Qt::PageDown" }, { kReturnCharCode, Qt::Key_Return, "Qt::Key_Return" }, //function keys? { kEscapeCharCode, Qt::Key_Escape, "Qt::Key_Escape" }, { kLeftArrowCharCode, Qt::Key_Left, "Qt::Key_Left" }, { kRightArrowCharCode, Qt::Key_Right, "Qt::Key_Right" }, { kUpArrowCharCode, Qt::Key_Up, "Qt::Key_Up" }, { kDownArrowCharCode, Qt::Key_Down, "Qt::Key_Down" }, { kDeleteCharCode, Qt::Key_Delete, "Qt::Key_Delete" } }; static int get_key(int key) { for(int i = 0; key_syms[i].desc; i++) { if(key_syms[i].mac_code == key) { return key_syms[i].qt_code; } } return key; } struct qt_last_mouse_down_struct { unsigned int when; int x, y; } qt_last_mouse_down = { 0, 0, 0 }; //nasty, copied code - static void qt_dispatchEnterLeave(QWidget* enter, QWidget* leave) { #if 0 if(leave) { QEvent e(QEvent::Leave); QApplication::sendEvent(leave, & e); } if(enter) { QEvent e(QEvent::Enter); QApplication::sendEvent(enter, & e); } return; #endif QWidget* w ; if(!enter && !leave) return; QWidgetList leaveList; QWidgetList enterList; bool sameWindow = leave && enter && leave->window() == enter->window(); if(leave && !sameWindow) { w = leave; do { leaveList.append(w); } while(!w->isWindow() && (w = w->parentWidget())); } if(enter && !sameWindow) { w = enter; do { enterList.prepend(w); } while(!w->isWindow() && (w = w->parentWidget())); } if(sameWindow) { int enterDepth = 0; int leaveDepth = 0; w = enter; while(!w->isWindow() && (w = w->parentWidget())) enterDepth++; w = leave; while(!w->isWindow() && (w = w->parentWidget())) leaveDepth++; QWidget* wenter = enter; QWidget* wleave = leave; while(enterDepth > leaveDepth) { wenter = wenter->parentWidget(); enterDepth--; } while(leaveDepth > enterDepth) { wleave = wleave->parentWidget(); leaveDepth--; } while(!wenter->isWindow() && wenter != wleave) { wenter = wenter->parentWidget(); wleave = wleave->parentWidget(); } w = leave; while(w != wleave) { leaveList.append(w); w = w->parentWidget(); } w = enter; while(w != wenter) { enterList.prepend(w); w = w->parentWidget(); } } QEvent leaveEvent(QEvent::Leave); for (int i = 0; i < leaveList.size(); ++i) { w = leaveList.at(i); QApplication::sendEvent(w, &leaveEvent); #if 0 if(w->testAttribute(Qt::WA_Hover)) { Q_ASSERT(instance()); QHoverEvent he(QEvent::HoverLeave, QPoint(-1, -1), w->mapFromGlobal(QApplicationPrivate::instance()->hoverGlobalPos)); QApplication::sendEvent(w, &he); } #endif } QPoint posEnter = QCursor::pos(); QEvent enterEvent(QEvent::Enter); for (int i = 0; i < enterList.size(); ++i) { w = enterList.at(i); QApplication::sendEvent(w, &enterEvent); if(w->testAttribute(Qt::WA_Hover)) { QHoverEvent he(QEvent::HoverEnter, w->mapFromGlobal(posEnter), QPoint(-1, -1)); QApplication::sendEvent(w, &he); } } } extern "C" bool qtns_event(QtNPInstance *This, NPEvent *event) { static QPointer lastWidget; static QPointer qt_button_down; static Point lastPosition = { 0, 0 }; if(event->what == nullEvent || event->what == adjustCursorEvent) { if(event->what == nullEvent) { qApp->processEvents(); QApplication::sendPostedEvents(); } //watch for mouse moves Point currentPosition; GetMouse(¤tPosition); LocalToGlobal(¤tPosition); if(currentPosition.h != lastPosition.h || currentPosition.v != lastPosition.v) { lastPosition = currentPosition; WindowPtr wp; FindWindow(currentPosition, &wp); QWidget *widget = 0; if(wp == GetWindowFromPort((CGrafPtr)This->window->port)) widget = This->rootWidget->childAt(This->rootWidget->mapFromGlobal(QPoint(event->where.h, event->where.v))); else widget = QApplication::widgetAt(event->where.h, event->where.v); if(widget != lastWidget) { qt_dispatchEnterLeave(widget, lastWidget); lastWidget = widget; } if(widget) { QPoint p(currentPosition.h, currentPosition.v); QPoint plocal(widget->mapFromGlobal(p)); QMouseEvent qme(QEvent::MouseMove, plocal, p, Button() ? Qt::LeftButton : Qt::NoButton, 0, get_modifiers(GetCurrentKeyModifiers())); QApplication::sendEvent(widget, &qme); } } return true; } else if(QWidget *widget = qobject_cast(This->qt.object)) { if(event->what == updateEvt) { widget->repaint(); return true; } else if(event->what == keyUp || event->what == keyDown) { QWidget *widget = 0; if(QWidget::keyboardGrabber()) widget = QWidget::keyboardGrabber(); else if(QApplication::focusWidget()) widget = QApplication::focusWidget(); else //last ditch effort widget = QApplication::widgetAt(event->where.h, event->where.v); if(widget) { #if 0 if(app_do_modal && !qt_try_modal(widget, er)) return 1; #endif int mychar=get_key(event->message & charCodeMask); QEvent::Type etype = event->what == keyUp ? QEvent::KeyRelease : QEvent::KeyPress; QKeyEvent ke(etype, mychar, get_modifiers(event->modifiers), QString(QChar(mychar))); QApplication::sendEvent(widget,&ke); return true; } } else if(event->what == mouseDown || event->what == mouseUp) { QEvent::Type etype = QEvent::None; Qt::KeyboardModifiers keys = get_modifiers(event->modifiers); Qt::MouseButton button = Qt::LeftButton; if(event->what == mouseDown) { if (lastWidget) qt_button_down = lastWidget; //check if this is the second click, there must be a way to make the //mac do this for us, FIXME!! if(qt_last_mouse_down.when && (event->when - qt_last_mouse_down.when <= (uint)QApplication::doubleClickInterval())) { int x = event->where.h, y = event->where.v; if(x >= (qt_last_mouse_down.x-2) && x <= (qt_last_mouse_down.x+4) && y >= (qt_last_mouse_down.y-2) && y <= (qt_last_mouse_down.y+4)) { etype = QEvent::MouseButtonDblClick; qt_last_mouse_down.when = 0; } } if(etype == QEvent::None) { //guess it's just a press etype = QEvent::MouseButtonPress; qt_last_mouse_down.when = event->when; qt_last_mouse_down.x = event->where.h; qt_last_mouse_down.y = event->where.v; } } else { etype = QEvent::MouseButtonRelease; } WindowPtr wp; FindWindow(event->where, &wp); //handle popup's first QWidget *popupwidget = NULL; if(QApplication::activePopupWidget()) { if(wp) { QWidget *clt=QWidget::find((WId)wp); if(clt && clt->windowType() == Qt::Popup) popupwidget = clt; } if(!popupwidget) popupwidget = QApplication::activePopupWidget(); if(QWidget *child = popupwidget->childAt(popupwidget->mapFromGlobal(QPoint(event->where.h, event->where.v)))) popupwidget = child; QPoint p(event->where.h, event->where.v); QPoint plocal(popupwidget->mapFromGlobal(p)); QMouseEvent qme(etype, plocal, p, button, 0, keys); QApplication::sendEvent(popupwidget, &qme); } { QWidget *widget = 0; //figure out which widget to send it to if(event->what == mouseUp && qt_button_down) widget = qt_button_down; else if(QWidget::mouseGrabber()) widget = QWidget::mouseGrabber(); else if(wp == GetWindowFromPort((CGrafPtr)This->window->port)) widget = This->rootWidget->childAt(This->rootWidget->mapFromGlobal(QPoint(event->where.h, event->where.v))); else widget = QApplication::widgetAt(event->where.h, event->where.v); //setup the saved widget qt_button_down = event->what == mouseDown ? widget : 0; //finally send the event to the widget if its not the popup if(widget && widget != popupwidget) { #if 0 if(app_do_modal && !qt_try_modal(widget, er)) return 1; #endif if(event->what == mouseDown) { QWidget* w = widget; while(w->focusProxy()) w = w->focusProxy(); if(w->focusPolicy() & Qt::ClickFocus) w->setFocus(Qt::MouseFocusReason); if(QWidget *tlw = widget->topLevelWidget()) { tlw->raise(); if(tlw->isTopLevel() && tlw->windowType() != Qt::Popup && (tlw->isModal() || tlw->windowType() != Qt::Dialog)) QApplication::setActiveWindow(tlw); } } QPoint p(event->where.h, event->where.v); QPoint plocal(widget->mapFromGlobal( p )); QMouseEvent qme(etype, plocal, p, button, 0, keys); QApplication::sendEvent(widget, &qme); return true; } } } else { //qDebug("%d", event->what); } } return false; } extern "C" void qtns_initialize(QtNPInstance *) { qt_mac_set_native_menubar(false); if(!qApp) { ownsqapp = true; static int argc=0; static char **argv={ 0 }; (void)new QApplication(argc, argv); } } extern "C" void qtns_destroy(QtNPInstance *This) { delete This->rootWidget; This->rootWidget = 0; } extern "C" void qtns_shutdown() { if(!ownsqapp) return; // check if qApp still runs widgets (in other DLLs) QWidgetList widgets = qApp->allWidgets(); int count = widgets.count(); for (int w = 0; w < widgets.count(); ++w) { // ignore all Qt generated widgets QWidget *widget = widgets.at(w); if (widget->windowFlags() & Qt::Desktop) count--; } if (count) // qApp still used return; delete qApp; ownsqapp = false; } extern "C" void qtns_embed(QtNPInstance *This) { Q_ASSERT(qobject_cast(This->qt.object)); WindowPtr windowptr = GetWindowFromPort((CGrafPtr)This->window->port); HIViewRef root = 0; OSErr err; err = GetRootControl(windowptr,&root); if(!root) root = HIViewGetRoot(windowptr); if(!root) { qDebug("No window composition!"); } else { This->rootWidget = new QMacBrowserRoot(root); #if QT_VERSION >= 0x40400 // LYB 2009-3-10 This->qt.widget->setAttribute(Qt::WA_NativeWindow); #endif This->qt.widget->setParent(This->rootWidget); } } extern "C" void qtns_setGeometry(QtNPInstance *This, const QRect &rect, const QRect &clipRect) { Q_ASSERT(qobject_cast(This->qt.object)); WindowPtr windowptr = GetWindowFromPort((CGrafPtr)This->window->port); Rect content_r; GetWindowBounds(windowptr, kWindowContentRgn, &content_r); Rect structure_r; GetWindowBounds(windowptr, kWindowStructureRgn, &structure_r); QRect geom(rect.translated(content_r.left-structure_r.left, content_r.top-structure_r.top)); if(rect != clipRect) { QRegion clipRegion(QRect(clipRect.x()-geom.x(), clipRect.y()-geom.y(), clipRect.width(), clipRect.height()) .translated(content_r.left-structure_r.left, content_r.top-structure_r.top)); if(clipRegion.isEmpty()) clipRegion = QRegion(-1, -1, 1, 1); //eww ### FIXME This->qt.widget->setMask(clipRegion); } else { This->qt.widget->clearMask(); } This->qt.widget->setGeometry(geom); } #ifdef QTBROWSER_USE_CFM static bool qtbrowser_use_cfm = false; struct TVector_rec { ProcPtr fProcPtr; void *fTOC; }; void *CFMFunctionPointerForMachOFunctionPointer(void *inMachProcPtr) { if(!qtbrowser_use_cfm) return inMachProcPtr; TVector_rec *vTVector = (TVector_rec*)malloc(sizeof(TVector_rec)); if(MemError() == noErr && vTVector != 0) { vTVector->fProcPtr = (ProcPtr)inMachProcPtr; vTVector->fTOC = 0; // ignored } return((void *)vTVector); } void DisposeCFMFunctionPointer(void *inCfmProcPtr) { if(!qtbrowser_use_cfm) return; if(inCfmProcPtr) free(inCfmProcPtr); } void* MachOFunctionPointerForCFMFunctionPointer(void* inCfmProcPtr) { if(!qtbrowser_use_cfm) return inCfmProcPtr; static UInt32 gGlueTemplate[6] = { 0x3D800000, 0x618C0000, 0x800C0000, 0x804C0004, 0x7C0903A6, 0x4E800420 }; UInt32 *vMachProcPtr = (UInt32*)NewPtr(sizeof(gGlueTemplate)); vMachProcPtr[0] = gGlueTemplate[0] | ((UInt32)inCfmProcPtr >> 16); vMachProcPtr[1] = gGlueTemplate[1] | ((UInt32)inCfmProcPtr & 0xFFFF); vMachProcPtr[2] = gGlueTemplate[2]; vMachProcPtr[3] = gGlueTemplate[3]; vMachProcPtr[4] = gGlueTemplate[4]; vMachProcPtr[5] = gGlueTemplate[5]; MakeDataExecutable(vMachProcPtr, sizeof(gGlueTemplate)); return(vMachProcPtr); } #endif typedef void (*NPP_ShutdownUPP)(void); extern "C" void NPP_MacShutdown() { extern NPError NP_Shutdown(); NP_Shutdown(); } extern "C" int main(NPNetscapeFuncs *npn_funcs, NPPluginFuncs *np_funcs, NPP_ShutdownUPP *shutdown) { #ifdef QTBROWSER_USE_CFM qtbrowser_use_cfm = true; #endif NPError ret; extern NPError NP_Initialize(NPNetscapeFuncs*); if((ret=NP_Initialize(npn_funcs)) != NPERR_NO_ERROR) return ret; extern NPError NP_GetEntryPoints(NPPluginFuncs*); if((ret=NP_GetEntryPoints(np_funcs)) != NPERR_NO_ERROR) return ret; *shutdown = (NPP_ShutdownUPP)MAKE_FUNCTION_POINTER(NPP_MacShutdown); return NPERR_NO_ERROR; } djview4/npdjvu/qtbrowserplugin_p.h000066400000000000000000000053671174072760700177250ustar00rootroot00000000000000//C- -*- C++ -*- //C- ------------------------------------------------------------------- //C- DjView4 //C- Copyright (c) 2009- Leon Bottou //C- //C- This software is subject to, and may be distributed under, the //C- GNU General Public License, either version 2 of the license, //C- or (at your option) any later version. The license should have //C- accompanied the software or you may obtain a copy of the license //C- from the Free Software Foundation at http://www.fsf.org . //C- //C- This program is distributed in the hope that it will be useful, //C- but WITHOUT ANY WARRANTY; without even the implied warranty of //C- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //C- GNU General Public License for more details. //C- ------------------------------------------------------------------ /**************************************************************************** ** ** Copyright (C) 2003-2008 Trolltech ASA. All rights reserved. ** ** This file is part of a Qt Solutions component. ** ** This file may be used under the terms of the GNU General Public ** License version 2.0 as published by the Free Software Foundation ** and appearing in the file LICENSE.GPL included in the packaging of ** this file. Please review the following information to ensure GNU ** General Public Licensing requirements will be met: ** http://www.trolltech.com/products/qt/opensource.html ** ** If you are unsure which license is appropriate for your use, please ** review the following information: ** http://www.trolltech.com/products/qt/licensing.html or contact the ** Trolltech sales department at sales@trolltech.com. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ** ****************************************************************************/ #ifdef Q_WS_X11 # include # undef None #endif #include #include #include #include #include #include #include #include class QtNPStream; class QtNPForwarder; class QtNPInstance; class QtNPDocument; class QDjView; struct QtNPInstance { NPP npp; short fMode; #ifdef Q_WS_WIN typedef HWND Widget; #endif #ifdef Q_WS_X11 typedef Window Widget; Display *display; #endif #ifdef Q_WS_MAC typedef NPPort *Widget; QWidget *rootWidget; #endif Widget window; QRect geometry; union { QObject* object; QWidget* widget; } qt; // the following are npdjvu specific QUrl url; QStringList args; QByteArray savedData; QSet streams; QtNPForwarder *forwarder; QtNPDocument *document; QDjView *djview; NPObject *npobject; NPVariant onchange; }; djview4/npdjvu/qtbrowserplugin_win.cpp000066400000000000000000000135641174072760700206140ustar00rootroot00000000000000/**************************************************************************** ** ** Copyright (C) 2003-2008 Trolltech ASA. All rights reserved. ** ** This file is part of a Qt Solutions component. ** ** This file may be used under the terms of the GNU General Public ** License version 2.0 as published by the Free Software Foundation ** and appearing in the file LICENSE.GPL included in the packaging of ** this file. Please review the following information to ensure GNU ** General Public Licensing requirements will be met: ** http://www.trolltech.com/products/qt/opensource.html ** ** If you are unsure which license is appropriate for your use, please ** review the following information: ** http://www.trolltech.com/products/qt/licensing.html or contact the ** Trolltech sales department at sales@trolltech.com. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ** ****************************************************************************/ #include #include "qtbrowserplugin.h" #include "qtbrowserplugin_p.h" #include #include "qtnpapi.h" static HHOOK hhook = 0; static bool ownsqapp = false; Q_GUI_EXPORT int qt_translateKeyCode(int); LRESULT CALLBACK FilterProc( int nCode, WPARAM wParam, LPARAM lParam ) { if (qApp) qApp->sendPostedEvents(0, -1); if (nCode < 0 || !(wParam & PM_REMOVE)) return CallNextHookEx(hhook, nCode, wParam, lParam); MSG *msg = (MSG*)lParam; bool processed = false; // (some) support for key-sequences via QAction and QShortcut if(msg->message == WM_KEYDOWN || msg->message == WM_SYSKEYDOWN) { QWidget *focusWidget = QWidget::find(msg->hwnd); if (focusWidget) { int key = msg->wParam; if (!(key >= 'A' && key <= 'Z') && !(key >= '0' && key <= '9')) key = qt_translateKeyCode(msg->wParam); Qt::KeyboardModifiers modifiers = 0; int modifierKey = 0; if (GetKeyState(VK_SHIFT) < 0) { modifierKey |= Qt::SHIFT; modifiers |= Qt::ShiftModifier; } if (GetKeyState(VK_CONTROL) < 0) { modifierKey |= Qt::CTRL; modifiers |= Qt::ControlModifier; } if (GetKeyState(VK_MENU) < 0) { modifierKey |= Qt::ALT; modifiers |= Qt::AltModifier; } QKeyEvent override(QEvent::ShortcutOverride, key, modifiers); override.ignore(); QApplication::sendEvent(focusWidget, &override); processed = override.isAccepted(); QKeySequence shortcutKey(modifierKey + key); if (!processed) { QList actions = qFindChildren(focusWidget->window()); for (int i = 0; i < actions.count() && !processed; ++i) { QAction *action = actions.at(i); if (!action->isEnabled() || action->shortcut() != shortcutKey) continue; QShortcutEvent event(shortcutKey, 0); processed = QApplication::sendEvent(action, &event); } } if (!processed) { QList shortcuts = qFindChildren(focusWidget->window()); for (int i = 0; i < shortcuts.count() && !processed; ++i) { QShortcut *shortcut = shortcuts.at(i); if (!shortcut->isEnabled() || shortcut->key() != shortcutKey) continue; QShortcutEvent event(shortcutKey, shortcut->id()); processed = QApplication::sendEvent(shortcut, &event); } } } } return CallNextHookEx(hhook, nCode, wParam, lParam); } extern "C" bool qtns_event(QtNPInstance *, NPEvent *) { return false; } extern Q_CORE_EXPORT void qWinMsgHandler(QtMsgType t, const char* str); extern "C" void qtns_initialize(QtNPInstance*) { if (!qApp) { qInstallMsgHandler(qWinMsgHandler); ownsqapp = true; static int argc=0; static char **argv={ 0 }; (void)new QApplication(argc, argv); QT_WA({ hhook = SetWindowsHookExW( WH_GETMESSAGE, FilterProc, 0, GetCurrentThreadId() ); }, { hhook = SetWindowsHookExA( WH_GETMESSAGE, FilterProc, 0, GetCurrentThreadId() ); }); } } extern "C" void qtns_destroy(QtNPInstance *) { } extern "C" void qtns_shutdown() { if (!ownsqapp) return; // check if qApp still runs widgets (in other DLLs) QWidgetList widgets = qApp->allWidgets(); int count = widgets.count(); for (int w = 0; w < widgets.count(); ++w) { // ignore all Qt generated widgets QWidget *widget = widgets.at(w); if (widget->windowFlags() & Qt::Desktop) count--; } if (count) // qApp still used return; delete qApp; ownsqapp = false; if ( hhook ) UnhookWindowsHookEx( hhook ); hhook = 0; } extern "C" void qtns_embed(QtNPInstance *This) { Q_ASSERT(qobject_cast(This->qt.object)); LONG oldLong = GetWindowLong(This->window, GWL_STYLE); ::SetWindowLong(This->window, GWL_STYLE, oldLong | WS_CLIPCHILDREN | WS_CLIPSIBLINGS); ::SetWindowLong(This->qt.widget->winId(), GWL_STYLE, WS_CHILD | WS_CLIPCHILDREN | WS_CLIPSIBLINGS); ::SetParent(This->qt.widget->winId(), This->window); } extern "C" void qtns_setGeometry(QtNPInstance *This, const QRect &rect, const QRect &) { Q_ASSERT(qobject_cast(This->qt.object)); This->qt.widget->setGeometry(QRect(0, 0, rect.width(), rect.height())); } /* extern "C" void qtns_print(QtNPInstance * This, NPPrint *printInfo) { NPWindow* printWindow = &(printInfo->print.embedPrint.window); void* platformPrint = printInfo->print.embedPrint.platformPrint; // #### Nothing yet. } */ djview4/npdjvu/qtbrowserplugin_x11.cpp000066400000000000000000000076731174072760700204340ustar00rootroot00000000000000/**************************************************************************** ** ** Copyright (C) 2003-2008 Trolltech ASA. All rights reserved. ** ** This file is part of a Qt Solutions component. ** ** This file may be used under the terms of the GNU General Public ** License version 2.0 as published by the Free Software Foundation ** and appearing in the file LICENSE.GPL included in the packaging of ** this file. Please review the following information to ensure GNU ** General Public Licensing requirements will be met: ** http://www.trolltech.com/products/qt/opensource.html ** ** If you are unsure which license is appropriate for your use, please ** review the following information: ** http://www.trolltech.com/products/qt/licensing.html or contact the ** Trolltech sales department at sales@trolltech.com. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ** ****************************************************************************/ #include #include #include "qtbrowserplugin.h" #include "qtbrowserplugin_p.h" #include "qtnpapi.h" #include static bool ownsqapp = false; static QMap clients; extern "C" bool qtns_event(QtNPInstance *, NPEvent *) { return false; } extern "C" void qtns_initialize(QtNPInstance* This) { if (!qApp) { ownsqapp = true; static int argc = 0; static char **argv = {0}; // Workaround to avoid re-initilaziation of glib char* envvar = qstrdup("QT_NO_THREADED_GLIB=1"); // Unavoidable memory leak; the variable must survive plugin unloading ::putenv(envvar); (void)new QApplication(argc, argv); } if (!clients.contains(This)) { QX11EmbedWidget* client = new QX11EmbedWidget; QHBoxLayout* layout = new QHBoxLayout(client); layout->setMargin(0); clients.insert(This, client); } } extern "C" void qtns_destroy(QtNPInstance* This) { QMap::iterator it = clients.find(This); if (it == clients.end()) return; delete it.value(); clients.erase(it); } extern "C" void qtns_shutdown() { if (clients.count() > 0) { QMap::iterator it = clients.begin(); while (it != clients.end()) { delete it.value(); ++it; } clients.clear(); } if (!ownsqapp) return; // check if qApp still runs widgets (in other DLLs) QWidgetList widgets = qApp->allWidgets(); int count = widgets.count(); for (int w = 0; w < widgets.count(); ++w) { // ignore all Qt generated widgets QWidget *widget = widgets.at(w); if (widget->windowFlags() & Qt::Desktop) count--; } if (count) // qApp still used return; delete qApp; ownsqapp = false; } extern "C" void qtns_embed(QtNPInstance *This) { Q_ASSERT(qobject_cast(This->qt.object)); QMap::iterator it = clients.find(This); if (it == clients.end()) return; QX11EmbedWidget* client = it.value(); This->qt.widget->setParent(client); client->layout()->addWidget(This->qt.widget); client->embedInto(This->window); client->show(); } extern "C" void qtns_setGeometry(QtNPInstance *This, const QRect &rect, const QRect &) { Q_ASSERT(qobject_cast(This->qt.object)); QMap::iterator it = clients.find(This); if (it == clients.end()) return; QX11EmbedWidget* client = it.value(); client->setGeometry(QRect(0, 0, rect.width(), rect.height())); } /* extern "C" void qtns_print(QtNPInstance * This, NPPrint *printInfo) { NPWindow* printWindow = &(printInfo->print.embedPrint.window); void* platformPrint = printInfo->print.embedPrint.platformPrint; // #### Nothing yet. } */ djview4/npdjvu/qtnpapi.cpp000066400000000000000000000410231174072760700161330ustar00rootroot00000000000000//C- -*- C++ -*- //C- ------------------------------------------------------------------- //C- DjView4 //C- Copyright (c) 2009- Leon Bottou //C- //C- This software is subject to, and may be distributed under, the //C- GNU General Public License, either version 2 of the license, //C- or (at your option) any later version. The license should have //C- accompanied the software or you may obtain a copy of the license //C- from the Free Software Foundation at http://www.fsf.org . //C- //C- This program is distributed in the hope that it will be useful, //C- but WITHOUT ANY WARRANTY; without even the implied warranty of //C- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //C- GNU General Public License for more details. //C- ------------------------------------------------------------------ /**************************************************************************** ** ** Copyright (C) 2003-2008 Trolltech ASA. All rights reserved. ** ** This file is part of a Qt Solutions component. ** ** This file may be used under the terms of the GNU General Public ** License version 2.0 as published by the Free Software Foundation ** and appearing in the file LICENSE.GPL included in the packaging of ** this file. Please review the following information to ensure GNU ** General Public Licensing requirements will be met: ** http://www.trolltech.com/products/qt/opensource.html ** ** If you are unsure which license is appropriate for your use, please ** review the following information: ** http://www.trolltech.com/products/qt/licensing.html or contact the ** Trolltech sales department at sales@trolltech.com. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ** ****************************************************************************/ #include #include #include "qtbrowserplugin.h" #include "qtbrowserplugin_p.h" #include "npdjvu.h" #ifndef WINAPI # ifdef Q_WS_WIN # define WINAPI __stdcall # else # define WINAPI # endif #endif #ifdef Q_WS_X11 # ifdef Bool # undef Bool # endif #endif static NPNetscapeFuncs *qNetscapeFuncs = 0; static bool mozilla_has_npruntime = true; // NPN functions, forwarding to function pointers provided by browser void NPN_Version(int* plugin_major, int* plugin_minor, int* netscape_major, int* netscape_minor) { Q_ASSERT(qNetscapeFuncs); *plugin_major = NP_VERSION_MAJOR; *plugin_minor = NP_VERSION_MINOR; *netscape_major = qNetscapeFuncs->version >> 8; // Major version is in high byte *netscape_minor = qNetscapeFuncs->version & 0xFF; // Minor version is in low byte } #define NPN_Prolog(x) \ Q_ASSERT(qNetscapeFuncs); \ Q_ASSERT(qNetscapeFuncs->x); \ #define NPN_PrologRuntime(x, statement) \ Q_ASSERT(qNetscapeFuncs); \ if (! mozilla_has_npruntime) statement; \ Q_ASSERT(qNetscapeFuncs->x); const char * NPN_UserAgent(NPP instance) { NPN_Prolog(uagent); return FIND_FUNCTION_POINTER(NPN_UserAgentFP, qNetscapeFuncs->uagent)(instance); } void NPN_Status(NPP instance, const char* message) { NPN_Prolog(status); FIND_FUNCTION_POINTER(NPN_StatusFP, qNetscapeFuncs->status)(instance, message); } NPError NPN_GetURL(NPP instance, const char* url, const char* window) { NPN_Prolog(geturl); return FIND_FUNCTION_POINTER(NPN_GetURLFP, qNetscapeFuncs->geturl)(instance, url, window); } NPError NPN_GetURLNotify(NPP instance, const char* url, const char* window, void* notifyData) { if ((qNetscapeFuncs->version & 0xFF) < NPVERS_HAS_NOTIFICATION) return NPERR_INCOMPATIBLE_VERSION_ERROR; NPN_Prolog(geturlnotify); return FIND_FUNCTION_POINTER(NPN_GetURLNotifyFP, qNetscapeFuncs->geturlnotify)(instance, url, window, notifyData); } NPError NPN_PostURLNotify(NPP instance, const char* url, const char* window, uint32 len, const char* buf, NPBool file, void* notifyData) { if ((qNetscapeFuncs->version & 0xFF) < NPVERS_HAS_NOTIFICATION) return NPERR_INCOMPATIBLE_VERSION_ERROR; NPN_Prolog(posturlnotify); return FIND_FUNCTION_POINTER(NPN_PostURLNotifyFP, qNetscapeFuncs->posturlnotify)(instance, url, window, len, buf, file, notifyData); } void* NPN_MemAlloc(uint32 size) { NPN_Prolog(memalloc); return FIND_FUNCTION_POINTER(NPN_MemAllocFP, qNetscapeFuncs->memalloc)(size); } void NPN_MemFree(void* ptr) { NPN_Prolog(memfree); FIND_FUNCTION_POINTER(NPN_MemFreeFP, qNetscapeFuncs->memfree)(ptr); } uint32 NPN_MemFlush(uint32 size) { NPN_Prolog(memflush); return FIND_FUNCTION_POINTER(NPN_MemFlushFP, qNetscapeFuncs->memflush)(size); } NPError NPN_GetValue(NPP instance, NPNVariable variable, void *ret_value) { NPN_Prolog(getvalue); return FIND_FUNCTION_POINTER(NPN_GetValueFP, qNetscapeFuncs->getvalue)(instance, variable, ret_value); } NPError NPN_SetValue(NPP instance, NPPVariable variable, void *ret_value) { NPN_Prolog(setvalue); return FIND_FUNCTION_POINTER(NPN_SetValueFP, qNetscapeFuncs->setvalue)(instance, variable, ret_value); } NPIdentifier NPN_GetStringIdentifier(const char* name) { NPN_PrologRuntime(getstringidentifier, return 0); return FIND_FUNCTION_POINTER(NPN_GetStringIdentifierFP, qNetscapeFuncs->getstringidentifier)(name); } void NPN_GetStringIdentifiers(const char** names, int32 nameCount, NPIdentifier* identifiers) { NPN_PrologRuntime(getstringidentifiers, return); FIND_FUNCTION_POINTER(NPN_GetStringIdentifiersFP, qNetscapeFuncs->getstringidentifiers)(names, nameCount, identifiers); } NPIdentifier NPN_GetIntIdentifier(int32 intid) { NPN_PrologRuntime(getintidentifier, return 0); return FIND_FUNCTION_POINTER(NPN_GetIntIdentifierFP, qNetscapeFuncs->getintidentifier)(intid); } bool NPN_IdentifierIsString(NPIdentifier identifier) { NPN_PrologRuntime(identifierisstring, return false); return FIND_FUNCTION_POINTER(NPN_IdentifierIsStringFP, qNetscapeFuncs->identifierisstring)(identifier); } char* NPN_UTF8FromIdentifier(NPIdentifier identifier) { NPN_PrologRuntime(utf8fromidentifier, return 0); return FIND_FUNCTION_POINTER(NPN_UTF8FromIdentifierFP, qNetscapeFuncs->utf8fromidentifier)(identifier); } int32 NPN_IntFromIdentifier(NPIdentifier identifier) { NPN_PrologRuntime(intfromidentifier, return 0); return FIND_FUNCTION_POINTER(NPN_IntFromIdentifierFP, qNetscapeFuncs->intfromidentifier)(identifier); } NPObject* NPN_CreateObject(NPP npp, NPClass *aClass) { NPN_PrologRuntime(createobject, return 0); return FIND_FUNCTION_POINTER(NPN_CreateObjectFP, qNetscapeFuncs->createobject)(npp, aClass); } NPObject* NPN_RetainObject(NPObject *obj) { NPN_PrologRuntime(retainobject, return obj); return FIND_FUNCTION_POINTER(NPN_RetainObjectFP, qNetscapeFuncs->retainobject)(obj); } void NPN_ReleaseObject(NPObject *obj) { NPN_PrologRuntime(releaseobject, return); FIND_FUNCTION_POINTER(NPN_ReleaseObjectFP, qNetscapeFuncs->releaseobject)(obj); } bool NPN_Invoke(NPP npp, NPObject* obj, NPIdentifier methodName, const NPVariant *args, int32 argCount, NPVariant *result) { NPN_PrologRuntime(invoke, return false); return FIND_FUNCTION_POINTER(NPN_InvokeFP, qNetscapeFuncs->invoke)(npp, obj, methodName, args, argCount, result); } bool NPN_InvokeDefault(NPP npp, NPObject* obj, const NPVariant *args, int32 argCount, NPVariant *result) { NPN_PrologRuntime(invokedefault, return false); return FIND_FUNCTION_POINTER(NPN_InvokeDefaultFP, qNetscapeFuncs->invokedefault)(npp, obj, args, argCount, result); } bool NPN_Evaluate(NPP npp, NPObject *obj, NPString *script, NPVariant *result) { NPN_PrologRuntime(evaluate, return false); return FIND_FUNCTION_POINTER(NPN_EvaluateFP, qNetscapeFuncs->evaluate)(npp, obj, script, result); } bool NPN_GetProperty(NPP npp, NPObject *obj, NPIdentifier propertyName, NPVariant *result) { NPN_PrologRuntime(getproperty, return false); return FIND_FUNCTION_POINTER(NPN_GetPropertyFP, qNetscapeFuncs->getproperty)(npp, obj, propertyName, result); } bool NPN_SetProperty(NPP npp, NPObject *obj, NPIdentifier propertyName, const NPVariant *value) { NPN_PrologRuntime(setproperty, return false); return FIND_FUNCTION_POINTER(NPN_SetPropertyFP, qNetscapeFuncs->setproperty)(npp, obj, propertyName, value); } bool NPN_RemoveProperty(NPP npp, NPObject *obj, NPIdentifier propertyName) { NPN_PrologRuntime(removeproperty, return false); return FIND_FUNCTION_POINTER(NPN_RemovePropertyFP, qNetscapeFuncs->removeproperty)(npp, obj, propertyName); } bool NPN_HasProperty(NPP npp, NPObject *obj, NPIdentifier propertyName) { NPN_PrologRuntime(hasproperty, return false); return FIND_FUNCTION_POINTER(NPN_HasPropertyFP, qNetscapeFuncs->hasproperty)(npp, obj, propertyName); } bool NPN_HasMethod(NPP npp, NPObject *obj, NPIdentifier methodName) { NPN_PrologRuntime(hasmethod, return false); return FIND_FUNCTION_POINTER(NPN_HasMethodFP, qNetscapeFuncs->hasmethod)(npp, obj, methodName); } void NPN_ReleaseVariantValue(NPVariant *variant) { NPN_PrologRuntime(releasevariantvalue, return); FIND_FUNCTION_POINTER(NPN_ReleaseVariantValueFP, qNetscapeFuncs->releasevariantvalue)(variant); } void NPN_SetException(NPObject *obj, const char *message) { qDebug("NPN_SetException: %s", message); NPN_PrologRuntime(setexception, return); FIND_FUNCTION_POINTER(NPN_SetExceptionFP, qNetscapeFuncs->setexception)(obj, message); } // Type conversions NPString NPString::fromQString(const QString &qstr) { NPString npstring; const QByteArray qutf8 = qstr.toUtf8(); npstring.utf8length = qutf8.length(); npstring.utf8characters = (char*)NPN_MemAlloc(npstring.utf8length); memcpy((char*)npstring.utf8characters, qutf8.constData(), npstring.utf8length); return npstring; } NPString::operator QString() const { return QString::fromUtf8(utf8characters, utf8length); } NPVariant NPVariant::fromQVariant(QtNPInstance*, const QVariant &qvariant) { NPVariant npvar; npvar.type = Null; QVariant qvar(qvariant); switch(qvariant.type()) { case QVariant::Bool: npvar.value.boolValue = qvar.toBool(); npvar.type = Boolean; break; case QVariant::Int: npvar.value.intValue = qvar.toInt(); npvar.type = Int32; break; case QVariant::Double: npvar.value.doubleValue = qvar.toDouble(); npvar.type = Double; break; default: // including QVariant::String if (!qvar.convert(QVariant::String)) break; npvar.type = String; npvar.value.stringValue = NPString::fromQString(qvar.toString()); break; } return npvar; } NPVariant::operator QVariant() const { switch(type) { case Void: case Null: return QVariant(); case Boolean: return value.boolValue; case Int32: return value.intValue; case Double: return value.doubleValue; case String: return QString(value.stringValue); default: break; } return QVariant(); } static void NPClass_Invalidate(NPObject *npobj) { if (npobj) delete npobj->_class; npobj->_class = 0; } static bool NPClass_HasMethod(NPObject*, NPIdentifier) { return false; } static bool NPClass_Invoke(NPObject*, NPIdentifier, const NPVariant*, uint32, NPVariant*) { return false; } static bool NPClass_InvokeDefault(NPObject*, const NPVariant*, uint32, NPVariant*) { return false; } static bool NPClass_HasProperty(NPObject*, NPIdentifier) { return false; } static bool NPClass_GetProperty(NPObject*, NPIdentifier, NPVariant*) { return false; } static bool NPClass_SetProperty(NPObject*, NPIdentifier, const NPVariant*) { return false; } static bool NPClass_RemoveProperty(NPObject *npobj, NPIdentifier name) { NPVariant var; return NPClass_SetProperty(npobj, name, &var); } NPClass::NPClass(QtNPInstance *This) { structVersion = NP_CLASS_STRUCT_VERSION; allocate = 0; deallocate = 0; invalidate = NPClass_Invalidate; hasMethod = NPClass_HasMethod; invoke = NPClass_Invoke; invokeDefault = NPClass_InvokeDefault; hasProperty = NPClass_HasProperty; getProperty = NPClass_GetProperty; setProperty = NPClass_SetProperty; removeProperty = NPClass_RemoveProperty; qtnp = This; delete_qtnp = false; } NPClass::~NPClass() { if (delete_qtnp) delete qtnp; } // Fills in functiontable used by browser to call entry points in plugin. extern "C" NPError WINAPI NP_GetEntryPoints(NPPluginFuncs* pFuncs) { if(!pFuncs) return NPERR_INVALID_FUNCTABLE_ERROR; if(!pFuncs->size) pFuncs->size = sizeof(NPPluginFuncs); else if (pFuncs->size < sizeof(NPPluginFuncs)) return NPERR_INVALID_FUNCTABLE_ERROR; pFuncs->version = (NP_VERSION_MAJOR << 8) | NP_VERSION_MINOR; pFuncs->newp = MAKE_FUNCTION_POINTER(NPP_New); pFuncs->destroy = MAKE_FUNCTION_POINTER(NPP_Destroy); pFuncs->setwindow = MAKE_FUNCTION_POINTER(NPP_SetWindow); pFuncs->newstream = MAKE_FUNCTION_POINTER(NPP_NewStream); pFuncs->destroystream = MAKE_FUNCTION_POINTER(NPP_DestroyStream); pFuncs->asfile = MAKE_FUNCTION_POINTER(NPP_StreamAsFile); pFuncs->writeready = MAKE_FUNCTION_POINTER(NPP_WriteReady); pFuncs->write = MAKE_FUNCTION_POINTER(NPP_Write); pFuncs->print = MAKE_FUNCTION_POINTER(NPP_Print); pFuncs->event = MAKE_FUNCTION_POINTER(NPP_HandleEvent); pFuncs->urlnotify = MAKE_FUNCTION_POINTER(NPP_URLNotify); pFuncs->javaClass = 0; pFuncs->getvalue = MAKE_FUNCTION_POINTER(NPP_GetValue); pFuncs->setvalue = MAKE_FUNCTION_POINTER(NPP_SetValue); return NPERR_NO_ERROR; } #ifndef Q_WS_X11 extern "C" NPError WINAPI NP_Initialize(NPNetscapeFuncs* pFuncs) { if(!pFuncs) return NPERR_INVALID_FUNCTABLE_ERROR; qNetscapeFuncs = pFuncs; int navMajorVers = qNetscapeFuncs->version >> 8; int navMinorVers = qNetscapeFuncs->version & 0xff; // if the plugin's major version is lower than the Navigator's, // then they are incompatible, and should return an error if(navMajorVers > NP_VERSION_MAJOR) return NPERR_INCOMPATIBLE_VERSION_ERROR; // checks if browser supports npruntime mozilla_has_npruntime = true; if (navMajorVers == 0 && navMinorVers < 14) mozilla_has_npruntime = false; if (qNetscapeFuncs->size < (long)&(((NPNetscapeFuncs*)0)->setexception)) mozilla_has_npruntime = false; return NPERR_NO_ERROR; } #else extern "C" NPError WINAPI NP_Initialize(NPNetscapeFuncs* nFuncs, NPPluginFuncs* pFuncs) { if(!nFuncs) return NPERR_INVALID_FUNCTABLE_ERROR; qNetscapeFuncs = nFuncs; int navMajorVers = qNetscapeFuncs->version >> 8; int navMinorVers = qNetscapeFuncs->version & 0xff; // if the plugin's major version is lower than the Navigator's, // then they are incompatible, and should return an error if(navMajorVers > NP_VERSION_MAJOR) return NPERR_INCOMPATIBLE_VERSION_ERROR; // checks if browser supports npruntime mozilla_has_npruntime = true; if (navMajorVers == 0 && navMinorVers < 14) mozilla_has_npruntime = false; if (qNetscapeFuncs->size < (long)&(((NPNetscapeFuncs*)0)->setexception)) mozilla_has_npruntime = false; // check if the Browser supports the XEmbed protocol int supportsXEmbed = 0; NPError err = NPN_GetValue(0, NPNVSupportsXEmbedBool, (void *)&supportsXEmbed); if (err != NPERR_NO_ERROR ||!supportsXEmbed) return NPERR_INCOMPATIBLE_VERSION_ERROR; return NP_GetEntryPoints(pFuncs); } #endif extern "C" NPError WINAPI NP_Shutdown() { NPP_Shutdown(); qtns_shutdown(); qNetscapeFuncs = 0; return NPERR_NO_ERROR; } djview4/npdjvu/qtnpapi.h000066400000000000000000000477561174072760700156230ustar00rootroot00000000000000/**************************************************************************** ** ** Copyright (C) 2003-2008 Trolltech ASA. All rights reserved. ** ** This file is part of a Qt Solutions component. ** ** This file may be used under the terms of the GNU General Public ** License version 2.0 as published by the Free Software Foundation ** and appearing in the file LICENSE.GPL included in the packaging of ** this file. Please review the following information to ensure GNU ** General Public Licensing requirements will be met: ** http://www.trolltech.com/products/qt/opensource.html ** ** If you are unsure which license is appropriate for your use, please ** review the following information: ** http://www.trolltech.com/products/qt/licensing.html or contact the ** Trolltech sales department at sales@trolltech.com. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ** ****************************************************************************/ // see http://www.mozilla.org/projects/plugins/ for details regarding the structs and API prototypes #ifndef QTNPAPI_H #define QTNPAPI_H // Plugin API version #define NP_VERSION_MAJOR 0 #define NP_VERSION_MINOR 17 // basic types typedef unsigned short uint16; typedef short int16; typedef unsigned int uint32; typedef int int32; typedef unsigned char NPBool; typedef int16 NPError; typedef int16 NPReason; typedef char* NPMIMEType; typedef void *NPRegion; typedef void *NPIdentifier; // Java stuff typedef void* jref; typedef void* JRIGlobalRef; typedef void* JRIEnv; // ### not quite correct, but we don't use it anyway // NP-types struct NPP_t { void* pdata; // plug-in private data void* ndata; // browser private data }; typedef NPP_t* NPP; struct NPRect { uint16 top; uint16 left; uint16 bottom; uint16 right; }; #ifdef Q_WS_WIN struct NPEvent { uint16 event; uint32 wParam; uint32 lParam; }; #elif defined(Q_WS_X11) # include typedef XEvent NPEvent; #elif defined (Q_WS_MAC) typedef struct EventRecord NPEvent; #endif // Variable names for NPP_GetValue enum NPPVariable { NPPVpluginNameString = 1, NPPVpluginDescriptionString, NPPVpluginWindowBool, NPPVpluginTransparentBool, NPPVjavaClass, NPPVpluginWindowSize, NPPVpluginTimerInterval, NPPVpluginScriptableInstance = 10, NPPVpluginScriptableIID = 11, // Introduced in Mozilla 0.9.9 NPPVjavascriptPushCallerBool = 12, // Introduced in Mozilla 1.0 NPPVpluginKeepLibraryInMemory = 13, NPPVpluginNeedsXEmbed = 14, // Introduced in Firefox 1.0 NPPVpluginScriptableNPObject = 15, NPPVformValue = 16 } ; // Variable names for NPN_GetValue enum NPNVariable { NPNVxDisplay = 1, NPNVxtAppContext, NPNVnetscapeWindow, NPNVjavascriptEnabledBool, NPNVasdEnabledBool, NPNVisOfflineBool, // Introduced in Mozilla 0.9.4 NPNVserviceManager = 10, NPNVDOMElement = 11, // Introduced in Mozilla 1.2 NPNVDOMWindow = 12, NPNVToolkit = 13, NPNVSupportsXEmbedBool = 14, NPNVWindowNPObject = 15, NPNVPluginElementNPObject = 16 }; enum NPWindowType { NPWindowTypeWindow = 1, // Windowed plug-in. The window field holds a platform-specific handle to a window. NPWindowTypeDrawable // Windows: HDC; Mac OS: pointer to NP_Port structure. }; struct NPWindow { // Platform-specific handle to a native window element in the browser's window hierarchy // XEmbed: "In the NPP_SetWindow call, the window parameter will be the XID of the hosting // XEmbed window. As an implementation note, this is really the XID of a GtkSocket window." void* window; // The x and y coordinates for the top left corner of the plug-in relative to the page // (and thus relative to the origin of the drawable) uint32 x, y; // The height and width of the plug-in area. Should not be modified by the plug-in. uint32 width, height; // Used by MAC only (Clipping rectangle in port coordinates) NPRect clipRect; #ifdef Q_WS_X11 // Contains information about the plug-in's Unix window environment // points to an NPSetWindowCallbackStruct void* ws_info; // probably obsolete with XEmbed #endif // The type field indicates the NPWindow type of the target area NPWindowType type; }; struct NPPort { void *port; int32 portx; int32 porty; }; struct NPFullPrint { NPBool pluginPrinted; // true if plugin handled fullscreen printing NPBool printOne; // true if plugin should print one copy to default printer void* platformPrint; // Platform-specific printing info }; struct NPEmbedPrint { NPWindow window; void* platformPrint; // Platform-specific printing info }; struct NPPrint { uint16 mode; // NP_FULL or NP_EMBED union { NPFullPrint fullPrint; NPEmbedPrint embedPrint; } print; }; struct NPSavedData { int32 len; void* buf; }; struct NPStream { void* pdata; void* ndata; const char* url; uint32 end; uint32 lastmodified; void* notifyData; }; struct NPByteRange { int32 offset; // negative offset means from the end uint32 length; NPByteRange* next; }; // Values for mode passed to NPP_New: #define NP_EMBED 1 #define NP_FULL 2 // Values for stream type passed to NPP_NewStream: #define NP_NORMAL 1 #define NP_SEEK 2 #define NP_ASFILE 3 #define NP_ASFILEONLY 4 #define NP_MAXREADY (((unsigned)(~0)<<1)>>1) // Values of type NPError: #define NPERR_NO_ERROR 0 #define NPERR_GENERIC_ERROR 1 #define NPERR_INVALID_INSTANCE_ERROR 2 #define NPERR_INVALID_FUNCTABLE_ERROR 3 #define NPERR_MODULE_LOAD_FAILED_ERROR 4 #define NPERR_OUT_OF_MEMORY_ERROR 5 #define NPERR_INVALID_PLUGIN_ERROR 6 #define NPERR_INVALID_PLUGIN_DIR_ERROR 7 #define NPERR_INCOMPATIBLE_VERSION_ERROR 8 #define NPERR_INVALID_PARAM 9 #define NPERR_INVALID_URL 10 #define NPERR_FILE_NOT_FOUND 11 #define NPERR_NO_DATA 12 #define NPERR_STREAM_NOT_SEEKABLE 13 // Values of type NPReason: #define NPRES_DONE 0 #define NPRES_NETWORK_ERR 1 #define NPRES_USER_BREAK 2 // Version feature information #define NPVERS_HAS_STREAMOUTPUT 8 #define NPVERS_HAS_NOTIFICATION 9 #define NPVERS_HAS_LIVECONNECT 9 #define NPVERS_WIN16_HAS_LIVECONNECT 10 // Mac specifics #ifdef Q_WS_MAC # define getFocusEvent (osEvt + 16) # define loseFocusEvent (osEvt + 17) # define adjustCursorEvent (osEvt + 18) # if defined(__ppc__) || defined(__powerpc__) // LYB 2009-03-10 # define QTBROWSER_USE_CFM # endif #endif #ifdef QTBROWSER_USE_CFM extern void *CFMFunctionPointerForMachOFunctionPointer(void*); extern void DisposeCFMFunctionPointer(void *); extern void* MachOFunctionPointerForCFMFunctionPointer(void*); # define FUNCTION_POINTER(t) void* # define MAKE_FUNCTION_POINTER(f) CFMFunctionPointerForMachOFunctionPointer((void*)f) # define DESTROY_FUNCTION_POINTER(n) DisposeCFMFunctionPointer(n) # define FIND_FUNCTION_POINTER(t, n) (*(t)MachOFunctionPointerForCFMFunctionPointer(n)) #else # define FUNCTION_POINTER(t) t # define MAKE_FUNCTION_POINTER(f) f # define DESTROY_FUNCTION_POINTER(n) # define FIND_FUNCTION_POINTER(t, n) (*n) #endif // Plugin function prototypes typedef NPError (*NPP_NewFP)(NPMIMEType pluginType, NPP instance, uint16 mode, int16 argc, char* argn[], char* argv[], NPSavedData* saved); typedef NPError (*NPP_DestroyFP)(NPP instance, NPSavedData** save); typedef NPError (*NPP_SetWindowFP)(NPP instance, NPWindow* window); typedef NPError (*NPP_NewStreamFP)(NPP instance, NPMIMEType type, NPStream* stream, NPBool seekable, uint16* stype); typedef NPError (*NPP_DestroyStreamFP)(NPP instance, NPStream* stream, NPReason reason); typedef void (*NPP_StreamAsFileFP)(NPP instance, NPStream* stream, const char* fname); typedef int32 (*NPP_WriteReadyFP)(NPP instance, NPStream* stream); typedef int32 (*NPP_WriteFP)(NPP instance, NPStream* stream, int32 offset, int32 len, void* buffer); typedef void (*NPP_PrintFP)(NPP instance, NPPrint* platformPrint); typedef int16 (*NPP_HandleEventFP)(NPP instance, NPEvent* event); typedef void (*NPP_URLNotifyFP)(NPP instance, const char* url, NPReason reason, void* notifyData); typedef NPError (*NPP_GetValueFP)(NPP instance, NPPVariable variable, void *value); typedef NPError (*NPP_SetValueFP)(NPP instance, NPPVariable variable, void *value); // table of functions implemented by the plugin struct NPPluginFuncs { uint16 size; uint16 version; FUNCTION_POINTER(NPP_NewFP) newp; FUNCTION_POINTER(NPP_DestroyFP) destroy; FUNCTION_POINTER(NPP_SetWindowFP) setwindow; FUNCTION_POINTER(NPP_NewStreamFP) newstream; FUNCTION_POINTER(NPP_DestroyStreamFP) destroystream; FUNCTION_POINTER(NPP_StreamAsFileFP) asfile; FUNCTION_POINTER(NPP_WriteReadyFP) writeready; FUNCTION_POINTER(NPP_WriteFP) write; FUNCTION_POINTER(NPP_PrintFP) print; FUNCTION_POINTER(NPP_HandleEventFP) event; FUNCTION_POINTER(NPP_URLNotifyFP) urlnotify; JRIGlobalRef javaClass; FUNCTION_POINTER(NPP_GetValueFP) getvalue; FUNCTION_POINTER(NPP_SetValueFP) setvalue; } ; // forward declarations struct NPObject; struct NPClass; struct NPVariant; struct NPString; struct QtNPInstance; // NPObject is the type used to express objects exposed by either // the plugin or by the browser. Implementation specific (i.e. plugin // specific, or browser specific) members can come after the struct. // In our case, the plugin specific member (aka QObject) lives in NPClass. struct NPObject { NPClass *_class; uint32 refCount; }; // NPClass is what virtual function tables would look like if // there was no C++... typedef NPObject *(*NPAllocateFP)(NPP npp, NPClass *aClass); typedef void (*NPDeallocateFP)(NPObject *npobj); typedef void (*NPInvalidateFP)(NPObject *npobj); typedef bool (*NPHasMethodFP)(NPObject *npobj, NPIdentifier name); typedef bool (*NPInvokeFP)(NPObject *npobj, NPIdentifier name,const NPVariant *args, uint32 argCount,NPVariant *result); typedef bool (*NPInvokeDefaultFP)(NPObject *npobj,const NPVariant *args,uint32 argCount,NPVariant *result); typedef bool (*NPHasPropertyFP)(NPObject *npobj, NPIdentifier name); typedef bool (*NPGetPropertyFP)(NPObject *npobj, NPIdentifier name, NPVariant *result); typedef bool (*NPSetPropertyFP)(NPObject *npobj, NPIdentifier name, const NPVariant *value); typedef bool (*NPRemovePropertyFP)(NPObject *npobj, NPIdentifier name); #define NP_CLASS_STRUCT_VERSION 1 struct NPClass { NPClass(QtNPInstance *qtnp); ~NPClass(); // NP API uint32 structVersion; NPAllocateFP allocate; NPDeallocateFP deallocate; NPInvalidateFP invalidate; NPHasMethodFP hasMethod; NPInvokeFP invoke; NPInvokeDefaultFP invokeDefault; NPHasPropertyFP hasProperty; NPGetPropertyFP getProperty; NPSetPropertyFP setProperty; NPRemovePropertyFP removeProperty; // User data lives here QtNPInstance *qtnp; bool delete_qtnp; }; struct NPString { const char *utf8characters; uint32 utf8length; // Qt specific conversion routines // (no c'tor as it would be misleading that there is no d'tor in spite of memory allocation) static NPString fromQString(const QString &qstr); operator QString() const; }; struct NPVariant { enum Type { Void, Null, Boolean, Int32, Double, String, Object }; Type type; union { bool boolValue; uint32 intValue; double doubleValue; NPString stringValue; NPObject *objectValue; } value; NPVariant() : type(Null) {} // Qt specific conversion routines // (no c'tor as the NPP instance is required) static NPVariant fromQVariant(QtNPInstance *This, const QVariant &qvariant); operator QVariant() const; private: }; #ifdef Q_WS_X11 extern "C" { #endif // Browser function prototypes typedef NPError (*NPN_GetURLFP)(NPP instance, const char* url, const char* window); typedef NPError (*NPN_PostURLFP)(NPP instance, const char* url, const char* window, uint32 len, const char* buf, NPBool file); typedef NPError (*NPN_RequestReadFP)(NPStream* stream, NPByteRange* rangeList); typedef NPError (*NPN_NewStreamFP)(NPP instance, NPMIMEType type, const char* window, NPStream** stream); typedef int32 (*NPN_WriteFP)(NPP instance, NPStream* stream, int32 len, void* buffer); typedef NPError (*NPN_DestroyStreamFP)(NPP instance, NPStream* stream, NPReason reason); typedef void (*NPN_StatusFP)(NPP instance, const char* message); typedef const char* (*NPN_UserAgentFP)(NPP instance); typedef void* (*NPN_MemAllocFP)(uint32 size); typedef void (*NPN_MemFreeFP)(void* ptr); typedef uint32 (*NPN_MemFlushFP)(uint32 size); typedef void (*NPN_ReloadPluginsFP)(NPBool reloadPages); typedef JRIEnv* (*NPN_GetJavaEnvFP)(void); typedef jref (*NPN_GetJavaPeerFP)(NPP instance); typedef NPError (*NPN_GetURLNotifyFP)(NPP instance, const char* url, const char* window, void* notifyData); typedef NPError (*NPN_PostURLNotifyFP)(NPP instance, const char* url, const char* window, uint32 len, const char* buf, NPBool file, void* notifyData); typedef NPError (*NPN_GetValueFP)(NPP instance, NPNVariable variable, void *ret_value); typedef NPError (*NPN_SetValueFP)(NPP instance, NPPVariable variable, void *ret_value); typedef void (*NPN_InvalidateRectFP)(NPP instance, NPRect *rect); typedef void (*NPN_InvalidateRegionFP)(NPP instance, NPRegion *region); typedef void (*NPN_ForceRedrawFP)(NPP instance); typedef NPIdentifier (*NPN_GetStringIdentifierFP)(const char* name); typedef void (*NPN_GetStringIdentifiersFP)(const char** names, int32 nameCount, NPIdentifier* identifiers); typedef NPIdentifier (*NPN_GetIntIdentifierFP)(int32 intid); typedef bool (*NPN_IdentifierIsStringFP)(NPIdentifier identifier); typedef char* (*NPN_UTF8FromIdentifierFP)(NPIdentifier identifier); typedef int32 (*NPN_IntFromIdentifierFP)(NPIdentifier identifier); typedef NPObject* (*NPN_CreateObjectFP)(NPP npp, NPClass *aClass); typedef NPObject* (*NPN_RetainObjectFP)(NPObject *obj); typedef void (*NPN_ReleaseObjectFP)(NPObject *obj); typedef bool (*NPN_InvokeFP)(NPP npp, NPObject* obj, NPIdentifier methodName, const NPVariant *args, int32 argCount, NPVariant *result); typedef bool (*NPN_InvokeDefaultFP)(NPP npp, NPObject* obj, const NPVariant *args, int32 argCount, NPVariant *result); typedef bool (*NPN_EvaluateFP)(NPP npp, NPObject *obj, NPString *script, NPVariant *result); typedef bool (*NPN_GetPropertyFP)(NPP npp, NPObject *obj, NPIdentifier propertyName, NPVariant *result); typedef bool (*NPN_SetPropertyFP)(NPP npp, NPObject *obj, NPIdentifier propertyName, const NPVariant *value); typedef bool (*NPN_RemovePropertyFP)(NPP npp, NPObject *obj, NPIdentifier propertyName); typedef bool (*NPN_HasPropertyFP)(NPP npp, NPObject *obj, NPIdentifier propertyName); typedef bool (*NPN_HasMethodFP)(NPP npp, NPObject *obj, NPIdentifier methodName); typedef void (*NPN_ReleaseVariantValueFP)(NPVariant *variant); typedef void (*NPN_SetExceptionFP)(NPObject *obj, const char *message); // function declarations NPError NPN_GetURL(NPP instance, const char* url, const char* window); NPError NPN_PostURL(NPP instance, const char* url, const char* window, uint32 len, const char* buf, NPBool file); NPError NPN_RequestRead(NPStream* stream, NPByteRange* rangeList); NPError NPN_NewStream(NPP instance, NPMIMEType type, const char* window, NPStream** stream); int32 NPN_Write(NPP instance, NPStream* stream, int32 len, void* buffer); NPError NPN_DestroyStream(NPP instance, NPStream* stream, NPReason reason); void NPN_Status(NPP instance, const char* message); const char* NPN_UserAgent(NPP instance); void* NPN_MemAlloc(uint32 size); void NPN_MemFree(void* ptr); uint32 NPN_MemFlush(uint32 size); void NPN_ReloadPlugins(NPBool reloadPages); JRIEnv* NPN_GetJavaEnv(void); jref NPN_GetJavaPeer(NPP instance); NPError NPN_GetURLNotify(NPP instance, const char* url, const char* window, void* notifyData); NPError NPN_PostURLNotify(NPP instance, const char* url, const char* window, uint32 len, const char* buf, NPBool file, void* notifyData); NPError NPN_GetValue(NPP instance, NPNVariable variable, void *ret_value); NPError NPN_SetValue(NPP instance, NPPVariable variable, void *ret_value); void NPN_InvalidateRect(NPP instance, NPRect *rect); void NPN_InvalidateRegion(NPP instance, NPRegion *region); void NPN_ForceRedraw(NPP instance); NPIdentifier NPN_GetStringIdentifier(const char* name); void NPN_GetStringIdentifiers(const char** names, int32 nameCount, NPIdentifier* identifiers); NPIdentifier NPN_GetIntIdentifier(int32 intid); bool NPN_IdentifierIsString(NPIdentifier identifier); char* NPN_UTF8FromIdentifier(NPIdentifier identifier); int32 NPN_IntFromIdentifier(NPIdentifier identifier); NPObject* NPN_CreateObject(NPP npp, NPClass *aClass); NPObject* NPN_RetainObject(NPObject *obj); void NPN_ReleaseObject(NPObject *obj); bool NPN_Invoke(NPP npp, NPObject* obj, NPIdentifier methodName, const NPVariant *args, int32 argCount, NPVariant *result); bool NPN_InvokeDefault(NPP npp, NPObject* obj, const NPVariant *args, int32 argCount, NPVariant *result); bool NPN_Evaluate(NPP npp, NPObject *obj, NPString *script, NPVariant *result); bool NPN_GetProperty(NPP npp, NPObject *obj, NPIdentifier propertyName, NPVariant *result); bool NPN_SetProperty(NPP npp, NPObject *obj, NPIdentifier propertyName, const NPVariant *value); bool NPN_RemoveProperty(NPP npp, NPObject *obj, NPIdentifier propertyName); bool NPN_HasProperty(NPP npp, NPObject *obj, NPIdentifier propertyName); bool NPN_HasMethod(NPP npp, NPObject *obj, NPIdentifier methodName); void NPN_ReleaseVariantValue(NPVariant *variant); void NPN_SetException(NPObject *obj, const char *message); // table of function implemented by the browser struct NPNetscapeFuncs { uint16 size; uint16 version; FUNCTION_POINTER(NPN_GetURLFP) geturl; FUNCTION_POINTER(NPN_PostURLFP) posturl; FUNCTION_POINTER(NPN_RequestReadFP) requestread; FUNCTION_POINTER(NPN_NewStreamFP) newstream; FUNCTION_POINTER(NPN_WriteFP) write; FUNCTION_POINTER(NPN_DestroyStreamFP) destroystream; FUNCTION_POINTER(NPN_StatusFP) status; FUNCTION_POINTER(NPN_UserAgentFP) uagent; FUNCTION_POINTER(NPN_MemAllocFP) memalloc; FUNCTION_POINTER(NPN_MemFreeFP) memfree; FUNCTION_POINTER(NPN_MemFlushFP) memflush; FUNCTION_POINTER(NPN_ReloadPluginsFP) reloadplugins; FUNCTION_POINTER(NPN_GetJavaEnvFP) getJavaEnv; FUNCTION_POINTER(NPN_GetJavaPeerFP) getJavaPeer; FUNCTION_POINTER(NPN_GetURLNotifyFP) geturlnotify; FUNCTION_POINTER(NPN_PostURLNotifyFP) posturlnotify; FUNCTION_POINTER(NPN_GetValueFP) getvalue; FUNCTION_POINTER(NPN_SetValueFP) setvalue; FUNCTION_POINTER(NPN_InvalidateRectFP) invalidaterect; FUNCTION_POINTER(NPN_InvalidateRegionFP) invalidateregion; FUNCTION_POINTER(NPN_ForceRedrawFP) forceredraw; FUNCTION_POINTER(NPN_GetStringIdentifierFP) getstringidentifier; FUNCTION_POINTER(NPN_GetStringIdentifiersFP) getstringidentifiers; FUNCTION_POINTER(NPN_GetIntIdentifierFP) getintidentifier; FUNCTION_POINTER(NPN_IdentifierIsStringFP) identifierisstring; FUNCTION_POINTER(NPN_UTF8FromIdentifierFP) utf8fromidentifier; FUNCTION_POINTER(NPN_IntFromIdentifierFP) intfromidentifier; FUNCTION_POINTER(NPN_CreateObjectFP) createobject; FUNCTION_POINTER(NPN_RetainObjectFP) retainobject; FUNCTION_POINTER(NPN_ReleaseObjectFP) releaseobject; FUNCTION_POINTER(NPN_InvokeFP) invoke; FUNCTION_POINTER(NPN_InvokeDefaultFP) invokedefault; FUNCTION_POINTER(NPN_EvaluateFP) evaluate; FUNCTION_POINTER(NPN_GetPropertyFP) getproperty; FUNCTION_POINTER(NPN_SetPropertyFP) setproperty; FUNCTION_POINTER(NPN_RemovePropertyFP) removeproperty; FUNCTION_POINTER(NPN_HasPropertyFP) hasproperty; FUNCTION_POINTER(NPN_HasMethodFP) hasmethod; FUNCTION_POINTER(NPN_ReleaseVariantValueFP) releasevariantvalue; FUNCTION_POINTER(NPN_SetExceptionFP) setexception; }; #ifdef Q_WS_X11 } #endif #endif djview4/nsdejavu/000077500000000000000000000000001174072760700142645ustar00rootroot00000000000000djview4/nsdejavu/.gitignore000066400000000000000000000001061174072760700162510ustar00rootroot00000000000000/Makefile /nsdejavu.1 /nsdejavu.la /nsdejavu.lo /nsdejavu.x /test.djvudjview4/nsdejavu/COPYING000066400000000000000000000005271174072760700153230ustar00rootroot00000000000000 Program nsdejavu.so is distributed under the GNU Public License version 2 only because it depends on the Mozilla Plugin SDK files which are distributed under the Mozilla Public License version 1.1 and allow redistribution either under the GNU General Public License version 2, or under the GNU Library General Public License version 2.1. djview4/nsdejavu/Makefile.in000066400000000000000000000061321174072760700163330ustar00rootroot00000000000000#C- This program is free software; you can redistribute it and/or #C- modify it under the terms of the GNU General Public License, #C- either version 2 or (at your option) any later version. #C- The license should have accompanied the program or you may #C- obtain a copy of the license from the Free Software #C- Foundation at http://www.fsf.org. #C- #C- This program is distributed in the hope that it will be useful, #C- but WITHOUT ANY WARRANTY; without even the implied warranty of #C- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #C- GNU General Public License for more details. @SET_MAKE@ SHELL = @SHELL@ VPATH = @srcdir@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ top_builddir = .. prefix = @prefix@ exec_prefix = @exec_prefix@ bindir = @bindir@ datarootdir = @datarootdir@ datadir = @datadir@ libdir = @libdir@ mandir = @mandir@ plugindir = ${libdir}/netscape/plugins CC = @CC@ CXX = @CXX@ RM = @RM@ AR = @AR@ LN_S = @LN_S@ TOUCH = @TOUCH@ INSTALL = @INSTALL@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_SHLIB = @INSTALL_SHLIB@ LIBTOOL = @LIBTOOL@ --tag=disable-static OPTS = @OPTS@ NSDEJAVU_LIBS = @NSDEJAVU_LIBS@ NSDEJAVU_CFLAGS = @NSDEJAVU_CFLAGS@ GLIB_CFLAGS = @GLIB_CFLAGS@ INCS = \ -I${srcdir} \ -I${srcdir}/npsdk \ -I${top_builddir} CFLAGS = @CPPFLAGS@ ${OPTS} ${INCS} ${NSDEJAVU_CFLAGS} ${GLIB_CFLAGS} LIBS = @LDFLAGS@ ${NSDEJAVU_LIBS} all: nsdejavu.la nsdejavu.x nsdejavu.1 nsdejavu.lo: nsdejavu.c nsdejavu.la: nsdejavu.lo ${LIBTOOL} --mode=link ${CC} ${CFLAGS} nsdejavu.lo ${LIBS} \ -rpath ${plugindir} -module -o $@ nsdejavu.x: nsdejavu.la FORCE eval `grep '^dlname=' nsdejavu.la` && \ echo $${dlname} | sed -e 's/\([-.][0-9][0-9]*\)*//g' > $@ -@if test -z "`cat nsdejavu.x`" ; then \ echo "-----------------------------------------------";\ echo "*** Libtool cannot build the plugin 'nsdejavu'.";\ echo "*** Did you configure with '--disable-shared'? ";\ echo "-----------------------------------------------";\ fi nsdejavu.1: nsdejavu.1.in nsdejavu.x eval "nsdejavu=`cat nsdejavu.x`" && \ sed < ${srcdir}/nsdejavu.1.in > nsdejavu.1 \ -e 's,LIBDIR,${libdir},' -e "s,NSDEJAVUSO,$$nsdejavu," install: install-bin install-man install-bin: nsdejavu.la nsdejavu.x FORCE ${INSTALL} -d ${DESTDIR}${plugindir} eval "nsdejavu=`cat nsdejavu.x`" && \ eval `grep '^dlname=' nsdejavu.la` && \ ${INSTALL_SHLIB} .libs/$$dlname ${DESTDIR}${plugindir}/$$nsdejavu install-man: nsdejavu.1 FORCE ${INSTALL} -d ${DESTDIR}${mandir}/man1 ${INSTALL_DATA} nsdejavu.1 ${DESTDIR}${mandir}/man1 clean: FORCE -${LIBTOOL} --mode=clean ${RM} 2>/dev/null *.lo *.la -${RM} 2>/dev/null -rf *.lo *.la .libs -${RM} 2>/dev/null nsdejavu.x nsdejavu.1 distclean: clean -${RM} -r 2>/dev/null Makefile *.rpo ii_files FORCE: .PHONY: FORCE .SUFFIXES: .c .cpp .o .lo .c.o: ${CC} ${CFLAGS} -c $< -o $@ .c.lo: ${LIBTOOL} --mode=compile ${CC} ${CFLAGS} -c $< -o $@ # Dependencies nsdejavu.lo nsdejavu.o: nsdejavu.c nsdejavu.lo nsdejavu.o: npsdk/npapi.h npsdk/npupp.h npsdk/npruntime.h djview4/nsdejavu/README000066400000000000000000000007071174072760700151500ustar00rootroot00000000000000 This is the main directory for X11/UNIX DjVu browser plugin. It is not enough to compile this module to obtain a fully functioning plugin. You also need to compile the standalone DjVu viewer 'djview' using the X11 version of Qt4. This does not work on the Mac unless you use a X11-based browser. The stock Safari and all downloadable builds of popular browsers for OS X are Cocoa-based. TODO: Write a Cocoa-based browser plugin (see directory npdjvu.)djview4/nsdejavu/npsdk/000077500000000000000000000000001174072760700154035ustar00rootroot00000000000000djview4/nsdejavu/npsdk/COPYING000066400000000000000000000073171174072760700164460ustar00rootroot00000000000000 This directory contains files copied from the mozilla plugin sdk from http://lxr.mozilla.org/seamonkey/source/modules/plugin/base/public: npapi.h, nptypes.h, npupp.h, npruntime.h and files copied from the mozilla nspr library prtypes.h, protypes.h, prcpucfg.h These files contain the following copyright notice: | Version: MPL 1.1/GPL 2.0/LGPL 2.1 | | The contents of this file are subject to the Mozilla Public License Version | 1.1 (the "License"); you may not use this file except in compliance with | the License. You may obtain a copy of the License at | http://www.mozilla.org/MPL/ | | Software distributed under the License is distributed on an "AS IS" basis, | WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License | for the specific language governing rights and limitations under the | License. | | The Original Code is mozilla.org code. | | The Initial Developer of the Original Code is | Netscape Communications Corporation. | Portions created by the Initial Developer are Copyright (C) 1998 | the Initial Developer. All Rights Reserved. | | Contributor(s): | | Alternatively, the contents of this file may be used under the terms of | either the GNU General Public License Version 2 or later (the "GPL"), or | the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), | in which case the provisions of the GPL or the LGPL are applicable instead | of those above. If you wish to allow use of your version of this file only | under the terms of either the GPL or the LGPL, and not to allow others to | use your version of this file under the terms of the MPL, indicate your | decision by deleting the provisions above and replace them with the notice | and other provisions required by the GPL or the LGPL. If you do not delete | the provisions above, a recipient may use your version of this file under | the terms of any one of the MPL, the GPL or the LGPL. The file npruntime.h contains a different copyright notice (BSD style) | Copyright © 2004, Apple Computer, Inc. and The Mozilla Foundation. | All rights reserved. | | Redistribution and use in source and binary forms, with or without | modification, are permitted provided that the following conditions are | met: | | 1. Redistributions of source code must retain the above copyright | notice, this list of conditions and the following disclaimer. | 2. Redistributions in binary form must reproduce the above copyright | notice, this list of conditions and the following disclaimer in the | documentation and/or other materials provided with the distribution. | 3. Neither the names of Apple Computer, Inc. ("Apple") or The Mozilla | Foundation ("Mozilla") nor the names of their contributors may be used | to endorse or promote products derived from this software without | specific prior written permission. | | THIS SOFTWARE IS PROVIDED BY APPLE, MOZILLA AND THEIR CONTRIBUTORS "AS | IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED | TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A | PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE, MOZILLA OR | THEIR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED | TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. The file jri.h simply contains dummy type definitions in order to isolate the other files from complicated java stuff. It contains a notice that places it in the public domain. djview4/nsdejavu/npsdk/jri.h000066400000000000000000000002411174072760700163350ustar00rootroot00000000000000/* Authored by Leon Bottou in 2007. This files is public domain. */ typedef void* JRIEnv; typedef void* JRIRef; typedef void* JRIGlobalRef; typedef void* jref; djview4/nsdejavu/npsdk/npapi.h000066400000000000000000000527361174072760700167000ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1998 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ /* npapi.h Revision 3.45 (cvs $Revision$) * Netscape client plug-in API spec */ #ifndef _NPAPI_H_ #define _NPAPI_H_ #ifdef __OS2__ #pragma pack(1) #endif #include "prtypes.h" /* Copied from xp_core.h */ /* removed #ifdef for hpux defined in /usr/include/model.h */ #ifndef _INT16 #define _INT16 #endif #ifndef _INT32 #define _INT32 #endif #ifndef _UINT16 #define _UINT16 #endif #ifndef _UINT32 #define _UINT32 #endif /* * NO_NSPR_10_SUPPORT disables the inclusion * of obsolete/protypes.h, whose int16, uint16, * int32, and uint32 typedefs conflict with those * in this file. */ #ifndef NO_NSPR_10_SUPPORT #define NO_NSPR_10_SUPPORT #endif #ifdef OJI #include "jri.h" /* Java Runtime Interface */ #endif #if defined (__OS2__ ) || defined (OS2) # ifndef XP_OS2 # define XP_OS2 1 # endif /* XP_OS2 */ #endif /* __OS2__ */ #ifdef _WINDOWS # include # ifndef XP_WIN # define XP_WIN 1 # endif /* XP_WIN */ #endif /* _WINDOWS */ #ifdef __MWERKS__ # define _declspec __declspec # ifdef __INTEL__ # undef NULL # ifndef XP_WIN # define XP_WIN 1 # endif /* XP_WIN */ # endif /* __INTEL__ */ #endif /* __MWERKS__ */ #ifdef XP_MACOSX #include #ifdef __LP64__ #define NP_NO_QUICKDRAW #endif #endif #if defined(XP_UNIX) # include # if defined(MOZ_X11) # include # include # endif #endif /*----------------------------------------------------------------------*/ /* Plugin Version Constants */ /*----------------------------------------------------------------------*/ #define NP_VERSION_MAJOR 0 #define NP_VERSION_MINOR 18 /* The OS/2 version of Netscape uses RC_DATA to define the mime types, file extensions, etc that are required. Use a vertical bar to separate types, end types with \0. FileVersion and ProductVersion are 32bit ints, all other entries are strings the MUST be terminated wwith a \0. AN EXAMPLE: RCDATA NP_INFO_ProductVersion { 1,0,0,1,} RCDATA NP_INFO_MIMEType { "video/x-video|", "video/x-flick\0" } RCDATA NP_INFO_FileExtents { "avi|", "flc\0" } RCDATA NP_INFO_FileOpenName{ "MMOS2 video player(*.avi)|", "MMOS2 Flc/Fli player(*.flc)\0" } RCDATA NP_INFO_FileVersion { 1,0,0,1 } RCDATA NP_INFO_CompanyName { "Netscape Communications\0" } RCDATA NP_INFO_FileDescription { "NPAVI32 Extension DLL\0" RCDATA NP_INFO_InternalName { "NPAVI32\0" ) RCDATA NP_INFO_LegalCopyright { "Copyright Netscape Communications \251 1996\0" RCDATA NP_INFO_OriginalFilename { "NVAPI32.DLL" } RCDATA NP_INFO_ProductName { "NPAVI32 Dynamic Link Library\0" } */ /* RC_DATA types for version info - required */ #define NP_INFO_ProductVersion 1 #define NP_INFO_MIMEType 2 #define NP_INFO_FileOpenName 3 #define NP_INFO_FileExtents 4 /* RC_DATA types for version info - used if found */ #define NP_INFO_FileDescription 5 #define NP_INFO_ProductName 6 /* RC_DATA types for version info - optional */ #define NP_INFO_CompanyName 7 #define NP_INFO_FileVersion 8 #define NP_INFO_InternalName 9 #define NP_INFO_LegalCopyright 10 #define NP_INFO_OriginalFilename 11 #ifndef RC_INVOKED /*----------------------------------------------------------------------*/ /* Definition of Basic Types */ /*----------------------------------------------------------------------*/ #ifndef _UINT16 typedef unsigned short uint16; #endif #ifndef _UINT32 # if defined(__alpha) || defined(__amd64__) || defined(__x86_64__) typedef unsigned int uint32; # else /* __alpha */ typedef unsigned long uint32; # endif /* __alpha */ #endif /* * AIX defines these in sys/inttypes.h included from sys/types.h */ #ifndef AIX #ifndef _INT16 typedef short int16; #endif #ifndef _INT32 # if defined(__alpha) || defined(__amd64__) || defined(__x86_64__) typedef int int32; # else /* __alpha */ typedef long int32; # endif /* __alpha */ #endif #endif #ifndef FALSE #define FALSE (0) #endif #ifndef TRUE #define TRUE (1) #endif #ifndef NULL #define NULL (0L) #endif #ifdef XP_MACOSX typedef enum { #ifndef NP_NO_QUICKDRAW NPDrawingModelQuickDraw = 0, #endif NPDrawingModelCoreGraphics = 1 } NPDrawingModel; #endif typedef unsigned char NPBool; typedef int16 NPError; typedef int16 NPReason; typedef char* NPMIMEType; /*----------------------------------------------------------------------*/ /* Structures and definitions */ /*----------------------------------------------------------------------*/ /* * NPP is a plug-in's opaque instance handle */ typedef struct _NPP { void* pdata; /* plug-in private data */ void* ndata; /* netscape private data */ } NPP_t; typedef NPP_t* NPP; typedef struct _NPStream { void* pdata; /* plug-in private data */ void* ndata; /* netscape private data */ const char* url; uint32 end; uint32 lastmodified; void* notifyData; const char* headers; /* Response headers from host. * Exists only for >= NPVERS_HAS_RESPONSE_HEADERS. * Used for HTTP only; NULL for non-HTTP. * Available from NPP_NewStream onwards. * Plugin should copy this data before storing it. * Includes HTTP status line and all headers, * preferably verbatim as received from server, * headers formatted as in HTTP ("Header: Value"), * and newlines (\n, NOT \r\n) separating lines. * Terminated by \n\0 (NOT \n\n\0). */ } NPStream; typedef struct _NPByteRange { int32 offset; /* negative offset means from the end */ uint32 length; struct _NPByteRange* next; } NPByteRange; typedef struct _NPSavedData { int32 len; void* buf; } NPSavedData; typedef struct _NPRect { uint16 top; uint16 left; uint16 bottom; uint16 right; } NPRect; typedef struct _NPSize { int32 width; int32 height; } NPSize; #ifdef XP_UNIX /* * Unix specific structures and definitions */ /* * Callback Structures. * * These are used to pass additional platform specific information. */ enum { NP_SETWINDOW = 1, NP_PRINT }; typedef struct { int32 type; } NPAnyCallbackStruct; typedef struct { int32 type; #ifdef MOZ_X11 Display* display; Visual* visual; Colormap colormap; unsigned int depth; #endif } NPSetWindowCallbackStruct; typedef struct { int32 type; FILE* fp; } NPPrintCallbackStruct; #endif /* XP_UNIX */ /* * The following masks are applied on certain platforms to NPNV and * NPPV selectors that pass around pointers to COM interfaces. Newer * compilers on some platforms may generate vtables that are not * compatible with older compilers. To prevent older plugins from * not understanding a new browser's ABI, these masks change the * values of those selectors on those platforms. To remain backwards * compatible with differenet versions of the browser, plugins can * use these masks to dynamically determine and use the correct C++ * ABI that the browser is expecting. This does not apply to Windows * as Microsoft's COM ABI will likely not change. */ #define NP_ABI_GCC3_MASK 0x10000000 /* * gcc 3.x generated vtables on UNIX and OSX are incompatible with * previous compilers. */ #if (defined (XP_UNIX) && defined(__GNUC__) && (__GNUC__ >= 3)) #define _NP_ABI_MIXIN_FOR_GCC3 NP_ABI_GCC3_MASK #else #define _NP_ABI_MIXIN_FOR_GCC3 0 #endif #define NP_ABI_MACHO_MASK 0x01000000 /* * On OSX, the Mach-O executable format is significantly * different than CFM. In addition to having a different * C++ ABI, it also has has different C calling convention. * You must use glue code when calling between CFM and * Mach-O C functions. */ #if (defined(TARGET_RT_MAC_MACHO)) #define _NP_ABI_MIXIN_FOR_MACHO NP_ABI_MACHO_MASK #else #define _NP_ABI_MIXIN_FOR_MACHO 0 #endif #define NP_ABI_MASK (_NP_ABI_MIXIN_FOR_GCC3 | _NP_ABI_MIXIN_FOR_MACHO) /* * List of variable names for which NPP_GetValue shall be implemented */ typedef enum { NPPVpluginNameString = 1, NPPVpluginDescriptionString, NPPVpluginWindowBool, NPPVpluginTransparentBool, NPPVjavaClass, /* Not implemented in Mozilla 1.0 */ NPPVpluginWindowSize, NPPVpluginTimerInterval, NPPVpluginScriptableInstance = (10 | NP_ABI_MASK), NPPVpluginScriptableIID = 11, /* Introduced in Mozilla 0.9.9 */ NPPVjavascriptPushCallerBool = 12, /* Introduced in Mozilla 1.0 */ NPPVpluginKeepLibraryInMemory = 13, NPPVpluginNeedsXEmbed = 14, /* Get the NPObject for scripting the plugin. Introduced in Firefox * 1.0 (NPAPI minor version 14). */ NPPVpluginScriptableNPObject = 15, /* Get the plugin value (as \0-terminated UTF-8 string data) for * form submission if the plugin is part of a form. Use * NPN_MemAlloc() to allocate memory for the string data. Introduced * in Mozilla 1.8b2 (NPAPI minor version 15). */ NPPVformValue = 16 } NPPVariable; /* * List of variable names for which NPN_GetValue is implemented by Mozilla */ typedef enum { NPNVxDisplay = 1, NPNVxtAppContext, NPNVnetscapeWindow, NPNVjavascriptEnabledBool, NPNVasdEnabledBool, NPNVisOfflineBool, /* 10 and over are available on Mozilla builds starting with 0.9.4 */ NPNVserviceManager = (10 | NP_ABI_MASK), NPNVDOMElement = (11 | NP_ABI_MASK), /* available in Mozilla 1.2 */ NPNVDOMWindow = (12 | NP_ABI_MASK), NPNVToolkit = (13 | NP_ABI_MASK), NPNVSupportsXEmbedBool = 14, /* Get the NPObject wrapper for the browser window. */ NPNVWindowNPObject = 15, /* Get the NPObject wrapper for the plugins DOM element. */ NPNVPluginElementNPObject = 16 #ifdef XP_MACOSX /* Used for negotiating drawing models */ , NPNVpluginDrawingModel = 1000 #ifndef NP_NO_QUICKDRAW , NPNVsupportsQuickDrawBool = 2000 #endif , NPNVsupportsCoreGraphicsBool = 2001 #endif } NPNVariable; /* * The type of Tookkit the widgets use */ typedef enum { NPNVGtk12 = 1, NPNVGtk2 } NPNToolkitType; /* * The type of a NPWindow - it specifies the type of the data structure * returned in the window field. */ typedef enum { NPWindowTypeWindow = 1, NPWindowTypeDrawable } NPWindowType; typedef struct _NPWindow { void* window; /* Platform specific window handle */ /* OS/2: x - Position of bottom left corner */ /* OS/2: y - relative to visible netscape window */ int32 x; /* Position of top left corner relative */ int32 y; /* to a netscape page. */ uint32 width; /* Maximum window size */ uint32 height; NPRect clipRect; /* Clipping rectangle in port coordinates */ /* Used by MAC only. */ #if defined(XP_UNIX) && !defined(XP_MACOSX) void * ws_info; /* Platform-dependent additonal data */ #endif /* XP_UNIX */ NPWindowType type; /* Is this a window or a drawable? */ } NPWindow; typedef struct _NPFullPrint { NPBool pluginPrinted;/* Set TRUE if plugin handled fullscreen printing */ NPBool printOne; /* TRUE if plugin should print one copy to default printer */ void* platformPrint; /* Platform-specific printing info */ } NPFullPrint; typedef struct _NPEmbedPrint { NPWindow window; void* platformPrint; /* Platform-specific printing info */ } NPEmbedPrint; typedef struct _NPPrint { uint16 mode; /* NP_FULL or NP_EMBED */ union { NPFullPrint fullPrint; /* if mode is NP_FULL */ NPEmbedPrint embedPrint; /* if mode is NP_EMBED */ } print; } NPPrint; #ifdef XP_MACOSX typedef EventRecord NPEvent; #elif defined(XP_WIN) typedef struct _NPEvent { uint16 event; uint32 wParam; uint32 lParam; } NPEvent; #elif defined(XP_OS2) typedef struct _NPEvent { uint32 event; uint32 wParam; uint32 lParam; } NPEvent; #elif defined (XP_UNIX) && defined(MOZ_X11) typedef XEvent NPEvent; #else typedef void* NPEvent; #endif /* XP_MACOSX */ #ifdef XP_MACOSX typedef void* NPRegion; #ifndef NP_NO_QUICKDRAW typedef RgnHandle NPQDRegion; #endif typedef CGPathRef NPCGRegion; #elif defined(XP_WIN) typedef HRGN NPRegion; #elif defined(XP_UNIX) && defined(MOZ_X11) typedef Region NPRegion; #else typedef void *NPRegion; #endif /* XP_MACOSX */ #ifdef XP_MACOSX /* * Mac-specific structures and definitions. */ typedef struct NP_Port { CGrafPtr port; /* Grafport */ int32 portx; /* position inside the topmost window */ int32 porty; } NP_Port; typedef struct NP_CGContext { CGContextRef context; WindowRef window; } NP_CGContext; /* * Non-standard event types that can be passed to HandleEvent */ enum NPEventType { NPEventType_GetFocusEvent = (osEvt + 16), NPEventType_LoseFocusEvent, NPEventType_AdjustCursorEvent, NPEventType_MenuCommandEvent, NPEventType_ClippingChangedEvent, NPEventType_ScrollingBeginsEvent = 1000, NPEventType_ScrollingEndsEvent }; #ifdef OBSOLETE #define getFocusEvent (osEvt + 16) #define loseFocusEvent (osEvt + 17) #define adjustCursorEvent (osEvt + 18) #endif #endif /* XP_MACOSX */ /* * Values for mode passed to NPP_New: */ #define NP_EMBED 1 #define NP_FULL 2 /* * Values for stream type passed to NPP_NewStream: */ #define NP_NORMAL 1 #define NP_SEEK 2 #define NP_ASFILE 3 #define NP_ASFILEONLY 4 #define NP_MAXREADY (((unsigned)(~0)<<1)>>1) /*----------------------------------------------------------------------*/ /* Error and Reason Code definitions */ /*----------------------------------------------------------------------*/ /* * Values of type NPError: */ #define NPERR_BASE 0 #define NPERR_NO_ERROR (NPERR_BASE + 0) #define NPERR_GENERIC_ERROR (NPERR_BASE + 1) #define NPERR_INVALID_INSTANCE_ERROR (NPERR_BASE + 2) #define NPERR_INVALID_FUNCTABLE_ERROR (NPERR_BASE + 3) #define NPERR_MODULE_LOAD_FAILED_ERROR (NPERR_BASE + 4) #define NPERR_OUT_OF_MEMORY_ERROR (NPERR_BASE + 5) #define NPERR_INVALID_PLUGIN_ERROR (NPERR_BASE + 6) #define NPERR_INVALID_PLUGIN_DIR_ERROR (NPERR_BASE + 7) #define NPERR_INCOMPATIBLE_VERSION_ERROR (NPERR_BASE + 8) #define NPERR_INVALID_PARAM (NPERR_BASE + 9) #define NPERR_INVALID_URL (NPERR_BASE + 10) #define NPERR_FILE_NOT_FOUND (NPERR_BASE + 11) #define NPERR_NO_DATA (NPERR_BASE + 12) #define NPERR_STREAM_NOT_SEEKABLE (NPERR_BASE + 13) /* * Values of type NPReason: */ #define NPRES_BASE 0 #define NPRES_DONE (NPRES_BASE + 0) #define NPRES_NETWORK_ERR (NPRES_BASE + 1) #define NPRES_USER_BREAK (NPRES_BASE + 2) /* * Don't use these obsolete error codes any more. */ #define NP_NOERR NP_NOERR_is_obsolete_use_NPERR_NO_ERROR #define NP_EINVAL NP_EINVAL_is_obsolete_use_NPERR_GENERIC_ERROR #define NP_EABORT NP_EABORT_is_obsolete_use_NPRES_USER_BREAK /* * Version feature information */ #define NPVERS_HAS_STREAMOUTPUT 8 #define NPVERS_HAS_NOTIFICATION 9 #define NPVERS_HAS_LIVECONNECT 9 #define NPVERS_WIN16_HAS_LIVECONNECT 9 #define NPVERS_68K_HAS_LIVECONNECT 11 #define NPVERS_HAS_WINDOWLESS 11 #define NPVERS_HAS_XPCONNECT_SCRIPTING 13 #define NPVERS_HAS_NPRUNTIME_SCRIPTING 14 #define NPVERS_HAS_FORM_VALUES 15 #define NPVERS_HAS_POPUPS_ENABLED_STATE 16 #define NPVERS_HAS_RESPONSE_HEADERS 17 #define NPVERS_HAS_NPOBJECT_ENUM 18 /*----------------------------------------------------------------------*/ /* Function Prototypes */ /*----------------------------------------------------------------------*/ #if defined(_WINDOWS) && !defined(WIN32) #define NP_LOADDS _loadds #else #if defined(__OS2__) #define NP_LOADDS _System #else #define NP_LOADDS #endif #endif #ifdef __cplusplus extern "C" { #endif /* * NPP_* functions are provided by the plugin and called by the navigator. */ #ifdef XP_UNIX char* NPP_GetMIMEDescription(void); #endif /* XP_UNIX */ NPError NP_LOADDS NPP_Initialize(void); void NP_LOADDS NPP_Shutdown(void); NPError NP_LOADDS NPP_New(NPMIMEType pluginType, NPP instance, uint16 mode, int16 argc, char* argn[], char* argv[], NPSavedData* saved); NPError NP_LOADDS NPP_Destroy(NPP instance, NPSavedData** save); NPError NP_LOADDS NPP_SetWindow(NPP instance, NPWindow* window); NPError NP_LOADDS NPP_NewStream(NPP instance, NPMIMEType type, NPStream* stream, NPBool seekable, uint16* stype); NPError NP_LOADDS NPP_DestroyStream(NPP instance, NPStream* stream, NPReason reason); int32 NP_LOADDS NPP_WriteReady(NPP instance, NPStream* stream); int32 NP_LOADDS NPP_Write(NPP instance, NPStream* stream, int32 offset, int32 len, void* buffer); void NP_LOADDS NPP_StreamAsFile(NPP instance, NPStream* stream, const char* fname); void NP_LOADDS NPP_Print(NPP instance, NPPrint* platformPrint); int16 NP_LOADDS NPP_HandleEvent(NPP instance, void* event); void NP_LOADDS NPP_URLNotify(NPP instance, const char* url, NPReason reason, void* notifyData); #ifdef OJI jref NP_LOADDS NPP_GetJavaClass(void); #endif NPError NP_LOADDS NPP_GetValue(NPP instance, NPPVariable variable, void *value); NPError NP_LOADDS NPP_SetValue(NPP instance, NPNVariable variable, void *value); /* * NPN_* functions are provided by the navigator and called by the plugin. */ void NP_LOADDS NPN_Version(int* plugin_major, int* plugin_minor, int* netscape_major, int* netscape_minor); NPError NP_LOADDS NPN_GetURLNotify(NPP instance, const char* url, const char* target, void* notifyData); NPError NP_LOADDS NPN_GetURL(NPP instance, const char* url, const char* target); NPError NP_LOADDS NPN_PostURLNotify(NPP instance, const char* url, const char* target, uint32 len, const char* buf, NPBool file, void* notifyData); NPError NP_LOADDS NPN_PostURL(NPP instance, const char* url, const char* target, uint32 len, const char* buf, NPBool file); NPError NP_LOADDS NPN_RequestRead(NPStream* stream, NPByteRange* rangeList); NPError NP_LOADDS NPN_NewStream(NPP instance, NPMIMEType type, const char* target, NPStream** stream); int32 NP_LOADDS NPN_Write(NPP instance, NPStream* stream, int32 len, void* buffer); NPError NP_LOADDS NPN_DestroyStream(NPP instance, NPStream* stream, NPReason reason); void NP_LOADDS NPN_Status(NPP instance, const char* message); const char* NP_LOADDS NPN_UserAgent(NPP instance); void* NP_LOADDS NPN_MemAlloc(uint32 size); void NP_LOADDS NPN_MemFree(void* ptr); uint32 NP_LOADDS NPN_MemFlush(uint32 size); void NP_LOADDS NPN_ReloadPlugins(NPBool reloadPages); #ifdef OJI JRIEnv* NP_LOADDS NPN_GetJavaEnv(void); jref NP_LOADDS NPN_GetJavaPeer(NPP instance); #endif NPError NP_LOADDS NPN_GetValue(NPP instance, NPNVariable variable, void *value); NPError NP_LOADDS NPN_SetValue(NPP instance, NPPVariable variable, void *value); void NP_LOADDS NPN_InvalidateRect(NPP instance, NPRect *invalidRect); void NP_LOADDS NPN_InvalidateRegion(NPP instance, NPRegion invalidRegion); void NP_LOADDS NPN_ForceRedraw(NPP instance); void NP_LOADDS NPN_PushPopupsEnabledState(NPP instance, NPBool enabled); void NP_LOADDS NPN_PopPopupsEnabledState(NPP instance); #ifdef __cplusplus } /* end extern "C" */ #endif #endif /* RC_INVOKED */ #ifdef __OS2__ #pragma pack() #endif #endif /* _NPAPI_H_ */ djview4/nsdejavu/npsdk/npruntime.h000066400000000000000000000406601174072760700176030ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * Copyright © 2004, Apple Computer, Inc. and The Mozilla Foundation. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the names of Apple Computer, Inc. ("Apple") or The Mozilla * Foundation ("Mozilla") nor the names of their contributors may be used * to endorse or promote products derived from this software without * specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY APPLE, MOZILLA AND THEIR CONTRIBUTORS "AS * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE, MOZILLA OR * THEIR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * Revision 1 (March 4, 2004): * Initial proposal. * * Revision 2 (March 10, 2004): * All calls into script were made asynchronous. Results are * provided via the NPScriptResultFunctionPtr callback. * * Revision 3 (March 10, 2004): * Corrected comments to not refer to class retain/release FunctionPtrs. * * Revision 4 (March 11, 2004): * Added additional convenience NPN_SetExceptionWithUTF8(). * Changed NPHasPropertyFunctionPtr and NPHasMethodFunctionPtr to take NPClass * pointers instead of NPObject pointers. * Added NPIsValidIdentifier(). * * Revision 5 (March 17, 2004): * Added context parameter to result callbacks from ScriptObject functions. * * Revision 6 (March 29, 2004): * Renamed functions implemented by user agent to NPN_*. Removed _ from * type names. * Renamed "JavaScript" types to "Script". * * Revision 7 (April 21, 2004): * NPIdentifier becomes a void*, was int32_t * Remove NP_IsValidIdentifier, renamed NP_IdentifierFromUTF8 to NP_GetIdentifier * Added NPVariant and modified functions to use this new type. * * Revision 8 (July 9, 2004): * Updated to joint Apple-Mozilla license. * */ #ifndef _NP_RUNTIME_H_ #define _NP_RUNTIME_H_ #ifdef __cplusplus extern "C" { #endif #include "nptypes.h" /* This API is used to facilitate binding code written in C to script objects. The API in this header does not assume the presence of a user agent. That is, it can be used to bind C code to scripting environments outside of the context of a user agent. However, the normal use of the this API is in the context of a scripting environment running in a browser or other user agent. In particular it is used to support the extended Netscape script-ability API for plugins (NP-SAP). NP-SAP is an extension of the Netscape plugin API. As such we have adopted the use of the "NP" prefix for this API. The following NP{N|P}Variables were added to the Netscape plugin API (in npapi.h): NPNVWindowNPObject NPNVPluginElementNPObject NPPVpluginScriptableNPObject These variables are exposed through NPN_GetValue() and NPP_GetValue() (respectively) and are used to establish the initial binding between the user agent and native code. The DOM objects in the user agent can be examined and manipulated using the NPN_ functions that operate on NPObjects described in this header. To the extent possible the assumptions about the scripting language used by the scripting environment have been minimized. */ #define NP_BEGIN_MACRO do { #define NP_END_MACRO } while (0) /* Objects (non-primitive data) passed between 'C' and script is always wrapped in an NPObject. The 'interface' of an NPObject is described by an NPClass. */ typedef struct NPObject NPObject; typedef struct NPClass NPClass; typedef char NPUTF8; typedef struct _NPString { const NPUTF8 *utf8characters; uint32_t utf8length; } NPString; typedef enum { NPVariantType_Void, NPVariantType_Null, NPVariantType_Bool, NPVariantType_Int32, NPVariantType_Double, NPVariantType_String, NPVariantType_Object } NPVariantType; typedef struct _NPVariant { NPVariantType type; union { bool boolValue; uint32_t intValue; double doubleValue; NPString stringValue; NPObject *objectValue; } value; } NPVariant; /* NPN_ReleaseVariantValue is called on all 'out' parameters references. Specifically it is to be called on variants that own their value, as is the case with all non-const NPVariant* arguments after a successful call to any methods (except this one) in this API. After calling NPN_ReleaseVariantValue, the type of the variant will be NPVariantType_Void. */ void NPN_ReleaseVariantValue(NPVariant *variant); #define NPVARIANT_IS_VOID(_v) ((_v).type == NPVariantType_Void) #define NPVARIANT_IS_NULL(_v) ((_v).type == NPVariantType_Null) #define NPVARIANT_IS_BOOLEAN(_v) ((_v).type == NPVariantType_Bool) #define NPVARIANT_IS_INT32(_v) ((_v).type == NPVariantType_Int32) #define NPVARIANT_IS_DOUBLE(_v) ((_v).type == NPVariantType_Double) #define NPVARIANT_IS_STRING(_v) ((_v).type == NPVariantType_String) #define NPVARIANT_IS_OBJECT(_v) ((_v).type == NPVariantType_Object) #define NPVARIANT_TO_BOOLEAN(_v) ((_v).value.boolValue) #define NPVARIANT_TO_INT32(_v) ((_v).value.intValue) #define NPVARIANT_TO_DOUBLE(_v) ((_v).value.doubleValue) #define NPVARIANT_TO_STRING(_v) ((_v).value.stringValue) #define NPVARIANT_TO_OBJECT(_v) ((_v).value.objectValue) #define VOID_TO_NPVARIANT(_v) \ NP_BEGIN_MACRO \ (_v).type = NPVariantType_Void; \ (_v).value.objectValue = NULL; \ NP_END_MACRO #define NULL_TO_NPVARIANT(_v) \ NP_BEGIN_MACRO \ (_v).type = NPVariantType_Null; \ (_v).value.objectValue = NULL; \ NP_END_MACRO #define BOOLEAN_TO_NPVARIANT(_val, _v) \ NP_BEGIN_MACRO \ (_v).type = NPVariantType_Bool; \ (_v).value.boolValue = !!(_val); \ NP_END_MACRO #define INT32_TO_NPVARIANT(_val, _v) \ NP_BEGIN_MACRO \ (_v).type = NPVariantType_Int32; \ (_v).value.intValue = _val; \ NP_END_MACRO #define DOUBLE_TO_NPVARIANT(_val, _v) \ NP_BEGIN_MACRO \ (_v).type = NPVariantType_Double; \ (_v).value.doubleValue = _val; \ NP_END_MACRO #define STRINGZ_TO_NPVARIANT(_val, _v) \ NP_BEGIN_MACRO \ (_v).type = NPVariantType_String; \ NPString str = { _val, strlen(_val) }; \ (_v).value.stringValue = str; \ NP_END_MACRO #define STRINGN_TO_NPVARIANT(_val, _len, _v) \ NP_BEGIN_MACRO \ (_v).type = NPVariantType_String; \ NPString str = { _val, _len }; \ (_v).value.stringValue = str; \ NP_END_MACRO #define OBJECT_TO_NPVARIANT(_val, _v) \ NP_BEGIN_MACRO \ (_v).type = NPVariantType_Object; \ (_v).value.objectValue = _val; \ NP_END_MACRO /* Type mappings (JavaScript types have been used for illustration purposes): JavaScript to C (NPVariant with type:) undefined NPVariantType_Void null NPVariantType_Null Boolean NPVariantType_Bool Number NPVariantType_Double or NPVariantType_Int32 String NPVariantType_String Object NPVariantType_Object C (NPVariant with type:) to JavaScript NPVariantType_Void undefined NPVariantType_Null null NPVariantType_Bool Boolean NPVariantType_Int32 Number NPVariantType_Double Number NPVariantType_String String NPVariantType_Object Object */ typedef void *NPIdentifier; /* NPObjects have methods and properties. Methods and properties are identified with NPIdentifiers. These identifiers may be reflected in script. NPIdentifiers can be either strings or integers, IOW, methods and properties can be identified by either strings or integers (i.e. foo["bar"] vs foo[1]). NPIdentifiers can be compared using ==. In case of any errors, the requested NPIdentifier(s) will be NULL. */ NPIdentifier NPN_GetStringIdentifier(const NPUTF8 *name); void NPN_GetStringIdentifiers(const NPUTF8 **names, int32_t nameCount, NPIdentifier *identifiers); NPIdentifier NPN_GetIntIdentifier(int32_t intid); bool NPN_IdentifierIsString(NPIdentifier identifier); /* The NPUTF8 returned from NPN_UTF8FromIdentifier SHOULD be freed. */ NPUTF8 *NPN_UTF8FromIdentifier(NPIdentifier identifier); /* Get the integer represented by identifier. If identifier is not an integer identifier, the behaviour is undefined. */ int32_t NPN_IntFromIdentifier(NPIdentifier identifier); /* NPObject behavior is implemented using the following set of callback functions. The NPVariant *result argument of these functions (where applicable) should be released using NPN_ReleaseVariantValue(). */ typedef NPObject *(*NPAllocateFunctionPtr)(NPP npp, NPClass *aClass); typedef void (*NPDeallocateFunctionPtr)(NPObject *npobj); typedef void (*NPInvalidateFunctionPtr)(NPObject *npobj); typedef bool (*NPHasMethodFunctionPtr)(NPObject *npobj, NPIdentifier name); typedef bool (*NPInvokeFunctionPtr)(NPObject *npobj, NPIdentifier name, const NPVariant *args, uint32_t argCount, NPVariant *result); typedef bool (*NPInvokeDefaultFunctionPtr)(NPObject *npobj, const NPVariant *args, uint32_t argCount, NPVariant *result); typedef bool (*NPHasPropertyFunctionPtr)(NPObject *npobj, NPIdentifier name); typedef bool (*NPGetPropertyFunctionPtr)(NPObject *npobj, NPIdentifier name, NPVariant *result); typedef bool (*NPSetPropertyFunctionPtr)(NPObject *npobj, NPIdentifier name, const NPVariant *value); typedef bool (*NPRemovePropertyFunctionPtr)(NPObject *npobj, NPIdentifier name); typedef bool (*NPEnumerationFunctionPtr)(NPObject *npobj, NPIdentifier **value, uint32_t *count); /* NPObjects returned by create, retain, invoke, and getProperty pass a reference count to the caller. That is, the callee adds a reference count which passes to the caller. It is the caller's responsibility to release the returned object. NPInvokeFunctionPtr function may return 0 to indicate a void result. NPInvalidateFunctionPtr is called by the scripting environment when the native code is shutdown. Any attempt to message a NPObject instance after the invalidate callback has been called will result in undefined behavior, even if the native code is still retaining those NPObject instances. (The runtime will typically return immediately, with 0 or NULL, from an attempt to dispatch to a NPObject, but this behavior should not be depended upon.) The NPEnumerationFunctionPtr function may pass an array of NPIdentifiers back to the caller. The callee allocs the memory of the array using NPN_MemAlloc(), and it's the caller's responsibility to release it using NPN_MemFree(). */ struct NPClass { uint32_t structVersion; NPAllocateFunctionPtr allocate; NPDeallocateFunctionPtr deallocate; NPInvalidateFunctionPtr invalidate; NPHasMethodFunctionPtr hasMethod; NPInvokeFunctionPtr invoke; NPInvokeDefaultFunctionPtr invokeDefault; NPHasPropertyFunctionPtr hasProperty; NPGetPropertyFunctionPtr getProperty; NPSetPropertyFunctionPtr setProperty; NPRemovePropertyFunctionPtr removeProperty; NPEnumerationFunctionPtr enumerate; }; #define NP_CLASS_STRUCT_VERSION 2 #define NP_CLASS_STRUCT_VERSION_ENUM 2 #define NP_CLASS_STRUCT_VERSION_HAS_ENUM(npclass) \ ((npclass)->structVersion >= NP_CLASS_STRUCT_VERSION_ENUM) struct NPObject { NPClass *_class; uint32_t referenceCount; /* * Additional space may be allocated here by types of NPObjects */ }; /* If the class has an allocate function, NPN_CreateObject invokes that function, otherwise a NPObject is allocated and returned. This method will initialize the referenceCount member of the NPObject to 1. */ NPObject *NPN_CreateObject(NPP npp, NPClass *aClass); /* Increment the NPObject's reference count. */ NPObject *NPN_RetainObject(NPObject *npobj); /* Decremented the NPObject's reference count. If the reference count goes to zero, the class's destroy function is invoke if specified, otherwise the object is freed directly. */ void NPN_ReleaseObject(NPObject *npobj); /* Functions to access script objects represented by NPObject. Calls to script objects are synchronous. If a function returns a value, it will be supplied via the result NPVariant argument. Successful calls will return true, false will be returned in case of an error. Calls made from plugin code to script must be made from the thread on which the plugin was initialized. */ bool NPN_Invoke(NPP npp, NPObject *npobj, NPIdentifier methodName, const NPVariant *args, uint32_t argCount, NPVariant *result); bool NPN_InvokeDefault(NPP npp, NPObject *npobj, const NPVariant *args, uint32_t argCount, NPVariant *result); bool NPN_Evaluate(NPP npp, NPObject *npobj, NPString *script, NPVariant *result); bool NPN_GetProperty(NPP npp, NPObject *npobj, NPIdentifier propertyName, NPVariant *result); bool NPN_SetProperty(NPP npp, NPObject *npobj, NPIdentifier propertyName, const NPVariant *value); bool NPN_RemoveProperty(NPP npp, NPObject *npobj, NPIdentifier propertyName); bool NPN_HasProperty(NPP npp, NPObject *npobj, NPIdentifier propertyName); bool NPN_HasMethod(NPP npp, NPObject *npobj, NPIdentifier methodName); bool NPN_Enumerate(NPP npp, NPObject *npobj, NPIdentifier **identifier, uint32_t *count); /* NPN_SetException may be called to trigger a script exception upon return from entry points into NPObjects. Typical usage: NPN_SetException (npobj, message); */ void NPN_SetException(NPObject *npobj, const NPUTF8 *message); #ifdef __cplusplus } #endif #endif djview4/nsdejavu/npsdk/nptypes.h000066400000000000000000000065761174072760700172740ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * mozilla.org. * Portions created by the Initial Developer are Copyright (C) 2004 * the Initial Developer. All Rights Reserved. * * Contributor(s): * Johnny Stenback (Original author) * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ /* * Header file for ensuring that C99 types ([u]int32_t and bool) are * available. */ #if defined(WIN32) || defined(OS2) /* * Win32 and OS/2 don't know C99, so define [u]int_32 here. The bool * is predefined tho, both in C and C++. */ typedef int int32_t; typedef unsigned int uint32_t; #elif defined(_AIX) || defined(__sun) || defined(__osf__) || defined(IRIX) || defined(HPUX) /* * AIX and SunOS ship a inttypes.h header that defines [u]int32_t, * but not bool for C. */ #include #ifndef __cplusplus typedef int bool; #endif #elif defined(bsdi) || defined(FREEBSD) || defined(OPENBSD) /* * BSD/OS, FreeBSD, and OpenBSD ship sys/types.h that define int32_t and * u_int32_t. */ #include /* * BSD/OS ships no header that defines uint32_t, nor bool (for C) */ #if defined(bsdi) typedef u_int32_t uint32_t; #if !defined(__cplusplus) typedef int bool; #endif #else /* * FreeBSD and OpenBSD define uint32_t and bool. */ #include #include #endif #elif defined(BEOS) #include #else /* * For those that ship a standard C99 stdint.h header file, include * it. Can't do the same for stdbool.h tho, since some systems ship * with a stdbool.h file that doesn't compile! */ #include #ifndef __cplusplus #if !defined(__GNUC__) || (__GNUC__ > 2 || __GNUC_MINOR__ > 95) #include #else /* * GCC 2.91 can't deal with a typedef for bool, but a #define * works. */ #define bool int #endif #endif #endif djview4/nsdejavu/npsdk/npupp.h000066400000000000000000000603161174072760700167240ustar00rootroot00000000000000/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1998 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ /* * npupp.h $Revision$ * function call mecahnics needed by platform specific glue code. */ #ifndef _NPUPP_H_ #define _NPUPP_H_ #if defined(__OS2__) #pragma pack(1) #endif #ifndef GENERATINGCFM #define GENERATINGCFM 0 #endif #ifndef _NPAPI_H_ #include "npapi.h" #endif #include "npruntime.h" #include "jri.h" /****************************************************************************************** plug-in function table macros for each function in and out of the plugin API we define typedef NPP_FooUPP #define NewNPP_FooProc #define CallNPP_FooProc *******************************************************************************************/ /* NPP_Initialize */ typedef void (* NP_LOADDS NPP_InitializeUPP)(void); #define NewNPP_InitializeProc(FUNC) \ ((NPP_InitializeUPP) (FUNC)) #define CallNPP_InitializeProc(FUNC) \ (*(FUNC))() /* NPP_Shutdown */ typedef void (* NP_LOADDS NPP_ShutdownUPP)(void); #define NewNPP_ShutdownProc(FUNC) \ ((NPP_ShutdownUPP) (FUNC)) #define CallNPP_ShutdownProc(FUNC) \ (*(FUNC))() /* NPP_New */ typedef NPError (* NP_LOADDS NPP_NewUPP)(NPMIMEType pluginType, NPP instance, uint16 mode, int16 argc, char* argn[], char* argv[], NPSavedData* saved); #define NewNPP_NewProc(FUNC) \ ((NPP_NewUPP) (FUNC)) #define CallNPP_NewProc(FUNC, ARG1, ARG2, ARG3, ARG4, ARG5, ARG6, ARG7) \ (*(FUNC))((ARG1), (ARG2), (ARG3), (ARG4), (ARG5), (ARG6), (ARG7)) /* NPP_Destroy */ typedef NPError (* NP_LOADDS NPP_DestroyUPP)(NPP instance, NPSavedData** save); #define NewNPP_DestroyProc(FUNC) \ ((NPP_DestroyUPP) (FUNC)) #define CallNPP_DestroyProc(FUNC, ARG1, ARG2) \ (*(FUNC))((ARG1), (ARG2)) /* NPP_SetWindow */ typedef NPError (* NP_LOADDS NPP_SetWindowUPP)(NPP instance, NPWindow* window); #define NewNPP_SetWindowProc(FUNC) \ ((NPP_SetWindowUPP) (FUNC)) #define CallNPP_SetWindowProc(FUNC, ARG1, ARG2) \ (*(FUNC))((ARG1), (ARG2)) /* NPP_NewStream */ typedef NPError (* NP_LOADDS NPP_NewStreamUPP)(NPP instance, NPMIMEType type, NPStream* stream, NPBool seekable, uint16* stype); #define NewNPP_NewStreamProc(FUNC) \ ((NPP_NewStreamUPP) (FUNC)) #define CallNPP_NewStreamProc(FUNC, ARG1, ARG2, ARG3, ARG4, ARG5) \ (*(FUNC))((ARG1), (ARG2), (ARG3), (ARG4), (ARG5)) /* NPP_DestroyStream */ typedef NPError (* NP_LOADDS NPP_DestroyStreamUPP)(NPP instance, NPStream* stream, NPReason reason); #define NewNPP_DestroyStreamProc(FUNC) \ ((NPP_DestroyStreamUPP) (FUNC)) #define CallNPP_DestroyStreamProc(FUNC, NPParg, NPStreamPtr, NPReasonArg) \ (*(FUNC))((NPParg), (NPStreamPtr), (NPReasonArg)) /* NPP_WriteReady */ typedef int32 (* NP_LOADDS NPP_WriteReadyUPP)(NPP instance, NPStream* stream); #define NewNPP_WriteReadyProc(FUNC) \ ((NPP_WriteReadyUPP) (FUNC)) #define CallNPP_WriteReadyProc(FUNC, NPParg, NPStreamPtr) \ (*(FUNC))((NPParg), (NPStreamPtr)) /* NPP_Write */ typedef int32 (* NP_LOADDS NPP_WriteUPP)(NPP instance, NPStream* stream, int32 offset, int32 len, void* buffer); #define NewNPP_WriteProc(FUNC) \ ((NPP_WriteUPP) (FUNC)) #define CallNPP_WriteProc(FUNC, NPParg, NPStreamPtr, offsetArg, lenArg, bufferPtr) \ (*(FUNC))((NPParg), (NPStreamPtr), (offsetArg), (lenArg), (bufferPtr)) /* NPP_StreamAsFile */ typedef void (* NP_LOADDS NPP_StreamAsFileUPP)(NPP instance, NPStream* stream, const char* fname); #define NewNPP_StreamAsFileProc(FUNC) \ ((NPP_StreamAsFileUPP) (FUNC)) #define CallNPP_StreamAsFileProc(FUNC, ARG1, ARG2, ARG3) \ (*(FUNC))((ARG1), (ARG2), (ARG3)) /* NPP_Print */ typedef void (* NP_LOADDS NPP_PrintUPP)(NPP instance, NPPrint* platformPrint); #define NewNPP_PrintProc(FUNC) \ ((NPP_PrintUPP) (FUNC)) #define CallNPP_PrintProc(FUNC, NPParg, NPPrintArg) \ (*(FUNC))((NPParg), (NPPrintArg)) /* NPP_HandleEvent */ typedef int16 (* NP_LOADDS NPP_HandleEventUPP)(NPP instance, void* event); #define NewNPP_HandleEventProc(FUNC) \ ((NPP_HandleEventUPP) (FUNC)) #define CallNPP_HandleEventProc(FUNC, NPParg, voidPtr) \ (*(FUNC))((NPParg), (voidPtr)) /* NPP_URLNotify */ typedef void (* NP_LOADDS NPP_URLNotifyUPP)(NPP instance, const char* url, NPReason reason, void* notifyData); #define NewNPP_URLNotifyProc(FUNC) \ ((NPP_URLNotifyUPP) (FUNC)) #define CallNPP_URLNotifyProc(FUNC, ARG1, ARG2, ARG3, ARG4) \ (*(FUNC))((ARG1), (ARG2), (ARG3), (ARG4)) /* NPP_GetValue */ typedef NPError (* NP_LOADDS NPP_GetValueUPP)(NPP instance, NPPVariable variable, void *ret_alue); #define NewNPP_GetValueProc(FUNC) \ ((NPP_GetValueUPP) (FUNC)) #define CallNPP_GetValueProc(FUNC, ARG1, ARG2, ARG3) \ (*(FUNC))((ARG1), (ARG2), (ARG3)) /* NPP_SetValue */ typedef NPError (* NP_LOADDS NPP_SetValueUPP)(NPP instance, NPNVariable variable, void *ret_alue); #define NewNPP_SetValueProc(FUNC) \ ((NPP_SetValueUPP) (FUNC)) #define CallNPP_SetValueProc(FUNC, ARG1, ARG2, ARG3) \ (*(FUNC))((ARG1), (ARG2), (ARG3)) /* * Netscape entry points */ /* NPN_GetValue */ typedef NPError (* NP_LOADDS NPN_GetValueUPP)(NPP instance, NPNVariable variable, void *ret_alue); #define NewNPN_GetValueProc(FUNC) \ ((NPN_GetValueUPP) (FUNC)) #define CallNPN_GetValueProc(FUNC, ARG1, ARG2, ARG3) \ (*(FUNC))((ARG1), (ARG2), (ARG3)) /* NPN_SetValue */ typedef NPError (* NP_LOADDS NPN_SetValueUPP)(NPP instance, NPPVariable variable, void *ret_alue); #define NewNPN_SetValueProc(FUNC) \ ((NPN_SetValueUPP) (FUNC)) #define CallNPN_SetValueProc(FUNC, ARG1, ARG2, ARG3) \ (*(FUNC))((ARG1), (ARG2), (ARG3)) /* NPN_GetUrlNotify */ typedef NPError (* NP_LOADDS NPN_GetURLNotifyUPP)(NPP instance, const char* url, const char* window, void* notifyData); #define NewNPN_GetURLNotifyProc(FUNC) \ ((NPN_GetURLNotifyUPP) (FUNC)) #define CallNPN_GetURLNotifyProc(FUNC, ARG1, ARG2, ARG3, ARG4) \ (*(FUNC))((ARG1), (ARG2), (ARG3), (ARG4)) /* NPN_PostUrlNotify */ typedef NPError (* NP_LOADDS NPN_PostURLNotifyUPP)(NPP instance, const char* url, const char* window, uint32 len, const char* buf, NPBool file, void* notifyData); #define NewNPN_PostURLNotifyProc(FUNC) \ ((NPN_PostURLNotifyUPP) (FUNC)) #define CallNPN_PostURLNotifyProc(FUNC, ARG1, ARG2, ARG3, ARG4, ARG5, ARG6, ARG7) \ (*(FUNC))((ARG1), (ARG2), (ARG3), (ARG4), (ARG5), (ARG6), (ARG7)) /* NPN_GetUrl */ typedef NPError (* NP_LOADDS NPN_GetURLUPP)(NPP instance, const char* url, const char* window); #define NewNPN_GetURLProc(FUNC) \ ((NPN_GetURLUPP) (FUNC)) #define CallNPN_GetURLProc(FUNC, ARG1, ARG2, ARG3) \ (*(FUNC))((ARG1), (ARG2), (ARG3)) /* NPN_PostUrl */ typedef NPError (* NP_LOADDS NPN_PostURLUPP)(NPP instance, const char* url, const char* window, uint32 len, const char* buf, NPBool file); #define NewNPN_PostURLProc(FUNC) \ ((NPN_PostURLUPP) (FUNC)) #define CallNPN_PostURLProc(FUNC, ARG1, ARG2, ARG3, ARG4, ARG5, ARG6) \ (*(FUNC))((ARG1), (ARG2), (ARG3), (ARG4), (ARG5), (ARG6)) /* NPN_RequestRead */ typedef NPError (* NP_LOADDS NPN_RequestReadUPP)(NPStream* stream, NPByteRange* rangeList); #define NewNPN_RequestReadProc(FUNC) \ ((NPN_RequestReadUPP) (FUNC)) #define CallNPN_RequestReadProc(FUNC, stream, range) \ (*(FUNC))((stream), (range)) /* NPN_NewStream */ typedef NPError (* NP_LOADDS NPN_NewStreamUPP)(NPP instance, NPMIMEType type, const char* window, NPStream** stream); #define NewNPN_NewStreamProc(FUNC) \ ((NPN_NewStreamUPP) (FUNC)) #define CallNPN_NewStreamProc(FUNC, npp, type, window, stream) \ (*(FUNC))((npp), (type), (window), (stream)) /* NPN_Write */ typedef int32 (* NP_LOADDS NPN_WriteUPP)(NPP instance, NPStream* stream, int32 len, void* buffer); #define NewNPN_WriteProc(FUNC) \ ((NPN_WriteUPP) (FUNC)) #define CallNPN_WriteProc(FUNC, npp, stream, len, buffer) \ (*(FUNC))((npp), (stream), (len), (buffer)) /* NPN_DestroyStream */ typedef NPError (* NP_LOADDS NPN_DestroyStreamUPP)(NPP instance, NPStream* stream, NPReason reason); #define NewNPN_DestroyStreamProc(FUNC) \ ((NPN_DestroyStreamUPP) (FUNC)) #define CallNPN_DestroyStreamProc(FUNC, npp, stream, reason) \ (*(FUNC))((npp), (stream), (reason)) /* NPN_Status */ typedef void (* NP_LOADDS NPN_StatusUPP)(NPP instance, const char* message); #define NewNPN_StatusProc(FUNC) \ ((NPN_StatusUPP) (FUNC)) #define CallNPN_StatusProc(FUNC, npp, msg) \ (*(FUNC))((npp), (msg)) /* NPN_UserAgent */ typedef const char* (* NP_LOADDS NPN_UserAgentUPP)(NPP instance); #define NewNPN_UserAgentProc(FUNC) \ ((NPN_UserAgentUPP) (FUNC)) #define CallNPN_UserAgentProc(FUNC, ARG1) \ (*(FUNC))((ARG1)) /* NPN_MemAlloc */ typedef void* (* NP_LOADDS NPN_MemAllocUPP)(uint32 size); #define NewNPN_MemAllocProc(FUNC) \ ((NPN_MemAllocUPP) (FUNC)) #define CallNPN_MemAllocProc(FUNC, ARG1) \ (*(FUNC))((ARG1)) /* NPN__MemFree */ typedef void (* NP_LOADDS NPN_MemFreeUPP)(void* ptr); #define NewNPN_MemFreeProc(FUNC) \ ((NPN_MemFreeUPP) (FUNC)) #define CallNPN_MemFreeProc(FUNC, ARG1) \ (*(FUNC))((ARG1)) /* NPN_MemFlush */ typedef uint32 (* NP_LOADDS NPN_MemFlushUPP)(uint32 size); #define NewNPN_MemFlushProc(FUNC) \ ((NPN_MemFlushUPP) (FUNC)) #define CallNPN_MemFlushProc(FUNC, ARG1) \ (*(FUNC))((ARG1)) /* NPN_ReloadPlugins */ typedef void (* NP_LOADDS NPN_ReloadPluginsUPP)(NPBool reloadPages); #define NewNPN_ReloadPluginsProc(FUNC) \ ((NPN_ReloadPluginsUPP) (FUNC)) #define CallNPN_ReloadPluginsProc(FUNC, ARG1) \ (*(FUNC))((ARG1)) /* NPN_GetJavaEnv */ typedef JRIEnv* (* NP_LOADDS NPN_GetJavaEnvUPP)(void); #define NewNPN_GetJavaEnvProc(FUNC) \ ((NPN_GetJavaEnvUPP) (FUNC)) #define CallNPN_GetJavaEnvProc(FUNC) \ (*(FUNC))() /* NPN_GetJavaPeer */ typedef jref (* NP_LOADDS NPN_GetJavaPeerUPP)(NPP instance); #define NewNPN_GetJavaPeerProc(FUNC) \ ((NPN_GetJavaPeerUPP) (FUNC)) #define CallNPN_GetJavaPeerProc(FUNC, ARG1) \ (*(FUNC))((ARG1)) /* NPN_InvalidateRect */ typedef void (* NP_LOADDS NPN_InvalidateRectUPP)(NPP instance, NPRect *rect); #define NewNPN_InvalidateRectProc(FUNC) \ ((NPN_InvalidateRectUPP) (FUNC)) #define CallNPN_InvalidateRectProc(FUNC, ARG1, ARG2) \ (*(FUNC))((ARG1), (ARG2)) /* NPN_InvalidateRegion */ typedef void (* NP_LOADDS NPN_InvalidateRegionUPP)(NPP instance, NPRegion region); #define NewNPN_InvalidateRegionProc(FUNC) \ ((NPN_InvalidateRegionUPP) (FUNC)) #define CallNPN_InvalidateRegionProc(FUNC, ARG1, ARG2) \ (*(FUNC))((ARG1), (ARG2)) /* NPN_ForceRedraw */ typedef void (* NP_LOADDS NPN_ForceRedrawUPP)(NPP instance); #define NewNPN_ForceRedrawProc(FUNC) \ ((NPN_ForceRedrawUPP) (FUNC)) #define CallNPN_ForceRedrawProc(FUNC, ARG1) \ (*(FUNC))((ARG1)) /* NPN_GetStringIdentifier */ typedef NPIdentifier (* NP_LOADDS NPN_GetStringIdentifierUPP)(const NPUTF8* name); #define NewNPN_GetStringIdentifierProc(FUNC) \ ((NPN_GetStringIdentifierUPP) (FUNC)) #define CallNPN_GetStringIdentifierProc(FUNC, ARG1) \ (*(FUNC))((ARG1)) /* NPN_GetStringIdentifiers */ typedef void (* NP_LOADDS NPN_GetStringIdentifiersUPP)(const NPUTF8** names, int32_t nameCount, NPIdentifier* identifiers); #define NewNPN_GetStringIdentifiersProc(FUNC) \ ((NPN_GetStringIdentifiersUPP) (FUNC)) #define CallNPN_GetStringIdentifiersProc(FUNC, ARG1, ARG2, ARG3) \ (*(FUNC))((ARG1), (ARG2), (ARG3)) /* NPN_GetIntIdentifier */ typedef NPIdentifier (* NP_LOADDS NPN_GetIntIdentifierUPP)(int32_t intid); #define NewNPN_GetIntIdentifierProc(FUNC) \ ((NPN_GetIntIdentifierUPP) (FUNC)) #define CallNPN_GetIntIdentifierProc(FUNC, ARG1) \ (*(FUNC))((ARG1)) /* NPN_IdentifierIsString */ typedef bool (* NP_LOADDS NPN_IdentifierIsStringUPP)(NPIdentifier identifier); #define NewNPN_IdentifierIsStringProc(FUNC) \ ((NPN_IdentifierIsStringUPP) (FUNC)) #define CallNPN_IdentifierIsStringProc(FUNC, ARG1) \ (*(FUNC))((ARG1)) /* NPN_UTF8FromIdentifier */ typedef NPUTF8* (* NP_LOADDS NPN_UTF8FromIdentifierUPP)(NPIdentifier identifier); #define NewNPN_UTF8FromIdentifierProc(FUNC) \ ((NPN_UTF8FromIdentifierUPP) (FUNC)) #define CallNPN_UTF8FromIdentifierProc(FUNC, ARG1) \ (*(FUNC))((ARG1)) /* NPN_IntFromIdentifier */ typedef int32_t (* NP_LOADDS NPN_IntFromIdentifierUPP)(NPIdentifier identifier); #define NewNPN_IntFromIdentifierProc(FUNC) \ ((NPN_IntFromIdentifierUPP) (FUNC)) #define CallNPN_IntFromIdentifierProc(FUNC, ARG1) \ (*(FUNC))((ARG1)) /* NPN_CreateObject */ typedef NPObject* (* NP_LOADDS NPN_CreateObjectUPP)(NPP npp, NPClass *aClass); #define NewNPN_CreateObjectProc(FUNC) \ ((NPN_CreateObjectUPP) (FUNC)) #define CallNPN_CreateObjectProc(FUNC, ARG1, ARG2) \ (*(FUNC))((ARG1), (ARG2)) /* NPN_RetainObject */ typedef NPObject* (* NP_LOADDS NPN_RetainObjectUPP)(NPObject *obj); #define NewNPN_RetainObjectProc(FUNC) \ ((NPN_RetainObjectUPP) (FUNC)) #define CallNPN_RetainObjectProc(FUNC, ARG1) \ (*(FUNC))((ARG1)) /* NPN_ReleaseObject */ typedef void (* NP_LOADDS NPN_ReleaseObjectUPP)(NPObject *obj); #define NewNPN_ReleaseObjectProc(FUNC) \ ((NPN_ReleaseObjectUPP) (FUNC)) #define CallNPN_ReleaseObjectProc(FUNC, ARG1) \ (*(FUNC))((ARG1)) /* NPN_Invoke */ typedef bool (* NP_LOADDS NPN_InvokeUPP)(NPP npp, NPObject* obj, NPIdentifier methodName, const NPVariant *args, uint32_t argCount, NPVariant *result); #define NewNPN_InvokeProc(FUNC) \ ((NPN_InvokeUPP) (FUNC)) #define CallNPN_InvokeProc(FUNC, ARG1, ARG2, ARG3, ARG4, ARG5, ARG6) \ (*(FUNC))((ARG1), (ARG2), (ARG3), (ARG4), (ARG5), (ARG6)) /* NPN_InvokeDefault */ typedef bool (* NP_LOADDS NPN_InvokeDefaultUPP)(NPP npp, NPObject* obj, const NPVariant *args, uint32_t argCount, NPVariant *result); #define NewNPN_InvokeDefaultProc(FUNC) \ ((NPN_InvokeDefaultUPP) (FUNC)) #define CallNPN_InvokeDefaultProc(FUNC, ARG1, ARG2, ARG3, ARG4, ARG5) \ (*(FUNC))((ARG1), (ARG2), (ARG3), (ARG4), (ARG5)) /* NPN_Evaluate */ typedef bool (* NP_LOADDS NPN_EvaluateUPP)(NPP npp, NPObject *obj, NPString *script, NPVariant *result); #define NewNPN_EvaluateProc(FUNC) \ ((NPN_EvaluateUPP) (FUNC)) #define CallNPN_EvaluateProc(FUNC, ARG1, ARG2, ARG3, ARG4) \ (*(FUNC))((ARG1), (ARG2), (ARG3), (ARG4)) /* NPN_GetProperty */ typedef bool (* NP_LOADDS NPN_GetPropertyUPP)(NPP npp, NPObject *obj, NPIdentifier propertyName, NPVariant *result); #define NewNPN_GetPropertyProc(FUNC) \ ((NPN_GetPropertyUPP) (FUNC)) #define CallNPN_GetPropertyProc(FUNC, ARG1, ARG2, ARG3, ARG4) \ (*(FUNC))((ARG1), (ARG2), (ARG3), (ARG4)) /* NPN_SetProperty */ typedef bool (* NP_LOADDS NPN_SetPropertyUPP)(NPP npp, NPObject *obj, NPIdentifier propertyName, const NPVariant *value); #define NewNPN_SetPropertyProc(FUNC) \ ((NPN_SetPropertyUPP) (FUNC)) #define CallNPN_SetPropertyProc(FUNC, ARG1, ARG2, ARG3, ARG4) \ (*(FUNC))((ARG1), (ARG2), (ARG3), (ARG4)) /* NPN_RemoveProperty */ typedef bool (* NP_LOADDS NPN_RemovePropertyUPP)(NPP npp, NPObject *obj, NPIdentifier propertyName); #define NewNPN_RemovePropertyProc(FUNC) \ ((NPN_RemovePropertyUPP) (FUNC)) #define CallNPN_RemovePropertyProc(FUNC, ARG1, ARG2, ARG3) \ (*(FUNC))((ARG1), (ARG2), (ARG3)) /* NPN_HasProperty */ typedef bool (* NP_LOADDS NPN_HasPropertyUPP)(NPP npp, NPObject *obj, NPIdentifier propertyName); #define NewNPN_HasPropertyProc(FUNC) \ ((NPN_HasPropertyUPP) (FUNC)) #define CallNPN_HasPropertyProc(FUNC, ARG1, ARG2, ARG3) \ (*(FUNC))((ARG1), (ARG2), (ARG3)) /* NPN_HasMethod */ typedef bool (* NP_LOADDS NPN_HasMethodUPP)(NPP npp, NPObject *obj, NPIdentifier propertyName); #define NewNPN_HasMethodProc(FUNC) \ ((NPN_HasMethodUPP) (FUNC)) #define CallNPN_HasMethodProc(FUNC, ARG1, ARG2, ARG3) \ (*(FUNC))((ARG1), (ARG2), (ARG3)) /* NPN_ReleaseVariantValue */ typedef void (* NP_LOADDS NPN_ReleaseVariantValueUPP)(NPVariant *variant); #define NewNPN_ReleaseVariantValueProc(FUNC) \ ((NPN_ReleaseVariantValueUPP) (FUNC)) #define CallNPN_ReleaseVariantValueProc(FUNC, ARG1) \ (*(FUNC))((ARG1)) /* NPN_SetException */ typedef void (* NP_LOADDS NPN_SetExceptionUPP)(NPObject *obj, const NPUTF8 *message); #define NewNPN_SetExceptionProc(FUNC) \ ((NPN_SetExceptionUPP) (FUNC)) #define CallNPN_SetExceptionProc(FUNC, ARG1, ARG2) \ (*(FUNC))((ARG1), (ARG2)) /* NPN_PushPopupsEnabledStateUPP */ typedef bool (* NP_LOADDS NPN_PushPopupsEnabledStateUPP)(NPP npp, NPBool enabled); #define NewNPN_PushPopupsEnabledStateProc(FUNC) \ ((NPN_PushPopupsEnabledStateUPP) (FUNC)) #define CallNPN_PushPopupsEnabledStateProc(FUNC, ARG1, ARG2) \ (*(FUNC))((ARG1), (ARG2)) /* NPN_PopPopupsEnabledState */ typedef bool (* NP_LOADDS NPN_PopPopupsEnabledStateUPP)(NPP npp); #define NewNPN_PopPopupsEnabledStateProc(FUNC) \ ((NPN_PopPopupsEnabledStateUPP) (FUNC)) #define CallNPN_PopPopupsEnabledStateProc(FUNC, ARG1) \ (*(FUNC))((ARG1)) /* NPN_Enumerate */ typedef bool (* NP_LOADDS NPN_EnumerateUPP)(NPP npp, NPObject *obj, NPIdentifier **identifier, uint32_t *count); #define NewNPN_EnumerateProc(FUNC) \ ((NPN_EnumerateUPP) (FUNC)) #define CallNPN_EnumerateProc(FUNC, ARG1, ARG2, ARG3, ARG4) \ (*(FUNC))((ARG1), (ARG2), (ARG3), (ARG4)) /****************************************************************************************** * The actual plugin function table definitions *******************************************************************************************/ typedef struct _NPPluginFuncs { uint16 size; uint16 version; NPP_NewUPP newp; NPP_DestroyUPP destroy; NPP_SetWindowUPP setwindow; NPP_NewStreamUPP newstream; NPP_DestroyStreamUPP destroystream; NPP_StreamAsFileUPP asfile; NPP_WriteReadyUPP writeready; NPP_WriteUPP write; NPP_PrintUPP print; NPP_HandleEventUPP event; NPP_URLNotifyUPP urlnotify; JRIGlobalRef javaClass; NPP_GetValueUPP getvalue; NPP_SetValueUPP setvalue; } NPPluginFuncs; typedef struct _NPNetscapeFuncs { uint16 size; uint16 version; NPN_GetURLUPP geturl; NPN_PostURLUPP posturl; NPN_RequestReadUPP requestread; NPN_NewStreamUPP newstream; NPN_WriteUPP write; NPN_DestroyStreamUPP destroystream; NPN_StatusUPP status; NPN_UserAgentUPP uagent; NPN_MemAllocUPP memalloc; NPN_MemFreeUPP memfree; NPN_MemFlushUPP memflush; NPN_ReloadPluginsUPP reloadplugins; NPN_GetJavaEnvUPP getJavaEnv; NPN_GetJavaPeerUPP getJavaPeer; NPN_GetURLNotifyUPP geturlnotify; NPN_PostURLNotifyUPP posturlnotify; NPN_GetValueUPP getvalue; NPN_SetValueUPP setvalue; NPN_InvalidateRectUPP invalidaterect; NPN_InvalidateRegionUPP invalidateregion; NPN_ForceRedrawUPP forceredraw; NPN_GetStringIdentifierUPP getstringidentifier; NPN_GetStringIdentifiersUPP getstringidentifiers; NPN_GetIntIdentifierUPP getintidentifier; NPN_IdentifierIsStringUPP identifierisstring; NPN_UTF8FromIdentifierUPP utf8fromidentifier; NPN_IntFromIdentifierUPP intfromidentifier; NPN_CreateObjectUPP createobject; NPN_RetainObjectUPP retainobject; NPN_ReleaseObjectUPP releaseobject; NPN_InvokeUPP invoke; NPN_InvokeDefaultUPP invokeDefault; NPN_EvaluateUPP evaluate; NPN_GetPropertyUPP getproperty; NPN_SetPropertyUPP setproperty; NPN_RemovePropertyUPP removeproperty; NPN_HasPropertyUPP hasproperty; NPN_HasMethodUPP hasmethod; NPN_ReleaseVariantValueUPP releasevariantvalue; NPN_SetExceptionUPP setexception; NPN_PushPopupsEnabledStateUPP pushpopupsenabledstate; NPN_PopPopupsEnabledStateUPP poppopupsenabledstate; NPN_EnumerateUPP enumerate; } NPNetscapeFuncs; #ifdef XP_MACOSX /****************************************************************************************** * Mac platform-specific plugin glue stuff *******************************************************************************************/ /* * Main entry point of the plugin. * This routine will be called when the plugin is loaded. The function * tables are passed in and the plugin fills in the NPPluginFuncs table * and NPPShutdownUPP for Netscape's use. */ typedef NPError (* NP_LOADDS NPP_MainEntryUPP)(NPNetscapeFuncs*, NPPluginFuncs*, NPP_ShutdownUPP*); #define NewNPP_MainEntryProc(FUNC) \ ((NPP_MainEntryUPP) (FUNC)) #define CallNPP_MainEntryProc(FUNC, netscapeFunc, pluginFunc, shutdownUPP) \ (*(FUNC))((netscapeFunc), (pluginFunc), (shutdownUPP)) /* * Mac OS X version(s) of NP_GetMIMEDescription(const char *) * These can be called to retreive MIME information from the plugin dynamically * * Note: For compatibility with Quicktime, BPSupportedMIMEtypes is another way * to get mime info from the plugin only on OSX and may not be supported * in furture version -- use NP_GetMIMEDescription instead */ enum { kBPSupportedMIMETypesStructVers_1 = 1 }; typedef struct _BPSupportedMIMETypes { SInt32 structVersion; /* struct version */ Handle typeStrings; /* STR# formated handle, allocated by plug-in */ Handle infoStrings; /* STR# formated handle, allocated by plug-in */ } BPSupportedMIMETypes; OSErr BP_GetSupportedMIMETypes(BPSupportedMIMETypes *mimeInfo, UInt32 flags); /* NP_GetMIMEDescription */ #define NP_GETMIMEDESCRIPTION_NAME "NP_GetMIMEDescription" typedef const char* (* NP_LOADDS NP_GetMIMEDescriptionUPP)(); #define NewNP_GetMIMEDescEntryProc(FUNC) \ ((NP_GetMIMEDescriptionUPP) (FUNC)) #define CallNP_GetMIMEDescEntryProc(FUNC) \ (*(FUNC))() /* BP_GetSupportedMIMETypes */ typedef OSErr (* NP_LOADDS BP_GetSupportedMIMETypesUPP)(BPSupportedMIMETypes*, UInt32); #define NewBP_GetSupportedMIMETypesEntryProc(FUNC) \ ((BP_GetSupportedMIMETypesUPP) (FUNC)) #define CallBP_GetMIMEDescEntryProc(FUNC, mimeInfo, flags) \ (*(FUNC))((mimeInfo), (flags)) #endif /* XP_MACOSX */ #if defined(_WINDOWS) #define OSCALL WINAPI #else #if defined(__OS2__) #define OSCALL _System #else #define OSCALL #endif #endif #if defined( _WINDOWS ) || defined (__OS2__) #ifdef __cplusplus extern "C" { #endif /* plugin meta member functions */ #if defined(__OS2__) typedef struct _NPPluginData { /* Alternate OS2 Plugin interface */ char *pMimeTypes; char *pFileExtents; char *pFileOpenTemplate; char *pProductName; char *pProductDescription; unsigned long dwProductVersionMS; unsigned long dwProductVersionLS; } NPPluginData; NPError OSCALL NP_GetPluginData(NPPluginData * pPluginData); #endif NPError OSCALL NP_GetEntryPoints(NPPluginFuncs* pFuncs); NPError OSCALL NP_Initialize(NPNetscapeFuncs* pFuncs); NPError OSCALL NP_Shutdown(); char* NP_GetMIMEDescription(); #ifdef __cplusplus } #endif #endif /* _WINDOWS || __OS2__ */ #if defined(__OS2__) #pragma pack() #endif #ifdef XP_UNIX #ifdef __cplusplus extern "C" { #endif /* plugin meta member functions */ char* NP_GetMIMEDescription(void); NPError NP_Initialize(NPNetscapeFuncs*, NPPluginFuncs*); NPError NP_Shutdown(void); NPError NP_GetValue(void *future, NPPVariable aVariable, void *aValue); #ifdef __cplusplus } #endif #endif /* XP_UNIX */ #endif /* _NPUPP_H_ */ djview4/nsdejavu/npsdk/obsolete/000077500000000000000000000000001174072760700172175ustar00rootroot00000000000000djview4/nsdejavu/npsdk/obsolete/protypes.h000066400000000000000000000154011174072760700212560ustar00rootroot00000000000000/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is the Netscape Portable Runtime (NSPR). * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1998-2000 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ /* * This header typedefs the old 'native' types to the new PRs. * These definitions are scheduled to be eliminated at the earliest * possible time. The NSPR API is implemented and documented using * the new definitions. */ #if !defined(PROTYPES_H) #define PROTYPES_H typedef PRUintn uintn; #ifndef _XP_Core_ typedef PRIntn intn; #endif /* * It is trickier to define uint, int8, uint8, int16, uint16, * int32, uint32, int64, and uint64 because some of these int * types are defined by standard header files on some platforms. * Our strategy here is to include all such standard headers * first, and then define these int types only if they are not * defined by those standard headers. */ /* * BeOS defines all the int types below in its standard header * file SupportDefs.h. */ #ifdef XP_BEOS #include #endif /* * OpenVMS defines all the int types below in its standard * header files ints.h and types.h. */ #ifdef VMS #include #include #endif /* * SVR4 typedef of uint is commonly found on UNIX machines. * * On AIX 4.3, sys/inttypes.h (which is included by sys/types.h) * defines the types int8, int16, int32, and int64. */ #ifdef XP_UNIX #include #endif /* model.h on HP-UX defines int8, int16, and int32. */ #ifdef HPUX #include #endif /* * uint */ #if !defined(XP_BEOS) && !defined(VMS) \ && !defined(XP_UNIX) || defined(NTO) typedef PRUintn uint; #endif /* * uint64 */ #if !defined(XP_BEOS) && !defined(VMS) typedef PRUint64 uint64; #endif /* * uint32 */ #if !defined(XP_BEOS) && !defined(VMS) #if !defined(XP_MAC) && !defined(_WIN32) && !defined(XP_OS2) && !defined(NTO) typedef PRUint32 uint32; #else typedef unsigned long uint32; #endif #endif /* * uint16 */ #if !defined(XP_BEOS) && !defined(VMS) typedef PRUint16 uint16; #endif /* * uint8 */ #if !defined(XP_BEOS) && !defined(VMS) typedef PRUint8 uint8; #endif /* * int64 */ #if !defined(XP_BEOS) && !defined(VMS) \ && !defined(_PR_AIX_HAVE_BSD_INT_TYPES) typedef PRInt64 int64; #endif /* * int32 */ #if !defined(XP_BEOS) && !defined(VMS) \ && !defined(_PR_AIX_HAVE_BSD_INT_TYPES) \ && !defined(HPUX) #if !defined(XP_MAC) && !defined(_WIN32) && !defined(XP_OS2) && !defined(NTO) typedef PRInt32 int32; #else typedef long int32; #endif #endif /* * int16 */ #if !defined(XP_BEOS) && !defined(VMS) \ && !defined(_PR_AIX_HAVE_BSD_INT_TYPES) \ && !defined(HPUX) typedef PRInt16 int16; #endif /* * int8 */ #if !defined(XP_BEOS) && !defined(VMS) \ && !defined(_PR_AIX_HAVE_BSD_INT_TYPES) \ && !defined(HPUX) typedef PRInt8 int8; #endif typedef PRFloat64 float64; typedef PRUptrdiff uptrdiff_t; typedef PRUword uprword_t; typedef PRWord prword_t; /* Re: prbit.h */ #define TEST_BIT PR_TEST_BIT #define SET_BIT PR_SET_BIT #define CLEAR_BIT PR_CLEAR_BIT /* Re: prarena.h->plarena.h */ #define PRArena PLArena #define PRArenaPool PLArenaPool #define PRArenaStats PLArenaStats #define PR_ARENA_ALIGN PL_ARENA_ALIGN #define PR_INIT_ARENA_POOL PL_INIT_ARENA_POOL #define PR_ARENA_ALLOCATE PL_ARENA_ALLOCATE #define PR_ARENA_GROW PL_ARENA_GROW #define PR_ARENA_MARK PL_ARENA_MARK #define PR_CLEAR_UNUSED PL_CLEAR_UNUSED #define PR_CLEAR_ARENA PL_CLEAR_ARENA #define PR_ARENA_RELEASE PL_ARENA_RELEASE #define PR_COUNT_ARENA PL_COUNT_ARENA #define PR_ARENA_DESTROY PL_ARENA_DESTROY #define PR_InitArenaPool PL_InitArenaPool #define PR_FreeArenaPool PL_FreeArenaPool #define PR_FinishArenaPool PL_FinishArenaPool #define PR_CompactArenaPool PL_CompactArenaPool #define PR_ArenaFinish PL_ArenaFinish #define PR_ArenaAllocate PL_ArenaAllocate #define PR_ArenaGrow PL_ArenaGrow #define PR_ArenaRelease PL_ArenaRelease #define PR_ArenaCountAllocation PL_ArenaCountAllocation #define PR_ArenaCountInplaceGrowth PL_ArenaCountInplaceGrowth #define PR_ArenaCountGrowth PL_ArenaCountGrowth #define PR_ArenaCountRelease PL_ArenaCountRelease #define PR_ArenaCountRetract PL_ArenaCountRetract /* Re: prhash.h->plhash.h */ #define PRHashEntry PLHashEntry #define PRHashTable PLHashTable #define PRHashNumber PLHashNumber #define PRHashFunction PLHashFunction #define PRHashComparator PLHashComparator #define PRHashEnumerator PLHashEnumerator #define PRHashAllocOps PLHashAllocOps #define PR_NewHashTable PL_NewHashTable #define PR_HashTableDestroy PL_HashTableDestroy #define PR_HashTableRawLookup PL_HashTableRawLookup #define PR_HashTableRawAdd PL_HashTableRawAdd #define PR_HashTableRawRemove PL_HashTableRawRemove #define PR_HashTableAdd PL_HashTableAdd #define PR_HashTableRemove PL_HashTableRemove #define PR_HashTableEnumerateEntries PL_HashTableEnumerateEntries #define PR_HashTableLookup PL_HashTableLookup #define PR_HashTableDump PL_HashTableDump #define PR_HashString PL_HashString #define PR_CompareStrings PL_CompareStrings #define PR_CompareValues PL_CompareValues #if defined(XP_MAC) #ifndef TRUE /* Mac standard is lower case true */ #define TRUE 1 #endif #ifndef FALSE /* Mac standard is lower case false */ #define FALSE 0 #endif #endif #endif /* !defined(PROTYPES_H) */ djview4/nsdejavu/npsdk/prcpucfg.h000066400000000000000000000502211174072760700173650ustar00rootroot00000000000000/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is the Netscape Portable Runtime (NSPR). * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1998-2000 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ #ifndef nspr_cpucfg___ #define nspr_cpucfg___ #ifndef XP_UNIX #define XP_UNIX #endif #ifndef LINUX #define LINUX #endif #define PR_AF_INET6 10 /* same as AF_INET6 */ #ifdef __powerpc64__ #undef IS_LITTLE_ENDIAN #define IS_BIG_ENDIAN 1 #define IS_64 #define PR_BYTES_PER_BYTE 1 #define PR_BYTES_PER_SHORT 2 #define PR_BYTES_PER_INT 4 #define PR_BYTES_PER_INT64 8 #define PR_BYTES_PER_LONG 8 #define PR_BYTES_PER_FLOAT 4 #define PR_BYTES_PER_DOUBLE 8 #define PR_BYTES_PER_WORD 8 #define PR_BYTES_PER_DWORD 8 #define PR_BITS_PER_BYTE 8 #define PR_BITS_PER_SHORT 16 #define PR_BITS_PER_INT 32 #define PR_BITS_PER_INT64 64 #define PR_BITS_PER_LONG 64 #define PR_BITS_PER_FLOAT 32 #define PR_BITS_PER_DOUBLE 64 #define PR_BITS_PER_WORD 64 #define PR_BITS_PER_BYTE_LOG2 3 #define PR_BITS_PER_SHORT_LOG2 4 #define PR_BITS_PER_INT_LOG2 5 #define PR_BITS_PER_INT64_LOG2 6 #define PR_BITS_PER_LONG_LOG2 6 #define PR_BITS_PER_FLOAT_LOG2 5 #define PR_BITS_PER_DOUBLE_LOG2 6 #define PR_BITS_PER_WORD_LOG2 6 #define PR_ALIGN_OF_SHORT 2 #define PR_ALIGN_OF_INT 4 #define PR_ALIGN_OF_LONG 8 #define PR_ALIGN_OF_INT64 8 #define PR_ALIGN_OF_FLOAT 4 #define PR_ALIGN_OF_DOUBLE 8 #define PR_ALIGN_OF_POINTER 8 #define PR_ALIGN_OF_WORD 8 #define PR_BYTES_PER_WORD_LOG2 3 #define PR_BYTES_PER_DWORD_LOG2 3 #elif defined(__powerpc__) #undef IS_LITTLE_ENDIAN #define IS_BIG_ENDIAN 1 #define PR_BYTES_PER_BYTE 1 #define PR_BYTES_PER_SHORT 2 #define PR_BYTES_PER_INT 4 #define PR_BYTES_PER_INT64 8 #define PR_BYTES_PER_LONG 4 #define PR_BYTES_PER_FLOAT 4 #define PR_BYTES_PER_DOUBLE 8 #define PR_BYTES_PER_WORD 4 #define PR_BYTES_PER_DWORD 8 #define PR_BITS_PER_BYTE 8 #define PR_BITS_PER_SHORT 16 #define PR_BITS_PER_INT 32 #define PR_BITS_PER_INT64 64 #define PR_BITS_PER_LONG 32 #define PR_BITS_PER_FLOAT 32 #define PR_BITS_PER_DOUBLE 64 #define PR_BITS_PER_WORD 32 #define PR_BITS_PER_BYTE_LOG2 3 #define PR_BITS_PER_SHORT_LOG2 4 #define PR_BITS_PER_INT_LOG2 5 #define PR_BITS_PER_INT64_LOG2 6 #define PR_BITS_PER_LONG_LOG2 5 #define PR_BITS_PER_FLOAT_LOG2 5 #define PR_BITS_PER_DOUBLE_LOG2 6 #define PR_BITS_PER_WORD_LOG2 5 #define PR_ALIGN_OF_SHORT 2 #define PR_ALIGN_OF_INT 4 #define PR_ALIGN_OF_LONG 4 #define PR_ALIGN_OF_INT64 8 #define PR_ALIGN_OF_FLOAT 4 #define PR_ALIGN_OF_DOUBLE 8 #define PR_ALIGN_OF_POINTER 4 #define PR_ALIGN_OF_WORD 4 #define PR_BYTES_PER_WORD_LOG2 2 #define PR_BYTES_PER_DWORD_LOG2 3 #elif defined(__alpha) #define IS_LITTLE_ENDIAN 1 #undef IS_BIG_ENDIAN #define IS_64 #define PR_BYTES_PER_BYTE 1 #define PR_BYTES_PER_SHORT 2 #define PR_BYTES_PER_INT 4 #define PR_BYTES_PER_INT64 8 #define PR_BYTES_PER_LONG 8 #define PR_BYTES_PER_FLOAT 4 #define PR_BYTES_PER_DOUBLE 8 #define PR_BYTES_PER_WORD 8 #define PR_BYTES_PER_DWORD 8 #define PR_BITS_PER_BYTE 8 #define PR_BITS_PER_SHORT 16 #define PR_BITS_PER_INT 32 #define PR_BITS_PER_INT64 64 #define PR_BITS_PER_LONG 64 #define PR_BITS_PER_FLOAT 32 #define PR_BITS_PER_DOUBLE 64 #define PR_BITS_PER_WORD 64 #define PR_BITS_PER_BYTE_LOG2 3 #define PR_BITS_PER_SHORT_LOG2 4 #define PR_BITS_PER_INT_LOG2 5 #define PR_BITS_PER_INT64_LOG2 6 #define PR_BITS_PER_LONG_LOG2 6 #define PR_BITS_PER_FLOAT_LOG2 5 #define PR_BITS_PER_DOUBLE_LOG2 6 #define PR_BITS_PER_WORD_LOG2 6 #define PR_ALIGN_OF_SHORT 2 #define PR_ALIGN_OF_INT 4 #define PR_ALIGN_OF_LONG 8 #define PR_ALIGN_OF_INT64 8 #define PR_ALIGN_OF_FLOAT 4 #define PR_ALIGN_OF_DOUBLE 8 #define PR_ALIGN_OF_POINTER 8 #define PR_ALIGN_OF_WORD 8 #define PR_BYTES_PER_WORD_LOG2 3 #define PR_BYTES_PER_DWORD_LOG2 3 #elif defined(__ia64__) #define IS_LITTLE_ENDIAN 1 #undef IS_BIG_ENDIAN #define IS_64 #define PR_BYTES_PER_BYTE 1 #define PR_BYTES_PER_SHORT 2 #define PR_BYTES_PER_INT 4 #define PR_BYTES_PER_INT64 8 #define PR_BYTES_PER_LONG 8 #define PR_BYTES_PER_FLOAT 4 #define PR_BYTES_PER_DOUBLE 8 #define PR_BYTES_PER_WORD 8 #define PR_BYTES_PER_DWORD 8 #define PR_BITS_PER_BYTE 8 #define PR_BITS_PER_SHORT 16 #define PR_BITS_PER_INT 32 #define PR_BITS_PER_INT64 64 #define PR_BITS_PER_LONG 64 #define PR_BITS_PER_FLOAT 32 #define PR_BITS_PER_DOUBLE 64 #define PR_BITS_PER_WORD 64 #define PR_BITS_PER_BYTE_LOG2 3 #define PR_BITS_PER_SHORT_LOG2 4 #define PR_BITS_PER_INT_LOG2 5 #define PR_BITS_PER_INT64_LOG2 6 #define PR_BITS_PER_LONG_LOG2 6 #define PR_BITS_PER_FLOAT_LOG2 5 #define PR_BITS_PER_DOUBLE_LOG2 6 #define PR_BITS_PER_WORD_LOG2 6 #define PR_ALIGN_OF_SHORT 2 #define PR_ALIGN_OF_INT 4 #define PR_ALIGN_OF_LONG 8 #define PR_ALIGN_OF_INT64 8 #define PR_ALIGN_OF_FLOAT 4 #define PR_ALIGN_OF_DOUBLE 8 #define PR_ALIGN_OF_POINTER 8 #define PR_ALIGN_OF_WORD 8 #define PR_BYTES_PER_WORD_LOG2 3 #define PR_BYTES_PER_DWORD_LOG2 3 #elif defined(__x86_64__) #define IS_LITTLE_ENDIAN 1 #undef IS_BIG_ENDIAN #define IS_64 #define PR_BYTES_PER_BYTE 1 #define PR_BYTES_PER_SHORT 2 #define PR_BYTES_PER_INT 4 #define PR_BYTES_PER_INT64 8 #define PR_BYTES_PER_LONG 8 #define PR_BYTES_PER_FLOAT 4 #define PR_BYTES_PER_DOUBLE 8 #define PR_BYTES_PER_WORD 8 #define PR_BYTES_PER_DWORD 8 #define PR_BITS_PER_BYTE 8 #define PR_BITS_PER_SHORT 16 #define PR_BITS_PER_INT 32 #define PR_BITS_PER_INT64 64 #define PR_BITS_PER_LONG 64 #define PR_BITS_PER_FLOAT 32 #define PR_BITS_PER_DOUBLE 64 #define PR_BITS_PER_WORD 64 #define PR_BITS_PER_BYTE_LOG2 3 #define PR_BITS_PER_SHORT_LOG2 4 #define PR_BITS_PER_INT_LOG2 5 #define PR_BITS_PER_INT64_LOG2 6 #define PR_BITS_PER_LONG_LOG2 6 #define PR_BITS_PER_FLOAT_LOG2 5 #define PR_BITS_PER_DOUBLE_LOG2 6 #define PR_BITS_PER_WORD_LOG2 6 #define PR_ALIGN_OF_SHORT 2 #define PR_ALIGN_OF_INT 4 #define PR_ALIGN_OF_LONG 8 #define PR_ALIGN_OF_INT64 8 #define PR_ALIGN_OF_FLOAT 4 #define PR_ALIGN_OF_DOUBLE 8 #define PR_ALIGN_OF_POINTER 8 #define PR_ALIGN_OF_WORD 8 #define PR_BYTES_PER_WORD_LOG2 3 #define PR_BYTES_PER_DWORD_LOG2 3 #elif defined(__mc68000__) #undef IS_LITTLE_ENDIAN #define IS_BIG_ENDIAN 1 #define PR_BYTES_PER_BYTE 1 #define PR_BYTES_PER_SHORT 2 #define PR_BYTES_PER_INT 4 #define PR_BYTES_PER_INT64 8 #define PR_BYTES_PER_LONG 4 #define PR_BYTES_PER_FLOAT 4 #define PR_BYTES_PER_DOUBLE 8 #define PR_BYTES_PER_WORD 4 #define PR_BYTES_PER_DWORD 8 #define PR_BITS_PER_BYTE 8 #define PR_BITS_PER_SHORT 16 #define PR_BITS_PER_INT 32 #define PR_BITS_PER_INT64 64 #define PR_BITS_PER_LONG 32 #define PR_BITS_PER_FLOAT 32 #define PR_BITS_PER_DOUBLE 64 #define PR_BITS_PER_WORD 32 #define PR_BITS_PER_BYTE_LOG2 3 #define PR_BITS_PER_SHORT_LOG2 4 #define PR_BITS_PER_INT_LOG2 5 #define PR_BITS_PER_INT64_LOG2 6 #define PR_BITS_PER_LONG_LOG2 5 #define PR_BITS_PER_FLOAT_LOG2 5 #define PR_BITS_PER_DOUBLE_LOG2 6 #define PR_BITS_PER_WORD_LOG2 5 #define PR_ALIGN_OF_SHORT 2 #define PR_ALIGN_OF_INT 2 #define PR_ALIGN_OF_LONG 2 #define PR_ALIGN_OF_INT64 2 #define PR_ALIGN_OF_FLOAT 2 #define PR_ALIGN_OF_DOUBLE 2 #define PR_ALIGN_OF_POINTER 2 #define PR_ALIGN_OF_WORD 2 #define PR_BYTES_PER_WORD_LOG2 2 #define PR_BYTES_PER_DWORD_LOG2 3 #elif defined(__sparc__) #undef IS_LITTLE_ENDIAN #define IS_BIG_ENDIAN 1 #define PR_BYTES_PER_BYTE 1 #define PR_BYTES_PER_SHORT 2 #define PR_BYTES_PER_INT 4 #define PR_BYTES_PER_INT64 8 #define PR_BYTES_PER_LONG 4 #define PR_BYTES_PER_FLOAT 4 #define PR_BYTES_PER_DOUBLE 8 #define PR_BYTES_PER_WORD 4 #define PR_BYTES_PER_DWORD 8 #define PR_BITS_PER_BYTE 8 #define PR_BITS_PER_SHORT 16 #define PR_BITS_PER_INT 32 #define PR_BITS_PER_INT64 64 #define PR_BITS_PER_LONG 32 #define PR_BITS_PER_FLOAT 32 #define PR_BITS_PER_DOUBLE 64 #define PR_BITS_PER_WORD 32 #define PR_BITS_PER_BYTE_LOG2 3 #define PR_BITS_PER_SHORT_LOG2 4 #define PR_BITS_PER_INT_LOG2 5 #define PR_BITS_PER_INT64_LOG2 6 #define PR_BITS_PER_LONG_LOG2 5 #define PR_BITS_PER_FLOAT_LOG2 5 #define PR_BITS_PER_DOUBLE_LOG2 6 #define PR_BITS_PER_WORD_LOG2 5 #define PR_ALIGN_OF_SHORT 2 #define PR_ALIGN_OF_INT 4 #define PR_ALIGN_OF_LONG 4 #define PR_ALIGN_OF_INT64 8 #define PR_ALIGN_OF_FLOAT 4 #define PR_ALIGN_OF_DOUBLE 8 #define PR_ALIGN_OF_POINTER 4 #define PR_ALIGN_OF_WORD 4 #define PR_BYTES_PER_WORD_LOG2 2 #define PR_BYTES_PER_DWORD_LOG2 3 #elif defined(__i386__) #define IS_LITTLE_ENDIAN 1 #undef IS_BIG_ENDIAN #define PR_BYTES_PER_BYTE 1 #define PR_BYTES_PER_SHORT 2 #define PR_BYTES_PER_INT 4 #define PR_BYTES_PER_INT64 8 #define PR_BYTES_PER_LONG 4 #define PR_BYTES_PER_FLOAT 4 #define PR_BYTES_PER_DOUBLE 8 #define PR_BYTES_PER_WORD 4 #define PR_BYTES_PER_DWORD 8 #define PR_BITS_PER_BYTE 8 #define PR_BITS_PER_SHORT 16 #define PR_BITS_PER_INT 32 #define PR_BITS_PER_INT64 64 #define PR_BITS_PER_LONG 32 #define PR_BITS_PER_FLOAT 32 #define PR_BITS_PER_DOUBLE 64 #define PR_BITS_PER_WORD 32 #define PR_BITS_PER_BYTE_LOG2 3 #define PR_BITS_PER_SHORT_LOG2 4 #define PR_BITS_PER_INT_LOG2 5 #define PR_BITS_PER_INT64_LOG2 6 #define PR_BITS_PER_LONG_LOG2 5 #define PR_BITS_PER_FLOAT_LOG2 5 #define PR_BITS_PER_DOUBLE_LOG2 6 #define PR_BITS_PER_WORD_LOG2 5 #define PR_ALIGN_OF_SHORT 2 #define PR_ALIGN_OF_INT 4 #define PR_ALIGN_OF_LONG 4 #define PR_ALIGN_OF_INT64 4 #define PR_ALIGN_OF_FLOAT 4 #define PR_ALIGN_OF_DOUBLE 4 #define PR_ALIGN_OF_POINTER 4 #define PR_ALIGN_OF_WORD 4 #define PR_BYTES_PER_WORD_LOG2 2 #define PR_BYTES_PER_DWORD_LOG2 3 #elif defined(__mips__) #ifdef __MIPSEB__ #define IS_BIG_ENDIAN 1 #undef IS_LITTLE_ENDIAN #elif defined(__MIPSEL__) #define IS_LITTLE_ENDIAN 1 #undef IS_BIG_ENDIAN #else #error "Unknown MIPS endianness." #endif #define PR_BYTES_PER_BYTE 1 #define PR_BYTES_PER_SHORT 2 #define PR_BYTES_PER_INT 4 #define PR_BYTES_PER_INT64 8 #define PR_BYTES_PER_LONG 4 #define PR_BYTES_PER_FLOAT 4 #define PR_BYTES_PER_DOUBLE 8 #define PR_BYTES_PER_WORD 4 #define PR_BYTES_PER_DWORD 8 #define PR_BITS_PER_BYTE 8 #define PR_BITS_PER_SHORT 16 #define PR_BITS_PER_INT 32 #define PR_BITS_PER_INT64 64 #define PR_BITS_PER_LONG 32 #define PR_BITS_PER_FLOAT 32 #define PR_BITS_PER_DOUBLE 64 #define PR_BITS_PER_WORD 32 #define PR_BITS_PER_BYTE_LOG2 3 #define PR_BITS_PER_SHORT_LOG2 4 #define PR_BITS_PER_INT_LOG2 5 #define PR_BITS_PER_INT64_LOG2 6 #define PR_BITS_PER_LONG_LOG2 5 #define PR_BITS_PER_FLOAT_LOG2 5 #define PR_BITS_PER_DOUBLE_LOG2 6 #define PR_BITS_PER_WORD_LOG2 5 #define PR_ALIGN_OF_SHORT 2 #define PR_ALIGN_OF_INT 4 #define PR_ALIGN_OF_LONG 4 #define PR_ALIGN_OF_INT64 8 #define PR_ALIGN_OF_FLOAT 4 #define PR_ALIGN_OF_DOUBLE 8 #define PR_ALIGN_OF_POINTER 4 #define PR_ALIGN_OF_WORD 4 #define PR_BYTES_PER_WORD_LOG2 2 #define PR_BYTES_PER_DWORD_LOG2 3 #elif defined(__arm__) #define IS_LITTLE_ENDIAN 1 #undef IS_BIG_ENDIAN #define PR_BYTES_PER_BYTE 1 #define PR_BYTES_PER_SHORT 2 #define PR_BYTES_PER_INT 4 #define PR_BYTES_PER_INT64 8 #define PR_BYTES_PER_LONG 4 #define PR_BYTES_PER_FLOAT 4 #define PR_BYTES_PER_DOUBLE 8 #define PR_BYTES_PER_WORD 4 #define PR_BYTES_PER_DWORD 8 #define PR_BITS_PER_BYTE 8 #define PR_BITS_PER_SHORT 16 #define PR_BITS_PER_INT 32 #define PR_BITS_PER_INT64 64 #define PR_BITS_PER_LONG 32 #define PR_BITS_PER_FLOAT 32 #define PR_BITS_PER_DOUBLE 64 #define PR_BITS_PER_WORD 32 #define PR_BITS_PER_BYTE_LOG2 3 #define PR_BITS_PER_SHORT_LOG2 4 #define PR_BITS_PER_INT_LOG2 5 #define PR_BITS_PER_INT64_LOG2 6 #define PR_BITS_PER_LONG_LOG2 5 #define PR_BITS_PER_FLOAT_LOG2 5 #define PR_BITS_PER_DOUBLE_LOG2 6 #define PR_BITS_PER_WORD_LOG2 5 #define PR_ALIGN_OF_SHORT 2 #define PR_ALIGN_OF_INT 4 #define PR_ALIGN_OF_LONG 4 #define PR_ALIGN_OF_INT64 4 #define PR_ALIGN_OF_FLOAT 4 #define PR_ALIGN_OF_DOUBLE 4 #define PR_ALIGN_OF_POINTER 4 #define PR_ALIGN_OF_WORD 4 #define PR_BYTES_PER_WORD_LOG2 2 #define PR_BYTES_PER_DWORD_LOG2 3 #elif defined(__hppa__) #undef IS_LITTLE_ENDIAN #define IS_BIG_ENDIAN 1 #define PR_BYTES_PER_BYTE 1 #define PR_BYTES_PER_SHORT 2 #define PR_BYTES_PER_INT 4 #define PR_BYTES_PER_INT64 8 #define PR_BYTES_PER_LONG 4 #define PR_BYTES_PER_FLOAT 4 #define PR_BYTES_PER_DOUBLE 8 #define PR_BYTES_PER_WORD 4 #define PR_BYTES_PER_DWORD 8 #define PR_BITS_PER_BYTE 8 #define PR_BITS_PER_SHORT 16 #define PR_BITS_PER_INT 32 #define PR_BITS_PER_INT64 64 #define PR_BITS_PER_LONG 32 #define PR_BITS_PER_FLOAT 32 #define PR_BITS_PER_DOUBLE 64 #define PR_BITS_PER_WORD 32 #define PR_BITS_PER_BYTE_LOG2 3 #define PR_BITS_PER_SHORT_LOG2 4 #define PR_BITS_PER_INT_LOG2 5 #define PR_BITS_PER_INT64_LOG2 6 #define PR_BITS_PER_LONG_LOG2 5 #define PR_BITS_PER_FLOAT_LOG2 5 #define PR_BITS_PER_DOUBLE_LOG2 6 #define PR_BITS_PER_WORD_LOG2 5 #define PR_ALIGN_OF_SHORT 2 #define PR_ALIGN_OF_INT 4 #define PR_ALIGN_OF_LONG 4 #define PR_ALIGN_OF_INT64 8 #define PR_ALIGN_OF_FLOAT 4 #define PR_ALIGN_OF_DOUBLE 8 #define PR_ALIGN_OF_POINTER 4 #define PR_ALIGN_OF_WORD 4 #define PR_BYTES_PER_WORD_LOG2 2 #define PR_BYTES_PER_DWORD_LOG2 3 #elif defined(__s390x__) #define IS_BIG_ENDIAN 1 #undef IS_LITTLE_ENDIAN #define IS_64 #define PR_BYTES_PER_BYTE 1 #define PR_BYTES_PER_SHORT 2 #define PR_BYTES_PER_INT 4 #define PR_BYTES_PER_INT64 8 #define PR_BYTES_PER_LONG 8 #define PR_BYTES_PER_FLOAT 4 #define PR_BYTES_PER_DOUBLE 8 #define PR_BYTES_PER_WORD 8 #define PR_BYTES_PER_DWORD 8 #define PR_BITS_PER_BYTE 8 #define PR_BITS_PER_SHORT 16 #define PR_BITS_PER_INT 32 #define PR_BITS_PER_INT64 64 #define PR_BITS_PER_LONG 64 #define PR_BITS_PER_FLOAT 32 #define PR_BITS_PER_DOUBLE 64 #define PR_BITS_PER_WORD 64 #define PR_BITS_PER_BYTE_LOG2 3 #define PR_BITS_PER_SHORT_LOG2 4 #define PR_BITS_PER_INT_LOG2 5 #define PR_BITS_PER_INT64_LOG2 6 #define PR_BITS_PER_LONG_LOG2 6 #define PR_BITS_PER_FLOAT_LOG2 5 #define PR_BITS_PER_DOUBLE_LOG2 6 #define PR_BITS_PER_WORD_LOG2 6 #define PR_ALIGN_OF_SHORT 2 #define PR_ALIGN_OF_INT 4 #define PR_ALIGN_OF_LONG 8 #define PR_ALIGN_OF_INT64 8 #define PR_ALIGN_OF_FLOAT 4 #define PR_ALIGN_OF_DOUBLE 8 #define PR_ALIGN_OF_POINTER 8 #define PR_ALIGN_OF_WORD 8 #define PR_BYTES_PER_WORD_LOG2 3 #define PR_BYTES_PER_DWORD_LOG2 3 #elif defined(__s390__) #define IS_BIG_ENDIAN 1 #undef IS_LITTLE_ENDIAN #define PR_BYTES_PER_BYTE 1 #define PR_BYTES_PER_SHORT 2 #define PR_BYTES_PER_INT 4 #define PR_BYTES_PER_INT64 8 #define PR_BYTES_PER_LONG 4 #define PR_BYTES_PER_FLOAT 4 #define PR_BYTES_PER_DOUBLE 8 #define PR_BYTES_PER_WORD 4 #define PR_BYTES_PER_DWORD 8 #define PR_BITS_PER_BYTE 8 #define PR_BITS_PER_SHORT 16 #define PR_BITS_PER_INT 32 #define PR_BITS_PER_INT64 64 #define PR_BITS_PER_LONG 32 #define PR_BITS_PER_FLOAT 32 #define PR_BITS_PER_DOUBLE 64 #define PR_BITS_PER_WORD 32 #define PR_BITS_PER_BYTE_LOG2 3 #define PR_BITS_PER_SHORT_LOG2 4 #define PR_BITS_PER_INT_LOG2 5 #define PR_BITS_PER_INT64_LOG2 6 #define PR_BITS_PER_LONG_LOG2 5 #define PR_BITS_PER_FLOAT_LOG2 5 #define PR_BITS_PER_DOUBLE_LOG2 6 #define PR_BITS_PER_WORD_LOG2 5 #define PR_ALIGN_OF_SHORT 2 #define PR_ALIGN_OF_INT 4 #define PR_ALIGN_OF_LONG 4 #define PR_ALIGN_OF_INT64 4 #define PR_ALIGN_OF_FLOAT 4 #define PR_ALIGN_OF_DOUBLE 4 #define PR_ALIGN_OF_POINTER 4 #define PR_ALIGN_OF_WORD 4 #define PR_BYTES_PER_WORD_LOG2 2 #define PR_BYTES_PER_DWORD_LOG2 3 #elif defined(__sh__) #ifdef __LITTLE_ENDIAN__ #define IS_LITTLE_ENDIAN 1 #undef IS_BIG_ENDIAN #else #define IS_BIG_ENDIAN 1 #undef IS_LITTLE_ENDIAN #endif #define PR_BYTES_PER_BYTE 1 #define PR_BYTES_PER_SHORT 2 #define PR_BYTES_PER_INT 4 #define PR_BYTES_PER_INT64 8 #define PR_BYTES_PER_LONG 4 #define PR_BYTES_PER_FLOAT 4 #define PR_BYTES_PER_DOUBLE 8 #define PR_BYTES_PER_WORD 4 #define PR_BYTES_PER_DWORD 8 #define PR_BITS_PER_BYTE 8 #define PR_BITS_PER_SHORT 16 #define PR_BITS_PER_INT 32 #define PR_BITS_PER_INT64 64 #define PR_BITS_PER_LONG 32 #define PR_BITS_PER_FLOAT 32 #define PR_BITS_PER_DOUBLE 64 #define PR_BITS_PER_WORD 32 #define PR_BITS_PER_BYTE_LOG2 3 #define PR_BITS_PER_SHORT_LOG2 4 #define PR_BITS_PER_INT_LOG2 5 #define PR_BITS_PER_INT64_LOG2 6 #define PR_BITS_PER_LONG_LOG2 5 #define PR_BITS_PER_FLOAT_LOG2 5 #define PR_BITS_PER_DOUBLE_LOG2 6 #define PR_BITS_PER_WORD_LOG2 5 #define PR_ALIGN_OF_SHORT 2 #define PR_ALIGN_OF_INT 4 #define PR_ALIGN_OF_LONG 4 #define PR_ALIGN_OF_INT64 8 #define PR_ALIGN_OF_FLOAT 4 #define PR_ALIGN_OF_DOUBLE 8 #define PR_ALIGN_OF_POINTER 4 #define PR_ALIGN_OF_WORD 4 #define PR_BYTES_PER_WORD_LOG2 2 #define PR_BYTES_PER_DWORD_LOG2 3 #else #error "Unknown CPU architecture" #endif #define HAVE_LONG_LONG #if PR_ALIGN_OF_DOUBLE == 8 #define HAVE_ALIGNED_DOUBLES #endif #if PR_ALIGN_OF_INT64 == 8 #define HAVE_ALIGNED_LONGLONGS #endif #ifndef NO_NSPR_10_SUPPORT #define BYTES_PER_BYTE PR_BYTES_PER_BYTE #define BYTES_PER_SHORT PR_BYTES_PER_SHORT #define BYTES_PER_INT PR_BYTES_PER_INT #define BYTES_PER_INT64 PR_BYTES_PER_INT64 #define BYTES_PER_LONG PR_BYTES_PER_LONG #define BYTES_PER_FLOAT PR_BYTES_PER_FLOAT #define BYTES_PER_DOUBLE PR_BYTES_PER_DOUBLE #define BYTES_PER_WORD PR_BYTES_PER_WORD #define BYTES_PER_DWORD PR_BYTES_PER_DWORD #define BITS_PER_BYTE PR_BITS_PER_BYTE #define BITS_PER_SHORT PR_BITS_PER_SHORT #define BITS_PER_INT PR_BITS_PER_INT #define BITS_PER_INT64 PR_BITS_PER_INT64 #define BITS_PER_LONG PR_BITS_PER_LONG #define BITS_PER_FLOAT PR_BITS_PER_FLOAT #define BITS_PER_DOUBLE PR_BITS_PER_DOUBLE #define BITS_PER_WORD PR_BITS_PER_WORD #define BITS_PER_BYTE_LOG2 PR_BITS_PER_BYTE_LOG2 #define BITS_PER_SHORT_LOG2 PR_BITS_PER_SHORT_LOG2 #define BITS_PER_INT_LOG2 PR_BITS_PER_INT_LOG2 #define BITS_PER_INT64_LOG2 PR_BITS_PER_INT64_LOG2 #define BITS_PER_LONG_LOG2 PR_BITS_PER_LONG_LOG2 #define BITS_PER_FLOAT_LOG2 PR_BITS_PER_FLOAT_LOG2 #define BITS_PER_DOUBLE_LOG2 PR_BITS_PER_DOUBLE_LOG2 #define BITS_PER_WORD_LOG2 PR_BITS_PER_WORD_LOG2 #define ALIGN_OF_SHORT PR_ALIGN_OF_SHORT #define ALIGN_OF_INT PR_ALIGN_OF_INT #define ALIGN_OF_LONG PR_ALIGN_OF_LONG #define ALIGN_OF_INT64 PR_ALIGN_OF_INT64 #define ALIGN_OF_FLOAT PR_ALIGN_OF_FLOAT #define ALIGN_OF_DOUBLE PR_ALIGN_OF_DOUBLE #define ALIGN_OF_POINTER PR_ALIGN_OF_POINTER #define ALIGN_OF_WORD PR_ALIGN_OF_WORD #define BYTES_PER_WORD_LOG2 PR_BYTES_PER_WORD_LOG2 #define BYTES_PER_DWORD_LOG2 PR_BYTES_PER_DWORD_LOG2 #define WORDS_PER_DWORD_LOG2 PR_WORDS_PER_DWORD_LOG2 #endif /* NO_NSPR_10_SUPPORT */ #endif /* nspr_cpucfg___ */ djview4/nsdejavu/npsdk/prtypes.h000066400000000000000000000467761174072760700173060ustar00rootroot00000000000000/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is the Netscape Portable Runtime (NSPR). * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1998-2000 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ /* ** File: prtypes.h ** Description: Definitions of NSPR's basic types ** ** Prototypes and macros used to make up for deficiencies that we have found ** in ANSI environments. ** ** Since we do not wrap and all the other standard headers, authors ** of portable code will not know in general that they need these definitions. ** Instead of requiring these authors to find the dependent uses in their code ** and take the following steps only in those C files, we take steps once here ** for all C files. **/ #ifndef prtypes_h___ #define prtypes_h___ #ifdef MDCPUCFG #include MDCPUCFG #else #include "prcpucfg.h" #endif #include /*********************************************************************** ** MACROS: PR_EXTERN ** PR_IMPLEMENT ** DESCRIPTION: ** These are only for externally visible routines and globals. For ** internal routines, just use "extern" for type checking and that ** will not export internal cross-file or forward-declared symbols. ** Define a macro for declaring procedures return types. We use this to ** deal with windoze specific type hackery for DLL definitions. Use ** PR_EXTERN when the prototype for the method is declared. Use ** PR_IMPLEMENT for the implementation of the method. ** ** Example: ** in dowhim.h ** PR_EXTERN( void ) DoWhatIMean( void ); ** in dowhim.c ** PR_IMPLEMENT( void ) DoWhatIMean( void ) { return; } ** ** ***********************************************************************/ #if defined(WIN32) #define PR_EXPORT(__type) extern __declspec(dllexport) __type #define PR_EXPORT_DATA(__type) extern __declspec(dllexport) __type #define PR_IMPORT(__type) __declspec(dllimport) __type #define PR_IMPORT_DATA(__type) __declspec(dllimport) __type #define PR_EXTERN(__type) extern __declspec(dllexport) __type #define PR_IMPLEMENT(__type) __declspec(dllexport) __type #define PR_EXTERN_DATA(__type) extern __declspec(dllexport) __type #define PR_IMPLEMENT_DATA(__type) __declspec(dllexport) __type #define PR_CALLBACK #define PR_CALLBACK_DECL #define PR_STATIC_CALLBACK(__x) static __x #elif defined(XP_BEOS) #define PR_EXPORT(__type) extern __declspec(dllexport) __type #define PR_EXPORT_DATA(__type) extern __declspec(dllexport) __type #define PR_IMPORT(__type) extern __declspec(dllexport) __type #define PR_IMPORT_DATA(__type) extern __declspec(dllexport) __type #define PR_EXTERN(__type) extern __declspec(dllexport) __type #define PR_IMPLEMENT(__type) __declspec(dllexport) __type #define PR_EXTERN_DATA(__type) extern __declspec(dllexport) __type #define PR_IMPLEMENT_DATA(__type) __declspec(dllexport) __type #define PR_CALLBACK #define PR_CALLBACK_DECL #define PR_STATIC_CALLBACK(__x) static __x #elif defined(WIN16) #define PR_CALLBACK_DECL __cdecl #if defined(_WINDLL) #define PR_EXPORT(__type) extern __type _cdecl _export _loadds #define PR_IMPORT(__type) extern __type _cdecl _export _loadds #define PR_EXPORT_DATA(__type) extern __type _export #define PR_IMPORT_DATA(__type) extern __type _export #define PR_EXTERN(__type) extern __type _cdecl _export _loadds #define PR_IMPLEMENT(__type) __type _cdecl _export _loadds #define PR_EXTERN_DATA(__type) extern __type _export #define PR_IMPLEMENT_DATA(__type) __type _export #define PR_CALLBACK __cdecl __loadds #define PR_STATIC_CALLBACK(__x) static __x PR_CALLBACK #else /* this must be .EXE */ #define PR_EXPORT(__type) extern __type _cdecl _export #define PR_IMPORT(__type) extern __type _cdecl _export #define PR_EXPORT_DATA(__type) extern __type _export #define PR_IMPORT_DATA(__type) extern __type _export #define PR_EXTERN(__type) extern __type _cdecl _export #define PR_IMPLEMENT(__type) __type _cdecl _export #define PR_EXTERN_DATA(__type) extern __type _export #define PR_IMPLEMENT_DATA(__type) __type _export #define PR_CALLBACK __cdecl __loadds #define PR_STATIC_CALLBACK(__x) __x PR_CALLBACK #endif /* _WINDLL */ #elif defined(XP_MAC) #define PR_EXPORT(__type) extern __declspec(export) __type #define PR_EXPORT_DATA(__type) extern __declspec(export) __type #define PR_IMPORT(__type) extern __declspec(export) __type #define PR_IMPORT_DATA(__type) extern __declspec(export) __type #define PR_EXTERN(__type) extern __declspec(export) __type #define PR_IMPLEMENT(__type) __declspec(export) __type #define PR_EXTERN_DATA(__type) extern __declspec(export) __type #define PR_IMPLEMENT_DATA(__type) __declspec(export) __type #define PR_CALLBACK #define PR_CALLBACK_DECL #define PR_STATIC_CALLBACK(__x) static __x #elif defined(XP_OS2) && defined(__declspec) #define PR_EXPORT(__type) extern __declspec(dllexport) __type #define PR_EXPORT_DATA(__type) extern __declspec(dllexport) __type #define PR_IMPORT(__type) extern __declspec(dllimport) __type #define PR_IMPORT_DATA(__type) extern __declspec(dllimport) __type #define PR_EXTERN(__type) extern __declspec(dllexport) __type #define PR_IMPLEMENT(__type) __declspec(dllexport) __type #define PR_EXTERN_DATA(__type) extern __declspec(dllexport) __type #define PR_IMPLEMENT_DATA(__type) __declspec(dllexport) __type #define PR_CALLBACK #define PR_CALLBACK_DECL #define PR_STATIC_CALLBACK(__x) static __x #elif defined(XP_OS2_VACPP) #define PR_EXPORT(__type) extern __type #define PR_EXPORT_DATA(__type) extern __type #define PR_IMPORT(__type) extern __type #define PR_IMPORT_DATA(__type) extern __type #define PR_EXTERN(__type) extern __type #define PR_IMPLEMENT(__type) __type #define PR_EXTERN_DATA(__type) extern __type #define PR_IMPLEMENT_DATA(__type) __type #define PR_CALLBACK _Optlink #define PR_CALLBACK_DECL #define PR_STATIC_CALLBACK(__x) static __x PR_CALLBACK #else /* Unix */ /* GCC 3.3 and later support the visibility attribute. */ #if (__GNUC__ >= 4) || \ (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) #define PR_VISIBILITY_DEFAULT __attribute__((visibility("default"))) #else #define PR_VISIBILITY_DEFAULT #endif #define PR_EXPORT(__type) extern PR_VISIBILITY_DEFAULT __type #define PR_EXPORT_DATA(__type) extern PR_VISIBILITY_DEFAULT __type #define PR_IMPORT(__type) extern PR_VISIBILITY_DEFAULT __type #define PR_IMPORT_DATA(__type) extern PR_VISIBILITY_DEFAULT __type #define PR_EXTERN(__type) extern PR_VISIBILITY_DEFAULT __type #define PR_IMPLEMENT(__type) PR_VISIBILITY_DEFAULT __type #define PR_EXTERN_DATA(__type) extern PR_VISIBILITY_DEFAULT __type #define PR_IMPLEMENT_DATA(__type) PR_VISIBILITY_DEFAULT __type #define PR_CALLBACK #define PR_CALLBACK_DECL #define PR_STATIC_CALLBACK(__x) static __x #endif #if defined(_NSPR_BUILD_) #define NSPR_API(__type) PR_EXPORT(__type) #define NSPR_DATA_API(__type) PR_EXPORT_DATA(__type) #else #define NSPR_API(__type) PR_IMPORT(__type) #define NSPR_DATA_API(__type) PR_IMPORT_DATA(__type) #endif /*********************************************************************** ** MACROS: PR_BEGIN_MACRO ** PR_END_MACRO ** DESCRIPTION: ** Macro body brackets so that macros with compound statement definitions ** behave syntactically more like functions when called. ***********************************************************************/ #define PR_BEGIN_MACRO do { #define PR_END_MACRO } while (0) /*********************************************************************** ** MACROS: PR_BEGIN_EXTERN_C ** PR_END_EXTERN_C ** DESCRIPTION: ** Macro shorthands for conditional C++ extern block delimiters. ***********************************************************************/ #ifdef __cplusplus #define PR_BEGIN_EXTERN_C extern "C" { #define PR_END_EXTERN_C } #else #define PR_BEGIN_EXTERN_C #define PR_END_EXTERN_C #endif /*********************************************************************** ** MACROS: PR_BIT ** PR_BITMASK ** DESCRIPTION: ** Bit masking macros. XXX n must be <= 31 to be portable ***********************************************************************/ #define PR_BIT(n) ((PRUint32)1 << (n)) #define PR_BITMASK(n) (PR_BIT(n) - 1) /*********************************************************************** ** MACROS: PR_ROUNDUP ** PR_MIN ** PR_MAX ** PR_ABS ** DESCRIPTION: ** Commonly used macros for operations on compatible types. ***********************************************************************/ #define PR_ROUNDUP(x,y) ((((x)+((y)-1))/(y))*(y)) #define PR_MIN(x,y) ((x)<(y)?(x):(y)) #define PR_MAX(x,y) ((x)>(y)?(x):(y)) #define PR_ABS(x) ((x)<0?-(x):(x)) PR_BEGIN_EXTERN_C /************************************************************************ ** TYPES: PRUint8 ** PRInt8 ** DESCRIPTION: ** The int8 types are known to be 8 bits each. There is no type that ** is equivalent to a plain "char". ************************************************************************/ #if PR_BYTES_PER_BYTE == 1 typedef unsigned char PRUint8; /* ** Some cfront-based C++ compilers do not like 'signed char' and ** issue the warning message: ** warning: "signed" not implemented (ignored) ** For these compilers, we have to define PRInt8 as plain 'char'. ** Make sure that plain 'char' is indeed signed under these compilers. */ #if (defined(HPUX) && defined(__cplusplus) \ && !defined(__GNUC__) && __cplusplus < 199707L) \ || (defined(SCO) && defined(__cplusplus) \ && !defined(__GNUC__) && __cplusplus == 1L) typedef char PRInt8; #else typedef signed char PRInt8; #endif #else #error No suitable type for PRInt8/PRUint8 #endif /************************************************************************ * MACROS: PR_INT8_MAX * PR_INT8_MIN * PR_UINT8_MAX * DESCRIPTION: * The maximum and minimum values of a PRInt8 or PRUint8. ************************************************************************/ #define PR_INT8_MAX 127 #define PR_INT8_MIN (-128) #define PR_UINT8_MAX 255U /************************************************************************ ** TYPES: PRUint16 ** PRInt16 ** DESCRIPTION: ** The int16 types are known to be 16 bits each. ************************************************************************/ #if PR_BYTES_PER_SHORT == 2 typedef unsigned short PRUint16; typedef short PRInt16; #else #error No suitable type for PRInt16/PRUint16 #endif /************************************************************************ * MACROS: PR_INT16_MAX * PR_INT16_MIN * PR_UINT16_MAX * DESCRIPTION: * The maximum and minimum values of a PRInt16 or PRUint16. ************************************************************************/ #define PR_INT16_MAX 32767 #define PR_INT16_MIN (-32768) #define PR_UINT16_MAX 65535U /************************************************************************ ** TYPES: PRUint32 ** PRInt32 ** DESCRIPTION: ** The int32 types are known to be 32 bits each. ************************************************************************/ #if PR_BYTES_PER_INT == 4 typedef unsigned int PRUint32; typedef int PRInt32; #define PR_INT32(x) x #define PR_UINT32(x) x ## U #elif PR_BYTES_PER_LONG == 4 typedef unsigned long PRUint32; typedef long PRInt32; #define PR_INT32(x) x ## L #define PR_UINT32(x) x ## UL #else #error No suitable type for PRInt32/PRUint32 #endif /************************************************************************ * MACROS: PR_INT32_MAX * PR_INT32_MIN * PR_UINT32_MAX * DESCRIPTION: * The maximum and minimum values of a PRInt32 or PRUint32. ************************************************************************/ #define PR_INT32_MAX PR_INT32(2147483647) #define PR_INT32_MIN (-PR_INT32_MAX - 1) #define PR_UINT32_MAX PR_UINT32(4294967295) /************************************************************************ ** TYPES: PRUint64 ** PRInt64 ** DESCRIPTION: ** The int64 types are known to be 64 bits each. Care must be used when ** declaring variables of type PRUint64 or PRInt64. Different hardware ** architectures and even different compilers have varying support for ** 64 bit values. The only guaranteed portability requires the use of ** the LL_ macros (see prlong.h). ************************************************************************/ #ifdef HAVE_LONG_LONG #if PR_BYTES_PER_LONG == 8 typedef long PRInt64; typedef unsigned long PRUint64; #elif defined(WIN16) typedef __int64 PRInt64; typedef unsigned __int64 PRUint64; #elif defined(WIN32) && !defined(__GNUC__) typedef __int64 PRInt64; typedef unsigned __int64 PRUint64; #else typedef long long PRInt64; typedef unsigned long long PRUint64; #endif /* PR_BYTES_PER_LONG == 8 */ #else /* !HAVE_LONG_LONG */ typedef struct { #ifdef IS_LITTLE_ENDIAN PRUint32 lo, hi; #else PRUint32 hi, lo; #endif } PRInt64; typedef PRInt64 PRUint64; #endif /* !HAVE_LONG_LONG */ /************************************************************************ ** TYPES: PRUintn ** PRIntn ** DESCRIPTION: ** The PRIntn types are most appropriate for automatic variables. They are ** guaranteed to be at least 16 bits, though various architectures may ** define them to be wider (e.g., 32 or even 64 bits). These types are ** never valid for fields of a structure. ************************************************************************/ #if PR_BYTES_PER_INT >= 2 typedef int PRIntn; typedef unsigned int PRUintn; #else #error 'sizeof(int)' not sufficient for platform use #endif /************************************************************************ ** TYPES: PRFloat64 ** DESCRIPTION: ** NSPR's floating point type is always 64 bits. ************************************************************************/ typedef double PRFloat64; /************************************************************************ ** TYPES: PRSize ** DESCRIPTION: ** A type for representing the size of objects. ************************************************************************/ typedef size_t PRSize; /************************************************************************ ** TYPES: PROffset32, PROffset64 ** DESCRIPTION: ** A type for representing byte offsets from some location. ************************************************************************/ typedef PRInt32 PROffset32; typedef PRInt64 PROffset64; /************************************************************************ ** TYPES: PRPtrDiff ** DESCRIPTION: ** A type for pointer difference. Variables of this type are suitable ** for storing a pointer or pointer subtraction. ************************************************************************/ typedef ptrdiff_t PRPtrdiff; /************************************************************************ ** TYPES: PRUptrdiff ** DESCRIPTION: ** A type for pointer difference. Variables of this type are suitable ** for storing a pointer or pointer sutraction. ************************************************************************/ #ifdef _WIN64 typedef unsigned __int64 PRUptrdiff; #else typedef unsigned long PRUptrdiff; #endif /************************************************************************ ** TYPES: PRBool ** DESCRIPTION: ** Use PRBool for variables and parameter types. Use PR_FALSE and PR_TRUE ** for clarity of target type in assignments and actual arguments. Use ** 'if (bool)', 'while (!bool)', '(bool) ? x : y' etc., to test booleans ** just as you would C int-valued conditions. ************************************************************************/ typedef PRIntn PRBool; #define PR_TRUE 1 #define PR_FALSE 0 /************************************************************************ ** TYPES: PRPackedBool ** DESCRIPTION: ** Use PRPackedBool within structs where bitfields are not desirable ** but minimum and consistant overhead matters. ************************************************************************/ typedef PRUint8 PRPackedBool; /* ** Status code used by some routines that have a single point of failure or ** special status return. */ typedef enum { PR_FAILURE = -1, PR_SUCCESS = 0 } PRStatus; #ifndef __PRUNICHAR__ #define __PRUNICHAR__ #if defined(WIN32) || defined(XP_MAC) typedef wchar_t PRUnichar; #else typedef PRUint16 PRUnichar; #endif #endif /* ** WARNING: The undocumented data types PRWord and PRUword are ** only used in the garbage collection and arena code. Do not ** use PRWord and PRUword in new code. ** ** A PRWord is an integer that is the same size as a void*. ** It implements the notion of a "word" in the Java Virtual ** Machine. (See Sec. 3.4 "Words", The Java Virtual Machine ** Specification, Addison-Wesley, September 1996. ** http://java.sun.com/docs/books/vmspec/index.html.) */ #ifdef _WIN64 typedef __int64 PRWord; typedef unsigned __int64 PRUword; #else typedef long PRWord; typedef unsigned long PRUword; #endif #if defined(NO_NSPR_10_SUPPORT) #else /********* ???????????????? FIX ME ??????????????????????????? *****/ /********************** Some old definitions until pr=>ds transition is done ***/ /********************** Also, we are still using NSPR 1.0. GC ******************/ /* ** Fundamental NSPR macros, used nearly everywhere. */ #define PR_PUBLIC_API PR_IMPLEMENT /* ** Macro body brackets so that macros with compound statement definitions ** behave syntactically more like functions when called. */ #define NSPR_BEGIN_MACRO do { #define NSPR_END_MACRO } while (0) /* ** Macro shorthands for conditional C++ extern block delimiters. */ #ifdef NSPR_BEGIN_EXTERN_C #undef NSPR_BEGIN_EXTERN_C #endif #ifdef NSPR_END_EXTERN_C #undef NSPR_END_EXTERN_C #endif #ifdef __cplusplus #define NSPR_BEGIN_EXTERN_C extern "C" { #define NSPR_END_EXTERN_C } #else #define NSPR_BEGIN_EXTERN_C #define NSPR_END_EXTERN_C #endif #ifdef XP_MAC #include "protypes.h" #else #include "obsolete/protypes.h" #endif /********* ????????????? End Fix me ?????????????????????????????? *****/ #endif /* NO_NSPR_10_SUPPORT */ PR_END_EXTERN_C #endif /* prtypes_h___ */ djview4/nsdejavu/nsdejavu.1.in000066400000000000000000000173741174072760700166060ustar00rootroot00000000000000.\" -*- nroff -*- .\" .\" Copyright (c) 2001 Leon Bottou, Yann Le Cun, Patrick Haffner, .\" AT&T Corp., and Lizardtech, Inc. .\" .\" This is free documentation; you can redistribute it and/or .\" modify it under the terms of the GNU General Public License as .\" published by the Free Software Foundation; either version 2 of .\" the License, or (at your option) any later version. .\" .\" The GNU General Public License's references to "object code" .\" and "executables" are to be interpreted as the output of any .\" document formatting or typesetting system, including .\" intermediate and printed output. .\" .\" This manual is distributed in the hope that it will be useful, .\" but WITHOUT ANY WARRANTY; without even the implied warranty of .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the .\" GNU General Public License for more details. .\" .\" You should have received a copy of the GNU General Public .\" License along with this manual. Otherwise check the web site .\" of the Free Software Foundation at http://www.fsf.org. .TH NSDEJAVU 1 "1/4/2007" "DjView-4" "DjView-4" .de SS .SH \\0\\0\\0\\$* .. .SH NAME nsdejavu \- DjVu browser plugin .SH SYNOPSIS .B LIBDIR/netscape/plugins/NSDEJAVUSO .SH DESCRIPTION The shared library .B NSDEJAVUSO uses the Netscape browser plugin .SM API to display DjVu images in in a number of popular web browsers. Different web browsers provide various level of support for Netscape plugins. Please check section "Browser Compatibility" for instructions on how to enable the DjVu browser plugin. The DjVuLibre browser plugin works by invoking a standalone viewer with the special command line option .BR -netscape . The plugin first searches a program named .BR djview . If this program cannot be found, it searches for .BR djview4 and finally .BR djview3. It is always possible to override this search strategy by setting the environment variable .B NPX_DJVIEW to the full path of the desired executable. .SH MIME TYPES AND EXTENSIONS Typing the .SM URL of a recognized DjVu document in your web browser should automatically invoke the DjVu browser plugin. Each browser uses different methods to determine that a particular .SM URL is in fact a DjVu document. Web server normally provide a .SM MIME type to web browsers. The official .SM MIME type for DjVu documents is .BR image/vnd.djvu . For compatibility with ancient versions of the DjVu viewer, it is common to use instead the experimental .SM MIME type .B image/x-djvu or .BR image/x.djvu . Web servers should be configured to send the proper .SM MIME type for DjVu documents. Most web browsers also recognize files ending with .B .djvu or .B .djv as DjVu files. An easy way to check if an http server is giving an appropriate content-type is to invoke the following command with a .SM URL corresponding to an actual DjVu file on the server. .IP "" 2 .BI "curl -u " URL " | grep Content-Type" .PP The result should be one of the following, preferably the first. .IP "" 2 .B Content-Type: image/vnd.djvu .br .B Content-Type: image/x.djvu .br .B Content-Type: image/x-djvu .PP Any other .SM MIME type indicates a server misconfiguration. .SH CGI-STYLE FLAGS The behavior of the DjVu browser plugin can be specified by augmenting the .SM URL using a syntax similar to that used by the .SM CGI programs. This syntax is described by the following template: .IP "" 3 .BI "http://.../file.djvu?djvuopts&" "keyword=value" "&" "keyword=value" "&" "..." .PP The DjVu browser plugin only recognizes keywords that appear after the word .BR djvuopts . The keywords recognized by each viewer are listed in the man pages for .BR djview3 (1) and .BR djview4 (1). Unrecognized keywords are ignored. The most common keywords are: .TP .BI page= pagename Specify which page is displayed by name or by ordinal number. .TP .BI zoom= zoomfactor Set the zoom factor. Legal values for .I zoomfactor are: .br .TS center,box; lfI l lfB l lfB l lfB l lfB l . number Magnification factor in range 10% to 999%. one2one Select the "one-to-one" mode. width Select the "fit width" mode. page Select the "fit page" mode. stretch Stretch the image to the plugin window size. .TE .SH BROWSER COMPATIBILITY The DjVu browser plugin has been tested with several popular web browsers: Netscape 4 and 6; Gecko based browsers such as Mozilla, Galeon and Firefox; KHTML based browsers such as Konqueror; and Opera. Please read the browser documentation to find out where the plugin library should be installed. .SH EMBEDDING DJVU IMAGES IN HTML PAGES You can integrate DjVu content on an .SM HTML web page with either the .SM or the .SM tag. This method will work even if your web server does not support the DjVu .SM MIME type. The .SM CGI style flags can be directly used as attributes of the embedding tag. The following example shows the W3C standard syntax with the .SM OBJECT tag: .IP "" 3 .B "" .br .B "\0\0\0 " .br .B "\0\0\0 " .br .B "\0\0\0 This browser cannot render djvu data." .br .B "" .PP And this is the customary syntax with the .SM EMBED tag: .IP "" 3 .B "" .PP .SH INTERFACING THE DJVIEW PLUGIN WITH JAVASCRIPT Recent versions of the .B djview4 plugin can be controlled from the JavaScript intepreter of browsers implementing the Mozilla NPRuntime API. To access the plugin object, include the attribute .BI "id=""" pluginname """" into the .B or .B tag and use the JavaScript function .BI "getElementById(""" pluginname """)." .PP The plugin object implements two methods to retrieve and set the value of the options usually recognized as CGI-style flags. It also can evaluate a specified JavaScript expression whenever something changes in the status of the djview interface. .TP .IB "pluginobject" ".setdjvuopt(""" key """," value ")" Set the value of the djvu option .I key to the character string .IR value . This achieves the same effect as specifying option .IR key = value among the CGI-style flags. For instance, values of the key .B page can be page IDs, page titles, page numbers, or page names. .TP .IB "pluginobject" ".getdjvuopt(""" key """)" Return the value of the djvu option .I key as a string. The returned value is always a character string, even when the return is logically a number. Boolean values are returned as strings .B yes or .BR no. Besides the usual CGI-style flags, this function recognizes the additional key .B pages and returns the total number of pages in the DjVu document. An empty string is returned when the key is not recognized. .TP .IB "pluginobject" ".onchange=""" code """;" Ensure that string .I code is evaluated in the context of the plugin object whenever something changes in the djview graphical user interface. For instance, this evaluation happens when progressive refinements are painted, and when the user manipulates the image interactively. .TP .IB "pluginobject" ".version" Return a string describing the plugin version. This property can be used to test whether the djview plugin is scriptable in this browser. .PP Note that the scriptability feature may not be accessible until the djview plugin is fully loaded. Therefore it is advisable to check .IB "pluginobject" ".version" from the JavaScript .B onload before calling any other method. .SH CREDITS This program was written by Andrei Erofeev and was then improved by Bill Riemers and L\('eon Bottou . .SH SEE ALSO .BR djvu (1), .BR ddjvu (1), .BR djview4 (1) .BR djview3 (1) djview4/nsdejavu/nsdejavu.c000066400000000000000000002334011174072760700162520ustar00rootroot00000000000000/* //C- ------------------------------------------------------------------- //C- DjVuLibre-3.5 //C- Copyright (c) 2002 Leon Bottou and Yann Le Cun. //C- Copyright (c) 2001 AT&T //C- //C- This software is subject to, and may be distributed under, the //C- GNU General Public License, either Version 2 of the license, //C- or (at your option) any later version. The license should have //C- accompanied the software or you may obtain a copy of the license //C- from the Free Software Foundation at http://www.fsf.org . //C- //C- This program is distributed in the hope that it will be useful, //C- but WITHOUT ANY WARRANTY; without even the implied warranty of //C- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //C- GNU General Public License for more details. //C- //C- DjVuLibre-3.5 is derived from the DjVu(r) Reference Library from //C- Lizardtech Software. Lizardtech Software has authorized us to //C- replace the original DjVu(r) Reference Library notice by the following //C- text (see doc/lizard2002.djvu and doc/lizardtech2007.djvu): //C- //C- ------------------------------------------------------------------ //C- | DjVu (r) Reference Library (v. 3.5) //C- | Copyright (c) 1999-2001 LizardTech, Inc. All Rights Reserved. //C- | The DjVu Reference Library is protected by U.S. Pat. No. //C- | 6,058,214 and patents pending. //C- | //C- | This software is subject to, and may be distributed under, the //C- | GNU General Public License, either Version 2 of the license, //C- | or (at your option) any later version. The license should have //C- | accompanied the software or you may obtain a copy of the license //C- | from the Free Software Foundation at http://www.fsf.org . //C- | //C- | The computer code originally released by LizardTech under this //C- | license and unmodified by other parties is deemed "the LIZARDTECH //C- | ORIGINAL CODE." Subject to any third party intellectual property //C- | claims, LizardTech grants recipient a worldwide, royalty-free, //C- | non-exclusive license to make, use, sell, or otherwise dispose of //C- | the LIZARDTECH ORIGINAL CODE or of programs derived from the //C- | LIZARDTECH ORIGINAL CODE in compliance with the terms of the GNU //C- | General Public License. This grant only confers the right to //C- | infringe patent claims underlying the LIZARDTECH ORIGINAL CODE to //C- | the extent such infringement is reasonably necessary to enable //C- | recipient to make, have made, practice, sell, or otherwise dispose //C- | of the LIZARDTECH ORIGINAL CODE (or portions thereof) and not to //C- | any greater extent that may be necessary to utilize further //C- | modifications or combinations. //C- | //C- | The LIZARDTECH ORIGINAL CODE is provided "AS IS" WITHOUT WARRANTY //C- | OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED //C- | TO ANY WARRANTY OF NON-INFRINGEMENT, OR ANY IMPLIED WARRANTY OF //C- | MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. //C- +------------------------------------------------------------------ */ #include "config.h" #ifndef DJVIEW_NAME # define DJVIEW_NAME "djview" #endif #ifndef DJVIEW4_NAME # define DJVIEW4_NAME "djview4" #endif #ifndef DJVIEW3_NAME # define DJVIEW3_NAME "djview3" #endif #ifndef LIBRARY_NAME # if defined(hpux) # define LIBRARY_NAME "nsdejavu.sl" # elif defined(WIN32) || defined(__CYGWIN32__) # define LIBRARY_NAME "nsdejavu.dll" # else # define LIBRARY_NAME "nsdejavu.so" # endif #endif #include #include #include #include #include #include #include #include #include #include #include #if HAVE_UNISTD_H # include #endif #if TIME_WITH_SYS_TIME # include # include #elif HAVE_SYS_TIME_H # include #else # include #endif #if HAVE_SYS_WAIT_H # include #else # include #endif #if !HAVE_WORKING_VFORK # define vfork fork #endif #ifndef MAXPATHLEN # ifdef _MAX_PATH # define MAXPATHLEN _MAX_PATH # else # define MAXPATHLEN 1024 # endif #endif #if ( MAXPATHLEN < 1024 ) # undef MAXPATHLEN # define MAXPATHLEN 1024 #endif #define XP_UNIX 1 #define MOZ_X11 1 #include "npapi.h" #include "npruntime.h" #include "npupp.h" #ifndef TRUE # define TRUE 1 #endif #ifndef FALSE # define FALSE 0 #endif #ifndef offsetof # define offsetof(TYPE,MEMBER) ((size_t)&((TYPE*)0)->MEMBER) #endif #ifndef min # define min(a,b) (((a)<(b))?(a):(b)) #endif #ifndef USE_XT # if HAVE_XT # define USE_XT 1 # else # define USE_XT 0 # endif #endif #ifndef USE_GLIB # if HAVE_GLIB # define USE_GLIB 1 # else # define USE_GLIB 0 # endif #endif #if USE_XT # define XTSTRINGDEFINES 1 # include # include # include # include # pragma weak XtAddCallback # pragma weak XtAddEventHandler # pragma weak XtAppAddInput # pragma weak XtRemoveCallback # pragma weak XtRemoveEventHandler # pragma weak XtRemoveInput # pragma weak XtShellStrings # pragma weak XtStrings # pragma weak XtVaGetValues # pragma weak XtWidgetToApplicationContext # pragma weak XtWindowToWidget #endif #if USE_GLIB # include # pragma weak g_io_channel_unix_new # pragma weak g_io_channel_unref # pragma weak g_io_add_watch # pragma weak g_source_remove #endif /* ------------------------------------------------------------ */ /* IO */ typedef struct { int cmd_mode; int cmd_zoom; int imgx; int imgy; } SavedData; #define OK_STRING "OK" #define ERR_STRING "ERR" #define CMD_SHUTDOWN 0 #define CMD_NEW 1 #define CMD_DETACH_WINDOW 2 #define CMD_ATTACH_WINDOW 3 #define CMD_RESIZE 4 #define CMD_DESTROY 5 #define CMD_PRINT 6 #define CMD_NEW_STREAM 7 #define CMD_WRITE 8 #define CMD_DESTROY_STREAM 9 #define CMD_SHOW_STATUS 10 #define CMD_GET_URL 11 #define CMD_GET_URL_NOTIFY 12 #define CMD_URL_NOTIFY 13 #define CMD_HANDSHAKE 14 #define CMD_SET_DJVUOPT 15 #define CMD_GET_DJVUOPT 16 #define CMD_ON_CHANGE 17 #define TYPE_INTEGER 1 #define TYPE_DOUBLE 2 #define TYPE_STRING 3 #define TYPE_POINTER 4 #define TYPE_ARRAY 5 /* All these routines return * - positive value on success * - zero on end-of-file condition * - negative on error */ static int Read(int fd, void * buffer, int length, int refresh_pipe, void (* refresh_cb)(void)) { int size = length; int maxfd = (refresh_pipe>fd) ? refresh_pipe : fd; char *ptr = (char*)buffer; int res; int rc; while(size>0) { fd_set read_fds; struct timeval tv; FD_ZERO(&read_fds); FD_SET(fd, &read_fds); if (refresh_pipe>=0 && refresh_cb) FD_SET(refresh_pipe, &read_fds); tv.tv_sec=5; tv.tv_usec=0; rc = select(maxfd+1, &read_fds, 0, 0, &tv); if (rc>0 && FD_ISSET(fd, &read_fds)) { errno = 0; res = read(fd, ptr, size); if (res<0 && errno==EINTR) continue; if (res<0) return -1; if (res==0) return 0; size -= res; ptr += res; } if (rc<0 && errno!=EINTR) return -1; if (refresh_cb) refresh_cb(); } return length; } static int Write(int fd, const void * buffer, int length) { int size = length; const char *ptr = (const char*)buffer; #if HAVE_SIGACTION sigset_t new_mask, old_mask; struct sigaction new_action, old_action; #else void *oldhandler; #endif int res; #if HAVE_SIGACTION sigemptyset(&new_mask); sigaddset(&new_mask, SIGPIPE); sigprocmask(SIG_BLOCK, &new_mask, &old_mask); #else oldhandler = signal(SIGPIPE, SIG_IGN); #endif while(size>0) { errno = 0; res = write(fd, ptr, size); if (res<0 && errno==EINTR) continue; if (res <= 0) break; size-=res; ptr+=res; } #if HAVE_SIGACTION sigaction(SIGPIPE, 0, &new_action); new_action.sa_handler=SIG_IGN; new_action.sa_flags=SA_NODEFER; sigaction(SIGPIPE, &new_action, &old_action); sigprocmask(SIG_SETMASK, &old_mask, 0); sigaction(SIGPIPE, &old_action, 0); #else signal(SIGPIPE, oldhandler); #endif if (size > 0) return -1; return 0; } static int WriteStringLen(int fd, const char *str, int length) { int type = TYPE_STRING; if ( (Write(fd, &type, sizeof(type)) < 0) || (Write(fd, &length, sizeof(length)) < 0) || (Write(fd, str, length+1) < 0) ) return -1; return 1; } static int WriteString(int fd, const char *str) { int length; if (! str) str = ""; length = strlen(str); return WriteStringLen(fd, str, length); } static int WriteInteger(int fd, int var) { int type=TYPE_INTEGER; if ( (Write(fd, &type, sizeof(type)) < 0) || (Write(fd, &var, sizeof(var)) < 0) ) return -1; return 1; } static int WritePointer(int fd, const void *ptr) { int type=TYPE_POINTER; if ( (Write(fd, &type, sizeof(type)) < 0) || (Write(fd, &ptr, sizeof(ptr)) < 0) ) return -1; return 1; } static int WriteArray(int fd, int size, const char *array) { int type=TYPE_ARRAY; if ( (Write(fd, &type, sizeof(type)) < 0) || (Write(fd, &size, sizeof(size)) < 0) || (Write(fd, array, size) < 0) ) return -1; return 1; } static int ReadString(int fd, char **pstr, int refresh_pipe, void (* refresh_cb)(void)) { char *ptr; int type, length, status; *pstr = 0; status = Read(fd, &type, sizeof(type), refresh_pipe, refresh_cb); if (status <= 0) return status; if (type != TYPE_STRING) return -1; status = Read(fd, &length, sizeof(length), refresh_pipe, refresh_cb); if (status <= 0) return status; if (length < 0) return -1; if (! (ptr = malloc(length+1))) return -1; status = Read(fd, (char*)ptr, length+1, refresh_pipe, refresh_cb); if (status <= 0) { free(ptr); return status; } *pstr = ptr; return 1; } static int ReadInteger(int fd, int *pvar, int refresh_pipe, void (* refresh_cb)(void)) { int type, status; status = Read(fd, &type, sizeof(type), refresh_pipe, refresh_cb); if (status <= 0) return status; if (type != TYPE_INTEGER) return -1; status = Read(fd, pvar, sizeof(*pvar), refresh_pipe, refresh_cb); return status; } static int ReadPointer(int fd, void **pvar, int refresh_pipe, void (* refresh_cb)(void)) { int type, status; status = Read(fd, &type, sizeof(type), refresh_pipe, refresh_cb); if (status <= 0) return status; if (type != TYPE_POINTER) return -1; status = Read(fd, pvar, sizeof(*pvar), refresh_pipe, refresh_cb); return status; } static int ReadResult(int fd, int refresh_pipe, void (* refresh_cb)(void)) { char *res; int status; status = ReadString(fd, &res, refresh_pipe, refresh_cb); if (status <= 0) return status; status = +1; if (strcmp(res, OK_STRING)) status = -2; free(res); return status; } /* ------------------------------------------------------------ */ /* PATHS */ /* Stuff for easily dealing with string allocation */ struct strpool_data { struct strpool_data *next; char data[1]; }; typedef struct strpool { struct strpool_data *first; } strpool; static void strpool_init(strpool *pool) { pool->first = 0; } static char * strpool_alloc(strpool *pool, int n) { char *b = malloc(sizeof(struct strpool_data)+n); struct strpool_data *d = (struct strpool_data *)b; d->next = pool->first; d->data[n] = 0; pool->first = d; return d->data; } static void strpool_fini(strpool *pool) { struct strpool_data *d; while ((d = pool->first)) { pool->first = d->next; if (d) free(d); } } static const char * strconcat(strpool *pool, ...) { va_list ap; int n = 0; char *d, *r; const char *s; va_start(ap, pool); while ((s = va_arg(ap, const char *))) n += strlen(s); va_end(ap); r = d = strpool_alloc(pool, n); va_start(ap, pool); while ((s = va_arg(ap, const char *))) while (*s) *d++ = *s++; *d = 0; return r; } /* Stuff to test and manipulate filenames */ static int is_file(const char *filename) { struct stat buf; if (stat(filename,&buf) >= 0) if (! (buf.st_mode & S_IFDIR)) return TRUE; return FALSE; } static int is_executable(const char *filename) { if (!is_file(filename)) return FALSE; if (access(filename, X_OK)<0) return FALSE; return TRUE; } static const char * dirname(strpool *pool, const char *fname) { int n; char *ret; const char *s = fname + strlen(fname); while (s>fname && s[-1]=='/') s--; while (s>fname && s[-1]!='/') s--; while (s>fname && s[-1]=='/') s--; if (s == fname) return ( (s[0] == '/') ? "/" : "." ); n = s - fname; ret = strpool_alloc(pool, n); strncpy(ret, fname, n); return ret; } static const char * pathclean(strpool *pool, const char *n) { char *ret = strpool_alloc(pool, strlen(n)); char *d = ret; int slash = FALSE; if (n[0] == '/') *d++ = '/'; while (*n) { if (n[0] == '/') { while (n[0] == '/') n += 1; continue; } if (n[0]=='.' && (n[1]=='/' || !n[1])) { n += 1; continue; } if (n[0]=='.' && n[1]=='.' && (n[2]=='/' || !n[2]) && d>ret && d[-1]!='/') { *d = 0; while (d>ret && d[-1] != '/') d -= 1; if (d[0]=='.' && d[1]=='.' && !d[2]) { d += 2; } else { n += 2; slash = FALSE; continue; } } if (slash) *d++ = '/'; while (n[0] && n[0] != '/') *d++ = *n++; slash = (n[0] == '/'); } if (d == ret) *d++ = '.'; *d = 0; return ret; } static const char * follow_symlinks(strpool *pool, const char *fname) { const char *ret = fname; #ifdef S_IFLNK int lnklen; char lnkbuf[MAXPATHLEN+1]; while ((lnklen = readlink(ret, lnkbuf, sizeof(lnkbuf))) > 0) { lnkbuf[lnklen] = 0; if (lnkbuf[0] != '/') ret = strconcat(pool, dirname(pool, ret), "/", lnkbuf, 0); else ret = lnkbuf; ret = pathclean(pool,ret); } #endif return ret; } static const char * pathelem(strpool *pool, const char **pathptr) { if (*pathptr) { const char *s = strchr(*pathptr,':'); if (s) { int n = s - *pathptr; char *ret = strpool_alloc(pool, n); strncpy(ret, *pathptr, n); *pathptr += n+1; return ret; } s = *pathptr; *pathptr = 0; return s; } return 0; } static const char *stdpath = "/usr/lib/mozilla/plugins:" "/usr/local/lib/netscape/plugins:" "/usr/local/netscape/plugins:" "/usr/lib/netscape/plugins:" "/opt/netscape/plugins"; static const char * get_plugin_path(strpool *pool) { const char *env; const char *dir; /* MOZ_PLUGIN_PATH */ if ((env = getenv("MOZ_PLUGIN_PATH"))) { while ((dir = pathelem(pool, &env))) { const char *lib = strconcat(pool, dir, "/", LIBRARY_NAME, 0); if (is_file(lib)) return lib; } } /* NPX_PLUGIN_PATH */ if ((env = getenv("NPX_PLUGIN_PATH"))) { while ((dir = pathelem(pool, &env))) { const char *lib = strconcat(pool, dir, "/", LIBRARY_NAME, 0); if (is_file(lib)) return lib; } } /* $HOME/.{mozilla,netscape}/plugins */ if ((env = getenv("HOME"))) { const char *lib; lib = strconcat(pool, env, "/.mozilla/plugins/", LIBRARY_NAME, 0); if (is_file(lib)) return lib; lib = strconcat(pool, env, "/.netscape/plugins/", LIBRARY_NAME, 0); if (is_file(lib)) return lib; } /* MOZILLA_HOME */ if ((env = getenv("MOZILLA_HOME"))) { const char *lib = strconcat(pool, env, "/plugins/", LIBRARY_NAME, 0); if (is_file(lib)) return lib; } /* OTHER */ env = stdpath; while ((dir = pathelem(pool, &env))) { const char *lib = strconcat(pool, dir, "/", LIBRARY_NAME, 0); if (is_file(lib)) return lib; } return 0; } static const char * GetPluginPath(void) { static char path[MAXPATHLEN+1]; if (! path[0]) { const char *p; strpool apool; strpool_init(&apool); if ((p = get_plugin_path(&apool))) strncpy(path, p, MAXPATHLEN); path[MAXPATHLEN] = 0; strpool_fini(&apool); } return path; } static const char * get_viewer_path(strpool *pool) { int i; const char *env = 0; const char *envs = 0; static const char *djview[] = { DJVIEW_NAME, DJVIEW4_NAME, DJVIEW3_NAME, 0 }; /* Environment variable NPX_DJVIEW overrides everything */ if ((env = getenv("NPX_DJVIEW"))) if (is_executable(env)) return env; /* Locate plugin path */ if ((env = GetPluginPath())) envs = follow_symlinks(pool, env); /* Try the following names */ for (i=0; djview[i]; i++) { const char *dir; const char *test; if (envs) { /* Try relative to plugin path */ dir = dirname(pool, envs); test = strconcat(pool, dir, "/../../../bin/", djview[i], 0); if (is_executable(test)) return test; test = strconcat(pool, dir, "/../../bin/", djview[i], 0); if (is_executable(test)) return test; dir = dirname(pool, env); test = strconcat(pool, dir, "/../DjVu/", djview[i],0); if (is_executable(test)) return test; dir = dirname(pool, envs); test = strconcat(pool, dir, "/../DjVu/", djview[i],0); if (is_executable(test)) return test; } /* Try ${bindir} */ #if defined(DIR_BINDIR) test = strconcat(pool,DIR_BINDIR,"/",djview[i],0); if (is_executable(test)) return test; #endif /* Try in the shell path */ if ((env = getenv("PATH"))) while ((dir = pathelem(pool, &env))) { test = strconcat(pool, dir, "/", djview[i], 0); if (is_executable(test)) return test; } } /* Deep trouble */ return 0; } static const char * GetViewerPath(void) { static char path[MAXPATHLEN+1]; if (! path[0]) { const char *p; strpool apool; strpool_init(&apool); if ((p = get_viewer_path(&apool))) strncpy(path, p, MAXPATHLEN); path[MAXPATHLEN] = 0; strpool_fini(&apool); } return path; } static const char * get_library_path(strpool *pool) { const char *env = 0; if ((env = (const char*)GetPluginPath())) { env = dirname(pool, env); env = strconcat(pool, env, "/../DjVu", 0); env = pathclean(pool, env); return env; } return 0; } static const char * GetLibraryPath(void) { /* This is no longer needed since djview no longer uses the provided path. This is kept to allow interoperability between nsdejavu.so and previous version of djview. LYB. */ static char path[MAXPATHLEN+1]; if (! path[0]) { const char *p; strpool apool; strpool_init(&apool); if ((p = get_library_path(&apool))) strncpy(path, p, MAXPATHLEN); path[MAXPATHLEN] = 0; strpool_fini(&apool); } return path; } /* ------------------------------------------------------------ */ /* MAP */ struct map_entry_s { struct map_entry_s *next; void *key; void *val; }; typedef struct { int nelems; int nbuckets; struct map_entry_s **buckets; } Map; static int hash(void *v, int nbuckets) { return (((long)v ^ ((long)v>>7)) % nbuckets); } static void map_purge(Map *m) { int i; struct map_entry_s *p; if (m->buckets) { for (i=0; inbuckets; i++) while ((p = m->buckets[i])) { m->buckets[i] = p->next; free(p); } free(m->buckets); } m->buckets = 0; m->nbuckets = 0; m->nelems = 0; } static void map_reorganize(Map *m) { int new_nbuckets = 17; struct map_entry_s **new_buckets = 0; struct map_entry_s *p; int i; if (m->nbuckets > new_nbuckets) new_nbuckets = m->nbuckets * 2 - 1; new_buckets = malloc(new_nbuckets * sizeof(struct map_entry*)); if (!new_buckets) return; memset(new_buckets, 0, new_nbuckets * sizeof(struct map_entry*)); for (i=0; inbuckets; i++) while ((p = m->buckets[i])) { int h = hash(p->key, new_nbuckets); m->buckets[i] = p->next; p->next = new_buckets[h]; new_buckets[h] = p; } if (m->nbuckets) free(m->buckets); m->buckets = new_buckets; m->nbuckets = new_nbuckets; } static void* map_lookup(Map *m, void *key) { int h; struct map_entry_s *q; if (m->nbuckets) { h = hash(key, m->nbuckets); for (q=m->buckets[h]; q; q=q->next) if (q->key == key) return q->val; } return NULL; } static int map_remove(Map *m , void *key) { int h; struct map_entry_s **pq; if (m->nbuckets) { h = hash(key, m->nbuckets); for (pq=&(m->buckets[h]); *pq; pq=&((*pq)->next)) if ((*pq)->key == key) { struct map_entry_s *q = *pq; (*pq) = q->next; free(q); return 1; } } return 0; } static int map_insert(Map *m, void *key, void *val) { int h; struct map_entry_s *q; if (m->nelems * 3 >= m->nbuckets * 2) map_reorganize(m); if (! m->nbuckets) return -1; if (! val) return map_remove(m, key); h = hash(key, m->nbuckets); for (q=m->buckets[h]; q; q=q->next) if (q->key == key) { q->val = val; return 1; } if (! (q = malloc(sizeof(struct map_entry_s)))) return -1; q->next = m->buckets[h]; q->key = key; q->val = val; m->buckets[h] = q; return 1; } /* ------------------------------------------------------------ */ /* INSTANCE */ typedef struct { Window window; NPP np_instance; int full_mode; int xembed_mode; NPNToolkitType toolkit; #if USE_XT Window client; Widget widget; #endif NPObject *npobject; NPVariant onchange; } Instance; static Instance * instance_new(NPP np_instance, int full_mode) { Instance *this = malloc(sizeof(Instance)); if (this) { memset(this, 0, sizeof(Instance)); this->np_instance = np_instance; this->full_mode = full_mode; this->xembed_mode = 0; this->npobject = 0; VOID_TO_NPVARIANT(this->onchange); } return this; } static void instance_free(Instance *this) { if (this) { NPN_ReleaseVariantValue(&this->onchange); memset(this, 0, sizeof(Instance)); free(this); } } /* ------------------------------------------------------------ */ /* DELAYED REQUESTS */ typedef struct { struct DelayedRequest_s *first; struct DelayedRequest_s *last; } DelayedRequestList; typedef struct DelayedRequest_s { struct DelayedRequest_s *next; int req_num; void *id; char *status; char *url; char *target; } DelayedRequest; static DelayedRequest * delayedrequest_append(DelayedRequestList *dlist) { DelayedRequest *ptr = malloc(sizeof(DelayedRequest)); if (ptr) { memset(ptr, 0, sizeof(DelayedRequest)); if (!dlist->first) dlist->first = ptr; if (dlist->last) dlist->last->next = ptr; dlist->last = ptr; } return ptr; } static DelayedRequest * delayedrequest_pop(DelayedRequestList *dlist) { DelayedRequest *ptr = dlist->first; if (ptr) { dlist->first = ptr->next; if (dlist->last == ptr) dlist->last = 0; ptr->next = 0; } return ptr; } static void delayedrequest_free(DelayedRequest *ptr) { if (ptr->status) free(ptr->status); if (ptr->url) free(ptr->url); if (ptr->target) free(ptr->target); free(ptr); } static void delayedrequest_purge(DelayedRequestList *dlist) { DelayedRequest *reqp; while ((reqp = delayedrequest_pop(dlist))) delayedrequest_free(reqp); } /******************************************************************************* ******************************* Preserved Data ******************************** *******************************************************************************/ #define ENV_DJVU_STORAGE_PTR "_DJVU_STORAGE_PTR" /* The plugin can be freely loaded/unloaded by Netscape, * so any static variable is at risk of being destroyed at any time * after NPP_Shutdown() is called. */ /* -- These variables need to be destroyed and reinitialized * when the plugin is reloaded. */ static int delay_pipe[2]; static Map instance, strinstance; static DelayedRequestList delayed_requests; static NPIdentifier npid_getdjvuopt; static NPIdentifier npid_setdjvuopt; static NPIdentifier npid_onchange; static NPIdentifier npid_version; #if USE_XT static XtInputId input_id, delay_id; #endif #if USE_GLIB static gint input_gid, delay_gid; #endif /* -- These variables need to be saved and restored * when the plugin is reloaded. */ static int pipe_read = -1; static int pipe_write = -1; static int rev_pipe = -1; static int scriptable = 0; static int xembedable = 0; static unsigned long white, black; static Colormap colormap; typedef struct { int pipe_read, pipe_write, rev_pipe; int scriptable, xembedable; unsigned long white, black; Colormap colormap; } SavedStatic; static void SaveStatic(void) /* Saves static variables from Group #3 into the Netscape's environment. Next time nsdejavu.so is loaded, we will read their values again. */ { SavedStatic *storage = 0; char *value = getenv(ENV_DJVU_STORAGE_PTR); int pid = -1; if (value) sscanf(value, "%p-%d", &storage, &pid); if (pid != getpid()) storage = 0; if (! storage) { char *buffer = malloc(128); if (buffer) { storage = malloc(sizeof(SavedStatic)); if (storage) { sprintf(buffer, ENV_DJVU_STORAGE_PTR "=%p-%d", (void*)storage, getpid()); putenv(buffer); } } } if (storage) { storage->pipe_read = pipe_read; storage->pipe_write = pipe_write; storage->rev_pipe = rev_pipe; storage->scriptable = scriptable; storage->xembedable = xembedable; storage->white = white; storage->black = black; storage->colormap = colormap; } } static void LoadStatic(void) /* Loads static variables, which have been saved into the environment via SaveStatic() by the previous instance of nsdejavu.so */ { SavedStatic *storage = 0; int pid = -1; char *value = getenv(ENV_DJVU_STORAGE_PTR); if (value) sscanf(value, "%p-%d", &storage, &pid); if (pid != getpid()) storage = 0; if (storage) { pipe_read = storage->pipe_read; pipe_write = storage->pipe_write; rev_pipe = storage->rev_pipe; scriptable = storage->scriptable; xembedable = storage->xembedable; white = storage->white; black = storage->black; colormap = storage->colormap; } } /******************************************************************************* ********************************** Callbacks ********************************** *******************************************************************************/ static int Detach(void * id); static int Resize(void * id); static void CloseConnection(void); static int IsConnectionOK(int); static void ProgramDied(void); static int StartProgram(void); /******* Check macro ********/ #define CHECK(x) if ((x) < 0) \ fprintf(stderr,"unexpected error: %s:%d %s\n", __FILE__,__LINE__,#x); /******* Pipe functions ********/ static void process_delayed_requests(void) { char ch; DelayedRequest *reqp; Instance *inst; CHECK(read(delay_pipe[0], &ch, 1)); while((reqp = delayedrequest_pop(&delayed_requests))) { switch(reqp->req_num) { case CMD_SHOW_STATUS: if ((inst = map_lookup(&instance, reqp->id))) if (inst->window) NPN_Status(inst->np_instance, reqp->status); break; case CMD_GET_URL: if ((inst = map_lookup(&instance, reqp->id))) { const char *target = (reqp->target && reqp->target[0]) ? reqp->target : 0; NPN_GetURL(inst->np_instance, reqp->url, target); } break; case CMD_GET_URL_NOTIFY: if ((inst = map_lookup(&instance, reqp->id))) { const char *target = (reqp->target && reqp->target[0]) ? reqp->target : 0; if (NPN_GetURLNotify(inst->np_instance, reqp->url, target, 0) != NPERR_NO_ERROR ) NPN_GetURL(inst->np_instance, reqp->url, target); } break; case CMD_ON_CHANGE: if ((inst = map_lookup(&instance, reqp->id)) && NPVARIANT_IS_STRING(inst->onchange) ) { NPString *code = &NPVARIANT_TO_STRING(inst->onchange); NPP npp = inst->np_instance; NPVariant res; VOID_TO_NPVARIANT(res); NPN_Evaluate(npp, inst->npobject, code, &res); NPN_ReleaseVariantValue(&res); } break; default: break; } delayedrequest_free(reqp); } } static void process_requests(void) { if (!IsConnectionOK(FALSE)) { problem: ProgramDied(); return; } for(;;) { struct timeval tv; fd_set read_fds; int req_num; if (ReadInteger(rev_pipe,&req_num,0,0) <= 0) goto problem; switch(req_num) { case CMD_SHOW_STATUS: { DelayedRequest *reqp = delayedrequest_append(&delayed_requests); if (!reqp) return; reqp->req_num = req_num; if ( (ReadPointer(rev_pipe,&reqp->id,0,0) <= 0) || (ReadString(rev_pipe,&reqp->status,0,0) <= 0) ) goto problem; CHECK(write(delay_pipe[1], "1", 1)); } break; case CMD_GET_URL: case CMD_GET_URL_NOTIFY: { DelayedRequest *reqp = delayedrequest_append(&delayed_requests); if (!reqp) return; reqp->req_num = req_num; if ( (ReadPointer(rev_pipe,&reqp->id,0,0) <= 0) || (ReadString(rev_pipe,&reqp->url,0,0) <= 0) || (ReadString(rev_pipe,&reqp->target,0,0) <= 0) ) goto problem; CHECK(write(delay_pipe[1], "1", 1)); } break; case CMD_ON_CHANGE: { DelayedRequest *reqp = delayedrequest_append(&delayed_requests); if (!reqp) return; reqp->req_num = req_num; if ( (ReadPointer(rev_pipe,&reqp->id,0,0) <= 0) ) goto problem; CHECK(write(delay_pipe[1], "1", 1)); } default: break; } /* Process as many requests as possible before returning control back to Netscape. This pipe tends to overflow, so we don't want data to stay there too long. */ FD_ZERO(&read_fds); FD_SET(rev_pipe, &read_fds); tv.tv_sec=0; tv.tv_usec=0; if (select(rev_pipe+1, &read_fds, 0, 0, &tv) != 1) break; if (!FD_ISSET(rev_pipe, &read_fds)) break; } } static void check_requests(void) { if (rev_pipe) { fd_set read_fds; struct timeval tv; int rc; FD_ZERO(&read_fds); FD_SET(rev_pipe, &read_fds); tv.tv_sec = 0; tv.tv_usec = 0; rc = select(rev_pipe+1, &read_fds, 0, 0, &tv); if (rc>0) process_requests(); } } /******* Xt Callbacks ********/ #if USE_XT static XtInputId xt_add_input_fd(XtAppContext app, int fd, XtInputCallbackProc proc) { return XtAppAddInput(app, fd, (XtPointer) XtInputReadMask, proc, 0); } static void Delay_cb(XtPointer ptr, int * fd, XtInputId *xid) { process_delayed_requests(); } static void Input_cb(XtPointer ptr, int * fd, XtInputId *xid) { process_requests(); } static void Destroy_cb(Widget w, XtPointer cl_data, XtPointer ptr) { Detach((void*)cl_data); } static void Resize_hnd(Widget w, XtPointer cl_data, XEvent * event, Boolean * cont) { /* This function is necessary because Netscape sometimes doesn't resize the drawing area. */ *cont = True; if (event->type == ConfigureNotify) /* There can be a GravityNotify too */ { Instance *inst; void *id = (void*)cl_data; if ((inst = map_lookup(&instance, id))) if (Resize(id) <= 0) ProgramDied(); } } static const long event_mask = (KeyPressMask|KeyReleaseMask|SubstructureNotifyMask); static void Simulate_focus(Display *dpy, Window client, int yes) { XEvent ev; memset(&ev, 0, sizeof(ev)); ev.xfocus.display = dpy; ev.xfocus.type = (yes ? FocusIn : FocusOut); ev.xfocus.window = client; ev.xfocus.mode = NotifyNormal; ev.xfocus.detail = NotifyPointer; XSendEvent(dpy, client, False, NoEventMask, &ev); } static void Event_hnd(Widget w, XtPointer cl_data, XEvent * event, Boolean * cont) { Instance *inst; void *id = (void*)cl_data; *cont = True; if ((inst = map_lookup(&instance, id))) { Widget wid = inst->widget; Display *dpy = XtDisplay(wid); Window win = XtWindow(wid); XEvent ev = *event; switch(event->type) { case KeyPress: if ((ev.xkey.window = inst->client)) XSendEvent(dpy, inst->client, False, KeyPressMask, &ev ); break; case KeyRelease: if ((ev.xkey.window = inst->client)) XSendEvent(dpy, inst->client, False, KeyReleaseMask, &ev ); break; case DestroyNotify: if (ev.xdestroywindow.window == inst->client) inst->client = 0; break; case ReparentNotify: if (ev.xreparent.window == inst->client && ev.xreparent.parent != win) inst->client = 0; else if (ev.xreparent.parent == win) if ((inst->client = ev.xreparent.window)) Simulate_focus(dpy, inst->client, 1); break; } } } #endif /******* Gtk Callbacks ********/ #if USE_GLIB static gint g_source_add_input_fd(int fd, GIOFunc func) { GIOCondition cond = G_IO_IN | G_IO_PRI | G_IO_ERR | G_IO_HUP; GIOChannel *channel = g_io_channel_unix_new(fd); gint result = g_io_add_watch(channel, cond, func, 0); g_io_channel_unref(channel); return result; } static gboolean Delay_gcb(GIOChannel *source, GIOCondition condition, gpointer data) { process_delayed_requests(); return TRUE; } static gboolean Input_gcb(GIOChannel *source, GIOCondition condition, gpointer data) { process_requests(); return TRUE; } #endif /******************************************************************************* ***************************** Copying the colormap ***************************** *******************************************************************************/ /* This is no longer needed since djview no longer uses the provided colormap. This is kept to allow interoperability between nsdejavu.so and previous version of djview. LYB. */ static void CopyColormap(Display *displ, Visual *visual, Screen *screen, Colormap cmap) { unsigned long *pixels = 0; XColor *colors = 0; int n; if (colormap) return; if (cmap == DefaultColormapOfScreen(screen)) { /* This is also what we do should a problem occur */ problem: if (pixels) free(pixels); if (colors) free(colors); colormap = cmap; return; } /* Depends on the visual class */ switch(visual->class) { case StaticGray: case StaticColor: case TrueColor: /* Colormap for which there is nothing to copy */ colormap = XCreateColormap(displ, RootWindowOfScreen(screen), visual, AllocNone); break; case DirectColor: /* Use a simple ramp. QT does not like these anyway. */ colormap = XCreateColormap(displ, RootWindowOfScreen(screen), visual, AllocNone); for (n=0; nmap_entries; n++) { XColor cell; cell.pixel = n; cell.red = cell.green = cell.blue = (n * 0x10000)/visual->map_entries; cell.flags = DoRed | DoGreen | DoBlue; XAllocColor(displ, colormap, &cell); } break; case PseudoColor: case GrayScale: /* The complicated case */ { /* Make sure the colormap is rich enough. This happens to be pretty useless code, btw, as: 1. Netscape allocates the colorcube 2. It allocates it as RW, basically leaving no space in the 8bpp colormap that we could use. But we will give it a try anyway... */ int i,j,k; int again = TRUE; static unsigned short r1[] = { 0x0000, 0x9999, 0xffff }; static unsigned short r2[] = { 0x0000, 0x3333, 0x6666, 0x9999, 0xcccc, 0xffff }; /* Allocate 3x3x3 cube first. It's a good idea to allocate the most distinct colors first (from 3x3x3) and then proceed with other colors from 6x6x6. Should the colormap be nearly full, we will still get a reasonable approximation. */ for(i=0; again && i<3; i++) for(j=0; again && j<3; j++) for(k=0; again && k<3; k++) { XColor cell; cell.red = r1[i]; cell.green = r1[j]; cell.blue = r1[k]; cell.flags = DoRed | DoGreen | DoBlue; if (!XAllocColor(displ, cmap, &cell)) again = FALSE; } /* Proceed with additional colors of 6x6x6 cube. */ for(i=0; again && i<6; i++) for(j=0; again && j<6; j++) for(k=0; again && k<6; k++) { XColor cell; cell.red = r2[i]; cell.green = r2[j]; cell.blue = r2[k]; cell.flags = DoRed | DoGreen | DoBlue; if (!XAllocColor(displ, cmap, &cell)) again = FALSE; } /* Now copy the colormap */ colormap = XCreateColormap(displ, RootWindowOfScreen(screen), visual, AllocNone); pixels = malloc(visual->map_entries * sizeof(unsigned long)); if (!pixels) goto problem; XAllocColorCells(displ, colormap, False, pixels, 0, pixels, visual->map_entries); colors = malloc(visual->map_entries * sizeof(XColor)); if (!colors) goto problem; for (n=0; nmap_entries; n++) { colors[n].pixel = n; colors[n].flags = DoRed | DoGreen | DoBlue; /* This can be dropped */ } XQueryColors(displ, cmap, colors, visual->map_entries); XStoreColors(displ, colormap, colors, visual->map_entries); /* But make the desired ones read-only (so that QT can use them) */ for (n=0; nmap_entries; n++) { /* Free one cell exactly (all others are read/write) */ XColor cell = colors[n]; XFreeColors(displ, colormap, &cell.pixel, 1, 0); if (!XAllocColor(displ, colormap, &cell)) goto problem; if (cell.pixel != colors[n].pixel ) { cell.pixel = colors[n].pixel; XAllocColorCells(displ, colormap, False, 0, 0, &cell.pixel, 1); XStoreColor(displ, colormap, &cell); } } /* Calling XInstallColormap is needed on SGIs to ``finish-up'' the new colormap. This should be ok since it contains the same colors as Netscape's and we can expect that the currently installed colormap is Netscape's. Otherwise the screen may flash. */ XSync(displ, False); XInstallColormap(displ, colormap); /* Cleanup */ if (colors) free(colors); if (pixels) free(pixels); } break; default: goto problem; } } /******************************************************************************* ************************************* Utilities ******************************** *******************************************************************************/ static int IsConnectionOK(int handshake) { if (pipe_read<=0 || pipe_write<=0 || rev_pipe<=0) return FALSE; if (handshake) { if ( (WriteInteger(pipe_write, CMD_HANDSHAKE) <= 0) || (ReadResult(pipe_read, rev_pipe, check_requests) <= 0) ) return FALSE; } return TRUE; } static void ProgramDied(void) { CloseConnection(); /** Do not clear instances here as you used to! Netscape will probably call NPP_Destroy() later, and you will need to unregister handlers (such as Resize_hnd) */ StartProgram(); } static void CloseConnection(void) { /* Close all connections to the viewer */ #if USE_XT if (input_id) XtRemoveInput(input_id); input_id=0; #endif #if USE_GLIB if (input_gid) g_source_remove(input_gid); input_gid=0; #endif if (pipe_read>0) close(pipe_read); pipe_read=-1; if (pipe_write>0) close(pipe_write); pipe_write=-1; if (rev_pipe>0) close(rev_pipe); rev_pipe=-1; /* Update environment */ SaveStatic(); } static int Resize(void * id) { /* Instead of selecting ConfigureEvent in the application I catch resizeCallback here and send the appropriate request to the application */ Instance *inst; if (! (inst = map_lookup(&instance, id))) return 1; if (inst->xembed_mode) return 1; #if USE_XT else if (inst->widget) { Dimension width, height; XtVaGetValues(inst->widget, XtNwidth, &width, XtNheight, &height, NULL); if (! IsConnectionOK(TRUE)) return -1; if ( (WriteInteger(pipe_write, CMD_RESIZE) <= 0) || (WritePointer(pipe_write, id) <= 0) || (WriteInteger(pipe_write, width) <= 0) || (WriteInteger(pipe_write, height) <= 0) || (ReadResult(pipe_read, rev_pipe, check_requests) <= 0) ) return -1; } #endif return 1; } static int Detach(void * id) { Instance *inst; if (! (inst = map_lookup(&instance, id))) return 1; if (inst->window) { #if USE_XT if (inst->widget && !inst->xembed_mode) { XtRemoveCallback(inst->widget, XtNdestroyCallback, Destroy_cb, id); XtRemoveEventHandler(inst->widget, event_mask, False, Event_hnd, id); XtRemoveEventHandler(inst->widget, StructureNotifyMask, False, Resize_hnd, id); inst->widget = 0; inst->client = 0; } #endif inst->window = 0; if (! IsConnectionOK(TRUE)) return -1; if ( (WriteInteger(pipe_write, CMD_DETACH_WINDOW) <= 0) || (WritePointer(pipe_write, id) <= 0) || (ReadResult(pipe_read, rev_pipe, check_requests) <= 0) ) return -1; } return 1; } static int Attach(Display * displ, Window window, void * id) { char *displ_str; Instance *inst; Screen *screen; Colormap cmap; Visual *visual; char protocol_str[128]; XWindowAttributes attributes; int width, height; #if USE_XT XtAppContext app_context = 0; Widget widget = 0; #endif XSync(displ, False); if (!(inst = map_lookup(&instance, id))) return 1; #if USE_XT if (!inst->xembed_mode) { widget = XtWindowToWidget(displ, window); app_context = XtWidgetToApplicationContext(widget); XtAddCallback(widget, XtNdestroyCallback, Destroy_cb, id); XtAddEventHandler(widget, event_mask, False, Event_hnd, id); XtAddEventHandler(widget, StructureNotifyMask, False, Resize_hnd, id); if (! input_id) input_id = xt_add_input_fd(app_context, rev_pipe, Input_cb); if (! delay_id) delay_id = xt_add_input_fd(app_context, delay_pipe[0], Delay_cb); } #endif #if USE_GLIB if (inst->xembed_mode) { if (! input_gid) input_gid = g_source_add_input_fd(rev_pipe, Input_gcb); if (! delay_gid) delay_gid = g_source_add_input_fd(delay_pipe[0], Delay_gcb); } #endif /* Preparing CMD_ATTACH_WINDOW attributes */ displ_str = DisplayString(displ); if (!displ_str) displ_str=getenv("DISPLAY"); if (!displ_str) displ_str=":0"; if (XGetWindowAttributes(displ, window, &attributes)) { width = attributes.width; height = attributes.height; screen = attributes.screen; cmap = attributes.colormap; visual = attributes.visual; if (!colormap) { /* Allocating black and white colors */ XColor white_screen, white_exact; XColor black_screen, black_exact; XAllocNamedColor(displ, cmap, "white", &white_screen, &white_exact); white = white_screen.pixel; XAllocNamedColor(displ, cmap, "black", &black_screen, &black_exact); black = black_screen.pixel; CopyColormap(displ, visual, screen, cmap); } /* Prepare protocol string */ protocol_str[0]=0; if (inst->xembed_mode) strcpy(protocol_str, "XEMBED"); #if USE_XT else { /* Old viewers want the background color name instead. */ unsigned long back_color; XColor cell; XtVaGetValues(widget, XtNbackground, &back_color, NULL); cell.flags = DoRed | DoGreen | DoBlue; cell.pixel = back_color; XQueryColor(displ, cmap, &cell); sprintf(protocol_str, "rgb:%X/%X/%X", cell.red, cell.green, cell.blue); } if (widget && !inst->xembed_mode) XtMapWidget(widget); #endif XSync(displ, False); /* Send attach command */ if ( (WriteInteger(pipe_write, CMD_ATTACH_WINDOW) > 0) && (WritePointer(pipe_write, id) > 0) && (WriteString(pipe_write, displ_str) > 0) && (WriteString(pipe_write, protocol_str) > 0) && (WriteInteger(pipe_write, window) > 0) && (WriteInteger(pipe_write, colormap) > 0) && (WriteInteger(pipe_write, XVisualIDFromVisual(visual)) > 0) && (WriteInteger(pipe_write, width) > 0) && (WriteInteger(pipe_write, height) > 0) && (ReadResult(pipe_read, rev_pipe, check_requests) > 0) ) { /* Success */ inst->window = window; #if USE_XT inst->widget = widget; inst->client = 0; #endif return 1; } } /* Failure */ #if USE_XT if (widget) { XtRemoveCallback(widget, XtNdestroyCallback, Destroy_cb, id); XtRemoveEventHandler(widget, event_mask, False, Event_hnd, id); XtRemoveEventHandler(widget, StructureNotifyMask, False, Resize_hnd, id); } inst->widget = 0; inst->client = 0; #endif inst->window = 0; return -1; } static void UnsetVariable(const char *var) { const char *ptr = getenv(var); if (ptr && ptr[0]) { /* Putenv() does not work on RH5.1. But Unsetenv() is available. */ #ifdef __linux__ unsetenv(var); #else char *env = malloc(strlen(var)+2); strcpy(env, var); strcat(env, "="); putenv(env); #endif } } static int StartProgram(void) { const char *path; int fd[2]; int _pipe_read; int _pipe_write; int _rev_pipe; void *sigsave; pid_t pid; char *ptr, *p, *q; struct stat st; int s; if (IsConnectionOK(TRUE)) return 0; path = GetViewerPath(); if (!path || !path[0]) return -1; if (pipe(fd)<0) return -1; pipe_read = fd[0]; _pipe_write = fd[1]; if (pipe(fd)<0) return -1; pipe_write = fd[1]; _pipe_read = fd[0]; if (pipe(fd)<0) return -1; rev_pipe = fd[0]; _rev_pipe = fd[1]; /* We want to wait for this child. */ sigsave = (void*)signal(SIGCHLD,SIG_DFL); pid = vfork(); if (pid < 0) return -1; if (! pid) { /* These three lines look crazy, but the this is the only way I know to orphan a child under all versions of Unix. Otherwise the SIGCHLD may cause Netscape to crash. */ #ifdef NDEBUG setsid(); #endif signal(SIGCHLD,SIG_IGN); if (vfork()) _exit(0); /* Real Child */ close(pipe_read); close(pipe_write); close(rev_pipe); close(3); CHECK(dup(_pipe_read)); close(_pipe_read); close(4); CHECK(dup(_pipe_write)); close(_pipe_write); close(5); CHECK(dup(_rev_pipe)); close(_rev_pipe); /* Duplication above will guarantee, that the new file descriptors will not be closed on exec. Now close all file descriptors which we don't use. For some reasons we will inherit some from Netscape if we don't close them. */ for(s=8;s<1024;s++) close(s); /* This is needed for RedHat's version of Netscape. */ UnsetVariable("LD_PRELOAD"); UnsetVariable("XNLSPATH"); /* This is needed to disable session management in Qt */ UnsetVariable("SESSION_MANAGER"); /* Old autoinstaller fails to set the "executable" flag. */ if (stat(path, &st)>=0) { mode_t mode=st.st_mode; if (mode & S_IRUSR) mode|=S_IXUSR; if (mode & S_IRGRP) mode|=S_IXGRP; if (mode & S_IROTH) mode|=S_IXOTH; chmod(path, mode); } execl(path, path, "-netscape", NULL); fprintf(stderr,"nsdejavu: failed to execute %s\n", path); fflush(stderr); _exit(1); } /* Parent */ close(_pipe_write); close(_pipe_read); close(_rev_pipe); /* Wait for the primary child */ waitpid(pid, &s, 0); signal(SIGCHLD, sigsave); if (ReadString(pipe_read, &ptr, 0, 0) <= 0) { CloseConnection(); return -1; } /* Determine scriptability */ scriptable = 0; xembedable = 0; for (p=ptr; *p; p++) { if (isspace(*p)) continue; for (q=p; *q; q++) if (isspace(*q)) break; s = *q; *q = 0; if (!strcmp(p, "XEMBED")) xembedable = 1; if (!strcmp(p, "SCRIPT")) scriptable = 1; *q = s; p = q; } free(ptr); /* Obtain scriptability atoms */ if (scriptable && !npid_version) { npid_getdjvuopt = NPN_GetStringIdentifier("getdjvuopt"); npid_setdjvuopt = NPN_GetStringIdentifier("setdjvuopt"); npid_onchange = NPN_GetStringIdentifier("onchange"); npid_version = NPN_GetStringIdentifier("version"); } return 1; } /******************************************************************************* ***************************** NPRuntime interface ****************************** *******************************************************************************/ static void npvariantcpy(NPVariant *to, const NPVariant *from) { if (NPVARIANT_IS_OBJECT(*from)) { NPObject *object = NPVARIANT_TO_OBJECT(*from); NPN_RetainObject(object); OBJECT_TO_NPVARIANT(object, *to); return; } if (NPVARIANT_IS_STRING(*from)) { const NPString *s = &NPVARIANT_TO_STRING(*from); char *nstr = NPN_MemAlloc(s->utf8length+1); VOID_TO_NPVARIANT(*to); if (nstr) { memcpy(nstr, s->utf8characters, s->utf8length); nstr[s->utf8length] = 0; STRINGZ_TO_NPVARIANT(nstr, *to); } return; } *to = *from; } typedef struct FatNPObject { NPObject obj; NPP npp; } FatNPObject; static NPObject * np_allocate(NPP npp, NPClass *npclass) { FatNPObject *npobj = malloc(sizeof(FatNPObject)); if (npobj) { memset(npobj, 0, sizeof(FatNPObject)); npobj->obj._class = npclass; npobj->obj.referenceCount = 1; npobj->npp = npp; } return (NPObject*)npobj; } static void np_deallocate(NPObject *npobj) { free(npobj); } static void np_invalidate(NPObject *npobj) { } static bool np_hasmethod(NPObject *npobj, NPIdentifier name) { if (name == npid_getdjvuopt || name == npid_setdjvuopt ) return 1; return 0; } static bool np_invoke(NPObject *npobj, NPIdentifier name, const NPVariant *args, uint32_t argCount, NPVariant *result) { void *id = 0; Instance *inst = 0; if (npobj->_class && npobj->_class->allocate == np_allocate) if ((id = ((FatNPObject*)npobj)->npp->pdata)) inst = map_lookup(&instance, id); if (inst && name == npid_getdjvuopt) { // GetDjVuOpt ------------ if (argCount != 1) NPN_SetException(npobj, "Exactly one argument is expected"); else if (args[0].type != NPVariantType_String) NPN_SetException(npobj, "First argument should be a string"); else { char *res = 0; char *tmp = 0; const char *kname = NPVARIANT_TO_STRING(args[0]).utf8characters; int klen = NPVARIANT_TO_STRING(args[0]).utf8length; if ( (WriteInteger(pipe_write, CMD_GET_DJVUOPT) <= 0) || (WritePointer(pipe_write, id) <= 0) || (WriteStringLen(pipe_write, kname, klen) <= 0) || (ReadResult(pipe_read, rev_pipe, check_requests) <= 0) || (ReadString(pipe_read, &res, 0, 0) <= 0) ) { NPN_SetException(npobj, "Djview program died"); ProgramDied(); return 0; } if (! (tmp = NPN_MemAlloc(strlen(res) + 1))) { NPN_SetException(npobj, "Out of memory"); return 0; } strcpy(tmp, res); STRINGZ_TO_NPVARIANT(tmp, *result); free(res); return 1; } return 0; } else if (inst && name == npid_setdjvuopt) { // SetDjVuOpt ------------ if (argCount != 2) NPN_SetException(npobj, "Exactly two arguments were expected"); else if (args[0].type != NPVariantType_String) NPN_SetException(npobj, "First argument should be a string"); else { const char *kname = NPVARIANT_TO_STRING(args[0]).utf8characters; int klen = NPVARIANT_TO_STRING(args[0]).utf8length; char buffer[32]; const char *arg = buffer; int len = -1; if (NPVARIANT_IS_INT32(args[1])) sprintf(buffer,"%d", NPVARIANT_TO_INT32(args[1])); else if (NPVARIANT_IS_DOUBLE(args[1])) sprintf(buffer,"%e", NPVARIANT_TO_DOUBLE(args[1])); else if (NPVARIANT_IS_STRING(args[1])) { arg = NPVARIANT_TO_STRING(args[1]).utf8characters; len = NPVARIANT_TO_STRING(args[1]).utf8length; } else { NPN_SetException(npobj, "Arg 2 should be a string or a number"); return 0; } if (len < 0) len = strlen(arg); if ( (WriteInteger(pipe_write, CMD_SET_DJVUOPT) <= 0) || (WritePointer(pipe_write, id) <= 0) || (WriteStringLen(pipe_write, kname, klen) <= 0) || (WriteStringLen(pipe_write, arg, len) <= 0) || (ReadResult(pipe_read, rev_pipe, check_requests) <= 0) ) { NPN_SetException(npobj, "Djview program died"); ProgramDied(); return 0; } VOID_TO_NPVARIANT(*result); return 1; } return 0; } NPN_SetException(npobj, "Unrecognized method"); return 0; } static bool np_invokedefault(NPObject *npobj, const NPVariant *args, uint32 argCount, NPVariant *result) { return 0; } static bool np_hasproperty(NPObject *npobj, NPIdentifier name) { if (name == npid_onchange || name == npid_version) return 1; return 0; } static bool np_getproperty(NPObject *npobj, NPIdentifier name, NPVariant *result) { void *id = 0; Instance *inst = 0; if (npobj->_class && npobj->_class->allocate == np_allocate) if ((id = ((FatNPObject*)npobj)->npp->pdata)) inst = map_lookup(&instance, id); if (inst && name == npid_onchange) { npvariantcpy(result, &inst->onchange); return 1; } else if (inst && name == npid_version) { NPVariant res; STRINGZ_TO_NPVARIANT("nsdejavu+djview4 (x11)", res); npvariantcpy(result, &res); return 1; } return 0; } static bool np_setproperty(NPObject *npobj, NPIdentifier name, const NPVariant *value) { void *id = 0; Instance *inst = 0; if (npobj->_class && npobj->_class->allocate == np_allocate) if ((id = ((FatNPObject*)npobj)->npp->pdata)) inst = map_lookup(&instance, id); if (inst && name == npid_onchange) { int onchange_flag = 0; NPN_ReleaseVariantValue(&inst->onchange); npvariantcpy(&inst->onchange, value); if (NPVARIANT_IS_STRING(*value)) onchange_flag = 1; else if (! NPVARIANT_IS_NULL(*value) && ! NPVARIANT_IS_VOID(*value) ) { NPN_SetException(npobj, "String or null expected"); return 0; } if ( (WriteInteger(pipe_write, CMD_ON_CHANGE) <= 0) || (WritePointer(pipe_write, id) <= 0) || (WriteInteger(pipe_write, onchange_flag) <= 0) || (ReadResult(pipe_read, rev_pipe, check_requests) <= 0) ) { NPN_SetException(npobj, "Djview program died"); ProgramDied(); return 0; } return 1; } return 0; } static bool np_removeproperty(NPObject *npobj, NPIdentifier name) { NPVariant v; VOID_TO_NPVARIANT(v); return np_setproperty(npobj, name, &v); } static NPClass npclass = { NP_CLASS_STRUCT_VERSION, np_allocate, np_deallocate, np_invalidate, np_hasmethod, np_invoke, np_invokedefault, np_hasproperty, np_getproperty, np_setproperty, np_removeproperty }; /******************************************************************************* ***************************** Netscape plugin interface ************************ *******************************************************************************/ NPError NPP_Initialize(void) { LoadStatic(); if (pipe(delay_pipe) < 0) return NPERR_GENERIC_ERROR; return NPERR_NO_ERROR; } void NPP_Shutdown(void) { #if USE_XT if (input_id) XtRemoveInput(input_id); input_id = 0; if (delay_id) XtRemoveInput(delay_id); delay_id = 0; #endif #if USE_GLIB if (input_gid) g_source_remove(input_gid); input_gid = 0; if (delay_gid) g_source_remove(delay_gid); delay_gid = 0; #endif close(delay_pipe[0]); close(delay_pipe[1]); map_purge(&instance); map_purge(&strinstance); delayedrequest_purge(&delayed_requests); SaveStatic(); if (IsConnectionOK(FALSE)) WriteInteger(pipe_write, CMD_SHUTDOWN); } NPError NPP_New(NPMIMEType mime, NPP np_inst, uint16 np_mode, int16 argc, char* argn[], char* argv[], NPSavedData * saved) { const char *path; Instance *inst = 0; void *id = 0; int i; if (!IsConnectionOK(TRUE)) { CloseConnection(); StartProgram(); } path = GetLibraryPath(); if ( (WriteInteger(pipe_write, CMD_NEW) <= 0) || (WriteInteger(pipe_write, np_mode==NP_FULL) <= 0) || (WriteString(pipe_write, path) <= 0) || (WriteInteger(pipe_write, argc) <= 0) ) { problem: ProgramDied(); map_remove(&instance, id); return NPERR_GENERIC_ERROR; } for(i=0;ibuf && saved->len==sizeof(SavedData)) { SavedData * data = (SavedData *) saved->buf; if ( (WriteInteger(pipe_write, 1) <= 0) || (WriteInteger(pipe_write, data->cmd_mode) <= 0) || (WriteInteger(pipe_write, data->cmd_zoom) <= 0) || (WriteInteger(pipe_write, data->imgx) <= 0) || (WriteInteger(pipe_write, data->imgy) <= 0) ) goto problem; } else if (WriteInteger(pipe_write, 0) <= 0) goto problem; if (ReadResult(pipe_read, rev_pipe, check_requests) <= 0) goto problem; if (ReadPointer(pipe_read, &id, 0, 0) <= 0) goto problem; if ((inst = map_lookup(&instance, id))) /* This can happen because we do not clear the instance array when restarting djview. We just undo it... */ map_remove(&instance, id); np_inst->pdata = id; if (! (inst = instance_new(np_inst, np_mode==NP_FULL))) goto problem; if (map_insert(&instance, id, inst) < 0) goto problem; if (scriptable) inst->npobject = NPN_CreateObject(np_inst, &npclass); #if USE_GLIB if (xembedable) NPN_GetValue(np_inst, NPNVSupportsXEmbedBool, &inst->xembed_mode); #endif if (NPN_GetValue(np_inst, NPNVToolkit, &inst->toolkit) != NPERR_NO_ERROR) inst->toolkit = (NPNToolkitType)(-1); #if USE_XT_IN_PRIORITY if (inst->xembed_mode && inst->toolkit != NPNVGtk2 && XtWindowToWidget) inst->xembed_mode = 0; #endif fprintf(stderr,"nsdejavu: using the %s protocol.\n", (inst->xembed_mode) ? "XEmbed" : "Xt"); #if USE_GLIB if (inst->xembed_mode && g_io_add_watch) return NPERR_NO_ERROR; #endif #if USE_XT if (!inst->xembed_mode && XtWindowToWidget) return NPERR_NO_ERROR; #endif fprintf(stderr,"nsdejavu: browser does not export the %s symbols.\n", (inst->xembed_mode) ? "Glib2" : "Xt" ); return NPERR_INCOMPATIBLE_VERSION_ERROR; } NPError NPP_Destroy(NPP np_inst, NPSavedData ** save) { Instance *inst = 0; void * id = np_inst->pdata; SavedData saved_data; if (! (inst = map_lookup(&instance, id))) return NPERR_INVALID_INSTANCE_ERROR; if (inst->npobject) NPN_ReleaseObject(inst->npobject); inst->npobject = 0; NPP_SetWindow(np_inst, 0); map_remove(&instance, id); np_inst->pdata=0; if (IsConnectionOK(FALSE)) { if ( (WriteInteger(pipe_write, CMD_DESTROY) <= 0) || (WritePointer(pipe_write, id) <= 0) || (ReadResult(pipe_read, rev_pipe, check_requests) <= 0) || (ReadInteger(pipe_read, &saved_data.cmd_mode, 0, 0) <= 0) || (ReadInteger(pipe_read, &saved_data.cmd_zoom, 0, 0) <= 0) || (ReadInteger(pipe_read, &saved_data.imgx, 0, 0) <= 0) || (ReadInteger(pipe_read, &saved_data.imgy, 0, 0) <= 0) ) { ProgramDied(); if (inst) instance_free(inst); return NPERR_GENERIC_ERROR; } if (save && !*save && saved_data.cmd_mode>0 && saved_data.cmd_zoom>0) { SavedData *data = (SavedData*) NPN_MemAlloc(sizeof(SavedData)); NPSavedData *saved = (NPSavedData*) NPN_MemAlloc(sizeof(NPSavedData)); if (saved && data) { *data=saved_data; saved->len = sizeof(SavedData); saved->buf = (void*)data; *save = saved; } } } if (inst) instance_free(inst); return NPERR_NO_ERROR; } NPError NPP_SetWindow(NPP np_inst, NPWindow * win_str) { Instance *inst = 0; void * id = np_inst->pdata; Window cur_window, new_window; if (! (inst = map_lookup(&instance, id))) return NPERR_INVALID_INSTANCE_ERROR; cur_window = inst->window; new_window = (win_str) ? (Window) win_str->window : 0; if (cur_window) { if (new_window==cur_window) { Resize(id); return NPERR_NO_ERROR; } if (Detach(id) < 0) { ProgramDied(); return NPERR_GENERIC_ERROR; } } if (new_window) { Display *displ = 0; if (NPN_GetValue(np_inst, NPNVxDisplay, &displ) != NPERR_NO_ERROR) displ = ((NPSetWindowCallbackStruct *)(win_str->ws_info))->display; if (!IsConnectionOK(FALSE)) return NPERR_GENERIC_ERROR; if (Attach(displ, new_window, id) < 0) { ProgramDied(); return NPERR_GENERIC_ERROR; } } return NPERR_NO_ERROR; } void NPP_Print(NPP np_inst, NPPrint* printInfo) { Instance *inst = 0; void * id = np_inst->pdata; if ((inst = map_lookup(&instance, id))) if (inst->window) { if (printInfo && printInfo->mode==NP_FULL) printInfo->print.fullPrint.pluginPrinted=TRUE; if (IsConnectionOK(FALSE)) { int modefull = printInfo && printInfo->mode==NP_FULL; if ( (WriteInteger(pipe_write, CMD_PRINT) <= 0) || (WritePointer(pipe_write, id) <= 0) || (WriteInteger(pipe_write, modefull) <= 0) || (ReadResult(pipe_read, rev_pipe, check_requests) <= 0) ) { ProgramDied(); return; } } } } NPError NPP_NewStream(NPP np_inst, NPMIMEType type, NPStream *stream, NPBool seekable, uint16 *stype) { Instance *inst = 0; void * id = np_inst->pdata; void * sid = 0; if (! (inst = map_lookup(&instance, id))) return NPERR_INVALID_INSTANCE_ERROR; if ( (WriteInteger(pipe_write, CMD_NEW_STREAM) <= 0) || (WritePointer(pipe_write, id) <= 0) || (WriteString(pipe_write, stream->url) <= 0) || (ReadResult(pipe_read, rev_pipe, check_requests) <= 0) || (ReadPointer(pipe_read, &sid, 0, 0) <= 0) ) { ProgramDied(); return NPERR_GENERIC_ERROR; } /* Zero sid means that we do not want this stream */ stream->pdata = sid; if (sid != 0) map_insert(&strinstance, sid, (void*)1); return NPERR_NO_ERROR; } int32 NPP_WriteReady(NPP np_inst, NPStream *np_stream) { return 0x7fffffff; } int32 NPP_Write(NPP np_inst, NPStream *stream, int32 junk, int32 len, void *buffer) { int res = 0; void * sid = stream->pdata; if (sid) { if (! map_lookup(&strinstance, sid)) return res; if ( (WriteInteger(pipe_write, CMD_WRITE) <= 0) || (WritePointer(pipe_write, sid) <= 0) || (WriteArray(pipe_write, len, buffer) <= 0) || (ReadResult(pipe_read, rev_pipe, check_requests) <= 0) || (ReadInteger(pipe_read, &res, 0, 0) <= 0) ) { ProgramDied(); return res; } /* ZERO means, that the stream ID sid is meaningless to the viewer. This may happen from time to time. Especially when user hits Reload or when viewer dies and another one is started back (of course, the new instance of the viewer knows nothing about streams or plugins, which were active in the viewer, which just died */ if (res == 0) map_remove(&strinstance, sid); return res; } return len; } NPError NPP_DestroyStream(NPP np_inst, NPStream *stream, NPError reason) { void * sid = stream->pdata; if (! map_lookup(&strinstance, sid)) return NPERR_INVALID_INSTANCE_ERROR; if (!IsConnectionOK(FALSE)) return NPERR_GENERIC_ERROR; map_remove(&strinstance, sid); if ( (WriteInteger(pipe_write, CMD_DESTROY_STREAM) <= 0) || (WritePointer(pipe_write, sid) <= 0) || (WriteInteger(pipe_write, reason==NPRES_DONE) <= 0) || (ReadResult(pipe_read, rev_pipe, check_requests) <= 0) ) { ProgramDied(); return NPERR_GENERIC_ERROR; } return NPERR_NO_ERROR; } /******************************************************************************* ***************************** Stuff, really stuff ****************************** *******************************************************************************/ void NPP_StreamAsFile(NPP np_inst, NPStream *stream, const char* fname) { } int16 NPP_HandleEvent(NPP np_inst, void* event) { return 0; } void NPP_URLNotify(NPP np_inst, const char *url, NPReason reason, void *ptr) { if (IsConnectionOK(FALSE)) { int code; if (reason==NPRES_DONE) code = 0; else if (reason==NPRES_USER_BREAK) code = 1; else code = 2; if ( (WriteInteger(pipe_write, CMD_URL_NOTIFY) <= 0) || (WriteString(pipe_write, url) <= 0) || (WriteInteger(pipe_write, code) <= 0) || (ReadResult(pipe_read, rev_pipe, check_requests) <= 0) ) { ProgramDied(); } } } char * NPP_GetMIMEDescription(void) { return "image/x-djvu:djvu,djv:DjVu File;" "image/x.djvu::DjVu File;" "image/djvu::DjVu File;" "image/x-dejavu::DjVu File (obsolete);" "image/x-iw44::DjVu File (obsolete);" "image/vnd.djvu::DjVu File;" ; } jref NPP_GetJavaClass(void) { return NULL; } NPError NPP_GetValue(NPP np_inst, NPPVariable variable, void *value) { NPError err = NPERR_GENERIC_ERROR; switch (variable) { case NPPVpluginNameString: #if defined(DJVIEW_VERSION_STR) *((char **)value) = "DjView-" DJVIEW_VERSION_STR; #elif defined(DJVULIBRE_VERSION) *((char **)value) = "DjVuLibre-" DJVULIBRE_VERSION; #endif err = NPERR_NO_ERROR; break; case NPPVpluginDescriptionString: *((char **)value) = #if defined(DJVIEW_VERSION_STR) "This is the " "DjView-" DJVIEW_VERSION_STR " version of the DjVu plugin.
" #elif defined(DJVULIBRE_VERSION) "This is the " "DjVuLibre-" DJVULIBRE_VERSION " version of the DjVu plugin.
" #endif "See DjVuLibre."; err = NPERR_NO_ERROR; break; case NPPVpluginNeedsXEmbed: { void * id = np_inst->pdata; Instance *inst = map_lookup(&instance, id); if (! inst || ! inst->xembed_mode) break; err = NPERR_NO_ERROR; *((NPBool*)value) = TRUE; } break; case NPPVpluginScriptableNPObject: if (scriptable) { void * id = np_inst->pdata; Instance *inst = map_lookup(&instance, id); if (!inst || !inst->npobject) break; err = NPERR_NO_ERROR; NPN_RetainObject(inst->npobject); *((NPObject**)value) = inst->npobject; } break; default: break; } return err; } /****************************************************************************** *************** This replaces npunix.c from the Netscape SDK ****************** ******** Derived from nspluginwrapper licensed under GPL v2 or later ********** *******************************************************************************/ char * NP_GetMIMEDescription(void) { return NPP_GetMIMEDescription(); } NPError NP_GetValue(void *future, NPPVariable variable, void *value) { return NPP_GetValue((NPP)future, variable, value); } NPError NP_Shutdown(void) { NPP_Shutdown(); return NPERR_NO_ERROR; } static NPNetscapeFuncs mozilla_funcs; static int mozilla_has_npruntime = 0; void NPN_Version(int* plugin_major, int* plugin_minor, int* mozilla_major, int* mozilla_minor) { *plugin_major = NP_VERSION_MAJOR; *plugin_minor = NP_VERSION_MINOR; *mozilla_major = mozilla_funcs.version >> 8; *mozilla_minor = mozilla_funcs.version & 0xFF; } NPError NPN_GetValue(NPP instance, NPNVariable variable, void *r_value) { if (mozilla_funcs.getvalue == NULL) return NPERR_INVALID_FUNCTABLE_ERROR; return CallNPN_GetValueProc(mozilla_funcs.getvalue, instance, variable, r_value); } NPError NPN_GetURL(NPP instance, const char* url, const char* window) { if (mozilla_funcs.geturl == NULL) return NPERR_INVALID_FUNCTABLE_ERROR; return CallNPN_GetURLProc(mozilla_funcs.geturl, instance, url, window); } NPError NPN_GetURLNotify(NPP instance, const char* url, const char* window, void * data) { if (mozilla_funcs.geturlnotify == NULL) return NPERR_INVALID_FUNCTABLE_ERROR; return CallNPN_GetURLNotifyProc(mozilla_funcs.geturlnotify, instance, url, window, data); } NPError NPN_PostURL(NPP instance, const char* url, const char* window, uint32 len, const char* buf, NPBool file) { if (mozilla_funcs.posturl == NULL) return NPERR_INVALID_FUNCTABLE_ERROR; return CallNPN_PostURLProc(mozilla_funcs.posturl, instance, url, window, len, buf, file); } NPError NPN_RequestRead(NPStream* stream, NPByteRange* rangeList) { if (mozilla_funcs.requestread == NULL) return NPERR_INVALID_FUNCTABLE_ERROR; return CallNPN_RequestReadProc(mozilla_funcs.requestread, stream, rangeList); } NPError NPN_NewStream(NPP instance, NPMIMEType type, const char *window, NPStream** stream_ptr) { if (mozilla_funcs.newstream == NULL) return NPERR_INVALID_FUNCTABLE_ERROR; return CallNPN_NewStreamProc(mozilla_funcs.newstream, instance, type, window, stream_ptr); } int32 NPN_Write(NPP instance, NPStream* stream, int32 len, void* buffer) { if (mozilla_funcs.write == NULL) return -1; return CallNPN_WriteProc(mozilla_funcs.write, instance, stream, len, buffer); } NPError NPN_DestroyStream(NPP instance, NPStream* stream, NPError reason) { if (mozilla_funcs.destroystream == NULL) return NPERR_INVALID_FUNCTABLE_ERROR; return CallNPN_DestroyStreamProc(mozilla_funcs.destroystream, instance, stream, reason); } void NPN_Status(NPP instance, const char* message) { CallNPN_StatusProc(mozilla_funcs.status, instance, message); } const char* NPN_UserAgent(NPP instance) { return CallNPN_UserAgentProc(mozilla_funcs.uagent, instance); } void* NPN_MemAlloc(uint32 size) { return CallNPN_MemAllocProc(mozilla_funcs.memalloc, size); } void NPN_MemFree(void* ptr) { CallNPN_MemFreeProc(mozilla_funcs.memfree, ptr); } void NPN_ReloadPlugins(NPBool reloadPages) { if (mozilla_funcs.reloadplugins != NULL) CallNPN_ReloadPluginsProc(mozilla_funcs.reloadplugins, reloadPages); } NPError NPN_SetValue(NPP instance, NPPVariable variable, void *value) { if (mozilla_funcs.setvalue == NULL) return NPERR_INVALID_FUNCTABLE_ERROR; return CallNPN_GetValueProc(mozilla_funcs.setvalue, instance, variable, value); } void NPN_InvalidateRect(NPP instance, NPRect *invalid) { if (mozilla_funcs.invalidaterect != NULL) CallNPN_InvalidateRectProc(mozilla_funcs.invalidaterect, instance, invalid); } void NPN_InvalidateRegion(NPP instance, NPRegion invalid) { if (mozilla_funcs.invalidateregion != NULL) CallNPN_InvalidateRegionProc(mozilla_funcs.invalidateregion, instance, invalid); } void NPN_ForceRedraw(NPP instance) { if (mozilla_funcs.forceredraw != NULL) CallNPN_ForceRedrawProc(mozilla_funcs.forceredraw, instance); } NPIdentifier NPN_GetStringIdentifier(const NPUTF8 *name) { if (!mozilla_funcs.getstringidentifier || !mozilla_has_npruntime) return NULL; return CallNPN_GetStringIdentifierProc(mozilla_funcs.getstringidentifier, name); } NPIdentifier NPN_GetIntIdentifier(int32_t intid) { if (!mozilla_funcs.getintidentifier || !mozilla_has_npruntime) return NULL; return CallNPN_GetIntIdentifierProc(mozilla_funcs.getintidentifier, intid); } bool NPN_IdentifierIsString(NPIdentifier identifier) { if (!mozilla_funcs.identifierisstring || !mozilla_has_npruntime) return FALSE; return CallNPN_IdentifierIsStringProc(mozilla_funcs.identifierisstring, identifier); } NPUTF8 * NPN_UTF8FromIdentifier(NPIdentifier identifier) { if (!mozilla_funcs.utf8fromidentifier || !mozilla_has_npruntime) return NULL; return CallNPN_UTF8FromIdentifierProc(mozilla_funcs.utf8fromidentifier, identifier); } int32_t NPN_IntFromIdentifier(NPIdentifier identifier) { if (!mozilla_funcs.intfromidentifier || !mozilla_has_npruntime) return 0; return CallNPN_IntFromIdentifierProc(mozilla_funcs.intfromidentifier, identifier); } NPObject * NPN_CreateObject(NPP npp, NPClass *aClass) { if (!mozilla_funcs.createobject || !mozilla_has_npruntime) return 0; return CallNPN_CreateObjectProc(mozilla_funcs.createobject, npp, aClass); } NPObject * NPN_RetainObject(NPObject *npobj) { if (!mozilla_funcs.retainobject || !mozilla_has_npruntime) return npobj; return CallNPN_RetainObjectProc(mozilla_funcs.retainobject, npobj); } void NPN_ReleaseObject(NPObject *npobj) { if (mozilla_funcs.releaseobject && mozilla_has_npruntime) CallNPN_ReleaseObjectProc(mozilla_funcs.releaseobject, npobj); } void NPN_ReleaseVariantValue(NPVariant *npvariant) { if (mozilla_funcs.releasevariantvalue && mozilla_has_npruntime) CallNPN_ReleaseVariantValueProc(mozilla_funcs.releasevariantvalue, npvariant); } bool NPN_Evaluate(NPP npp, NPObject* obj, NPString *script, NPVariant *result) { if (!mozilla_funcs.createobject || !mozilla_has_npruntime) return 0; return CallNPN_EvaluateProc(mozilla_funcs.evaluate, npp, obj, script, result); } void NPN_SetException(NPObject *npobj, const NPUTF8 *message) { if (mozilla_funcs.setexception && mozilla_has_npruntime) CallNPN_SetExceptionProc(mozilla_funcs.setexception, npobj, message); } NPError NP_Initialize(NPNetscapeFuncs *moz_funcs, NPPluginFuncs *plugin_funcs) { /* basic checks */ if (moz_funcs == NULL || plugin_funcs == NULL) return NPERR_INVALID_FUNCTABLE_ERROR; if ((moz_funcs->version >> 8) != NP_VERSION_MAJOR) return NPERR_INCOMPATIBLE_VERSION_ERROR; if (moz_funcs->size < (offsetof(NPNetscapeFuncs, forceredraw) + sizeof(NPN_ForceRedrawUPP) )) return NPERR_INVALID_FUNCTABLE_ERROR; if (plugin_funcs->size < sizeof(NPPluginFuncs)) return NPERR_INVALID_FUNCTABLE_ERROR; /* copy mozilla_funcs. */ memcpy(&mozilla_funcs, moz_funcs, min(moz_funcs->size, sizeof(mozilla_funcs))); /* fill plugin_funcs. */ memset(plugin_funcs, 0, sizeof(*plugin_funcs)); plugin_funcs->size = sizeof(NPPluginFuncs); plugin_funcs->version = (NP_VERSION_MAJOR << 8) + NP_VERSION_MINOR; plugin_funcs->newp = NewNPP_NewProc(NPP_New); plugin_funcs->destroy = NewNPP_DestroyProc(NPP_Destroy); plugin_funcs->setwindow = NewNPP_SetWindowProc(NPP_SetWindow); plugin_funcs->newstream = NewNPP_NewStreamProc(NPP_NewStream); plugin_funcs->destroystream = NewNPP_DestroyStreamProc(NPP_DestroyStream); plugin_funcs->asfile = NewNPP_StreamAsFileProc(NPP_StreamAsFile); plugin_funcs->writeready = NewNPP_WriteReadyProc(NPP_WriteReady); plugin_funcs->write = NewNPP_WriteProc(NPP_Write); plugin_funcs->print = NewNPP_PrintProc(NPP_Print); plugin_funcs->event = NULL; plugin_funcs->urlnotify = NewNPP_URLNotifyProc(NPP_URLNotify); plugin_funcs->javaClass = NULL; plugin_funcs->getvalue = NewNPP_GetValueProc(NPP_GetValue); plugin_funcs->setvalue = NULL; /* check for npruntime */ mozilla_has_npruntime = 1; if ((moz_funcs->version >> 8) == 0 && (moz_funcs->version & 0xff) < 14) mozilla_has_npruntime = 0; if (moz_funcs->size < (offsetof(NPNetscapeFuncs, setexception) + sizeof(NPN_SetExceptionUPP) )) mozilla_has_npruntime = 0; /* call npp_initialize */ return NPP_Initialize(); } djview4/nsdejavu/test.html000066400000000000000000000047441174072760700161420ustar00rootroot00000000000000 Test of nsdejavu scriptability features


No plugin


No information


       


Key: 
Value: 


djview4/src/000077500000000000000000000000001174072760700132345ustar00rootroot00000000000000djview4/src/.gitignore000066400000000000000000000001501174072760700152200ustar00rootroot00000000000000/*.moc /*.o /*.qm /Makefile /djview /moc_*.cpp /qrc_*.cpp /ui_*.h /release/ /debug/ /*.vcxproj* /*.pdb djview4/src/Doxyfile000066400000000000000000001430771174072760700147560ustar00rootroot00000000000000# Doxyfile 1.4.4 # This file describes the settings to be used by the documentation system # doxygen (www.doxygen.org) for a project # # All text after a hash (#) is considered a comment and will be ignored # The format is: # TAG = value [value, ...] # For lists items can also be appended using: # TAG += value [value, ...] # Values that contain spaces should be placed between quotes (" ") #--------------------------------------------------------------------------- # Project related configuration options #--------------------------------------------------------------------------- # The PROJECT_NAME tag is a single word (or a sequence of words surrounded # by quotes) that should identify the project. PROJECT_NAME = djview # The PROJECT_NUMBER tag can be used to enter a project or revision number. # This could be handy for archiving the generated documentation or # if some version control system is used. PROJECT_NUMBER = 4.0 # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) # base path where the generated documentation will be put. # If a relative path is entered, it will be relative to the location # where doxygen was started. If left blank the current directory will be used. OUTPUT_DIRECTORY = doc # If the CREATE_SUBDIRS tag is set to YES, then doxygen will create # 4096 sub-directories (in 2 levels) under the output directory of each output # format and will distribute the generated files over these directories. # Enabling this option can be useful when feeding doxygen a huge amount of # source files, where putting all generated files in the same directory would # otherwise cause performance problems for the file system. CREATE_SUBDIRS = NO # The OUTPUT_LANGUAGE tag is used to specify the language in which all # documentation generated by doxygen is written. Doxygen will use this # information to generate all constant output in the proper language. # The default language is English, other supported languages are: # Brazilian, Catalan, Chinese, Chinese-Traditional, Croatian, Czech, Danish, # Dutch, Finnish, French, German, Greek, Hungarian, Italian, Japanese, # Japanese-en (Japanese with English messages), Korean, Korean-en, Norwegian, # Polish, Portuguese, Romanian, Russian, Serbian, Slovak, Slovene, Spanish, # Swedish, and Ukrainian. OUTPUT_LANGUAGE = English # This tag can be used to specify the encoding used in the generated output. # The encoding is not always determined by the language that is chosen, # but also whether or not the output is meant for Windows or non-Windows users. # In case there is a difference, setting the USE_WINDOWS_ENCODING tag to YES # forces the Windows encoding (this is the default for the Windows binary), # whereas setting the tag to NO uses a Unix-style encoding (the default for # all platforms other than Windows). USE_WINDOWS_ENCODING = NO # If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will # include brief member descriptions after the members that are listed in # the file and class documentation (similar to JavaDoc). # Set to NO to disable this. BRIEF_MEMBER_DESC = NO # If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend # the brief description of a member or function before the detailed description. # Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the # brief descriptions will be completely suppressed. REPEAT_BRIEF = YES # This tag implements a quasi-intelligent brief description abbreviator # that is used to form the text in various listings. Each string # in this list, if found as the leading text of the brief description, will be # stripped from the text and the result after processing the whole list, is # used as the annotated text. Otherwise, the brief description is used as-is. # If left blank, the following values are used ("$name" is automatically # replaced with the name of the entity): "The $name class" "The $name widget" # "The $name file" "is" "provides" "specifies" "contains" # "represents" "a" "an" "the" ABBREVIATE_BRIEF = # If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then # Doxygen will generate a detailed section even if there is only a brief # description. ALWAYS_DETAILED_SEC = NO # If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all # inherited members of a class in the documentation of that class as if those # members were ordinary class members. Constructors, destructors and assignment # operators of the base classes will not be shown. INLINE_INHERITED_MEMB = NO # If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full # path before files name in the file list and in the header files. If set # to NO the shortest path that makes the file name unique will be used. FULL_PATH_NAMES = NO # If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag # can be used to strip a user-defined part of the path. Stripping is # only done if one of the specified strings matches the left-hand part of # the path. The tag can be used to show relative paths in the file list. # If left blank the directory from which doxygen is run is used as the # path to strip. STRIP_FROM_PATH = # The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of # the path mentioned in the documentation of a class, which tells # the reader which header file to include in order to use a class. # If left blank only the name of the header file containing the class # definition is used. Otherwise one should specify the include paths that # are normally passed to the compiler using the -I flag. STRIP_FROM_INC_PATH = # If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter # (but less readable) file names. This can be useful is your file systems # doesn't support long names like on DOS, Mac, or CD-ROM. SHORT_NAMES = NO # If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen # will interpret the first line (until the first dot) of a JavaDoc-style # comment as the brief description. If set to NO, the JavaDoc # comments will behave just like the Qt-style comments (thus requiring an # explicit @brief command for a brief description. JAVADOC_AUTOBRIEF = NO # The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen # treat a multi-line C++ special comment block (i.e. a block of //! or /// # comments) as a brief description. This used to be the default behaviour. # The new default is to treat a multi-line C++ comment block as a detailed # description. Set this tag to YES if you prefer the old behaviour instead. MULTILINE_CPP_IS_BRIEF = NO # If the DETAILS_AT_TOP tag is set to YES then Doxygen # will output the detailed description near the top, like JavaDoc. # If set to NO, the detailed description appears after the member # documentation. DETAILS_AT_TOP = NO # If the INHERIT_DOCS tag is set to YES (the default) then an undocumented # member inherits the documentation from any documented member that it # re-implements. INHERIT_DOCS = YES # If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC # tag is set to YES, then doxygen will reuse the documentation of the first # member in the group (if any) for the other members of the group. By default # all members of a group must be documented explicitly. DISTRIBUTE_GROUP_DOC = NO # If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce # a new page for each member. If set to NO, the documentation of a member will # be part of the file/class/namespace that contains it. SEPARATE_MEMBER_PAGES = NO # The TAB_SIZE tag can be used to set the number of spaces in a tab. # Doxygen uses this value to replace tabs by spaces in code fragments. TAB_SIZE = 8 # This tag can be used to specify a number of aliases that acts # as commands in the documentation. An alias has the form "name=value". # For example adding "sideeffect=\par Side Effects:\n" will allow you to # put the command \sideeffect (or @sideeffect) in the documentation, which # will result in a user-defined paragraph with heading "Side Effects:". # You can put \n's in the value part of an alias to insert newlines. ALIASES = # Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C # sources only. Doxygen will then generate output that is more tailored for C. # For instance, some of the names that are used will be different. The list # of all members will be omitted, etc. OPTIMIZE_OUTPUT_FOR_C = NO # Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java sources # only. Doxygen will then generate output that is more tailored for Java. # For instance, namespaces will be presented as packages, qualified scopes # will look different, etc. OPTIMIZE_OUTPUT_JAVA = NO # Set the SUBGROUPING tag to YES (the default) to allow class member groups of # the same type (for instance a group of public functions) to be put as a # subgroup of that type (e.g. under the Public Functions section). Set it to # NO to prevent subgrouping. Alternatively, this can be done per class using # the \nosubgrouping command. SUBGROUPING = YES #--------------------------------------------------------------------------- # Build related configuration options #--------------------------------------------------------------------------- # If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in # documentation are documented, even if no documentation was available. # Private class members and static file members will be hidden unless # the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES EXTRACT_ALL = NO # If the EXTRACT_PRIVATE tag is set to YES all private members of a class # will be included in the documentation. EXTRACT_PRIVATE = NO # If the EXTRACT_STATIC tag is set to YES all static members of a file # will be included in the documentation. EXTRACT_STATIC = NO # If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) # defined locally in source files will be included in the documentation. # If set to NO only classes defined in header files are included. EXTRACT_LOCAL_CLASSES = YES # This flag is only useful for Objective-C code. When set to YES local # methods, which are defined in the implementation section but not in # the interface are included in the documentation. # If set to NO (the default) only methods in the interface are included. EXTRACT_LOCAL_METHODS = NO # If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all # undocumented members of documented classes, files or namespaces. # If set to NO (the default) these members will be included in the # various overviews, but no documentation section is generated. # This option has no effect if EXTRACT_ALL is enabled. HIDE_UNDOC_MEMBERS = NO # If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all # undocumented classes that are normally visible in the class hierarchy. # If set to NO (the default) these classes will be included in the various # overviews. This option has no effect if EXTRACT_ALL is enabled. HIDE_UNDOC_CLASSES = YES # If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all # friend (class|struct|union) declarations. # If set to NO (the default) these declarations will be included in the # documentation. HIDE_FRIEND_COMPOUNDS = NO # If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any # documentation blocks found inside the body of a function. # If set to NO (the default) these blocks will be appended to the # function's detailed documentation block. HIDE_IN_BODY_DOCS = NO # The INTERNAL_DOCS tag determines if documentation # that is typed after a \internal command is included. If the tag is set # to NO (the default) then the documentation will be excluded. # Set it to YES to include the internal documentation. INTERNAL_DOCS = NO # If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate # file names in lower-case letters. If set to YES upper-case letters are also # allowed. This is useful if you have classes or files whose names only differ # in case and if your file system supports case sensitive file names. Windows # and Mac users are advised to set this option to NO. CASE_SENSE_NAMES = YES # If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen # will show members with their full class and namespace scopes in the # documentation. If set to YES the scope will be hidden. HIDE_SCOPE_NAMES = NO # If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen # will put a list of the files that are included by a file in the documentation # of that file. SHOW_INCLUDE_FILES = YES # If the INLINE_INFO tag is set to YES (the default) then a tag [inline] # is inserted in the documentation for inline members. INLINE_INFO = YES # If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen # will sort the (detailed) documentation of file and class members # alphabetically by member name. If set to NO the members will appear in # declaration order. SORT_MEMBER_DOCS = YES # If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the # brief documentation of file, namespace and class members alphabetically # by member name. If set to NO (the default) the members will appear in # declaration order. SORT_BRIEF_DOCS = NO # If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be # sorted by fully-qualified names, including namespaces. If set to # NO (the default), the class list will be sorted only by class name, # not including the namespace part. # Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. # Note: This option applies only to the class list, not to the # alphabetical list. SORT_BY_SCOPE_NAME = NO # The GENERATE_TODOLIST tag can be used to enable (YES) or # disable (NO) the todo list. This list is created by putting \todo # commands in the documentation. GENERATE_TODOLIST = YES # The GENERATE_TESTLIST tag can be used to enable (YES) or # disable (NO) the test list. This list is created by putting \test # commands in the documentation. GENERATE_TESTLIST = YES # The GENERATE_BUGLIST tag can be used to enable (YES) or # disable (NO) the bug list. This list is created by putting \bug # commands in the documentation. GENERATE_BUGLIST = YES # The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or # disable (NO) the deprecated list. This list is created by putting # \deprecated commands in the documentation. GENERATE_DEPRECATEDLIST= YES # The ENABLED_SECTIONS tag can be used to enable conditional # documentation sections, marked by \if sectionname ... \endif. ENABLED_SECTIONS = # The MAX_INITIALIZER_LINES tag determines the maximum number of lines # the initial value of a variable or define consists of for it to appear in # the documentation. If the initializer consists of more lines than specified # here it will be hidden. Use a value of 0 to hide initializers completely. # The appearance of the initializer of individual variables and defines in the # documentation can be controlled using \showinitializer or \hideinitializer # command in the documentation regardless of this setting. MAX_INITIALIZER_LINES = 30 # Set the SHOW_USED_FILES tag to NO to disable the list of files generated # at the bottom of the documentation of classes and structs. If set to YES the # list will mention the files that were used to generate the documentation. SHOW_USED_FILES = YES # If the sources in your project are distributed over multiple directories # then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy # in the documentation. The default is YES. SHOW_DIRECTORIES = YES # The FILE_VERSION_FILTER tag can be used to specify a program or script that # doxygen should invoke to get the current version for each file (typically from the # version control system). Doxygen will invoke the program by executing (via # popen()) the command , where is the value of # the FILE_VERSION_FILTER tag, and is the name of an input file # provided by doxygen. Whatever the progam writes to standard output # is used as the file version. See the manual for examples. FILE_VERSION_FILTER = #--------------------------------------------------------------------------- # configuration options related to warning and progress messages #--------------------------------------------------------------------------- # The QUIET tag can be used to turn on/off the messages that are generated # by doxygen. Possible values are YES and NO. If left blank NO is used. QUIET = NO # The WARNINGS tag can be used to turn on/off the warning messages that are # generated by doxygen. Possible values are YES and NO. If left blank # NO is used. WARNINGS = YES # If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings # for undocumented members. If EXTRACT_ALL is set to YES then this flag will # automatically be disabled. WARN_IF_UNDOCUMENTED = YES # If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for # potential errors in the documentation, such as not documenting some # parameters in a documented function, or documenting parameters that # don't exist or using markup commands wrongly. WARN_IF_DOC_ERROR = YES # This WARN_NO_PARAMDOC option can be abled to get warnings for # functions that are documented, but have no documentation for their parameters # or return value. If set to NO (the default) doxygen will only warn about # wrong or incomplete parameter documentation, but not about the absence of # documentation. WARN_NO_PARAMDOC = NO # The WARN_FORMAT tag determines the format of the warning messages that # doxygen can produce. The string should contain the $file, $line, and $text # tags, which will be replaced by the file and line number from which the # warning originated and the warning text. Optionally the format may contain # $version, which will be replaced by the version of the file (if it could # be obtained via FILE_VERSION_FILTER) WARN_FORMAT = "$file:$line: $text" # The WARN_LOGFILE tag can be used to specify a file to which warning # and error messages should be written. If left blank the output is written # to stderr. WARN_LOGFILE = #--------------------------------------------------------------------------- # configuration options related to the input files #--------------------------------------------------------------------------- # The INPUT tag can be used to specify the files and/or directories that contain # documented source files. You may enter file names like "myfile.cpp" or # directories like "/usr/src/myproject". Separate the files or directories # with spaces. INPUT = # If the value of the INPUT tag contains directories, you can use the # FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp # and *.h) to filter out the source-files in the directories. If left # blank the following patterns are tested: # *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp # *.i++ *.inl *.h *.hh *.hxx # *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm FILE_PATTERNS = # The RECURSIVE tag can be used to turn specify whether or not subdirectories # should be searched for input files as well. Possible values are YES and NO. # If left blank NO is used. RECURSIVE = NO # The EXCLUDE tag can be used to specify files and/or directories that should # excluded from the INPUT source files. This way you can easily exclude a # subdirectory from a directory tree whose root is specified with the INPUT tag. EXCLUDE = # The EXCLUDE_SYMLINKS tag can be used select whether or not files or # directories that are symbolic links (a Unix filesystem feature) are excluded # from the input. EXCLUDE_SYMLINKS = NO # If the value of the INPUT tag contains directories, you can use the # EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude # certain files from those directories. Note that the wildcards are matched # against the file with absolute path, so to exclude all test directories # for example use the pattern */test/* EXCLUDE_PATTERNS = moc_* ui_* # The EXAMPLE_PATH tag can be used to specify one or more files or # directories that contain example code fragments that are included (see # the \include command). EXAMPLE_PATH = # If the value of the EXAMPLE_PATH tag contains directories, you can use the # EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp # and *.h) to filter out the source-files in the directories. If left # blank all files are included. EXAMPLE_PATTERNS = # If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be # searched for input files to be used with the \include or \dontinclude # commands irrespective of the value of the RECURSIVE tag. # Possible values are YES and NO. If left blank NO is used. EXAMPLE_RECURSIVE = NO # The IMAGE_PATH tag can be used to specify one or more files or # directories that contain image that are included in the documentation (see # the \image command). IMAGE_PATH = # The INPUT_FILTER tag can be used to specify a program that doxygen should # invoke to filter for each input file. Doxygen will invoke the filter program # by executing (via popen()) the command , where # is the value of the INPUT_FILTER tag, and is the name of an # input file. Doxygen will then use the output that the filter program writes # to standard output. If FILTER_PATTERNS is specified, this tag will be # ignored. INPUT_FILTER = # The FILTER_PATTERNS tag can be used to specify filters on a per file pattern # basis. Doxygen will compare the file name with each pattern and apply the # filter if there is a match. The filters are a list of the form: # pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further # info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER # is applied to all files. FILTER_PATTERNS = # If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using # INPUT_FILTER) will be used to filter the input files when producing source # files to browse (i.e. when SOURCE_BROWSER is set to YES). FILTER_SOURCE_FILES = NO #--------------------------------------------------------------------------- # configuration options related to source browsing #--------------------------------------------------------------------------- # If the SOURCE_BROWSER tag is set to YES then a list of source files will # be generated. Documented entities will be cross-referenced with these sources. # Note: To get rid of all source code in the generated output, make sure also # VERBATIM_HEADERS is set to NO. SOURCE_BROWSER = NO # Setting the INLINE_SOURCES tag to YES will include the body # of functions and classes directly in the documentation. INLINE_SOURCES = NO # Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct # doxygen to hide any special comment blocks from generated source code # fragments. Normal C and C++ comments will always remain visible. STRIP_CODE_COMMENTS = YES # If the REFERENCED_BY_RELATION tag is set to YES (the default) # then for each documented function all documented # functions referencing it will be listed. REFERENCED_BY_RELATION = YES # If the REFERENCES_RELATION tag is set to YES (the default) # then for each documented function all documented entities # called/used by that function will be listed. REFERENCES_RELATION = YES # If the USE_HTAGS tag is set to YES then the references to source code # will point to the HTML generated by the htags(1) tool instead of doxygen # built-in source browser. The htags tool is part of GNU's global source # tagging system (see http://www.gnu.org/software/global/global.html). You # will need version 4.8.6 or higher. USE_HTAGS = NO # If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen # will generate a verbatim copy of the header file for each class for # which an include is specified. Set to NO to disable this. VERBATIM_HEADERS = YES #--------------------------------------------------------------------------- # configuration options related to the alphabetical class index #--------------------------------------------------------------------------- # If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index # of all compounds will be generated. Enable this if the project # contains a lot of classes, structs, unions or interfaces. ALPHABETICAL_INDEX = NO # If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then # the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns # in which this list will be split (can be a number in the range [1..20]) COLS_IN_ALPHA_INDEX = 3 # In case all classes in a project start with a common prefix, all # classes will be put under the same header in the alphabetical index. # The IGNORE_PREFIX tag can be used to specify one or more prefixes that # should be ignored while generating the index headers. IGNORE_PREFIX = #--------------------------------------------------------------------------- # configuration options related to the HTML output #--------------------------------------------------------------------------- # If the GENERATE_HTML tag is set to YES (the default) Doxygen will # generate HTML output. GENERATE_HTML = YES # The HTML_OUTPUT tag is used to specify where the HTML docs will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `html' will be used as the default path. HTML_OUTPUT = html # The HTML_FILE_EXTENSION tag can be used to specify the file extension for # each generated HTML page (for example: .htm,.php,.asp). If it is left blank # doxygen will generate files with .html extension. HTML_FILE_EXTENSION = .html # The HTML_HEADER tag can be used to specify a personal HTML header for # each generated HTML page. If it is left blank doxygen will generate a # standard header. HTML_HEADER = # The HTML_FOOTER tag can be used to specify a personal HTML footer for # each generated HTML page. If it is left blank doxygen will generate a # standard footer. HTML_FOOTER = # The HTML_STYLESHEET tag can be used to specify a user-defined cascading # style sheet that is used by each HTML page. It can be used to # fine-tune the look of the HTML output. If the tag is left blank doxygen # will generate a default style sheet. Note that doxygen will try to copy # the style sheet file to the HTML output directory, so don't put your own # stylesheet in the HTML output directory as well, or it will be erased! HTML_STYLESHEET = # If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, # files or namespaces will be aligned in HTML using tables. If set to # NO a bullet list will be used. HTML_ALIGN_MEMBERS = YES # If the GENERATE_HTMLHELP tag is set to YES, additional index files # will be generated that can be used as input for tools like the # Microsoft HTML help workshop to generate a compressed HTML help file (.chm) # of the generated HTML documentation. GENERATE_HTMLHELP = NO # If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can # be used to specify the file name of the resulting .chm file. You # can add a path in front of the file if the result should not be # written to the html output directory. CHM_FILE = # If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can # be used to specify the location (absolute path including file name) of # the HTML help compiler (hhc.exe). If non-empty doxygen will try to run # the HTML help compiler on the generated index.hhp. HHC_LOCATION = # If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag # controls if a separate .chi index file is generated (YES) or that # it should be included in the master .chm file (NO). GENERATE_CHI = NO # If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag # controls whether a binary table of contents is generated (YES) or a # normal table of contents (NO) in the .chm file. BINARY_TOC = NO # The TOC_EXPAND flag can be set to YES to add extra items for group members # to the contents of the HTML help documentation and to the tree view. TOC_EXPAND = NO # The DISABLE_INDEX tag can be used to turn on/off the condensed index at # top of each HTML page. The value NO (the default) enables the index and # the value YES disables it. DISABLE_INDEX = NO # This tag can be used to set the number of enum values (range [1..20]) # that doxygen will group on one line in the generated HTML documentation. ENUM_VALUES_PER_LINE = 4 # If the GENERATE_TREEVIEW tag is set to YES, a side panel will be # generated containing a tree-like index structure (just like the one that # is generated for HTML Help). For this to work a browser that supports # JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+, # Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are # probably better off using the HTML help feature. GENERATE_TREEVIEW = NO # If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be # used to set the initial width (in pixels) of the frame in which the tree # is shown. TREEVIEW_WIDTH = 250 #--------------------------------------------------------------------------- # configuration options related to the LaTeX output #--------------------------------------------------------------------------- # If the GENERATE_LATEX tag is set to YES (the default) Doxygen will # generate Latex output. GENERATE_LATEX = NO # The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `latex' will be used as the default path. LATEX_OUTPUT = latex # The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be # invoked. If left blank `latex' will be used as the default command name. LATEX_CMD_NAME = latex # The MAKEINDEX_CMD_NAME tag can be used to specify the command name to # generate index for LaTeX. If left blank `makeindex' will be used as the # default command name. MAKEINDEX_CMD_NAME = makeindex # If the COMPACT_LATEX tag is set to YES Doxygen generates more compact # LaTeX documents. This may be useful for small projects and may help to # save some trees in general. COMPACT_LATEX = NO # The PAPER_TYPE tag can be used to set the paper type that is used # by the printer. Possible values are: a4, a4wide, letter, legal and # executive. If left blank a4wide will be used. PAPER_TYPE = a4wide # The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX # packages that should be included in the LaTeX output. EXTRA_PACKAGES = # The LATEX_HEADER tag can be used to specify a personal LaTeX header for # the generated latex document. The header should contain everything until # the first chapter. If it is left blank doxygen will generate a # standard header. Notice: only use this tag if you know what you are doing! LATEX_HEADER = # If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated # is prepared for conversion to pdf (using ps2pdf). The pdf file will # contain links (just like the HTML output) instead of page references # This makes the output suitable for online browsing using a pdf viewer. PDF_HYPERLINKS = NO # If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of # plain latex in the generated Makefile. Set this option to YES to get a # higher quality PDF documentation. USE_PDFLATEX = NO # If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. # command to the generated LaTeX files. This will instruct LaTeX to keep # running if errors occur, instead of asking the user for help. # This option is also used when generating formulas in HTML. LATEX_BATCHMODE = NO # If LATEX_HIDE_INDICES is set to YES then doxygen will not # include the index chapters (such as File Index, Compound Index, etc.) # in the output. LATEX_HIDE_INDICES = NO #--------------------------------------------------------------------------- # configuration options related to the RTF output #--------------------------------------------------------------------------- # If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output # The RTF output is optimized for Word 97 and may not look very pretty with # other RTF readers or editors. GENERATE_RTF = NO # The RTF_OUTPUT tag is used to specify where the RTF docs will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `rtf' will be used as the default path. RTF_OUTPUT = rtf # If the COMPACT_RTF tag is set to YES Doxygen generates more compact # RTF documents. This may be useful for small projects and may help to # save some trees in general. COMPACT_RTF = NO # If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated # will contain hyperlink fields. The RTF file will # contain links (just like the HTML output) instead of page references. # This makes the output suitable for online browsing using WORD or other # programs which support those fields. # Note: wordpad (write) and others do not support links. RTF_HYPERLINKS = NO # Load stylesheet definitions from file. Syntax is similar to doxygen's # config file, i.e. a series of assignments. You only have to provide # replacements, missing definitions are set to their default value. RTF_STYLESHEET_FILE = # Set optional variables used in the generation of an rtf document. # Syntax is similar to doxygen's config file. RTF_EXTENSIONS_FILE = #--------------------------------------------------------------------------- # configuration options related to the man page output #--------------------------------------------------------------------------- # If the GENERATE_MAN tag is set to YES (the default) Doxygen will # generate man pages GENERATE_MAN = NO # The MAN_OUTPUT tag is used to specify where the man pages will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `man' will be used as the default path. MAN_OUTPUT = man # The MAN_EXTENSION tag determines the extension that is added to # the generated man pages (default is the subroutine's section .3) MAN_EXTENSION = .3 # If the MAN_LINKS tag is set to YES and Doxygen generates man output, # then it will generate one additional man file for each entity # documented in the real man page(s). These additional files # only source the real man page, but without them the man command # would be unable to find the correct page. The default is NO. MAN_LINKS = NO #--------------------------------------------------------------------------- # configuration options related to the XML output #--------------------------------------------------------------------------- # If the GENERATE_XML tag is set to YES Doxygen will # generate an XML file that captures the structure of # the code including all documentation. GENERATE_XML = NO # The XML_OUTPUT tag is used to specify where the XML pages will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `xml' will be used as the default path. XML_OUTPUT = xml # The XML_SCHEMA tag can be used to specify an XML schema, # which can be used by a validating XML parser to check the # syntax of the XML files. XML_SCHEMA = # The XML_DTD tag can be used to specify an XML DTD, # which can be used by a validating XML parser to check the # syntax of the XML files. XML_DTD = # If the XML_PROGRAMLISTING tag is set to YES Doxygen will # dump the program listings (including syntax highlighting # and cross-referencing information) to the XML output. Note that # enabling this will significantly increase the size of the XML output. XML_PROGRAMLISTING = YES #--------------------------------------------------------------------------- # configuration options for the AutoGen Definitions output #--------------------------------------------------------------------------- # If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will # generate an AutoGen Definitions (see autogen.sf.net) file # that captures the structure of the code including all # documentation. Note that this feature is still experimental # and incomplete at the moment. GENERATE_AUTOGEN_DEF = NO #--------------------------------------------------------------------------- # configuration options related to the Perl module output #--------------------------------------------------------------------------- # If the GENERATE_PERLMOD tag is set to YES Doxygen will # generate a Perl module file that captures the structure of # the code including all documentation. Note that this # feature is still experimental and incomplete at the # moment. GENERATE_PERLMOD = NO # If the PERLMOD_LATEX tag is set to YES Doxygen will generate # the necessary Makefile rules, Perl scripts and LaTeX code to be able # to generate PDF and DVI output from the Perl module output. PERLMOD_LATEX = NO # If the PERLMOD_PRETTY tag is set to YES the Perl module output will be # nicely formatted so it can be parsed by a human reader. This is useful # if you want to understand what is going on. On the other hand, if this # tag is set to NO the size of the Perl module output will be much smaller # and Perl will parse it just the same. PERLMOD_PRETTY = YES # The names of the make variables in the generated doxyrules.make file # are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. # This is useful so different doxyrules.make files included by the same # Makefile don't overwrite each other's variables. PERLMOD_MAKEVAR_PREFIX = #--------------------------------------------------------------------------- # Configuration options related to the preprocessor #--------------------------------------------------------------------------- # If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will # evaluate all C-preprocessor directives found in the sources and include # files. ENABLE_PREPROCESSING = YES # If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro # names in the source code. If set to NO (the default) only conditional # compilation will be performed. Macro expansion can be done in a controlled # way by setting EXPAND_ONLY_PREDEF to YES. MACRO_EXPANSION = NO # If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES # then the macro expansion is limited to the macros specified with the # PREDEFINED and EXPAND_AS_PREDEFINED tags. EXPAND_ONLY_PREDEF = NO # If the SEARCH_INCLUDES tag is set to YES (the default) the includes files # in the INCLUDE_PATH (see below) will be search if a #include is found. SEARCH_INCLUDES = YES # The INCLUDE_PATH tag can be used to specify one or more directories that # contain include files that are not input files but should be processed by # the preprocessor. INCLUDE_PATH = # You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard # patterns (like *.h and *.hpp) to filter out the header-files in the # directories. If left blank, the patterns specified with FILE_PATTERNS will # be used. INCLUDE_FILE_PATTERNS = # The PREDEFINED tag can be used to specify one or more macro names that # are defined before the preprocessor is started (similar to the -D option of # gcc). The argument of the tag is a list of macros of the form: name # or name=definition (no spaces). If the definition and the = are # omitted =1 is assumed. To prevent a macro definition from being # undefined via #undef or recursively expanded use the := operator # instead of the = operator. PREDEFINED = Q_PROPERTY(x)= \ Q_DISABLE_COPY= \ _WS_X11_ \ # If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then # this tag can be used to specify a list of macro names that should be expanded. # The macro definition that is found in the sources will be used. # Use the PREDEFINED tag if you want to use a different macro definition. EXPAND_AS_DEFINED = Q_OBJECT Q_VARIANT # If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then # doxygen's preprocessor will remove all function-like macros that are alone # on a line, have an all uppercase name, and do not end with a semicolon. Such # function macros are typically used for boiler-plate code, and will confuse # the parser if not removed. SKIP_FUNCTION_MACROS = YES #--------------------------------------------------------------------------- # Configuration::additions related to external references #--------------------------------------------------------------------------- # The TAGFILES option can be used to specify one or more tagfiles. # Optionally an initial location of the external documentation # can be added for each tagfile. The format of a tag file without # this location is as follows: # TAGFILES = file1 file2 ... # Adding location for the tag files is done as follows: # TAGFILES = file1=loc1 "file2 = loc2" ... # where "loc1" and "loc2" can be relative or absolute paths or # URLs. If a location is present for each tag, the installdox tool # does not have to be run to correct the links. # Note that each tag file must have a unique name # (where the name does NOT include the path) # If a tag file is not located in the directory in which doxygen # is run, you must also specify the path to the tagfile here. TAGFILES = # When a file name is specified after GENERATE_TAGFILE, doxygen will create # a tag file that is based on the input files it reads. GENERATE_TAGFILE = # If the ALLEXTERNALS tag is set to YES all external classes will be listed # in the class index. If set to NO only the inherited external classes # will be listed. ALLEXTERNALS = NO # If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed # in the modules index. If set to NO, only the current project's groups will # be listed. EXTERNAL_GROUPS = YES # The PERL_PATH should be the absolute path and name of the perl script # interpreter (i.e. the result of `which perl'). PERL_PATH = /usr/bin/perl #--------------------------------------------------------------------------- # Configuration options related to the dot tool #--------------------------------------------------------------------------- # If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will # generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base # or super classes. Setting the tag to NO turns the diagrams off. Note that # this option is superseded by the HAVE_DOT option below. This is only a # fallback. It is recommended to install and use dot, since it yields more # powerful graphs. CLASS_DIAGRAMS = YES # If set to YES, the inheritance and collaboration graphs will hide # inheritance and usage relations if the target is undocumented # or is not a class. HIDE_UNDOC_RELATIONS = YES # If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is # available from the path. This tool is part of Graphviz, a graph visualization # toolkit from AT&T and Lucent Bell Labs. The other options in this section # have no effect if this option is set to NO (the default) HAVE_DOT = NO # If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen # will generate a graph for each documented class showing the direct and # indirect inheritance relations. Setting this tag to YES will force the # the CLASS_DIAGRAMS tag to NO. CLASS_GRAPH = YES # If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen # will generate a graph for each documented class showing the direct and # indirect implementation dependencies (inheritance, containment, and # class references variables) of the class with other documented classes. COLLABORATION_GRAPH = YES # If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen # will generate a graph for groups, showing the direct groups dependencies GROUP_GRAPHS = YES # If the UML_LOOK tag is set to YES doxygen will generate inheritance and # collaboration diagrams in a style similar to the OMG's Unified Modeling # Language. UML_LOOK = NO # If set to YES, the inheritance and collaboration graphs will show the # relations between templates and their instances. TEMPLATE_RELATIONS = NO # If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT # tags are set to YES then doxygen will generate a graph for each documented # file showing the direct and indirect include dependencies of the file with # other documented files. INCLUDE_GRAPH = YES # If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and # HAVE_DOT tags are set to YES then doxygen will generate a graph for each # documented header file showing the documented files that directly or # indirectly include this file. INCLUDED_BY_GRAPH = YES # If the CALL_GRAPH and HAVE_DOT tags are set to YES then doxygen will # generate a call dependency graph for every global function or class method. # Note that enabling this option will significantly increase the time of a run. # So in most cases it will be better to enable call graphs for selected # functions only using the \callgraph command. CALL_GRAPH = NO # If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen # will graphical hierarchy of all classes instead of a textual one. GRAPHICAL_HIERARCHY = YES # If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES # then doxygen will show the dependencies a directory has on other directories # in a graphical way. The dependency relations are determined by the #include # relations between the files in the directories. DIRECTORY_GRAPH = YES # The DOT_IMAGE_FORMAT tag can be used to set the image format of the images # generated by dot. Possible values are png, jpg, or gif # If left blank png will be used. DOT_IMAGE_FORMAT = png # The tag DOT_PATH can be used to specify the path where the dot tool can be # found. If left blank, it is assumed the dot tool can be found in the path. DOT_PATH = # The DOTFILE_DIRS tag can be used to specify one or more directories that # contain dot files that are included in the documentation (see the # \dotfile command). DOTFILE_DIRS = # The MAX_DOT_GRAPH_WIDTH tag can be used to set the maximum allowed width # (in pixels) of the graphs generated by dot. If a graph becomes larger than # this value, doxygen will try to truncate the graph, so that it fits within # the specified constraint. Beware that most browsers cannot cope with very # large images. MAX_DOT_GRAPH_WIDTH = 1024 # The MAX_DOT_GRAPH_HEIGHT tag can be used to set the maximum allows height # (in pixels) of the graphs generated by dot. If a graph becomes larger than # this value, doxygen will try to truncate the graph, so that it fits within # the specified constraint. Beware that most browsers cannot cope with very # large images. MAX_DOT_GRAPH_HEIGHT = 1024 # The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the # graphs generated by dot. A depth value of 3 means that only nodes reachable # from the root by following a path via at most 3 edges will be shown. Nodes # that lay further from the root node will be omitted. Note that setting this # option to 1 or 2 may greatly reduce the computation time needed for large # code bases. Also note that a graph may be further truncated if the graph's # image dimensions are not sufficient to fit the graph (see MAX_DOT_GRAPH_WIDTH # and MAX_DOT_GRAPH_HEIGHT). If 0 is used for the depth value (the default), # the graph is not depth-constrained. MAX_DOT_GRAPH_DEPTH = 0 # Set the DOT_TRANSPARENT tag to YES to generate images with a transparent # background. This is disabled by default, which results in a white background. # Warning: Depending on the platform used, enabling this option may lead to # badly anti-aliased labels on the edges of a graph (i.e. they become hard to # read). DOT_TRANSPARENT = NO # Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output # files in one run (i.e. multiple -o and -T options on the command line). This # makes dot run faster, but since only newer versions of dot (>1.8.10) # support this, this feature is disabled by default. DOT_MULTI_TARGETS = NO # If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will # generate a legend page explaining the meaning of the various boxes and # arrows in the dot generated graphs. GENERATE_LEGEND = YES # If the DOT_CLEANUP tag is set to YES (the default) Doxygen will # remove the intermediate dot files that are used to generate # the various graphs. DOT_CLEANUP = YES #--------------------------------------------------------------------------- # Configuration::additions related to the search engine #--------------------------------------------------------------------------- # The SEARCHENGINE tag specifies whether or not a search engine should be # used. If set to NO the values of all tags below this one will be ignored. SEARCHENGINE = NO djview4/src/djview.1000066400000000000000000000463201174072760700146130ustar00rootroot00000000000000.\" Copyright (c) 2007- Leon Bottou .\" .\" This is free documentation; you can redistribute it and/or .\" modify it under the terms of the GNU General Public License as .\" published by the Free Software Foundation; either version 2 of .\" the License, or (at your option) any later version. .\" .\" The GNU General Public License's references to "object code" .\" and "executables" are to be interpreted as the output of any .\" document formatting or typesetting system, including .\" intermediate and printed output. .\" .\" This manual is distributed in the hope that it will be useful, .\" but WITHOUT ANY WARRANTY; without even the implied warranty of .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the .\" GNU General Public License for more details. .\" .\" You should have received a copy of the GNU General Public .\" License along with this manual. Otherwise check the web site .\" of the Free Software Foundation at http://www.fsf.org. .TH DJVIEW4 1 "10/11/2001" "DjVuLibre" "DjVuLibre" .de SS .SH \\0\\0\\0\\$* .. .SH NAME djview4 \- Standalone DjVu viewer .SH SYNOPSIS .BI "djview4 [" "options" "] [" "argument" "]" .SH DESCRIPTION Standalone viewer for DjVu files. Features include navigating documents, zooming and panning page images, producing and displaying thumbnails, displaying document outlines, searching documents for particular words in the hidden text layer, copying hidden text to the clipboard, saving pages and documents as bundled or indirect multi-page files, and printing page and documents. The viewer can simultaneously display several pages using a side-by-side or a continuous layout. .SH COMMAND LINE ARGUMENT AND OPTIONS This program can run as a standalone program or as a slave process for the DjVu browser plugin .BR nsdejavu . When running as a standalone program, the command line argument .I argument can be: .IP "*" 3 The filename of a valid DjVu document. .IP "*" 3 A local DjVu document .SM URL of the form: .IP "" 5 .BI "file:///" path "/" name.djvu "[?djvuopts&" keyword = value "&...]" .IP "" 3 The square brackets delimit the optional components of the .SM URL. Various options can be specified using a syntax similar to that of .SM CGI arguments. Specifying options in this manner is very useful for a browser plugin because there are no command line arguments. In the case of a standalone viewer, all options can be specified as command line arguments. .IP "*" 3 An remote DjVu document .SM URL of the form: .IP "" 5 .BI http:// host / path "/" name.djvu "[?djvuopts&" keyword = value "&...]" .IP "" 5 .BI https:// host / path "/" name.djvu "[?djvuopts&" keyword = value "&...]" .IP "" 3 Browsing remote DjVu documents with the standalone viewer is less efficient than using the browser plugin. The standalone viewer does not benefit from the browser caching strategies and proxy settings. Proxy settings for the standalone viewer can be set independently with the preferences dialog. .PP An extensive list of options are recognized. Most options can be specified as command line argument starting with the customary dash character .BR "" "(" "-" ")" or using the syntax of .SM CGI arguments in the document .SM URL. Some options however are only meaningful as command line arguments. Other options are only recognized when running the .SM X11 version of the .BR djview4 program. .SH COMMAND LINE OPTIONS The following options are only meaningful when specified on the command line. .TP .B "-help" Display a brief help message. .TP .B "-verbose" Prints informational messages on the console. This option is very useful because it displays messages about the unrecognized constructs in the DjVu annotation and hyperlink layers. .TP .BI "-fullscreen, -fs " Start .B djview4 in full screen mode. Use the key .B F11 to exit the full screen mode. .TP .BI "-style=" "stylename" Specify the graphical user interface style. The recognized values for .I stylename depend on the installed version of the Qt toolkit. Common style names include .BR cde , .BR motif , .BR plastique , .BR platinum , and .BR windows . .SH X11 OPTIONS The following command line options are recognized by the .SM X11 version of the .B djview4 program. Unlike most .B djview4 options, X11 options that demand an argument do not use the equal character to introduce their argument. .TP .BI "-display " "displayname" Specify that the .B djview4 windows should appear on the X11 display .IR displayname . .TP .BI "-geometry " W x H + X + Y Specify the initial size and position of the first window using the traditional X11 geometry specification syntax. The numerical arguments .IR W " and " H represent the initial window width and height. The numerical arguments .IR X " and " Y indicate the window position relative to the top left corner of the screen. .TP .BI "-name " "name" Set the application name. .TP .BI "-title " "title" Set the title of the first window. .TP .BI "-fn " "fontname" ", -font " "fontname" Specify the name of the default font used for buttons and menus. The font should be specified using a X logical font description string. .TP .BI "-bg " "color" ", -background " "color" Specify the default background color for graphical user interface elements. The color should be given as a standard X11 color name. .TP .BI "-fg " "color" ", -foreground " "color" Specify the default foreground color for graphical user interface elements. The color should be given as a standard X11 color name. .TP .BI "-btn " "color" Specify the default button color. The color should be given as a standard X11 color name. .TP .BI "-ncols " "count" Limit the number of colors allocated on a 8 bit display. The default color cube contains 216 distinct colors. .TP .B "-cmap" Force the allocation of a private color map on a 8-bit display. This might increase the color quality but cause flashing when the viewer window gets activated. .SH GENERAL OPTIONS The following options can be specified as command line options or can be passed by augmenting the document .SM URL using a syntax similar to that of .SM CGI arguments .IP "" 3 .BI "http://.../file.djvu?djvuopts&" "key=value" "&" "key=value" "&" "..." .PP In order to separate real .SM CGI arguments from these options, the viewer only recognizes keywords that appear after the word .BR djvuopts . The keywords .I key are derived from the option names by removing the initial dashes. .TP .BI "-page=" "pagename" Display a specific document page. The viewer first searches a page whose identifier matches the argument .IR pagename . Otherwise, if .I pagename is a number preceded by character .BR "+" " or " "-" "," the viewer performs a displacement relative to the current page. Otherwise, starting from the current page and wrapping around, it searches for a page whose title matches the argument .IR pagename . Otherwise, if .I pagename is numerical, it is interpreted as an ordinal page number. Otherwise, and finally, the viewer searches a page whose name matches .IR pagename . .TP .BI "-pageno=" "pagenumber" The page searching algorithm for option .B "page" can cause ambiguities when page titles can be interpreted as numbers. The argument of option .B "pageno" is always interpreted as an ordinal page number. This option is less portable than .B "page" because it is not recognized by earlier versions of the djvu plugin. When using this option is necessary, it is advisable to use both the .B "page" and .B "pageno" options. .TP .BI "-zoom=" zoomfactor Specify the initial zoom factor. Unless the toolbar, pop-up menu and keyboard are disabled, the user will be able to change the zoom factor. Legal values for .I zoomfactor are shown in the below: .br .TS center,box; lfI l lfB l lfB l lfB l lfB l . number Magnification factor in range 10% to 999%. one2one Select the "one-to-one" mode. width Select the "fit width" mode. page Select the "fit page" mode. stretch Stretch the image to the plugin window size. .TE .PP .TP .BI "-showposition=" px "," py Specify a point in the current page that should be as close as possible to the center of the window. The horizontal and vertical positions .IB px "," py in the current page are given as fractions in range 0 to 1. For instance, .B 0,0 designates the upper left corner of the page, .B 0.5,0.5 is the center, and .B 1,1 is the lower right corner. .TP .BI "-mode=" modespec Specify the initial display mode. Unless the toolbar and pop-up menu are disabled, the user will be able to change it. Legal values for .I modespec are shown in the below: .br .TS center,box; lfB l lfB l lfB l lfB l lfB l . color Display the color image. bw Display the foreground mask only. fore Display the foreground only. back Display the background only. text Overlay the hidden text over the color image. .TE .PP .TP .BI "-hor_align=" keyword ", -halign=" keyword Specify the horizontal position of the page in the viewer window. (This does not specify what part of the page will be shown, but rather how margins will be laid out around the page in the plugin window.) Argument .I keyword must be .BR left , .BR center , or .BR right . .TP .BI "-ver_align=" keyword ", -valign=" keyword Specify the vertical position of the page in the viewer window. (This does not specify what part of the page will be shown, but rather how margins will be laid out around the page in the plugin window.) Argument .I keyword must be .BR top , .BR center , or .BR bottom . .TP .BI "-cache=(yes|no)" Enable or disable the caching of fully decoded pages of the document. Caching is on by default. Caching of documents whose .SM URL does not contain an extension .BR .djvu " or " .djv is off by default. .TP .BI "-continuous=(yes|no)" Enable or disable the continuous layout of multipage documents. .TP .BI "-sidebyside=(yes|no), -side_by_side=(yes|no)" Enable or disable the side-by-side layout of multipage documents. .TP .BI "-coverpage=(yes|no)" Specify whether the cover page must be displayed alone when multipage documents are shown in side-by-side layout. .TP .BI "-righttoleft=(yes|no)" Specify whether pages should be arranged right-to-left when multipage documents are shown in side-by-side layout. .TP .BI "-layout=" keyword "{," keyword "}" Specify the layout settings using a single list of comma-separated keywords. The following keywords are recognized: .br .TS center,box; lfB l lfB l lfB l lfB l lfB l lfB l . single Disable the side-by-side and continuous modes. double Enable the side-by-side mode. continuous Enable the continuous mode. cover,nocover First page treatment in side-by-side mode. ltor,rtol Layout direction for side-by-side mode. gap,nogap Specify whether there is a gap between pages. .TE .TP .BI "-scrollbars=(yes|no)" Enable or disable the presence of scroll bars when the full image size exceeds the plugin window size. The default is yes. .TP .BI "-frame=(yes|no)" Enable or disable the display of a thin frame and shadow around the DjVu images. Frames are enabled by default. .TP .BI "-background=" color Specify the color of the background border displayed around the document. The color .I color must be given in hexadecimal .SM RRGGBB or .SM #RRGGBB format. .TP .BI "-toolbar=" keyword "{(,|+|-)" keyword "}" Controls the appearance and the contents of the toolbar. The argument of option .B toolbar is composed of a number of keywords separated by characters comma, plus or minus. The appearance of the toolbar is controlled by keywords placed before the first occurrence of a character plus or minus. The following keywords are recognized in this context: .br .TS center,box; lfB l lfB l lfB l lfB l lfB l . no Disable toolbar. always Displays the toolbar. auto Enable toolbar "autohide" mode (not implemented). top Place toolbar along the top edge. bottom Place toolbar along the bottom edge. .TE .IP "" The contents of the toolbar is controlled by keywords placed after the first occurrence of a character plus or minus. Each keyword adds (after a plus) or removes (after a minus) a particular toolbar button or group of buttons. The initial content of the toolbar is determined by the first occurrence of a character plus or minus. When this is a plus, the toolbar is initially empty. When this is a minus, the toolbar initially contains the default selection of buttons. The following keywords are recognized: .br .TS center,box; lfB l lfB l lfB l lfB l lfB l lfB l lfB l lfB l lfB l lfB l lfB l lfB l lfB l lfB l . modecombo for the display mode selection tool. zoomcombo for the zoom selection tool. zoom for the zoom buttons. select for the selection button. rotate for the image rotation buttons. find for the text search button. new for the new window button. open for the open new document button. save for the save button. print for the print button. layout for the page layout buttons. pagecombo for the page selection tool. firstlast for the first-page and last-page buttons. prevnext for the previous- and next-page buttons. backforw reserved for the back and forward buttons. help for the contextual help button. .TE .PP For the sake of backward compatibility, the keywords .BR fore , .BR fore_button , .BR back , .BR back_button , .BR bw , .BR bw_button , .BR color , and .BR color_button are interpreted like keyword .BR modecombo ; the keyword .BR rescombo is a synonym of .BR zoomcombo ; the keywords .BR pan , .BR zoomsel , and .BR textsel are interpreted like keyword .BR select ; and the keyword .BR doublepage is interpreted like keyword .BR layout . All other keywords are ignored. .PP .TP .BI "-menubar=(yes|no)" Enable or disable the presence of the menu bar located on top of the window. .TP .BI "-statusbar=(yes|no)" Enable or disable the presence of the status bar located at the bottom of the window. .TP .BI "-sidebar=" keyword "{," keyword "}" Control the dockable panels. The argument is a comma separated list of keywords. A first group of keywords selects which panels are affected. Omitting these keywords selects all panels. A second group of keywords then controls the visibility and the position of the selected panels. .br .TS center,box; lfB l lfB l lfB l lfB l lfB l lfB l lfB l lfB l lfB l . thumbnails specify the thumbnail panel. outline,bookmarks specify the outline panel. search,find specify the search panel. = yes,true show the specified panels (default). no,false hide the specified panels. left dock specified panels on the left side. right dock specified panels on the right side. top dock specified panels on the top side. bottom dock specified panels on the bottom side. .TE .PP .TP .BI "-thumbnails=" keyword "{," keyword "}" Compatibility alias for .BI "-sidebar=" keyword "{," keyword "},thumbnails." .TP .BI "-outline=" keyword "{," keyword "}" Compatibility alias for .BI "-sidebar=" keyword "{," keyword "},outline." .TP .BI "-menu=(yes|no)" Enable or disable the pop-up menu. .TP .BI "-keyboard=(yes|no)" Enable or disable the DjVu plugin keyboard shortcuts. The default is yes (enabled). .TP .BI "-mouse=(yes|no)" Enable or disable mouse interaction for panning and selecting. The default is yes (enabled). .TP .BI "-links=(yes|no)" Enable or disable hyper-links in the DjVu image. Hyper-links are enabled by default. .TP .BI "-highlight=" x "," y "," w "," h "[," color "]" Display a highlighted rectangle at the specified coordinates in the current page and with the specified color. Coordinates .IR x ", " y ", " w ", and " h are measured in document image coordinates (not screen coordinates). The origin is set at the bottom left corner of the image. The color .I color must be given in hexadecimal .SM RRGGBB or .SM #RRGGBB format. Multiple highlighted zone can be specified and can be interspersed with multiple .BI "-page=" "pagename" options. .TP .BI "-find=" text Highlight occurrences of the given string .IR text . This option works when the document contains a hidden text layer. It can be used in conjunction with .BR "-sidebar=find" to display the text searching interface. String .I text can be terminated by slash .BR "" "(" "/" ")" followed by letters specifying search options. The following letters are recognized .br .TS center,box; lfB l lfB l lfB l lfB l lfB l lfB l . c Case-sensitive search. C Case-insensitive search (default). w Search hits start on word boundaries (default). W Ignore word boundaries. r Regular expression search. R String search (default). .TE .PP .TP .BI "-rotate=(0|90|180|270)" Rotate the djvu image by the specified angle expressed in degrees counter-clockwise. .TP .BI "-print=(yes|no)" Enable or disable printing the DjVu document. Printing is enabled by default. .TP .BI "-save=(yes|no)" Enable or disable saving the DjVu document. Saving is enabled by default. .TP .BI "-passive" Cause the DjVu image to be displayed in a manner similar to an ordinary web image. The default zoom factor is changed to .BR page . The toolbar, the status bar, the scrollbars, the menus, and the keyboard shortcuts are disabled. .TP .BI "-passivestretch" Cause the DjVu image to be displayed in a manner similar to an ordinary web image. The default zoom factor is changed to .BR stretch . The toolbar, the status bar, the scrollbars, the menus, and the keyboard shortcuts are disabled. .TP .BI "-nomenu, -notoolbar, -noscrollbars" These options were recognized by some versions of the DjVu viewers and are honored for the sake of backward compatibility. A warning message is printed when option .BR -verbose is active. .TP .BI "-logo, -textsel, -search" These options were recognized by some versions of the DjVu viewers but are currently not implemented by .BR djview4 . A warning message is printed when option .BR -verbose is active. .SH USAGE Most features can be accessed using the menus, the toolbar, the side bar or the pop-up menu shown when the right mouse button is depressed over a DjVu image. Detailled help can be accessed by clicking the contextual help icon from the toolbar and then clicking on various section of the djview user interface. The following table lists some useful key combinations recognized when the djvu document is active: .PP .TS center,box; lfB lfB l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l . Key Action = SHIFT+F1 Activate the contextual help. 1,2, and 3 Change zoom to to 100%, 200% and 300%. Up, Down, Left, Right Scroll the image in the given direction. Home Display top left corner of the image. End Display bottom right corner of the image. Control+Home Go to the beginning of the document. Control+End Go to the end of the document. Space, Return Scroll down or go to next page. Backspace Scroll up or go to previous page. Page Down Go to the next page. Page Up Go to the previous page. +, - Zoom in and out. [, ] Rotate image. W Select the "Fit Width" zooming mode. P Select the "Fit Page" zooming mode. CTRL+F, F3 Search the hidden text layer. .TE .PP Handy effects can be achieved by holding modifier keys. Although these keys are configurable from the preference dialog, the following table lists the default assignments .PP .TS center,box; lfB lfB l l l l l l . Key Action = CTRL+SHIFT Hold these keys to show the magnification lens. CTRL Hold this key to select an area with the mouse. SHIFT Hold this key to display all hyperlinks. .TE .PP .SH CREDITS This program was written by L\('eon Bottou and is distributed under the GNU General Public License. This program includes code derived from program .BR tiff2pdf , written by Ross Finlayson and released under a BSD license. .SH SEE ALSO .BR djvu (1), .BR ddjvu (1), .BR nsdejavu (1), .BR djview3 (1), .BR tiff2pdf (1) djview4/src/djview.cpp000066400000000000000000000277651174072760700152510ustar00rootroot00000000000000//C- -*- C++ -*- //C- ------------------------------------------------------------------- //C- DjView4 //C- Copyright (c) 2006- Leon Bottou //C- //C- This software is subject to, and may be distributed under, the //C- GNU General Public License, either version 2 of the license, //C- or (at your option) any later version. The license should have //C- accompanied the software or you may obtain a copy of the license //C- from the Free Software Foundation at http://www.fsf.org . //C- //C- This program is distributed in the hope that it will be useful, //C- but WITHOUT ANY WARRANTY; without even the implied warranty of //C- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //C- GNU General Public License for more details. //C- ------------------------------------------------------------------ #if AUTOCONF # include "config.h" #endif #include #include #include #include #include "qdjvu.h" #include "qdjview.h" #include "qdjvuwidget.h" #include "djview.h" #ifdef Q_WS_X11 # ifndef NPDJVU # include "qdjviewplugin.h" # endif #endif #include #include #include #include #include #include #include #include #include #include #include #include #include #include #ifdef QT_NO_DEBUG static bool verbose = false; #else static bool verbose = true; #endif static bool appReady = false; static void qtMessageHandler(QtMsgType type, const char *msg) { switch (type) { case QtFatalMsg: fprintf(stderr,"djview fatal error: %s\n", msg); abort(); case QtCriticalMsg: fprintf(stderr,"djview critical error: %s\n", msg); break; case QtWarningMsg: if (verbose || !appReady) fprintf(stderr,"djview: %s\n", msg); break; default: if (verbose || !appReady) fprintf(stderr,"%s\n", msg); break; } } static void message(QString string, bool prefix=true) { QByteArray m = string.toLocal8Bit(); if (prefix) fprintf(stderr, "djview: "); fprintf(stderr, "%s\n", (const char*) m); } static void message(QStringList sl) { foreach (QString s, sl) message(s); } QDjViewApplication::QDjViewApplication(int &argc, char **argv) : QApplication(argc, argv), context(argv[0]) { // Message handler qInstallMsgHandler(qtMessageHandler); // Locale should not mess with printf // We do this again because old libdjvulibre // did not correctly set LC_NUMERIC. #ifdef LC_ALL ::setlocale(LC_ALL, ""); # ifdef LC_NUMERIC ::setlocale(LC_NUMERIC, "C"); # endif #endif // Mac/Cocoa bug workaround #if defined(Q_WS_MAC) && defined(QT_MAC_USE_COCOA) && QT_VERSION<0x40503 extern void qt_mac_set_native_menubar(bool); qt_mac_set_native_menubar(false); #endif // Install translators QStringList langs = getTranslationLangs(); QTranslator *qtTrans = new QTranslator(this); if (loadTranslator(qtTrans, "qt", langs)) installTranslator(qtTrans); QTranslator *djviewTrans = new QTranslator(this); if (loadTranslator(djviewTrans, "djview", langs)) installTranslator(djviewTrans); // Application is ready appReady = true; } QDjView * QDjViewApplication::newWindow() { if (lastWindow && !lastWindow->getDocument()) return lastWindow; QDjView *main = new QDjView(context); main->setAttribute(Qt::WA_DeleteOnClose); lastWindow = main; return main; } static void addDirectory(QStringList &dirs, QString path) { QString dirname = QDir::cleanPath(path); if (! dirs.contains(dirname)) dirs << dirname; } static void addLang(QStringList &langs, QString s) { if (s.size() <= 0) return; if (! langs.contains(s)) langs << s; QString sl = s.toLower(); if (sl != s && ! langs.contains(sl)) langs << sl; } QStringList QDjViewApplication::getTranslationDirs() { if (translationDirs.isEmpty()) { QStringList dirs; QDir dir = applicationDirPath(); QString dirPath = dir.canonicalPath(); addDirectory(dirs, dirPath); #ifdef DIR_DATADIR QString datadir = DIR_DATADIR; addDirectory(dirs, datadir + "/djvu/djview4"); addDirectory(dirs, datadir + "/djview4"); #endif #ifdef Q_WS_MAC addDirectory(dirs, dirPath + "/Resources/$LANG.lproj"); addDirectory(dirs, dirPath + "/../Resources/$LANG.lproj"); addDirectory(dirs, dirPath + "/../../Resources/$LANG.lproj"); #endif addDirectory(dirs, dirPath + "/share/djvu/djview4"); addDirectory(dirs, dirPath + "/share/djview4"); addDirectory(dirs, dirPath + "/../share/djvu/djview4"); addDirectory(dirs, dirPath + "/../share/djview4"); addDirectory(dirs, dirPath + "/../../share/djvu/djview4"); addDirectory(dirs, dirPath + "/../../share/djview4"); addDirectory(dirs, "/usr/share/djvu/djview4"); addDirectory(dirs, "/usr/share/djview4"); addDirectory(dirs, QLibraryInfo::location(QLibraryInfo::TranslationsPath)); translationDirs = dirs; } return translationDirs; } QStringList QDjViewApplication::getTranslationLangs() { if (translationLangs.isEmpty()) { QStringList langs; addLang(langs, QSettings().value("language").toString()); QString varLanguage = QString::fromLocal8Bit(::getenv("LANGUAGE")); foreach(QString lang, varLanguage.split(":", QString::SkipEmptyParts)) addLang(langs, lang); #ifdef LC_MESSAGES addLang(langs, QString::fromLocal8Bit(::setlocale(LC_MESSAGES, 0))); #endif #ifdef LC_ALL addLang(langs, QString::fromLocal8Bit(::setlocale(LC_ALL, 0))); #endif #ifdef Q_WS_MAC QSettings g(".", "globalPreferences"); foreach (QString lang, g.value("AppleLanguages").toStringList()) addLang(langs, lang); #endif addLang(langs, QLocale::system().name()); translationLangs = langs; } return translationLangs; } bool QDjViewApplication::loadTranslator(QTranslator *trans, QString name, QStringList langs) { foreach (QString lang, langs) { foreach (QString dir, getTranslationDirs()) { dir = dir.replace(QRegExp("\\$LANG(?!\\w)"), lang); QDir qdir(dir); if (qdir.exists()) if (trans->load(name + "_" + lang, dir, "_.-")) return true; if (lang.startsWith("en_") || lang == "en" || lang == "c") break; } } return false; } bool QDjViewApplication::event(QEvent *ev) { if (ev->type() == QEvent::FileOpen) { QString name = static_cast(ev)->file(); QDjView *main = newWindow(); if (main->open(name)) { main->show(); } else { message(tr("cannot open '%1'.").arg(name)); delete main; } return true; } else if (ev->type() == QEvent::Close) { closeAllWindows(); } return QApplication::event(ev); } #ifdef Q_WS_X11 void QDjViewApplication::commitData(QSessionManager &) { } void QDjViewApplication::saveState(QSessionManager &sm) { int n = 0; QSettings s; foreach(QWidget *w, topLevelWidgets()) { QDjView *djview = qobject_cast(w); if (djview && !djview->objectName().isEmpty() && djview->getViewerMode() == QDjView::STANDALONE ) { if (++n == 1) { QStringList discard = QStringList(applicationFilePath()); discard << QLatin1String("-discard") << sessionId(); sm.setDiscardCommand(discard); QStringList restart = QStringList(applicationFilePath()); restart << QLatin1String("-session"); restart << sessionId() + "_" + sessionKey(); sm.setRestartCommand(restart); QString id = QLatin1String("session_") + sessionId(); s.sync(); s.remove(id); s.beginGroup(id); } s.beginGroup(QString::number(n)); djview->saveSession(&s); s.endGroup(); } } if (n > 0) { s.setValue("windows", n); s.endGroup(); s.sync(); } } #endif #ifndef NPDJVU static void usage() { QString msg = QDjViewApplication::tr ("Usage: djview [options] [filename-or-url]\n" "Common options include:\n" "-help~~~Prints this message.\n" "-verbose~~~Prints all warning messages.\n" "-display ~~~Select the X11 display .\n" "-geometry ~~~Select the initial window geometry.\n" "-font ~~~Select the X11 name of the main font.\n" "-style ~~~Select the QT user interface style.\n" "-fullscreen, -fs~~~Start djview in full screen mode.\n" "-page=~~~Jump to page .\n" "-zoom=~~~Set zoom factor.\n" "-continuous=~~~Set continuous layout.\n" "-sidebyside=~~~Set side-by-side layout.\n" ); // align tabs QStringList opts = msg.split("\n"); int tab = 0; foreach (QString s, opts) tab = qMax(tab, s.indexOf("~~~")); foreach (QString s, opts) { int pos = s.indexOf("~~~"); if (pos >= 0) s = QString(" %1 %2").arg(s.left(pos), -tab).arg(s.mid(pos+3)); message(s, false); } exit(10); } int main(int argc, char *argv[]) { // Application data QApplication::setOrganizationName(DJVIEW_ORG); QApplication::setOrganizationDomain(DJVIEW_DOMAIN); QApplication::setApplicationName(DJVIEW_APP); // Message handler qInstallMsgHandler(qtMessageHandler); #ifdef Q_OS_UNIX const char *s = ::getenv("DJVIEW_VERBOSE"); if (s && strcmp(s,"0")) verbose = true; #endif // Color specification // (cause XRender errors under many versions of Qt/X11) #ifndef Q_WS_X11 QApplication::setColorSpec(QApplication::ManyColor); #endif // Plugin mode #ifdef Q_WS_X11 if (argc==2 && !strcmp(argv[1],"-netscape")) { verbose = true; QDjViewPlugin dispatcher(argv[0]); return dispatcher.exec(); } #endif // Discard session #ifdef Q_WS_X11 if (argc==3 && !strcmp(argv[1],"-discard")) { QSettings s; s.remove(QLatin1String("session_")+QLatin1String(argv[2])); s.sync(); return 0; } #endif // Create application QDjViewApplication app(argc, argv); // Restore session #ifdef Q_WS_X11 if (app.isSessionRestored()) { QSettings s; s.beginGroup(QLatin1String("session_") + app.sessionId()); int windows = s.value("windows").toInt(); if (windows > 0) { for (int n=1; n<=windows; n++) { QDjView *w = new QDjView(*app.djvuContext()); w->setAttribute(Qt::WA_DeleteOnClose); s.beginGroup(QString::number(n)); w->restoreSession(&s); s.endGroup(); w->show(); } return app.exec(); } } #endif // Process command line QDjView *main = app.newWindow(); while (argc > 1 && argv[1][0] == '-') { QString arg = QString::fromLocal8Bit(argv[1]).replace(QRegExp("^-+"),""); if (arg == "help") usage(); else if (arg == "verbose") verbose = true; else if (arg == "quiet") verbose = false; else if (arg == "fix") message(QApplication::tr("Option '-fix' is deprecated.")); else message(main->parseArgument(arg)); argc --; argv ++; } if (argc > 2) usage(); // Open file if (argc > 1) { QString name = QString::fromLocal8Bit(argv[1]); bool okay = true; if (name.contains(QRegExp("^[a-zA-Z]{3,8}:/"))) okay = main->open(QUrl(name)); else okay = main->open(name); if (! okay) { message(QDjView::tr("cannot open '%1'.").arg(argv[1])); exit(10); } } // Process events main->show(); return app.exec(); } #endif /* ------------------------------------------------------------- Local Variables: c++-font-lock-extra-types: ( "\\sw+_t" "[A-Z]\\sw*[a-z]\\sw*" ) End: ------------------------------------------------------------- */ djview4/src/djview.h000066400000000000000000000036151174072760700147020ustar00rootroot00000000000000//C- -*- C++ -*- //C- ------------------------------------------------------------------- //C- DjView4 //C- Copyright (c) 2006- Leon Bottou //C- //C- This software is subject to, and may be distributed under, the //C- GNU General Public License, either version 2 of the license, //C- or (at your option) any later version. The license should have //C- accompanied the software or you may obtain a copy of the license //C- from the Free Software Foundation at http://www.fsf.org . //C- //C- This program is distributed in the hope that it will be useful, //C- but WITHOUT ANY WARRANTY; without even the implied warranty of //C- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //C- GNU General Public License for more details. //C- ------------------------------------------------------------------ #ifndef DJVIEW_H #define DJVIEW_H #if AUTOCONF # include "config.h" #endif #include #include #include #include #include #include #include #include "qdjvu.h" class QDjView; class QTranslator; class QDjViewApplication : public QApplication { Q_OBJECT QDjVuContext context; QPointer lastWindow; QStringList translationLangs; QStringList translationDirs; public: QDjViewApplication(int &argc, char **argv); QDjVuContext *djvuContext() { return &context; } QDjView *newWindow(); bool loadTranslator(QTranslator *trans, QString name, QStringList langs); protected: bool event(QEvent *ev); #ifdef Q_WS_X11 void commitData(QSessionManager &sm); void saveState(QSessionManager &sm); #endif private: QStringList getTranslationLangs(); QStringList getTranslationDirs(); }; #endif /* ------------------------------------------------------------- Local Variables: c++-font-lock-extra-types: ( "\\sw+_t" "[A-Z]\\sw*[a-z]\\sw*" ) End: ------------------------------------------------------------- */ djview4/src/djview.plist000066400000000000000000000052701174072760700156050ustar00rootroot00000000000000 CFBundleIconFile @ICON@ CFBundlePackageType APPL CFBundleName DjView CFBundleGetInfoString DjView - viewer for DjVu files CFBundleSignature DJVU CFBundleExecutable @EXECUTABLE@ CFBundleIdentifier org.djvu.DjView CFBundleInfoDictionaryVersion 6.0 CFBundleDocumentTypes CFBundleTypeExtensions djvu djv CFBundleTypeMIMETypes image/vnd.djvu image/x-dejavu image/djvu image/x.djvu image/x-djvu image/x-iw44 CFBundleTypeIconFile DjVu.icns CFBundleTypeName DjVu File CFBundleTypeRole Viewer LSIsAppleDefaultForType LSItemContentTypes com.lizardtech.djvu UTExportedTypeDeclarations UTTypeConformsTo org.djvuzone.djvulibre.djvu com.lizardtech.djvu public.djvu public.composite-content public.content public.data UTTypeDescription DjVu File UTTypeIdentifier com.lizardtech.djvu UTTypeIconFile DjVu.icns UTTypeTagSpecification public.filename-extension djv djvu public.mime-type image/vnd.djvu image/x-dejavu image/djvu image/x.djvu image/x-djvu image/x-iw44 djview4/src/djview.pro000066400000000000000000000062031174072760700152470ustar00rootroot00000000000000#C- -*- shell-script -*- #C- ------------------------------------------------------------------- #C- DjView4 #C- Copyright (c) 2006 Leon Bottou #C- #C- This software is subject to, and may be distributed under, the #C- GNU General Public License. The license should have #C- accompanied the software or you may obtain a copy of the license #C- from the Free Software Foundation at http:#www.fsf.org . #C- #C- This program is distributed in the hope that it will be useful, #C- but WITHOUT ANY WARRANTY; without even the implied warranty of #C- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #C- GNU General Public License for more details. #C- ------------------------------------------------------------------ TEMPLATE = app TARGET = djview CONFIG += qt thread warn_on QT += network # -- find libraries CONFIG(autoconf) { # for use with autoconf DEFINES += AUTOCONF # Autoconf calls qmake with the following variables # LIBS += ... # QMAKE_CXXFLAGS += ... # QMAKE_CFLAGS += ... # QMAKE_LFLAGS += ... } else:unix:!macx { # for use under unix with pkgconfig CONFIG += link_pkgconfig PKGCONFIG += ddjvuapi } else { # for use on other platforms # LIBS += -ldjvulibre # QMAKE_CXXFLAGS += ... (c++ flags) # QMAKE_CFLAGS += ... (c flags) # QMAKE_LFLAGS += ... (link flags) # DEFINES += ... (definitions) } # -- no debug in release mode CONFIG(release,debug|release) { DEFINES += NDEBUG QT_NO_DEBUG QT_NO_DEBUG_STREAM } # -- check for x11 macx { ICON = images/DjVuApp.icns RESOURCES.path = Contents/Resources RESOURCES.files = images/DjVu.icns QMAKE_BUNDLE_DATA += RESOURCES QMAKE_INFO_PLIST = djview.plist contains(DEFINES,__USE_WS_X11__): CONFIG += x11 } else:win32 { RC_FILE = djview.rc contains(DEFINES,_WIN32_X11_): CONFIG += x11 } else:unix { CONFIG += x11 } # -- djvu files HEADERS += qdjvu.h HEADERS += qdjvunet.h HEADERS += qdjvuwidget.h SOURCES += qdjvu.cpp SOURCES += qdjvunet.cpp SOURCES += qdjvuwidget.cpp RESOURCES += qdjvuwidget.qrc # -- djview files HEADERS += qdjviewprefs.h HEADERS += qdjviewsidebar.h HEADERS += qdjviewdialogs.h HEADERS += qdjviewexporters.h HEADERS += qdjview.h HEADERS += djview.h SOURCES += qdjviewprefs.cpp SOURCES += qdjviewsidebar.cpp SOURCES += qdjviewdialogs.cpp SOURCES += qdjviewexporters.cpp SOURCES += qdjview.cpp SOURCES += djview.cpp RESOURCES += qdjview.qrc FORMS += qdjviewerrordialog.ui FORMS += qdjviewauthdialog.ui FORMS += qdjviewinfodialog.ui FORMS += qdjviewmetadialog.ui FORMS += qdjviewsavedialog.ui FORMS += qdjviewprintdialog.ui FORMS += qdjviewexportdialog.ui FORMS += qdjviewexportps1.ui FORMS += qdjviewexportps2.ui FORMS += qdjviewexportps3.ui FORMS += qdjviewexporttiff.ui FORMS += qdjviewexportprn.ui FORMS += qdjviewprefsdialog.ui x11 { HEADERS += qdjviewplugin.h SOURCES += qdjviewplugin.cpp } # -- helper files HEADERS += tiff2pdf.h SOURCES += tiff2pdf.c # -- transations TRANSLATIONS += djview_fr.ts TRANSLATIONS += djview_uk.ts TRANSLATIONS += djview_de.ts TRANSLATIONS += djview_cs.ts TRANSLATIONS += djview_ru.ts TRANSLATIONS += djview_zh_cn.ts TRANSLATIONS += djview_zh_tw.ts djview4/src/djview.rc000066400000000000000000000002061174072760700150500ustar00rootroot00000000000000IDI_ICON1 ICON DISCARDABLE "images/DjVuApp.ico" IDI_ICON2 ICON DISCARDABLE "images/DjVu.ico"djview4/src/djview_cs.ts000066400000000000000000004610701174072760700155710ustar00rootroot00000000000000 Generic thisLanguage Name of THIS language ÄŒesky QApplication Option '-fix' is deprecated. PÅ™epínaÄ â€ž-fix“ není doporuÄeno používat. QDjView cannot open '%1'. „%1“ nelze otevřít. FitWidth zoomCombo Na šířku FitPage zoomCombo Celá stránka Stretch zoomCombo Roztáhnout 1:1 zoomCombo 1:1 300% zoomCombo 300 % 200% zoomCombo 200 % 150% zoomCombo 150 % 100% zoomCombo 100 % 75% zoomCombo 75 % 50% zoomCombo 50 % Color modeCombo BarevnÄ› Stencil modeCombo Kresbu Foreground modeCombo PopÅ™edí Background modeCombo Pozadí &New File| &Nové okno Ctrl+N File|New Ctrl+N Create a new DjView window. Vytvoří nové okno s DjView. &Open File| &Otevřít Ctrl+O File|Open Ctrl+O Open a DjVu document. OtevÅ™e dokument DjVu. &Close File| &Zavřít Ctrl+W File|Close Ctrl+W Close this window. ZavÅ™e toto okno. &Quit File| U&konÄit Ctrl+Q File|Quit Ctrl+Q Close all windows and quit the application. ZavÅ™e vÅ¡echna okna a ukonÄí aplikaci. Save &as... File| Uložit &jako… Ctrl+S File|SaveAs Ctrl+S Save the DjVu document. Uloží dokument DjVu. &Export as... File| &Exportovat jako… Ctrl+E File|ExportAs Ctrl+E Export DjVu page or document to other formats. Exportuje stránku DjVu nebo celý dokument do jiného formátu. &Print... File| &Tisknout… Ctrl+P File|Print Ctrl+P Print the DjVu document. Vytiskne dokument DjVu. &Find... Edit| Na&jít… Ctrl+F Edit|Find Ctrl+F Find text in the document. Hledá text v dokumentu. Find &Next Edit| Najít &další F3 Edit|Find Next F3 Find next occurence of search text in the document. Hledá v dokumentu další výskyt hledaného textu. Find &Previous Edit| Najít &pÅ™edchozí Shift+F3 Edit|Find Previous Shift+F3 Find previous occurence of search text in the document. Hledá v dokumentu pÅ™edchozí výskyt hledaného textu. &Select Edit| &Vybrat F2 Edit|Select F2 Select a rectangle in the document. Vyberte v dokumentu obdélníkovou oblast. Zoom &In Zoom| &PÅ™iblížit Increase the magnification. Zvýší zvÄ›tÅ¡ení. Zoom &Out Zoom| &Oddálit Decrease the magnification. Sníží zvÄ›tÅ¡ení. Fit &Width Zoom| Na šíř&ku Set magnification to fit page width. Nastaví takové zvÄ›tÅ¡ení, aby se stránka veÅ¡la na šířku okna. Fit &Page Zoom| &Celá stránka Set magnification to fit page. Nastaví takové zvÄ›tÅ¡ení, aby se stránka veÅ¡la do okna. One &to one Zoom| ZvÄ›tÅ¡ení &1:1 Set full resolution magnification. Nastaví plné zvÄ›tÅ¡ení. &300% Zoom| &300 % Magnify 300% ZvÄ›tÅ¡ení 300 % &200% Zoom| &200% Magnify 20% ZvÄ›tÅ¡ení 20 % 150% Zoom| 150 % Magnify 150% ZvÄ›tÅ¡ení 150 % &100% Zoom| &100 % Magnify 100% ZvÄ›tÅ¡ení 100 % &75% Zoom| &75 % Magnify 75% ZvÄ›tÅ¡ení 75 % &50% Zoom| &50 % Magnify 50% ZvÄ›tÅ¡ení 50 % &First Page Go| P&rvní stránka Jump to first document page. Nalistuje první stránku v dokumentu. &Next Page Go| &Následující stránka Jump to next document page. Nalistuje následující stránku v dokumentu. &Previous Page Go| &PÅ™edchozí stránka Jump to previous document page. Nalistuje pÅ™edchozí stránku v dokumentu. &Last Page Go| Pos&lední stránka Jump to last document page. Nalistuje poslední stránku v dokumentu. &Backward Go| &ZpÄ›t Backward in history. ZpÄ›t v historii. &Forward Go| &DopÅ™edu Forward in history. DopÅ™edu v historii. Rotate &Left Rotate| OtoÄit do&leva Rotate page image counter-clockwise. OtoÄí stránku proti smÄ›ru hodinových ruÄiÄek. Rotate &Right Rotate| OtoÄit do&prava Rotate page image clockwise. OtoÄí stránku ve smÄ›ru hodinových ruÄiÄek. Rotate &0° Rotate| OtoÄení &0 ° Set natural page orientation. Nastaví pÅ™irozený smÄ›r stránky. Rotate &90° Rotate| OtoÄení &90 ° Turn page on its left side. Stránku otoÄí na svoji levou stranu. Rotate &180° Rotate| OtoÄení &180 ° Turn page upside-down. OtoÄí stránku vzhůru nohama. Rotate &270° Rotate| OtoÄení &270 ° Turn page on its right side. Stránku otoÄí na svoji pravou stranu. &Information... Edit| &Informace… Ctrl+I Edit|Information Ctrl+I Show information about the document encoding and structure. Zobrazí informace o kódování dokumentu a jeho struktuÅ™e. &Metadata... Edit| &Metadata… Ctrl+M Edit|Metadata Ctrl+M Show the document and page meta data. Zobrazí metadata o stránce a celém dokumentu. &About DjView... &O DjView… Show information about this program. Zobrazí informace o tomto programu. &Color Display| &BarevnÄ› Display everything. Zobrazí vÅ¡e. &Stencil Display| &Kresbu Only display the document bitonal stencil. Zobrazí pouze dvoubarevnou kresbu dokumentu. &Foreground Display| &PopÅ™edí Only display the foreground layer. Zobrazí pouze vrstvu popÅ™edí. &Background Display| Po&zadí Only display the background layer. Zobrazí pouze vrstvu pozadí. I&nvert Luminance View| PÅ™evrátit &jas Invert image luminance while preserving hue. PÅ™evrátí jas obrazu pÅ™i zachování odstínu. Prefere&nces... Settings| Nasta&vení… Show the preferences dialog. Zobrazí dialog s nastavením. F9 Settings|Show sidebar F9 Show/hide the side bar. Zobrazí/skryje postranní panel. F10 Settings|Show toolbar F10 Show/hide the standard tool bar. Zobrazí/skryje standardní liÅ¡tu nástrojů. Show/hide the status bar. Zobrazí/skryje stavový řádek. F&ull Screen View| &Celá obrazovka F11 View|FullScreen F11 Toggle full screen mode. PÅ™epne celoobrazovkový režim. &Continuous Layout| &Navazující stránky F4 Layout|Continuous F4 Toggle continuous layout mode. PÅ™epne souvislý režim zobrazení. Side &by Side Layout| &Po dvou stránkách F5 Layout|SideBySide F5 Toggle side-by-side layout mode. PÅ™epne režim zobrazení po dvou stránkách. &File File| &Soubor &Edit Edit| Ú&pravy &View View| &Zobrazení &Zoom View|Zoom Z&vÄ›tÅ¡ení &Rotate View|Rotate &OtoÄení &Display View|Display &Zobrazení &Go Go| PÅ™e&jít &Settings Settings| Nasta&vení &Help Help| &NápovÄ›da Control Left Mouse Button Ovládat levým tlaÄítkem myÅ¡i Right Mouse Button Pravé tlaÄítko myÅ¡i <html><b>Selecting a rectangle.</b><br/> Once a rectangular area is selected, a popup menu lets you copy the corresponding text or image. Instead of using this tool, you can also hold %1 and use the Left Mouse Button.</html> <html<b>Obdélníkový výbÄ›r.</b><br/>Jakmile vyberete obdélníkovou oblast, vyskoÄí nabídka umožňující zkopírování odpovídajícího textu nebo obrázku. Místo tohoto nástroje můžete podržet %1 a použít levé tlaÄítko myÅ¡i.</html> <html><b>Zooming.</b><br/> Choose a zoom level for viewing the document. Zoom level 100% displays the document for a 100 dpi screen. Zoom levels <tt>Fit Page</tt> and <tt>Fit Width</tt> ensure that the full page or the page width fit in the window. </html> <html><b>ZvÄ›tÅ¡ení.</b><br/>Vybere míru zvÄ›tÅ¡ení pÅ™i prohlížení dokumentu. Hodnota 100 % zobrazí dokument pro 100DPI obrazovku. Hodnoty <tt>Celá stránka</tt> a <tt>Na šířku</tt> zajistí, že celá stránka nebo celá šířka stránky se vmÄ›stná do okna.</html> <html><b>Rotating the pages.</b><br/> Choose to display pages in portrait or landscape mode. You can also turn them upside down.</html> <html><b>OtáÄení stránek.</b><br/>Vyberte pro zobrazení stránek v orientaci na výšku nebo na šířku. Taktéž je můžete otoÄit vzhůru nohama.</html> <html><b>Display mode.</b><br/> DjVu images compose a background layer and a foreground layer using a stencil. The display mode specifies with layers should be displayed.</html> <html><b>Režim zobrazení.</b><br/>Obrázku DjVu se skládají z vrstvy s pozadím a popÅ™edím za pomoc kresby textu. Režim zobrazení urÄuje, které vrstvy mají být zobrazeny.</html> <html><b>Document and page information.</b><br> Display a dialog window for viewing encoding information pertaining to the document or to a specific page.</html> <html><b>Informace o dokumentu a stránkách</b><br/>Zobrazí interaktivní okno s informacemi o kódování dokumentu nebo urÄité stránky.</html> <html><b>Document and page metadata.</b><br> Display a dialog window for viewing metadata pertaining to the document or to a specific page.</html> <html><b>Metadata o dokumentu a stránkách.</b><br/>Zobrazí interaktivní okno s metadaty o dokumentu nebo urÄité stránce.</html> <html><b>Continuous layout.</b><br/> Display all the document pages arranged vertically inside the scrollable document viewing area.</html> <html><b>Navazující pohled.</b><br/>VÅ¡echny stránky dokumentu budou svisle seÅ™azeny uvnitÅ™ jediné velké rolovatelné oblasti (jako leporelo).</html> <html><b>Side by side layout.</b><br/> Display pairs of pages side by side inside the scrollable document viewing area.</html> <html><b>Pohled po dvou stránkách.</bn><br/>UvnitÅ™ rolovatelné oblasti budou zobrazeny vždy dvÄ› sousedící stránky vedle sebe (jako otevÅ™ená kniha).</html> <html><b>Page information.</b><br/> Display information about the page located under the cursor: the sequential page number, the page size in pixels, and the page resolution in dots per inch. </html> <html><b>Informace o stránce.</b><br/>Zobrazí informace o stránce umístÄ›né pod kurzorem: poÅ™adové Äíslo stránky, rozmÄ›ry stránky v pixelech a rozliÅ¡ení stránky v bodech na palec.</html> <html><b>Cursor information.</b><br/> Display the position of the mouse cursor expressed in page coordinates. </html> <html><b>Informace o kurzoru.</b><br/>Zobrazí pozici ukazatele myÅ¡i v souÅ™adném systému stránky.</html> <html><b>Document viewing area.</b><br/> This is the main display area for the DjVu document. <ul><li>Arrows and page keys to navigate the document.</li><li>Space and BackSpace to read the document.</li><li>Keys <tt>+</tt> <tt>-</tt> <tt>[</tt> <tt>]</tt> to zoom or rotate the document.</li><li>Left Mouse Button for panning and selecting links.</li><li>%3 for displaying the contextual menu.</li><li>%1 Left Mouse Button for selecting text or images.</li><li>%2 for popping the magnification lens.</li></ul></html> <html><b>Oblast pro zobrazování dokumentu.</bn><br/>Toto je hlavní zobrazovací plocha pro dokumenty DjVu.<ul><li>Å ipky, PgUp, PgDn pro pohyb v dokumentu.</li><li>Mezerník a backspace pro Ätení v dokumentu.</li><li>Klávesy <tt>+</tt> <tt>-</tt> <tt>[</tt> <tt>]</tt> pro zvÄ›tÅ¡ování a otáÄení dokumentu.</li><li>Levé tlaÄítko myÅ¡i pro zvýraznÄ›ní a výbÄ›r odkazů.</li><li>%3 pro zobrazení kontextové nabídky.</li><li>%1 levé tlaÄítko myÅ¡i pro výbÄ›r textu a obrázků.</li><li>%2 pro zobrazení lupy.</li></ul></html> <html><b>Document viewing area.</b><br/> This is the main display area for the DjVu document. But you must first open a DjVu document to see anything.</html> <html><b>Plocha pro zobrazování dokumentu.</b><br/>Toto je hlavní plocha pro zobrazování dokumentů DjVu. AvÅ¡ak abyste nÄ›co vidÄ›li, musíte nejprve nÄ›jaký dokument DjVu otevřít.</html> Option '%1' requires boolean argument. PÅ™epínaÄ â€ž%1“ vyžaduje pravdivostní argument. Illegal value '%2' for option '%1'. Neplatná hodnota „%2“ pro pÅ™epínaÄ â€ž%1“. Toolbar option '%1' is not implemented. PÅ™epínaÄ liÅ¡ty nástrojů „%1“ není implementován. Toolbar option '%1' is not recognized. PÅ™epínaÄ liÅ¡ty nástrojů „%1“ není znám. Option '%1' requires a standalone viewer. PÅ™epínaÄ â€ž%1“ vyžaduje samostatný prohlížeÄ. Deprecated option '%1' Zastaralý pÅ™epínaÄ â€ž%1“ Option '%1' is not implemented. PÅ™epínaÄ â€ž%1“ není implementován. Option '%1' is not recognized. PÅ™epínaÄ â€ž%1“ není znám. DjView DjView Cannot open file '%1'. Soubor „%1“ nelze otevřít. Opening DjVu file Otevírám soubor DjVu Cannot open URL '%1'. URL „%1“ nelze otevřít. Opening DjVu document Otevírám dokument DjVu Certificate validation error - DjView dialog caption Chyba ověřování certifikátu – DjView <html> %1 Do you want to continue anyway? </html> <html> %1 Chcete pÅ™esto pokraÄovat? </html> Cannot find page numbered: %1 Nelze najít stránku Äíslo: %1 Cannot find page named: %1 Nelze najít stránku pojmenovanou: %1 Unrecognized sidebar options '%1'. Nerozpoznané volby postranního panelu „%1“. <html> This file was served with printing restrictions. Do you want to print it anyway?</html> <html>Tento soubor byl dodán s omezením tisku. Chcete jej pÅ™esto vytisknout?</html> <html> This file was served with saving restrictions. Do you want to save it anyway?</html> <html>Tento soubor byl dodán s omezením ukládání. Chcete jej pÅ™esto uložit?</html> Print - DjView dialog caption Tisk – DjView Save - DjView dialog caption Uložení – DjView Export - DjView dialog caption Export – DjView Text files save filter Textové soubory All files save filter VÅ¡echny soubory Save Text - DjView dialog caption Uložit text – DjView Error - DjView dialog caption Chyba – DjView Cannot write file '%1'. %2. Soubor „%1“ nelze zapsat. %2. Save Image - DjView dialog caption Uložit obrázek – DjView Cannot determine file format. Filename '%1' has no suffix. Formát souboru nelze urÄit. Soubor „%1“ nemá žádnou příponu. Image format %1 not supported. Formát souboru %1 není podporován. Cannot decode page %1. Stránku %1 nelze dekódovat. Cannot decode document. Dokument nelze dekódovat. Decoding DjVu document Dekóduji dokument DjVu x=%1 y=%2 x=%1 y=%2 %3x%4+%1+%2 %3×%4+%1+%2 Go: %n pages forward. PÅ™ejít: %n stranu vpÅ™ed. PÅ™ejít: %n strany vpÅ™ed. PÅ™ejít: %n stran vpÅ™ed. Go: %n pages backward. PÅ™ejít: %n stranu zpÄ›t. PÅ™ejít: %n strany zpÄ›t. PÅ™ejít: %n stran zpÄ›t. Go: page %1. PÅ™ejít: na stranu %1. Go: %1 Link: %1 PÅ™ejít: %1 (in other window.) (v dalším oknÄ›.) Cannot resolve link '%1' Odkaz „%1“ nelze vyhodnotit Cannot spawn a browser for url '%1' Pro URL „%1“ nelze vyvolat prohlížeÄ Copy text (%1) Zkopírovat text (%1) Save text as... Uložit text jako… Copy image (%1x%2 pixels) Zkopírovat obrázek (%1×%2 pixelů) Save image as... Uložit obrázek jako… Zoom to rectangle ZvÄ›tÅ¡it na obdélník About DjView O DjView DjVu files Soubory DjVu Enter the URL of a DjVu document: Zadejte URL  dokumentu DjVu: Information - DjView dialog caption Informace – DjView Metadata - DjView dialog caption Metadata – DjView Open &Location... File| Otevřít z &adresy… Open a remote DjVu document. OtevÅ™e vzdálený dokument DjVu. Ctrl+F3 Edit|Find Next Ctrl+F3 Ctrl+F2 Edit|Select Ctrl+F2 Show &Sidebar Settings| Zobrazit &postranní panel Ctrl+F9 Settings|Show sidebar Ctrl+F9 Show &Toolbar Settings| Zobrazit liÅ¡tu &nástrojů Ctrl+F10 Settings|Show toolbar Ctrl+F10 Show Stat&usbar Settings| Zobrazit &stavový řádek Ctrl+F11 View|FullScreen Ctrl+F11 Ctrl+F4 Layout|Continuous Ctrl+F4 Ctrl+F5 Layout|SideBySide Ctrl+F5 Open &Recent Otevřít &nedávné <html><b>Navigating the document.</b><br/> The page selector lets you jump to any page by name and can be activated at any time by pressing Ctrl+G. The navigation buttons jump to the first page, the previous page, the next page, or the last page. </html> <html><b>Navigace po dokumentu.</b><br/>Tento výbÄ›r stránky vám dovolí pÅ™ejít na libovolnou stránku podle jejího jména a lze jej kdykoliv vyvolat stiskem Ctrl+G. TlaÄítka navigace směřují na stránku první, pÅ™edcházející, následující nebo poslední.</html> Thumbnails Náhledy Outline Osnova Find Najít %1 files (*.%2);; save image filter %1 souborů (*.%2);; P%1/%2 %3x%4 %5dpi S%1/%2 %3×%4 %5 DPI <html><h2>DjVuLibre DjView %1</h2>%2<p>Viewer for DjVu documents<br><a href=%3>%3</a><br>Copyright © 2006-- Léon Bottou.</p><p align=justify><small>This program is free software. You can redistribute or modify it under the terms of the GNU General Public License as published by the Free Software Foundation. This program is distributed <i>without any warranty</i>. See the GNU General Public License for more details.</small></p></html> <html><h2>DjVuLibre DjView %1</h2>%2<p>ProhlížeÄ dokumentů DjVu<br/><a href=%3>%3</a><br/>Copyright © 2006 – Léon Bottou.</p><p align=justify><small>Tento program je svobodné programové vybavení. Můžete jej šířit nebo upravovat podle pravidel Obecné veÅ™ejné licence GNU (GNU GPL) vydané nadací Free Software Foundation. Tento program je šířen <i>bez jakékoliv záruky</i>. Pro podrobnosti nahlédnÄ›te do Obecné veÅ™ejné licence GNU (GNU General Public License)</small></p></html> Open - DjView dialog caption OtevÅ™ení – DjView Open Location - DjView dialog caption OtevÅ™ení z adresy – DjView &Clear History &Smazat historii %n characters %n znak %n znaky %n znaků Go: 1 page forward. PÅ™ejít: 1 stranu vpÅ™ed. Go: 1 page backward. PÅ™ejít: 1 stranu zpÄ›t. Copy &URL Edit| Kopírovat &URL Save an URL for the current page into the clipboard. Uloží do schránky URL souÄasné stránky. Copy &Outline Edit| Kopírovat &osnovu Copy &Annotations Edit| Kopírovat po&známky Copy text into the clipboard. Uloží text do schránky. Save text into a file. Uloží text do souboru. Copy image into the clipboard. Uloží obrázek do schránky. Save image into a file. Uloží obrázek do souboru. Zoom the selection to fit the window. ZvÄ›tší vybranou oblast tak, aby vyplnila okno. Copy URL Kopírovat URL Save into the clipboard an URL that highlights the selection. Uloží do schránky URL, které se nachází ve výbÄ›ru. Copy Maparea Kopírovat maparea Save into the clipboard a maparea annotation expression for program djvused. Uloží do schránky maparea výraz pro program djvused. Ctrl+C Edit|CopyURL Ctrl+C Save the djvused code for the outline into the clipboard. Uloží do schránky djvused kód s osnovou. Save the djvused code for the page annotations into the clipboard. Uloží do schránky dvjused kód s poznámkami na této stránce. Co&ver Page Layout| PÅ™e&bal Ctrl+F6 Layout|CoverPage Ctrl+F6 F6 Layout|CoverPage F6 Show the cover page alone in side-by-side mode. PÅ™i zobrazení pod dvou stránkách zobrazí pÅ™ebal samostatnÄ›. &Right to Left Layout| Zp&rava doleva Ctrl+Shift+F6 Layout|RightToLeft Ctrl+Shift+F6 Shift+F6 Layout|RightToLeft Shift+F6 Show pages right-to-left in side-by-side mode. PÅ™i zobrazení po dvou stránkách zobrazuje zprava doleva. All files VÅ¡echny soubory &Hidden Text Display| &Skrytý text Overlay a representation of the hidden text layer. Nad dokumentem zobrazí vrstvu skrytého textu. Hidden Text modeCombo Skrytý text QDjViewApplication Usage: djview [options] [filename-or-url] Common options include: -help~~~Prints this message. -verbose~~~Prints all warning messages. -display <xdpy>~~~Select the X11 display <xdpy>. -geometry <xgeom>~~~Select the initial window geometry. -font <xlfd>~~~Select the X11 name of the main font. -style <qtstyle>~~~Select the QT user interface style. -fullscreen, -fs~~~Start djview in full screen mode. -page=<page>~~~Jump to page <page>. -zoom=<zoom>~~~Set zoom factor. -continuous=<yn>~~~Set continuous layout. -sidebyside=<yn>~~~Set side-by-side layout. Použití: djview [pÅ™epínaÄe] [soubor_nebo_URL] Mezi obecné pÅ™epínaÄe patří: -help~~~Vypíše tuto zprávu. -verbose~~~Vypisuje vÅ¡echny varovné hlášky. -display <xdpy>~~~Vybere X11 displej <xdpy>. -geometry <geometrie>~~~Vybere poÄáteÄní geometrii okna. -font <xlfd>~~~Vybere X11 název hlavního fontu. -style <qtstyl>~~~Vybere styl uživatelského rozhraní Qt. -fullscreen, -fs~~~Spustí djview v celoobrazovkovém režimu. -page=<Äíslo_stránky>~~~Nalistuje stránku <Äíslo_stránky>. -zoom=<zvÄ›tÅ¡ení>~~~Nastaví zvÄ›tÅ¡ení. -continuous={y|n}~~~Nastaví navazující pohled („y“ [ano], „n“ [ne]). -sidebyside={y|n}~~~Nastaví pohled dvou stran („y“ [ano], „n“ [ne]). cannot open '%1'. „%1“ nelze otevřít. QDjViewAuthDialog Password: Heslo: User: Uživatel: Authentication required - DjView Vyžadováno prokázání totožnosti – DjView QDjViewDjVuExporter DjVu Bundled Document Svázaný dokument DjVu DjVu Files (*.djvu *.djv) Soubory DjVu (*.djvu *.djv) DjVu Indirect Document Volný dokument DjVu Question - DjView dialog caption Dotaz – DjView <html> This file belongs to a non empty directory. Saving an indirect document creates many files in this directory. Do you want to continue and risk overwriting files in this directory?</html> <html>Tento soubor náleží do neprázdného adresáře. PÅ™i uložení volného dokumentu vznikne v tomto adresáři mnoho souborů. Chcete pokraÄovat a riskovat pÅ™epsání souboru v tomto adresáři?</html> Con&tinue &PokraÄovat &Cancel &ZruÅ¡it Unknown error. Neznámá chyba. System error: %1. Systémová chyba: %1. Save job creation failed! VytvoÅ™ení ukládací úlohy selhalo! QDjViewErrorDialog DjView Error Chyba DjView Error - DjView dialog caption Chyba – DjView &Ok &Ok QDjViewExportDialog <html><b>Saving.</b><br/> You can save the whole document or a page range under a variety of formats. Selecting certain formats creates additional dialog pages for specifying format options.</html> <html><b>Uložení.</b><br/>Můžete uložit celý dokument nebo rozsah stránek do rozliÄných formátů. VýbÄ›r nÄ›kterých formátů způsobí zobrazení dodateÄných dialogových stránek pro nastavením daného formátu.</html> Error - DjView dialog caption Chyba – DjView Overwriting the current file is not allowed! PÅ™epsání aktuálního souboru není dovoleno! Question - DjView dialog caption Dotaz – DjView A file with this name already exists. Do you want to replace it? Soubor tohoto jména již existuje. Chcete jej nahradit? &Replace &Nahradit &Cancel &ZruÅ¡it This operation has failed. Tato operace selhala. This operation has been interrupted. Tato operace byla pÅ™eruÅ¡ena. All files save filter VÅ¡echny soubory Export - DjView dialog caption Export – DjView Dialog Dialog Export Exportovat &Document &Dokument C&urrent page &Aktuální stránku &Pages &Stránky to až Destination Cíl Format: Formát: &Defaults &Výchozí &Ok &Ok Stop Zastavit QDjViewExportPS1 Form Tvar Color Barvy &Color &BarevnÄ› &GrayScale O&dstíny Å¡edi Marks ZnaÄky Print image &frame Tisknout o&rámování Print crop &marks Tisknout oÅ™e&zové znaÄky PostScript PostScript Language Level Úroveň jazyka QDjViewExportPS2 Form Tvar Scaling ZvÄ›tÅ¡ení Scale to &fit the page &Roztáhnout na celou stránku &Zoom &ZvÄ›tÅ¡ení %  % Orientation Orientace Automatic Automatická &Portrait Na &výšku &Landscape Na šíř&ku QDjViewExportPS3 Form Print sheets suitable for folding a booklet. Tisknout listy v poÅ™adí pro pohodlné sestavení brožury. Advanced PokroÄilé nastavení Sheets per booklet: Listů na brožuru: Unlimited NeomezenÄ› at most nejvýše Print Tisknout rectos and versos. liché i sudé. rectos only. jen liché. versos only. jen sudé. Shift rectos and versos by Liché a sudé posunout o points. bodů. Center: StÅ™ed: points bodů plus plus /100 /100 per page. na stránku. QDjViewExportPrn Form Tvar Color Barvy &Color &BarevnÄ› &GrayScale O&dstíny Å¡edi Marks ZnaÄky Print image &frame Tisknout o&rámování Print crop &marks Tisknout oÅ™e&zové znaÄky Scaling ZvÄ›tÅ¡ení Scale to &fit the page &Roztáhnout na celou stránku &Zoom Z&vÄ›tÅ¡ení %  % Orientation Orientace Automatic Automatická &Portrait Na &výšku &Landscape Na šíř&ku QDjViewExportTiff Form Tvar Resolution RozliÅ¡ení Maximum image resolution Nejvyšší rozliÅ¡ení obrázku dpi  DPI Compression Komprese Force &bitonal G4 compression. Vynutit &dvoubarvovou G4 kompresi. Allow &lossy JPEG compression. Povolit ztrátovou &JPEG  kompresi. JPEG &quality &Kvalita JPEGU Allow &deflate compression. Povolit &deflate kompresi. QDjViewFind Case sensitive RozliÅ¡ovat velikost písmen Words only Jen celá slova Find Previous (Shift+F3) Najít pÅ™edchozí (Shift+F3) Find Next (F3) Najít další (F3) Options Možnosti <html><b>Finding text.</b><br/> Search hits appear progressively as soon as you type a search string. Typing enter jumps to the next hit. To move to the previous or next hit, you can also use the arrow buttons or the shortcuts <tt>F3</tt> or <tt>Shift-F3</tt>. You can also double click a page name. Use the <tt>Options</tt> menu to search words only or to specify the case sensitivity.</html> <html><b>Najít text.</b><br/>Nalezené Å™etÄ›zce se objevují již v průbÄ›hu zadávání hledané fráze. Klávesou Enter se pÅ™esunete na další místo nálezu. Pro pÅ™esun na následující nebo pÅ™edcházející nález použijte tlaÄítka se Å¡ipkou nebo klávesové zkratky <tt>F3</tt> nebo <tt>Shift-F3</tt>. Taktéž můžete dva krát kliknout na jméno stránky. Nabídka <tt>Možnosti</tt> umožňuje omezit hledání na celá slova nebo velikost písmen.</html> Regular expression Regulární výraz Reset search options to default values. Vrátit možnosti hledání na jejich výchozí hodnoty. Specify whether search hits must begin on a word boundary. UrÄuje, zda výsledky hledání musí zaÄínat na hranici slova. Specify whether searches are case sensitive. UrÄuje, zda hledání rozliÅ¡uje velikost písmen. Regular expressions describe complex string matching patterns. Regulární výrazy popisují vzory pro hledání složitých Å™etÄ›zců. <html><b>Regular Expression Quick Guide</b><ul><li>The dot <tt>.</tt> matches any character.</li><li>Most characters match themselves.</li><li>Prepend a backslash <tt>\</tt> to match special characters <tt>()[]{}|*+.?!^$\</tt>.</li><li><tt>\b</tt> matches a word boundary.</li><li><tt>\w</tt> matches a word character.</li><li><tt>\d</tt> matches a digit character.</li><li><tt>\s</tt> matches a blank character.</li><li><tt>\n</tt> matches a newline character.</li><li><tt>[<i>a</i>-<i>b</i>]</tt> matches characters in range <tt><i>a</i></tt>-<tt><i>b</i></tt>.</li><li><tt>[^<i>a</i>-<i>b</i>]</tt> matches characters outside range <tt><i>a</i></tt>-<tt><i>b</i></tt>.</li><li><tt><i>a</i>|<i>b</i></tt> matches either regular expression <tt><i>a</i></tt> or regular expression <tt><i>b</i></tt>.</li><li><tt><i>a</i>{<i>n</i>,<i>m</i>}</tt> matches regular expression <tt><i>a</i></tt> repeated <tt><i>n</i></tt> to <tt><i>m</i></tt> times.</li><li><tt><i>a</i>?</tt>, <tt><i>a</i>*</tt>, and <tt><i>a</i>+</tt> are shorthands for <tt><i>a</i>{0,1}</tt>, <tt><i>a</i>{0,}</tt>, and <tt><i>a</i>{1,}</tt>.</li><li>Use parentheses <tt>()</tt> to group regular expressions before <tt>?+*{</tt>.</li></ul></html> <html><b>Rychlý úvod do regulárních výrazů</b><ul><li>TeÄka <tt>.</tt> odpovídá libovolnému znaku.</li><li>VÄ›tÅ¡ina znaků odpovídá sama sobÄ›.</li><li>VýbÄ›r zvláštních znaků <tt>()[]{}|*+.?!^$\</tt> je nutné uvést zpÄ›tným lomítkem <tt>\</tt>.</li><li><tt>\b</tt> odpovídá hranici slova.</li><li><tt>\w</tt> odpovídá znaku slova.</li><li><tt>\d</tt> odpovídá Äíslici.</li><li><tt>\s</tt> odpovídá bílému znaku.</li><li><tt>\n</tt> odpovídá znaku nový řádek.</li><li><tt>[<i>a</i>-<i>b</i>]</tt> odpovídá znakům z rozsahu <tt><i>a</i></tt>–<tt><i>b</i></tt>.</li><li><tt>[^<i>a</i>-<i>b</i>]</tt> odpovídá znakům mimo rozsah <tt><i>a</i></tt>–<tt><i>b</i></tt>.</li><li><tt><i>a</i>|<i>b</i></tt> odpovídá buÄ regulárnímu výrazu <tt><i>a</i></tt>, nebo regulárnímu výrazu <tt><i>b</i></tt>.</li><li><tt><i>a</i>{<i>n</i>,<i>m</i>}</tt> odpovídá regulárnímu výrazu <tt><i>a</i></tt> opakovanému <tt><i>n</i></tt> až <tt><i>m</i></tt>-krát.</li><li><tt><i>a</i>?</tt>, <tt><i>a</i>*</tt> a <tt><i>a</i>+</tt> jsou zkratky pro <tt><i>a</i>{0,1}</tt>, <tt><i>a</i>{0,}</tt> a <tt><i>a</i>{1,}</tt>.</li><li>Regulární výrazy pÅ™ed <tt>?+*{</tt> lze uzavřít do skupiny pomocí závorek <tt>()</tt>.</li></ul></html> QDjViewFind::Model 1 hit 1 shoda Searching page %1 (waiting for data.) Prohledávám stránku %1 (Äekám na data) Searching page %1. Prohledávám stránku %1. No hits! Nic nenalezeno! <html>Document is not searchable. No page contains information about its textual content.</html> <html>V dokument nelze hledat. Žádná stránka neobsahuje informace o svém textovém obsahu.</html> Page %1 (1 hit) Strana %1 (1 shoda) %n hits %n shoda %n shody %n shod Page %1 (%n hits) Strana %1 (%n shoda) Strana %1 (%n shody) Strana %1 (%n shod) <html>Invalid regular expression.</html> <html>Neplatný regulární výraz.</html> QDjViewImgExporter %1 Image JPG Image Obrázek %1 %1 Files (*.%2) JPG Files Soubory %1 (*.%2) Cannot render page. Stránku nelze vykreslit. Image format %1 not supported. Obrázkový formát %1 není podporován. QDjViewInfoDialog File # ÄŒ. souboru File Name Název souboru File Size Velikost souboru File Type Typ souboru Page # ÄŒ. strany Page Title Název strany <html><b>Document information</b><br>This panel shows information about the document and its component files. Select a component file to display detailled information in the <tt>File</tt> tab. Double click a component file to show the corresponding page in the main window. </html> <html><b>Informace o dokumentu</b><br/>Tento panel zobrazuje informace o dokumentu a jeho souborech, z kterých se skládá. Na záložce <tt>Soubor</tt> uvidíte informace o souboru vybraném v seznamu podílových souborů. Dvojklikem na podílový soubor zobrazíte odpovídající stránku v hlavním oknÄ›.</html> <html><b>File and page information</b><br>This panel shows the structure of the DjVu data corresponding to the component file or the page selected in the <tt>Document</tt> tab. The arrow buttons jump to the previous or next component file.</html> <html><b>Informace o souboru a stránce</b><br/>Tento panel zobrazuje strukturu DjVu dat odpovídajících podílovému souboru nebo stránce vybrané v záložce <tt>Dokument</tt>. TlaÄítka s šipkou skoÄí na pÅ™edchozí nebo na následující podílový soubor.</html> Waiting for data... ÄŒekám na data… Page #%1 - « %2 » Strana Ä. %1 – „%2“ Page #%1 Strana Ä. %1 Thumbnails Náhledy Shared annotations Sdílené poznámky Shared data Sdílená data File #%1 - Soubor Ä. %1 – Single DjVu page Jediná stránka DjVu Bundled DjVu document Svázaný dokument DjVu Indirect DjVu document Volný dokument DjVu Obsolete bundled DjVu document Zastaralý svázaný dokument DjVu Obsolete indexed DjVu document Zastaralý volný dokument DjVu n/a není známo Page Strana Thumbnails Náhledy Shared Sdílený Dialog Dialog &Document &Dokument &File &Soubor File: Soubor: &View Page &Zobrazit stránku &Close &Zavřít 1 file 1 soubor %n files %n soubor %n soubory %n souborů 1 page 1 strana %n pages %n strana %n strany %n stran QDjViewMetaDialog Ctrl+C copy Ctrl+C Key KlÃ­Ä Value Hodnota <html><b>Document metadata</b><br>This panel displays metadata pertaining to the document, such as author, title, references, etc. This information can be saved into the document with program <tt>djvused</tt>: use the commands <tt>create-shared-ant</tt> and <tt>set-meta</tt>.</html> <html><b>Metadata dokumentu</b><br/>Tento panel zobrazuje metadata pokrývající celý dokument, jako je autor, název, odkazy atd. Tyto informace mohou být uloženy do dokumentu pomocí programu <tt>djvused</tt>: použijte příkazy <tt>create-shared-ant</tt> a <tt>set-meta</tt>.</html> <html><b>Page metadata</b><br>This panel displays metadata pertaining to a specific page. Page specific metadata override document metadata. This information can be saved into the document with program <tt>djvused</tt>: use command <tt>select</tt> to select the page and command <tt>set-meta</tt> to specify the metadata entries.</html> <html><b>Metadata stránky</b><br/>Tento panel zobrazuje metadata vztahující se ke konkrétní stránce. Metadata stránky pÅ™ebíjejí metadata dokumentu. Tyto informace mohou být uloženy do dokumentu pomocí programu <tt>djvused</tt>: pro výbÄ›r stránky použijte příkaz <tt>select</tt> a pro zadání metadat příkaz <tt>set-meta</tt>.</html> Dialog Dialog &Document Metadata Metadata &dokumentu &Page Metadata Metadata &stran Page: Strana: &View Page Zo&brazit stránku &Close &Zavřít QDjViewOutline <html><b>Document outline.</b><br/> This panel display the document outline, or the page names when the outline is not available, Double-click any entry to jump to the selected page.</html> <html><b>Osnova dokumentu.</b><br/>Tento panel zobrazuje osnovu dokumentu jména stránek není-li osnova k dispozici. Dvojklikem na položku se dostanete vybranou stránku.</hml> Outline data is corrupted Osnova je poÅ¡kozena Pages Strany Page %1 Strana %1 Go: page %1. Go: page %1 PÅ™ejít na: stranu %1. Go: %1 Go: %1. PÅ™ejít na: %1 QDjViewPSExporter PostScript PostScript PostScript Files (*.ps *.eps) Postscriptový soubor (*.ps *.eps) Encapsulated PostScript ZapouzdÅ™ený PostScript PostScript tab caption PostScript Position tab caption UmístÄ›ní Booklet tab caption Brožura <html><b>PostScript options.</b><br>Option <tt>Color</tt> enables color printing. Document pages can be decorated with frame and crop marks. PostScript language level 1 is only useful with very old printers. Level 2 works with most printers. Level 3 print color document faster on recent printers.</html> <html><b>Nastavení PostScriptu.</b><br/>Volba <tt>BarevnÄ›</tt> umožňuje barevný tisk. Stránky dokumentu mohou být vybaveny orámováním a oÅ™ezovými znaÄkami. Úroveň jazyku 1 je užiteÄná jen s velmi starými tiskárnami. S úrovní 2 funguje vÄ›tÅ¡ina tiskáren. Úroveň 3 urychluje barevný tisk na novÄ›jších tiskárnách.</html> <html><b>Position and scaling.</b><br>Option <tt>Scale to fit</tt> accommodates whatever paper size your printer uses. Zoom factor <tt>100%</tt> reproduces the initial document size. Orientation <tt>Automatic</tt> chooses portrait or landscape on a page per page basis.</html> <html><b>UmístÄ›ní a zvÄ›tÅ¡ení.</b><br/>Volba <tt>Roztáhnout na celou stránku</tt> se pÅ™izpůsobí jakékoliv velikosti papíru, který vaÅ¡e tiskárna používá. Míra zvÄ›tÅ¡ení <tt>100 %</tt> reprodukuje dokument ve své původní velikosti. Orientace <tt>Automatická</tt> vybírá orientaci (na výšku nebo na šířku) každé stránky samostatnÄ›.</html> <html><b>Producing booklets.</b><br>The booklet mode prints the selected pages as sheets suitable for folding one or several booklets. Several booklets might be produced when a maximum number of sheets per booklet is specified. You can either use a duplex printer or print rectos and versos separately.<p> Shifting rectos and versos is useful with poorly aligned duplex printers. The center margins determine how much space is left between the pages to fold the sheets. This space slowly increases from the inner sheet to the outer sheet.</html> <html><b>Výroba brožur.</b><br/>Režim brožura tiskne vybrané stránky tak, aby potiÅ¡tÄ›né listy bylo snadno možné uspořádat do jedné nebo více brožur. VÄ›tší množství brožur bude vyrobeno, bude-li pÅ™ekroÄen nastavený limit poÄtu listů na brožuru. Tisknout lze oboustrannÄ› nebo liché a sudé stránky zvlášť.<p>Posunutí lichých a sudých stran je potÅ™eba, neumí-li tiskárna pÅ™i oboustranném tisku dodržet slícování pÅ™edního a zadního potisku listu. StÅ™edové okraje urÄují rozestup mezi levou a pravou stránkou na listu. Tento rozestup se postupnÄ› zvÄ›tÅ¡uje smÄ›rem od vnitÅ™ních ke vnÄ›jším listům brožury.</html> Save job creation failed! VytvoÅ™ení ukládací úlohy selhalo! QDjViewPdfExporter PDF Document Dokument PDF PDF Files (*.pdf) Soubory PDF  (*.pdf) PDF Options tab caption Nastavení PDF <html><b>PDF options.</b><br>These options control the characteristics of the images embedded in the exported PDF files. The resolution box limits their maximal resolution. Forcing bitonal G4 compression encodes all pages in black and white using the CCITT Group 4 compression. Allowing JPEG compression uses lossy JPEG for all non bitonal or subsampled images. Otherwise, allowing deflate compression produces more compact files. </html> <html><b>Nastavení PDF<b><br/>Tímto nastavením se řídí vlastnosti obrázků vkládaných do exportovaného PDF  souboru. RozliÅ¡ení omezuje nejvyšší rozliÅ¡ení obrázků. Vynucení dvoubarvové G4 komprese zakóduje vÅ¡echny stránky do Äerné a bílé barvy pomocí komprese CCITT  Group 4. Povolením JPEG komprese způsobíte použití ztrátového formátu JPEG pro vÅ¡echny obrázky vyjma dvoubarvových a podvzorkovaných. V opaÄném případÄ› zapnutí deflate komprese způsobí vytvoÅ™ení menších souborů.</html> Error while creating pdf file. Chyba pÅ™i vytvářené PDF  souboru. PDF export was not compiled. Export do PDF nebyl zakompilován. Unable to create output file. Výstupní soubor nelze vytvoÅ™it. System error: %1. Systémová chyba: %1. Unable to reopen temporary file. Pomocný soubor nelze znovu otevřít. Unable to create temporary file. Pomocný soubor nelze vytvoÅ™it. QDjViewPlugin::Document Requesting %1. Požaduji %1. QDjViewPrefsDialog Preferences[*] - DjView Nastavení[*] – DjView <html><b>Initial interface setup.</b><br>DjView can run as a standalone viewer, as a full screen viewer, as a full page browser plugin, or as a plugin embedded inside a html page. For each case, check the <tt>Remember</tt> box to automatically save and restore the interface setup. Otherwise, specify an initial configuration.</html> <html><b>Prvotní nastavení rozhraní.</b><br>DjView může běžet jako samostatný prohlížeÄ, jako prohlížeÄ pÅ™es celou obrazovku, jako celostránkový zásuvný modul do webového prohlížeÄe nebo jako zásuvný modul uvnitÅ™ Äásti HTML stránky. Pro každý případ lze zatrhnout pÅ™epínaÄ <tt>Zapamatovat si</tt>, který způsobí automatické uložení konfigurace pÅ™i ukonÄení a naÄtení pÅ™i dalším spuÅ¡tÄ›ní v daném režimu. Jinak lze konfiguraci po novém spuÅ¡tÄ›ní navolit níže.</html> <html><b>Modifiers keys.</b><br>Define which combination of modifier keys will show the manifying lens, temporarily enable the selection mode, or highlight the hyperlinks.</html> <html><b>ModifikaÄní klávesy.</b><br>UrÄuje, které kombinace modifikátorů způsobí zobrazení lupy, doÄasný režim výbÄ›ru nebo zvýraznÄ›ní odkazů.</html> <html><b>Magnifying lens.</b><br>The magnifying lens appears when you depress the modifier keys specified in tab <tt>Keys</tt>. This panel lets you choose the power and the size of the magnifying lens.</html> <html><b>Lupa</b><br/>Lupa se objeví, stisknete-li modifikátor urÄený v záložce <tt>Klávesy</tt>. Tento panel nabízí výbÄ›r zvÄ›tÅ¡ení a rozmÄ›rů lupy.</html> <html><b>Advanced.</b><br>You can override the default interface language, disable the page animations, or enable additional menu entries that are useful for authoring DjVu files.You can also disable the printing or saving restrictions dictated by certain web sites. The manual color correction can be useful with old printers.</html> <html><b>PokroÄilé.</b><br>Můžete vnutit výchozí jazyk uživatelského rozhraní, vypnout animace stránky nebo zapnout dodateÄné položky v nabídkách, které se hodí pÅ™i vytváření souborů DjVu. Rovněž můžete vypnout omezení na tisk nebo ukládání vyžadované nÄ›kterými webovými stránkami. RuÄní oprava barev může být užiteÄná u starých tiskáren.</html> <html><b>Network proxy settings.</b><br>These proxy settings are used when the standalone djview viewer accesses a djvu document through a http url. The djview plugin always uses the proxy settings of the web browser.<p><b>Cache settings.</b><br>The <i>pixel cache</i> stores image data located outside the visible area. This cache makes panning smoother. The <i>decoded page cache</i> contains partially decoded pages. It provides faster response times when navigating a multipage document or when returning to a previously viewed page. Clearing this cache might be useful to reflect a change in the page data without restarting the DjVu viewer.</html> <html><b>Nastavení síťové proxy.</b><br>Tato nastavení mají vliv, pokud samostatný prohlížeÄ djview pÅ™istupuje k DjVu dokumentu skrze HTTP URL. Zásuvný modul vždy používá nastavení proxy z webového prohlížeÄe.<p><b>Vyrovnávací pamÄ›ti</b><br><i>Pixelová keÅ¡</i> uchovává obrazová data, která se nachází mimo viditelnou oblast. Tato keÅ¡ umožňuje plynulý pohyb po stránce. <i>KeÅ¡ pro dekódované stránky</i> uchovává ÄásteÄnÄ› dekódované stránky. Umožňuje kratší reakÄní dobu pÅ™i listování mezi stránkami nebo pÅ™i návratu na dříve vidÄ›nou stránku. PotÅ™ebujete-li pÅ™ekreslit zmÄ›nÄ›né stránky, můžete místo nového spouÅ¡tÄ›ní DjVu prohlížeÄe vyprázdnit tuto keÅ¡.</html> Dialog Dialog Gamma Gama Darker Tmavší Lighter SvÄ›tlejší <html>Screen color correction.<br>Adjust slider until gray shades look similar.</html> <html>Oprava barev na obrazovce.<br>Pohybujte jezdcem tak dlouho, dokud pole nebudou podobnÄ› Å¡edá.</html> &Interface &Rozhraní Options for Nastavení pro Standalone Viewer Samostatný prohlížeÄ Full Screen Standalone Viewer Samostatný prohlížeÄ v celoobrazovkovém režimu Full Page Plugin Zásuvný modul pÅ™es celou stránku Embedded Plugin VestavÄ›ný zásuvný modul &Remember initial state from last invocation &Zapamatovat si stav z posledního spuÅ¡tÄ›ní Show Zobrazovat &Menu bar &Nabídkový pruh &Tool bar &LiÅ¡tu nástrojů Sc&rollbars &Rolovací jezdce Stat&us bar &Stavový řádek &Side bar &Postranní panel Display Vykreslovat Force inverted luminance Force inverted luminance. Vnutit pÅ™evrácení jasu &Zoom: Z&vÄ›tÅ¡ení: Display page &frames Zobrazovat o&rámování stránek Display &annotations Zobrazovat &poznámky &Keys &Klávesy Keys Klávesy For displaying hyper&links: Pro zobrazení &odkazů: For &selecting text or images: Pro &výbÄ›r textu nebo obrázku: For displaying the &lens: Pro zobrazení &lupy: Mouse wheel KoleÄko myÅ¡i Mouse wheel scrolls the page Mouse wheel scrolls the page. KoleÄko myÅ¡i posunuje stránkou Mouse wheel changes the zoom factor Mouse wheel changes the zoom factor. KoleÄko myÅ¡i mÄ›ní míru zvÄ›tÅ¡ení &Lens &Lupa Enable magnifying &lens Povolit zvÄ›tÅ¡ování &lupou Lens options Nastavení lupy Lens &size: &Velikost lupy: Magnifying &power: &ZvÄ›tÅ¡ení: x × pixels pixelů Cache Vyrovnávací paměť &Clear &Vyprázdnit &Decoded page cache: KeÅ¡ pro &dekódované stránky: &Pixel cache: &Pixelová keÅ¡: &Network &Síť Use pro&xy to access the network Na síť pÅ™istupovat pÅ™es pro&xy Proxy settings Nastavení proxy Pass&word: &Heslo:  &User: &Uživatel: &Port: &Port: &Host: &Jméno poÄítaÄe: Interface Rozhraní Force language (next time djview runs) Vnutit jazyk (od příštího spuÅ¡tÄ›ní djview) Enable page animations Enable animations Zapnout animace stránky Show hidden text in status bar Zobrazit skrytý text ve stavovém řádku Override saving and printing restrictions PÅ™ebít omezení na ukládání a tisk &Defaults &Výchozí &Apply &Aplikovat &Ok &Ok Cancel ZruÅ¡it <html><b>Screen gamma correction.</b><br>The best color rendition is achieved by adjusting the gamma correction slider and choosing the position that makes the gray square as uniform as possible.<p><b>Screen resolution.</b><br>This option forces a particular resolution instead of using the unreliable resolution advertised by the operating system. Forcing the resolution to 100 dpi matches the behavior of the djvulibre command line tools.</html> <html><b>Gama oprava obrazovky</b><br>Nejlepšího podání barev se dosáhne posunutím jezdce opravy gamy do pozice, kdy si jsou Å¡edivé Ätverce co nejpodobnÄ›jší.<p><b>RozliÅ¡ení obrazovky</b><br>Tato volba vnutí dané rozliÅ¡ení místo nespolehlivé hodnoty, kterou hlásí operaÄní systém. Nastavení rozliÅ¡ení na 100 DPI je shodné s hodnotami, které používají nástroje pro příkazovou řádku z balíku djvulibre.</html> &Screen &Obrazovka Force screen &resolution Vnutit &rozliÅ¡ení obrazovky dpi  DPI &Advanced &PokroÄilé Miscellaneous Různé Manual printer color correction RuÄní oprava barev tiskárny gamma= gama =  Enable advanced features in menus Zapnout pokroÄilé možnosti v nabídkách MB MB Layout Rozvržení Continuous Navazující stránky Side-by-side Po dvou stránkách Cover Page PÅ™ebal Right-to-Left Zprava doleva QDjViewPrintDialog <html><b>Printing.</b><br/> You can print the whole document or a page range. Use the <tt>Choose</tt> button to select a print destination and specify printer options. Additional dialog tabs might appear to specify conversion options.</html> <html><b>Tisk.</b><br/>Tisknout můžete celý dokument nebo rozsah stran. Tiskárnu a její nastavení vyberete tlaÄítkem <tt>Vybrat</tt>. Mohou se objevit další záložku s dialogy pro nastavení konverze.</html> All files save filter VÅ¡echny soubory Print To File - DjView dialog caption Tisk do souboru – DjView Question - DjView dialog caption Dotaz – DjView A file with this name already exists. Do you want to replace it? Soubor tohoto jména již existuje. Chcete jej nahradit? &Replace &Nahradit &Cancel &ZruÅ¡it This operation has failed. Tato operace selhala. This operation has been interrupted. Tato operace byla pÅ™eruÅ¡ena. Dialog Dialog Print Tisknout &Document &Dokument C&urrent page &Aktuální stránku &Pages &Stránky to až Destination Cíl Print to file Tisknout do souboru Printer name: Jméno tiskárny: Choose Vybrat &Defaults &Výchozí &Ok &Ok Stop Zastavit (invalid printer) (neplatná tiskárna) QDjViewPrnExporter Printer data Tisková data PRN Files (*.prn) Soubory PRN (*.prn) Printing Options tab caption Nastavení tisku <html><b>Printing options.</b><br>Option <tt>Color</tt> enables color printing. Document pages can be decorated with a frame. Option <tt>Scale to fit</tt> accommodates whatever paper size your printer uses. Zoom factor <tt>100%</tt> reproduces the initial document size. Orientation <tt>Automatic</tt> chooses portrait or landscape on a page per page basis.</html> <html><b>Nastavení tisku.</b><br>Volba <tt>BarevnÄ›</tt> umožňuje barevný tisk. Stránky dokumentu mohou být vybaveny orámováním. <tt>Roztáhnout na celou stránku</tt> se pÅ™izpůsobí jakékoliv velikosti papíru, který vaÅ¡e tiskárna používá. Míra zvÄ›tÅ¡ení <tt>100 %</tt> reprodukuje dokument ve své původní velikosti. Orientace <tt>Automatická</tt> vybírá orientaci (na výšku nebo na šířku) každé stránky samostatnÄ›.</html> Cannot render page %1. Stránku %1 nelze vykreslit. QDjViewSaveDialog <html><b>Saving.</b><br/> You can save the whole document or a page range. The bundled format creates a single file. The indirect format creates multiple files suitable for web serving.</html> <html><b>Uložení.</b><br/> Svázaný formát vytvoří jediný soubor. Volný formát vytvoří Å™adu souborů vhodných pro webové prostÅ™edí.</html> Error - DjView dialog caption Chyba – DjView Overwriting the current file is not allowed! PÅ™epsání aktuálního souboru není dovoleno! Question - DjView dialog caption Dotaz – DjView A file with this name already exists. Do you want to replace it? Soubor tohoto jména již existuje.Chcete jej nahradit? &Replace &Nahradit &Cancel &ZruÅ¡it This operation has failed. Tato operace selhala. This operation has been interrupted. Tato operace byla pÅ™eruÅ¡ena. All files save filter VÅ¡echny soubory Save - DjView dialog caption Uložení – DjView Dialog Dialog Save Uložit &Document &Dokument C&urrent page &Aktuální stránku &Pages S&tránky to až Destination Cíl Format: Formát: Bundled DjVu Document Svázaný dokument DjVu Indirect DjVu Document Volný dokument DjVu &Ok &Ok Stop Zastavit QDjViewThumbnails Tiny thumbnail menu Drobné Small thumbnail menu Malé Medium thumbnail menu StÅ™ední Large thumbnail menu Velké Smart thumbnail menu Chytré Control Left Mouse Button Right Mouse Button <html><b>Document thumbnails.</b><br/> This panel display thumbnails for the document pages. Double click a thumbnail to jump to the selected page. %1 to change the thumbnail size or the refresh mode. The smart refresh mode only computes thumbnails when the page data is present (displayed or cached.)</html> <html><b>Náhledy dokumentu.</b><br/> Tento panel zobrazuje náhledy na stránky dokumentu. Dvojklikem na náhled pÅ™ejdete na vybranou stránku. %1 použijte pro zmÄ›nu velikosti nebo způsobu obnovování. Chytrý režim obnovy vypoÄítává náhledy jen tÄ›ch stran, jejichž data jsou známa (zobrazena nebo nakeÅ¡ována).</html> QDjViewTiffExporter TIFF Document Dokument TIFF TIFF Files (*.tiff *.tif) Soubory TIFF (*.tiff *.tif) TIFF Options tab caption Nastavení TIFFU <html><b>TIFF options.</b><br>The resolution box specifies an upper limit for the resolution of the TIFF images. Forcing bitonal G4 compression encodes all pages in black and white using the CCITT Group 4 compression. Allowing JPEG compression uses lossy JPEG for all non bitonal or subsampled images. Otherwise, allowing deflate compression produces more compact (but less portable) files than the default packbits compression.</html> <html><b>Nastavení TIFFU</b><br/>RozliÅ¡ení urÄuje horní limit pro rozliÅ¡ení TIFF obrázků. Vynucení dvoubarvové G4 komprese zakóduje vÅ¡echny stránky do Äerné a bílé barvy pomocí komprese CCITT  Group 4. Povolením JPEG komprese způsobíte použití ztrátového formátu JPEG pro vÅ¡echny obrázky vyjma dvoubarvových a podvzorkovaných. V opaÄném případÄ› zapnutí deflate komprese způsobí vytvoÅ™ení menších (ale ménÄ› pÅ™enositelných) souborů na rozdíl od výchozí komprese packbits.</html> Cannot open output file. Výstupní soubor nelze otevřít. Out of memory. Nedostatek pamÄ›ti. Internal error. VnitÅ™ní chyba. TIFF export has not been compiled. Export do TIFFU nebyl zakompilován. QDjVuNetDocument Requesting '%1' Požaduji „%1“ QDjVuNetDocument::Private Received http status %1 while retrieving %2. %1 is an http status code Na požadavek %2 byl obdržen stats %1. Received <%1> data while retrieving %2. %1 is a mime type Na požadavek %2 byla obdržena data typu %1. %1 while retrieving '%2'. Na požadavek %2 obdrženo %1. Cannot validate the certificate for server %1. Nelze ověřit certifikát serveru %1. Authentication required for %1 (%2). %1 (%2) vyžaduje ověření totožnosti. Authentication required for proxy %1. Proxy %1 vyžaduje ověření totožnosti. djview4/src/djview_de.ts000066400000000000000000004601551174072760700155570ustar00rootroot00000000000000 Generic thisLanguage Name of THIS language Deutsch QApplication Option '-fix' is deprecated. Option '-fix' ist veraltet. QDjView FitWidth zoomCombo An Seitenbreite anpassen FitPage zoomCombo An Seite anpassen Stretch zoomCombo Ausdehnen 1:1 zoomCombo 300% zoomCombo 200% zoomCombo 150% zoomCombo 100% zoomCombo 75% zoomCombo 50% zoomCombo Color modeCombo Farbe Stencil modeCombo Schablone Foreground modeCombo Vordergrund Background modeCombo Hintergrund &New File| &Neu Ctrl+N File|New Create a new DjView window. Erzeugt ein neues DjView Fenster. &Open File| Ö&ffnen Ctrl+O File|Open Open a DjVu document. Öffnet ein DjVu-Dokument. Open &Location... File| &Adresse öffnen... Open a remote DjVu document. Öffnet ein entferntes DjVu Dokument an Adresse. &Close File| &Schließen Ctrl+W File|Close Close this window. Schliesst dieses Fenster. &Quit File| &Beenden Ctrl+Q File|Quit Close all windows and quit the application. Schliesst alle Fenster und beendet die Anwendung. Save &as... File| Speichern &unter... Ctrl+S File|SaveAs Save the DjVu document. Speichert das DjVu Dokument. &Export as... File| &Exportieren als ... Ctrl+E File|ExportAs Export DjVu page or document to other formats. Exportiert DjVu-Seite oder Dokument in andere Formate. &Print... File| &Drucken... Ctrl+P File|Print Print the DjVu document. Druckt das DjVu-Dokument. &Find... Edit| &Suchen... Ctrl+F Edit|Find Find text in the document. Sucht Text in dem Dokument. Find &Next Edit| &Weitersuchen Ctrl+F3 Edit|Find Next F3 Edit|Find Next Find next occurence of search text in the document. Zeigt die nächste Fundstelle des Suchtextes im Dokument. Find &Previous Edit| &Rückwärtssuchen Shift+F3 Edit|Find Previous Find previous occurence of search text in the document. Zeigt die vorherige Fundstelle des Suchtextes im Dokument. &Select Edit| &Auswählen Ctrl+F2 Edit|Select F2 Edit|Select Select a rectangle in the document. Selektiert einen rechteckigen Bereich im Dokument. Zoom &In Zoom| h&ineinzoomen Increase the magnification. Erhöht die Vergrößerung. Zoom &Out Zoom| h&erauszoomen Decrease the magnification. Reduziert die Vergrößerung. Fit &Width Zoom| An Seiten&breite anpassen Set magnification to fit page width. Passt die Vergrößerung an die Seitenbreite an. Fit &Page Zoom| An &Seite anpassen Set magnification to fit page. Passt die Vergrößerung an die Seite an. One &to one Zoom| Eins zu ei&ns Set full resolution magnification. Stellt die maximale Vergrösserung ein. &300% Zoom| Magnify 300% 300%ige Vergrösserung &200% Zoom| Magnify 20% 20%ige Vergrösserung 150% Zoom| Magnify 150% 150%ige Vergrösserung &100% Zoom| Magnify 100% 100%ige Vergrösserung &75% Zoom| Magnify 75% 75%ige Vergrösserung &50% Zoom| Magnify 50% 50%ige Vergrösserung &First Page Go| &Erste Seite Jump to first document page. Springt zur erste Seite im Dokument. &Next Page Go| &Nächste Seite Jump to next document page. Springt zur nächsten Seite im Dokument. &Previous Page Go| V&orherige Seite Jump to previous document page. Springt zur vorherigen Seite im Dokument. &Last Page Go| &Letzte Seite Jump to last document page. Springt zur letzten Seite im Dokument. &Backward Go| &Zurück Backward in history. Zurück in der Historie. &Forward Go| &Vorwärts Forward in history. Vorwärts in der Historie. Rotate &Left Rotate| Drehe nach &links Rotate page image counter-clockwise. Dreht die Abbildung der Seiten gegen den Uhrzeigersinn . Rotate &Right Rotate| Drehe nach &rechts Rotate page image clockwise. Dreht die Abbildung der Seiten im Uhrzeigersinn . Rotate &0° Rotate| Drehe um &0° Set natural page orientation. Keine Drehung. Rotate &90° Rotate| Drehe um &90° Turn page on its left side. Dreht die Abbildung der Seiten auf ihre linke Kante. Rotate &180° Rotate| Drehe um &180° Turn page upside-down. Dreht die Abbildung der Seiten auf die obere Kante. Rotate &270° Rotate| Drehe um &270° Turn page on its right side. Dreht die Abbildung der Seiten auf ihre rechte Kante. &Information... Edit| &Information... Ctrl+I Edit|Information Show information about the document encoding and structure. Zeigt Informationen über die Struktur und die Kodierung des Dokumentes. &Metadata... Edit| &Metadaten... Ctrl+M Edit|Metadata Show the document and page meta data. Zeigt die Metadaten des Dokumentes und der Seite. &About DjView... &Über DjView... Show information about this program. Zeigt Informationen zu diesem Programm an. &Color Display| &Farbe Display everything. Zeige alles. &Stencil Display| &Schablone Only display the document bitonal stencil. Stellt nur die bitonale Schablone/Maske des Dokumentes dar. &Foreground Display| &Vordergrund Only display the foreground layer. Stellt nur die Vordergrundebene des Dokumentes dar. &Background Display| &Hintergrund Only display the background layer. Stellt nur die Hintergrundebene des Dokumentes dar. I&nvert Luminance View| Helligkeit i&nvertieren Invert image luminance while preserving hue. Invertiert die Bildhelligkeit unter Erhaltung der Farbnuancierung . Prefere&nces... Settings| Vorliebe&n... Show the preferences dialog. Zeigt den Dialog mit den Benutzereinstellungen an. Show &Sidebar Settings| Zeige &Seitenleiste Ctrl+F9 Settings|Show sidebar F9 Settings|Show sidebar Show/hide the side bar. Zeige/Verstecke die Seitenleiste. Show &Toolbar Settings| Zeige &Werkzeugleiste Ctrl+F10 Settings|Show toolbar F10 Settings|Show toolbar Show/hide the standard tool bar. Zeige/Verstecke die Werkzeugleiste. Show Stat&usbar Settings| Zeige Stat&usleiste Show/hide the status bar. Zeige/Verstecke die Statusleiste. F&ull Screen View| V&ollbild Ctrl+F11 View|FullScreen F11 View|FullScreen Toggle full screen mode. Schaltet zwischen Vollbild- und Fensterdarstellung um. &Continuous Layout| &Kontinuierlich Ctrl+F4 Layout|Continuous F4 Layout|Continuous Toggle continuous layout mode. Schaltet zwischen kontinuierlicher und normaler Darstellung um. Side &by Side Layout| Zwei &Seiten nebeneinander Ctrl+F5 Layout|SideBySide F5 Layout|SideBySide Toggle side-by-side layout mode. Schaltet zwischen ein- und zweiseitiger Darstellung um. &File File| &Datei Open &Recent &Zuletzt benutzte Dokumente &Edit Edit| &Bearbeiten &View View| &Ansicht &Zoom View|Zoom &Maßstab &Rotate View|Rotate D&rehen &Display View|Display &Go Go| &Gehe zu &Settings Settings| &Einstellungen &Help Help| &Hilfe Control Left Mouse Button Steuerung linke Maustaste Right Mouse Button Rechte Maustaste <html><b>Selecting a rectangle.</b><br/> Once a rectangular area is selected, a popup menu lets you copy the corresponding text or image. Instead of using this tool, you can also hold %1 and use the Left Mouse Button.</html> <html><b>Selektiert einen rechteckigen Bereich.</b><br/>Sobald eine rechteckige Fläche ausgewählt wurde, ermöglicht ein Popup-Menü das Kopieren des entsprechenden Textes oder Bildes. Die Funktionalität dieses Werkzeuges ist auch direkt über die Tastenkombination %1 und die Benutzung der linken Maustaste möglich.</html> <html><b>Zooming.</b><br/> Choose a zoom level for viewing the document. Zoom level 100% displays the document for a 100 dpi screen. Zoom levels <tt>Fit Page</tt> and <tt>Fit Width</tt> ensure that the full page or the page width fit in the window. </html> <html><b>Maßstab.</b><br/> Zur Auswahl der Vergrößerung der Darstellung des Dokumentes. Zoomstufe 100% stellt das Dokument auf 100 dpi optimal dar. Zoomstufe <tt>An Seitenbreite anpassen</tt> und <tt>An Seitenhöhe anpassen</tt> stellt sicher, daß die Breite bzw. die Höhe mit dem Fenster übereinstimmt. </html> <html><b>Rotating the pages.</b><br/> Choose to display pages in portrait or landscape mode. You can also turn them upside down.</html> <html><b>Drehen der Seiten.</b><br/> Bietet die Möglichkeit das Dokument in Hoch- oder Querformat darzustellen. Man kann es auch auf den Kopf stellen.</html> <html><b>Display mode.</b><br/> DjVu images compose a background layer and a foreground layer using a stencil. The display mode specifies with layers should be displayed.</html> <html><b>Display-Modus.</b><br/> DjVu Bilder bestehen aus einer Hintergrund- und einer Vordergrundebene, die über eine Maske kombiniert werden. Der Display-Modus definiert, welche Ebenen dargestellt werden sollen.</html> <html><b>Document and page information.</b><br> Display a dialog window for viewing encoding information pertaining to the document or to a specific page.</html> <html><b>Dokument- und Seiteninformationen</b><br> Zeigt Informationen über die Struktur und die Kodierung des Dokumentes oder einer Seite.</html> <html><b>Document and page metadata.</b><br> Display a dialog window for viewing metadata pertaining to the document or to a specific page.</html> <html><b>Dokument- und Seitenmetadaten.</b><br> Zeigt einen Dialog zur Darstellung der jeweiligen Metadaten des Dokumentes bzw. der Seite.</html> <html><b>Continuous layout.</b><br/> Display all the document pages arranged vertically inside the scrollable document viewing area.</html> <html><b>Kontinuierliche Darstellung.</b><br/> Zeigt alle Seiten in einem kontinuierlichem, scrollbaren Fenster an.</html> <html><b>Side by side layout.</b><br/> Display pairs of pages side by side inside the scrollable document viewing area.</html> <html><b>Zwei Seiten nebeneinander.</b><br/> Stellt zwei Seiten nebeneinander dar.</html> <html><b>Page information.</b><br/> Display information about the page located under the cursor: the sequential page number, the page size in pixels, and the page resolution in dots per inch. </html> <html><b>Seiten Information.</b><br/> Zeigt Informationen über die aktive Seite an: die fortlaufenden Seitennummern, die Seitengröße in Punkten und die Auflösung in Punkte pro Inch. </html> <html><b>Cursor information.</b><br/> Display the position of the mouse cursor expressed in page coordinates. </html> <html><b>Mauszeiger Information.</b><br/> Zeigt die Position der Maus auf das Koordinatensystem der Seite bezogen an.</html> <html><b>Document viewing area.</b><br/> This is the main display area for the DjVu document. <ul><li>Arrows and page keys to navigate the document.</li><li>Space and BackSpace to read the document.</li><li>Keys <tt>+</tt> <tt>-</tt> <tt>[</tt> <tt>]</tt> to zoom or rotate the document.</li><li>Left Mouse Button for panning and selecting links.</li><li>%3 for displaying the contextual menu.</li><li>%1 Left Mouse Button for selecting text or images.</li><li>%2 for popping the magnification lens.</li></ul></html> <html><b>Dokumentanzeigegebiet.</b><br/> Dies ist der Hauptdisplaybereich für DjVu-Dokumente. <ul><li>Pfeile und Bild(hoch/runter)tasten um im Dokument zu navigieren.</li><li>Leerzeichen und Rücktaste(BackSpace) um bequem im Dokument zum Lesen.</li><li>Taste <tt>+</tt> <tt>-</tt> <tt>[</tt> <tt>]</tt> zum Zoomen bzw. drehen.</li><li>Linke Maustate zum ziehen der Ebene und zum selektieren von Links.</li><li>%3 zur Anzeige des Kontextmenüs.</li><li>%1 Linke Maustaste zum Selektieren von Text oder Bildern.</li><li>%2 aktiviert das Vergrößerungsglas.</li></ul></html> <html><b>Document viewing area.</b><br/> This is the main display area for the DjVu document. But you must first open a DjVu document to see anything.</html> <html><b>Dokumentanzeigegebiet.</b><br/> Dies ist der Hauptdisplaybereich für DjVu-Dokumente. Jedoch muß zuerst noch ein DjVu-Dokument geöffnet werden, um irgendetwas damit anfangen zu können.</html> Option '%1' requires boolean argument. Option '%1' verlangt nach einem boolschen Argument. Illegal value '%2' for option '%1'. Ungültiger Wert '%2' für Option '%1'. Toolbar option '%1' is not implemented. Werkzeugoption '%1' ist nicht implementiert. Toolbar option '%1' is not recognized. Werkzeugoption '%1' ist nicht bekannt. Option '%1' requires a standalone viewer. Option '%1' verlangt ein eigenständiges Anzeigeprogramm. Deprecated option '%1' Abgelehnte Option '%1' Option '%1' is not implemented. Option '%1' ist nicht implementiert. Option '%1' is not recognized. Option '%1' ist nicht bekannt. DjView Cannot open file '%1'. Kann Datei '%1' nicht öffnen. Opening DjVu file Öffne DjVu-Datei Cannot open URL '%1'. Kann die Adresse '%1' nicht öffnen. Opening DjVu document Öffne DjVu-Dokument Certificate validation error - DjView dialog caption Fehler beim Überprüfen des Zertifikates - DjView <html> %1 Do you want to continue anyway? </html> <html> %1 Sind Sie sich des Risikos bewußt und wollen dennoch fortfahren? </html> Cannot find page numbered: %1 Seite mit Seitennummer %1 nicht gefunden Cannot find page named: %1 Seite mit dem Namen '%1' nicht gefunden Unrecognized sidebar options '%1'. Option '%1' nicht bekannt. <html> This file was served with printing restrictions. Do you want to print it anyway?</html> <html> This file was served with printing restrictions.Do you want to print it anyway?</html> <html> Diese Datei enthält Einschränkungen beim Drucken. Wollen Sie dennoch drucken?</html> <html> This file was served with saving restrictions. Do you want to save it anyway?</html> <html> This file was served with saving restrictions.Do you want to save it anyway?</html> <html> Diese Datei enthält Einschränkungen beim Speichern. Wollen Sie dennoch speichern?</html> Print - DjView dialog caption Drucke - DjView Save - DjView dialog caption Speichern - DjView Export - DjView dialog caption Export - DjView Text files save filter Textdateien All files save filter alle Dateien Save Text - DjView dialog caption Speichere Text - DjView Error - DjView dialog caption Fehler - DjView Cannot write file '%1'. %2. Kann Datei '%1' nicht schreiben: %2. %1 files (*.%2);; save image filter %1 Dateien (*.%2);; Save Image - DjView dialog caption Speichere Bild - DjView Cannot determine file format. Filename '%1' has no suffix. Kann das Dateiformat nicht feststellen. Dateiname '%1' hat keine Endung. Image format %1 not supported. Bildformat %1 nicht unterstützt. Cannot decode page %1. Kann Seite %1 nicht dekodieren. Cannot decode document. Kann Dokument nicht dekodieren. Decoding DjVu document Dekodiere DjVu-Dokument x=%1 y=%2 x=%1 y=%2 %3x%4+%1+%2 %3x%4+%1+%2 Go: %n pages forward. Gehe %n Seite vorwärts. Gehe %n Seite vorwärts. Go: %n pages backward. Gehe %n Seite zurück. Gehe %n Seite zurück. Go: page %1. Gehe zu Seite %1. Go: %1 Link: %1 Gehe zu %1 (in other window.) (im anderen Fenster.) Cannot resolve link '%1' Kann den Link '%1' nicht auflösen Cannot spawn a browser for url '%1' Kann keinen Browser für Adresse '%1' starten Copy text (%1) Kopiere Text (%1) Save text as... Speichere Text als... Copy image (%1x%2 pixels) Kopiere Bild (%1x%2 Pixel) Save image as... Speichere Bild als... Zoom to rectangle Zoom das Recheck About DjView Über DjView Open - DjView dialog caption Öffne - DjView DjVu files DjVu Dateien Open Location - DjView dialog caption Öffne Adresse - DjView Enter the URL of a DjVu document: Adresse des DjVu-Dokumentes eingeben: Information - DjView dialog caption Metadata - DjView dialog caption Metadaten - DjView &Clear History &Historie löschen cannot open '%1'. kann '%1' nicht öffnen. %n characters %n Zeichen %n Zeichen Go: 1 page forward. Gehe 1 Seite vorwärts. Go: 1 page backward. Gehe 1 Seite zurück. Copy &URL Edit| Kopiere A&dresse Save an URL for the current page into the clipboard. Lege eine Adresse der aktuellen Seite in die Zwischenablage. Copy &Outline Edit| Kopiere &Inhalt Copy &Annotations Edit| Kopiere An&merkungen <html><b>Navigating the document.</b><br/> The page selector lets you jump to any page by name and can be activated at any time by pressing Ctrl+G. The navigation buttons jump to the first page, the previous page, the next page, or the last page. </html> <html><b>Im Dokument navigieren.</b><br/> Mit Hilfe der Seitenauswahl kann man zu jeder Seite des Dokumentes springen. Das Drücken der Navigationsknöpfe springt zur ersten, vorheriegen, nächsten oder letzten Seite. </html> Thumbnails Vorschaubilder Outline Inhalt Find Suchen P%1/%2 %3x%4 %5dpi P%1/%2 %3x%4 %5dpi Copy text into the clipboard. Kopiere Text in die Zwischenablage. Save text into a file. Speichere Text in eine Datei. Save image into a file. Speichere Bild in eine Datei. Zoom the selection to fit the window. Passt die Größe des Fensters an. Copy URL Kopiere Adresse Save into the clipboard an URL that highlights the selection. Lege eine Adresse der aktuellen Selektion in die Zwischenablage. Copy Maparea Kopiere Maparea Save into the clipboard a maparea annotation expression for program djvused. Lege eine 'maparea' Anmerkung für djvused in die Zwischenablage. Ctrl+C Edit|CopyURL Strg+C Save the djvused code for the outline into the clipboard. Lege die Outline als Skript für djvused in der Zwischenablage. Save the djvused code for the page annotations into the clipboard. Lege die Anmerkungen einer Seite als Skript für djvused in der Zwischenablage. Copy image into the clipboard. Kopiere Bild in die Zwischenablage. Co&ver Page Layout| Erste S&eite einzeln Ctrl+F6 Layout|CoverPage Strg+F6 F6 Layout|CoverPage Show the cover page alone in side-by-side mode. Zeigt die erste Seite einzeln wenn 'zwei Seiten nebeneinander' ausgewählt ist. &Right to Left Layout| Rechts nach &Links Ctrl+Shift+F6 Layout|RightToLeft Strg+Shift+F6 Shift+F6 Layout|RightToLeft Show pages right-to-left in side-by-side mode. Zeigt die Seiten von links nach rechts in zweiseitiger Darstellung. <html><h2>DjVuLibre DjView %1</h2>%2<p>Viewer for DjVu documents<br><a href=%3>%3</a><br>Copyright © 2006-- Léon Bottou.</p><p align=justify><small>This program is free software. You can redistribute or modify it under the terms of the GNU General Public License as published by the Free Software Foundation. This program is distributed <i>without any warranty</i>. See the GNU General Public License for more details.</small></p></html> <html><h2>DjVuLibre DjView %1</h2>%2<p>Viewer for DjVu documents<br><a href=%3>%3</a><br>Copyright © 2006-- Léon Bottou.</p><p align=justify><small>This program is free software. You can redistribute or modify it under the terms of the GNU General Public License as published by the Free Software Foundation. This program is distributed <i>without any warranty</i>. See the GNU General Public License for more details.</small></p></html> All files Alle Dateien &Hidden Text Display| &Verborgener Text Overlay a representation of the hidden text layer. Überlagert die Darstellung der verborgenen Textschicht. Hidden Text modeCombo Verborgener Text QDjViewApplication Usage: djview [options] [filename-or-url] Common options include: -help~~~Prints this message. -verbose~~~Prints all warning messages. -display <xdpy>~~~Select the X11 display <xdpy>. -geometry <xgeom>~~~Select the initial window geometry. -font <xlfd>~~~Select the X11 name of the main font. -style <qtstyle>~~~Select the QT user interface style. -fullscreen, -fs~~~Start djview in full screen mode. -page=<page>~~~Jump to page <page>. -zoom=<zoom>~~~Set zoom factor. -continuous=<yn>~~~Set continuous layout. -sidebyside=<yn>~~~Set side-by-side layout. Anwendung: djview [Optionen] [Dateiname-oder-Url] Optionen sind: -help~~~Zeigt diesen Text an. -verbose~~~Erhöht die Gesprächigkeit des Programms. -display <xdpy>~~~Angabe des X11 Bildschrim <xdpy>.. -geometry <xgeom>~~~Angabe der Größe des Fensters beim Starten. -font <xlfd>~~~Angabe des X11 Namens der Hauptschriftart. -style <qtstyle>~~~Angabe des Qt-Styles für die Fensterdekoration. -fullscreen, -fs~~~Startet djview im Vollbildmodus. -page=<page>~~~Springt zu Seite <page>. -zoom=<zoom>~~~Setzt den Zoomfaktor. -continuous=<yn>~~~Setzt den koninuerlichen Modus. -sidebyside=<yn>~~~Setzt die zwei Seiten Ansicht. cannot open '%1'. kann '%1' nicht öffnen. QDjViewAuthDialog Password: Passwort: User: Benutzer: Authentication required - DjView Authentifizierung erforderlich - DjView QDjViewDjVuExporter DjVu Bundled Document DjVu Bundled-Dokument DjVu Files (*.djvu *.djv) DjVu Dateien (*.djvu *.djv) DjVu Indirect Document DjVu Indirect-Dokument Question - DjView dialog caption Frage - DjView <html> This file belongs to a non empty directory. Saving an indirect document creates many files in this directory. Do you want to continue and risk overwriting files in this directory?</html> <html> Diese Datei liegt in einem nicht leeren Verzeichnis. Das Speichern eines Indirekt-Dokumentes erzeugt viele Dateien in diesem Verzeichnis. Wollen Sie fortfahren und das Risiko eingehen, dass andere Dateien in diesem Verzeichnis überschrieben werden?</html> Con&tinue &Weiter &Cancel &Abbrechen Unknown error. Unbekannter Fehler. System error: %1. Systemfehler: %1. Save job creation failed! Die Erzeugung des Threads zum Speichern ist gescheitert! QDjViewErrorDialog DjView Error DjView Fehler &Ok &Ok Error - DjView dialog caption Fehler - DjView QDjViewExportDialog Dialog Export &Document &Dokument C&urrent page &Aktuelle Seite &Pages &Seiten to bis Destination Ziel Format: Format: &Defaults &Defaults &Ok &Cancel &Abbrechen Stop Beenden <html><b>Saving.</b><br/> You can save the whole document or a page range under a variety of formats. Selecting certain formats creates additional dialog pages for specifying format options.</html> <html><b>Speichern.</b><br/>Das ganze Dokument oder eine Auswahl an Seiten kann in verschiedenen Formaten gespeichert werden. Die Auswahl bestimmter Formate generiert zusätzliche Dialogseiten im Bedienfeld.</html> Error - DjView dialog caption Fehler - DjView Overwriting the current file is not allowed! Die aktuelle Datei darf nicht überschrieben werden! Question - DjView dialog caption Frage - DjView A file with this name already exists. Do you want to replace it? Eine Datei mit diesem Namen existiert bereits. Soll die Datei überschrieben werden? &Replace &Ersetzen This operation has failed. Diese Operation ist gescheitert. This operation has been interrupted. Diese Operation wurde unterbrochen. All files save filter Alle Dateien Export - DjView dialog caption QDjViewExportPS1 Form Formular Color Farbe &Color &Farbe &GrayScale &Graustufe Marks Marken Print image &frame Drucke Bild&rahmen Print crop &marks Drucke Falt&marken PostScript Language Level QDjViewExportPS2 Form Formular Scaling Skalierung Scale to &fit the page Passe das &Bild an die Seite an &Zoom % Orientation Orientierung Automatic Automatisch &Portrait &Hochformat &Landscape &Querformat QDjViewExportPS3 Form Formular Print sheets suitable for folding a booklet. Drucke die Seiten so, dass sie zu einer Broschüre gefaltet werden können. Advanced Erweitert Sheets per booklet: Seiten pro Broschüre: Unlimited Unbegrenzt at most höchstens Print Drucke rectos and versos. Vorder- und Rückseiten. rectos only. nur Vorderseiten. versos only. nur Rückseiten. Shift rectos and versos by Shifte Vorder- und Rückseiten um points. Punkte. Center: Zentriert: points Punkte plus plus /100 per page. pro Seite. QDjViewExportPrn Form Formular Color Farbe &Color &Farbe &GrayScale &Graustufe Marks Marken Print image &frame Drucke &Bildrahmen Print crop &marks Drucke Falt&marken Scaling Skalierung Scale to &fit the page Passe das &Bild an die Seite an &Zoom &Maßstab % Orientation Orientierung Automatic Automatisch &Portrait &Hochformat &Landscape &Querformat QDjViewExportTiff Form Formular Resolution Auflösung Maximum image resolution Maximale Auflösung des Bildes dpi Compression Komprimierung Force &bitonal G4 compression. Erzwinge &bitonal G4 Komprimierung. Allow &lossy JPEG compression. Erlaube &verlustbehaftete JPEG Komprimierung. JPEG &quality JPEG &Qualität Allow &deflate compression. Erlaube &bereinigte Komprimierung. QDjViewFind Case sensitive Groß- und Kleinschreibung beachten Words only Nur ganze Wörter Find Previous (Shift+F3) Rückwärts suchen (Shift+F3) Find Next (F3) Weitersuchen (F3) Options Optionen <html><b>Finding text.</b><br/> Search hits appear progressively as soon as you type a search string. Typing enter jumps to the next hit. To move to the previous or next hit, you can also use the arrow buttons or the shortcuts <tt>F3</tt> or <tt>Shift-F3</tt>. You can also double click a page name. Use the <tt>Options</tt> menu to search words only or to specify the case sensitivity.</html> <html><b>Text Suchen.</b><br/> Die Treffer der Suche werden sofort angezeigt. Durch drücken der Retruntaste gelangt man zum nächsten Treffer. Zum Navigieren können ebenfalls die Pfeiltasten, bzw <tt>F3</tt> und <tt>Shift-F3</tt> genutzt werden. Ein Doppelklick auf dem Seitennamen würde auch funktionieren. Mit Hilfe der Optionen können die Suchparameter angepasst werden.</html> Regular expression Regulärer Ausdruck Reset search options to default values. Setzt die Optionen der Suche auf ihre Standardwerte. Specify whether search hits must begin on a word boundary. Lässt Sucherfolge an einer Wortgrenze beginnen. Specify whether searches are case sensitive. Sucht ohne Unterscheidung der Groß-und Kleinschreibung. Regular expressions describe complex string matching patterns. Reguläre Ausdrücke beschreiben komplizierte Textsuchmuster. <html><b>Regular Expression Quick Guide</b><ul><li>The dot <tt>.</tt> matches any character.</li><li>Most characters match themselves.</li><li>Prepend a backslash <tt>\</tt> to match special characters <tt>()[]{}|*+.?!^$\</tt>.</li><li><tt>\b</tt> matches a word boundary.</li><li><tt>\w</tt> matches a word character.</li><li><tt>\d</tt> matches a digit character.</li><li><tt>\s</tt> matches a blank character.</li><li><tt>\n</tt> matches a newline character.</li><li><tt>[<i>a</i>-<i>b</i>]</tt> matches characters in range <tt><i>a</i></tt>-<tt><i>b</i></tt>.</li><li><tt>[^<i>a</i>-<i>b</i>]</tt> matches characters outside range <tt><i>a</i></tt>-<tt><i>b</i></tt>.</li><li><tt><i>a</i>|<i>b</i></tt> matches either regular expression <tt><i>a</i></tt> or regular expression <tt><i>b</i></tt>.</li><li><tt><i>a</i>{<i>n</i>,<i>m</i>}</tt> matches regular expression <tt><i>a</i></tt> repeated <tt><i>n</i></tt> to <tt><i>m</i></tt> times.</li><li><tt><i>a</i>?</tt>, <tt><i>a</i>*</tt>, and <tt><i>a</i>+</tt> are shorthands for <tt><i>a</i>{0,1}</tt>, <tt><i>a</i>{0,}</tt>, and <tt><i>a</i>{1,}</tt>.</li><li>Use parentheses <tt>()</tt> to group regular expressions before <tt>?+*{</tt>.</li></ul></html> <html><b>Reguläre Ausdrücke Kurz Anleitung</b><ul><li>Der Punkt <tt>.</tt> trifft jedes Zeichen.</li><li>Die meisten Zeichen treffen sich selbst.</li><li>Ein vorausgestellter Backslash <tt>\</tt> ermöglicht die Eingabe<br>der Spezialzeichen <tt>()[]{}|*+.?!^$\</tt>.</li><li><tt>\b</tt> trifft die Wortbegrenzung.</li><li><tt>\w</tt> trifft ein Wortzeichen.</li><li><tt>\d</tt> trifft das Zeichen einer Zahl.</li><li><tt>\s</tt> triff ein leeres Zeichen.</li><li><tt>\n</tt> trifft das Zeilenumbruchszeichen.</li><li><tt>[<i>a</i>-<i>b</i>]</tt> trifft Zeichen in einem Bereich <tt><i>a</i></tt>-<tt><i>b</i></tt>.</li><li><tt>[^<i>a</i>-<i>b</i>]</tt> trifft Zeichen ausserhalb des Bereichs <tt><i>a</i></tt>-<tt><i>b</i></tt>.</li><li><tt><i>a</i>|<i>b</i></tt> trifft entweder den regulären Ausdruck <tt><i>a</i></tt> oder regulären Ausdruck <tt><i>b</i></tt>.</li><li><tt><i>a</i>{<i>n</i>,<i>m</i>}</tt> trifft wiederholt den <tt><i>a</i></tt> regulären Ausdruck <tt><i>n</i></tt> bis <tt><i>m</i></tt> mal.</li><li><tt><i>a</i>?</tt>, <tt><i>a</i>*</tt> und <tt><i>a</i>+</tt> sind Kurzschreibweisen für <tt><i>a</i>{0,1}</tt>, <tt><i>a</i>{0,}</tt> und <tt><i>a</i>{1,}</tt>.</li><li>Verwende runde Klammern <tt>()</tt> zum Gruppieren von regulären<br> Ausdrücken vor <tt>?+*{</tt>.</li></ul></html> QDjViewFind::Model 1 hit 1 Treffer Page %1 (1 hit) Seite %1 (1 Treffer) Searching page %1 (waiting for data.) Durchsuche Seite %1 (warte auf Daten.) Searching page %1. Durchsuche Seite %1. No hits! Keine Treffer! <html>Document is not searchable. No page contains information about its textual content.</html> <html>Dokument ist nicht durchsuchbar. Keine Seite enthält Informationen über seinen textlichen Inhalt.</html> %n hits %n Treffer %n Treffer Page %1 (%n hits) Seite %1 (%n Treffer) Seite %1 (%n Treffer) <html>Invalid regular expression.</html> <html>Ungültiger regulärer Ausdruck.</html> QDjViewImgExporter %1 Image JPG Image %1 Bild %1 Files (*.%2) JPG Files %1 Dateien (*.%2) Cannot render page. Kann die Seite nicht Rendern. Image format %1 not supported. Das Bildformat %1 ist nicht unterstützt. QDjViewInfoDialog Dialog &Document &Dokument &File &Datei File: Datei: &View Page &Zeige Seite &Close &Schließen File # Datei # File Name Dateiname File Size Dateigröße File Type Dateityp Page # Seite # Page Title Titel der Seite <html><b>Document information</b><br>This panel shows information about the document and its component files. Select a component file to display detailled information in the <tt>File</tt> tab. Double click a component file to show the corresponding page in the main window. </html> <html><b>Dokument Informationen</b><br>Diese Seite zeigt Informationen über das Dokument und seine abhängigen Dateien. Die Detailinformationen zu der jeweils ausgewählten Datei findet man im <tt>Datei</tt> tab. Durch einen Doppelklick wird die jeweilige Seite im Hauptfenster dargestellt. </html> <html><b>File and page information</b><br>This panel shows the structure of the DjVu data corresponding to the component file or the page selected in the <tt>Document</tt> tab. The arrow buttons jump to the previous or next component file.</html> <html><b>Datei- und Seiteninformation</b><br>Diese Übersicht zeigt die Struktur der DjVu-Daten und der jeweiliges ausgewälten Dateien. Mit den Pfeiltasten kann man zwischen den einzelnen Dateien hin- und herspringen.</html> Waiting for data... Warte auf Daten... Page #%1 - « %2 » Seite #%1 - « %2 » Page #%1 Seite #%1 Thumbnails Vorschaubilder Shared annotations Verteilte Anmerkungen Shared data Verteilte Daten File #%1 - Datei #%1 - Single DjVu page Einzelne DjVu-Seite Bundled DjVu document Bundled DjVu-Dokument Indirect DjVu document Indirect DjVu-Dokument Obsolete bundled DjVu document Veraltetes bundled DjVu-Dokument Obsolete indexed DjVu document Veraltetes indexed DjVu-Dokument n/a n/a Page Seite Thumbnails Vorschaubilder Shared Verteilt 1 file 1 Datei %n files %n Datei %n Dateien 1 page 1 Seite %n pages %n Seite %n Seite QDjViewMetaDialog Dialog Dialog &Document Metadata &Dokumentmetadaten &Page Metadata &Seitenmetadaten Page: Seite: &View Page &Zeige Seite &Close &Schließen Ctrl+C copy Strg+C Key Taste Value Wert <html><b>Document metadata</b><br>This panel displays metadata pertaining to the document, such as author, title, references, etc. This information can be saved into the document with program <tt>djvused</tt>: use the commands <tt>create-shared-ant</tt> and <tt>set-meta</tt>.</html> <html><b>Dokumentmetadaten</b><br>Diese Ansicht zeigt die Metadaten des Dokumentes. Hierzu zählen author, title, references, etc. Die Informationen können mit Hilfe des Programms <tt>djvused</tt> gespeichert werden: Folgende Kommandos können dazu verwendet werden: <tt>create-shared-ant</tt> und <tt>set-meta</tt>.</html> <html><b>Page metadata</b><br>This panel displays metadata pertaining to a specific page. Page specific metadata override document metadata. This information can be saved into the document with program <tt>djvused</tt>: use command <tt>select</tt> to select the page and command <tt>set-meta</tt> to specify the metadata entries.</html> <html><b>Seitenmetadaten</b><br>Diese Ansicht zeigt die Metadaten einer einzelnen Seite. Die Seitenmetadaten überschreiben die Dokumentenmetadaten. Die Informationen können mit Hilfe des Programms <tt>djvused</tt> gespeichert werden: Folgende Kommandos können dazu verwendet werden: <tt>select</tt> und <tt>set-meta</tt>.</html> QDjViewOutline <html><b>Document outline.</b><br/> This panel display the document outline, or the page names when the outline is not available, Double-click any entry to jump to the selected page.</html> <html><b>Inhaltsverzeichnis.</b><br/> Hier wird das Inhaltsverzeichnis des Dokumentes angezeigt. Sollte kein Inhaltsverzeichnis verfügbar sein, so werden die Seitennamen angezeigt. Ein Doppelklick springt zur jeweiligen Seite.</html> Outline data is corrupted Das Inhaltsverzeichnis ist defekt Pages Seiten Page %1 Seite %1 Go: page %1. Go: page %1 Gehe zu Seite %1. Go: %1 Go: %1. Gehe zu %1 QDjViewPSExporter PostScript PostScript Files (*.ps *.eps) PostScript Dateien (*.ps *.eps) Encapsulated PostScript PostScript tab caption Position tab caption Booklet tab caption Broschüre <html><b>PostScript options.</b><br>Option <tt>Color</tt> enables color printing. Document pages can be decorated with frame and crop marks. PostScript language level 1 is only useful with very old printers. Level 2 works with most printers. Level 3 print color document faster on recent printers.</html> <html><b>PostScript Optionen.</b><br>Die Option <tt>Farbe</tt> schaltet den Farbdruck ein. Die Seiten eines Dokumentes können von einem Rahmen umfasst werden. Zoomfaktor <tt>100%</tt> entspricht der Originalgröße des Dokumentes. Orientatierung <tt>Automatisch</tt> wählt zwischen Hoch- und Querformat für die jeweilige Seite aus. PostScript language level 1 sollte nur benutzt werden, wenn das Alter des Druckers es erfordert. Level 2 funktioniert mit den meisten Druckern. Level 3 druckt farbige Dokumente schneller auf neueren Druckern.</html> <html><b>Position and scaling.</b><br>Option <tt>Scale to fit</tt> accommodates whatever paper size your printer uses. Zoom factor <tt>100%</tt> reproduces the initial document size. Orientation <tt>Automatic</tt> chooses portrait or landscape on a page per page basis.</html> <html><b>Positionierung und Skalierung.</b><br>Option <tt>an Papierformat anpassen</tt> paßt Dokument an das vom Drucker genutzte Papierformat an. Zoomfaktor <tt>100%</tt> entspricht der Originalgröße des Dokumentes. Orientatierung <tt>Automatisch</tt> wählt zwischen Hoch- und Querformat für die jeweilige Seite aus.</html> <html><b>Producing booklets.</b><br>The booklet mode prints the selected pages as sheets suitable for folding one or several booklets. Several booklets might be produced when a maximum number of sheets per booklet is specified. You can either use a duplex printer or print rectos and versos separately.<p> Shifting rectos and versos is useful with poorly aligned duplex printers. The center margins determine how much space is left between the pages to fold the sheets. This space slowly increases from the inner sheet to the outer sheet.</html> <html><b>Broschüren erzeugen.</b><br>Der Broschürenmodus druckt die Seiten so, dass sie gefaltet werden können. Mehrere Broschüren werden erzeugt, wenn eine maximale Anzahl von Seiten pro Broschüre eingestellt wurde. Man kann mit einem Duplexdrucker arbeiten oder die Vor- und Rückseite getrennt ausdrucken.<p> Das Verschieben der Vorder- und Rückseiten ist sinnvoll für schlecht anpassende Duplex-Drucker. Die 'Zentriert' Angabe bestimmt wieviel Platz zwischen den einzelnen Seiten zum Falten bleibt. Dieser Platz nimmt langsam von innen nach aussen zu.</html> Save job creation failed! Die Erzeugung des Threads zum Speichern ist gescheitert! QDjViewPdfExporter PDF Document PDF-Dokument PDF Files (*.pdf) PDF-Dateien (*.pdf) PDF Options tab caption PDF-Optionen <html><b>PDF options.</b><br>These options control the characteristics of the images embedded in the exported PDF files. The resolution box limits their maximal resolution. Forcing bitonal G4 compression encodes all pages in black and white using the CCITT Group 4 compression. Allowing JPEG compression uses lossy JPEG for all non bitonal or subsampled images. Otherwise, allowing deflate compression produces more compact files. </html> <html><b>PDF Optionen.</b><br>Diese Optionen kontrollieren die Eigenschaften der in die exportierte PDF-Datein eingebetteten Bilder. Das Auflösungsfeld limtiert ihre maximale Auflösung. Schaltet man bitonal G4 Kompression an, so werden alle Seiten in schwarz/weiß mit Hilfe der CCITT Group 4 Komprimierung kodiert. JPEG Komprimierung verwende verlusthafte JPEG Kodierung für alle nicht bitonal oder unterabgetateten Bilder. Deflate Kompression erzeugt kleinere Dateien. </html> Error while creating pdf file. Fehler während der Erzeugung der PDF-Datei. Unable to create output file. Die Ausgabedatei konnte nicht angelegt werden. System error: %1. Systemfehler: %1. Unable to reopen temporary file. Die temporäre Datei kann nicht wieder geöffnet werden. PDF export was not compiled. Der PDF-Export wurde nicht kompiliert. Unable to create temporary file. Die temporäre Daten kann nicht angelegt werden. QDjViewPlugin::Document Requesting %1. Fordere %1 an. QDjViewPrefsDialog Dialog Dialog Gamma Gamma Darker Dunkler Lighter Heller <html>Screen color correction.<br>Adjust slider until gray shades look similar.</html> <html>Farbkorrektur des Bildschirms.<br>Der Schieber muss angepasst werden, bis die grauen Flächen ähnlich aussehen.</html> &Interface &Interface Options for Optionen für Standalone Viewer Eigenständiges Programm Full Screen Standalone Viewer Vollbild - eigenständiges Programm Full Page Plugin Ganz Seiten Plugin Embedded Plugin Eingebundenes Plugin &Remember initial state from last invocation &Merke den Status des Programms Show Zeige &Menu bar &Menüleiste &Tool bar &Werkzeugleiste Sc&rollbars Stat&us bar Stat&usleiste &Side bar &Seitenleiste Display Anzeige Force inverted luminance Force inverted luminance. Erzwinge eine Invertierung der Helligkeit &Zoom: &Vergrößerung: Display page &frames Zeige S&eitenrahmen Display &annotations Zeige &Anmerkungen &Keys &Tasten Keys Tasten For displaying hyper&links: Hyper&links anzuzeigen: For &selecting text or images: Text oder &Bilder auswählen: For displaying the &lens: Die &Lupe anzeigen: Mouse wheel Mausrad Mouse wheel scrolls the page Mouse wheel scrolls the page. Mausrad wechselt zur nächsten Seite Mouse wheel changes the zoom factor Mouse wheel changes the zoom factor. Mausrad ändert den Zoomfaktor &Lens &Lupe Enable magnifying &lens Vergrößerungs&lupe verwenden Lens options Lupenoptionen Lens &size: Lupen&größe: Magnifying &power: Vergrösserung&faktor: x pixels Pixel Cache Zwischenspeicher &Clear &Leeren &Decoded page cache: Speicher zum &dekodieren: &Pixel cache: Speicher der &Bildpunkte: &Network &Netzwerk Use pro&xy to access the network Verwende Pro&xy für den Zugriff zum Netzwerk Proxy settings Proxyeinstellungen Pass&word: Pass&wort: &User: &Benutzer: &Port: &Port: &Host: &Host: Interface Interface Force language (next time djview runs) Force language (when djview is restarted.) Spracheinstellung erzwingen (erfordert Neustart von djview) Enable page animations Enable animations Aktiviere Seitenanimation Show hidden text in status bar Zeige versteckten Text in der Statusleiste Override saving and printing restrictions Überschreibe Speicher- und Druckeinschränkungen &Defaults &Standardwerte &Apply &Anwenden &Ok &Ok Cancel Abbrechen Preferences[*] - DjView Vorlieben[*] - DjView <html><b>Initial interface setup.</b><br>DjView can run as a standalone viewer, as a full screen viewer, as a full page browser plugin, or as a plugin embedded inside a html page. For each case, check the <tt>Remember</tt> box to automatically save and restore the interface setup. Otherwise, specify an initial configuration.</html> <html><b>Einrichtung der Oberfläche beim Starten.</b><br>DjView kann als eigenständiges Programm, im Vollbildmodus, als Ganzseiten-Browserplugin oder als Plugin eingebunden in einer Html-Seite verwendet werden. Jede Anwendungsart hat ihre eigene Konfiguration. <tt>Merke ...</tt> speichert automatisch beim Beenden des Programms die Einstellungen. Ansonsten besteht die Möglichkeit eine Konfiguration fest vorzugeben.</html> <html><b>Modifiers keys.</b><br>Define which combination of modifier keys will show the manifying lens, temporarily enable the selection mode, or highlight the hyperlinks.</html> <html><b>Modifizierttasten.</b><br>Hier besteht die Möglichkeit einzustellen, welche Modifiziertasten die jeweilige Aktion auslösen.</html> <html><b>Magnifying lens.</b><br>The magnifying lens appears when you depress the modifier keys specified in tab <tt>Keys</tt>. This panel lets you choose the power and the size of the magnifying lens.</html> <html><b>Vergrößerungsglas.</b><br>Das Vergrößerungsglas erscheint, wenn man die in <tt>Tasten</tt> definierte Taste drückt. Hier kann die Stärke und die Größe der Linse eingestellt werden.</html> <html><b>Advanced.</b><br>You can override the default interface language, disable the page animations, or enable additional menu entries that are useful for authoring DjVu files.You can also disable the printing or saving restrictions dictated by certain web sites. The manual color correction can be useful with old printers.</html> <html><p><b>Advanced.</b>You can override the default interface language, disable the page animations, or enable additional menu entries that are useful for authoring DjVu files.You can also disable the printing or saving restrictions dictated by certain web sites. The manual color correction can be useful with old printers.</html> <html><b>Erweitert.</b><br>Es ist möglich, die Standardsprache zu überschreiben, Seitenanmationen zu deaktivieren oder zusätzliche Menüs zu aktivieren. Diese sind nützlich beim Bearbeiten von DjVu Dateien. Sie können auch Druck- oder Speichereinschränkungen abstellen. Die manuelle Farbkorrektur kann mit alten Druckern sinnvoll sein.</html> <html><b>Network proxy settings.</b><br>These proxy settings are used when the standalone djview viewer accesses a djvu document through a http url. The djview plugin always uses the proxy settings of the web browser.<p><b>Cache settings.</b><br>The <i>pixel cache</i> stores image data located outside the visible area. This cache makes panning smoother. The <i>decoded page cache</i> contains partially decoded pages. It provides faster response times when navigating a multipage document or when returning to a previously viewed page. Clearing this cache might be useful to reflect a change in the page data without restarting the DjVu viewer.</html> <html><b>Netzwerkproxy Einstellungen.</b><br>Diese Einstellungen finden Verwendung, wenn DjView als 'eigenständiges' Programm verwendet wird und Seiten über Html/Url dargestellt werden sollen. Das Plugin verwendet immer die Proxyeinstellungen des verwendeten Browsers. <p><b>Zwischenspeicher.</b><br>Der <i>Cache der Bildpunkte</i> hält die Daten des Bildes ausserhalb des sichtbaren Bereiches. Durch diesen Speicher wird das Verschieben des Bildes flüssiger. Der <i>Speicher zum Dekodieren</i> enthält partiell dekodierte Seiten. Dadurch werden kürzere Antwortzeiten bei der Navigation durch das Dokument erreicht. Das Leeren dieses Speichers ist sinnvoll, um die Daten der Seite neu zu laden, ohne das Programm neu zu starten.</html> <html><b>Screen gamma correction.</b><br>The best color rendition is achieved by adjusting the gamma correction slider and choosing the position that makes the gray square as uniform as possible.<p><b>Screen resolution.</b><br>This option forces a particular resolution instead of using the unreliable resolution advertised by the operating system. Forcing the resolution to 100 dpi matches the behavior of the djvulibre command line tools.</html> <html><b>Gammakorrektur des Bildschirms.</b><br>Die beste Farbwiedergabe wird durch Anpassen des Gammaschiebers erreicht. Das graue Rechteck sollte dabei möglichst einheitlich erscheinen.<p><b>Bildschirmauflösung.</b><br>Diese Option erzwingt die eingestelle Auflösung, anstelle der unzuverlässigen, die das Betriebssystem unter Umständen mitteilt. 100 dpi ist die Auflösung die die djvulibre-Kommandozeilen-Programme verwenden.</html> &Screen Bild&schirm Force screen &resolution E&rzwinge Bildschirmauflösung dpi dpi &Advanced &Erweitert Miscellaneous Verschiedenes Manual printer color correction Manuelle Farbkorrektur des Druckers gamma= gamma= Enable advanced features in menus Erweiterte Funktionen in Menüs freischalten MB MB Layout Anordnung Continuous Kontinuierlich Side-by-side Zwei Seiten nebeneinander Cover Page Erste Seite einzeln Right-to-Left Rechts nach Links QDjViewPrintDialog Dialog Dialog Print Drucke &Document &Dokument C&urrent page &Aktuelle Seite &Pages &Seiten to bis Destination Ziel Print to file Drucke in Datei Printer name: Druckername: Choose Auswahl &Defaults &Standardwerte &Ok &Ok &Cancel &Abbrechen Stop Beenden <html><b>Printing.</b><br/> You can print the whole document or a page range. Use the <tt>Choose</tt> button to select a print destination and specify printer options. Additional dialog tabs might appear to specify conversion options.</html> <html><b>Drucken.</b><br/>Das Drucken des ganzen Dokumentes oder eine Auswahl von Seiten ist möglich. Durch Drücken des <tt>Auswahl</tt>Buttons kann der Drucker ausgeählt werden.</html> All files save filter Alle Dateien Print To File - DjView dialog caption Drucke in Datei - DjView Question - DjView dialog caption Frage - DjView A file with this name already exists. Do you want to replace it? Eine Datei mit diesem Namen existiert bereits. Soll die Datei überschrieben werden? &Replace &Ersetzen This operation has failed. Diese Operation ist gescheitert. This operation has been interrupted. Diese Operation ist gescheitert. (invalid printer) (ungültiger Drucker) QDjViewPrnExporter Printer data Druckerdaten PRN Files (*.prn) PRN Dateien (*.prn) Printing Options tab caption Druckeinstellungen <html><b>Printing options.</b><br>Option <tt>Color</tt> enables color printing. Document pages can be decorated with a frame. Option <tt>Scale to fit</tt> accommodates whatever paper size your printer uses. Zoom factor <tt>100%</tt> reproduces the initial document size. Orientation <tt>Automatic</tt> chooses portrait or landscape on a page per page basis.</html> <html><b>Druckeinstellungen.</b><br>Die Option <tt>Farbe</tt> schaltet den Farbdruck ein. Die Seiten eines Dokumentes können von einem Rahmen umfasst werden. Zoomfaktor <tt>100%</tt> entspricht der Originalgröße des Dokumentes. Orientatierung <tt>Automatisch</tt> wählt zwischen Hoch- und Querformat für die jeweilige Seite aus.</html> Cannot render page %1. Kann Seite %1 nicht darstellen. QDjViewSaveDialog Dialog Save Speichern &Document &Dokument C&urrent page &Aktuelle Seite &Pages &Seiten to bis Destination Ziel Format: Format: Bundled DjVu Document Bundled DjVu-Dokument Indirect DjVu Document Indirect DjVu-Dokument &Ok &Ok &Cancel &Abbrechen Stop Beenden <html><b>Saving.</b><br/> You can save the whole document or a page range. The bundled format creates a single file. The indirect format creates multiple files suitable for web serving.</html> <html><b>Speichern.</b><br/> Das ganze Dokument oder eine Auswahl an Seiten kann gespeichert werden. Das gebündelte Format generiert eine einzige Datei. Das indirekte Format generiert mehrere Dateien und eignet sich für die Online-Positionierung des Dokumentes.</html> Error - DjView dialog caption Fehler - DjView Overwriting the current file is not allowed! Die aktuelle Datei darf nicht überschrieben werden! Question - DjView dialog caption Frage - DjView A file with this name already exists. Do you want to replace it? Eine Datei mit diesem Namen existiert bereits. Soll die Datei überschrieben werden? &Replace &Ersetzen This operation has failed. Diese Operation ist gescheitert. This operation has been interrupted. Diese Operation wurde unterbrochen. All files save filter Alle Dateien Save - DjView dialog caption Speichern - DjView QDjViewThumbnails Tiny thumbnail menu Mini Small thumbnail menu Klein Medium thumbnail menu Mittel Large thumbnail menu Groß Smart thumbnail menu Elegant Control Left Mouse Button Steuerung linke Maustaste Right Mouse Button Rechte Maustaste <html><b>Document thumbnails.</b><br/> This panel display thumbnails for the document pages. Double click a thumbnail to jump to the selected page. %1 to change the thumbnail size or the refresh mode. The smart refresh mode only computes thumbnails when the page data is present (displayed or cached.)</html> <html><b>Vorschaubilder.</b><br/> Hier werden die Vorschaubilder der Seiten des Dokumentes gezeigt. Ein Doppelklick springt zu der jeweiligen Seite. %1 ermöglicht die Einstellung der Größe, bzw. des Aktualisierungsmodus. Der 'Elegant' Modus erzeugt die Vorschaubilder nur, wenn die Daten der Seite vorhanden sind (angezeigt oder im Zwischenspeicher.)</html> QDjViewTiffExporter TIFF Document TIFF Dokument TIFF Files (*.tiff *.tif) TIFF Dateien (*.tiff *.tif) TIFF Options tab caption TIFF Optionen <html><b>TIFF options.</b><br>The resolution box specifies an upper limit for the resolution of the TIFF images. Forcing bitonal G4 compression encodes all pages in black and white using the CCITT Group 4 compression. Allowing JPEG compression uses lossy JPEG for all non bitonal or subsampled images. Otherwise, allowing deflate compression produces more compact (but less portable) files than the default packbits compression.</html> <html><b>TIFF Optionen.</b><br>Das Auflösungsfeld limtiert ihre maximale Auflösung. Schaltet man bitonal G4 Kompression an, so werden alle Seiten in schwarz/weiß mit Hilfe der CCITT Group 4 Komprimierung kodiert. JPEG Komprimierung verwendet verlusthafte JPEG Kodierung für alle nicht bitonal oder unterabgetateten Bilder. Deflate Kompression erzeugt kleinere Dateien. </html> Cannot open output file. Kann die Ausgabedatei nicht öffnen. Out of memory. Zuwenig Speicher. Internal error. Interner Fehler. TIFF export has not been compiled. Der TIFF-Export wurde nicht kompiliert. QDjVuNetDocument Requesting '%1' Fordere %1 an QDjVuNetDocument::Private Received http status %1 while retrieving %2. %1 is an http status code Habe den http-status %1 erhalten bei der Anforderung von %2. Received <%1> data while retrieving %2. %1 is a mime type Habe %1 Daten von %2 erhalten. %1 while retrieving '%2'. %1 der Anfrage von '%2'. Cannot validate the certificate for server %1. Kann das Zertifikat von %1 nicht überprüfen. Authentication required for %1 (%2). Authentifizierung benötigt für %1 (%2). Authentication required for proxy %1. Authentifizierung benötigt für Proxy %1. djview4/src/djview_fr.ts000066400000000000000000004642531174072760700156010ustar00rootroot00000000000000 Generic thisLanguage Name of THIS language Français QApplication Option '-fix' is deprecated. L'option «-fix» n'est plus utilisée. QDjView cannot open '%1'. impossible d'ouvrir «%1». FitWidth zoomCombo Pleine Largeur FitPage zoomCombo Pleine Page Stretch zoomCombo Étirer 1:1 zoomCombo 1:1 300% zoomCombo 300% 200% zoomCombo 200% 150% zoomCombo 150% 100% zoomCombo 100% 75% zoomCombo 75% 50% zoomCombo 50% Color modeCombo Couleur Stencil modeCombo Masque Foreground modeCombo Avant-plan Background modeCombo Arrière-plan &New File| &Nouveau Ctrl+N File|New Ctrl+N Create a new DjView window. Crée une nouvelle fenêtre DjView. &Open File| &Ouvrir Ctrl+O File|Open Ctrl+O Open a DjVu document. Ouvre un document DjVu. &Close File| &Fermer Ctrl+W File|Close Ctrl+W Close this window. Ferme cette fenêtre. &Quit File| &Quitter Ctrl+Q File|Quit Ctrl+Q Close all windows and quit the application. Ferme toutes les fenêtres et quitte l'application. Save &as... File| &Enregistrer sous... Save the DjVu document. Enregistre le document DjVu. &Print... File| &Imprimer... Ctrl+P File|Print Ctrl+P Print the DjVu document. Imprime le document DjVu. &Find... Edit| &Rechercher... Ctrl+F Edit|Find Ctrl+F Find text in the document. Recherche de texte dans le document. Find &Next Edit| Sui&vant F3 Edit|Find Next F3 Find next occurence of search text in the document. Montre l'apparition suivante du texte recherché dans le document. Find &Previous Edit| &Précédent Shift+F3 Edit|Find Previous Shift+F3 Find previous occurence of search text in the document. Montre l'apparition précédente du texte recherché dans le document. &Select Edit| &Sélectionner F2 Edit|Select F2 Select a rectangle in the document. Sélectionne un rectangle dans le document. Zoom &In Zoom| &Agrandir Increase the magnification. Augmente l'agrandissement de l'image. Zoom &Out Zoom| &Réduire Decrease the magnification. Réduit l'agrandissement de l'image. Fit &Width Zoom| Pleine &Largeur Set magnification to fit page width. Affiche les pages dans toute leur largeur. Fit &Page Zoom| Pleine &Page Set magnification to fit page. Affiche toute la page. One &to one Zoom| 1&:1 Set full resolution magnification. Affiche la page avec sa résolution native. &300% Zoom| &300% Magnify 300% Grossissement à 300% &200% Zoom| &200% Magnify 20% Grossissement à 200% 150% Zoom| 150% Magnify 150% Grossissement à 150% &100% Zoom| &100% Magnify 100% Grossissement à 100% &75% Zoom| &75% Magnify 75% Grossissement à 75% &50% Zoom| &50% &First Page Go| P&remière Page Jump to first document page. Va à la première page du document. &Next Page Go| Page &Suivante Jump to next document page. Va à la prochaine page du document. &Previous Page Go| Page &Précédente Jump to previous document page. Va à la page précédente. &Last Page Go| &Dernière Page Jump to last document page. Va à la dernière page. &Backward Go| Retour &Arrière Backward in history. Position précédente dans l'historique des positions visitées. &Forward Go| Retour A&vant Forward in history. Position suivante dans l'historique des positions visitées. Rotate &Left Rotate| Pivoter à &Gauche Rotate page image counter-clockwise. Pivote les pages dans le sens inverse des aiguilles d'une montre. Rotate &Right Rotate| Pivoter à &Droite Rotate page image clockwise. Pivote les pages dans le sens des aiguilles d'une montre. Rotate &0° Rotate| Pivoter &0° Set natural page orientation. Restaure l'orientation normale des pages. Rotate &90° Rotate| Pivoter à &90° Turn page on its left side. Pivote les pages sur leur coté gauche. Rotate &180° Rotate| Pivoter à &180° Turn page upside-down. Pivote les pages à 180 degrés. Rotate &270° Rotate| Pivoter à &270° Turn page on its right side. Pivote les pages sur leur coté droit. &Information... Edit| &Informations... Ctrl+I Edit|Information Ctrl+I &Metadata... Edit| &Méta informations... Ctrl+M Edit|Metadata Ctrl+M Show the document and page meta data. Montre les informations supplémentaires sur le document et ses pages. &About DjView... &À propos de DjView... Show information about this program. Montre les informations à propos de ce programme. &Color Display| &Couleur Display everything. Affiche les images en pleine couleur. &Stencil Display| &Masque Only display the document bitonal stencil. N'affiche que le masque bitonal de chaque image. &Foreground Display| A&vant-plan Only display the foreground layer. N'affiche que l'avant-plan de chaque image. &Background Display| A&rrière-plan Only display the background layer. N'affiche que l'arrière-plan de chaque image. I&nvert Luminance View| Luminance i&nversée Invert image luminance while preserving hue. Inverse la luminance de l'image tout en préservant les teintes. Prefere&nces... Settings| Préfére&nces... Show the preferences dialog. Montre le panneau des préférences. F9 Settings|Show sidebar F9 Show/hide the side bar. Montre ou cache la panneau latéral. F10 Settings|Show toolbar F10 Show/hide the standard tool bar. Montre ou cache la barre d'outils. Show/hide the status bar. Montre ou cache la ligne d'état en bas de la fenêtre. F&ull Screen View| &Plein Écran F11 View|FullScreen F11 Toggle full screen mode. Sélectionne le mode plein écran. &Continuous Layout| Pages &Continues F4 Layout|Continuous F4 Toggle continuous layout mode. Sélectionne l'affichage continu des pages. Side &by Side Layout| Pages Cô&te à Côte F5 Layout|SideBySide F5 Toggle side-by-side layout mode. Sélectionne l'affichage des pages côte à côte. &File File| &Fichier &Edit Edit| &Édition &View View| &Voir &Zoom View|Zoom &Zoom &Rotate View|Rotate &Rotation &Display View|Display A&ffichage &Go Go| &Aller &Settings Settings| &Options &Help Help| &Aide Control Left Mouse Button Control et bouton gauche de la souris Right Mouse Button Bouton droit de la souris <html><b>Selecting a rectangle.</b><br/> Once a rectangular area is selected, a popup menu lets you copy the corresponding text or image. Instead of using this tool, you can also hold %1 and use the Left Mouse Button.</html> <html><b>Sélectionner un rectangle.</b><br/> Après avoir sélectionné un rectangle, un menu vous permet de copier le texte ou l'image correspondante. Vous pouvez accéder à la même fonction en maintenant la touche %1 pendant l'utilisation du bouton gauche de la souris.</html> <html><b>Zooming.</b><br/> Choose a zoom level for viewing the document. Zoom level 100% displays the document for a 100 dpi screen. Zoom levels <tt>Fit Page</tt> and <tt>Fit Width</tt> ensure that the full page or the page width fit in the window. </html> <html><b>Grossissement.</b><br/> Le grossissement 100% affiche les page avec une taille adéquate pour un écran à 100 dpi. Les grossissements «Pleine Page» et «Pleine Largeur» font en sorte que toute la page ou toute sa largeur soit visible dans la fenêtre. </html> <html><b>Rotating the pages.</b><br/> Choose to display pages in portrait or landscape mode. You can also turn them upside down.</html> <html><b>Rotation.</b><br/> Pivoter les pages permet de les afficher en mode portait ou paysage. Vous pouvez également afficher les pages à l'envers.</html> <html><b>Display mode.</b><br/> DjVu images compose a background layer and a foreground layer using a stencil. The display mode specifies with layers should be displayed.</html> <html><b>Mode d'affichage.</b><br/> Les images DjVu sont composées d'une couche d'arrière-plan et d'une couche d'avant-plan dessiné au travers d'une couche de masque. Le mode d'affichage sélectionne quelles couches doivent être affichées.</html> <html><b>Continuous layout.</b><br/> Display all the document pages arranged vertically inside the scrollable document viewing area.</html> <html><b>Affichage continu.</b><br/> Affiche toutes les pages l'une au dessous de l'autre dans la zone de visualisation du document.</html> <html><b>Side by side layout.</b><br/> Display pairs of pages side by side inside the scrollable document viewing area.</html> <html><b>Affichage côte-à-côte.</b><br/> Affiche les paires de pages côte-à-côte dans la zone de visualisation du document.</html> <html><b>Page information.</b><br/> Display information about the page located under the cursor: the sequential page number, the page size in pixels, and the page resolution in dots per inch. </html> <html><b>Informations sur la page.</b><br/> Affiche quelques informations sur la page située sous le pointeur: le numéro de page, la taille de la page en pixels, et sa résolution en points par pouce.</html> <html><b>Cursor information.</b><br/> Display the position of the mouse cursor expressed in page coordinates. </html> <html><b>Position du pointeur.</b><br/> Affiche la position du pointeur, exprimée dans les coordonnées de la page. </html> <html><b>Document viewing area.</b><br/> This is the main display area for the DjVu document. <ul><li>Arrows and page keys to navigate the document.</li><li>Space and BackSpace to read the document.</li><li>Keys <tt>+</tt> <tt>-</tt> <tt>[</tt> <tt>]</tt> to zoom or rotate the document.</li><li>Left Mouse Button for panning and selecting links.</li><li>%3 for displaying the contextual menu.</li><li>%1 Left Mouse Button for selecting text or images.</li><li>%2 for popping the magnification lens.</li></ul></html> <html><b>Zone de visualisation du document.</b><br/> Ceci est la zone de visualisation principale pour le document DjVu. <ul><li>Flèches et touches de pagination pour naviguer à l'intérieur du document.</li><li>Touches Espace et Retour pour lire le document en séquence.</li><li>Touches <tt>+</tt> <tt>-</tt> <tt>[</tt> <tt>]</tt> pour grossir ou pivoter les images.</li><li>Bouton gauche de la souris pour déplacer l'image et sélectionner des liens.</li><li>%3 pour le menu contextuel.</li><li>%1 et bouton gauche de la souris pour sélectionner texte ou images.</li><li>%2 pour montrer la loupe.</li></ul></html> <html><b>Document viewing area.</b><br/> This is the main display area for the DjVu document. But you must first open a DjVu document to see anything.</html> <html><b>Zone de visualisation du document.</b><br/> Ceci est la zone de visualisation principale pour le document DjVu. Mais vous devez d'abord ouvrir un document DjVu pour voir quoi que ce soit.</html> Toolbar option '%1' is not implemented. L'option de barre d'outils «%1» n'est pas supportée. Option '%1' requires a standalone viewer. L'option «%1» est invalide en mode «plugin». Deprecated option '%1' L'option «%1» n'est plus utilisée Option '%1' is not implemented. L'option «%1» n'est pas encore codée. Option '%1' is not recognized. L'option «%1» n'est pas reconnue. DjView DjView Cannot open file '%1'. Impossible d'ouvrir le fichier «%1». Cannot open URL '%1'. Impossible d'ouvrir l'URL «%1». Certificate validation error - DjView dialog caption Erreur de validation du certificat - DjView <html> %1 Do you want to continue anyway? </html> <html> %1 Voulez-vous continuer tout-de-même? </html> Cannot find page numbered: %1 Impossible de trouver la page numérotée «%1» Cannot find page named: %1 Impossible de trouver la page nommée «%1» Unrecognized sidebar options '%1'. L'option de panneau latéral «%1» n'est pas reconnue. <html> This file was served with printing restrictions. Do you want to print it anyway?</html> <html> This file was served with printing restrictions.Do you want to print it anyway?</html> <html>Ce fichier est servi avec une restriction d'impression. Voulez-vous l'imprimer quand même?</html> <html> This file was served with saving restrictions. Do you want to save it anyway?</html> <html> This file was served with saving restrictions.Do you want to save it anyway?</html> <html>Ce fichier est servi avec une restriction de sauvegarde. Voulez vous le sauver quand même?</html> Cannot determine file format. Filename '%1' has no suffix. Impossible de déterminer le format du fichier. Le nom «%1» n'a pas de suffixe. Image format %1 not supported. Le format de fichier image «%1» n'est pas supporté. Cannot write file '%1'. %2. Impossible d'écrire le fichier «%1». %2. Thumbnails Vignettes Outline Chapitres Find Recherche Cannot decode page %1. Impossible de décoder la page «%1». Cannot decode document. Impossible de décoder le document. x=%1 y=%2 x=%1 y=%2 %3x%4+%1+%2 %3x%4+%1+%2 Go: %n pages forward. Avancer de %n page. Avancer de %n pages. Go: %n pages backward. Reculer de %n page. Reculer de %n pages. Go: page %1. Aller page %1. Go: %1 Link: %1 Aller à %1 Cannot resolve link '%1' Impossible d'interpréter le lien «%1» Cannot spawn a browser for url '%1' Impossible de lancer un navigateur pour l'URL «%1» Copy text (%1) Copier le texte (%1) Save text as... Enregistrer le texte... Copy image (%1x%2 pixels) Copier l'image (%1x%2) Save image as... Enregistrer l'image... Zoom to rectangle Zoomer sur ce rectangle About DjView À propos de DjView DjVu files Fichiers DjVu Magnify 50% Grossissement à 50% Show information about the document encoding and structure. Montre les informations sur l'encodage du document et sa structure. (in other window.) (dans une autre fenêtre.) Option '%1' requires boolean argument. L'option «%1» demande un argument booléen. Illegal value '%2' for option '%1'. L'argument «%2» pour l'option «%1» est invalide. Toolbar option '%1' is not recognized. L'option de barre d'outils «%1» n'est pas reconnue. <html><b>Document and page information.</b><br> Display a dialog window for viewing encoding information pertaining to the document or to a specific page.</html> <html><b>Informations sur le document et la page.</b><br> Affiche un panneau montrant les informations d'encodage qui se rapportent au document ou à une de ses pages.</html> <html><b>Navigating the document.</b><br/> The page selector lets you jump to any page by name and can be activated at any time by pressing Ctrl+G. The navigation buttons jump to the first page, the previous page, the next page, or the last page. </html> <html><b>Navigation.</b><br/> Le sélecteur de page vous permet de sélectionner une page par son nom. Pressez Ctrl+G pour l'activer à tout moment. Les icônes de navigation vous permettent d'aller directement à la première page, la page précédente, la page suivante, ou la dernière page. </html> <html><b>Document and page metadata.</b><br> Display a dialog window for viewing metadata pertaining to the document or to a specific page.</html> <html><b>Méta informations sur le document et la page.</b><br> Affiche un panneau montrant les informations supplémentaires qui se rapportent au document ou à une de ses pages.</html> Opening DjVu file Ouverture de fichier DjVu Opening DjVu document Ouverture de document DjVu Print - DjView dialog caption Imprimer - DjView Save - DjView dialog caption Sauver - DjView Text files save filter Fichiers texte All files save filter Tous les fichiers Save Text - DjView dialog caption Sauver le texte - DjView Error - DjView dialog caption Erreur - DjView Save Image - DjView dialog caption Enregistrement de l'image - DjView Decoding DjVu document Décodage de document DjVu P%1/%2 %3x%4 %5dpi P%1/%2 %3x%4 %5dpi <html><h2>DjVuLibre DjView %1</h2>%2<p>Viewer for DjVu documents<br><a href=%3>%3</a><br>Copyright © 2006-- Léon Bottou.</p><p align=justify><small>This program is free software. You can redistribute or modify it under the terms of the GNU General Public License as published by the Free Software Foundation. This program is distributed <i>without any warranty</i>. See the GNU General Public License for more details.</small></p></html> <html><h2>DjVuLibre DjView %1</h2>%2<p>Afficheur pour documents DjVu<br><a href=%3>%3</a><br>Copyright © 2006-- Léon Bottou.</p><p align=justify><small>Ce programme est un logiciel libre. Vous pouvez le redistribuer ou le modifier au titre des clauses de la «GNU General Public License», telle que publiée par la Free Software Foundation. Ce programme est distribué <i>sans aucune garantie</i>. Voir la «GNU General Public License» pour plus de détails.</small></p></html> Information - DjView dialog caption Information - DjView Metadata - DjView dialog caption Meta-information - DjView &Export as... File| &Exporter... Export DjVu page or document to other formats. Exporte la page ou le document DjVu sous un autre format. Export - DjView dialog caption Export - DjView Ctrl+S File|SaveAs Ctrl+S Ctrl+E File|ExportAs Ctrl+E Open &Recent Ouvrir un Fichier &Récent &Clear History &Effacer l'historique Open &Location... File| Ouvrir une UR&L... Open a remote DjVu document. Ouvre un document DjVu specifié par son URL. Ctrl+F3 Edit|Find Next Ctrl+F3 Ctrl+F2 Edit|Select Ctrl+F2 Ctrl+F9 Settings|Show sidebar Ctrl+F9 Ctrl+F10 Settings|Show toolbar Ctrl+F10 Ctrl+F11 View|FullScreen Ctrl+F11 Ctrl+F4 Layout|Continuous Ctrl+F4 Ctrl+F5 Layout|SideBySide Ctrl+F5 Open Location - DjView dialog caption Ouverture d'une URL - DjView Enter the URL of a DjVu document: Entrez l'URL d'un document DjVu: Open - DjView dialog caption Ouverture - DjView Show &Sidebar Settings| Panneau &Latéral Show &Toolbar Settings| &Barre d'outils Show Stat&usbar Settings| Ligne d'é&tat %1 files (*.%2);; save image filter Fichiers %1 (*.%2) %n characters %n caractère %n caractères Go: 1 page forward. Avancer de 1 page. Go: 1 page backward. Reculer de 1 page. Copy &URL Edit| Copie l'&URL Save an URL for the current page into the clipboard. Copie une URL qui monte la page courante dans le presse-papier. Copy &Outline Edit| Copie le &Sommaire Copy &Annotations Edit| Copie les &Annotations Copy text into the clipboard. Copie le texte correspondant à la sélection. Save text into a file. Enregistre le texte correspondant à la sélection dans un fichier. Copy image into the clipboard. Copie une image correspondant à la sélection. Save image into a file. Enregistre une image correspondant à la sélection dans un fichier. Zoom the selection to fit the window. Change le grossissement de façon à maximiser la sélection dans la fenêtre. Copy URL Copie l'URL Save into the clipboard an URL that highlights the selection. Copie une URL qui monte la page courante et met en valeur la sélection. Copy Maparea Copie la «Maparea» Save into the clipboard a maparea annotation expression for program djvused. Copie une directive d'annotation «maparea» correspondant à la sélection. Ctrl+C Edit|CopyURL Ctrl+C Save the djvused code for the outline into the clipboard. Copie la représentation «djvused» de la table des matières. Save the djvused code for the page annotations into the clipboard. Copie la representation «djvused» des annotations de la page courante. Co&ver Page Layout| Page de Cou&verture Ctrl+F6 Layout|CoverPage Ctrl+F6 F6 Layout|CoverPage F6 Show the cover page alone in side-by-side mode. Affiche la première page seule en mode côte à côte. &Right to Left Layout| &Droite à Gauche Ctrl+Shift+F6 Layout|RightToLeft Shift+F6 Layout|RightToLeft Shift+F6 Show pages right-to-left in side-by-side mode. Affiche les pages de droite à gauche en mode côte-à-côte. All files Tous les fichiers &Hidden Text Display| &Texte Caché Overlay a representation of the hidden text layer. Affiche le texte caché en sur-impression. Hidden Text modeCombo Texte Caché QDjViewApplication Usage: djview [options] [filename-or-url] Common options include: -help~~~Prints this message. -verbose~~~Prints all warning messages. -display <xdpy>~~~Select the X11 display <xdpy>. -geometry <xgeom>~~~Select the initial window geometry. -font <xlfd>~~~Select the X11 name of the main font. -style <qtstyle>~~~Select the QT user interface style. -fullscreen, -fs~~~Start djview in full screen mode. -page=<page>~~~Jump to page <page>. -zoom=<zoom>~~~Set zoom factor. -continuous=<yn>~~~Set continuous layout. -sidebyside=<yn>~~~Set side-by-side layout. Utilisation: djview [options] [fichier-ou-url] Options fréquentes: -help~~~Affiche ce message. -verbose~~~Affiche tous les messages d'erreur. -display <xdpy>~~~Sélectionne le terminal X windows <xdpy>. -geometry <xgeom>~~~Spécifie la position et la taille de la première fenêtre. -font <xlfd>~~~Sélectionne la police X windows <xlfd>. -style <qtstyle>~~~Sélectionne le style d'interface Qt. -fullscreen, -fs~~~Démarre djview en mode plein écran. -page=<page>~~~Va directement vers la page <page>. -zoom=<zoom>~~~Sélectionne un facteur de zoom. -continuous=<yn>~~~Sélectionne l'affichage continu des pages. -sidebyside=<yn>~~~Sélectionne l'affichage côte-à-côte des pages. cannot open '%1'. impossible d'ouvrir «%1». QDjViewAuthDialog Password: Mot de passe: User: Utilisateur: Authentication required - DjView Identification requise - DjView QDjViewDjVuExporter Question - DjView dialog caption Question - DjView <html> This file belongs to a non empty directory. Saving an indirect document creates many files in this directory. Do you want to continue and risk overwriting files in this directory?</html> <html> Ce fichier appartient à un répertoire qui n'est pas vide. La sauvegarde d'un document DjVu indirect crée de nombreux fichiers dans ce répertoire. Voulez-vous continuer et prendre le risque de remplacer des fichiers dans ce répertoire?</html> Con&tinue Con&tinuer &Cancel &Annuler Save job creation failed! L'operation d'enregistrement a échoué! Unknown error. Erreur inconnue. System error: %1. Erreur système: %1. DjVu Bundled Document Document DjVu «bundled» DjVu Files (*.djvu *.djv) Fichiers DjVu (*.djvu *.djv) DjVu Indirect Document Document DjVu «indirect» QDjViewErrorDialog DjView Error Erreur DjView &Ok &Ok Error - DjView dialog caption Erreur - DjView QDjViewExportDialog Dialog Dialogue Export Exporter Format: Format: &Document &Document C&urrent page Page &courante &Pages &Pages to à Destination Destination &Defaults &Défaults &Ok &Ok &Cancel &Annuler Stop Stop <html><b>Saving.</b><br/> You can save the whole document or a page range under a variety of formats. Selecting certain formats creates additional dialog pages for specifying format options.</html> <html><b>Enregistrer.</b><br/> Vous pouvez enregistrer le document entier ou un intervalle de pages sous divers formats. Certain formats font apparaître des pages supplémentaires permettant de spécifier les options de conversion.</html> Error - DjView dialog caption Erreur - DjView Overwriting the current file is not allowed! Impossible de remplacer le fichier DjVu courant! Question - DjView dialog caption Question - DjView A file with this name already exists. Do you want to replace it? Ce fichier existe déjà. Voulez-vous le remplacer? &Replace &Remplacer This operation has failed. Cette opération a échoué. This operation has been interrupted. Cette opération a été interrompue. All files save filter Tous les fichiers Export - DjView dialog caption Exporter - DjView QDjViewExportPS1 Form Form Color Couleur &Color &Couleur &GrayScale Niveaux de &gris Marks Marques Print image &frame Imprimer un &cadre Print crop &marks Imprimer des marques de &découpe PostScript PostScript Language Level Niveau PostScript QDjViewExportPS2 Form Form Scaling Agrandissement Scale to &fit the page Agrandir à la &page &Zoom &Zoom % % Orientation Orientation Automatic Automatique &Portrait &Portrait &Landscape P&aysage QDjViewExportPS3 Form Form Print sheets suitable for folding a booklet. Imprimer des feuillets à plier en fascicule. Advanced Options avancées Sheets per booklet: Pages par fascicule: Unlimited non limité at most au plus Print Imprimer rectos and versos. les rectos et versos. rectos only. les rectos seulement. versos only. les versos seulement. Shift rectos and versos by Décaler les versos de points. points. Center: Marge centrale: points points /100 /100 plus plus per page. par page. QDjViewExportPrn Form Form Color Couleur &Color &Couleur &GrayScale Niveaux de &gris Marks Marques Print image &frame Imprimer un &cadre Print crop &marks Imprimer des marques de &découpe Scaling Agrandissement Scale to &fit the page Agrandir à la &page &Zoom &Zoom % % Orientation Orientation Automatic Automatique &Portrait &Portrait &Landscape P&aysage QDjViewExportTiff Form Form Resolution Résolution Maximum image resolution Résolution maximale dpi dpi Compression Compression JPEG &quality &Qualité JPEG Force &bitonal G4 compression. Force la compression &bitonale CCITT G4. Allow &lossy JPEG compression. Autorise la com&pression JPEG. Allow &deflate compression. Autorise la compression «&deflate». QDjViewFind Case sensitive Même casse Words only Mots entiers seulement Find Previous (Shift+F3) Précédent (Maj+F3) Find Next (F3) Suivant (F3) Options Options <html><b>Finding text.</b><br/> Search hits appear progressively as soon as you type a search string. Typing enter jumps to the next hit. To move to the previous or next hit, you can also use the arrow buttons or the shortcuts <tt>F3</tt> or <tt>Shift-F3</tt>. You can also double click a page name. Use the <tt>Options</tt> menu to search words only or to specify the case sensitivity.</html> <html><b>Recherche de texte.</b><br/> Les occurrences du texte à rechercher apparaissent progressivement pendant sa saisie. La touche «Entrée» montre la prochaine occurrence. Pour aller à l'occurrence précédente ou suivante, utilisez les boutons fléchés ou les touches <tt>F3</tt> et <tt>Maj+F3</tt>. Vous pouvez aussi double cliquer un nom de page. Le menu <tt>Options</tt> permet de chercher des mots entiers ou de spécifier la casse.</html> Regular expression Expression régulière Reset search options to default values. Réinitialise les options de recherche à leur valeurs par défaut. Specify whether search hits must begin on a word boundary. Determine si les occurrences commencent toujours sur une limite de mot. Specify whether searches are case sensitive. Determine si la recherche est sensible à la casse des caractères. Regular expressions describe complex string matching patterns. Les expressions régulières décrivent des recherches compliquées. <html><b>Regular Expression Quick Guide</b><ul><li>The dot <tt>.</tt> matches any character.</li><li>Most characters match themselves.</li><li>Prepend a backslash <tt>\</tt> to match special characters <tt>()[]{}|*+.?!^$\</tt>.</li><li><tt>\b</tt> matches a word boundary.</li><li><tt>\w</tt> matches a word character.</li><li><tt>\d</tt> matches a digit character.</li><li><tt>\s</tt> matches a blank character.</li><li><tt>\n</tt> matches a newline character.</li><li><tt>[<i>a</i>-<i>b</i>]</tt> matches characters in range <tt><i>a</i></tt>-<tt><i>b</i></tt>.</li><li><tt>[^<i>a</i>-<i>b</i>]</tt> matches characters outside range <tt><i>a</i></tt>-<tt><i>b</i></tt>.</li><li><tt><i>a</i>|<i>b</i></tt> matches either regular expression <tt><i>a</i></tt> or regular expression <tt><i>b</i></tt>.</li><li><tt><i>a</i>{<i>n</i>,<i>m</i>}</tt> matches regular expression <tt><i>a</i></tt> repeated <tt><i>n</i></tt> to <tt><i>m</i></tt> times.</li><li><tt><i>a</i>?</tt>, <tt><i>a</i>*</tt>, and <tt><i>a</i>+</tt> are shorthands for <tt><i>a</i>{0,1}</tt>, <tt><i>a</i>{0,}</tt>, and <tt><i>a</i>{1,}</tt>.</li><li>Use parentheses <tt>()</tt> to group regular expressions before <tt>?+*{</tt>.</li></ul></html> <html><b>Expressions régulières</b><ul><li>Le point <tt>.</tt> représente un caractère arbitraire.</li><li>La plupart des caractères ne représentent qu'eux mêmes.</li><li>Utilisez un <tt>\</tt> avant les caractères spéciaux <tt>()[]{}|*+.?!^$\</tt>.</li><li><tt>\b</tt> représente une frontière de mot.</li><li><tt>\w</tt> représente un caractère appartenant à un mot.</li><li><tt>\d</tt> représente un caractère numérique.</li><li><tt>\s</tt> représente un caractère d'espacement.</li><li><tt>\n</tt> représente le marqueur de fin de ligne.</li><li><tt>[<i>a</i>-<i>b</i>]</tt> représente un caractère dans l'intervalle <tt><i>a</i></tt>-<tt><i>b</i></tt>.</li><li><tt>[^<i>a</i>-<i>b</i>]</tt> représente un caractère hors de l'intervalle <tt><i>a</i></tt>-<tt><i>b</i></tt>.</li><li><tt><i>a</i>|<i>b</i></tt> représente soit l'expression <tt><i>a</i></tt>, soit l'expression <tt><i>b</i></tt>.</li><li><tt><i>a</i>{<i>n</i>,<i>m</i>}</tt> représente de <tt><i>n</i></tt> à <tt><i>m</i></tt> répétitions de l'expression <tt><i>a</i></tt>.</li><li><tt><i>a</i>?</tt>, <tt><i>a</i>*</tt>, et <tt><i>a</i>+</tt> sont des abbréviations pour <tt><i>a</i>{0,1}</tt>, <tt><i>a</i>{0,}</tt>, et <tt><i>a</i>{1,}</tt>.</li><li>Utilisez les parenthèses <tt>()</tt> pour grouper une expression avant <tt>?+*{</tt>.</li></ul></html> QDjViewFind::Model 1 hit 1 occurrence Page %1 (1 hit) Page %1 (1 occurrence) Searching page %1 (waiting for data.) Page %1 (attente des données.) Searching page %1. Page %1. No hits! Rien! <html>Document is not searchable. No page contains information about its textual content.</html> <html>Recherche de texte impossible. Ce document ne contient pas d'information sur le texte.</html> %n hits %n occurrence %n occurrences Page %1 (%n hits) Page %1 (%n occurence) Page %1 (%n occurences) <html>Invalid regular expression.</html> <html>Expression régulière invalide.</html> QDjViewImgExporter Cannot render page. Impossible de dessiner la page. Image format %1 not supported. Le format de fichier image «%1» n'est pas supporté. %1 Image JPG Image Images %1 %1 Files (*.%2) JPG Files Fichiers %1 (*.%2) QDjViewInfoDialog File # Fichier n° File Name Nom File Size Taille File Type Type Page # Page n° Page Title Titre Waiting for data... Attende des données... Page #%1 - « %2 » Page n° %1 - « %2 » Page #%1 Page n° %1 Thumbnails Vignettes Shared annotations Annotations partagées Shared data Données partagées File #%1 - Fichier n° %1 - Single DjVu page Page DjVu simple Bundled DjVu document Document DjVu «bundled» Indirect DjVu document Document DjVu «indirect» Obsolete bundled DjVu document Document DjVu «bundled» obsolète Obsolete indexed DjVu document Document DjVu «indexed» obsolète n/a n/d Page Page Thumbnails Vignettes Shared Partagé Dialog Dialogue &Document &Document &File &Fichier File: Fichier: &View Page &Voir cette Page &Close &Fermer <html><b>Document information</b><br>This panel shows information about the document and its component files. Select a component file to display detailled information in the <tt>File</tt> tab. Double click a component file to show the corresponding page in the main window. </html> <html><b>Information sur le document</b><br>Ce panneau montre les informations sur le document et les fichiers qui le composent. Sélectionnez un nom de fichier pour afficher ses informations sous l'index <tt>Fichier</tt>. Double-cliquez un nom de fichier pour montrer la page correspondante </html> <html><b>File and page information</b><br>This panel shows the structure of the DjVu data corresponding to the component file or the page selected in the <tt>Document</tt> tab. The arrow buttons jump to the previous or next component file.</html> <html><b>Informations sur un fichier</b><br>Ce panneau montre la structure des données DjVu correspondant au fichier ou à la page sélectionnée dans l'onglet <tt>Document</tt>. Les flèches vous permettent de naviguer vers le fichier précédent ou suivant.</html> 1 file 1 fichier %n files %n fichier %n fichiers 1 page 1 page %n pages %n page %n pages QDjViewMetaDialog Ctrl+C copy Ctrl+C Key Type Value Valeur <html><b>Document metadata</b><br>This panel displays metadata pertaining to the document, such as author, title, references, etc. This information can be saved into the document with program <tt>djvused</tt>: use the commands <tt>create-shared-ant</tt> and <tt>set-meta</tt>.</html> <html><b>Méta informations sur le document</b><br>Ce panneau montre les informations supplémentaires sur le document: auteur, titre, références, etc. Ces informations peuvent être ajoutées au document en utilisant les commandes <tt>create-shared-ant</tt> and <tt>set-meta</tt> du programme <tt>djvused</tt>.</html> <html><b>Page metadata</b><br>This panel displays metadata pertaining to a specific page. Page specific metadata override document metadata. This information can be saved into the document with program <tt>djvused</tt>: use command <tt>select</tt> to select the page and command <tt>set-meta</tt> to specify the metadata entries.</html> <html><b>Méta informations sur le document</b><br>Ce panneau montre les informations supplémentaires sur la page sélectionnée. Ces informations ont priorité sur celles se rapportant au document dans son ensemble. Elles peuvent être ajoutées en utilisant les commandes <tt>select</tt> and <tt>set-meta</tt> du programme <tt>djvused</tt>.</html> Dialog Dialogue &Document Metadata &Document &Page Metadata &Page Page: Page: &View Page &Voir cette Page &Close &Fermer QDjViewOutline <html><b>Document outline.</b><br/> This panel display the document outline, or the page names when the outline is not available, Double-click any entry to jump to the selected page.</html> <html><b>Chapitres.</b><br/> Ce panneau montre la structure en chapitres enregistrée dans le document. Lorsque cette information n'est pas disponible, les noms de pages sont affichés. Double-cliquez une entrée pour voir la page correspondante.</html> Outline data is corrupted La table des matières est illisible Pages Pages Page %1 Page %1 Go: page %1. Go: page %1 Aller page %1. Go: %1 Go: %1. Aller vers %1 QDjViewPSExporter PostScript tab caption PostScript Position tab caption Position Booklet tab caption Fascicule <html><b>Producing booklets.</b><br>The booklet mode prints the selected pages as sheets suitable for folding one or several booklets. Several booklets might be produced when a maximum number of sheets per booklet is specified. You can either use a duplex printer or print rectos and versos separately.<p> Shifting rectos and versos is useful with poorly aligned duplex printers. The center margins determine how much space is left between the pages to fold the sheets. This space slowly increases from the inner sheet to the outer sheet.</html> <html><b>Production de fascicules.</b><br>Le mode fascicule permet d'imprimer des feuillets à plier en un ou plusieurs fascicules. Plusieurs fascicules sont nécessaires lorsqu'un nombre maximum de feuillets est spécifié. Vous pouvez utiliser une imprimante recto-verso ou imprimer séparément les rectos et les versos<p> Décaler les versos est utile pour les imprimantes recto-versos mal alignées. La marge centrale peut être modifiée et augmente lors de la progression du feuillet intérieur vers le feuillet extérieur.</html> Save job creation failed! L'operation d'enregistrement a échoué! <html><b>PostScript options.</b><br>Option <tt>Color</tt> enables color printing. Document pages can be decorated with frame and crop marks. PostScript language level 1 is only useful with very old printers. Level 2 works with most printers. Level 3 print color document faster on recent printers.</html> <html><b>Options PostScript.</b><br>L'option <tt>Couleur</tt> autorise l'impression en couleur. Les pages imprimées peuvent être décorées avec un cadre ou des marques de découpage. Le niveau PostScript 1 est utile pour les très vieilles imprimantes. Le niveau 2 fonctionne avec la plupart des imprimantes en service. Le niveau 3 imprime les documents en couleur plus rapidement sur des imprimantes récentes.</html> <html><b>Position and scaling.</b><br>Option <tt>Scale to fit</tt> accommodates whatever paper size your printer uses. Zoom factor <tt>100%</tt> reproduces the initial document size. Orientation <tt>Automatic</tt> chooses portrait or landscape on a page per page basis.</html> <html><b>Position and aggrandissement.</b><br>L'option <tt>Agrandir à la page</tt> choisit un grossissement adapté a la taille de papier utilisée par votre imprimante. Le facteur de grossissement <tt>100%</tt> reproduit la taille originale du document. L'orientation <tt>Automatique</tt> sélectionne portrait ou paysage en fonction de la taille de chaque page.</html> PostScript PostScript PostScript Files (*.ps *.eps) Fichiers PostScript (*.ps *.eps) Encapsulated PostScript PostScript Encapsulé QDjViewPdfExporter PDF Document Document PDF PDF Files (*.pdf) Fichiers PDF (*.pdf) PDF Options tab caption Options PDF <html><b>PDF options.</b><br>These options control the characteristics of the images embedded in the exported PDF files. The resolution box limits their maximal resolution. Forcing bitonal G4 compression encodes all pages in black and white using the CCITT Group 4 compression. Allowing JPEG compression uses lossy JPEG for all non bitonal or subsampled images. Otherwise, allowing deflate compression produces more compact files. </html> <html><b>Options PDF.</b><br>Ces options s'appliquent aux images encapsulées dans les fichiers PDF exportés. La boite de résolution spécifie leur résolution maximale. Forcer la compression bitonale G4 encode toutes les pages en noir et blanc avec la compression CCITT Groupe 4. Autoriser la compression JPEG utilise JPEG pour toutes les images en niveaux de gris ou en couleurs. Sinon, autoriser la compression «deflate» produit des fichiers plus compacts.</html> Error while creating pdf file. Erreur pendant la création du fichier PDF. PDF export was not compiled. L'exportation de fichiers PDF n'a pas été compilée. Unable to create output file. Impossible de créer le fichier de sortie. System error: %1. Erreur système: %1. Unable to reopen temporary file. Impossible de réouvrir le fichier temporaire. Unable to create temporary file. Impossible de créer le fichier temporaire. QDjViewPlugin::Document Requesting %1. Chargement de %1. QDjViewPrefsDialog Dialog Dialogue Gamma Gamma Darker Foncé Lighter Clair <html>Screen color correction.<br>Adjust slider until gray shades look similar.</html> <html>Correction de couleur pour l'écran.<br>Adjustez le potentionmètre de façon à rendre les niveaux de gris similaires.</html> &Interface &Interface Options for Options pour Standalone Viewer Application Full Screen Standalone Viewer Application Plein-Écran Full Page Plugin Plugin Pleine-Page Embedded Plugin Plugin en Ligne &Remember initial state from last invocation Mémo&riser les dernières options utilisées Show Élements &Menu bar Barre de &menu &Tool bar Barre d'ou&tils Sc&rollbars Barres de &défilement Stat&us bar Barre d'ét&at &Side bar Panneau &latéral Display Affichage Force inverted luminance Force inverted luminance. Forcer une inversion de luminance &Zoom: &Zoom: Display page &frames Ca&dres de pages Display &annotations &Annotations &Keys &Touches Keys Touches For displaying hyper&links: Pour montrer les &liens: For &selecting text or images: Pour &selectionner texte ou images: For displaying the &lens: Pour la &loupe: Mouse wheel Molette Mouse wheel scrolls the page Mouse wheel scrolls the page. La molette de la souris fait défiler l'écran Mouse wheel changes the zoom factor Mouse wheel changes the zoom factor. La molette de la souris change le grossissement &Lens &Loupe Enable magnifying &lens Autorise l'utilisation de la &loupe Lens options Options de la loupe Lens &size: T&aille: Magnifying &power: &Grossissement: x x pixels points Cache Cache &Clear &Effacer &Decoded page cache: Cache de pages &décodées: &Pixel cache: Cache de &pixels: &Network &Réseau Use pro&xy to access the network Utiliser un pro&xy pour accéder au réseau Proxy settings Options du proxy Pass&word: Mot de pa&sse: &User: &Utilisateur: &Port: &Port: &Host: &Hôte: Interface Interface Force language (next time djview runs) Force language (when djview is restarted.) Langue utilisée (après le prochain démarrage) Enable page animations Enable animations Autoriser l'animation des pages Show hidden text in status bar Affiche le texte caché dans la barre d'état Override saving and printing restrictions Outrepasse les restrictions d'impression et de sauvegarde &Defaults &Défaults &Apply &Appliquer &Ok &Ok Cancel Annuler Preferences[*] - DjView Préférences[*] - DjView <html><b>Initial interface setup.</b><br>DjView can run as a standalone viewer, as a full screen viewer, as a full page browser plugin, or as a plugin embedded inside a html page. For each case, check the <tt>Remember</tt> box to automatically save and restore the interface setup. Otherwise, specify an initial configuration.</html> <html><b>Configuration initiale.</b><br>DjView peut fonctionner comme application normale, comme application plein-écran, comme plugin pleine-page, ou plugin en ligne dans une page web. Dans chaque cas, sélectionnez l'option <tt>Mémoriser...</tt> pour retenir la dernière configuration utilisée dans ce mode. Sinon, spécifiez les détails de la configuration initiale desirée.</html> <html><b>Modifiers keys.</b><br>Define which combination of modifier keys will show the manifying lens, temporarily enable the selection mode, or highlight the hyperlinks.</html> <html><b>Touches spéciales.</b><br>Definissez quelles combinaisons de touches spéciales seront affectées à la loupe, à la selection de texte et d;images, et à l'affichage temporaire des liens.</html> <html><b>Magnifying lens.</b><br>The magnifying lens appears when you depress the modifier keys specified in tab <tt>Keys</tt>. This panel lets you choose the power and the size of the magnifying lens.</html> <html><b>Loupe.</b><br>La loupe apparaît lorsque vous maintenez les touches spéciales définies dans l'onglet <tt>Touches</tt>. Ce panneau vous permet d'en spécifier la taille et le grossissement.</html> <html><b>Advanced.</b><br>You can override the default interface language, disable the page animations, or enable additional menu entries that are useful for authoring DjVu files.You can also disable the printing or saving restrictions dictated by certain web sites. The manual color correction can be useful with old printers.</html> <html><p><b>Advanced.</b>You can override the default interface language, disable the page animations, or enable additional menu entries that are useful for authoring DjVu files.You can also disable the printing or saving restrictions dictated by certain web sites. The manual color correction can be useful with old printers.</html> <html><b>Options avancées</b><br>Vous pouvez changer la langue de l'interface, supprimer les animations, ou dévoiler des entrées de menus supplémentaires utiles pour la création de documents DjVu. Vous pouvez également ignorer les restrictions d'impression et de sauvegarde spécifiées par le site web. La correction manuelle des couleurs d'impression peut être utile avec certaines vieilles imprimantes.</html> <html><b>Network proxy settings.</b><br>These proxy settings are used when the standalone djview viewer accesses a djvu document through a http url. The djview plugin always uses the proxy settings of the web browser.<p><b>Cache settings.</b><br>The <i>pixel cache</i> stores image data located outside the visible area. This cache makes panning smoother. The <i>decoded page cache</i> contains partially decoded pages. It provides faster response times when navigating a multipage document or when returning to a previously viewed page. Clearing this cache might be useful to reflect a change in the page data without restarting the DjVu viewer.</html> <html><b>Options du réseau.</b><br>Ce panneau permet de définir un proxy utilisé pour atteindre un document DjVu distant avec le protocole réseau HTTP. Ces options sont ignorées lorsque le programme fonctionne en mode plugin: les accès réseaux utilisent alors les options du navigateur hôte.<p><b>Caches.</b><br>Le <i>cache de pixels</i> contient des portions d'images situées en limite de la zone visible. Il permet des défilements plus fluides. Le <i>cache de page décodées</i> contient des pages partiellement décodées. Il permet de parcourir plus rapidement des documents à pages multiples. Effacer ce cache peut être utile pour prendre en compte un fichier modifié sans redemarrer l'application.</html> <html><b>Screen gamma correction.</b><br>The best color rendition is achieved by adjusting the gamma correction slider and choosing the position that makes the gray square as uniform as possible.<p><b>Screen resolution.</b><br>This option forces a particular resolution instead of using the unreliable resolution advertised by the operating system. Forcing the resolution to 100 dpi matches the behavior of the djvulibre command line tools.</html> <html><b>Correction de couleur pour l'écran.</b><br>Le meilleur rendu est obtenu en ajustant le potentiomètre de façon à rendre les niveaux de gris de la mire aussi proches que possible.<p><b>Résolution de l'écran.</b><br>Forcer une résolution particulière est utile quand le système donne une résolution qui ne correspond pas à la réalité. Forcer une résolution de 100dpi rend l'affichage compatible avec les programmes utilitaires de DjVuLibre.</html> &Screen &Écran Force screen &resolution Forcer la &résolution de l'écran dpi dpi &Advanced Options &avancées Miscellaneous Divers Manual printer color correction Correction manuelle de couleur d'impression gamma= gamma= Enable advanced features in menus Montrer les fonctions avancées dans les menus MB MB Layout Layout Continuous Pages en continu Side-by-side Pages Côte à Côte Cover Page Page de Couverture Right-to-Left De Droite à Gauche QDjViewPrintDialog Dialog Dialogue Print Imprimer &Document &Document C&urrent page Page &courante &Pages &Pages to à Destination Destination &Ok &Ok &Cancel &Annuler Stop Stop This operation has failed. Cette opération a échoué. This operation has been interrupted. Cette opération a été interrompue. <html><b>Printing.</b><br/> You can print the whole document or a page range. Use the <tt>Choose</tt> button to select a print destination and specify printer options. Additional dialog tabs might appear to specify conversion options.</html> <html><b>Impression.</b><br/> Vous pouvez imprimer le document entier ou un intervalle de pages. Utilisez le bouton <tt>Choisir</tt> pour selectionner une destination d'impression. Des onglets supplémentaires peuvent apparaître pour spécifier des options de conversion adaptées à l'imprimante.</html> &Defaults &Défaults Print to file Imprimer vers un fichier Printer name: Imprimante: Choose Choisir All files save filter Tous les fichiers Print To File - DjView dialog caption Imprimer vers un fichier - DjView Question - DjView dialog caption Question - DjView A file with this name already exists. Do you want to replace it? Ce fichier existe déjà. Voulez-vous le remplacer? &Replace &Remplacer (invalid printer) (imprimante invalide) QDjViewPrnExporter Printer data Données d'impression PRN Files (*.prn) Fichiers PRN (*.prn) Printing Options tab caption Options d'impression <html><b>Printing options.</b><br>Option <tt>Color</tt> enables color printing. Document pages can be decorated with a frame. Option <tt>Scale to fit</tt> accommodates whatever paper size your printer uses. Zoom factor <tt>100%</tt> reproduces the initial document size. Orientation <tt>Automatic</tt> chooses portrait or landscape on a page per page basis.</html> <html><b>Options d'impression.</b><br>L'option <tt>Couleur</tt> autorise l'impression en couleur. Les pages imprimées peuvent être décorées avec un cadre. L'option <tt>Agrandir à la page</tt> choisit un grossissement adapté a la taille de papier utilisée par votre imprimante. Le facteur de grossissement <tt>100%</tt> reproduit la taille originale du document. L'orientation <tt>Automatique</tt> sélectionne portrait ou paysage en fonction de la taille de chaque page.</html> Cannot render page %1. Impossible de dessiner la page «%1». QDjViewSaveDialog &Cancel &Annuler Dialog Dialogue Save Enregistrement &Document &Document C&urrent page Page &courante &Pages &Pages to à Destination Destination Stop Stop Format: Format: &Ok &Ok Error - DjView dialog caption Erreur - DjView Overwriting the current file is not allowed! Impossible de remplacer le fichier DjVu courant! Question - DjView dialog caption Question - DjView A file with this name already exists. Do you want to replace it? Ce fichier existe déjà. Voulez-vous le remplacer? &Replace &Remplacer This operation has failed. Cette opération a échoué. This operation has been interrupted. Cette opération a été interrompue. All files save filter Tous les fichiers Save - DjView dialog caption Enregistrer - DjView <html><b>Saving.</b><br/> You can save the whole document or a page range. The bundled format creates a single file. The indirect format creates multiple files suitable for web serving.</html> <html><b>Saving.</b><br/> Vous pouvez enregistrer le document entier ou quelques pages. Le format DjVu «bundled» consiste en un fichier unique contenant toutes les pages. Le format DjVu «indirect» consiste en une collection de fichiers appropriés pour un serveur Web.</html> Bundled DjVu Document Document DjVu «bundled» Indirect DjVu Document Document DjVu «indirect» QDjViewThumbnails Tiny thumbnail menu Minuscules Small thumbnail menu Petites Medium thumbnail menu Moyennes Large thumbnail menu Grandes Smart thumbnail menu Calcul Intelligent Control Left Mouse Button Control et bouton gauche de la souris Right Mouse Button Bouton droit de la souris <html><b>Document thumbnails.</b><br/> This panel display thumbnails for the document pages. Double click a thumbnail to jump to the selected page. %1 to change the thumbnail size or the refresh mode. The smart refresh mode only computes thumbnails when the page data is present (displayed or cached.)</html> <html><b>Vignettes.</b><br/> Ce panneau montre des vignettes représentant les pages du document. Double cliquer une vignette pour voir une page. %1 pour afficher un menu permettant de changer la taille des vignettes et leur mode de calcul. Le mode de calcul intelligent ne calcule que les vignettes pour lesquelles les données sont disponibles en mémoire.</html> QDjViewTiffExporter TIFF Options tab caption Options TIFF Cannot open output file. Impossible d'ouvrir le fichier destination. Out of memory. Mémoire pleine. TIFF export has not been compiled. L'exportation de fichier TIFF n'est pas compilée. Internal error. Erreur interne. TIFF Document Documents TIFF TIFF Files (*.tiff *.tif) Fichiers TIFF (*.tiff *.tif) <html><b>TIFF options.</b><br>The resolution box specifies an upper limit for the resolution of the TIFF images. Forcing bitonal G4 compression encodes all pages in black and white using the CCITT Group 4 compression. Allowing JPEG compression uses lossy JPEG for all non bitonal or subsampled images. Otherwise, allowing deflate compression produces more compact (but less portable) files than the default packbits compression.</html> <html><b>Options TIFF.</b><br>La boite de résolution spécifie la résolution maximale de chaque image dans le fichier TIFF. Forcer la compression bitonale G4 encode toutes les pages en noir et blanc avec la compression CCITT Groupe 4. Autoriser la compression JPEG utilise JPEG pour toutes les images en niveaux de gris ou en couleurs. Sinon, autoriser la compression «deflate» produit des fichiers plus compacts (mais moins portables) que la compression par défaut «packbits».</html> QDjVuNetDocument Requesting '%1' Chargement de «%1» QDjVuNetDocument::Private Received http status %1 while retrieving %2. %1 is an http status code La requête %2 a produit le code d'erreur http %1. Received <%1> data while retrieving %2. %1 is a mime type La requête %2 a produit des données de type %1. %1 while retrieving '%2'. %1 pendant le chargement de «%2». Cannot validate the certificate for server %1. Erreur de validation du certificat du serveur %1. Authentication required for %1 (%2). Identification requise pour %1 (%2). Authentication required for proxy %1. Identification requise pour le proxy %1. djview4/src/djview_ru.ts000066400000000000000000005215771174072760700156230ustar00rootroot00000000000000 Generic thisLanguage Name of THIS language РуÑÑкий QApplication Option '-fix' is deprecated. Параметр «-fix» уÑтарел. QDjView 100% zoomCombo 100% &100% Zoom| &100% 1:1 zoomCombo 1:1 150% zoomCombo 150% 150% Zoom| 150% %1 files (*.%2);; save image filter %1 файлы (*.%2);; 200% zoomCombo 200% &200% Zoom| &200% 300% zoomCombo 300% &300% Zoom| &300% &50% Zoom| &50% 50% zoomCombo 50% 75% zoomCombo 75% &75% Zoom| &75% About DjView О DjView &About DjView... &О DjView... All files save filter Ð’Ñе файлы Background modeCombo Фон &Background Display| &Фон &Backward Go| &Ðазад Backward in history. ВернутьÑÑ Ð½Ð°Ð·Ð°Ð´ по иÑтории. Cannot decode document. Ðе удаетÑÑ Ð´ÐµÐºÐ¾Ð´Ð¸Ñ€Ð¾Ð²Ð°Ñ‚ÑŒ документ. Cannot decode page %1. Ðе удаетÑÑ Ð´ÐµÐºÐ¾Ð´Ð¸Ñ€Ð¾Ð²Ð°Ñ‚ÑŒ Ñтраницу '%1'. Cannot determine file format. Filename '%1' has no suffix. Ðевозможно определить формат файла. Ð˜Ð¼Ñ Ñ„Ð°Ð¹Ð»Ð° '%1' не имеет ÑуффикÑа. Cannot find page named: %1 Ðе удаетÑÑ Ð½Ð°Ð¹Ñ‚Ð¸ Ñтраницу Ñ Ð½Ð°Ð·Ð²Ð°Ð½Ð¸ÐµÐ¼ %1 Cannot find page numbered: %1 Ðе удаетÑÑ Ð½Ð°Ð¹Ñ‚Ð¸ Ñтраницу Ñ Ð½Ð¾Ð¼ÐµÑ€Ð¾Ð¼ %1 cannot open '%1'. не удаетÑÑ Ð¾Ñ‚ÐºÑ€Ñ‹Ñ‚ÑŒ '%1'. Cannot open file '%1'. Ðе удаетÑÑ Ð¾Ñ‚ÐºÑ€Ñ‹Ñ‚ÑŒ файл '%1'. Cannot open URL '%1'. Ðе удаетÑÑ Ð¾Ñ‚ÐºÑ€Ñ‹Ñ‚ÑŒ URL '%1'. Cannot resolve link '%1' Ðевозможно разрешить ÑÑылку '%1' Cannot spawn a browser for url '%1' Ðевозможно запуÑтить браузер Ð´Ð»Ñ URL '%1' Cannot write file '%1'. %2. Ðе удаетÑÑ Ð·Ð°Ð¿Ð¸Ñать файл '%1'. %2. &Clear History &ОчиÑтить иÑторию &Close File| &Закрыть Close all windows and quit the application. Закрыть вÑе окна и завершить приложение. Close this window. Закрыть окно. &Color Display| &Цвет Color modeCombo Цвет &Continuous Layout| &Ðепрерывный Control Left Mouse Button Control + Ð»ÐµÐ²Ð°Ñ ÐºÐ½Ð¾Ð¿ÐºÐ° мыши Copy image (%1x%2 pixels) Скопировать изображение (%1x%2 пикÑелов) Copy text (%1) Скопировать текÑÑ‚ (%1) Create a new DjView window. Открыть новое окно DjView. Ctrl+E File|ExportAs Ctrl+E Ctrl+F Edit|Find Ctrl+F Ctrl+F10 Settings|Show toolbar Ctrl+F10 Ctrl+F11 View|FullScreen Ctrl+F11 Ctrl+F2 Edit|Select Ctrl+F2 Ctrl+F3 Edit|Find Next Ctrl+F3 Ctrl+F4 Layout|Continuous Ctrl+F4 Ctrl+F5 Layout|SideBySide Ctrl+F5 Ctrl+F9 Settings|Show sidebar Ctrl+F9 Ctrl+I Edit|Information Ctrl+I Ctrl+M Edit|Metadata Ctrl+M Ctrl+N File|New Ctrl+N Ctrl+O File|Open Ctrl+O Ctrl+P File|Print Ctrl+P Ctrl+Q File|Quit Ctrl+Q Ctrl+S File|SaveAs Ctrl+S Ctrl+W File|Close Ctrl+W Decoding DjVu document Декодирование документа DjVu Decrease the magnification. Уменьшить маÑштаб. Deprecated option '%1' УÑтаревший параметр «%1» &Display View|Display По&казывать Display everything. Показывать вÑÑ‘. DjView DjView DjVu files Файлы DjVu &Edit Edit| &Правка Enter the URL of a DjVu document: Введите Ð°Ð´Ñ€ÐµÑ URL документа DjVu: Error - DjView dialog caption Ошибка — DjView &Export as... File| &ЭкÑпорт... Export - DjView dialog caption ЭкÑпорт — DjView Export DjVu page or document to other formats. ЭкÑпортировать Ñтраницы или документ DjVu в другие форматы. F10 Settings|Show toolbar F10 F11 View|FullScreen F11 F2 Edit|Select F2 F3 Edit|Find Next F3 F4 Layout|Continuous F4 F5 Layout|SideBySide F5 F9 Settings|Show sidebar F9 &File File| &Файл &Find... Edit| &Ðайти... Find &Next Edit| Ðайти &далее Find next occurence of search text in the document. Ðайти Ñледующее вхождение текÑта в документе. Find &Previous Edit| Ðайти &ранее Find previous occurence of search text in the document. Ðайти предыдущее вхождение текÑта в документе. Find text in the document. Ðайти текÑÑ‚ в документе. &First Page Go| &ÐŸÐµÑ€Ð²Ð°Ñ Ñтраница FitPage zoomCombo Страница целиком Fit &Page Zoom| &Страница целиком FitWidth zoomCombo По ширине Ñтраницы Fit &Width Zoom| По &ширине Ñтраницы Foreground modeCombo Передний план &Foreground Display| &Передний план &Forward Go| &Вперёд Forward in history. Вперёд по иÑтории. F&ull Screen View| Ðа веÑÑŒ &Ñкран &Go Go| Пере&ход Go: page %1. Перейти к Ñтранице %1. &Help Help| &Справка <html><b>Continuous layout.</b><br/> Display all the document pages arranged vertically inside the scrollable document viewing area.</html> <html><b>Ðепрерывный вид (рулоном).</b><br/> Показывает вÑе Ñтраницы документа в вертикальном раÑположении в прокручиваемой облаÑти проÑмотра документа.</html> <html><b>Cursor information.</b><br/> Display the position of the mouse cursor expressed in page coordinates. </html> <html><b>Ð˜Ð½Ñ„Ð¾Ñ€Ð¼Ð°Ñ†Ð¸Ñ ÐºÑƒÑ€Ñора.</b><br/> Показывает позицию курÑора мыши, выраженную в координатах Ñтраницы. </html> <html><b>Display mode.</b><br/> DjVu images compose a background layer and a foreground layer using a stencil. The display mode specifies with layers should be displayed.</html> <html><b>Режим отображениÑ.</b><br/> Ð˜Ð·Ð¾Ð±Ñ€Ð°Ð¶ÐµÐ½Ð¸Ñ DjVu ÑоÑтавлÑÑŽÑ‚ÑÑ Ð¸Ð· фона и оÑновного ÑÐ»Ð¾Ñ Ñ Ð¿Ð¾Ð¼Ð¾Ñ‰ÑŒÑŽ трафарета. Режим Ð¾Ñ‚Ð¾Ð±Ñ€Ð°Ð¶ÐµÐ½Ð¸Ñ Ð·Ð°Ð´Ð°ÐµÑ‚ Ñлои, которые должны отображатьÑÑ.</html> <html><b>Document and page information.</b><br> Display a dialog window for viewing encoding information pertaining to the document or to a specific page.</html> <html><b>Ð˜Ð½Ñ„Ð¾Ñ€Ð¼Ð°Ñ†Ð¸Ñ Ð¾ документе и Ñтранице.</b><br> Отображает диалоговое окно Ð´Ð»Ñ Ð¿Ñ€Ð¾Ñмотра информации, отноÑÑщейÑÑ Ðº документу или к отдельной Ñтранице.</html> <html><b>Document and page metadata.</b><br> Display a dialog window for viewing metadata pertaining to the document or to a specific page.</html> <html><b>Метаданные документа и Ñтраниц.</b><br> Отображает диалоговое окно Ð´Ð»Ñ Ð¿Ñ€Ð¾Ñмотра метаданных, отноÑÑщихÑÑ Ðº документу или к отдельной Ñтранице.</html> <html><b>Document viewing area.</b><br/> This is the main display area for the DjVu document. But you must first open a DjVu document to see anything.</html> <html><b>ОблаÑть проÑмотра документа.</b><br/> Это — оÑÐ½Ð¾Ð²Ð½Ð°Ñ Ð¾Ð±Ð»Ð°Ñть Ð¾Ñ‚Ð¾Ð±Ñ€Ð°Ð¶ÐµÐ½Ð¸Ñ Ð´Ð¾ÐºÑƒÐ¼ÐµÐ½Ñ‚Ð° DjVu. Ðо чтобы что-то увидеть, вы должны Ñначала открыть документ DjVu.</html> <html><b>Document viewing area.</b><br/> This is the main display area for the DjVu document. <ul><li>Arrows and page keys to navigate the document.</li><li>Space and BackSpace to read the document.</li><li>Keys <tt>+</tt> <tt>-</tt> <tt>[</tt> <tt>]</tt> to zoom or rotate the document.</li><li>Left Mouse Button for panning and selecting links.</li><li>%3 for displaying the contextual menu.</li><li>%1 Left Mouse Button for selecting text or images.</li><li>%2 for popping the magnification lens.</li></ul></html> <html><b>ОблаÑть проÑмотра документа.</b><br/> Это — оÑÐ½Ð¾Ð²Ð½Ð°Ñ Ð¾Ð±Ð»Ð°Ñть Ð¾Ñ‚Ð¾Ð±Ñ€Ð°Ð¶ÐµÐ½Ð¸Ñ Ð´Ð¾ÐºÑƒÐ¼ÐµÐ½Ñ‚Ð° DjVu. <ul><li>ИÑпользуйте Ñтрелки и клавиши прокрутки Ñтраниц Ð´Ð»Ñ Ð¿ÐµÑ€ÐµÐ¼ÐµÑ‰ÐµÐ½Ð¸Ñ Ð¿Ð¾ документу.</li><li>Пробел и BackSpace — чтение документа.</li><li>Клавиши <tt>+</tt> <tt>-</tt> <tt>[</tt> <tt>]</tt> — изменение маÑштаба и поворот документа.</li><li>Ð›ÐµÐ²Ð°Ñ ÐºÐ»Ð°Ð²Ð¸ÑˆÐ° мыши — прокрутка и выбор ÑÑылок.</li><li>%3 — отображение контекÑтного меню.</li><li>%1 + Ð»ÐµÐ²Ð°Ñ ÐºÐ½Ð¾Ð¿ÐºÐ° мыши — выделение текÑта и изображений.</li><li>%2 — показ лупы.</li></ul></html> <html><b>Page information.</b><br/> Display information about the page located under the cursor: the sequential page number, the page size in pixels, and the page resolution in dots per inch. </html> <html><b>Ð˜Ð½Ñ„Ð¾Ñ€Ð¼Ð°Ñ†Ð¸Ñ Ð¾ Ñтранице.</b><br/> Показывает информацию о Ñтранице, ÐºÐ¾Ñ‚Ð¾Ñ€Ð°Ñ Ð½Ð°Ñ…Ð¾Ð´Ð¸Ñ‚ÑÑ Ð¿Ð¾Ð´ курÑором: порÑдковый номер Ñтраницы, размер в пикÑелах и разрешение в точках на дюйм. </html> <html><b>Rotating the pages.</b><br/> Choose to display pages in portrait or landscape mode. You can also turn them upside down.</html> <html><b>Поворот Ñтраниц.</b><br/> Выберите показ Ñтраниц в книжной или альбомной ориентации. Ð’Ñ‹ также можете перевернуть их.</html> <html><b>Selecting a rectangle.</b><br/> Once a rectangular area is selected, a popup menu lets you copy the corresponding text or image. Instead of using this tool, you can also hold %1 and use the Left Mouse Button.</html> <html><b>Выделение прÑмоугольной облаÑти.</b><br/> ПоÑле Ð²Ñ‹Ð´ÐµÐ»ÐµÐ½Ð¸Ñ Ð’Ñ‹ можете Ñкопировать текÑÑ‚ или изображение. ВмеÑто Ñтого инÑтрумента Ð’Ñ‹ также можете иÑпользовать левую кнопку мыши, ÑƒÐ´ÐµÑ€Ð¶Ð¸Ð²Ð°Ñ ÐºÐ»Ð°Ð²Ð¸ÑˆÑƒ %1.</html> <html><b>Side by side layout.</b><br/> Display pairs of pages side by side inside the scrollable document viewing area.</html> <html><b>Показ Ñтраниц парами.</b><br/> Отображает пары Ñтраниц Ñ€Ñдом в прокручиваемой облаÑти проÑмотра документа.</html> <html><b>Zooming.</b><br/> Choose a zoom level for viewing the document. Zoom level 100% displays the document for a 100 dpi screen. Zoom levels <tt>Fit Page</tt> and <tt>Fit Width</tt> ensure that the full page or the page width fit in the window. </html> <html><b>Изменение маÑштаба.</b><br/> Выберите маÑштаб Ð´Ð»Ñ Ð¿Ñ€Ð¾Ñмотра документа. МаÑштаб 100% подходит Ð´Ð»Ñ Ð¿Ñ€Ð¾Ñмотра документа на Ñкране 100 dpi (100 точек/дюйм). </html> Illegal value '%2' for option '%1'. ÐедопуÑтимое значение '%2' Ð´Ð»Ñ Ð¾Ð¿Ñ†Ð¸Ð¸ '%1'. Image format %1 not supported. Формат Ð¸Ð·Ð¾Ð±Ñ€Ð°Ð¶ÐµÐ½Ð¸Ñ %1 не поддерживаетÑÑ. Increase the magnification. Увеличить маÑштаб. &Information... Edit| &ИнформациÑ... Information - DjView dialog caption Ð˜Ð½Ñ„Ð¾Ñ€Ð¼Ð°Ñ†Ð¸Ñ â€” DjView (in other window.) (в новом окне) Jump to first document page. Перейти к первой Ñтранице документа. Jump to last document page. Перейти к поÑледней Ñтранице документа. Jump to next document page. Перейти к Ñледующей Ñтранице документа. Jump to previous document page. Перейти к предыдущей Ñтранице документа. &Last Page Go| &ПоÑледнÑÑ Ñтраница Go: %1 Link: %1 Перейти к %1 Magnify 100% Увеличение 100% Magnify 150% Увеличение 150% Magnify 20% Увеличение 20% Magnify 300% Увеличение 300% Magnify 50% Увеличение 50% Magnify 75% Увеличение 75% &Metadata... Edit| М&етаданные... Metadata - DjView dialog caption Метаданные - DjView &New File| &Ðовый &Next Page Go| &Ð¡Ð»ÐµÐ´ÑƒÑŽÑ‰Ð°Ñ Ñтраница One &to one Zoom| &Один к одному Only display the background layer. Показывать только Ñлой фона. Only display the document bitonal stencil. Показывать только двухцветный шаблон. Only display the foreground layer. Показывать только Ñлой переднего плана. &Open File| &Открыть Open a DjVu document. Открыть документ DjVu. Open a remote DjVu document. Открыть удаленный документ DjVu. Open - DjView dialog caption Открыть - DjView Opening DjVu document Открытие документа DjVu Opening DjVu file Открытие файла DjVu Open &Location... File| Открыть &адреÑ... Open Location - DjView dialog caption Открыть Ð°Ð´Ñ€ÐµÑ â€” DjView Open &Recent Открыть &недавние Option '%1' is not implemented. Параметр «%1» не реализован. Option '%1' is not recognized. Параметр «%1» не раÑпознан. Option '%1' requires a standalone viewer. Параметр «%1» требует режима ÑамоÑтоÑтельного приложениÑ. Option '%1' requires boolean argument. Параметр «%1» требует логичеÑкого аргумента. Prefere&nces... Settings| &ÐаÑтроить DjView... &Previous Page Go| &ÐŸÑ€ÐµÐ´Ñ‹Ð´ÑƒÑ‰Ð°Ñ Ñтраница &Print... File| &Печать... Print - DjView dialog caption Печать — DjView Print the DjVu document. Печать документа DjVu. &Quit File| &Выход Right Mouse Button правую кнопку мыши &Rotate View|Rotate По&ворот Rotate &0° Rotate| Поворот на &0° Rotate &180° Rotate| Поворот на &180° Rotate &270° Rotate| Поворот на &270° Rotate &90° Rotate| Поворот на &90° Rotate &Left Rotate| Повернуть против &чаÑовой Ñтрелки Rotate page image clockwise. Повернуть Ñтраницу по чаÑовой Ñтрелке. Rotate page image counter-clockwise. Повернуть Ñтраницу против чаÑовой Ñтрелки. Rotate &Right Rotate| Повернуть &по чаÑовой Ñтрелке Save &as... File| Сохранить &как... Save - DjView dialog caption Сохранить — DjView Save image as... Сохранить изображение как... Save Image - DjView dialog caption Сохранение Ð¸Ð·Ð¾Ð±Ñ€Ð°Ð¶ÐµÐ½Ð¸Ñ â€” DjView Save text as... Сохранить текÑÑ‚ как... Save Text - DjView dialog caption Сохранение текÑта — DjView Save the DjVu document. Сохранить документ DjVu. &Select Edit| &Выделение Select a rectangle in the document. ПрÑмоугольное выделение в документе. Set full resolution magnification. УÑтановить маÑштаб по разрешению изображениÑ. Set magnification to fit page. УÑтановить маÑштаб по размеру Ñтраниц. Set magnification to fit page width. УÑтановить маÑштаб по ширине Ñтраниц. Set natural page orientation. УÑтановить иÑходную ориентацию Ñтраницы. &Settings Settings| &ÐаÑтройка Shift+F3 Edit|Find Previous Shift+F3 Show/hide the side bar. Показать/Ñкрыть боковую панель. Show/hide the standard tool bar. Показать/Ñкрыть Ñтандартную панель инÑтрументов. Show/hide the status bar. Показать/Ñкрыть Ñтроку ÑоÑтоÑниÑ. Show information about the document encoding and structure. Показать информацию о Ñтруктуре и кодировании документа. Show information about this program. Показать информацию о программе. Show &Sidebar Settings| Показать &боковую панель Show Stat&usbar Settings| Показать Ñтроку &ÑоÑтоÑÐ½Ð¸Ñ Show the document and page meta data. Показать метаданные документа и Ñтраниц. Show the preferences dialog. Показать диалог наÑтройки. Show &Toolbar Settings| Показать &панель инÑтрументов Side &by Side Layout| &Пары Ñтраниц &Stencil Display| &Шаблон Stencil modeCombo Шаблон Stretch zoomCombo РаÑÑ‚Ñнуть Text files save filter ТекÑтовые файлы Toggle continuous layout mode. Показывать Ñтраницы непрерывным полотном. Toggle full screen mode. ПолноÑкранный режим. Toggle side-by-side layout mode. Показывать Ñтраницы парами. Toolbar option '%1' is not implemented. Параметр панели инÑтрументов «%1» не реализован. Toolbar option '%1' is not recognized. Параметр панели инÑтрументов «%1» не раÑпознан. Turn page on its left side. Поворот налево. Turn page on its right side. Поворот направо. Turn page upside-down. Перевернуть Ñтраницу. Unrecognized sidebar options '%1'. Параметр боковой панели «%1» не раÑпознан. &View View| &Вид x=%1 y=%2 x=%1 y=%2 &Zoom View|Zoom &МаÑштаб Zoom &In Zoom| &Увеличить Zoom &Out Zoom| У&меньшить Zoom to rectangle Увеличить по выделению Go: 1 page forward. Перейти на 1 Ñтраницу вперед. Go: %n pages forward. Перейти на %n Ñтраницу вперед. Перейти на %n Ñтраницы вперед. Перейти на %n Ñтраниц вперед. Go: 1 page backward. Перейти на 1 Ñтраницу назад. Go: %n pages backward. Перейти на %n Ñтраницу назад. Перейти на %n Ñтраницы назад. Перейти на %n Ñтраниц назад. %n characters %n Ñимвол %n Ñимвола %n Ñимволов Copy &URL Edit| Скопировать Ð°Ð´Ñ€ÐµÑ &URL Hidden Text modeCombo Скрытый текÑÑ‚ I&nvert Luminance View| Инвертировать &ÑркоÑть Invert image luminance while preserving hue. Инвертировать ÑркоÑть изображениÑ, не менÑÑ Ð¾Ñ‚Ñ‚ÐµÐ½ÐºÐ¾Ð². Save an URL for the current page into the clipboard. Сохранить Ð°Ð´Ñ€ÐµÑ URL текущей Ñтраницы в буфер обмена. Ctrl+C Edit|CopyURL Ctrl+C Copy &Outline Edit| Скопировать ÑпиÑок &глав Save the djvused code for the outline into the clipboard. Сохранить в буфер обмена ÑпиÑок глав, определённый утилитой djvused. Copy &Annotations Edit| Скопировать &Ð¿Ñ€Ð¸Ð¼ÐµÑ‡Ð°Ð½Ð¸Ñ Save the djvused code for the page annotations into the clipboard. Сохранить в буфер обмена примечаниÑ, извлечённые из документа утилитой djvused. <html><b>Navigating the document.</b><br/> The page selector lets you jump to any page by name and can be activated at any time by pressing Ctrl+G. The navigation buttons jump to the first page, the previous page, the next page, or the last page. </html> <html><b>ÐÐ°Ð²Ð¸Ð³Ð°Ñ†Ð¸Ñ Ð¿Ð¾ документу.</b><br/> Ð’Ñ‹ можете перейти к любой Ñтранице по её имени, нажав Ctrl+G. Кнопки навигации позволÑÑŽÑ‚ перейти к первой, предыдущей, Ñледующей или поÑледней Ñтранице. </html> Thumbnails Макеты Ñтраниц Outline Главы Find ПоиÑк Certificate validation error - DjView dialog caption Ðевозможно удоÑтоверить Ñертификат — DjView <html> %1 Do you want to continue anyway? </html> <html> %1 Продолжить выполнение запрошенного дейÑтвиÑ? </html> <html> This file was served with printing restrictions. Do you want to print it anyway?</html> <html> This file was served with printing restrictions.Do you want to print it anyway?</html> <html> Этот файл на данном Ñервере опубликован Ñ Ð¾Ð³Ñ€Ð°Ð½Ð¸Ñ‡ÐµÐ½Ð¸ÐµÐ¼ на печать. Ðапечатать его неÑÐ¼Ð¾Ñ‚Ñ€Ñ Ð½Ð° Ñто?</html> <html> This file was served with saving restrictions. Do you want to save it anyway?</html> <html> This file was served with saving restrictions.Do you want to save it anyway?</html> <html> Этот файл на данном Ñервере опубликован Ñ Ð¾Ð³Ñ€Ð°Ð½Ð¸Ñ‡ÐµÐ½Ð¸ÐµÐ¼ на Ñохранение. Сохранить его неÑÐ¼Ð¾Ñ‚Ñ€Ñ Ð½Ð° Ñто?</html> P%1/%2 %3x%4 %5dpi P%1/%2 %3x%4 %5dpi %3x%4+%1+%2 %3x%4+%1+%2 Copy text into the clipboard. Сохранить текÑÑ‚ в буфер обмена. Save text into a file. Сохранить текÑÑ‚ в файл. Save image into a file. Сохранить изображение в файл. Zoom the selection to fit the window. Увеличить выделенную облаÑть до размеров окна. Copy URL Скопировать Ð°Ð´Ñ€ÐµÑ URL Save into the clipboard an URL that highlights the selection. Сохранить в буфер обмена URL Ñ Ð¸Ð½Ñ„Ð¾Ñ€Ð¼Ð°Ñ†Ð¸ÐµÐ¹ о выделении. Copy Maparea Скопировать maparea Save into the clipboard a maparea annotation expression for program djvused. Сохранить в буфер обмена директиву примечаний maparea, ÑоответÑтвующую выделению, полученную c помощью утилиты djvused. Copy image into the clipboard. Скопировать изображение в буфер обмена. Co&ver Page Layout| &Титульный лиÑÑ‚ Ctrl+F6 Layout|CoverPage Ctrl+F6 F6 Layout|CoverPage F6 Show the cover page alone in side-by-side mode. Показывать первую Ñтраницу отдельно в режиме пар Ñтраниц. &Right to Left Layout| &Справа налево Ctrl+Shift+F6 Layout|RightToLeft Ctrl+Shift+F6 Shift+F6 Layout|RightToLeft Shift+F6 Show pages right-to-left in side-by-side mode. Показывать Ñтраницы Ñправа налево в режиме пар Ñтраниц. <html><h2>DjVuLibre DjView %1</h2>%2<p>Viewer for DjVu documents<br><a href=%3>%3</a><br>Copyright © 2006-- Léon Bottou.</p><p align=justify><small>This program is free software. You can redistribute or modify it under the terms of the GNU General Public License as published by the Free Software Foundation. This program is distributed <i>without any warranty</i>. See the GNU General Public License for more details.</small></p></html> <html><h2>DjVuLibre DjView %1</h2>%2<p>Программа проÑмотра документов DjVu<br><a href=%3>%3</a><br>Copyright © 2006-- Léon Bottou.</p><p align=justify><small>Ð”Ð°Ð½Ð½Ð°Ñ Ð¿Ñ€Ð¾Ð³Ñ€Ð°Ð¼Ð¼Ð° - Ñвободное программное обеÑпечение. Ð’Ñ‹ можете раÑпроÑтранÑть и/или модифицировать ее на уÑловиÑÑ… Стандартной ОбщеÑтвенной Лицензии GNU (GNU General Public License), опубликованной Фондом Свободного ПО (Free Software Foundation). Ð”Ð°Ð½Ð½Ð°Ñ Ð¿Ñ€Ð¾Ð³Ð´Ð°Ð¼Ð¼Ð° раÑпроÑтранÑетÑÑ <i>без каких-либо гарантий</i>. ПодробноÑти Ñмотрите в Стандартной ОбщеÑтвенной Лицензии GNU (GNU General Public License).</small></p></html> All files Ð’Ñе файлы &Hidden Text Display| &Скрытый текÑÑ‚ Overlay a representation of the hidden text layer. Показывать также Ñлой Ñкрытого текÑта. QDjViewApplication cannot open '%1'. не удаетÑÑ Ð¾Ñ‚ÐºÑ€Ñ‹Ñ‚ÑŒ «%1». Usage: djview [options] [filename-or-url] Common options include: -help~~~Prints this message. -verbose~~~Prints all warning messages. -display <xdpy>~~~Select the X11 display <xdpy>. -geometry <xgeom>~~~Select the initial window geometry. -font <xlfd>~~~Select the X11 name of the main font. -style <qtstyle>~~~Select the QT user interface style. -fullscreen, -fs~~~Start djview in full screen mode. -page=<page>~~~Jump to page <page>. -zoom=<zoom>~~~Set zoom factor. -continuous=<yn>~~~Set continuous layout. -sidebyside=<yn>~~~Set side-by-side layout. ИÑпользование: djview [параметры] [Ð¸Ð¼Ñ Ñ„Ð°Ð¹Ð»Ð° или Ð°Ð´Ñ€ÐµÑ URL] ОÑновные параметры: -help~~~Выводит Ñто Ñообщение. -verbose~~~Выводить вÑе предупреждениÑ. -display <xdpy>~~~Выбор диÑÐ¿Ð»ÐµÑ X11. -geometry <xgeom>~~~Выбор иÑходной геометрии окна. -font <xlfd>~~~Выбор имени оÑновного шрифта X11. -style <qtstyle>~~~Выбор ÑÑ‚Ð¸Ð»Ñ Ð¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ñ‚ÐµÐ»ÑŒÑкого интерфейÑа Qt. -fullscreen, -fs~~~ЗапуÑтить в полноÑкранном режиме. -page=<page>~~~Перейти к Ñтранице <page>. -zoom=<zoom>~~~Задать маÑштаб. -continuous=<yn>~~~УÑтановить непрерывный проÑмотр. -sidebyside=<yn>~~~Показывать пары Ñтраниц. QDjViewAuthDialog Password: Пароль: User: Ð˜Ð¼Ñ Ð¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ñ‚ÐµÐ»Ñ: Authentication required - DjView ТребуетÑÑ Ð°ÑƒÑ‚ÐµÐ½Ñ‚Ð¸Ñ„Ð¸ÐºÐ°Ñ†Ð¸Ñ â€” DjView QDjViewDjVuExporter &Cancel О&тмена Con&tinue &Продолжить DjVu Bundled Document СвÑзанный документ DjVu (в одном файле) DjVu Files (*.djvu *.djv) Файлы DjVu (*.djvu *.djv) DjVu Indirect Document ÐепрÑмой документ DjVu (Ñтраницы в отдельных файлах) <html> This file belongs to a non empty directory. Saving an indirect document creates many files in this directory. Do you want to continue and risk overwriting files in this directory?</html> <html> Этот файл находитÑÑ Ð² непуÑтом каталоге. При Ñохранении в непрÑмом формате будет Ñоздано множеÑтво файлов в Ñтом каталоге. Ð’Ñ‹ риÑкуете заменить файлы в данном каталоге. Продолжить?</html> Question - DjView dialog caption Ð’Ð¾Ð¿Ñ€Ð¾Ñ â€” DjView Save job creation failed! Ðе удалоÑÑŒ запуÑтить процеÑÑ ÑохранениÑ! System error: %1. СиÑÑ‚ÐµÐ¼Ð½Ð°Ñ Ð¾ÑˆÐ¸Ð±ÐºÐ°: %1. Unknown error. ÐеизвеÑÑ‚Ð½Ð°Ñ Ð¾ÑˆÐ¸Ð±ÐºÐ°. QDjViewErrorDialog DjView Error Ошибка DjView Error - DjView dialog caption Ошибка — DjView &Ok &OK QDjViewExportDialog A file with this name already exists. Do you want to replace it? Файл Ñ Ñ‚Ð°ÐºÐ¸Ð¼ именем уже ÑущеÑтвует. Заменить его? All files save filter Ð’Ñе файлы &Cancel О&тмена C&urrent page &Текущую Ñтраницу &Defaults &По умолчанию Destination Результат Dialog Диалог &Document &Документ Error - DjView dialog caption Ошибка — DjView Export ЭкÑпортировать Export - DjView dialog caption ЭкÑпорт — DjView Format: Формат: <html><b>Saving.</b><br/> You can save the whole document or a page range under a variety of formats. Selecting certain formats creates additional dialog pages for specifying format options.</html> <html><b>Сохранение.</b><br/> Ð’Ñ‹ можете Ñохранить веÑÑŒ документ или диапазон Ñтраниц в различных форматах. ПоÑле выбора определённого формата поÑвлÑÑŽÑ‚ÑÑ Ð´Ð¾Ð¿Ð¾Ð»Ð½Ð¸Ñ‚ÐµÐ»ÑŒÐ½Ñ‹Ðµ вкладки Ñ Ð¿Ð°Ñ€Ð°Ð¼ÐµÑ‚Ñ€Ð°Ð¼Ð¸ формата.</html> &Ok &OK Overwriting the current file is not allowed! Замена текущего файла не позволÑетÑÑ! &Pages &Страницы от Question - DjView dialog caption Ð’Ð¾Ð¿Ñ€Ð¾Ñ â€” DjView &Replace &Заменить Stop ОÑтановить This operation has been interrupted. ÐžÐ¿ÐµÑ€Ð°Ñ†Ð¸Ñ Ð±Ñ‹Ð»Ð° прервана. This operation has failed. Ðе удалоÑÑŒ выполнить операцию. to до QDjViewExportPS1 &Color &Цветной Color Цвет Form Форма &GrayScale &Оттенки Ñерого Language Level Уровень Ñзыка PostScript Marks Разметка PostScript Cтандарт PostScript Print crop &marks Печатать &разметку Ñтраницы Print image &frame Печатать &рамку Ð¸Ð·Ð¾Ð±Ñ€Ð°Ð¶ÐµÐ½Ð¸Ñ QDjViewExportPS2 % % Automatic ÐвтоматичеÑки Form Форма &Landscape &ÐÐ»ÑŒÐ±Ð¾Ð¼Ð½Ð°Ñ Orientation ÐžÑ€Ð¸ÐµÐ½Ñ‚Ð°Ñ†Ð¸Ñ &Portrait &ÐšÐ½Ð¸Ð¶Ð½Ð°Ñ Scale to &fit the page МаÑштабировать по &размеру Ñтраницы Scaling МаÑштабирование &Zoom &МаÑштаб QDjViewExportPS3 /100 /100 Advanced Продвинутые параметры at most не более Center: Центральное поле: Form Форма per page. на Ñтраницу. plus Ð¿Ð»ÑŽÑ points точек points. точек. Print Печатать Print sheets suitable for folding a booklet. Печать лиÑтов Ð´Ð»Ñ ÑоÑÑ‚Ð°Ð²Ð»ÐµÐ½Ð¸Ñ Ð±ÑƒÐºÐ»ÐµÑ‚Ð°. rectos and versos. чётные и нечётные лиÑты. rectos only. только нечётные лиÑты. Sheets per booklet: Страниц на буклет: Shift rectos and versos by Смещать чётные лиÑты от нечётных лиÑтов на Unlimited Без ограничений versos only. только чётные лиÑты. QDjViewExportPrn % % Automatic ÐвтоматичеÑки Color Цвет &Color &Цвет Form Форма &GrayScale &Оттенки Ñерого &Landscape &ÐÐ»ÑŒÐ±Ð¾Ð¼Ð½Ð°Ñ Marks Разметка Orientation ÐžÑ€Ð¸ÐµÐ½Ñ‚Ð°Ñ†Ð¸Ñ &Portrait &ÐšÐ½Ð¸Ð¶Ð½Ð°Ñ Print crop &marks Печатать &разметку Ñтраницы Print image &frame Печатать &рамку Ð¸Ð·Ð¾Ð±Ñ€Ð°Ð¶ÐµÐ½Ð¸Ñ Scale to &fit the page МаÑштабировать по &размеру Ñтраницы Scaling МаÑштабирование &Zoom &МаÑштаб QDjViewExportTiff Allow &deflate compression. ПозволÑть Ñжатие &без потерь deflate. Allow &lossy JPEG compression. ПозволÑть Ñжатие JPEG Ñ &потерÑми. Compression Сжатие dpi DPI Force &bitonal G4 compression. ПрименÑть &чёрно-белое Ñжатие G4. Form Форма JPEG &quality &КачеÑтво JPEG Maximum image resolution МакÑимальное разрешение Ð¸Ð·Ð¾Ð±Ñ€Ð°Ð¶ÐµÐ½Ð¸Ñ Resolution Разрешение QDjViewFind Case sensitive С учётом региÑтра Find Next (F3) Ðайти далее (F3) Find Previous (Shift+F3) Ðайти ранее (Shift+F3) <html><b>Finding text.</b><br/> Search hits appear progressively as soon as you type a search string. Typing enter jumps to the next hit. To move to the previous or next hit, you can also use the arrow buttons or the shortcuts <tt>F3</tt> or <tt>Shift-F3</tt>. You can also double click a page name. Use the <tt>Options</tt> menu to search words only or to specify the case sensitivity.</html> <html><b>ПоиÑк текÑта.</b><br/> Результаты поиÑка поÑвлÑÑŽÑ‚ÑÑ Ð¿Ð¾Ñтепенно по мере набора. Ðажмите Enter Ð´Ð»Ñ Ð¿ÐµÑ€ÐµÑ…Ð¾Ð´Ð° к Ñледующему результату. ИÑпользуйте кнопки Ñо Ñтрелками или <tt>F3</tt> и <tt>Shift+F3</tt> Ð´Ð»Ñ Ð¿ÐµÑ€ÐµÑ…Ð¾Ð´Ð° к Ñледующему/предыдущему результату. Ð’Ñ‹ также можете иÑпользовать двойной щелчок мышью на названии Ñтраницы. Ð’ меню <tt>ÐаÑтройка</tt> можно наÑтроить поиÑк только Ñлов и чувÑтвительноÑть к региÑтру.</html> Options ÐаÑтройка Words only Только Ñлова Regular expression РегулÑрное выражение Reset search options to default values. ВернутьÑÑ Ðº параметрам поиÑка по умолчанию. Specify whether search hits must begin on a word boundary. ИÑкать по первым буквам целых Ñлов. Specify whether searches are case sensitive. Требовать точного ÑовпадениÑ, Ñ€Ð°Ð·Ð»Ð¸Ñ‡Ð°Ñ Ð·Ð°Ð³Ð»Ð°Ð²Ð½Ñ‹Ðµ и Ñтрочные буквы. Regular expressions describe complex string matching patterns. РегулÑрные Ð²Ñ‹Ñ€Ð°Ð¶ÐµÐ½Ð¸Ñ Ð¿Ñ€ÐµÐ´Ð½Ð°Ð·Ð½Ð°Ñ‡ÐµÐ½Ñ‹ Ð´Ð»Ñ Ð²Ð²Ð¾Ð´Ð° Ñложных шаблонов поиÑка текÑта. <html><b>Regular Expression Quick Guide</b><ul><li>The dot <tt>.</tt> matches any character.</li><li>Most characters match themselves.</li><li>Prepend a backslash <tt>\</tt> to match special characters <tt>()[]{}|*+.?!^$\</tt>.</li><li><tt>\b</tt> matches a word boundary.</li><li><tt>\w</tt> matches a word character.</li><li><tt>\d</tt> matches a digit character.</li><li><tt>\s</tt> matches a blank character.</li><li><tt>\n</tt> matches a newline character.</li><li><tt>[<i>a</i>-<i>b</i>]</tt> matches characters in range <tt><i>a</i></tt>-<tt><i>b</i></tt>.</li><li><tt>[^<i>a</i>-<i>b</i>]</tt> matches characters outside range <tt><i>a</i></tt>-<tt><i>b</i></tt>.</li><li><tt><i>a</i>|<i>b</i></tt> matches either regular expression <tt><i>a</i></tt> or regular expression <tt><i>b</i></tt>.</li><li><tt><i>a</i>{<i>n</i>,<i>m</i>}</tt> matches regular expression <tt><i>a</i></tt> repeated <tt><i>n</i></tt> to <tt><i>m</i></tt> times.</li><li><tt><i>a</i>?</tt>, <tt><i>a</i>*</tt>, and <tt><i>a</i>+</tt> are shorthands for <tt><i>a</i>{0,1}</tt>, <tt><i>a</i>{0,}</tt>, and <tt><i>a</i>{1,}</tt>.</li><li>Use parentheses <tt>()</tt> to group regular expressions before <tt>?+*{</tt>.</li></ul></html> <html><b>Справка по регулÑрным выражениÑм</b><ul><li>Точка (<tt><b>.</b></tt>) ÑопоÑтавлÑетÑÑ Ñ Ð»ÑŽÐ±Ñ‹Ð¼ Ñимволом.</li><li>БольшинÑтво Ñимволов в регулÑрном выражении ÑопоÑтавлÑетÑÑ Ñ Ñ‚ÐµÐ¼Ð¸ же Ñимволами в текÑте.</li><li>ДобавлÑйте обратный ÑлÑш (<tt><b>\</b></tt>) перед Ñимволами <tt><b>()[]{}|*+.?!^$\</b></tt>, еÑли хотите отменить их Ñпециальное значение.</li><li><tt><b>\b</b></tt> ÑопоÑтавлÑетÑÑ Ñ Ð³Ñ€Ð°Ð½Ð¸Ñ†ÐµÐ¹ Ñлова.</li><li><tt><b>\w</b></tt> ÑопоÑтавлÑетÑÑ Ñ Ð»ÑŽÐ±Ñ‹Ð¼ Ñимволом, который может входить в Ñлово (буквы, цифры, знак нижнего подчёркиваниÑ).</li><li><tt><b>\d</b></tt> ÑопоÑтавлÑетÑÑ Ñ Ñ†Ð¸Ñ„Ñ€Ð¾Ð¹.</li><li><tt><b>\s</b></tt> ÑопоÑтавлÑетÑÑ Ñ Ð¿Ñ€Ð¾Ð±ÐµÐ»ÑŒÐ½Ñ‹Ð¼ Ñимволом.</li><li><tt><b>\n</b></tt> ÑопоÑтавлÑетÑÑ Ñ Ñимволом новой Ñтроки.</li><li><tt><b>[a-b]</b></tt> ÑопоÑтавлÑетÑÑ Ñ Ð»ÑŽÐ±Ñ‹Ð¼ Ñимволом в диапазоне от <tt><b>a</b></tt> до <tt><b>b</b></tt>.</li><li><tt><b>[^a-b]</b></tt> ÑопоÑтавлÑетÑÑ Ñ Ð»ÑŽÐ±Ñ‹Ð¼ Ñимволом вне диапазона от <tt><b>a</b></tt> до <tt><b>b</b></tt>.</li><li><tt><b>a|b</b></tt> ÑопоÑтавлÑетÑÑ Ñ Ð¾Ð´Ð½Ð¸Ð¼ из регулÑрных выражений <tt><b>a</b></tt> и <tt><b>b</b></tt>.</li><li><tt><b>a{n,m}</b></tt> ÑоответÑтвует регулÑрному выражению <tt><b>a</b></tt>, повторенному от <tt><b>n</b></tt> до <tt><b>m</b></tt> раз.</li><li><tt><b>a?</b></tt>, <tt><b>a*</b></tt>, и <tt><b>a+</b></tt> ÑвлÑÑŽÑ‚ÑÑ ÑокращениÑми Ð´Ð»Ñ <tt><b>a{0,1}</b></tt>, <tt><b>a{0,}</b></tt> и <tt><b>a{1,}</b></tt> ÑоответÑтвенно.</li><li>ИÑпользуйте Ñкобки <tt><b>()</b></tt> Ð´Ð»Ñ Ð³Ñ€ÑƒÐ¿Ð¿Ð¸Ñ€Ð¾Ð²ÐºÐ¸ регулÑрного Ð²Ñ‹Ñ€Ð°Ð¶ÐµÐ½Ð¸Ñ Ð¿ÐµÑ€ÐµÐ´ Ñимволами <tt><b>?+*{</b></tt>.</li></ul></html> QDjViewFind::Model 1 hit 1 результат <html>Document is not searchable. No page contains information about its textual content.</html> <html>ПоиÑк в документе невозможен. Ðи одна из Ñтраниц не Ñодержит текÑтовой информации.</html> No hits! Ðет Ñовпадений! Page %1 (1 hit) Page %1 (1 результат) Searching page %1. ПоиÑк на Ñтранице %1. Searching page %1 (waiting for data.) ПоиÑк на Ñтранице %1 (ожидание данных) %n hits %n Ñовпадение %n ÑÐ¾Ð²Ð¿Ð°Ð´ÐµÐ½Ð¸Ñ %n Ñовпадений Page %1 (%n hits) Страница %1 (%n результат) Страница %1 (%n результата) Страница %1 (%n результатов) <html>Invalid regular expression.</html> <html>Ошибка в регулÑрном выражении.</html> QDjViewImgExporter %1 Files (*.%2) JPG Files Файлы %1 (*.%2) %1 Image JPG Image Изображение %1 Cannot render page. Ðевозможно преобразовать Ñтраницу. Image format %1 not supported. Формат Ð¸Ð·Ð¾Ð±Ñ€Ð°Ð¶ÐµÐ½Ð¸Ñ %1 не поддерживаетÑÑ. QDjViewInfoDialog Bundled DjVu document СвÑзанный документ DjVu (в одном файле) &Close &Закрыть Dialog Диалог &Document &Документ &File &Файл File # â„– файла File: Файл: File #%1 - Файл â„–%1 - File Name Ð˜Ð¼Ñ Ñ„Ð°Ð¹Ð»Ð° File Size Размер файла File Type Тип файла <html><b>Document information</b><br>This panel shows information about the document and its component files. Select a component file to display detailled information in the <tt>File</tt> tab. Double click a component file to show the corresponding page in the main window. </html> <html><b>Ð˜Ð½Ñ„Ð¾Ñ€Ð¼Ð°Ñ†Ð¸Ñ Ð¾ документе</b><br>Эта панель показывает информацию о документе и его файлах-компонентах. Выберите файл Ð´Ð»Ñ Ð¿Ñ€Ð¾Ñмотра подробной информации во вкладке <tt>Файл</tt>. Ð’Ñ‹ можете перейти к Ñтранице двойным щелчком по ÑоответÑтвующей Ñтроке. </html> <html><b>File and page information</b><br>This panel shows the structure of the DjVu data corresponding to the component file or the page selected in the <tt>Document</tt> tab. The arrow buttons jump to the previous or next component file.</html> <html><b>Ð˜Ð½Ñ„Ð¾Ñ€Ð¼Ð°Ñ†Ð¸Ñ Ð¾ файле или Ñтранице</b><br>Эта панель показывает Ñтруктуру данных DjVu, ÑоответÑтвующих компонентному файлу или Ñтранице, выбранной во вкладке <tt>Документ</tt>. Кнопки Ñо Ñтрелками позволÑÑŽÑ‚ перейти к предыдущему или Ñледующему компонентному файлу.</html> Indirect DjVu document ÐепрÑмой документ DjVu (Ñтраницы в отдельных файлах) n/a недоÑтупен Obsolete bundled DjVu document УÑтаревший формат ÑвÑзанного документа DjVu Obsolete indexed DjVu document УÑтаревший формат индекÑированного документа DjVu Page Страница Page # â„– Ñтраницы Page #%1 Страница â„–%1 Page #%1 - « %2 » Страница â„–%1 — «%2» Page Title Заголовок Ñтраницы Shared Общий Shared annotations Общие Ð¿Ñ€Ð¸Ð¼ÐµÑ‡Ð°Ð½Ð¸Ñ Shared data Общие данные Single DjVu page ÐžÐ´Ð¸Ð½Ð¾Ñ‡Ð½Ð°Ñ Ñтраница DjVu Thumbnails Макеты Ñтраниц Thumbnails Макеты Ñтраниц &View Page &ПроÑмотр Ñтраницы Waiting for data... Ожидание данных... 1 file 1 файл %n files %n файл %n файла %n файлов 1 page 1 Ñтраница %n pages %n Ñтраница %n Ñтраницы %n Ñтраниц QDjViewMetaDialog &Close &Закрыть Ctrl+C copy Ctrl+C Dialog Диалог &Document Metadata &Метаданные документа <html><b>Document metadata</b><br>This panel displays metadata pertaining to the document, such as author, title, references, etc. This information can be saved into the document with program <tt>djvused</tt>: use the commands <tt>create-shared-ant</tt> and <tt>set-meta</tt>.</html> <html><b>Метаданные документа</b><br>Эта панель отображает метаданные, отноÑÑщиеÑÑ Ðº документу, такие как автор, заголовок, ÑÑылки и тому подобное. Эта Ð¸Ð½Ñ„Ð¾Ñ€Ð¼Ð°Ñ†Ð¸Ñ Ð¼Ð¾Ð¶ÐµÑ‚ быть запиÑана в документ программой <tt>djvused</tt>: иÑпользуйте команды <tt>create-shared-ant</tt> и <tt>set-meta</tt>.</html> <html><b>Page metadata</b><br>This panel displays metadata pertaining to a specific page. Page specific metadata override document metadata. This information can be saved into the document with program <tt>djvused</tt>: use command <tt>select</tt> to select the page and command <tt>set-meta</tt> to specify the metadata entries.</html> <html><b>Метаданные Ñтраницы</b><br>Эта панель отображает метаданные, отноÑÑщиеÑÑ Ðº отдельной Ñтранице. Метаданные Ñтраницы переопределÑÑŽÑ‚ метаданные документа. Эта Ð¸Ð½Ñ„Ð¾Ñ€Ð¼Ð°Ñ†Ð¸Ñ Ð¼Ð¾Ð¶ÐµÑ‚ быть запиÑана в документ программой <tt>djvused</tt>: иÑпользуйте команду <tt>select</tt> Ð´Ð»Ñ Ð²Ñ‹Ð±Ð¾Ñ€Ð° Ñтраницы и команду <tt>set-meta</tt> Ð´Ð»Ñ Ð·Ð°Ð´Ð°Ð½Ð¸Ñ Ð¼ÐµÑ‚Ð°Ð´Ð°Ð½Ð½Ñ‹Ñ….</html> Key Ключ Page: Страница: &Page Metadata Метаданные &Ñтраницы Value Значение &View Page &ПроÑмотр Ñтраницы QDjViewOutline Go: page %1. Go: page %1 Перейти к Ñтранице %1. <html><b>Document outline.</b><br/> This panel display the document outline, or the page names when the outline is not available, Double-click any entry to jump to the selected page.</html> <html><b>ЭÑкиз документа.</b><br/> Эта панель отображает ÑÑкиз документа или Ð½Ð°Ð·Ð²Ð°Ð½Ð¸Ñ Ñтраниц, еÑли ÑÑкиз недоÑтупен. Двойным щелчком можно перейти к выбранной Ñтранице.</html> Outline data is corrupted Данные ÑÑкиза иÑпорчены Page %1 Страница %1 Go: %1 Go: %1. Перейти к %1 Pages Страницы QDjViewPSExporter Booklet tab caption Буклет Encapsulated PostScript ИнкапÑулированный PostScript <html><b>Position and scaling.</b><br>Option <tt>Scale to fit</tt> accommodates whatever paper size your printer uses. Zoom factor <tt>100%</tt> reproduces the initial document size. Orientation <tt>Automatic</tt> chooses portrait or landscape on a page per page basis.</html> <html><b>Положение и маÑштаб.</b><br>Параметр <tt>МаÑштабировать по размеру Ñтраницы</tt> приÑпоÑабливает документ к размерам лиÑтов бумаги, иÑпользуемой вашим принтером. МаÑштаб <tt>100%</tt> воÑпроизводит иÑходный размер документа. Параметр ориентации <tt>ÐвтоматичеÑки</tt> выбирает книжную или альбомную ориентацию по размерам каждой Ñтраницы.</html> <html><b>PostScript options.</b><br>Option <tt>Color</tt> enables color printing. Document pages can be decorated with frame and crop marks. PostScript language level 1 is only useful with very old printers. Level 2 works with most printers. Level 3 print color document faster on recent printers.</html> <html><b>Параметры PostScript.</b><br>Параметр <tt>Цветной</tt> включает цветную печать. К Ñтраницам может быть добавлена рамка и разметка. Уровень Ñзыка PostScript 1 (PostScript Level 1) полезен только при работе Ñ Ð¾Ñ‡ÐµÐ½ÑŒ Ñтарыми принтерами. PostScript Level 2 работает Ñ Ð±Ð¾Ð»ÑŒÑˆÐ¸Ð½Ñтвом принтеров. PostScript Level 3 работает быÑтрее при цветной печати на Ñовременных принтерах.</html> <html><b>Producing booklets.</b><br>The booklet mode prints the selected pages as sheets suitable for folding one or several booklets. Several booklets might be produced when a maximum number of sheets per booklet is specified. You can either use a duplex printer or print rectos and versos separately.<p> Shifting rectos and versos is useful with poorly aligned duplex printers. The center margins determine how much space is left between the pages to fold the sheets. This space slowly increases from the inner sheet to the outer sheet.</html> <html><b>Изготовление буклетов.</b><br>Ð’ режиме буклета печатаютÑÑ Ð²Ñ‹Ð±Ñ€Ð°Ð½Ð½Ñ‹Ðµ Ñтраницы в виде лиÑтов, готовых Ð´Ð»Ñ ÑоÑÑ‚Ð°Ð²Ð»ÐµÐ½Ð¸Ñ Ð¾Ð´Ð½Ð¾Ð³Ð¾ или неÑкольких буклетов. Ð’Ñ‹ можете либо пользоватьÑÑ Ð´Ð²ÑƒÑ…Ñторонним принтером, либо печатать отдельно чётные и нечётные лиÑты.<p> Смещение чётных лиÑтов от нечётных полезно при печати на плохо Ñовмещённых двухÑторонних принтерах. Центральное поле определÑет размер пуÑтого проÑтранÑтва между Ñтраницами на одном лиÑте. Этот размер медленно увеличиваетÑÑ Ð¾Ñ‚ внутреннего лиÑта к внешнему.</html> Position tab caption ÐŸÐ¾Ð·Ð¸Ñ†Ð¸Ñ PostScript PostScript PostScript tab caption PostScript PostScript Files (*.ps *.eps) Файлы PostScript (*.ps *.eps) Save job creation failed! Ðе удалоÑÑŒ запуÑтить процеÑÑ ÑохранениÑ! QDjViewPdfExporter Error while creating pdf file. Ошибка ÑÐ¾Ð·Ð´Ð°Ð½Ð¸Ñ Ñ„Ð°Ð¹Ð»Ð° PDF. <html><b>PDF options.</b><br>These options control the characteristics of the images embedded in the exported PDF files. The resolution box limits their maximal resolution. Forcing bitonal G4 compression encodes all pages in black and white using the CCITT Group 4 compression. Allowing JPEG compression uses lossy JPEG for all non bitonal or subsampled images. Otherwise, allowing deflate compression produces more compact files. </html> <html><b>Параметры PDF.</b><br>Эти параметры управлÑÑŽÑ‚ характериÑтиками изображений, вÑтраиваемых в ÑкÑпортируемые файлы PDF. Элемент «Разрешение» задаёт верхнюю границу Ñ€Ð°Ð·Ñ€ÐµÑˆÐµÐ½Ð¸Ñ Ð¸Ð·Ð¾Ð±Ñ€Ð°Ð¶ÐµÐ½Ð¸Ð¹. При применении чёрно-белого ÑÐ¶Ð°Ñ‚Ð¸Ñ G4 вÑе Ñтраницы кодируютÑÑ Ñ Ð¿Ð¾Ð¼Ð¾Ñ‰ÑŒÑŽ ÑÐ¶Ð°Ñ‚Ð¸Ñ CCITT Group 4. Сжатие JPEG будет применÑтьÑÑ ÐºÐ¾ вÑем цветным изображениÑм.</html> PDF Document Документ PDF PDF export was not compiled. ЭкÑпорт в PDF не был выполнен. PDF Files (*.pdf) Файлы PDF (*.pdf) PDF Options tab caption Параметры PDF System error: %1. СиÑÑ‚ÐµÐ¼Ð½Ð°Ñ Ð¾ÑˆÐ¸Ð±ÐºÐ°: %1. Unable to create output file. Ðе удалоÑÑŒ Ñоздать выходной файл. Unable to create temporary file. Ðе удалоÑÑŒ Ñоздать временный файл. Unable to reopen temporary file. Ðе удалоÑÑŒ заново открыть временный файл. QDjViewPlugin::Document Requesting %1. ЗапрашиваетÑÑ %1. QDjViewPrefsDialog &Apply &Применить Cache КÑш Cancel Отмена &Clear &ОчиÑтить Darker Темнее &Decoded page cache: КÑш &декодированных Ñтраниц: Interface Ð˜Ð½Ñ‚ÐµÑ€Ñ„ÐµÐ¹Ñ Show hidden text in status bar Показывать Ñкрытый текÑÑ‚ в Ñтроке ÑоÑтоÑÐ½Ð¸Ñ Override saving and printing restrictions Игнорировать запреты на печать и Ñохранение &Defaults &По умолчанию Dialog Диалог Display Отображение Display &annotations Показывать &Ð¿Ñ€Ð¸Ð¼ÐµÑ‡Ð°Ð½Ð¸Ñ Display page &frames Показывать &рамки Ñтраниц Embedded Plugin вÑтраиваемого плагина Enable magnifying &lens Включить &лупу For displaying hyper&links: Ð”Ð»Ñ Ð¾Ñ‚Ð¾Ð±Ñ€Ð°Ð¶ÐµÐ½Ð¸Ñ &гиперÑÑылок: For displaying the &lens: Ð”Ð»Ñ Ð¿Ð¾ÐºÐ°Ð·Ð° &лупы: For &selecting text or images: Ð”Ð»Ñ &Ð²Ñ‹Ð´ÐµÐ»ÐµÐ½Ð¸Ñ Ñ‚ÐµÐºÑта и изображений: Full Page Plugin полноÑтраничного плагина Full Screen Standalone Viewer ÑамоÑтоÑтельного Ð¿Ñ€Ð¸Ð»Ð¾Ð¶ÐµÐ½Ð¸Ñ (полноÑкранный режим) Gamma Гамма &Host: &ХоÑÑ‚: <html><b>Initial interface setup.</b><br>DjView can run as a standalone viewer, as a full screen viewer, as a full page browser plugin, or as a plugin embedded inside a html page. For each case, check the <tt>Remember</tt> box to automatically save and restore the interface setup. Otherwise, specify an initial configuration.</html> <html><b>ИÑходные параметры интерфейÑа.</b><br>DjView может быть запущен как ÑамоÑтоÑтельное приложение, в полноÑкранном режиме, в виде плагина браузера или плагина, вÑтроенного в Ñтраницу HTML. Ð”Ð»Ñ ÐºÐ°Ð¶Ð´Ð¾Ð³Ð¾ ÑÐ»ÑƒÑ‡Ð°Ñ ÑƒÑтановите параметр <tt>Запоминать наÑтройку</tt> Ð´Ð»Ñ Ð°Ð²Ñ‚Ð¾Ð¼Ð°Ñ‚Ð¸Ñ‡ÐµÑкого ÑÐ¾Ñ…Ñ€Ð°Ð½ÐµÐ½Ð¸Ñ Ð¸ воÑÑÑ‚Ð°Ð½Ð¾Ð²Ð»ÐµÐ½Ð¸Ñ Ð¿Ð°Ñ€Ð°Ð¼ÐµÑ‚Ñ€Ð¾Ð² интерфейÑа. Иначе, определите начальную конфигурацию.</html> <html><b>Modifiers keys.</b><br>Define which combination of modifier keys will show the manifying lens, temporarily enable the selection mode, or highlight the hyperlinks.</html> <html><b>Клавиши-модификаторы.</b><br>Определите, какие комбинации клавиш-модификаторов будут показывать лупу, временно включать режим Ð²Ñ‹Ð´ÐµÐ»ÐµÐ½Ð¸Ñ Ð¸Ð»Ð¸ подÑвечивать гиперÑÑылки.</html> <html><b>Advanced.</b><br>You can override the default interface language, disable the page animations, or enable additional menu entries that are useful for authoring DjVu files.You can also disable the printing or saving restrictions dictated by certain web sites. The manual color correction can be useful with old printers.</html> <html><p><b>Advanced.</b>You can override the default interface language, disable the page animations, or enable additional menu entries that are useful for authoring DjVu files.You can also disable the printing or saving restrictions dictated by certain web sites. The manual color correction can be useful with old printers.</html> <html><b>Продвинутые.</b><br>Ðа Ñтой вкладке можно переопределить Ñзык интерфейÑа по умолчанию, запретить анимацию Ñтраниц, а также включить дополнительные пункты меню программы. Можно также отключить Ñледование ограничениÑм, уÑтанавливаемым некоторыми веб-Ñайтами. Ð ÑƒÑ‡Ð½Ð°Ñ Ð½Ð°Ñтройка цветовой коррекции может быть полезна при иÑпользовании Ñтарых принтеров.</html> <html><b>Network proxy settings.</b><br>These proxy settings are used when the standalone djview viewer accesses a djvu document through a http url. The djview plugin always uses the proxy settings of the web browser.<p><b>Cache settings.</b><br>The <i>pixel cache</i> stores image data located outside the visible area. This cache makes panning smoother. The <i>decoded page cache</i> contains partially decoded pages. It provides faster response times when navigating a multipage document or when returning to a previously viewed page. Clearing this cache might be useful to reflect a change in the page data without restarting the DjVu viewer.</html> <html><b>Параметры прокÑи.</b><br>Эти параметры прокÑи иÑпользуютÑÑ, когда проÑмотрщик в качеÑтве ÑамоÑтоÑтельного Ð¿Ñ€Ð¸Ð»Ð¾Ð¶ÐµÐ½Ð¸Ñ Ð¾Ð±Ñ€Ð°Ñ‰Ð°ÐµÑ‚ÑÑ Ðº документу DjVu по протоколу HTTP. ЕÑли проÑмотрщик запуÑкаетÑÑ Ðº виде плагина, вÑегда иÑпользуютÑÑ Ð¿Ð°Ñ€Ð°Ð¼ÐµÑ‚Ñ€Ñ‹ браузера Ð´Ð»Ñ Ð¿Ñ€Ð¾ÐºÑи.<p><b>Параметры кÑшированиÑ.</b><br><i>ПикÑельный кÑш</i> хранит данные Ð¸Ð·Ð¾Ð±Ñ€Ð°Ð¶ÐµÐ½Ð¸Ñ Ð²Ð½Ðµ видимой облаÑти. Этот кÑш обеÑпечивает плавную прокрутку. <i>КÑш декодированных Ñтраниц</i> Ñодержит чаÑтично декодированные Ñтраницы. Он обеÑпечивает более короткое Ð²Ñ€ÐµÐ¼Ñ Ð¾Ñ‚ÐºÐ»Ð¸ÐºÐ° при повторном проÑмотре Ñтраниц многоÑтраничного документа. ОчиÑтка кÑша может быть полезна Ð´Ð»Ñ Ð¾Ñ‚Ñ€Ð°Ð¶ÐµÐ½Ð¸Ñ Ð¸Ð·Ð¼ÐµÐ½ÐµÐ½Ð¸Ð¹ Ñтраницы без перезапуÑка проÑмотрщика.</html> <html>Screen color correction.<br>Adjust slider until gray shades look similar.</html> <html>Ð¦Ð²ÐµÑ‚Ð¾Ð²Ð°Ñ ÐºÐ¾Ñ€Ñ€ÐµÐºÑ†Ð¸Ñ Ð´Ð»Ñ Ð¾Ñ‚Ð¾Ð±Ñ€Ð°Ð¶ÐµÐ½Ð¸Ñ.<br>УÑтановите ползунок так, чтобы оттенки Ñерого выглÑдели макÑимально похожими.</html> Force inverted luminance Force inverted luminance. Принудительно инвертировать ÑркоÑть &Interface &Ð˜Ð½Ñ‚ÐµÑ€Ñ„ÐµÐ¹Ñ &Keys &Комбинации клавиш Keys Комбинации клавиш Mouse wheel КолеÑо мыши Mouse wheel scrolls the page Mouse wheel scrolls the page. КолеÑо мыши прокручивает Ñтраницу Mouse wheel changes the zoom factor Mouse wheel changes the zoom factor. КолеÑо мыши менÑет маÑштаб &Lens &Лупа Lens options Параметры лупы Lens &size: &Размер: Lighter Светлее Magnifying &power: &Увеличение: &Menu bar &Меню &Network &Сеть &Ok &OK Options for Параметры Ð´Ð»Ñ Pass&word: &Пароль: &Pixel cache: &ПикÑельный кÑш: pixels пикÑелов &Port: Пор&Ñ‚: Preferences[*] - DjView ÐаÑтройка[*] — DjView Proxy settings ÐаÑтройка прокÑи &Remember initial state from last invocation &Запоминать параметры, которые иÑпользовалиÑÑŒ в поÑледний раз Sc&rollbars &ПолоÑÑ‹ прокрутки Show Показывать &Side bar &Ð‘Ð¾ÐºÐ¾Ð²Ð°Ñ Ð¿Ð°Ð½ÐµÐ»ÑŒ Standalone Viewer ÑамоÑтоÑтельного Ð¿Ñ€Ð¸Ð»Ð¾Ð¶ÐµÐ½Ð¸Ñ Stat&us bar Строка &ÑоÑтоÑÐ½Ð¸Ñ &Tool bar &Панель инÑтрументов Use pro&xy to access the network ИÑпользовать &прокÑи Ð´Ð»Ñ Ð´Ð¾Ñтупа к Ñети &User: &Пользователь: x x &Zoom: &МаÑштаб: <html><b>Screen gamma correction.</b><br>The best color rendition is achieved by adjusting the gamma correction slider and choosing the position that makes the gray square as uniform as possible.<p><b>Screen resolution.</b><br>This option forces a particular resolution instead of using the unreliable resolution advertised by the operating system. Forcing the resolution to 100 dpi matches the behavior of the djvulibre command line tools.</html> <html><b>Ð­ÐºÑ€Ð°Ð½Ð½Ð°Ñ Ð³Ð°Ð¼Ð¼Ð°-коррекциÑ.</b><br>Ð›ÑƒÑ‡ÑˆÐ°Ñ Ñ†Ð²ÐµÑ‚Ð¾Ð¿ÐµÑ€ÐµÐ´Ð°Ñ‡Ð° доÑтигаетÑÑ Ñ€ÐµÐ³ÑƒÐ»Ð¸Ñ€Ð¾Ð²Ð°Ð½Ð¸ÐµÐ¼ ползунка гамма-коррекции и выбором позиции, при которой Ñерый квадрат кажетÑÑ Ð¼Ð°ÐºÑимально однородным.<p><b>Разрешение Ñкрана.</b><br>Этот параметр менÑет разрешение на выбранное, параметр полезен при неправильном определении Ñ€Ð°Ð·Ñ€ÐµÑˆÐµÐ½Ð¸Ñ Ð¾Ð¿ÐµÑ€Ð°Ñ†Ð¸Ð¾Ð½Ð½Ð¾Ð¹ ÑиÑтемой. При выборе Ñ€Ð°Ð·Ñ€ÐµÑˆÐµÐ½Ð¸Ñ 100 DPI поведение Ñовпадает Ñ Ð¿Ð¾Ð²ÐµÐ´ÐµÐ½Ð¸ÐµÐ¼ утилит командной Ñтроки djvulibre.</html> <html><b>Magnifying lens.</b><br>The magnifying lens appears when you depress the modifier keys specified in tab <tt>Keys</tt>. This panel lets you choose the power and the size of the magnifying lens.</html> <html><b>Лупа.</b><br>Лупа поÑвлÑетÑÑ, когда вы нажимаете комбинацию клавиш, определенную на вкладке <tt>Комбинации клавиш</tt>. Эта панель позволÑет выбрать размер и увеличение лупы.</html> &Screen &Экран Force screen &resolution Переопределить &разрешение Ñкрана dpi DPI &Advanced &Продвинутые MB Мб Miscellaneous Разное Force language (next time djview runs) Force language (when djview is restarted.) ЗафикÑировать Ñзык интерфейÑа (Ñо Ñледующего запуÑка) Manual printer color correction ÐаÑтроить цветовую коррекцию принтера вручную gamma= гамма= Enable page animations Enable animations Включить анимацию Ñтраниц Enable advanced features in menus Добавить в меню дополнительные возможноÑти Layout Вид Continuous Ðепрерывный Side-by-side Пары Ñтраниц Cover Page Титульный лиÑÑ‚ Right-to-Left Справа налево QDjViewPrintDialog A file with this name already exists. Do you want to replace it? Файл Ñ Ñ‚Ð°ÐºÐ¸Ð¼ именем уже ÑущеÑтвует. Заменить его? All files save filter Ð’Ñе файлы &Cancel О&тмена Choose Выбрать C&urrent page &Текущую Ñтраницу &Defaults &По умолчанию Destination Результат Dialog Диалог &Document &Документ <html><b>Printing.</b><br/> You can print the whole document or a page range. Use the <tt>Choose</tt> button to select a print destination and specify printer options. Additional dialog tabs might appear to specify conversion options.</html> <html><b>Печать.</b><br/> Ð’Ñ‹ можете напечатать веÑÑŒ документ или диапазон Ñтраниц. ИÑпользуйте кнопку <tt>Выбрать</tt>, чтобы выбрать и наÑтроить принтер. ИÑпользуйте другие вкладки Ð´Ð»Ñ Ð½Ð°Ñтройки Ð¿Ñ€ÐµÐ¾Ð±Ñ€Ð°Ð·Ð¾Ð²Ð°Ð½Ð¸Ñ Ñ„Ð¾Ñ€Ð¼Ð°Ñ‚Ð¾Ð².</html> &Ok &OK &Pages &Страницы от Print Печатать Printer name: Ð˜Ð¼Ñ Ð¿Ñ€Ð¸Ð½Ñ‚ÐµÑ€Ð°: Print to file Печать в файл Print To File - DjView dialog caption Печать в файл — DjView Question - DjView dialog caption Ð’Ð¾Ð¿Ñ€Ð¾Ñ - DjView &Replace &Заменить Stop ОÑтановить This operation has been interrupted. ÐžÐ¿ÐµÑ€Ð°Ñ†Ð¸Ñ Ð±Ñ‹Ð»Ð° прервана. This operation has failed. Ðе удалоÑÑŒ выполнить операцию. to до (invalid printer) (недопуÑтимый принтер) QDjViewPrnExporter Cannot render page %1. Ðевозможно преобразовать Ñтраницу %1. <html><b>Printing options.</b><br>Option <tt>Color</tt> enables color printing. Document pages can be decorated with a frame. Option <tt>Scale to fit</tt> accommodates whatever paper size your printer uses. Zoom factor <tt>100%</tt> reproduces the initial document size. Orientation <tt>Automatic</tt> chooses portrait or landscape on a page per page basis.</html> <html><b>Параметры печати.</b><br>Параметр <tt>Цвет</tt> включает цветную печать. К Ñтраницам документа может быть добавлена рамка. Параметр <tt>МаÑштабировать по размеру Ñтраницы</tt> приÑпоÑабливает документ к размерам лиÑтов бумаги, иÑпользуемой вашим принтером. МаÑштаб <tt>100%</tt> воÑпроизводит иÑходный размер документа. Параметр ориентации <tt>ÐвтоматичеÑки</tt> выбирает книжную или альбомную ориентацию по размерам каждой Ñтраницы.</html> Printer data Данные принтера Printing Options tab caption Параметры печати PRN Files (*.prn) Файлы PRN (*.prn) QDjViewSaveDialog A file with this name already exists. Do you want to replace it? Файл Ñ Ñ‚Ð°ÐºÐ¸Ð¼ именем уже ÑущеÑтвует.Заменить его? All files save filter Ð’Ñе файлы Bundled DjVu Document СвÑзанный документ DjVu (в одном файле) &Cancel О&тмена C&urrent page &Текущую Ñтраницу Destination Результат Dialog Диалог &Document &Документ Error - DjView dialog caption Ошибка — DjView Format: Формат: <html><b>Saving.</b><br/> You can save the whole document or a page range. The bundled format creates a single file. The indirect format creates multiple files suitable for web serving.</html> <html><b>Сохранение.</b><br/> Ð’Ñ‹ можете Ñохранить веÑÑŒ документ или диапазон Ñтраниц.</html> Indirect DjVu Document ÐепрÑмой документ DjVu (Ñтраницы в отдельных файлах) &Ok &OK Overwriting the current file is not allowed! Замена текущего файла не позволÑетÑÑ! &Pages &Страницы от Question - DjView dialog caption Ð’Ð¾Ð¿Ñ€Ð¾Ñ â€” DjView &Replace &Заменить Save Сохранить Save - DjView dialog caption Сохранение — DjView Stop ОÑтановить This operation has been interrupted. ÐžÐ¿ÐµÑ€Ð°Ñ†Ð¸Ñ Ð±Ñ‹Ð»Ð° прервана. This operation has failed. Ðе удалоÑÑŒ выполнить операцию. to до QDjViewThumbnails Control Left Mouse Button Control + левую кнопку мыши <html><b>Document thumbnails.</b><br/> This panel display thumbnails for the document pages. Double click a thumbnail to jump to the selected page. %1 to change the thumbnail size or the refresh mode. The smart refresh mode only computes thumbnails when the page data is present (displayed or cached.)</html> <html><b>Макеты Ñтраниц документа.</b><br/> Эта панель отображает макеты Ñтраниц документа. Двойной щелчок перемещает к выбранной Ñтранице. ИÑпользуйте %1, чтобы изменить размер макетов или режим обновлениÑ. Ð’ умном режиме Ð¾Ð±Ð½Ð¾Ð²Ð»ÐµÐ½Ð¸Ñ Ð¼Ð°ÐºÐµÑ‚Ñ‹ показываютÑÑ Ñ‚Ð¾Ð»ÑŒÐºÐ¾ Ð´Ð»Ñ Ñ‚ÐµÑ… Ñтраниц, которые либо отображаютÑÑ, либо кÑшированы.</html> Large thumbnail menu Большие Medium thumbnail menu Средние Right Mouse Button правую кнопку мыши Small thumbnail menu Маленькие Smart thumbnail menu Умные Tiny thumbnail menu Крошечные QDjViewTiffExporter Cannot open output file. Ðе удалоÑÑŒ открыть выходной файл. <html><b>TIFF options.</b><br>The resolution box specifies an upper limit for the resolution of the TIFF images. Forcing bitonal G4 compression encodes all pages in black and white using the CCITT Group 4 compression. Allowing JPEG compression uses lossy JPEG for all non bitonal or subsampled images. Otherwise, allowing deflate compression produces more compact (but less portable) files than the default packbits compression.</html> <html><b>Параметры TIFF.</b><br>Элемент «Разрешение» задаёт верхнюю границу Ñ€Ð°Ð·Ñ€ÐµÑˆÐµÐ½Ð¸Ñ Ð¸Ð·Ð¾Ð±Ñ€Ð°Ð¶ÐµÐ½Ð¸Ð¹ TIFF. При применении чёрно-белого ÑÐ¶Ð°Ñ‚Ð¸Ñ G4 вÑе Ñтраницы кодируютÑÑ Ñ Ð¿Ð¾Ð¼Ð¾Ñ‰ÑŒÑŽ ÑÐ¶Ð°Ñ‚Ð¸Ñ CCITT Group 4. Сжатие JPEG будет применÑтьÑÑ ÐºÐ¾ вÑем цветным изображениÑм.</html> Internal error. ВнутреннÑÑ Ð¾ÑˆÐ¸Ð±ÐºÐ°. Out of memory. ÐедоÑтаточно памÑти. TIFF Document Документ TIFF TIFF export has not been compiled. ЭкÑпорт в TIFF не был выполнен. TIFF Files (*.tiff *.tif) Файлы TIFF (*.tiff *.tif) TIFF Options tab caption Параметры TIFF QDjVuNetDocument Requesting '%1' ЗапрашиваетÑÑ Â«%1» QDjVuNetDocument::Private Received http status %1 while retrieving %2. %1 is an http status code Получен ÑÑ‚Ð°Ñ‚ÑƒÑ HTTP %1 при запроÑе %2. Received <%1> data while retrieving %2. %1 is a mime type Получены данные %1 при запроÑе %2. %1 while retrieving '%2'. %1 при запроÑе «%2». Cannot validate the certificate for server %1. Ðевозможно удоÑтоверить Ñертификат Ñервера %1. Authentication required for %1 (%2). ТребуетÑÑ Ð°ÑƒÑ‚ÐµÐ½Ñ‚Ð¸Ñ„Ð¸ÐºÐ°Ñ†Ð¸Ñ Ð´Ð»Ñ %1 (%2). Authentication required for proxy %1. ТребуетÑÑ Ð°ÑƒÑ‚ÐµÐ½Ñ‚Ð¸Ñ„Ð¸ÐºÐ°Ñ†Ð¸Ñ Ð´Ð»Ñ Ð¿Ñ€Ð¾ÐºÑи-Ñервера %1. djview4/src/djview_uk.ts000066400000000000000000005252471174072760700156120ustar00rootroot00000000000000 Generic thisLanguage Name of THIS language УкраїнÑька QApplication Option '-fix' is deprecated. Параметр '-fix' Ñ” заÑтарілим. QDjView FitWidth zoomCombo Підібрати ширину FitPage zoomCombo Підібрати виÑоту Stretch zoomCombo РозтÑгнути 1:1 zoomCombo 1:1 300% zoomCombo 300% 200% zoomCombo 200% 150% zoomCombo 150% 100% zoomCombo 100% 75% zoomCombo 75% 50% zoomCombo 50% Color modeCombo Колір Stencil modeCombo Шаблон Foreground modeCombo Передній план Background modeCombo Тло &New File| С&творити Ctrl+N File|New Ctrl+N Create a new DjView window. Створити нове вікно DjView. &Open File| &Відкрити Open a DjVu document. Відкрити документ DjVu. Close this window. Закрити це вікно. Close all windows and quit the application. Закрити вÑÑ– вікна та вийти з програми. Save the DjVu document. Зберегти документ DjVu. Print the DjVu document. Друкувати документ DjVu. Find text in the document. Знайти текÑÑ‚ у документі. Find next occurence of search text in the document. Шукати наÑтупне Ð²Ñ…Ð¾Ð´Ð¶ÐµÐ½Ð½Ñ Ñ‚ÐµÐºÑту до документа. Find previous occurence of search text in the document. Шукати попереднє Ð²Ñ…Ð¾Ð´Ð¶ÐµÐ½Ð½Ñ Ñ‚ÐµÐºÑту до документа. Select a rectangle in the document. Обрати прÑмокутну облаÑть у документі. Increase the magnification. Збільшити облаÑть переглÑду. Decrease the magnification. Зменшити облаÑть переглÑду. Set magnification to fit page width. Ð’Ñтановити маÑштаб так, щоб було видно вÑÑŽ виÑоту Ñторінки. Set magnification to fit page. Ð’Ñтановити маÑштаб так, щоб було видно вÑÑŽ ширину Ñторінки. Set full resolution magnification. Ð’Ñтановити показ у натуральному розмірі. Magnify 300% МаÑштаб у 300% Magnify 20% МаÑштаб у 200% Magnify 150% МаÑштаб у 150% Magnify 100% МаÑштаб у 100% Magnify 75% МаÑштаб у 75% Magnify 50% МаÑштаб у 50% Jump to first document page. Перейти до першої Ñторінки документа. Jump to next document page. Перейти до наÑтупної Ñторінки документа. Jump to previous document page. Перейти до попередньої Ñторінки документа. Jump to last document page. Перейти до оÑтанньої Ñторінки документа. Backward in history. Ðазад за журналом. Forward in history. Вперед за журналом. Rotate page image counter-clockwise. ÐžÐ±ÐµÑ€Ñ‚Ð°Ð½Ð½Ñ ÐºÐ°Ñ€Ñ‚Ð¸Ð½ÐºÐ¸ Ñторінки проти годинникової Ñтрілки. Rotate page image clockwise. ÐžÐ±ÐµÑ€Ñ‚Ð°Ð½Ð½Ñ ÐºÐ°Ñ€Ñ‚Ð¸Ð½ÐºÐ¸ Ñторінки за годинниковою Ñтрілкою. Set natural page orientation. Зберегти початкову орієнтацію Ñторінки. Turn page on its left side. Повернути Ñторінку на Ñ—Ñ— лівий бік. Turn page upside-down. Перевернути Ñторінку догори низом. Turn page on its right side. Повернути Ñторінку на Ñ—Ñ— правий бік. Show information about the document encoding and structure. Показати інформацію про ÐºÐ¾Ð´ÑƒÐ²Ð°Ð½Ð½Ñ Ð´Ð¾ÐºÑƒÐ¼ÐµÐ½Ñ‚Ð° та його Ñтруктуру. Show the document and page meta data. Показати метадані документа та Ñторінки. &About DjView... &Про DjView... Show information about this program. Показати інформацію про цю програму. Display everything. Показувати вÑе. Only display the document bitonal stencil. Показати тільки двокольоровий шаблон документа. Only display the foreground layer. Показувати лише передній план. Only display the background layer. Показувати лише задній план. Show the preferences dialog. Показати діалог налаштуваннÑ. Show/hide the side bar. Показати або Ñховати бічний пенал. Show/hide the standard tool bar. Показати або Ñховати панель інÑтрументів. Show/hide the status bar. Показати або Ñховати панель Ñтану. Toggle full screen mode. Перемикач повноекранного режиму. Toggle continuous layout mode. Перемикач режиму неперервного переглÑду Ñторінок. Toggle side-by-side layout mode. Перемикач режиму показу Ñторінок поруч. Control Left Mouse Button Контроль правою кнопкою миші Right Mouse Button Права кнопка миші <html><b>Selecting a rectangle.</b><br/> Once a rectangular area is selected, a popup menu lets you copy the corresponding text or image. Instead of using this tool, you can also hold %1 and use the Left Mouse Button.</html> <html><b>Вибір прÑмокутної облаÑті.</b><br/> Тільки-но обрано прÑмокутну облаÑть, Ñпадне меню надаÑть вам змогу Ñкопіювати відповідний текÑÑ‚ чи картинку. ЗаміÑть викориÑÑ‚Ð°Ð½Ð½Ñ Ñ†ÑŒÐ¾Ð³Ð¾ інÑтрументу Ви можете натиÑнути %1 та викориÑтати ліву кнопку миші.</html> <html><b>Zooming.</b><br/> Choose a zoom level for viewing the document. Zoom level 100% displays the document for a 100 dpi screen. Zoom levels <tt>Fit Page</tt> and <tt>Fit Width</tt> ensure that the full page or the page width fit in the window. </html> <html><b>МаÑштабуваннÑ.</b><br/> Оберіть маÑштаб Ð´Ð»Ñ Ð¿ÐµÑ€ÐµÐ³Ð»Ñду документа. МаÑштаб у 100% покаже документ у роздільній здатноÑті екрана 100 Ñ‚/д. МаÑштаб <tt>Підібрати під Ñторінку</tt> та <tt>Підібрати ширину</tt> надаÑть змогу бачити на екрані вÑÑŽ Ñторінку або вÑÑŽ ширину Ñторінки. </html> <html><b>Rotating the pages.</b><br/> Choose to display pages in portrait or landscape mode. You can also turn them upside down.</html> <html><b>Поворот Ñторінок.</b><br/> Оберіть, щоб переглÑдати Ñторінки у книжковому чи альбомному режимі. Ви також можете перевернути Ñ—Ñ… догори низом.</html> <html><b>Display mode.</b><br/> DjVu images compose a background layer and a foreground layer using a stencil. The display mode specifies with layers should be displayed.</html> <html><b>Режим показу.</b><br/> Картинки DjVu ÑкладаютьÑÑ Ð· шару тла та шару переднього плану за допомогою шаблону. Режим показу визначає шари, Ñкі буде показано.</html> <html><b>Document and page information.</b><br> Display a dialog window for viewing encoding information pertaining to the document or to a specific page.</html> <html><b>Ð†Ð½Ñ„Ð¾Ñ€Ð¼Ð°Ñ†Ñ–Ñ Ð¿Ñ€Ð¾ документ та Ñторінку.</b><br> Показує вікно діалогу Ð´Ð»Ñ Ð¿ÐµÑ€ÐµÐ³Ð»Ñду інформації про кодуваннÑ, що ÑтоÑуєтьÑÑ Ð´Ð¾ÐºÑƒÐ¼ÐµÐ½Ñ‚Ð° або певної Ñторінки.</html> <html><b>Document and page metadata.</b><br> Display a dialog window for viewing metadata pertaining to the document or to a specific page.</html> <html><b>Метадані документа та Ñторінки.</b><br> Показує діалогове вікно Ð´Ð»Ñ Ð¿ÐµÑ€ÐµÐ³Ð»Ñду метаданих, що ÑтоÑуютьÑÑ Ð´Ð¾ÐºÑƒÐ¼ÐµÐ½Ñ‚Ð° або певної Ñторінки.</html> <html><b>Continuous layout.</b><br/> Display all the document pages arranged vertically inside the scrollable document viewing area.</html> <html><b>Ðеперервний показ.</b><br/> Показує вÑÑ– Ñторінки документа розташованими вертикально вÑередині облаÑті переглÑду, придатної Ð´Ð»Ñ Ð³Ð¾Ñ€Ñ‚Ð°Ð½Ð½Ñ.</html> <html><b>Side by side layout.</b><br/> Display pairs of pages side by side inside the scrollable document viewing area.</html> <html><b>Ð Ð¾Ð·Ñ‚Ð°ÑˆÑƒÐ²Ð°Ð½Ð½Ñ Ð¿Ð¾Ñ€ÑƒÑ‡.</b><br/> Показує пари Ñторінок поруч одна з одною вÑередині облаÑті переглÑду документа, придатної Ð´Ð»Ñ Ð³Ð¾Ñ€Ñ‚Ð°Ð½Ð½Ñ.</html> <html><b>Page information.</b><br/> Display information about the page located under the cursor: the sequential page number, the page size in pixels, and the page resolution in dots per inch. </html> <html><b>Ð†Ð½Ñ„Ð¾Ñ€Ð¼Ð°Ñ†Ñ–Ñ Ð¿Ñ€Ð¾ Ñторінку.</b><br/> Показує інформацію про Ñторінку розташовану під вказівником: номер Ñторінки, розмір Ñторінки у точках та роздільну здатніÑть Ñторінки у точках на дюйм. </html> <html><b>Cursor information.</b><br/> Display the position of the mouse cursor expressed in page coordinates. </html> <html><b>Ð†Ð½Ñ„Ð¾Ñ€Ð¼Ð°Ñ†Ñ–Ñ Ð¿Ñ€Ð¾ вказівник.</b><br/> Показує позицію вказівника миші виражену у координатах Ñторінки. </html> <html><b>Document viewing area.</b><br/> This is the main display area for the DjVu document. <ul><li>Arrows and page keys to navigate the document.</li><li>Space and BackSpace to read the document.</li><li>Keys <tt>+</tt> <tt>-</tt> <tt>[</tt> <tt>]</tt> to zoom or rotate the document.</li><li>Left Mouse Button for panning and selecting links.</li><li>%3 for displaying the contextual menu.</li><li>%1 Left Mouse Button for selecting text or images.</li><li>%2 for popping the magnification lens.</li></ul></html> <html><b>ОблаÑть переглÑду документа.</b><br/> Це головна облаÑть показу документа DjVu. <ul><li>Стрілки та клавіші Ð¿ÐµÑ€ÐµÐ¼Ñ–Ñ‰ÐµÐ½Ð½Ñ Ñторінки може бути викориÑтано Ð´Ð»Ñ Ð½Ð°Ð²Ñ–Ð³Ð°Ñ†Ñ–Ñ— документом.</li><li>Пробіл та BackSpace - Ð´Ð»Ñ Ñ‡Ð¸Ñ‚Ð°Ð½Ð½Ñ Ð´Ð¾ÐºÑƒÐ¼ÐµÐ½Ñ‚Ð°.</li><li>Клавіші <tt>+</tt> <tt>-</tt> <tt>[</tt> <tt>]</tt> - Ð´Ð»Ñ Ð¼Ð°ÑÑˆÑ‚Ð°Ð±ÑƒÐ²Ð°Ð½Ð½Ñ Ñ‚Ð° повороту документа.</li><li>Ліва кнопка миші - Ð´Ð»Ñ Ð¿Ð°Ð½Ð¾Ñ€Ð°Ð¼ÑƒÐ²Ð°Ð½Ð½Ñ Ñ‚Ð° вибору поÑилань.</li><li>%3 - Ð´Ð»Ñ Ð²Ñ–Ð´ÐºÑ€Ð¸Ñ‚Ñ‚Ñ ÐºÐ¾Ð½Ñ‚ÐµÐºÑтного меню.</li><li>%1 ліва кнопка миші - Ð´Ð»Ñ Ð²Ð¸Ð±Ð¾Ñ€Ñƒ текÑту або картинок.</li><li>%2 - Ð´Ð»Ñ Ð²Ð¸ÐºÐ»Ð¸ÐºÑƒ збільшувальної лінзи.</li></ul></html> <html><b>Document viewing area.</b><br/> This is the main display area for the DjVu document. But you must first open a DjVu document to see anything.</html> <html><b>ОблаÑть переглÑду документа.</b><br/> Це головна облаÑть переглÑду Ð´Ð»Ñ Ð´Ð¾ÐºÑƒÐ¼ÐµÐ½Ñ‚Ð° DjVu. Ðле перед цим Вам, звичайно, Ñлід відкрити документ DjVu, щоб щоÑÑŒ побачити.</html> Option '%1' requires boolean argument. Параметр '%1' потребує булівÑького аргументу. Illegal value '%2' for option '%1'. Ðекоректне Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ '%2' Ð´Ð»Ñ Ð¿Ð°Ñ€Ð°Ð¼ÐµÑ‚Ñ€Ð°'%1'. Toolbar option '%1' is not implemented. Параметр панелі інÑтрументів '%1' не може бути заÑтоÑований. Toolbar option '%1' is not recognized. Параметр панелі інÑтрументів '%1' неможливо розпізнати. Option '%1' requires a standalone viewer. Параметр '%1' потребує ÑамодоÑтатнього переглÑдача. Deprecated option '%1' Ðебажаний параметр '%1' Option '%1' is not implemented. Параметр '%1' не може бути заÑтоÑований. Option '%1' is not recognized. Параметр '%1' неможливо розпізнати. DjView DjView Cannot open file '%1'. Ðеможливо відкрити файл '%1'. Opening DjVu file Ð’Ñ–Ð´ÐºÑ€Ð¸Ñ‚Ñ‚Ñ Ñ„Ð°Ð¹Ð»Ð° DjVu Cannot open URL '%1'. Ðеможливо відкрити URL '%1'. Opening DjVu document Ð’Ñ–Ð´ÐºÑ€Ð¸Ñ‚Ñ‚Ñ Ð´Ð¾ÐºÑƒÐ¼ÐµÐ½Ñ‚Ð° DjVu Certificate validation error - DjView dialog caption Помилка під Ñ‡Ð°Ñ Ñпроби перевірити Ñертифікат — DjView <html> %1 Do you want to continue anyway? </html> <html> %1 Бажаєте продовжити обробку попри це?</html> Cannot find page numbered: %1 Ðе вдалоÑÑ Ð·Ð½Ð°Ð¹Ñ‚Ð¸ Ñторінку з номером: %1 Cannot find page named: %1 Ðе вдалоÑÑ Ð·Ð½Ð°Ð¹Ñ‚Ð¸ Ñторінку з назвою: %1 Unrecognized sidebar options '%1'. Ðерозпізнаний параметри бічної панелі '%1'. <html> This file was served with printing restrictions. Do you want to print it anyway?</html> <html> This file was served with printing restrictions.Do you want to print it anyway?</html> <html> Друк цього файла обмежено під Ñ‡Ð°Ñ ÑтвореннÑ. Бажаєте надрукувати його попри це?</html> <html> This file was served with saving restrictions. Do you want to save it anyway?</html> <html> This file was served with saving restrictions.Do you want to save it anyway?</html> <html> Права на Ð·Ð±ÐµÑ€ÐµÐ¶ÐµÐ½Ð½Ñ Ñ†ÑŒÐ¾Ð³Ð¾ файла обмежено. Бажаєте зберегти його попри це?</html> Cannot write file '%1'. %2. Файл '%1' неможливо запиÑати. %2. Cannot determine file format. Filename '%1' has no suffix. Ðеможливо визначити формат файла. Ðазва файла '%1' не має ÑуфікÑу. Image format %1 not supported. Формат картинки %1 не підтримуєтьÑÑ. Cannot decode page %1. Ðеможливо розкодувати Ñторінку %1. Cannot decode document. Ðеможливо розкодувати документ. Decoding DjVu document Ð Ð¾Ð·ÐºÐ¾Ð´ÑƒÐ²Ð°Ð½Ð½Ñ Ð´Ð¾ÐºÑƒÐ¼ÐµÐ½Ñ‚Ð° DjVu x=%1 y=%2 x=%1 y=%2 %3x%4+%1+%2 %3x%4+%1+%2 Go: %n pages forward. Перехід на %n Ñторінку вперед. Перехід на %n Ñторінки вперед. Перехід на %n Ñторінок вперед. Go: %n pages backward. Перехід на %n Ñторінку назад. Перехід на %n Ñторінки назад. Перехід на %n Ñторінок назад. Go: page %1. Перехід: Ñторінка %1. Go: %1 Link: %1 Перехід: %1 (in other window.) (у іншому вікні.) Cannot resolve link '%1' Ðеможливо розпізнати поÑÐ¸Ð»Ð°Ð½Ð½Ñ '%1' Cannot spawn a browser for url '%1' Ðеможливо викликати переглÑдач Ð´Ð»Ñ url '%1' Copy text (%1) ÐšÐ¾Ð¿Ñ–ÑŽÐ²Ð°Ð½Ð½Ñ Ñ‚ÐµÐºÑту (%1) Save text as... Ð—Ð±ÐµÑ€ÐµÐ¶ÐµÐ½Ð½Ñ Ñ‚ÐµÐºÑту Ñк... Copy image (%1x%2 pixels) ÐšÐ¾Ð¿Ñ–ÑŽÐ²Ð°Ð½Ð½Ñ ÐºÐ°Ñ€Ñ‚Ð¸Ð½ÐºÐ¸ (%1x%2 пікÑелів) Save image as... Ð—Ð±ÐµÑ€ÐµÐ¶ÐµÐ½Ð½Ñ ÐºÐ°Ñ€Ñ‚Ð¸Ð½ÐºÐ¸ Ñк... Zoom to rectangle МаÑштабувати до прÑмокутника About DjView Про DjView DjVu files Файли DjVu cannot open '%1'. неможливо відкрити '%1'. &Export as... File| &ЕкÑпортувати Ñк... Export DjVu page or document to other formats. ЕкÑпортувати Ñторінку або документ DjVu у інші формати. Export - DjView dialog caption ЕкÑпорт - DjView Ctrl+E File|ExportAs Ctrl+E Ctrl+O File|Open Ctrl+O &Close File| &Закрити Ctrl+W File|Close Ctrl+W &Quit File| Ви&йти Ctrl+Q File|Quit Ctrl+Q Save &as... File| Зберегти &Ñк... Ctrl+S File|SaveAs Ctrl+S &Print... File| &Друкувати... Ctrl+P File|Print Ctrl+P &Find... Edit| Шук&ати... Ctrl+F Edit|Find Ctrl+F Find &Next Edit| Шукати &наÑтупне F3 Edit|Find Next F3 Find &Previous Edit| Шукати &попереднє Shift+F3 Edit|Find Previous Shift+F3 &Select Edit| &Обрати F2 Edit|Select F2 Zoom &In Zoom| З&більшити Zoom &Out Zoom| З&меншити Fit &Width Zoom| Підібрати за &шириною Fit &Page Zoom| Підібрати за &виÑотою One &to one Zoom| Один до &одного &300% Zoom| &300% &200% Zoom| &200% 150% Zoom| 150% &100% Zoom| &100% &75% Zoom| &75% &50% Zoom| &50% &First Page Go| &Перша Ñторінка &Next Page Go| &ÐаÑтупна Ñторінка &Previous Page Go| &ÐŸÐ¾Ð¿ÐµÑ€ÐµÐ´Ð½Ñ Ñторінка &Last Page Go| &ОÑÑ‚Ð°Ð½Ð½Ñ Ñторінка &Backward Go| &Ðазад &Forward Go| &Вперед Rotate &Left Rotate| Повернути &ліворуч Rotate &Right Rotate| Повернути &праворуч Rotate &0° Rotate| Поворот у &0° Rotate &90° Rotate| Поворот у &90° Rotate &180° Rotate| Поворот у &180° Rotate &270° Rotate| Поворот у &270° &Information... Edit| &ІнформаціÑ... Ctrl+I Edit|Information Ctrl+I &Metadata... Edit| &Метадані... Ctrl+M Edit|Metadata Ctrl+M &Color Display| &Колір &Stencil Display| &Шаблон &Foreground Display| &Передній план &Background Display| &Тло I&nvert Luminance View| І&нвертувати оÑвітленіÑть Invert image luminance while preserving hue. Інвертувати оÑвітленіÑть Ð·Ð¾Ð±Ñ€Ð°Ð¶ÐµÐ½Ð½Ñ Ð±ÐµÐ· зміни відтінку. Prefere&nces... Settings| Ðала&штуваннÑ... F9 Settings|Show sidebar F9 F10 Settings|Show toolbar F10 F&ull Screen View| Ðа веÑÑŒ &екран F11 View|FullScreen F11 &Continuous Layout| &Ðеперервно F4 Layout|Continuous F4 Side &by Side Layout| Сторінки &поруч F5 Layout|SideBySide F5 &File File| &Файл &Edit Edit| З&міни &View View| П&ереглÑд &Zoom View|Zoom &МаÑштаб &Rotate View|Rotate &Обертати &Display View|Display &ВиглÑд &Go Go| Пере&хід &Settings Settings| &Параметри &Help Help| &Довідка <html><b>Navigating the document.</b><br/> The page selector lets you jump to any page by name and can be activated at any time by pressing Ctrl+G. The navigation buttons jump to the first page, the previous page, the next page, or the last page. </html> <html><b>ÐÐ°Ð²Ñ–Ð³Ð°Ñ†Ñ–Ñ Ð´Ð¾ÐºÑƒÐ¼ÐµÐ½Ñ‚Ð¾Ð¼.</b><br/> Вибір Ñторінки надаÑть вам змогу перейти до будь-Ñкої Ñторінки за назвою. Вікно вибору Ñторінки можна відкрити натиÑканнÑм комбінації клавіш Ctrl+G. За допомогою кнопок навігації можна перейти до першої, попередньої, наÑтупної, оÑтанньої Ñторінки. </html> Thumbnails Мініатюри Outline ЕÑкіз Find Пошук Print - DjView dialog caption Друк - DjView Save - DjView dialog caption Ð—Ð±ÐµÑ€ÐµÐ¶ÐµÐ½Ð½Ñ - DjView Text files save filter ТекÑтові файли All files save filter Ð’ÑÑ– файли Save Text - DjView dialog caption Ð—Ð±ÐµÑ€ÐµÐ¶ÐµÐ½Ð½Ñ Ñ‚ÐµÐºÑту - DjView Error - DjView dialog caption Помилка - DjView Save Image - DjView dialog caption Зберегти картинку - DjView P%1/%2 %3x%4 %5dpi С%1 з %2 %3x%4 %5Ñ‚/д <html><h2>DjVuLibre DjView %1</h2>%2<p>Viewer for DjVu documents<br><a href=%3>%3</a><br>Copyright © 2006-- Léon Bottou.</p><p align=justify><small>This program is free software. You can redistribute or modify it under the terms of the GNU General Public License as published by the Free Software Foundation. This program is distributed <i>without any warranty</i>. See the GNU General Public License for more details.</small></p></html> <html><h2>DjVuLibre DjView %1</h2>%2<p>ПереглÑдач документів DjVu<br><a href=%3>%3</a><br>ÐвторÑькі права© 2006 — Léon Bottou.</p><p align=justify><small>Ð¦Ñ Ð¿Ñ€Ð¾Ð³Ñ€Ð°Ð¼Ð° Ñ” вільним програмним забезпеченнÑм. Ви можете поширювати або змінювати Ñ—Ñ— за умов Ð´Ð¾Ñ‚Ñ€Ð¸Ð¼Ð°Ð½Ð½Ñ GNU General Public License у тому виглÑді, у Ñкому Ñ—Ñ— оприлюднено Free Software Foundation. Ð¦Ñ Ð¿Ñ€Ð¾Ð³Ñ€Ð°Ð¼Ð° поширюєтьÑÑ <i>без жодних гарантій</i>. Щоб дізнатиÑÑ Ð±Ñ–Ð»ÑŒÑˆÐµ, прочитайте GNU General Public License.</small></p></html> Enter the URL of a DjVu document: Введіть адреÑу документа DjVu: Information - DjView dialog caption Ð†Ð½Ñ„Ð¾Ñ€Ð¼Ð°Ñ†Ñ–Ñ - DjView Metadata - DjView dialog caption Метадані - DjView Open &Recent Відкрити &нещодавній &Clear History Сп&орожнити журнал Open &Location... File| Відкрити &адреÑу... Open a remote DjVu document. Відкрити нелокальний документ DjVu. Ctrl+F3 Edit|Find Next Ctrl+F3 Ctrl+F2 Edit|Select Ctrl+F2 Ctrl+F9 Settings|Show sidebar Ctrl+F9 Ctrl+F10 Settings|Show toolbar Ctrl+F10 Ctrl+F11 View|FullScreen Ctrl+F11 Ctrl+F4 Layout|Continuous Ctrl+F4 Ctrl+F5 Layout|SideBySide Ctrl+F5 Open Location - DjView dialog caption Ð’Ñ–Ð´ÐºÑ€Ð¸Ñ‚Ñ‚Ñ Ð°Ð´Ñ€ÐµÑи - DjView Open - DjView dialog caption Ð’Ñ–Ð´ÐºÑ€Ð¸Ñ‚Ñ‚Ñ - DjView Show &Sidebar Settings| Показ &бічної панелі Show &Toolbar Settings| Показ панелі &інÑтрументів Show Stat&usbar Settings| Показ панелі &Ñтану %1 files (*.%2);; save image filter %1 Файлів (*.%2) %n characters %n Ñимвол %n Ñимволи %n Ñимволів Go: 1 page forward. Перехід: 1 Ñторінка вперед. Go: 1 page backward. Перехід: 1 Ñторінка назад. Copy &URL Edit| Копіювати &URL Save an URL for the current page into the clipboard. Зберегти адреÑу URL поточної Ñторінки у буфері. Copy &Outline Edit| Копіювати &еÑкіз Copy &Annotations Edit| Копіювати &анотації Copy text into the clipboard. Копіювати текÑÑ‚ до буфера. Save text into a file. Зберегти текÑÑ‚ до файла. Save image into a file. Зберегти Ð·Ð¾Ð±Ñ€Ð°Ð¶ÐµÐ½Ð½Ñ Ð´Ð¾ файла. Zoom the selection to fit the window. Підібрати облаÑть переглÑду під виділене. Copy URL Копіювати адреÑу URL Save into the clipboard an URL that highlights the selection. Зберегти до буфера адреÑу URL, Ñку виділено у вибраному. Copy Maparea Копіювати облаÑть карти Save into the clipboard a maparea annotation expression for program djvused. Зберегти до буфера вираз анотації карти облаÑті Ð´Ð»Ñ Ð¿Ñ€Ð¾Ð³Ñ€Ð°Ð¼Ð¸ djvused. Ctrl+C Edit|CopyURL Ctrl+C Save the djvused code for the outline into the clipboard. Зберегти код djvused еÑкізу до буфера. Save the djvused code for the page annotations into the clipboard. Зберегти код djvused анотації Ñторінки до буфера. Copy image into the clipboard. Копіювати Ð·Ð¾Ð±Ñ€Ð°Ð¶ÐµÐ½Ð½Ñ Ð´Ð¾ буфера. Co&ver Page Layout| &Обкладинка Ctrl+F6 Layout|CoverPage Ctrl+F6 F6 Layout|CoverPage F6 Show the cover page alone in side-by-side mode. У режимі зі Ñторінками, розташованими поруч, показувати першу Ñторінку окремо. &Right to Left Layout| &Справа ліворуч Ctrl+Shift+F6 Layout|RightToLeft Shift+F6 Layout|RightToLeft Shift+F6 Show pages right-to-left in side-by-side mode. Показувати Ñторінки лівопиÑних мов у режимі Ñторінок поруч. All files Ð’ÑÑ– файли &Hidden Text Display| При&хований текÑÑ‚ Overlay a representation of the hidden text layer. ÐаклаÑти на Ð·Ð¾Ð±Ñ€Ð°Ð¶ÐµÐ½Ð½Ñ Ð¿Ñ€ÐµÐ´ÑÑ‚Ð°Ð²Ð»ÐµÐ½Ð½Ñ ÑˆÐ°Ñ€Ñƒ прихованого текÑту. Hidden Text modeCombo Прихований текÑÑ‚ QDjViewApplication Usage: djview [options] [filename-or-url] Common options include: -help~~~Prints this message. -verbose~~~Prints all warning messages. -display <xdpy>~~~Select the X11 display <xdpy>. -geometry <xgeom>~~~Select the initial window geometry. -font <xlfd>~~~Select the X11 name of the main font. -style <qtstyle>~~~Select the QT user interface style. -fullscreen, -fs~~~Start djview in full screen mode. -page=<page>~~~Jump to page <page>. -zoom=<zoom>~~~Set zoom factor. -continuous=<yn>~~~Set continuous layout. -sidebyside=<yn>~~~Set side-by-side layout. ВикориÑтаннÑ: djview [параметри] [назва-файла-або адреÑа] Звичайні параметри такі: -help~~~Показати це Ð¿Ð¾Ð²Ñ–Ð´Ð¾Ð¼Ð»ÐµÐ½Ð½Ñ -verbose~~~Показувати вÑÑ– попереджувальні повідомленнÑ. -display <xdpy>~~~Обрати диÑплей X11 <xdpy>. -geometry <xgeom>~~~Обрати початкову геометрію вікна. -font <xlfd>~~~Обрати назву оÑновного шрифту X11. -style <qt-Ñтиль>~~~Обрати Ñтиль показу Qt. -fullscreen, -fs~~~ЗапуÑтити djview у повноекранному режимі. -page=<Ñторінка>~~~Перейти до Ñторінки <Ñторінка>. -zoom=<маÑштаб>~~~Ð’Ñтановити маÑштаб. -continuous=<yn>~~~Ð’Ñтановити режим неперервного переглÑду. -sidebyside=<yn>~~~Ð’Ñтановити Ñ€Ð¾Ð·Ð¼Ñ–Ñ‰ÐµÐ½Ð½Ñ Ð¿Ð¾Ñ€Ñд. cannot open '%1'. неможливо відкрити '%1'. QDjViewAuthDialog Password: Пароль: User: КориÑтувач: Authentication required - DjView Слід пройти Ñ€Ð¾Ð·Ð¿Ñ–Ð·Ð½Ð°Ð²Ð°Ð½Ð½Ñ â€” DjView QDjViewDjVuExporter <html> This file belongs to a non empty directory. Saving an indirect document creates many files in this directory. Do you want to continue and risk overwriting files in this directory?</html> <html> Цей файл належить до не порожньої теки. Ð—Ð±ÐµÑ€ÐµÐ¶ÐµÐ½Ð½Ñ Ð½ÐµÐ¿Ñ€Ñмого документа Ñтворить багато файлів у цій теці. Бажаєте продовжувати з ризиком перезапиÑу файлів у цій теці?</html> Con&tinue Про&довжувати &Cancel &СкаÑувати Save job creation failed! Ð¡Ñ‚Ð²Ð¾Ñ€ÐµÐ½Ð½Ñ Ð¿Ñ€Ð¾Ñ†ÐµÑу Ð·Ð±ÐµÑ€ÐµÐ¶ÐµÐ½Ð½Ñ Ð·Ð°Ð·Ð½Ð°Ð»Ð¾ невдачі! DjVu Bundled Document Зв'Ñзаний документ DjVu DjVu Files (*.djvu *.djv) Файли DjVu (*.djvu *.djv) DjVu Indirect Document ÐепрÑмий документ DjVu Unknown error. Ðевідома помилка. System error: %1. СиÑтемна помилка: %1. Question - DjView dialog caption Ð—Ð°Ð¿Ð¸Ñ‚Ð°Ð½Ð½Ñ - DjView QDjViewErrorDialog DjView Error Помилка DjView &Ok &Гаразд Error - DjView dialog caption Помилка - DjView QDjViewExportDialog Dialog Діалог Export ЕкÑпортувати Format: Формат: &Document &Документ C&urrent page П&оточна Ñторінка &Pages &Сторінки to до Destination ÐŸÑ€Ð¸Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ &Defaults &Типове &Ok &Гаразд &Cancel &СкаÑувати Stop Зупинити <html><b>Saving.</b><br/> You can save the whole document or a page range under a variety of formats. Selecting certain formats creates additional dialog pages for specifying format options.</html> <html><b>ЗбереженнÑ.</b><br/> Ви можете зберегти веÑÑŒ документ або проміжок Ñторінок у цілій низці форматів. Вибір певних форматів викличе додаткові Ñторінки діалогів Ð´Ð»Ñ Ð²Ð¸Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð¿Ð°Ñ€Ð°Ð¼ÐµÑ‚Ñ€Ñ–Ð² формата.</html> Overwriting the current file is not allowed! ÐŸÐµÑ€ÐµÐ·Ð°Ð¿Ð¸Ñ Ð¿Ð¾Ñ‚Ð¾Ñ‡Ð½Ð¾Ð³Ð¾ файла заборонено! A file with this name already exists. Do you want to replace it? Файл з такою назвою вже Ñ–Ñнує. Бажаєте замінити його? &Replace &Замінити This operation has failed. Ð¦Ñ Ð¾Ð¿ÐµÑ€Ð°Ñ†Ñ–Ñ Ð·Ð°Ð·Ð½Ð°Ð»Ð° невдачі. This operation has been interrupted. Цю операцію було перервано. Export - DjView dialog caption ЕкÑпорт - DjView Error - DjView dialog caption Помилка - DjView Question - DjView dialog caption Ð—Ð°Ð¿Ð¸Ñ‚Ð°Ð½Ð½Ñ - DjView All files save filter Ð’ÑÑ– файли QDjViewExportPS1 Form Форма Color Колір &Color &Колір &GrayScale &Сірі півтони Marks Позначки Print image &frame Друкувати &рамку картинки Print crop &marks Друкувати обмежувальні &мітки PostScript PostScript Language Level Рівень мови QDjViewExportPS2 Form Форма Scaling МаÑÑˆÑ‚Ð°Ð±ÑƒÐ²Ð°Ð½Ð½Ñ Scale to &fit the page МаÑштабувати, щоб &вміÑтити Ñторінку &Zoom &МаÑштаб % % Orientation ÐžÑ€Ñ–Ñ”Ð½Ñ‚Ð°Ñ†Ñ–Ñ Automatic Ðвтоматично &Portrait П&ортрет &Landscape &Ðльбом QDjViewExportPS3 Form Форма Print sheets suitable for folding a booklet. Друкувати лиÑтки, придатні Ð´Ð»Ñ ÑÑ‚Ð²Ð¾Ñ€ÐµÐ½Ð½Ñ Ð±ÑƒÐºÐ»ÐµÑ‚Ñƒ. Advanced Додатково Sheets per booklet: ЛиÑтків на буклет: Unlimited Ðе обмежувати at most не більше Print Друк rectos and versos. верхні та нижні. rectos only. тільки верхні. versos only. тільки нижні. Shift rectos and versos by ЗміÑтити верхні та нижні на points. точок. Center: ПоÑередині: points точок plus Ð¿Ð»ÑŽÑ /100 /100 per page. на Ñторінку. QDjViewExportPrn Form Форма Color Колір &Color &Колір &GrayScale &Сірі півтони Marks Позначки Print image &frame Друкувати &рамку картинки Print crop &marks Друкувати обмежувальні &мітки Scaling МаÑÑˆÑ‚Ð°Ð±ÑƒÐ²Ð°Ð½Ð½Ñ Scale to &fit the page МаÑштабувати, щоб &вміÑтити Ñторінку &Zoom &МаÑштаб % % Orientation ÐžÑ€Ñ–Ñ”Ð½Ñ‚Ð°Ñ†Ñ–Ñ Automatic Ðвтоматично &Portrait П&ортрет &Landscape &Ðльбом QDjViewExportTiff Form Форма Resolution Роздільна здатніÑть Maximum image resolution МакÑимальна роздільна здатніÑть картинки dpi Ñ‚/д Compression СтиÑÐ½ÐµÐ½Ð½Ñ Force &bitonal G4 compression. ПримуÑове &двотональне ÑтиÑÐ½ÐµÐ½Ð½Ñ G4. Allow &lossy JPEG compression. ВикориÑтовувати JPEG-ÑтиÑÐ½ÐµÐ½Ð½Ñ Ð· &втратами. JPEG &quality &ЯкіÑть JPEG Allow &deflate compression. Дозволити &ÑтиÑненнÑ. QDjViewFind Case sensitive З врахуваннÑм регіÑтру Words only Тільки Ñлова Find Previous (Shift+F3) Шукати попереднє (Shift+F3) Find Next (F3) Шукати наÑтупне (F3) Options Параметри <html><b>Finding text.</b><br/> Search hits appear progressively as soon as you type a search string. Typing enter jumps to the next hit. To move to the previous or next hit, you can also use the arrow buttons or the shortcuts <tt>F3</tt> or <tt>Shift-F3</tt>. You can also double click a page name. Use the <tt>Options</tt> menu to search words only or to specify the case sensitivity.</html> <html><b>Пошук текÑту.</b><br/> Під Ñ‡Ð°Ñ Ð¿Ð¾ÑˆÑƒÐºÑƒ відповідники з'ÑвлÑютьÑÑ Ð¿Ð¾Ñтупово, паралельно з введеннÑм вами Ñ€Ñдка Ð´Ð»Ñ Ð¿Ð¾ÑˆÑƒÐºÑƒ. ÐатиÑÐ½ÐµÐ½Ð½Ñ ÐºÐ»Ð°Ð²Ñ–ÑˆÑ– вводу задає перехід до наÑтупного відповідника. Щоб перейти до попереднього чи наÑтупного відповідника, Ви також можете викориÑтовувати Ñтрілки та гарÑчі клавіші <tt>F3</tt> або <tt>Shift-F3</tt>. Також можна двічі клацнути на назві Ñторінки. Щоб шукати лише цілі Ñлова або задати чутливіÑть до регіÑтру, ÑкориÑтайтеÑÑ Ð¼ÐµÐ½ÑŽ <tt>Параметри</tt>, </html> Regular expression Формальний вираз Reset search options to default values. Відновити типові Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð¿Ð°Ñ€Ð°Ð¼ÐµÑ‚Ñ€Ñ–Ð² пошуку. Specify whether search hits must begin on a word boundary. Визначте, чи має шуканий Ñ€Ñдок починатиÑÑ Ð½Ð° межі Ñлова. Specify whether searches are case sensitive. Вкажіть, чи Ñлід враховувати регіÑтр Ñимволів під Ñ‡Ð°Ñ Ð¿Ð¾ÑˆÑƒÐºÑƒ. Regular expressions describe complex string matching patterns. За допомогою формальних виразів можна опиÑати Ñкладні шаблони відповідноÑті. <html><b>Regular Expression Quick Guide</b><ul><li>The dot <tt>.</tt> matches any character.</li><li>Most characters match themselves.</li><li>Prepend a backslash <tt>\</tt> to match special characters <tt>()[]{}|*+.?!^$\</tt>.</li><li><tt>\b</tt> matches a word boundary.</li><li><tt>\w</tt> matches a word character.</li><li><tt>\d</tt> matches a digit character.</li><li><tt>\s</tt> matches a blank character.</li><li><tt>\n</tt> matches a newline character.</li><li><tt>[<i>a</i>-<i>b</i>]</tt> matches characters in range <tt><i>a</i></tt>-<tt><i>b</i></tt>.</li><li><tt>[^<i>a</i>-<i>b</i>]</tt> matches characters outside range <tt><i>a</i></tt>-<tt><i>b</i></tt>.</li><li><tt><i>a</i>|<i>b</i></tt> matches either regular expression <tt><i>a</i></tt> or regular expression <tt><i>b</i></tt>.</li><li><tt><i>a</i>{<i>n</i>,<i>m</i>}</tt> matches regular expression <tt><i>a</i></tt> repeated <tt><i>n</i></tt> to <tt><i>m</i></tt> times.</li><li><tt><i>a</i>?</tt>, <tt><i>a</i>*</tt>, and <tt><i>a</i>+</tt> are shorthands for <tt><i>a</i>{0,1}</tt>, <tt><i>a</i>{0,}</tt>, and <tt><i>a</i>{1,}</tt>.</li><li>Use parentheses <tt>()</tt> to group regular expressions before <tt>?+*{</tt>.</li></ul></html> <html><b>Коротка інÑÑ‚Ñ€ÑƒÐºÑ†Ñ–Ñ Ð· формальних виразів</b><ul><li>Крапка <tt>.</tt> відповідає довільному Ñимволу.</li><li>БільшіÑть Ñимволів відповідають Ñамим Ñобі.</li><li>До Ñпеціальних Ñимволів, <tt>()[]{}|*+.?!^$\</tt>, Ñлід додавати Ð¿Ñ€ÐµÑ„Ñ–ÐºÑ <tt>\</tt>.</li><li><tt>\b</tt> відповідає межі Ñлова.</li><li><tt>\w</tt> відповідає літері.</li><li><tt>\d</tt> відповідає чиÑловому Ñимволу.</li><li><tt>\s</tt> відповідає пробілу.</li><li><tt>\n</tt> відповідає Ñимволу нового Ñ€Ñдка.</li><li><tt>[<i>a</i>-<i>b</i>]</tt> відповідає діапазону Ñимволів <tt><i>a</i></tt>-<tt><i>b</i></tt>.</li><li><tt>[^<i>a</i>-<i>b</i>]</tt> відповідає Ñимволам поза діапазоном <tt><i>a</i></tt>-<tt><i>b</i></tt>.</li><li><tt><i>a</i>|<i>b</i></tt> відповідає або формальному виразу <tt><i>a</i></tt>, або формальному виразу <tt><i>b</i></tt>.</li><li><tt><i>a</i>{<i>n</i>,<i>m</i>}</tt> відповідає формальному виразу <tt><i>a</i></tt>, повтореному від <tt><i>n</i></tt> до <tt><i>m</i></tt> разів.</li><li><tt><i>a</i>?</tt>, <tt><i>a</i>*</tt> Ñ– <tt><i>a</i>+</tt> — ÑÐºÐ¾Ñ€Ð¾Ñ‡ÐµÐ½Ð½Ñ ÑˆÐ°Ð±Ð»Ð¾Ð½Ñ–Ð² <tt><i>a</i>{0,1}</tt>, <tt><i>a</i>{0,}</tt> Ñ– <tt><i>a</i>{1,}</tt>.</li><li>Ð”Ð»Ñ Ð³Ñ€ÑƒÐ¿ÑƒÐ²Ð°Ð½Ð½Ñ Ñ„Ð¾Ñ€Ð¼Ð°Ð»ÑŒÐ½Ð¸Ñ… виразів додайте <tt>()</tt> перед <tt>?+*{</tt>.</li></ul></html> QDjViewFind::Model 1 hit 1 збіг Page %1 (1 hit) Сторінка %1 (1 збіг) Searching page %1 (waiting for data.) Пошук Ñторінки %1 (Ð¾Ñ‡Ñ–ÐºÑƒÐ²Ð°Ð½Ð½Ñ Ð½Ð° дані.) Searching page %1. Пошук Ñторінки %1. No hits! Ðе знайдено! <html>Document is not searchable. No page contains information about its textual content.</html> <html>Пошук у документі неможливий. Жодна Ñторінка не міÑтить інформації про Ñвій текÑтовий вміÑÑ‚.</html> %n hits %n збіг %n збіги %n збігів Page %1 (%n hits) Сторінка %1 (%n збіг) Сторінка %1 (%n збіги) Сторінка %1 (%n збігів) <html>Invalid regular expression.</html> <html>Ðекоректний формальний вираз.</html> QDjViewImgExporter Cannot render page. Ðе вдалоÑÑ Ð¾Ð±Ñ€Ð¾Ð±Ð¸Ñ‚Ð¸ Ñторінку. Image format %1 not supported. Формат картинки %1 не підтримуєтьÑÑ. %1 Image JPG Image %1 Ð—Ð¾Ð±Ñ€Ð°Ð¶ÐµÐ½Ð½Ñ %1 Files (*.%2) JPG Files %1 Файлів (*.%2) QDjViewInfoDialog Dialog Діалог &Document &Документ &File &Файл File: Файл: &View Page &ПереглÑнути Ñторінку &Close &Закрити File # Файл â„– File Name Ðазва файла File Size Розмір файла File Type Тип файла Page # Сторінка â„– Page Title Заголовок Ñторінки <html><b>Document information</b><br>This panel shows information about the document and its component files. Select a component file to display detailled information in the <tt>File</tt> tab. Double click a component file to show the corresponding page in the main window. </html> <html><b>Ð†Ð½Ñ„Ð¾Ñ€Ð¼Ð°Ñ†Ñ–Ñ Ð¿Ñ€Ð¾ документ</b><br>Ð¦Ñ Ð¿Ð°Ð½ÐµÐ»ÑŒ показує інформацію про документ та файли, з Ñких його Ñкладено. Оберіть файл-компонент, щоб побачити детальну інформацію на Ñторінці <tt>Файл</tt>. Двічі клацніть на файлі-компоненті, щоб побачити відповідну Ñторінку у головному вікні. </html> <html><b>File and page information</b><br>This panel shows the structure of the DjVu data corresponding to the component file or the page selected in the <tt>Document</tt> tab. The arrow buttons jump to the previous or next component file.</html> <html><b>Ð†Ð½Ñ„Ð¾Ñ€Ð¼Ð°Ñ†Ñ–Ñ Ð¿Ñ€Ð¾ файл та Ñторінку</b><br>Ð¦Ñ Ð¿Ð°Ð½ÐµÐ»ÑŒ показує Ñтруктуру даних DjVu, що відповідають файлу-компонентові або Ñторінці, обраній на Ñторінці <tt>Документ</tt>. Кнопки зі Ñтрілками дозволÑть перейти до попереднього чи наÑтупного файла-компонента.</html> Waiting for data... ÐžÑ‡Ñ–ÐºÑƒÐ²Ð°Ð½Ð½Ñ Ð½Ð° дані... Page #%1 - « %2 » Сторінка â„–%1 - « %2 » Page #%1 Сторінка â„–%1 Thumbnails Мініатюри Shared annotations Спільні анотації Shared data Спільні дані File #%1 - Файл â„–%1 - Single DjVu page Одна Ñторінка DjVu Bundled DjVu document З'єднаний документ DjVu Indirect DjVu document ÐепрÑмий документ DjVu Obsolete bundled DjVu document ЗаÑтарілий з'єднаний документ DjVu Obsolete indexed DjVu document ЗаÑтарілий індекÑований документ DjVu n/a недоÑтупне Page Сторінка Thumbnails Мініатюри Shared Спільні 1 file 1 файл %n files %n файл %n файли %n файлів 1 page 1 Ñторінка %n pages %n Ñторінка %n Ñторінки %n Ñторінок QDjViewMetaDialog Dialog Діалог &Document Metadata Метадані &документа &Page Metadata Метадані &Ñторінки Page: Сторінка: &View Page &ПереглÑнути Ñторінку &Close &Закрити Key Ключ Value Ð—Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ <html><b>Document metadata</b><br>This panel displays metadata pertaining to the document, such as author, title, references, etc. This information can be saved into the document with program <tt>djvused</tt>: use the commands <tt>create-shared-ant</tt> and <tt>set-meta</tt>.</html> <html><b>Метадані документа</b><br>Ðа цій панелі показано метадані, що ÑтоÑуютьÑÑ Ð´Ð¾ÐºÑƒÐ¼ÐµÐ½Ñ‚Ð°, зокрема дані щодо автора, назви, поÑилань та інші. Цю інформацію може бути збережено у документі за допомогою програми <tt>djvused</tt>: викориÑтовуйте команди <tt>create-shared-ant</tt> та <tt>set-meta</tt>.</html> <html><b>Page metadata</b><br>This panel displays metadata pertaining to a specific page. Page specific metadata override document metadata. This information can be saved into the document with program <tt>djvused</tt>: use command <tt>select</tt> to select the page and command <tt>set-meta</tt> to specify the metadata entries.</html> <html><b>Метадані Ñторінки</b><br>Ðа цій панелі показано метадані, що ÑтоÑуютьÑÑ Ð¿Ð¾Ð·Ð½Ð°Ñ‡ÐµÐ½Ð¾Ñ— Ñторінки. ОÑобливі метадані Ñторінки заміщують метадані документа. Цю інформацію може бути додано до документа за допомогою програми <tt>djvused</tt>: викориÑтовуйте команду <tt>select</tt> Ð´Ð»Ñ Ð²Ð¸Ð±Ð¾Ñ€Ñƒ Ñторінки та команду <tt>set-meta</tt> Ð´Ð»Ñ Ð²Ð¸Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ð¿ÑƒÐ½ÐºÑ‚Ñ–Ð² метаданих.</html> Ctrl+C copy Ctrl+C QDjViewOutline <html><b>Document outline.</b><br/> This panel display the document outline, or the page names when the outline is not available, Double-click any entry to jump to the selected page.</html> <html><b>ЕÑкіз документа.</b><br/> Ð¦Ñ Ð¿Ð°Ð½ÐµÐ»ÑŒ показує еÑкіз документа або назви Ñторінок, коли еÑкіз недоÑтупний. Двічі клацніть по будь-Ñкому пункту Ð´Ð»Ñ Ð¿ÐµÑ€ÐµÑ…Ð¾Ð´Ñƒ до обраної Ñторінки.</html> Outline data is corrupted Дані еÑкізу зіпÑовано Pages Сторінки Page %1 Сторінка %1 Go: page %1. Go: page %1 Перехід: Ñторінка %1. Go: %1 Go: %1. Перехід: %1 QDjViewPSExporter <html><b>PostScript options.</b><br>Option <tt>Color</tt> enables color printing. Document pages can be decorated with frame and crop marks. PostScript language level 1 is only useful with very old printers. Level 2 works with most printers. Level 3 print color document faster on recent printers.</html> <html><b>Параметри PostScript.</b><br>Параметр <tt>Колір</tt> дозволÑÑ” друк у кольорі. Сторінки документа можна прикраÑити рамкою та обмежувальними мітками. Рівень мови PostScript 1 кориÑний лише Ð´Ð»Ñ Ð´ÑƒÐ¶Ðµ Ñтарих друкарок. Рівень 2 працює Ð´Ð»Ñ Ð±Ñ–Ð»ÑŒÑˆÐ¾Ñті друкарок. Рівень 3 дозволÑÑ” пришвидшити друк на ÑучаÑних принтерах.</html> <html><b>Position and scaling.</b><br>Option <tt>Scale to fit</tt> accommodates whatever paper size your printer uses. Zoom factor <tt>100%</tt> reproduces the initial document size. Orientation <tt>Automatic</tt> chooses portrait or landscape on a page per page basis.</html> <html><b>Ð Ð¾Ð·Ð¼Ñ–Ñ‰ÐµÐ½Ð½Ñ Ñ‚Ð° маÑштаб.</b><br>Параметр <tt>МаÑштабувати Ð´Ð»Ñ Ð²Ñ–Ð´Ð¿Ð¾Ð²Ñ–Ð´Ð½Ð¾Ñті</tt> приÑтоÑовує документ до того розміру паперу, Ñкий викориÑтовує ваш принтер. Множник маÑштабу <tt>100%</tt> відтворює початковий розмір Ñторінок документа. <tt>Ðвтоматична</tt> Ð¾Ñ€Ñ–Ñ”Ð½Ñ‚Ð°Ñ†Ñ–Ñ Ð´Ð¾Ð·Ð²Ð¾Ð»ÑÑ” програмі обрати книжкову чи альбомну орієнтацію паперу на оÑнові Ð¿Ñ€Ð¸Ð¿ÑƒÑ‰ÐµÐ½Ð½Ñ Ð¾Ð´Ð½Ð° Ñторінка - один аркуш.</html> <html><b>Producing booklets.</b><br>The booklet mode prints the selected pages as sheets suitable for folding one or several booklets. Several booklets might be produced when a maximum number of sheets per booklet is specified. You can either use a duplex printer or print rectos and versos separately.<p> Shifting rectos and versos is useful with poorly aligned duplex printers. The center margins determine how much space is left between the pages to fold the sheets. This space slowly increases from the inner sheet to the outer sheet.</html> <html><b>Ð’Ð¸Ð³Ð¾Ñ‚Ð¾Ð²Ð»ÐµÐ½Ð½Ñ Ð±ÑƒÐºÐ»ÐµÑ‚Ñ–Ð².</b><br>Режим буклета надає змогу надрукувати вказані Ñторінки у форматі лиÑтів, придатних Ð´Ð»Ñ Ð²Ð¸Ð³Ð¾Ñ‚Ð¾Ð²Ð»ÐµÐ½Ð½Ñ Ð¾Ð´Ð½Ð¾Ð³Ð¾ чи декількох буклетів. Декілька буклетів буде виготовлено, Ñкщо зазначено макÑимальна кількіÑть лиÑтів у буклеті. Ви можете викориÑтовувати двобічний принтер або друкувати верхні та нижні боки Ñторінки окремо.<p> ЗÑув верхніх та нижніх боків може бути кориÑний Ð´Ð»Ñ Ð´Ð²Ð¾Ð±Ñ–Ñ‡Ð½Ð¸Ñ… принтерів з неÑкіÑним вирівнюваннÑм. Центральне поле визначає, Ñк багато міÑÑ†Ñ Ð±ÑƒÐ´Ðµ залишено між Ñторінками Ð´Ð»Ñ Ð½Ð°Ñтупного Ð·Ð³Ð¾Ñ€Ñ‚Ð°Ð½Ð½Ñ Ñƒ буклет. Ð¦Ñ Ð²Ñ–Ð´Ñтань повільно зроÑтає від внутрішніх лиÑтів до зовнішніх.</html> Save job creation failed! Ð¡Ñ‚Ð²Ð¾Ñ€ÐµÐ½Ð½Ñ Ð¿Ñ€Ð¾Ñ†ÐµÑу Ð·Ð±ÐµÑ€ÐµÐ¶ÐµÐ½Ð½Ñ Ð·Ð°Ð·Ð½Ð°Ð»Ð¾ невдачі! PostScript PostScript PostScript Files (*.ps *.eps) Файлів PostScript (*.ps) Encapsulated PostScript ІнкапÑульований PostScript PostScript tab caption PostScript Position tab caption Ð Ð¾Ð·Ð¼Ñ–Ñ‰ÐµÐ½Ð½Ñ Booklet tab caption Буклет QDjViewPdfExporter PDF Document Документ PDF PDF Files (*.pdf) Файли PDF (*.pdf) PDF Options tab caption Параметри PDF <html><b>PDF options.</b><br>These options control the characteristics of the images embedded in the exported PDF files. The resolution box limits their maximal resolution. Forcing bitonal G4 compression encodes all pages in black and white using the CCITT Group 4 compression. Allowing JPEG compression uses lossy JPEG for all non bitonal or subsampled images. Otherwise, allowing deflate compression produces more compact files. </html> <html><b>Параметри PDF.</b><br>Ці параметри впливають на характериÑтики зображень, вбудованих до файлів PDF, що екÑпортуютьÑÑ. Поле \"роздільна здатніÑть\" обмежує макÑимальну роздільну здатніÑть. ПримуÑове двотональне ÑтиÑÐ½ÐµÐ½Ð½Ñ G4 кодує вÑÑ– Ñторінки у чорно-білому виглÑді за допомогою методу ÑтиÑÐ½ÐµÐ½Ð½Ñ CCITT Group 4. ВикориÑÑ‚Ð°Ð½Ð½Ñ ÑтиÑÐ½ÐµÐ½Ð½Ñ JPEG надає змогу ÑтиÑкати дані за допомогою ÑтиÑÐ½ÐµÐ½Ð½Ñ Ð· втратами JPEG вÑÑ– не чорно-білі Ð·Ð¾Ð±Ñ€Ð°Ð¶ÐµÐ½Ð½Ñ Ð°Ð±Ð¾ Ð·Ð¾Ð±Ñ€Ð°Ð¶ÐµÐ½Ð½Ñ Ð· підвибірками. Крім того, Ð²Ð¼Ð¸ÐºÐ°Ð½Ð½Ñ ÑтиÑÐ½ÐµÐ½Ð½Ñ Ð¿Ñ€Ð¸Ð·Ð²Ð¾Ð´Ð¸Ñ‚ÑŒ до Ð¾Ñ‚Ñ€Ð¸Ð¼Ð°Ð½Ð½Ñ ÐºÐ¾Ð¼Ð¿Ð°ÐºÑ‚Ð½Ñ–ÑˆÐ¸Ñ… файлів. </html> Error while creating pdf file. Помилка під Ñ‡Ð°Ñ ÑÑ‚Ð²Ð¾Ñ€ÐµÐ½Ð½Ñ Ñ„Ð°Ð¹Ð»Ð° pdf. PDF export was not compiled. ЕкÑпорт до PDF не було викориÑтано під Ñ‡Ð°Ñ Ð·Ð±Ð¸Ñ€Ð°Ð½Ð½Ñ Ð¿Ñ€Ð¾Ð³Ñ€Ð°Ð¼Ð¸. Unable to create output file. Ðеможливо Ñтворити файл виведеннÑ. System error: %1. СиÑтемна помилка: %1. Unable to reopen temporary file. Ðеможливо знову відкрити тимчаÑовий файл. Unable to create temporary file. Ðеможливо Ñтворити тимчаÑовий файл. QDjViewPlugin::Document Requesting %1. Запит %1. QDjViewPrefsDialog Dialog Діалог Gamma Гама Darker Темніше Lighter Світліше <html>Screen color correction.<br>Adjust slider until gray shades look similar.</html> <html>ÐšÐ¾Ñ€Ð¸Ð³ÑƒÐ²Ð°Ð½Ð½Ñ ÐµÐºÑ€Ð°Ð½Ð½Ð¾Ð³Ð¾ кольору.<br>ПереÑуньте повзунок так, щоб Ñірі облаÑті виглÑдали однаково.</html> &Interface &ВиглÑд Options for Параметри Ð´Ð»Ñ Standalone Viewer СамодоÑтатнього переглÑдача Full Screen Standalone Viewer Повноекранного ÑамодоÑтатнього переглÑдача Full Page Plugin Додатка повної Ñторінки Embedded Plugin Вбудованого додатка &Remember initial state from last invocation &Запам'Ñтати початковий Ñтан з оÑтаннього виклику Show Показати &Menu bar Панель &меню &Tool bar Панель &інÑтрументів Sc&rollbars Смуги &Ð³Ð¾Ñ€Ñ‚Ð°Ð½Ð½Ñ Stat&us bar Панель &ÑтатуÑу &Side bar &Бічний пенал Display ВиглÑд Force inverted luminance Force inverted luminance. ПримуÑово інвертувати оÑвітленіÑть &Zoom: &МаÑштаб: Display page &frames Показувати &рамки Ñторінок Display &annotations Показувати &анотації &Keys &Клавіші Keys Клавіші For displaying hyper&links: Ð”Ð»Ñ Ð¿Ð¾ÐºÐ°Ð·Ñƒ гіпер&поÑилань: For &selecting text or images: Ð”Ð»Ñ &вибору текÑту або картинок: For displaying the &lens: Ð”Ð»Ñ Ð¿Ð¾&казу лінзи: Mouse wheel Коліщатко миші Mouse wheel scrolls the page Mouse wheel scrolls the page. Коліщатком миші можна гортати вміÑÑ‚ Ñторінки Mouse wheel changes the zoom factor Mouse wheel changes the zoom factor. Коліщатком миші можна змінювати маÑштаб &Lens &Лінза Enable magnifying &lens Увімкнути з&більшувальну лінзу Lens options Параметри лінзи Lens &size: Розмір &лінзи: Magnifying &power: &Збільшувальна Ñила: x x pixels точок Cache Кеш &Clear Сп&орожнити &Decoded page cache: Кеш &розкодованих Ñторінок: &Pixel cache: Кеш &пікÑелів: &Network &Мережа Use pro&xy to access the network ВикориÑтовувати &прокÑÑ– Ð´Ð»Ñ Ð´Ð¾Ñтупу до мережі Proxy settings ÐÐ°Ð»Ð°ÑˆÑ‚ÑƒÐ²Ð°Ð½Ð½Ñ Ð¿Ñ€Ð¾ÐºÑÑ– Pass&word: Па&роль: &User: &КориÑтувач: &Port: &Порт: &Host: &Сервер: Interface ВиглÑд Force language (next time djview runs) Force language (when djview is restarted.) ПримуÑово вÑтановити мову Enable page animations Enable animations Увімкнути анімацію дій зі Ñторінками Show hidden text in status bar Показувати прихований текÑÑ‚ у Ñ€Ñдку Ñтану Override saving and printing restrictions Ðе брати до уваги Ð¾Ð±Ð¼ÐµÐ¶ÐµÐ½Ð½Ñ Ð½Ð° Ð·Ð±ÐµÑ€ÐµÐ¶ÐµÐ½Ð½Ñ Ñ‚Ð° друк &Defaults &Типове &Apply &ЗаÑтоÑувати &Ok &Гаразд Cancel СкаÑувати Preferences[*] - DjView ÐалаштуваннÑ[*] - DjView <html><b>Initial interface setup.</b><br>DjView can run as a standalone viewer, as a full screen viewer, as a full page browser plugin, or as a plugin embedded inside a html page. For each case, check the <tt>Remember</tt> box to automatically save and restore the interface setup. Otherwise, specify an initial configuration.</html> <html><b>Початкове Ð½Ð°Ð»Ð°ÑˆÑ‚ÑƒÐ²Ð°Ð½Ð½Ñ Ð¿Ð¾ÐºÐ°Ð·Ñƒ.</b><br>DjView може працювати Ñк ÑамодоÑтатній переглÑдач, Ñк повноекранний переглÑдач, Ñк додаток переглÑдача на повну Ñторінку, Ñк додаток, вбудований до Ñторінки html. У будь-Ñкому випадку, позначте <tt>Запам'Ñтати</tt>, щоб автоматично зберігати та відновлювати Ð½Ð°Ð»Ð°ÑˆÑ‚ÑƒÐ²Ð°Ð½Ð½Ñ Ð¿Ð¾ÐºÐ°Ð·Ñƒ. Якщо ви цього не хочете робити, зазначте початкову конфігурацію.</html> <html><b>Modifiers keys.</b><br>Define which combination of modifier keys will show the manifying lens, temporarily enable the selection mode, or highlight the hyperlinks.</html> <html><b>Клавіші-модифікатори.</b><br>Визначте, Ñка ÐºÐ¾Ð¼Ð±Ñ–Ð½Ð°Ñ†Ñ–Ñ ÐºÐ»Ð°Ð²Ñ–Ñˆ-модифікаторів показуватиме збільшувальну лінзу, тимчаÑово вмикатиме режим вибору або підÑвічуватиме гіперпоÑиланнÑ.</html> <html><b>Magnifying lens.</b><br>The magnifying lens appears when you depress the modifier keys specified in tab <tt>Keys</tt>. This panel lets you choose the power and the size of the magnifying lens.</html> <html><b>Збільшувальна лінза.</b><br>Збільшувальна лінза з'ÑвлÑєтьÑÑ ÐºÐ¾Ð»Ð¸ Ви натиÑнете клавіші-модифікатори задані на Ñторінці меню <tt>Клавіші</tt>. Ð¦Ñ Ð¿Ð°Ð½ÐµÐ»ÑŒ дозволить Вам обрати Ñилу та розмір збільшувальної лінзи.</html> <html><b>Advanced.</b><br>You can override the default interface language, disable the page animations, or enable additional menu entries that are useful for authoring DjVu files.You can also disable the printing or saving restrictions dictated by certain web sites. The manual color correction can be useful with old printers.</html> <html><p><b>Advanced.</b>You can override the default interface language, disable the page animations, or enable additional menu entries that are useful for authoring DjVu files.You can also disable the printing or saving restrictions dictated by certain web sites. The manual color correction can be useful with old printers.</html> <html><b>Додатково.</b><br>Ви можете визначити мову інтерфейÑу програми, вимкнути анімацію на Ñторінках або увімкнути додаткові пункти меню, Ñкі можуть бути кориÑними Ð´Ð»Ñ Ñ€Ð¾Ð±Ð¾Ñ‚Ð¸ з файлами DjVu.Ви також можете вимкнути Ð¾Ð±Ð¼ÐµÐ¶ÐµÐ½Ð½Ñ Ð½Ð° друк та збереженнÑ, Ñкі визначаютьÑÑ Ð´ÐµÑкими з Ñайтів. Ð’Ð¸Ð¿Ñ€Ð°Ð²Ð»ÐµÐ½Ð½Ñ ÐºÐ¾Ð»ÑŒÐ¾Ñ€Ñ–Ð² вручну може покращити результати друку на принтерах заÑтарілих моделей.</html> <html><b>Network proxy settings.</b><br>These proxy settings are used when the standalone djview viewer accesses a djvu document through a http url. The djview plugin always uses the proxy settings of the web browser.<p><b>Cache settings.</b><br>The <i>pixel cache</i> stores image data located outside the visible area. This cache makes panning smoother. The <i>decoded page cache</i> contains partially decoded pages. It provides faster response times when navigating a multipage document or when returning to a previously viewed page. Clearing this cache might be useful to reflect a change in the page data without restarting the DjVu viewer.</html> <html><b>ÐÐ°Ð»Ð°ÑˆÑ‚ÑƒÐ²Ð°Ð½Ð½Ñ Ð¿Ñ€Ð¾ÐºÑÑ– Ñервера.</b><br>Ці Ð½Ð°Ð»Ð°ÑˆÑ‚ÑƒÐ²Ð°Ð½Ð½Ñ Ð¿Ñ€Ð¾ÐºÑÑ– Ñервера буде викориÑтано, коли ÑамодоÑтатній переглÑдач djview намагатиметьÑÑ Ð¾Ñ‚Ñ€Ð¸Ð¼Ð°Ñ‚Ð¸ доÑтуп до документа djvu через адреÑу http.<p><b>Параметри кешуваннÑ.</b><br> <i>Кеш пікÑелів</i> зберігає дані зображень, розташованих поза видимою облаÑтю. Цей кеш робить переÑÑƒÐ²Ð°Ð½Ð½Ñ Ð´Ð¾ÐºÑƒÐ¼ÐµÐ½Ñ‚Ð¾Ð¼ плавнішим. <i>Кеш розкодованих Ñторінок</i> мÑтить чаÑтково розкодовані Ñторінки. Він забезпечує швидшу реакцію переглÑдача під Ñ‡Ð°Ñ Ð¿ÐµÑ€ÐµÑÑƒÐ²Ð°Ð½Ð½Ñ Ð±Ð°Ð³Ð°Ñ‚Ð¾Ñторінковим документом або під Ñ‡Ð°Ñ Ð¿Ð¾Ð²ÐµÑ€Ð½ÐµÐ½Ð½Ñ Ð´Ð»Ñ Ñ€Ð°Ð½Ñ–ÑˆÐµ переглÑнутої Ñторінки. Ð¡Ð¿Ð¾Ñ€Ð¾Ð¶Ð½ÐµÐ½Ð½Ñ Ñ†ÑŒÐ¾Ð³Ð¾ кешу може бути кориÑним Ð´Ð»Ñ Ð¿Ð¾ÐºÐ°Ð·Ñƒ змін у даних Ñторінки без перезапуÑку переглÑдача DjVu.</html> <html><b>Screen gamma correction.</b><br>The best color rendition is achieved by adjusting the gamma correction slider and choosing the position that makes the gray square as uniform as possible.<p><b>Screen resolution.</b><br>This option forces a particular resolution instead of using the unreliable resolution advertised by the operating system. Forcing the resolution to 100 dpi matches the behavior of the djvulibre command line tools.</html> <html><b>ÐšÐ¾Ñ€Ð¸Ð³ÑƒÐ²Ð°Ð½Ð½Ñ Ð³Ð°Ð¼Ð¼Ð¸ кольорів екрана.</b><br>Ðайкращого Ð²Ñ–Ð´Ñ‚Ð²Ð¾Ñ€ÐµÐ½Ð½Ñ ÐºÐ¾Ð»ÑŒÐ¾Ñ€Ñ–Ð² можна доÑÑгти за допомогою ÐºÐ¾Ñ€Ð¸Ð³ÑƒÐ²Ð°Ð½Ð½Ñ Ð³Ð°Ð¼Ð¸, Ñке можна виконати повзунком ÐºÐ¾Ñ€Ð¸Ð³ÑƒÐ²Ð°Ð½Ð½Ñ Ð³Ð°Ð¼Ð¸, обравши таке його розташуваннÑ, за Ñкого Ñірий квадратик Ñтає Ñкомога більш однорідним.<p><b>Роздільна здатніÑть.</b><br>Цей параметр призначено Ð´Ð»Ñ Ð²Ð¸Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ñ€Ð¾Ð·Ð´Ñ–Ð»ÑŒÐ½Ð¾Ñ— здатноÑті, Ñка не залежатиме від параметрів, заданих операційною ÑиÑтемою. Ð’Ð¸Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ñ€Ð¾Ð·Ð´Ñ–Ð»ÑŒÐ½Ð¾Ñ— здатноÑті у 100 Ñ‚/д відповідає типовій поведінці інÑтрументів командного Ñ€Ñдка з djvulibre.</html> &Screen &Екран Force screen &resolution Лише в&казана роздільна здатніÑть dpi Ñ‚/д &Advanced &Додатково Miscellaneous Різне Manual printer color correction ÐšÐ¾Ñ€ÐµÐºÑ†Ñ–Ñ ÐºÐ¾Ð»ÑŒÐ¾Ñ€Ñ–Ð² друку вручну gamma= гамма= Enable advanced features in menus Увімкнути додаткові можливоÑті у меню MB МБ Layout ÐšÐ¾Ð¼Ð¿Ð¾Ð½ÑƒÐ²Ð°Ð½Ð½Ñ Continuous Ðеперервно Side-by-side Сторінки поруч Cover Page Обкладинка Right-to-Left Справа ліворуч QDjViewPrintDialog Dialog Діалог Print Друк &Document &Документ C&urrent page П&оточна Ñторінка &Pages &Сторінки to до Destination ÐŸÑ€Ð¸Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ &Defaults &Типове &Ok &Гаразд &Cancel &СкаÑувати Stop Зупинити <html><b>Printing.</b><br/> You can print the whole document or a page range. Use the <tt>Choose</tt> button to select a print destination and specify printer options. Additional dialog tabs might appear to specify conversion options.</html> <html><b>Друк.</b><br/> Ви можете надрукувати веÑÑŒ документ або проміжок Ñторінок. ВикориÑтовуйте кнопку <tt>Обрати</tt> щоб обрати Ð¿Ñ€Ð¸Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Ñ‚Ð° задати параметри принтера. Додаткові Ñторінки діалогового вікна буде показано, Ñкщо потрібно вказати параметри перетвореннÑ.</html> This operation has failed. Ð¦Ñ Ð¾Ð¿ÐµÑ€Ð°Ñ†Ñ–Ñ Ð·Ð°Ð·Ð½Ð°Ð»Ð° невдачі. This operation has been interrupted. Цю операцію було перервано. Print to file Друк до файла Printer name: Ðазва принтера: Choose Обрати Print To File - DjView dialog caption Друк до файла - DjView A file with this name already exists. Do you want to replace it? Файл з такою назвою вже Ñ–Ñнує. Бажаєте замінити його? &Replace &Замінити All files save filter Ð’ÑÑ– файли Question - DjView dialog caption Ð—Ð°Ð¿Ð¸Ñ‚Ð°Ð½Ð½Ñ - DjView (invalid printer) (некоректний принтер) QDjViewPrnExporter Printer data Дані принтера PRN Files (*.prn) Файли PRN (*.prn) Printing Options tab caption Параметри друку <html><b>Printing options.</b><br>Option <tt>Color</tt> enables color printing. Document pages can be decorated with a frame. Option <tt>Scale to fit</tt> accommodates whatever paper size your printer uses. Zoom factor <tt>100%</tt> reproduces the initial document size. Orientation <tt>Automatic</tt> chooses portrait or landscape on a page per page basis.</html> <html><b>Параметри друку.</b><br>Параметр <tt>Колір</tt> дозволÑÑ” кольоровий друк. Сторінки документа можна вклаÑти до рамок. Параметр <tt>Підігнати до</tt> приÑтоÑовує Ñторінки до розміру паперу, що викориÑтовує ваш принтер. Множник маÑÑˆÑ‚Ð°Ð±ÑƒÐ²Ð°Ð½Ð½Ñ <tt>100%</tt> відтворює початковий розмір документа. Ð Ð¾Ð·Ñ‚Ð°ÑˆÑƒÐ²Ð°Ð½Ð½Ñ <tt>Ðвтоматичне</tt> обирає книжкове чи альбомне Ñ€Ð¾Ð·Ñ‚Ð°ÑˆÑƒÐ²Ð°Ð½Ð½Ñ Ð· міркувань Ð²Ñ–Ð´Ñ‚Ð²Ð¾Ñ€ÐµÐ½Ð½Ñ Ð¾Ð´Ð½Ñ–Ñ”Ñ— Ñторінки на одному лиÑті.</html> Cannot render page %1. Ðе вдалоÑÑ Ð¾Ð±Ñ€Ð¾Ð±Ð¸Ñ‚Ð¸ Ñторінку «%1». QDjViewSaveDialog Dialog Діалог Save Зберегти &Document &Документ C&urrent page П&оточна Ñторінка &Pages &Сторінки to до Destination ÐŸÑ€Ð¸Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ Format: Формат: &Ok &Гаразд &Cancel &СкаÑувати Stop Зупинити Overwriting the current file is not allowed! ÐŸÐµÑ€ÐµÐ·Ð°Ð¿Ð¸Ñ Ð¿Ð¾Ñ‚Ð¾Ñ‡Ð½Ð¾Ð³Ð¾ файла заборонено! A file with this name already exists. Do you want to replace it? Файл з такою назвою вже Ñ–Ñнує. Бажаєте замінити його? &Replace &Замінити This operation has failed. Ð¦Ñ Ð¾Ð¿ÐµÑ€Ð°Ñ†Ñ–Ñ Ð·Ð°Ð·Ð½Ð°Ð»Ð° невдачі. This operation has been interrupted. Цю операцію було перервано. Bundled DjVu Document Зв'Ñзаний документ DjVu Indirect DjVu Document ÐепрÑмий документ DjVu <html><b>Saving.</b><br/> You can save the whole document or a page range. The bundled format creates a single file. The indirect format creates multiple files suitable for web serving.</html> <html><b>ЗбереженнÑ.</b><br/> Ви можете зберегти увеÑÑŒ документ або діапазон Ñторінок. Зв'Ñзаний формат Ñтворює одиночний файл. ÐепрÑмий формат Ñтворює декілька файлів придатних до переглÑду у мережі.</html> Error - DjView dialog caption Помилка - DjView Question - DjView dialog caption Ð—Ð°Ð¿Ð¸Ñ‚Ð°Ð½Ð½Ñ - DjView All files save filter Ð’ÑÑ– файли Save - DjView dialog caption Ð—Ð±ÐµÑ€ÐµÐ¶ÐµÐ½Ð½Ñ - DjView QDjViewThumbnails Control Left Mouse Button Контроль правою кнопкою миші Right Mouse Button Права кнопка миші <html><b>Document thumbnails.</b><br/> This panel display thumbnails for the document pages. Double click a thumbnail to jump to the selected page. %1 to change the thumbnail size or the refresh mode. The smart refresh mode only computes thumbnails when the page data is present (displayed or cached.)</html> <html><b>Мініатюри документа.</b><br/> Ðа цій панелі показано мініатюри Ñторінок документа. Подвійне ÐºÐ»Ð°Ñ†Ð°Ð½Ð½Ñ Ð½Ð° мініатюрі відкриє у вікні переглÑду відповідну Ñторінку. %1 надаÑть змогу змінити розмір мініатюр або оновить Ñ—Ñ…. У режимі розумного Ð¾Ð½Ð¾Ð²Ð»ÐµÐ½Ð½Ñ Ð¿Ñ€Ð¾Ð³Ñ€Ð°Ð¼Ð° Ñтворюватиме мініатюри тільки у разі доÑтупноÑті даних Ñторінки (відображених або кешованих.)</html> Tiny thumbnail menu МалюÑінький Small thumbnail menu Маленький Medium thumbnail menu Ðормальний Large thumbnail menu Великий Smart thumbnail menu Розумний QDjViewTiffExporter TIFF Document Документ TIFF TIFF Files (*.tiff *.tif) Файли TIFF (*.tiff *.tif) Cannot open output file. Ðеможливо відкрити файл виведеннÑ. Out of memory. ÐŸÐµÑ€ÐµÐ¿Ð¾Ð²Ð½ÐµÐ½Ð½Ñ Ð¿Ð°Ð¼'Ñті. Internal error. Ð’Ð½ÑƒÑ‚Ñ€Ñ–ÑˆÐ½Ñ Ð¿Ð¾Ð¼Ð¸Ð»ÐºÐ°. TIFF export has not been compiled. ЕкÑпорт до TIFF не було Ñкомпільовано. <html><b>TIFF options.</b><br>The resolution box specifies an upper limit for the resolution of the TIFF images. Forcing bitonal G4 compression encodes all pages in black and white using the CCITT Group 4 compression. Allowing JPEG compression uses lossy JPEG for all non bitonal or subsampled images. Otherwise, allowing deflate compression produces more compact (but less portable) files than the default packbits compression.</html> <html><b>Параметри TIFF.</b><br>Поле \"роздільна здатніÑть\" визначає верхню межу роздільної здатноÑті зображень у форматі TIFF. ПримуÑове двотональне ÑтиÑÐ½ÐµÐ½Ð½Ñ G4 кодує вÑÑ– Ñторінки у чорно-білому форматі за допомогою методу ÑтиÑÐ½ÐµÐ½Ð½Ñ CCITT Group 4. ВикориÑÑ‚Ð°Ð½Ð½Ñ ÑтиÑÐ½ÐµÐ½Ð½Ñ JPEG дозволÑÑ” ÑтиÑкати з втратами не чорно-білі Ð·Ð¾Ð±Ñ€Ð°Ð¶ÐµÐ½Ð½Ñ Ð°Ð±Ð¾ Ð·Ð¾Ð±Ñ€Ð°Ð¶ÐµÐ½Ð½Ñ Ð· підмножинами у формат JPEG. Ðбо ж дозвіл на ÑтиÑÐ½ÐµÐ½Ð½Ñ Ð¿Ñ€Ð¸Ð·Ð²Ð¾Ð´Ð¸Ñ‚ÑŒ до Ð¾Ñ‚Ñ€Ð¸Ð¼Ð°Ð½Ð½Ñ Ð¼ÐµÐ½ÑˆÐ¸Ñ… (але Ñ– менш ÑуміÑних) файлів ніж звичайне побітове ÑтиÑненнÑ.</html> TIFF Options tab caption Параметри TIFF QDjVuNetDocument Requesting '%1' Запит '%1' QDjVuNetDocument::Private Received http status %1 while retrieving %2. %1 is an http status code Отримано ÑÑ‚Ð°Ñ‚ÑƒÑ http %1 під Ñ‡Ð°Ñ Ð¾Ñ‚Ñ€Ð¸Ð¼Ð°Ð½Ð½Ñ %2. Received <%1> data while retrieving %2. %1 is a mime type Отримано %1 дані під Ñ‡Ð°Ñ Ð¾Ñ‚Ñ€Ð¸Ð¼Ð°Ð½Ð½Ñ %2. %1 while retrieving '%2'. %1 під Ñ‡Ð°Ñ Ð¾Ñ‚Ñ€Ð¸Ð¼Ð°Ð½Ð½Ñ '%2'. Cannot validate the certificate for server %1. Ðе вдалоÑÑ Ð¿ÐµÑ€ÐµÐ²Ñ–Ñ€Ð¸Ñ‚Ð¸ Ñертифікат Ð´Ð»Ñ Ñервера %1. Authentication required for %1 (%2). Слід пройти Ñ€Ð¾Ð·Ð¿Ñ–Ð·Ð½Ð°Ð²Ð°Ð½Ð½Ñ Ð´Ð»Ñ Ð´Ð¾Ñтупу до %1 (%2). Authentication required for proxy %1. Слід пройти Ñ€Ð¾Ð·Ð¿Ñ–Ð·Ð½Ð°Ð²Ð°Ð½Ð½Ñ Ð´Ð»Ñ Ð´Ð¾Ñтупу до прокÑÑ–-Ñервера %1. djview4/src/djview_zh_cn.ts000066400000000000000000004434101174072760700162630ustar00rootroot00000000000000 Generic thisLanguage Name of THIS language 简体中文 QApplication Option '-fix' is deprecated. 选项'-fix'已过时。 QDjView cannot open '%1'. 未能打开 '%1'。 FitWidth zoomCombo 适应宽度 FitPage zoomCombo é€‚åº”é¡µé¢ Stretch zoomCombo 拉伸 1:1 zoomCombo 1:1 300% zoomCombo 300% 200% zoomCombo 200% 150% zoomCombo 150% 100% zoomCombo 100% 75% zoomCombo 75% 50% zoomCombo 50% Color modeCombo 颜色 Stencil modeCombo æ¨¡æ¿ Foreground modeCombo 剿™¯è‰² Background modeCombo 背景色 Hidden Text modeCombo éšè—文本 &New File| 新建(&N) Ctrl+N File|New Ctrl+N Create a new DjView window. 新建DjView窗å£ã€‚ &Open File| 打开(&O) Ctrl+O File|Open Ctrl+O Open a DjVu document. 打开DjVu文档。 Open &Location... File| 打开ä½ç½®(&L)... Open a remote DjVu document. 打开远程的DjVu文档。 &Close File| 关闭(&C) Ctrl+W File|Close Ctrl+W Close this window. 关闭窗å£ã€‚ &Quit File| 退出(&Q) Ctrl+Q File|Quit Ctrl+Q Close all windows and quit the application. 关闭所有窗å£å¹¶é€€å‡ºç¨‹åºã€‚ Save &as... File| å¦å­˜ä¸º(&A)... Ctrl+S File|SaveAs Ctrl+S Save the DjVu document. ä¿å­˜DjVu文档。 &Export as... File| 导出为(&E)... Ctrl+E File|ExportAs Ctrl+E Export DjVu page or document to other formats. 导出DjVu页颿ˆ–文档到其它格å¼ã€‚ &Print... File| 打å°(&P)... Ctrl+P File|Print Ctrl+P Print the DjVu document. 打å°DjVu文档。 &Find... Edit| 查找(&F)... Ctrl+F Edit|Find Ctrl+F Find text in the document. 在文档中查找文本。 Find &Next Edit| 查找下一个(&N) Ctrl+F3 Edit|Find Next Ctrl+F3 F3 Edit|Find Next F3 Find next occurence of search text in the document. 在文档中查找文本的下一个实例。 Find &Previous Edit| 查找å‰ä¸€ä¸ª(&P) Shift+F3 Edit|Find Previous Shift+F3 Find previous occurence of search text in the document. 在文档中查找文本的å‰ä¸€ä¸ªå®žä¾‹ã€‚ &Select Edit| 选择(&S) Ctrl+F2 Edit|Select Ctrl+F2 F2 Edit|Select F2 Select a rectangle in the document. 在文档中选择å—。 Zoom &In Zoom| 放大(&I) Increase the magnification. 增加放大率。 Zoom &Out Zoom| 缩å°(&O) Decrease the magnification. å‡å°æ”¾å¤§çŽ‡ã€‚ Fit &Width Zoom| 适应宽度(&W) Set magnification to fit page width. 缩放到适应页é¢å®½åº¦ã€‚ Fit &Page Zoom| 适应页é¢(&P) Set magnification to fit page. 缩放到适应整页。 One &to one Zoom| 一比一åƒç´ (&T) Set full resolution magnification. 全分辨率缩放。 &300% Zoom| &300% Magnify 300% 放大300% &200% Zoom| &200% Magnify 20% 放大200% 150% Zoom| 150% Magnify 150% 放大150% &100% Zoom| &100% Magnify 100% 原始尺寸 &75% Zoom| &75% Magnify 75% 缩放到75% &50% Zoom| &50% Magnify 50% 缩放到50% &First Page Go| 首页(&F) Jump to first document page. 跳到文档的第一页。 &Next Page Go| 下一页(&N) Jump to next document page. 跳到文档的下一页。 &Previous Page Go| 上一页(&P) Jump to previous document page. 跳到文档的上一页。 &Last Page Go| 末页(&L) Jump to last document page. 跳到文档的最åŽä¸€é¡µã€‚ &Backward Go| åŽé€€(&B) Backward in history. 退回到上一个历å²ä½ç½®ã€‚ &Forward Go| å‰è¿›(&F) Forward in history. å‰è¿›åˆ°ä¸‹ä¸€ä¸ªåކå²ä½ç½®ã€‚ Rotate &Left Rotate| 逆时针旋转(&L) Rotate page image counter-clockwise. 逆时针旋转页é¢ã€‚ Rotate &Right Rotate| 顺时针旋转(&R) Rotate page image clockwise. 顺时针旋转页é¢ã€‚ Rotate &0° Rotate| 还原旋转(&0) Set natural page orientation. æ¢å¤é¡µé¢åŽŸå§‹æ–¹å‘。 Rotate &90° Rotate| 逆时针旋转&90° Turn page on its left side. 旋转页é¢é¡¶éƒ¨åˆ°å·¦è¾¹ã€‚ Rotate &180° Rotate| 逆时针旋转&180° Turn page upside-down. 旋转页é¢é¡¶éƒ¨æœä¸‹ã€‚ Rotate &270° Rotate| 逆时针旋转&270° Turn page on its right side. 旋转页é¢é¡¶éƒ¨åˆ°å³è¾¹ã€‚ &Information... Edit| ä¿¡æ¯(&I)... Ctrl+I Edit|Information Ctrl+I Show information about the document encoding and structure. 显示文档的编ç å’Œç»“构信æ¯ã€‚ &Metadata... Edit| 元数æ®(&M)... Ctrl+M Edit|Metadata Ctrl+M Show the document and page meta data. 显示文档åŠé¡µé¢çš„元数æ®ã€‚ &About DjView... 关于DjView(&A)... Show information about this program. 显示本程åºçš„ä¿¡æ¯ã€‚ &Color Display| 彩色(&C) Display everything. 显示所有。 &Stencil Display| 模æ¿(&S) Only display the document bitonal stencil. åªæ˜¾ç¤ºæ–‡æ¡£çš„二值模æ¿ã€‚ &Foreground Display| 剿™¯(&F) Only display the foreground layer. ä»…æ˜¾ç¤ºå‰æ™¯å±‚。 &Background Display| 背景(&B) Only display the background layer. 仅显示背景层。 &Hidden Text Display| éšè—的文本(&H) Overlay a representation of the hidden text layer. 显示éšè—的文本层。 I&nvert Luminance View| å色(&N) Invert image luminance while preserving hue. åè‰²ä½†ä¿æŒé¥±å’Œåº¦ã€‚ Prefere&nces... Settings| 设置(&N)... Show the preferences dialog. æ˜¾ç¤ºè®¾ç½®å¯¹è¯æ¡†ã€‚ Show &Sidebar Settings| 显示侧æ (&S) Ctrl+F9 Settings|Show sidebar Ctrl+F9 F9 Settings|Show sidebar F9 Show/hide the side bar. 显示或éšè—ä¾§æ ã€‚ Show &Toolbar Settings| 显示工具æ (&T) Ctrl+F10 Settings|Show toolbar Ctrl+F10 F10 Settings|Show toolbar F10 Show/hide the standard tool bar. 显示或éšè—标准工具æ ã€‚ Show Stat&usbar Settings| æ˜¾ç¤ºçŠ¶æ€æ (&U) Show/hide the status bar. 显示或éšè—çŠ¶æ€æ ã€‚ F&ull Screen View| å…¨å±(&U) Ctrl+F11 View|FullScreen Ctrl+F11 F11 View|FullScreen F11 Toggle full screen mode. 切æ¢å…¨å±æ¨¡å¼ã€‚ &Continuous Layout| 连续页é¢(&C) Ctrl+F4 Layout|Continuous Ctrl+F4 F4 Layout|Continuous F4 Toggle continuous layout mode. 切æ¢è¿žç»­é¡µé¢æ¨¡å¼ã€‚ Side &by Side Layout| 并排显示(&B) Ctrl+F5 Layout|SideBySide Ctrl+F5 F5 Layout|SideBySide F5 Toggle side-by-side layout mode. 切æ¢å¤šé¡µå¹¶æŽ’显示模å¼ã€‚ Co&ver Page Layout| å°é¢é¡µ(&V) Ctrl+F6 Layout|CoverPage Ctrl+F6 F6 Layout|CoverPage F6 Show the cover page alone in side-by-side mode. 并排显示时å•独显示å°é¢é¡µã€‚ &Right to Left Layout| 从å³å‘å·¦(&R) Ctrl+Shift+F6 Layout|RightToLeft Ctrl+Shift+F6 Shift+F6 Layout|RightToLeft Shift+F6 Show pages right-to-left in side-by-side mode. 并排显示时从å³åˆ°å·¦æ˜¾ç¤ºé¡µé¢ã€‚ Copy &URL Edit| å¤åˆ¶&URL Save an URL for the current page into the clipboard. å¤åˆ¶å½“å‰é¡µé¢çš„URL到剪贴æ¿ã€‚ Ctrl+C Edit|CopyURL Ctrl+C Copy &Outline Edit| å¤åˆ¶æ ‡ç­¾(&O) Save the djvused code for the outline into the clipboard. å¤åˆ¶æ ‡ç­¾å¯¹åº”çš„djvu代ç åˆ°å‰ªè´´æ¿ã€‚ Copy &Annotations Edit| å¤åˆ¶æ³¨é‡Š(&A) Save the djvused code for the page annotations into the clipboard. å¤åˆ¶æ³¨é‡Šå¯¹åº”çš„djvu代ç åˆ°å‰ªè´´æ¿ã€‚ &File File| 文件(&F) Open &Recent 打开最近的文件(&R) &Edit Edit| 编辑(&E) &View View| 查看(&V) &Zoom View|Zoom 缩放(&Z) &Rotate View|Rotate 旋转(&R) &Display View|Display 显示(&D) &Go Go| 转到(&G) &Settings Settings| 设置(&S) &Help Help| 帮助(&H) Control Left Mouse Button 控制鼠标左键 Right Mouse Button é¼ æ ‡å³é”® <html><b>Selecting a rectangle.</b><br/> Once a rectangular area is selected, a popup menu lets you copy the corresponding text or image. Instead of using this tool, you can also hold %1 and use the Left Mouse Button.</html> <html><b>选择矩形。</b><br/> 选中矩形区域时,弹出èœå•让你å¤åˆ¶ç›¸åº”的文本或图åƒã€‚å¦å¤–äº¦å¯æŒ‰ä½ %1 和鼠标左键。</html> <html><b>Zooming.</b><br/> Choose a zoom level for viewing the document. Zoom level 100% displays the document for a 100 dpi screen. Zoom levels <tt>Fit Page</tt> and <tt>Fit Width</tt> ensure that the full page or the page width fit in the window. </html> <html><b>缩放。</b><br/> 选择缩放级别以查看文档。 缩放级别 100% 显示文档于 100 dpi çš„å±å¹•。 缩放级别 <tt>适应页é¢</tt> åŠ <tt>适应宽度</tt> 使整页或宽度适应窗å£ã€‚ </html> <html><b>Rotating the pages.</b><br/> Choose to display pages in portrait or landscape mode. You can also turn them upside down.</html> <html><b>旋转页é¢ã€‚</b><br/> é€‰æ‹©çºµå‘æˆ–æ¨ªå‘æ˜¾ç¤ºæ¨¡å¼ã€‚ 亦å¯ä½¿å…¶ä¸Šä¸‹é¢ å€’。</html> <html><b>Display mode.</b><br/> DjVu images compose a background layer and a foreground layer using a stencil. The display mode specifies with layers should be displayed.</html> <html><b>显示模å¼ã€‚</b><br/> DjVu图åƒåŒ…括背景层和基于模æ¿çš„剿™¯å±‚。 æ˜¾ç¤ºæ¨¡å¼æŒ‡å®šå“ªäº›å±‚被显示。</html> <html><b>Navigating the document.</b><br/> The page selector lets you jump to any page by name and can be activated at any time by pressing Ctrl+G. The navigation buttons jump to the first page, the previous page, the next page, or the last page. </html> <html><b>文档导航。</b><br/> 用页é¢é€‰æ‹©å™¨å¯æŒ‰å称跳到指定页é¢ï¼Œå¯æŒ‰ Ctrl+G 激活之。 用导航按钮å¯è·³åˆ°é¦–页ã€ä¸Šä¸€é¡µã€ä¸‹ä¸€é¡µæˆ–末页。 </html> <html><b>Document and page information.</b><br> Display a dialog window for viewing encoding information pertaining to the document or to a specific page.</html> <html><b>文档和页é¢ä¿¡æ¯ã€‚</b><br> å¼¹å‡ºå¯¹è¯æ¡†æŸ¥çœ‹æ–‡æ¡£æˆ–页é¢çš„ç¼–ç ä¿¡æ¯ã€‚</html> <html><b>Document and page metadata.</b><br> Display a dialog window for viewing metadata pertaining to the document or to a specific page.</html> <html><b>文档和页é¢å…ƒæ•°æ®ã€‚</b><br> å¼¹å‡ºå¯¹è¯æ¡†æ˜¾ç¤ºæ–‡æ¡£æˆ–页é¢çš„元数æ®ã€‚</html> <html><b>Continuous layout.</b><br/> Display all the document pages arranged vertically inside the scrollable document viewing area.</html> <html><b>è¿žç»­é¡µé¢æ¨¡å¼ã€‚</b><br/> 显示文档的全部页é¢ä¸Žå¸¦æ»šåЍæ¡çš„æ˜¾ç¤ºåŒºåŸŸä¸­ã€‚</html> <html><b>Side by side layout.</b><br/> Display pairs of pages side by side inside the scrollable document viewing area.</html> <html><b>并排显示模å¼ã€‚</b><br/> 将页é¢å¹¶æŽ’显示在查看器中。</html> <html><b>Page information.</b><br/> Display information about the page located under the cursor: the sequential page number, the page size in pixels, and the page resolution in dots per inch. </html> <html><b>页é¢ä¿¡æ¯ã€‚</b><br/> 显示ä½äºŽå…‰æ ‡ä½ç½®çš„页é¢ä¿¡æ¯: 页ç åºå·ï¼Œ 页é¢çš„尺寸(按åƒç´ ï¼‰ï¼Œ 以åŠé¡µé¢çš„分辨率(按DPIï¼Œå³æ¯è‹±å¯¸ç‚¹æ•°ï¼‰ </html> <html><b>Cursor information.</b><br/> Display the position of the mouse cursor expressed in page coordinates. </html> <html><b>光标信æ¯ã€‚</b><br/> 显示鼠标光标在页é¢å标中的ä½ç½®å€¼ã€‚ </html> <html><b>Document viewing area.</b><br/> This is the main display area for the DjVu document. <ul><li>Arrows and page keys to navigate the document.</li><li>Space and BackSpace to read the document.</li><li>Keys <tt>+</tt> <tt>-</tt> <tt>[</tt> <tt>]</tt> to zoom or rotate the document.</li><li>Left Mouse Button for panning and selecting links.</li><li>%3 for displaying the contextual menu.</li><li>%1 Left Mouse Button for selecting text or images.</li><li>%2 for popping the magnification lens.</li></ul></html> <html><b>文档查看区域。</b><br/> 这是DjVuæ–‡æ¡£çš„ä¸»è¦æ˜¾ç¤ºåŒºåŸŸã€‚ <ul><li>用方å‘键和翻页键å¯ç¿»åŠ¨æ–‡æ¡£ã€‚</li><li>空格和退格键阅读文档。</li><li>按键 <tt>+</tt> <tt>-</tt> <tt>[</tt> <tt>]</tt> å¯ç¼©æ”¾æˆ–旋转文档。</li><li>é¼ æ ‡å·¦é”®å¯æŒªåЍ页é¢åŠé€‰ä¸­é“¾æŽ¥ã€‚</li><li>%3 显示关è”弹出èœå•。</li><li>%1 鼠标左键选择文本或图åƒã€‚</li><li>%2 弹出放大镜。</li></ul></html> <html><b>Document viewing area.</b><br/> This is the main display area for the DjVu document. But you must first open a DjVu document to see anything.</html> <html><b>文档查看区域。</b><br/> 这是DjVuæ–‡æ¡£çš„ä¸»è¦æ˜¾ç¤ºåŒºåŸŸã€‚ ä¸è¿‡å¾—è¦å…ˆæ‰“å¼€DjVu文档哦。</html> Option '%1' requires boolean argument. 选项 '%1' 需è¦å¸ƒå°”åž‹å‚æ•°ã€‚ Illegal value '%2' for option '%1'. å–值 '%2' 对选项 '%1' 无效。 Toolbar option '%1' is not implemented. 工具æ é€‰é¡¹ '%1' 尚未实现。 Toolbar option '%1' is not recognized. 工具æ é€‰é¡¹ '%1' 未识别。 Option '%1' requires a standalone viewer. 选项 '%1' 需è¦å•独的查看器。 Deprecated option '%1' 过期选项 '%1' Option '%1' is not implemented. 选项 '%1' 尚未实现。 Option '%1' is not recognized. 选项 '%1' 未识别。 DjView DjView Thumbnails 缩略图 Outline 书签 Find 查找 Cannot open file '%1'. 未能打开文件 '%1'。 Opening DjVu file 打开DjVu文件 Cannot open URL '%1'. 未能打开URL '%1'。 Opening DjVu document 打开DjVu文档 Certificate validation error - DjView dialog caption è¯ä¹¦éªŒè¯é”™è¯¯ - DjView <html> %1 Do you want to continue anyway? </html> <html> %1 是å¦ä»ç„¶ç»§ç»­? </html> Cannot find page numbered: %1 未能找到此编å·çš„页: %1 Cannot find page named: %1 未能找到此å称的页: %1 Unrecognized sidebar options '%1'. 未识别的侧æ é€‰é¡¹ '%1'。 Print - DjView dialog caption æ‰“å° - DjView <html> This file was served with printing restrictions. Do you want to print it anyway?</html> <html> This file was served with printing restrictions.Do you want to print it anyway?</html> <html> 本文件有打å°é™åˆ¶ã€‚是å¦ä»ç„¶æ‰“å°ï¼Ÿ</html> Save - DjView dialog caption ä¿å­˜ - DjView <html> This file was served with saving restrictions. Do you want to save it anyway?</html> <html> This file was served with saving restrictions.Do you want to save it anyway?</html> <html> 本文件有ä¿å­˜é™åˆ¶ã€‚是å¦ä»ç„¶ä¿å­˜ï¼Ÿ</html> Export - DjView dialog caption 导出 - DjView Text files save filter 文本文件 All files save filter 所有文件 Save Text - DjView dialog caption ä¿å­˜æ–‡æœ¬ - DjView Error - DjView dialog caption 错误 - DjView Cannot write file '%1'. %2. 未能写入文件 '%1'. %2. %1 files (*.%2);; save image filter %1 文件 (*.%2);; Save Image - DjView dialog caption ä¿å­˜å›¾åƒ - DjView Cannot determine file format. Filename '%1' has no suffix. ä¸èƒ½ç¡®å®šæ–‡ä»¶æ ¼å¼ã€‚ 文件å '%1' æœªåŒ…å«æ‰©å±•å。 Image format %1 not supported. å›¾åƒæ ¼å¼ %1 未支æŒã€‚ Cannot decode page %1. 未能解ç é¡µé¢ %1。 Cannot decode document. æœªèƒ½è§£ç æ–‡æ¡£ã€‚ Decoding DjVu document è§£ç DjVu文档 P%1/%2 %3x%4 %5dpi P%1/%2 %3x%4 %5dpi x=%1 y=%2 x=%1 y=%2 %3x%4+%1+%2 %3x%4+%1+%2 Go: 1 page forward. 转到:å‘å‰ä¸€é¡µã€‚ Go: %n pages forward. 转到:å‘å‰ %n 页。 Go: 1 page backward. 转到:å‘åŽä¸€é¡µã€‚ Go: %n pages backward. 转到:å‘åŽ %n 页。 Go: page %1. 转到:第 %1 页。 Go: %1 转到:%1 (in other window.) (在其它窗å£) Cannot resolve link '%1' 未能解æžé“¾æŽ¥ '%1' Cannot spawn a browser for url '%1' 未能用æµè§ˆå™¨æ‰“å¼€URL '%1' %n characters %n 字符 Copy text (%1) å¤åˆ¶æ–‡æœ¬ (%1) Save text as... å¦å­˜æ–‡æœ¬ä¸º... Copy text into the clipboard. å¤åˆ¶æ–‡æœ¬åˆ°å‰ªè´´æ¿ã€‚ Save text into a file. ä¿å­˜æ–‡æœ¬åˆ°æ–‡ä»¶ã€‚ Copy image (%1x%2 pixels) å¤åˆ¶å›¾åƒ(%1x%2åƒç´ ) Save image as... å¦å­˜å›¾åƒä¸º... Copy image into the clipboard. å¤åˆ¶å›¾åƒåˆ°å‰ªè´´æ¿ã€‚ Save image into a file. ä¿å­˜å›¾åƒåˆ°æ–‡ä»¶ã€‚ Zoom to rectangle 缩放到矩形区域 Zoom the selection to fit the window. 缩放选中区域适应窗å£ã€‚ Copy URL å¤åˆ¶URL Save into the clipboard an URL that highlights the selection. å¤åˆ¶é€‰ä¸­å¯¹è±¡çš„URL到剪贴æ¿ã€‚ Copy Maparea å¤åˆ¶æ˜ å°„区域 Save into the clipboard a maparea annotation expression for program djvused. å¤åˆ¶æ˜ å°„区域注释对应的djvu代ç åˆ°å‰ªè´´æ¿ã€‚ <html><h2>DjVuLibre DjView %1</h2>%2<p>Viewer for DjVu documents<br><a href=%3>%3</a><br>Copyright © 2006-- Léon Bottou.</p><p align=justify><small>This program is free software. You can redistribute or modify it under the terms of the GNU General Public License as published by the Free Software Foundation. This program is distributed <i>without any warranty</i>. See the GNU General Public License for more details.</small></p></html> <html><h2>DjVuLibre DjView %1</h2>%2<p>DjVu文档查看工具<br><a href=%3>%3</a><br>Copyright © 2006-- Léon Bottou.</p><p align=justify><small>æœ¬ç¨‹åºæ˜¯è‡ªç”±è½¯ä»¶ã€‚ä½ å¯ä¾æ®è‡ªç”±è½¯ä»¶åŸºé‡‘会å‘布的GNU GPLçš„æ¡æ¬¾é‡æ–°å‘布或修改本程åºã€‚ 本程åºä¹‹å‘布<i>无任何担ä¿</i>。 详细请å‚è§ GNU GPL。</small></p></html> About DjView 关于DjView DjVu files DjVu文件 All files 所有文件 Open - DjView dialog caption 打开 - DjView Open Location - DjView dialog caption 打开ä½ç½® - DjView Enter the URL of a DjVu document: 输入DjVu文档的URL: Information - DjView dialog caption ä¿¡æ¯ - DjView Metadata - DjView dialog caption å…ƒæ•°æ® - DjView &Clear History 清除历å²(&C) QDjViewApplication cannot open '%1'. 未能打开 '%1'。 Usage: djview [options] [filename-or-url] Common options include: -help~~~Prints this message. -verbose~~~Prints all warning messages. -display <xdpy>~~~Select the X11 display <xdpy>. -geometry <xgeom>~~~Select the initial window geometry. -font <xlfd>~~~Select the X11 name of the main font. -style <qtstyle>~~~Select the QT user interface style. -fullscreen, -fs~~~Start djview in full screen mode. -page=<page>~~~Jump to page <page>. -zoom=<zoom>~~~Set zoom factor. -continuous=<yn>~~~Set continuous layout. -sidebyside=<yn>~~~Set side-by-side layout. 用法: djview [选项] [æ–‡ä»¶åæˆ–url] 常用选项包括: -help~~~显示本帮助信æ¯. -verbose~~~显示所有警告信æ¯. -display <xdpy>~~~选择 X11 æ˜¾ç¤ºçª—å£ <xdpy>. -geometry <xgeom>~~~选择åˆå§‹çª—å£å°ºå¯¸. -font <xlfd>~~~选择主字体的 X11 åç§°. -style <qtstyle>~~~选择 QT ç”¨æˆ·ç•Œé¢æ ·å¼. -fullscreen, -fs~~~å¯åЍ djview ä¸ºå…¨å±æ¨¡å¼. -page=<page>~~~跳到页 <page>. -zoom=<zoom>~~~è®¾å®šç¼©æ”¾å‚æ•°. -continuous=<yn>~~~è®¾å®šè¿žç»­é¡µé¢æ¨¡å¼. -sidebyside=<yn>~~~设定并排显示模å¼. QDjViewAuthDialog Password: 密ç : User: 用户å: Authentication required - DjView 需è¦èº«ä»½è®¤è¯ - DjView QDjViewDjVuExporter DjVu Bundled Document 打包的DjVu文档 DjVu Files (*.djvu *.djv) DjVu文件 (*.djvu *.djv) DjVu Indirect Document 间接的DjVu文档 Question - DjView dialog caption 问题 - DjView <html> This file belongs to a non empty directory. Saving an indirect document creates many files in this directory. Do you want to continue and risk overwriting files in this directory?</html> <html> 此文件属于一个éžç©ºç›®å½•。ä¿å­˜é—´æŽ¥æ–‡æ¡£å°†åœ¨æ­¤ç›®å½•中创建许多文件。是å¦ç»§ç»­å¹¶å…许覆盖文件?</html> Con&tinue 连续(&T) &Cancel å–æ¶ˆ(&C) Unknown error. 未知错误。 System error: %1. 系统错误: %1. Save job creation failed! ä¿å­˜æ“ä½œå¤±è´¥ï¼ QDjViewErrorDialog DjView Error DjView 错误 &Ok 确定(&O) Error - DjView dialog caption 错误 - DjView QDjViewExportDialog Dialog å¯¹è¯æ¡† Export 导出 &Document 文档(&D) C&urrent page 当å‰é¡µ(&U) &Pages 页(&P) to 至 Destination 目标 Format: æ ¼å¼ï¼š &Defaults 默认值(&D) &Ok 确定(&O) &Cancel å–æ¶ˆ(&C) Stop åœæ­¢ <html><b>Saving.</b><br/> You can save the whole document or a page range under a variety of formats. Selecting certain formats creates additional dialog pages for specifying format options.</html> <html><b>ä¿å­˜ä¸­ã€‚</b><br/>ä½ å¯ä»¥ä»¥å¤šç§æ ¼å¼ä¿å­˜æ•´ä¸ªæ–‡æ¡£æˆ–æ¯é¡µã€‚选择格å¼å¹¶è®¾ç½®ç›¸åº”选项。</html> Error - DjView dialog caption 错误 - DjView Overwriting the current file is not allowed! ä¸å…è®¸è¦†ç›–å½“å‰æ–‡ä»¶ï¼ Question - DjView dialog caption 问题 - DjView A file with this name already exists. Do you want to replace it? åŒå文件已存在。 æ˜¯å¦æ›¿æ¢ï¼Ÿ &Replace 替æ¢(&R) This operation has failed. æ“作失败。 This operation has been interrupted. æ“作中断。 All files save filter 所有文件 Export - DjView dialog caption 导出 - DjView QDjViewExportPS1 Form çª—å£ Color 颜色 &Color 彩色(&C) &GrayScale ç°åº¦(&G) Marks 标记 Print image &frame 打å°å›¾åƒæ¡†(&F) Print crop &marks 打å°è£åˆ‡æ ‡è®°(&M) PostScript PostScript Language Level 语言级别 QDjViewExportPS2 Form çª—å£ Scaling 缩放 Scale to &fit the page 缩放到适应整页(&F) &Zoom 缩放(&Z) % % Orientation æ–¹å‘ Automatic 自动 &Portrait 纵å‘(&P) &Landscape 横å‘(&L) QDjViewExportPS3 Form çª—å£ Print sheets suitable for folding a booklet. 打å°å¼ æ•°é€‚应折å å†Œé¡µã€‚ Advanced 高级 Sheets per booklet: æ¯å†Œé¡µå¼ æ•°: Unlimited æ— é™åˆ¶ at most 最多 Print æ‰“å° rectos and versos. å¥‡æ•°é¡µå’Œå¶æ•°é¡µã€‚ rectos only. 仅奇数页。 versos only. ä»…å¶æ•°é¡µã€‚ Shift rectos and versos by åç§»å¥‡æ•°é¡µå’Œå¶æ•°é¡µ points. 点. Center: 中间: points 点 plus 加 /100 /100 per page. æ¯é¡µ. QDjViewExportPrn Form çª—å£ Color 颜色 &Color 彩色(&C) &GrayScale ç°åº¦(&G) Marks 标记 Print image &frame 打å°å›¾åƒæ¡†(&F) Print crop &marks 打å°è£åˆ‡æ ‡è®°(&M) Scaling 缩放 Scale to &fit the page 缩放到适应整页(&F) &Zoom 缩放(&Z) % % Orientation æ–¹å‘ Automatic 自动 &Portrait 纵å‘(&P) &Landscape 横å‘(&L) QDjViewExportTiff Form çª—å£ Resolution 分辨率 Maximum image resolution 最大图åƒåˆ†è¾¨çއ dpi dpi Compression 压缩 Force &bitonal G4 compression. 强制二值G4压缩(&B)。 Allow &lossy JPEG compression. å…许有æŸJPEG压缩(&L)。 JPEG &quality JPEGè´¨é‡(&Q) Allow &deflate compression. å…许deflate压缩(&D)。 QDjViewFind Case sensitive 区分大å°å†™ Words only ä»…è¯è¯­ Regular expression æ­£åˆ™è¡¨è¾¾å¼ Find Previous (Shift+F3) 查找å‰ä¸€ä¸ª (Shift+F3) Find Next (F3) 查找下一个 (F3) Reset search options to default values. é‡ç½®æœç´¢é€‰é¡¹åˆ°é»˜è®¤å€¼ã€‚ Options 选项 <html><b>Finding text.</b><br/> Search hits appear progressively as soon as you type a search string. Typing enter jumps to the next hit. To move to the previous or next hit, you can also use the arrow buttons or the shortcuts <tt>F3</tt> or <tt>Shift-F3</tt>. You can also double click a page name. Use the <tt>Options</tt> menu to search words only or to specify the case sensitivity.</html> <html><b>查找文本。</b><br/> 输入æœç´¢å­—符串时命中数会递增出现。 敲回车键跳到下一个命中处。 è¦è½¬åˆ°å‰ä¸€å¤„或下一处命中, 亦å¯ä½¿ç”¨æ–¹å‘键或快æ·é”® <tt>F3</tt> 或 <tt>Shift-F3</tt>。 åˆå¯åŒå‡»é¡µé¢å. 在 <tt>选项</tt> èœå•设定æœç´¢è¯è¯­æˆ–区分大å°å†™ã€‚</html> Specify whether search hits must begin on a word boundary. 设定æœç´¢å‘½ä¸­æ˜¯å¦å¼€å§‹äºŽè¯è¯­è¾¹ç•Œã€‚ Specify whether searches are case sensitive. 设定是å¦è€ƒè™‘大å°å†™ã€‚ Regular expressions describe complex string matching patterns. 正则表达å¼è¡¨è¿°å¤æ‚çš„å­—ç¬¦ä¸²åŒ¹é…æ¨¡å¼ã€‚ <html><b>Regular Expression Quick Guide</b><ul><li>The dot <tt>.</tt> matches any character.</li><li>Most characters match themselves.</li><li>Prepend a backslash <tt>\</tt> to match special characters <tt>()[]{}|*+.?!^$\</tt>.</li><li><tt>\b</tt> matches a word boundary.</li><li><tt>\w</tt> matches a word character.</li><li><tt>\d</tt> matches a digit character.</li><li><tt>\s</tt> matches a blank character.</li><li><tt>\n</tt> matches a newline character.</li><li><tt>[<i>a</i>-<i>b</i>]</tt> matches characters in range <tt><i>a</i></tt>-<tt><i>b</i></tt>.</li><li><tt>[^<i>a</i>-<i>b</i>]</tt> matches characters outside range <tt><i>a</i></tt>-<tt><i>b</i></tt>.</li><li><tt><i>a</i>|<i>b</i></tt> matches either regular expression <tt><i>a</i></tt> or regular expression <tt><i>b</i></tt>.</li><li><tt><i>a</i>{<i>n</i>,<i>m</i>}</tt> matches regular expression <tt><i>a</i></tt> repeated <tt><i>n</i></tt> to <tt><i>m</i></tt> times.</li><li><tt><i>a</i>?</tt>, <tt><i>a</i>*</tt>, and <tt><i>a</i>+</tt> are shorthands for <tt><i>a</i>{0,1}</tt>, <tt><i>a</i>{0,}</tt>, and <tt><i>a</i>{1,}</tt>.</li><li>Use parentheses <tt>()</tt> to group regular expressions before <tt>?+*{</tt>.</li></ul></html> <html><b>正则表达å¼å¿«é€ŸæŒ‡å—</b><ul><li>点 <tt>.</tt> 匹é…ä»»æ„字符。</li><li>多数字符匹é…其本身。</li><li>这些字符å‰é¢åŠ ä¸€ä¸ªåæ–œæ  <tt>\</tt> å¯åŒ¹é…相应字符 <tt>()[]{}|*+.?!^$\</tt>.</li><li><tt>\b</tt> 匹é…è¯è¯­è¾¹ç•Œã€‚</li><li><tt>\w</tt> 匹é…一个文本字符。</li><li><tt>\d</tt> 匹é…一个数字字符。</li><li><tt>\s</tt> 匹é…一个空白字符。</li><li><tt>\n</tt> 匹é…一个æ¢è¡Œç¬¦ã€‚</li><li><tt>[<i>a</i>-<i>b</i>]</tt> åŒ¹é…æ­¤èŒƒå›´ä¸­çš„ä»»æ„字符 <tt><i>a</i></tt>-<tt><i>b</i></tt>.</li><li><tt>[^<i>a</i>-<i>b</i>]</tt> åŒ¹é…æ­¤èŒƒå›´ä¹‹å¤–的任æ„字符 <tt><i>a</i></tt>-<tt><i>b</i></tt>。</li><li><tt><i>a</i>|<i>b</i></tt> åŒ¹é…æ­£åˆ™è¡¨è¾¾å¼ <tt><i>a</i></tt> æˆ–æ­£åˆ™è¡¨è¾¾å¼ <tt><i>b</i></tt>。</li><li><tt><i>a</i>{<i>n</i>,<i>m</i>}</tt> åŒ¹é…æ­£åˆ™è¡¨è¾¾å¼ <tt><i>a</i></tt> é‡å¤ <tt><i>n</i></tt> 到 <tt><i>m</i></tt> 次。</li><li><tt><i>a</i>?</tt>, <tt><i>a</i>*</tt>, åŠ <tt><i>a</i>+</tt> 为 <tt><i>a</i>{0,1}</tt>, <tt><i>a</i>{0,}</tt>, åŠ <tt><i>a</i>{1,}</tt>对应的简写。</li><li>ç”¨æ‹¬å· <tt>()</tt> å¯å°†è¡¨è¾¾å¼åˆ†ç»„ 于 <tt>?+*{</tt>之å‰ã€‚</li></ul></html> QDjViewFind::Model 1 hit 1 命中 %n hits %n 命中 Page %1 (1 hit) 页 %1 (1 命中) Page %1 (%n hits) 页 %1 (%n 命中) Searching page %1 (waiting for data.) æœç´¢é¡µ %1 (等待数æ®ã€‚) Searching page %1. æœç´¢é¡µ %1。 No hits! æ— å‘½ä¸­ï¼ <html>Document is not searchable. No page contains information about its textual content.</html> <html>文档ä¸å¯æœç´¢ã€‚ 页é¢ä¸­æ²¡æœ‰æ­¤æ–‡æœ¬å†…容的信æ¯ã€‚</html> <html>Invalid regular expression.</html> <html>无效的正则表达å¼ã€‚</html> QDjViewImgExporter %1 Image JPG Image %1 å›¾åƒ %1 Files (*.%2) JPG Files %1 文件 (*.%2) Cannot render page. 未能显示页é¢ã€‚ Image format %1 not supported. å›¾åƒæ ¼å¼ %1 未支æŒã€‚ QDjViewInfoDialog Dialog å¯¹è¯æ¡† &Document 文档(&D) &File 文件(&F) File: 文件: &View Page 查看页é¢(&V) &Close 关闭(&C) File # 文件 # File Name 文件å File Size æ–‡ä»¶å¤§å° File Type 文件类型 Page # 页 # Page Title 页标题 <html><b>Document information</b><br>This panel shows information about the document and its component files. Select a component file to display detailled information in the <tt>File</tt> tab. Double click a component file to show the corresponding page in the main window. </html> <html><b>文档信æ¯</b><br>æ­¤é¢æ¿æ˜¾ç¤ºæ–‡æ¡£åŠå…¶ç»„æˆæ–‡ä»¶çš„ä¿¡æ¯ã€‚ é€‰ä¸­ç»„æˆæ–‡ä»¶å¯æ˜¾ç¤ºå…¶è¯¦ç»†ä¿¡æ¯äºŽ <tt>文件</tt> 页中。 åŒå‡»ç»„æˆæ–‡ä»¶å¯åœ¨ä¸»çª—å£ä¸­æ˜¾ç¤ºå…¶é¡µé¢ã€‚ </html> <html><b>File and page information</b><br>This panel shows the structure of the DjVu data corresponding to the component file or the page selected in the <tt>Document</tt> tab. The arrow buttons jump to the previous or next component file.</html> <html><b>文件和页é¢ä¿¡æ¯</b><br>æ­¤é¢æ¿æ˜¾ç¤ºåœ¨ <tt>文档</tt> é¡µä¸­é€‰ä¸­çš„ç»„æˆæ–‡ä»¶æˆ–页é¢çš„ DjVu æ•°æ®ç»“构。 æ–¹å‘æŒ‰é’®è½¬åˆ°ä¸Šä¸€ä¸ªæˆ–ä¸‹ä¸€ä¸ªç»„æˆæ–‡ä»¶ã€‚</html> Waiting for data... 等待数æ®... Page #%1 - « %2 » 页 #%1 - « %2 » Page #%1 页 #%1 Thumbnails 缩略图 Shared annotations 共享注释 Shared data å…±äº«æ•°æ® File #%1 - 文件 #%1 - Single DjVu page å•DjVu页 Bundled DjVu document 打包的DjVu文档 Indirect DjVu document TODO 间接的DjVu文档 Obsolete bundled DjVu document 过时的打包的DjVu文档 Obsolete indexed DjVu document 过时的索引的DjVu文档 1 file 1 文件 %n files %n 文件 1 page 1 页 %n pages %n 页 n/a ä¸å¯ç”¨ Page 页 Thumbnails 缩略图 Shared 共享的 QDjViewMetaDialog Dialog å¯¹è¯æ¡† &Document Metadata 文档元数æ®(&D) &Page Metadata 页é¢å…ƒæ•°æ®(&P) Page: 页: &View Page 查看页é¢(&V) &Close 关闭(&C) Ctrl+C copy Ctrl+C Key 按键 Value 值 <html><b>Document metadata</b><br>This panel displays metadata pertaining to the document, such as author, title, references, etc. This information can be saved into the document with program <tt>djvused</tt>: use the commands <tt>create-shared-ant</tt> and <tt>set-meta</tt>.</html> <html><b>文档元数æ®</b><br>æ­¤é¢æ¿æ˜¾ç¤ºæ–‡æ¡£çš„元数æ®ï¼Œè¯¸å¦‚作者,标题,å‚考等。 这些信æ¯å¯ä¿å­˜åˆ°æ–‡æ¡£ä¸­ï¼Œè¯·ç”¨ç¨‹åº <tt>djvused</tt>的命令 <tt>create-shared-ant</tt> å’Œ <tt>set-meta</tt>。</html> <html><b>Page metadata</b><br>This panel displays metadata pertaining to a specific page. Page specific metadata override document metadata. This information can be saved into the document with program <tt>djvused</tt>: use command <tt>select</tt> to select the page and command <tt>set-meta</tt> to specify the metadata entries.</html> <html><b>页é¢å…ƒæ•°æ®</b><br>æ­¤é¢æ¿æ˜¾ç¤ºé¡µé¢çš„元数æ®ã€‚ 页é¢ç‰¹å®šçš„元数æ®è¦†ç›–文档的元数æ®ã€‚ 这些信æ¯å¯ä¿å­˜åœ¨æ–‡æ¡£ä¸­ï¼Œè¯·ç”¨ç¨‹åº <tt>djvused</tt> 的命令 <tt>select</tt> 选择页é¢åŠå‘½ä»¤ <tt>set-meta</tt> 设定元数æ®çš„å–值。</html> QDjViewOutline <html><b>Document outline.</b><br/> This panel display the document outline, or the page names when the outline is not available, Double-click any entry to jump to the selected page.</html> <html><b>文档书签。</b><br/> æ­¤é¢æ¿æ˜¾ç¤ºæ–‡æ¡£ä¹¦ç­¾ï¼Œæˆ–在书签ä¸å¯ç”¨æ—¶æ˜¾ç¤ºé¡µé¢å称, åŒå‡»é¡¹ç›®è·³åˆ°é€‰ä¸­çš„页é¢ã€‚</html> Outline data is corrupted 书签数æ®å†²çª Pages 页 Page %1 页 %1 Go: page %1. 转到:第 %1 页。 Go: %1 转到:%1 QDjViewPSExporter PostScript PostScript PostScript Files (*.ps *.eps) PostScript文件 (*.ps *.eps) Encapsulated PostScript å°è£…çš„PostScript PostScript tab caption PostScript Position tab caption ä½ç½® Booklet tab caption 册页 <html><b>PostScript options.</b><br>Option <tt>Color</tt> enables color printing. Document pages can be decorated with frame and crop marks. PostScript language level 1 is only useful with very old printers. Level 2 works with most printers. Level 3 print color document faster on recent printers.</html> <html><b>PostScript选项。</b><br>选项 <tt>彩色</tt> å¯ç”¨å½©è‰²æ‰“å°ã€‚ 文档页é¢å¯åŠ è¾¹æ¡†å’Œå‰ªè£æ ‡è®°ã€‚ PostScript 语言级别 1 仅用于很è€çš„æ‰“å°æœºã€‚ 级别2ç”¨äºŽå¤§å¤šæ•°æ‰“å°æœºã€‚ 级别3åœ¨æœ€æ–°çš„æ‰“å°æœºä¸Šæ‰“å°å½©è‰²å¿«äº›ã€‚</html> <html><b>Position and scaling.</b><br>Option <tt>Scale to fit</tt> accommodates whatever paper size your printer uses. Zoom factor <tt>100%</tt> reproduces the initial document size. Orientation <tt>Automatic</tt> chooses portrait or landscape on a page per page basis.</html> <html><b>ä½ç½®ä¸Žç¼©æ”¾ã€‚</b><br>选项 <tt>缩放到适应</tt> é€‚åº”æ‰“å°æœºä½¿ç”¨çš„纸张尺寸。 缩放率 <tt>100%</tt> 与原始文档尺寸一样。 æ–¹å‘ <tt>自动</tt> 按æ¯é¡µé€‰æ‹©çºµå‘或横å‘。</html> <html><b>Producing booklets.</b><br>The booklet mode prints the selected pages as sheets suitable for folding one or several booklets. Several booklets might be produced when a maximum number of sheets per booklet is specified. You can either use a duplex printer or print rectos and versos separately.<p> Shifting rectos and versos is useful with poorly aligned duplex printers. The center margins determine how much space is left between the pages to fold the sheets. This space slowly increases from the inner sheet to the outer sheet.</html> <html><b>打å°å†Œé¡µã€‚</b><br>å†Œé¡µæ¨¡å¼æ‰“å°é€‰ä¸­çš„页é¢ä»¥ä¾¿æŠ˜å æˆä¸€æœ¬æˆ–多本册页。 若指定æ¯å†Œé¡µçš„æœ€å¤§å¼ æ•°åˆ™å¯ç”Ÿæˆå¤šæœ¬å†Œé¡µã€‚ ä½ å¯ä½¿ç”¨åŒé¢æ‰“å°æœºæˆ–分别打å°å¥‡å¶é¡µã€‚<p> 对于对é½ä¸å¥½çš„åŒé¢æ‰“å°æœºå¯å移奇å¶é¡µã€‚ 中间的边决定折å é¡µé—´çš„留白。 ç•™ç™½ä»Žå†…é¡µåˆ°å¤–é¡µé€æ¸å¢žå¤§ã€‚</html> Save job creation failed! ä¿å­˜æ“ä½œå¤±è´¥ï¼ QDjViewPdfExporter PDF Document PDF文档 PDF Files (*.pdf) PDF文件 (*.pdf) PDF Options tab caption PDF选项 <html><b>PDF options.</b><br>These options control the characteristics of the images embedded in the exported PDF files. The resolution box limits their maximal resolution. Forcing bitonal G4 compression encodes all pages in black and white using the CCITT Group 4 compression. Allowing JPEG compression uses lossy JPEG for all non bitonal or subsampled images. Otherwise, allowing deflate compression produces more compact files. </html> <html><b>PDF选项。</b><br>这些选项控制嵌入图åƒçš„特å¾ã€‚ 分辨率框é™åˆ¶æœ€å¤§åˆ†è¾¨çŽ‡ã€‚ 强制二值G4压缩将全部黑白页用CCITT Group 4压缩格å¼åŽ‹ç¼©ã€‚ å…许JPEG压缩用有æŸJPEG压缩格å¼åŽ‹ç¼©å…¨éƒ¨éžäºŒå€¼å›¾åƒæˆ–å­é‡‡æ ·å›¾åƒã€‚ å¦å¤–, å…许deflate压缩将得到更å°çš„æ–‡ä»¶ã€‚ </html> Error while creating pdf file. 创建pdf文件出错。 Unable to create output file. 未能创建输出文件。 System error: %1. 系统错误: %1. Unable to reopen temporary file. æœªèƒ½é‡æ–°æ‰“开临时文件。 PDF export was not compiled. PDF输出未æˆåŠŸã€‚ Unable to create temporary file. 未能创建临时文件。 QDjViewPlugin::Document Requesting %1. 请求 %1. QDjViewPrefsDialog Dialog å¯¹è¯æ¡† &Screen å±å¹•(&S) Gamma TODO Gamma <html>Screen color correction.<br>Adjust slider until gray shades look similar.</html> <html>å±å¹•颜色校正。<br>调节滚动æ¡ç›´åˆ°ç°è‰²é˜´å½±åŒºçœ‹èµ·æ¥ç›¸ä¼¼ã€‚</html> Darker æš— Lighter 亮 Display 显示 Force screen &resolution 强制å±å¹•分辨率(&R) dpi dpi Force inverted luminance 强制å色 &Interface 界é¢(&I) Options for 选项 Standalone Viewer å•独显示 Full Screen Standalone Viewer å…¨å±å•独显示 Full Page Plugin 全页æ’ä»¶ Embedded Plugin 嵌入æ’ä»¶ &Remember initial state from last invocation è®°ä½ä¸Šæ¬¡å¯ç”¨çš„åˆå§‹çжæ€(&R) Show 显示 &Menu bar èœå•æ (&M) &Tool bar 工具æ (&T) Sc&rollbars 滚动æ¡(&R) Stat&us bar çŠ¶æ€æ (&U) &Side bar ä¾§æ (&S) &Zoom: 缩放(&Z): Display page &frames 显示页é¢è¾¹æ¡†(&F) Display &annotations 显示注释(&A) Layout 布局 Continuous 连续 Side-by-side 并排显示 Cover Page å°é¢é¡µ Right-to-Left 从å³å‘å·¦ &Keys 按键(&K) Keys 按键 For displaying hyper&links: 显示超链接(&L): For &selecting text or images: 选中的文本或图åƒ(&S): For displaying the &lens: 显示放大镜(&L): Mouse wheel 鼠标滚轮 Mouse wheel scrolls the page é¼ æ ‡æ»šè½®æ»šåŠ¨é¡µé¢ Mouse wheel changes the zoom factor 鼠标滚轮改å˜ç¼©æ”¾çއ &Lens 放大镜(&L) Enable magnifying &lens å¯ç”¨æ”¾å¤§é•œ(&L) Lens options 放大镜选项 Lens &size: 放大镜尺寸(&S): Magnifying &power: æ”¾å¤§å€æ•°(&P): x x pixels åƒç´  &Network 网络(&N) Proxy settings 代ç†è®¾ç½® Use pro&xy to access the network 使用代ç†è®¿é—®ç½‘络(&X) &Host: 主机(&H): &Port: 端å£(&P): &User: 用户å(&U): Pass&word: 密ç (&W): Cache 缓存 &Clear 清除(&C) MB MB &Decoded page cache: è§£ç é¡µé¢ç¼“å­˜(&D): &Pixel cache: åƒç´ ç¼“å­˜(&P): &Advanced 高级(&A) Interface ç•Œé¢ Force language (next time djview runs) Force language (when djview is restarted.) 强制界é¢è¯­è¨€(下次å¯åŠ¨æ—¶) Enable advanced features in menus 在èœå•中å¯ç”¨é«˜çº§åŠŸèƒ½ Enable page animations å¯ç”¨é¡µé¢åŠ¨ç”» Show hidden text in status bar åœ¨çŠ¶æ€æ æ˜¾ç¤ºéšè—文字 Miscellaneous å…¶ä»– Override saving and printing restrictions 覆盖ä¿å­˜å’Œæ‰“å°é™åˆ¶ Manual printer color correction æ‰‹åŠ¨æ‰“å°æœºé¢œè‰²æ ¡æ­£ gamma= TODO gamma= &Defaults 默认值(&D) &Apply 应用(&A) &Ok 确定(&O) Cancel å–æ¶ˆ Preferences[*] - DjView 设置[*] - DjView <html><b>Screen gamma correction.</b><br>The best color rendition is achieved by adjusting the gamma correction slider and choosing the position that makes the gray square as uniform as possible.<p><b>Screen resolution.</b><br>This option forces a particular resolution instead of using the unreliable resolution advertised by the operating system. Forcing the resolution to 100 dpi matches the behavior of the djvulibre command line tools.</html> <html><b>å±å¹•颜色Gamma校正。</b><br>用滑å—调整Gamma值使ç°è‰²æ–¹å—区域尽é‡ä¸€è‡´ä»¥èŽ·å¾—æœ€ä½³è‰²å½©è¡¨çŽ°ã€‚<p><b>å±å¹•分辨率。</b><br>此选项强制使用指定的分辨率值å–代由æ“作系统æä¾›çš„ä¸å¯é çš„分辨率值。 强制分辨率为 100 dpi 时与 djvulibre 命令行工具一致。</html> <html><b>Initial interface setup.</b><br>DjView can run as a standalone viewer, as a full screen viewer, as a full page browser plugin, or as a plugin embedded inside a html page. For each case, check the <tt>Remember</tt> box to automatically save and restore the interface setup. Otherwise, specify an initial configuration.</html> <html><b>åˆå§‹ç•Œé¢è®¾ç½®ã€‚</b><br>DjView 坿Œ‰ä»¥ä¸‹æ–¹å¼è¿è¡Œï¼š å•独显示, 免屿˜¾ç¤ºï¼Œ 免页颿µè§ˆå™¨æ’件, 或 嵌入html页é¢ä¸­ã€‚ 对于æ¯ç§æ–¹å¼ï¼Œ å¯é€‰ä¸­ <tt>è®°ä½ä¸Šæ¬¡</tt> 框以便自动ä¿å­˜åŠé‡ç”¨ç•Œé¢è®¾ç½®ï¼› 或者,ä¸é€‰ä¸­è€ŒæŒ‡å®šä¸€ä¸ªå›ºå®šçš„åˆå§‹è®¾ç½®ã€‚</html> <html><b>Modifiers keys.</b><br>Define which combination of modifier keys will show the manifying lens, temporarily enable the selection mode, or highlight the hyperlinks.</html> <html><b>按键。</b><br>定义一些组åˆé”®ï¼Œ 如 显示放大镜, 临时å¯ç”¨é€‰æ‹©æ¨¡å¼ï¼Œ 或高亮显示链接。</html> <html><b>Magnifying lens.</b><br>The magnifying lens appears when you depress the modifier keys specified in tab <tt>Keys</tt>. This panel lets you choose the power and the size of the magnifying lens.</html> <html><b>放大镜。</b><br>用 <tt>按键</tt> 页中定义的按键å¯è°ƒå‡ºæ”¾å¤§é•œã€‚ åœ¨æœ¬é¢æ¿å¯é€‰æ‹©æ”¾å¤§å€æ•°å’Œæ”¾å¤§é•œçš„尺寸。</html> <html><b>Advanced.</b><br>You can override the default interface language, disable the page animations, or enable additional menu entries that are useful for authoring DjVu files.You can also disable the printing or saving restrictions dictated by certain web sites. The manual color correction can be useful with old printers.</html> <html><b>高级。</b><br>ä½ å¯é€‰æ‹©é»˜è®¤ç•Œé¢è¯­è¨€ï¼Œ ç¦ç”¨é¡µé¢åŠ¨ç”»ï¼Œ 或 å¯ç”¨æ›´å¤šç¼–辑 DjVu 文件的èœå•项。亦å¯ç¦ç”¨æŸäº›ç½‘ç«™çš„æ‰“å°æˆ–ä¿å­˜é™åˆ¶ã€‚ å¯¹äºŽæ—§å¼æ‰“å°æœºå¯ç”¨æ‰‹åŠ¨é¢œè‰²æ ¡æ­£ã€‚</html> <html><b>Network proxy settings.</b><br>These proxy settings are used when the standalone djview viewer accesses a djvu document through a http url. The djview plugin always uses the proxy settings of the web browser.<p><b>Cache settings.</b><br>The <i>pixel cache</i> stores image data located outside the visible area. This cache makes panning smoother. The <i>decoded page cache</i> contains partially decoded pages. It provides faster response times when navigating a multipage document or when returning to a previously viewed page. Clearing this cache might be useful to reflect a change in the page data without restarting the DjVu viewer.</html> <html><b>网络代ç†è®¾ç½®ã€‚</b><br>本代ç†è®¾ç½®ç”¨äºŽä»¥å•独显示方å¼ä»Žhttp URL地å€è®¿é—®djvu文档。 以æ’ä»¶æ–¹å¼æ—¶ç»é€šå¸¸ç”¨æµè§ˆå™¨çš„代ç†è®¾ç½®ã€‚<p><b>缓存设置。</b><br> <i>åƒç´ ç¼“å­˜</i> ä¿å­˜å¯è§åŒºä¹‹å¤–çš„å›¾åƒæ•°æ®ï¼Œ 使平移更平滑。 <i>è§£ç é¡µé¢ç¼“å­˜</i> åŒ…å«æœ‰éƒ¨åˆ†è§£ç çš„页é¢ï¼Œ 使得æµè§ˆå¤šé¡µæ–‡æ¡£æˆ–返回å‰é¢çœ‹è¿‡çš„页颿—¶å应迅速; 页颿•°æ®æ”¹å˜æ—¶å¯æ¸…除此缓存而ä¸å¿…é‡å¯ç¨‹åºã€‚</html> QDjViewPrintDialog Dialog å¯¹è¯æ¡† Print æ‰“å° &Document 文档(&D) C&urrent page 当å‰é¡µ(&U) &Pages 页(&P) to 至 Destination 目标 Print to file 打å°åˆ°æ–‡ä»¶ Printer name: æ‰“å°æœºå: Choose 选择 &Defaults 默认值(&D) &Ok 确定(&O) &Cancel å–æ¶ˆ(&C) Stop åœæ­¢ <html><b>Printing.</b><br/> You can print the whole document or a page range. Use the <tt>Choose</tt> button to select a print destination and specify printer options. Additional dialog tabs might appear to specify conversion options.</html> <html><b>打å°ã€‚</b><br/> 你坿‰“å°æ•´ä¸ªæ–‡æ¡£æˆ–一些页é¢ã€‚ 用 <tt>选择</tt> 按钮选择打å°ç›®æ ‡æˆ–æŒ‡å®šæ‰“å°æœºé€‰é¡¹ã€‚ 其他选项页é¢å¯æŒ‡å®šè½¬æ¢é€‰é¡¹ã€‚</html> (invalid printer) (æ— æ•ˆæ‰“å°æœº) All files save filter 所有文件 Print To File - DjView dialog caption 打å°åˆ°æ–‡ä»¶ - DjView Question - DjView dialog caption 问题 - DjView A file with this name already exists. Do you want to replace it? åŒå文件已存在。 æ˜¯å¦æ›¿æ¢ï¼Ÿ &Replace 替æ¢(&R) This operation has failed. æ“作失败。 This operation has been interrupted. æ“作中断。 QDjViewPrnExporter Printer data æ‰“å°æœºæ•°æ® PRN Files (*.prn) PRN文件 (*.prn) Printing Options tab caption 打å°é€‰é¡¹ <html><b>Printing options.</b><br>Option <tt>Color</tt> enables color printing. Document pages can be decorated with a frame. Option <tt>Scale to fit</tt> accommodates whatever paper size your printer uses. Zoom factor <tt>100%</tt> reproduces the initial document size. Orientation <tt>Automatic</tt> chooses portrait or landscape on a page per page basis.</html> <html><b>打å°é€‰é¡¹ã€‚</b><br>选项 <tt>彩色</tt> å¯ç”¨å½©è‰²æ‰“å°ã€‚ 文档页é¢å¯åŠ è¾¹æ¡†å’Œå‰ªè£æ ‡è®°ã€‚ 选项 <tt>缩放到适应</tt> é€‚åº”æ‰“å°æœºä½¿ç”¨çš„纸张尺寸。 缩放率 <tt>100%</tt> 与原始文档尺寸一样。 æ–¹å‘ <tt>自动</tt> 按æ¯é¡µé€‰æ‹©çºµå‘或横å‘。</html> Cannot render page %1. æœªèƒ½æ¸²æŸ“é¡µé¢ %1. QDjViewSaveDialog Dialog å¯¹è¯æ¡† Save ä¿å­˜ &Document 文档(&D) C&urrent page 当å‰é¡µ(&U) &Pages 页(&P) to 至 Destination 目标 Format: æ ¼å¼ï¼š Bundled DjVu Document 打包的DjVu文档 Indirect DjVu Document 间接的DjVu文档 &Ok 确定(&O) &Cancel å–æ¶ˆ(&C) Stop åœæ­¢ <html><b>Saving.</b><br/> You can save the whole document or a page range. The bundled format creates a single file. The indirect format creates multiple files suitable for web serving.</html> <html><b>ä¿å­˜ã€‚</b><br/> ä½ å¯ä¿å­˜æ•´ä¸ªæ–‡æ¡£æˆ–其中的一些页é¢ã€‚ å°è£…æ ¼å¼ç”Ÿæˆä¸€ä¸ªæ–‡ä»¶ã€‚间接格å¼ç”Ÿæˆå¤šä¸ªæ–‡ä»¶ï¼Œé€‚åˆç½‘页应用。</html> Error - DjView dialog caption 错误 - DjView Overwriting the current file is not allowed! ä¸å…è®¸è¦†ç›–å½“å‰æ–‡ä»¶ï¼ Question - DjView dialog caption 问题 - DjView A file with this name already exists. Do you want to replace it? åŒå文件已存在。 æ˜¯å¦æ›¿æ¢ï¼Ÿ &Replace 替æ¢(&R) This operation has failed. æ“作失败。 This operation has been interrupted. æ“作中断。 All files save filter 所有文件 Save - DjView dialog caption ä¿å­˜ - DjView QDjViewThumbnails Tiny thumbnail menu æžå° Small thumbnail menu å° Medium thumbnail menu 中 Large thumbnail menu 大 Smart thumbnail menu 智能 Control Left Mouse Button 控制鼠标左键 Right Mouse Button é¼ æ ‡å³é”® <html><b>Document thumbnails.</b><br/> This panel display thumbnails for the document pages. Double click a thumbnail to jump to the selected page. %1 to change the thumbnail size or the refresh mode. The smart refresh mode only computes thumbnails when the page data is present (displayed or cached.)</html> <html><b>文档缩略图。</b><br/> æœ¬é¢æ¿æ˜¾ç¤ºæ–‡æ¡£é¡µé¢çš„缩略图。 åŒå‡»ç¼©ç•¥å›¾è·³åˆ°ç›¸åº”的页é¢ã€‚ %1 设置缩略图尺寸或刷新模å¼ã€‚ 智能刷新模å¼åªåœ¨é¡µé¢æ•°æ®è¢«ä½¿ç”¨ï¼ˆæ˜¾ç¤ºæˆ–缓存)时生æˆç¼©ç•¥å›¾ã€‚</html> QDjViewTiffExporter TIFF Document TIFF文档 TIFF Files (*.tiff *.tif) TIFF文件 (*.tiff *.tif) TIFF Options tab caption TIFF选项 <html><b>TIFF options.</b><br>The resolution box specifies an upper limit for the resolution of the TIFF images. Forcing bitonal G4 compression encodes all pages in black and white using the CCITT Group 4 compression. Allowing JPEG compression uses lossy JPEG for all non bitonal or subsampled images. Otherwise, allowing deflate compression produces more compact (but less portable) files than the default packbits compression.</html> <html><b>TIFF选项。</b><br>分辨率框指定TIFF图åƒçš„æœ€å¤§åˆ†è¾¨çŽ‡ã€‚ 强制二值G4压缩将所有黑白页é¢ç”¨CCITT Group 4 æ ¼å¼åŽ‹ç¼©ã€‚ å…许JPEG压缩使用有æŸJPEGæ ¼å¼åŽ‹ç¼©æ‰€æœ‰éžäºŒå€¼çš„å›¾åƒæˆ–å­é‡‡æ ·å›¾åƒã€‚ å¦å¤–,相比默认的packbits压缩格å¼ï¼Œå…许deflate压缩能产生更å°çš„æ–‡ä»¶ï¼Œä½†ç§»æ¤æ€§å·®äº›ã€‚</html> Cannot open output file. 未能打开输出文件。 Out of memory. 内存ä¸è¶³ã€‚ Internal error. 内部错误。 TIFF export has not been compiled. TIFF输出未æˆåŠŸã€‚ QDjVuNetDocument Requesting '%1' 请求 %1 QDjVuNetDocument::Private Received http status %1 while retrieving %2. %1 is an http status code 接收 %2 时收到httpçŠ¶æ€ %1。 Received <%1> data while retrieving %2. %1 is a mime type 接收 %2 时收到 %1 æ•°æ®ã€‚ %1 while retrieving '%2'. 接收 %2 æ—¶ %1。 Cannot validate the certificate for server %1. æœªèƒ½éªŒè¯æœåС噍 %1 çš„è¯ä¹¦ã€‚ Authentication required for %1 (%2). %1 (%2) 需è¦èº«ä»½è®¤è¯ã€‚ Authentication required for proxy %1. ä»£ç†æœåС噍 %1 需è¦èº«ä»½è®¤è¯ã€‚ djview4/src/djview_zh_tw.ts000066400000000000000000004435671174072760700163320ustar00rootroot00000000000000 Generic thisLanguage Name of THIS language ç¹é«”中文 QApplication Option '-fix' is deprecated. é¸é …'-fix'å·²éŽæ™‚。 QDjView cannot open '%1'. 未能開啟 '%1'。 FitWidth zoomCombo 驿‡‰å¯¬åº¦ FitPage zoomCombo 驿‡‰é é¢ Stretch zoomCombo 拉伸 1:1 zoomCombo 1:1 300% zoomCombo 300% 200% zoomCombo 200% 150% zoomCombo 150% 100% zoomCombo 100% 75% zoomCombo 75% 50% zoomCombo 50% Color modeCombo 色彩 Stencil modeCombo æ¨£æ¿ Foreground modeCombo 剿™¯è‰² Background modeCombo 背景色 Hidden Text modeCombo éš±è—字檔 &New File| 新建(&N) Ctrl+N File|New Ctrl+N Create a new DjView window. 新建DjView視窗。 &Open File| 開啟(&O) Ctrl+O File|Open Ctrl+O Open a DjVu document. 開啟DjVu文件。 Open &Location... File| 開啟ä½ç½®(&L)... Open a remote DjVu document. 開啟é ç«¯çš„DjVu文件。 &Close File| 關閉(&C) Ctrl+W File|Close Ctrl+W Close this window. 關閉視窗。 &Quit File| çµæŸ(&Q) Ctrl+Q File|Quit Ctrl+Q Close all windows and quit the application. é—œé–‰æ‰€æœ‰è¦–çª—å¹¶çµæŸç¨‹å¼ã€‚ Save &as... File| 存新檔(&A)... Ctrl+S File|SaveAs Ctrl+S Save the DjVu document. 儲存DjVu文件。 &Export as... File| 導出為(&E)... Ctrl+E File|ExportAs Ctrl+E Export DjVu page or document to other formats. 導出DjVué é¢æˆ–文件到其他格å¼ã€‚ &Print... File| 列å°(&P)... Ctrl+P File|Print Ctrl+P Print the DjVu document. 列å°DjVu文件。 &Find... Edit| 尋找(&F)... Ctrl+F Edit|Find Ctrl+F Find text in the document. 在文件中尋找字檔。 Find &Next Edit| 尋找下一個(&N) Ctrl+F3 Edit|Find Next Ctrl+F3 F3 Edit|Find Next F3 Find next occurence of search text in the document. 在文件中尋找字檔的下一個實例。 Find &Previous Edit| 尋找å‰ä¸€å€‹(&P) Shift+F3 Edit|Find Previous Shift+F3 Find previous occurence of search text in the document. 在文件中尋找字檔的å‰ä¸€å€‹å¯¦ä¾‹ã€‚ &Select Edit| é¸å–(&S) Ctrl+F2 Edit|Select Ctrl+F2 F2 Edit|Select F2 Select a rectangle in the document. 在文件中é¸å–塊。 Zoom &In Zoom| 放大(&I) Increase the magnification. 增加放大率。 Zoom &Out Zoom| 縮å°(&O) Decrease the magnification. æ¸›å°æ”¾å¤§çŽ‡ã€‚ Fit &Width Zoom| 驿‡‰å¯¬åº¦(&W) Set magnification to fit page width. ç¸®æ”¾åˆ°é©æ‡‰é é¢å¯¬åº¦ã€‚ Fit &Page Zoom| 驿‡‰é é¢(&P) Set magnification to fit page. ç¸®æ”¾åˆ°é©æ‡‰æ•´é ã€‚ One &to one Zoom| 一比一åƒç´ (&T) Set full resolution magnification. 全解æžåº¦ç¸®æ”¾ã€‚ &300% Zoom| &300% Magnify 300% 放大300% &200% Zoom| &200% Magnify 20% 放大200% 150% Zoom| 150% Magnify 150% 放大150% &100% Zoom| &100% Magnify 100% åˆå§‹å¤§å° &75% Zoom| &75% Magnify 75% 縮放到75% &50% Zoom| &50% Magnify 50% 縮放到50% &First Page Go| 首é (&F) Jump to first document page. 跳到文件的第一é ã€‚ &Next Page Go| 下一é (&N) Jump to next document page. 跳到文件的下一é ã€‚ &Previous Page Go| 上一é (&P) Jump to previous document page. 跳到文件的上一é ã€‚ &Last Page Go| 末é (&L) Jump to last document page. 跳到文件的最åŽä¸€é ã€‚ &Backward Go| åŽé€€(&B) Backward in history. 退回到上一個曆å²ä½ç½®ã€‚ &Forward Go| å‰é€²(&F) Forward in history. å‰é€²åˆ°ä¸‹ä¸€å€‹æ›†å²ä½ç½®ã€‚ Rotate &Left Rotate| é€†æ™‚é‡æ—‹è½‰(&L) Rotate page image counter-clockwise. é€†æ™‚é‡æ—‹è½‰é é¢ã€‚ Rotate &Right Rotate| é †æ™‚é‡æ—‹è½‰(&R) Rotate page image clockwise. é †æ™‚é‡æ—‹è½‰é é¢ã€‚ Rotate &0° Rotate| 還原旋轉(&0) Set natural page orientation. 回復é é¢åˆå§‹æ–¹å‘。 Rotate &90° Rotate| é€†æ™‚é‡æ—‹è½‰&90° Turn page on its left side. 旋轉é é¢é ‚部到左邊。 Rotate &180° Rotate| é€†æ™‚é‡æ—‹è½‰&180° Turn page upside-down. 旋轉é é¢é ‚部æœä¸‹ã€‚ Rotate &270° Rotate| é€†æ™‚é‡æ—‹è½‰&270° Turn page on its right side. 旋轉é é¢é ‚部到å³é‚Šã€‚ &Information... Edit| 資訊(&I)... Ctrl+I Edit|Information Ctrl+I Show information about the document encoding and structure. 察看文件的編碼和架構資訊。 &Metadata... Edit| 元資料(&M)... Ctrl+M Edit|Metadata Ctrl+M Show the document and page meta data. 察看文件åŠé é¢çš„元資料。 &About DjView... 關於DjView(&A)... Show information about this program. 察看本程å¼çš„資訊。 &Color Display| 色彩(&C) Display everything. 察看所有。 &Stencil Display| 樣æ¿(&S) Only display the document bitonal stencil. åªå¯Ÿçœ‹æ–‡ä»¶çš„二值樣æ¿ã€‚ &Foreground Display| 剿™¯(&F) Only display the foreground layer. åƒ…å¯Ÿçœ‹å‰æ™¯å±¤ã€‚ &Background Display| 背景(&B) Only display the background layer. 僅察看背景層。 &Hidden Text Display| éš±è—的字檔(&H) Overlay a representation of the hidden text layer. 察看隱è—的字檔層。 I&nvert Luminance View| å色(&N) Invert image luminance while preserving hue. åè‰²ä½†ä¿æŒé£½å’Œåº¦ã€‚ Prefere&nces... Settings| 設定(&N)... Show the preferences dialog. 察看設定å°è©±æ–¹å¡Šã€‚ Show &Sidebar Settings| å¯Ÿçœ‹å´æ¬„(&S) Ctrl+F9 Settings|Show sidebar Ctrl+F9 F9 Settings|Show sidebar F9 Show/hide the side bar. 察看或隱è—å´æ¬„。 Show &Toolbar Settings| 察看工具軸(&T) Ctrl+F10 Settings|Show toolbar Ctrl+F10 F10 Settings|Show toolbar F10 Show/hide the standard tool bar. å¯Ÿçœ‹æˆ–éš±è—æ¨™å‡†å·¥å…·è»¸ã€‚ Show Stat&usbar Settings| 察看狀態欄(&U) Show/hide the status bar. 察看或隱è—狀態欄。 F&ull Screen View| å…¨å±(&U) Ctrl+F11 View|FullScreen Ctrl+F11 F11 View|FullScreen F11 Toggle full screen mode. 切æ›å…¨å±åž‹æ…‹ã€‚ &Continuous Layout| 連續é é¢(&C) Ctrl+F4 Layout|Continuous Ctrl+F4 F4 Layout|Continuous F4 Toggle continuous layout mode. 切æ›é€£çºŒé é¢åž‹æ…‹ã€‚ Side &by Side Layout| 并排察看(&B) Ctrl+F5 Layout|SideBySide Ctrl+F5 F5 Layout|SideBySide F5 Toggle side-by-side layout mode. 切æ›å¤šé å¹¶æŽ’察看型態。 Co&ver Page Layout| å°é¢é (&V) Ctrl+F6 Layout|CoverPage Ctrl+F6 F6 Layout|CoverPage F6 Show the cover page alone in side-by-side mode. 并排察看時單ç¨å¯Ÿçœ‹å°é¢é ã€‚ &Right to Left Layout| 從å³å‘å·¦(&R) Ctrl+Shift+F6 Layout|RightToLeft Ctrl+Shift+F6 Shift+F6 Layout|RightToLeft Shift+F6 Show pages right-to-left in side-by-side mode. 并排察看時從å³åˆ°å·¦å¯Ÿçœ‹é é¢ã€‚ Copy &URL Edit| 複製&URL Save an URL for the current page into the clipboard. 複製目å‰é é¢çš„URL到剪貼簿。 Ctrl+C Edit|CopyURL Ctrl+C Copy &Outline Edit| 複製標簽(&O) Save the djvused code for the outline into the clipboard. è¤‡è£½æ¨™ç°½å°æ‡‰çš„djvu程å¼ç¢¼åˆ°å‰ªè²¼ç°¿ã€‚ Copy &Annotations Edit| 複製註釋(&A) Save the djvused code for the page annotations into the clipboard. è¤‡è£½è¨»é‡‹å°æ‡‰çš„djvu程å¼ç¢¼åˆ°å‰ªè²¼ç°¿ã€‚ &File File| 檔案(&F) Open &Recent 開啟最近的檔案(&R) &Edit Edit| 編輯(&E) &View View| 檢視(&V) &Zoom View|Zoom 縮放(&Z) &Rotate View|Rotate 旋轉(&R) &Display View|Display 察看(&D) &Go Go| 轉到(&G) &Settings Settings| 設定(&S) &Help Help| 輔助說明(&H) Control Left Mouse Button æŽ§åˆ¶æ»‘é¼ å·¦éµ Right Mouse Button 滑鼠å³éµ <html><b>Selecting a rectangle.</b><br/> Once a rectangular area is selected, a popup menu lets you copy the corresponding text or image. Instead of using this tool, you can also hold %1 and use the Left Mouse Button.</html> <html><b>é¸å–矩形。</b><br/> é¸ä¸­çŸ©å½¢å€åŸŸæ™‚,å³ç¾åŠŸèƒ½è¡¨è®“ä½ è¤‡è£½ç›¸æ‡‰çš„å­—æª”æˆ–å½±åƒã€‚å¦å¤–äº¦å¯æŒ‰ä½ %1 和滑鼠左éµã€‚</html> <html><b>Zooming.</b><br/> Choose a zoom level for viewing the document. Zoom level 100% displays the document for a 100 dpi screen. Zoom levels <tt>Fit Page</tt> and <tt>Fit Width</tt> ensure that the full page or the page width fit in the window. </html> <html><b>縮放。</b><br/> é¸å–縮放級別以檢視文件。 縮放級別 100% 察看文件於 100 dpi 的螢幕。 縮放級別 <tt>驿‡‰é é¢</tt> åŠ <tt>驿‡‰å¯¬åº¦</tt> ä½¿æ•´é æˆ–å¯¬åº¦é©æ‡‰è¦–窗。 </html> <html><b>Rotating the pages.</b><br/> Choose to display pages in portrait or landscape mode. You can also turn them upside down.</html> <html><b>旋轉é é¢ã€‚</b><br/> é¸å–垂直或橫å‘察看型態。 亦å¯ä½¿å…¶ä¸Šä¸‹å¾©åŽŸã€‚</html> <html><b>Display mode.</b><br/> DjVu images compose a background layer and a foreground layer using a stencil. The display mode specifies with layers should be displayed.</html> <html><b>察看型態。</b><br/> DjVuå½±åƒåŒ…括背景層和基於樣æ¿çš„剿™¯å±¤ã€‚ 察看型態指定哪些層被察看。</html> <html><b>Navigating the document.</b><br/> The page selector lets you jump to any page by name and can be activated at any time by pressing Ctrl+G. The navigation buttons jump to the first page, the previous page, the next page, or the last page. </html> <html><b>文件導航。</b><br/> 用é é¢é¸å–噍坿Œ‰å稱跳到指定é é¢ï¼Œå¯æŒ‰ Ctrl+G 啟動之。 用導航按鈕å¯è·³åˆ°é¦–é ã€ä¸Šä¸€é ã€ä¸‹ä¸€é æˆ–末é ã€‚ </html> <html><b>Document and page information.</b><br> Display a dialog window for viewing encoding information pertaining to the document or to a specific page.</html> <html><b>文件和é é¢è³‡è¨Šã€‚</b><br> å³ç¾å°è©±æ–¹å¡Šæª¢è¦–文件或é é¢çš„編碼資訊。</html> <html><b>Document and page metadata.</b><br> Display a dialog window for viewing metadata pertaining to the document or to a specific page.</html> <html><b>文件和é é¢å…ƒè³‡æ–™ã€‚</b><br> å³ç¾å°è©±æ–¹å¡Šå¯Ÿçœ‹æ–‡ä»¶æˆ–é é¢çš„元資料。</html> <html><b>Continuous layout.</b><br/> Display all the document pages arranged vertically inside the scrollable document viewing area.</html> <html><b>連續é é¢åž‹æ…‹ã€‚</b><br/> 察看文件的全部é é¢èˆ‡å¸¶æ²å‹•軸的察看å€åŸŸä¸­ã€‚</html> <html><b>Side by side layout.</b><br/> Display pairs of pages side by side inside the scrollable document viewing area.</html> <html><b>并排察看型態。</b><br/> å°‡é é¢å¹¶æŽ’察看在檢視器中。</html> <html><b>Page information.</b><br/> Display information about the page located under the cursor: the sequential page number, the page size in pixels, and the page resolution in dots per inch. </html> <html><b>é é¢è³‡è¨Šã€‚</b><br/> å¯Ÿçœ‹ä½æ–¼æ¸¸æ¨™ä½ç½®çš„é é¢è³‡è¨Š: é ç¢¼åºè™Ÿï¼Œ é é¢çš„大å°ï¼ˆæŒ‰åƒç´ ï¼‰ï¼Œ 以åŠé é¢çš„è§£æžåº¦ï¼ˆæŒ‰DPIï¼Œå³æ¯è‹±å‹é»žæ•¸ï¼‰ </html> <html><b>Cursor information.</b><br/> Display the position of the mouse cursor expressed in page coordinates. </html> <html><b>游標資訊。</b><br/> 察看滑鼠游標在é é¢åº§æ¨™ä¸­çš„ä½ç½®å€¼ã€‚ </html> <html><b>Document viewing area.</b><br/> This is the main display area for the DjVu document. <ul><li>Arrows and page keys to navigate the document.</li><li>Space and BackSpace to read the document.</li><li>Keys <tt>+</tt> <tt>-</tt> <tt>[</tt> <tt>]</tt> to zoom or rotate the document.</li><li>Left Mouse Button for panning and selecting links.</li><li>%3 for displaying the contextual menu.</li><li>%1 Left Mouse Button for selecting text or images.</li><li>%2 for popping the magnification lens.</li></ul></html> <html><b>文件檢視å€åŸŸã€‚</b><br/> 這是DjVu文件的主è¦å¯Ÿçœ‹å€åŸŸã€‚ <ul><li>用方å‘éµå’Œç¿»é éµå¯ç¿»å‹•文件。</li><li>白字元和退格éµé–±è®€æ–‡ä»¶ã€‚</li><li>æŒ‰éµ <tt>+</tt> <tt>-</tt> <tt>[</tt> <tt>]</tt> å¯ç¸®æ”¾æˆ–旋轉文件。</li><li>滑鼠左éµå¯æŒªå‹•é é¢åŠé¸ä¸­éˆçµã€‚</li><li>%3 察看關è¯å³ç¾åŠŸèƒ½è¡¨ã€‚</li><li>%1 滑鼠左éµé¸å–字檔或影åƒã€‚</li><li>%2 å³ç¾æ”¾å¤§é¡ã€‚</li></ul></html> <html><b>Document viewing area.</b><br/> This is the main display area for the DjVu document. But you must first open a DjVu document to see anything.</html> <html><b>文件檢視å€åŸŸã€‚</b><br/> 這是DjVu文件的主è¦å¯Ÿçœ‹å€åŸŸã€‚ ä¸éŽå¾—è¦å…ˆé–‹å•ŸDjVu文件哦。</html> Option '%1' requires boolean argument. é¸é … '%1' 需è¦å¸ƒæž—åž‹åƒæ•¸ã€‚ Illegal value '%2' for option '%1'. å–值 '%2' å°é¸é … '%1' 無效。 Toolbar option '%1' is not implemented. 工具軸é¸é … '%1' 尚未實ç¾ã€‚ Toolbar option '%1' is not recognized. 工具軸é¸é … '%1' 未識別。 Option '%1' requires a standalone viewer. é¸é … '%1' 需è¦å–®ç¨çš„æª¢è¦–器。 Deprecated option '%1' éŽæœŸé¸é … '%1' Option '%1' is not implemented. é¸é … '%1' 尚未實ç¾ã€‚ Option '%1' is not recognized. é¸é … '%1' 未識別。 DjView DjView Thumbnails 縮略圖 Outline 書籤 Find 尋找 Cannot open file '%1'. 未能開啟檔案 '%1'。 Opening DjVu file 開啟DjVu檔案 Cannot open URL '%1'. 未能開啟URL '%1'。 Opening DjVu document 開啟DjVu文件 Certificate validation error - DjView dialog caption 証書驗証錯誤 - DjView <html> %1 Do you want to continue anyway? </html> <html> %1 是å¦ä»ç„¶ç¹¼çºŒ? </html> Cannot find page numbered: %1 未能找到此編號的é : %1 Cannot find page named: %1 未能找到此å稱的é : %1 Unrecognized sidebar options '%1'. æœªè­˜åˆ¥çš„å´æ¬„é¸é … '%1'。 Print - DjView dialog caption åˆ—å° - DjView <html> This file was served with printing restrictions. Do you want to print it anyway?</html> <html> This file was served with printing restrictions.Do you want to print it anyway?</html> <html> 本文件有打å°é™åˆ¶ã€‚是å¦ä»ç„¶æ‰“å°ï¼Ÿ</html> Save - DjView dialog caption 儲存 - DjView <html> This file was served with saving restrictions. Do you want to save it anyway?</html> <html> This file was served with saving restrictions.Do you want to save it anyway?</html> <html> 本檔案有儲存é™åˆ¶ã€‚是å¦ä»ç„¶å„²å­˜ï¼Ÿ</html> Export - DjView dialog caption 導出 - DjView Text files save filter 字檔檔案 All files save filter 所有檔案 Save Text - DjView dialog caption 儲存字檔 - DjView Error - DjView dialog caption 錯誤 - DjView Cannot write file '%1'. %2. 未能寫入檔案 '%1'. %2. %1 files (*.%2);; save image filter %1 檔案 (*.%2);; Save Image - DjView dialog caption å„²å­˜å½±åƒ - DjView Cannot determine file format. Filename '%1' has no suffix. 無法確定檔案格å¼ã€‚ 檔å '%1' 未包å«å‰¯æª”å。 Image format %1 not supported. å½±åƒæ ¼å¼ %1 未支æ´ã€‚ Cannot decode page %1. 未能解碼é é¢ %1。 Cannot decode document. 未能解碼文件。 Decoding DjVu document 解碼DjVu文件 P%1/%2 %3x%4 %5dpi P%1/%2 %3x%4 %5dpi x=%1 y=%2 x=%1 y=%2 %3x%4+%1+%2 %3x%4+%1+%2 Go: 1 page forward. 轉到:å‘å‰ä¸€é ã€‚ Go: %n pages forward. 轉到:å‘å‰ %n é ã€‚ Go: 1 page backward. 轉到:å‘åŽä¸€é ã€‚ Go: %n pages backward. 轉到:å‘åŽ %n é ã€‚ Go: page %1. 轉到:第 %1 é ã€‚ Go: %1 轉到:%1 (in other window.) (在其他視窗) Cannot resolve link '%1' 未能解æžéˆçµ '%1' Cannot spawn a browser for url '%1' 未能用ç€è¦½å™¨é–‹å•ŸURL '%1' %n characters %n å­—å…ƒ Copy text (%1) 複製字檔 (%1) Save text as... å¦å­˜å­—檔為... Copy text into the clipboard. 複製字檔到剪貼簿。 Save text into a file. 儲存字檔到檔案。 Copy image (%1x%2 pixels) 複製影åƒ(%1x%2åƒç´ ) Save image as... å¦å­˜å½±åƒç‚º... Copy image into the clipboard. 複製影åƒåˆ°å‰ªè²¼ç°¿ã€‚ Save image into a file. 儲存影åƒåˆ°æª”案。 Zoom to rectangle 縮放到矩形å€åŸŸ Zoom the selection to fit the window. 縮放é¸ä¸­å€åŸŸé©æ‡‰è¦–窗。 Copy URL 複製URL Save into the clipboard an URL that highlights the selection. 複製é¸ä¸­ç‰©ä»¶çš„URL到剪貼簿。 Copy Maparea è¤‡è£½å°æ˜ å€åŸŸ Save into the clipboard a maparea annotation expression for program djvused. è¤‡è£½å°æ˜ å€åŸŸè¨»é‡‹å°æ‡‰çš„djvu程å¼ç¢¼åˆ°å‰ªè²¼ç°¿ã€‚ <html><h2>DjVuLibre DjView %1</h2>%2<p>Viewer for DjVu documents<br><a href=%3>%3</a><br>Copyright © 2006-- Léon Bottou.</p><p align=justify><small>This program is free software. You can redistribute or modify it under the terms of the GNU General Public License as published by the Free Software Foundation. This program is distributed <i>without any warranty</i>. See the GNU General Public License for more details.</small></p></html> <html><h2>DjVuLibre DjView %1</h2>%2<p>DjVu文件檢視工具<br><a href=%3>%3</a><br>Copyright © 2006-- Léon Bottou.</p><p align=justify><small>æœ¬ç¨‹å¼æ˜¯è‡ªç”±è»Ÿé«”。你å¯ä¾æ“šè‡ªç”±è»Ÿé«”基金會發布的GNU GPLçš„æ¢æ¬¾é‡æ–°ç™¼å¸ƒæˆ–修改本程å¼ã€‚ 本程å¼ä¹‹ç™¼å¸ƒ<i>無任何擔ä¿</i>。 詳細請åƒè¦‹ GNU GPL。</small></p></html> About DjView 關於DjView DjVu files DjVu檔案 All files 所有檔案 Open - DjView dialog caption 開啟 - DjView Open Location - DjView dialog caption 開啟ä½ç½® - DjView Enter the URL of a DjVu document: 匯入DjVu文件的URL: Information - DjView dialog caption 資訊 - DjView Metadata - DjView dialog caption 元資料 - DjView &Clear History 清除曆å²(&C) QDjViewApplication cannot open '%1'. 未能開啟 '%1'。 Usage: djview [options] [filename-or-url] Common options include: -help~~~Prints this message. -verbose~~~Prints all warning messages. -display <xdpy>~~~Select the X11 display <xdpy>. -geometry <xgeom>~~~Select the initial window geometry. -font <xlfd>~~~Select the X11 name of the main font. -style <qtstyle>~~~Select the QT user interface style. -fullscreen, -fs~~~Start djview in full screen mode. -page=<page>~~~Jump to page <page>. -zoom=<zoom>~~~Set zoom factor. -continuous=<yn>~~~Set continuous layout. -sidebyside=<yn>~~~Set side-by-side layout. 用法: djview [é¸é …] [æª”åæˆ–url] 常用é¸é …包括: -help~~~察看本輔助說明資訊. -verbose~~~察看所有警告資訊. -display <xdpy>~~~é¸å– X11 察看視窗 <xdpy>. -geometry <xgeom>~~~é¸å–åˆå§‹è¦–窗大å°. -font <xlfd>~~~é¸å–主字型的 X11 å稱. -style <qtstyle>~~~é¸å– QT ç”¨æˆ¶ä»‹é¢æ¨£å¼. -fullscreen, -fs~~~啟動 djview 為全å±åž‹æ…‹. -page=<page>~~~è·³åˆ°é  <page>. -zoom=<zoom>~~~è¨­å®šç¸®æ”¾åƒæ•¸. -continuous=<yn>~~~設定連續é é¢åž‹æ…‹. -sidebyside=<yn>~~~設定并排察看型態. QDjViewAuthDialog Password: 密碼: User: 用戶å: Authentication required - DjView 需è¦èº«ä»½èªè¨¼ - DjView QDjViewDjVuExporter DjVu Bundled Document 打包的DjVu文件 DjVu Files (*.djvu *.djv) DjVu檔案 (*.djvu *.djv) DjVu Indirect Document 間接的DjVu文件 Question - DjView dialog caption å•題 - DjView <html> This file belongs to a non empty directory. Saving an indirect document creates many files in this directory. Do you want to continue and risk overwriting files in this directory?</html> <html> 此檔案屬於一個éžç©ºç›®éŒ„。儲存間接文件將在此目錄中建立許多檔案。是å¦ç¹¼çºŒå¹¶å…許覆寫檔案?</html> Con&tinue 連續(&T) &Cancel å–æ¶ˆ(&C) Unknown error. 未知錯誤。 System error: %1. 系統錯誤: %1. Save job creation failed! å„²å­˜ä½œæ¥­å¤±æ•—ï¼ QDjViewErrorDialog DjView Error DjView 錯誤 &Ok 確定(&O) Error - DjView dialog caption 錯誤 - DjView QDjViewExportDialog Dialog å°è©±æ–¹å¡Š Export 導出 &Document 文件(&D) C&urrent page ç›®å‰é (&U) &Pages é (&P) to 至 Destination 目標 Format: æ ¼å¼ï¼š &Defaults é è¨­å€¼(&D) &Ok 確定(&O) &Cancel å–æ¶ˆ(&C) Stop åœæ­¢ <html><b>Saving.</b><br/> You can save the whole document or a page range under a variety of formats. Selecting certain formats creates additional dialog pages for specifying format options.</html> <html><b>儲存中。</b><br/>ä½ å¯ä»¥ä»¥å¤šç¨®æ ¼å¼å„²å­˜æ•´å€‹æ–‡ä»¶æˆ–æ¯é ã€‚é¸å–æ ¼å¼å¹¶è¨­å®šç›¸æ‡‰é¸é …。</html> Error - DjView dialog caption 錯誤 - DjView Overwriting the current file is not allowed! ä¸å…è¨±è¦†å¯«ç›®å‰æª”æ¡ˆï¼ Question - DjView dialog caption å•題 - DjView A file with this name already exists. Do you want to replace it? è¡•åæª”案已存在。 æ˜¯å¦æ›¿ä»£ï¼Ÿ &Replace 替代(&R) This operation has failed. 作業失敗。 This operation has been interrupted. 作業中斷。 All files save filter 所有檔案 Export - DjView dialog caption 導出 - DjView QDjViewExportPS1 Form 視窗 Color 色彩 &Color 色彩(&C) &GrayScale ç°éšŽ(&G) Marks 記號 Print image &frame 列å°å½±åƒæ¡†(&F) Print crop &marks 列å°è£åˆ‡è¨˜è™Ÿ(&M) PostScript PostScript Language Level 語言級別 QDjViewExportPS2 Form 視窗 Scaling 縮放 Scale to &fit the page ç¸®æ”¾åˆ°é©æ‡‰æ•´é (&F) &Zoom 縮放(&Z) % % Orientation æ–¹å‘ Automatic 自動 &Portrait 垂直(&P) &Landscape æ©«å‘(&L) QDjViewExportPS3 Form 視窗 Print sheets suitable for folding a booklet. 列å°å¼µæ•¸é©æ‡‰æŠ˜ç–Šå†Šé ã€‚ Advanced 進階 Sheets per booklet: æ¯å†Šé å¼µæ•¸: Unlimited ç„¡é™åˆ¶ at most 最多 Print åˆ—å° rectos and versos. 奇數é å’Œå¶æ•¸é ã€‚ rectos only. 僅奇數é ã€‚ versos only. åƒ…å¶æ•¸é ã€‚ Shift rectos and versos by å移奇數é å’Œå¶æ•¸é  points. 點. Center: 中間: points 點 plus 加 /100 /100 per page. æ¯é . QDjViewExportPrn Form 視窗 Color 色彩 &Color 色彩(&C) &GrayScale ç°éšŽ(&G) Marks 記號 Print image &frame 列å°å½±åƒæ¡†(&F) Print crop &marks 列å°è£åˆ‡è¨˜è™Ÿ(&M) Scaling 縮放 Scale to &fit the page ç¸®æ”¾åˆ°é©æ‡‰æ•´é (&F) &Zoom 縮放(&Z) % % Orientation æ–¹å‘ Automatic 自動 &Portrait 垂直(&P) &Landscape æ©«å‘(&L) QDjViewExportTiff Form 視窗 Resolution è§£æžåº¦ Maximum image resolution 最大影åƒè§£æžåº¦ dpi dpi Compression 壓縮 Force &bitonal G4 compression. 強制二值G4壓縮(&B)。 Allow &lossy JPEG compression. å…許有æJPEG壓縮(&L)。 JPEG &quality JPEGå“質(&Q) Allow &deflate compression. å…許deflate壓縮(&D)。 QDjViewFind Case sensitive å€åˆ†å¤§å°å¯« Words only 僅詞語 Regular expression æ­£å‰‡è¡¨ç¤ºå¼ Find Previous (Shift+F3) 尋找å‰ä¸€å€‹ (Shift+F3) Find Next (F3) 尋找下一個 (F3) Reset search options to default values. é‡ç½®æœç´¢é¸é …到é è¨­å€¼ã€‚ Options é¸é … <html><b>Finding text.</b><br/> Search hits appear progressively as soon as you type a search string. Typing enter jumps to the next hit. To move to the previous or next hit, you can also use the arrow buttons or the shortcuts <tt>F3</tt> or <tt>Shift-F3</tt>. You can also double click a page name. Use the <tt>Options</tt> menu to search words only or to specify the case sensitivity.</html> <html><b>尋找字檔。</b><br/> 匯入æœç´¢å­—串時命中數會éžå¢žå‡ºç¾ã€‚ 敲轉éµéµè·³åˆ°ä¸‹ä¸€å€‹å‘½ä¸­è™•。 è¦è½‰åˆ°å‰ä¸€è™•或下一處命中, 亦å¯ä½¿ç”¨æ–¹å‘鵿ˆ–æ·å¾‘éµ <tt>F3</tt> 或 <tt>Shift-F3</tt>。 åˆå¯æŒ‰å…©ä¸‹é é¢å. 在 <tt>é¸é …</tt> 功能表設定æœç´¢è©žèªžæˆ–å€åˆ†å¤§å°å¯«ã€‚</html> Specify whether search hits must begin on a word boundary. 設定æœç´¢å‘½ä¸­æ˜¯å¦é–‹å§‹æ–¼è©žèªžé‚Šç·šã€‚ Specify whether searches are case sensitive. 設定是å¦è€ƒæ…®å¤§å°å¯«ã€‚ Regular expressions describe complex string matching patterns. 正則表示å¼è¡¨è¿°è¤‡é›œçš„字串符åˆåž‹æ…‹ã€‚ <html><b>Regular Expression Quick Guide</b><ul><li>The dot <tt>.</tt> matches any character.</li><li>Most characters match themselves.</li><li>Prepend a backslash <tt>\</tt> to match special characters <tt>()[]{}|*+.?!^$\</tt>.</li><li><tt>\b</tt> matches a word boundary.</li><li><tt>\w</tt> matches a word character.</li><li><tt>\d</tt> matches a digit character.</li><li><tt>\s</tt> matches a blank character.</li><li><tt>\n</tt> matches a newline character.</li><li><tt>[<i>a</i>-<i>b</i>]</tt> matches characters in range <tt><i>a</i></tt>-<tt><i>b</i></tt>.</li><li><tt>[^<i>a</i>-<i>b</i>]</tt> matches characters outside range <tt><i>a</i></tt>-<tt><i>b</i></tt>.</li><li><tt><i>a</i>|<i>b</i></tt> matches either regular expression <tt><i>a</i></tt> or regular expression <tt><i>b</i></tt>.</li><li><tt><i>a</i>{<i>n</i>,<i>m</i>}</tt> matches regular expression <tt><i>a</i></tt> repeated <tt><i>n</i></tt> to <tt><i>m</i></tt> times.</li><li><tt><i>a</i>?</tt>, <tt><i>a</i>*</tt>, and <tt><i>a</i>+</tt> are shorthands for <tt><i>a</i>{0,1}</tt>, <tt><i>a</i>{0,}</tt>, and <tt><i>a</i>{1,}</tt>.</li><li>Use parentheses <tt>()</tt> to group regular expressions before <tt>?+*{</tt>.</li></ul></html> <html><b>正則表示å¼å¿«é€ŸæŒ‡å—</b><ul><li>點 <tt>.</tt> 符åˆä»»æ„字元。</li><li>多數字元符åˆå…¶æœ¬èº«ã€‚</li><li>這些字元å‰é¢åР䏀個忖œç·š <tt>\</tt> å¯ç¬¦åˆç›¸æ‡‰å­—å…ƒ <tt>()[]{}|*+.?!^$\</tt>.</li><li><tt>\b</tt> 符åˆè©žèªžé‚Šç·šã€‚</li><li><tt>\w</tt> 符åˆä¸€å€‹å­—檔字元。</li><li><tt>\d</tt> 符åˆä¸€å€‹æ•¸å­—字元。</li><li><tt>\s</tt> 符åˆä¸€å€‹ç©ºç™½å­—元。</li><li><tt>\n</tt> 符åˆä¸€å€‹æ›è¡Œç¬¦ã€‚</li><li><tt>[<i>a</i>-<i>b</i>]</tt> ç¬¦åˆæ­¤ç¯„åœä¸­çš„ä»»æ„å­—å…ƒ <tt><i>a</i></tt>-<tt><i>b</i></tt>.</li><li><tt>[^<i>a</i>-<i>b</i>]</tt> ç¬¦åˆæ­¤ç¯„åœä¹‹å¤–的任æ„å­—å…ƒ <tt><i>a</i></tt>-<tt><i>b</i></tt>。</li><li><tt><i>a</i>|<i>b</i></tt> ç¬¦åˆæ­£å‰‡è¡¨ç¤ºå¼ <tt><i>a</i></tt> æˆ–æ­£å‰‡è¡¨ç¤ºå¼ <tt><i>b</i></tt>。</li><li><tt><i>a</i>{<i>n</i>,<i>m</i>}</tt> ç¬¦åˆæ­£å‰‡è¡¨ç¤ºå¼ <tt><i>a</i></tt> é‡è¤‡ <tt><i>n</i></tt> 到 <tt><i>m</i></tt> 次。</li><li><tt><i>a</i>?</tt>, <tt><i>a</i>*</tt>, åŠ <tt><i>a</i>+</tt> 為 <tt><i>a</i>{0,1}</tt>, <tt><i>a</i>{0,}</tt>, åŠ <tt><i>a</i>{1,}</tt>å°æ‡‰çš„簡寫。</li><li>用括弧 <tt>()</tt> å¯å°‡è¡¨ç¤ºå¼åˆ†çµ„ æ–¼ <tt>?+*{</tt>之å‰ã€‚</li></ul></html> QDjViewFind::Model 1 hit 1 命中 %n hits %n 命中 Page %1 (1 hit) é  %1 (1 命中) Page %1 (%n hits) é  %1 (%n 命中) Searching page %1 (waiting for data.) æœç´¢é  %1 (等待資料。) Searching page %1. æœç´¢é  %1。 No hits! ç„¡å‘½ä¸­ï¼ <html>Document is not searchable. No page contains information about its textual content.</html> <html>文件ä¸å¯æœç´¢ã€‚ é é¢ä¸­æ²’有此字檔內容的資訊。</html> <html>Invalid regular expression.</html> <html>無效的正則表示å¼ã€‚</html> QDjViewImgExporter %1 Image JPG Image %1 å½±åƒ %1 Files (*.%2) JPG Files %1 檔案 (*.%2) Cannot render page. 未能察看é é¢ã€‚ Image format %1 not supported. å½±åƒæ ¼å¼ %1 未支æ´ã€‚ QDjViewInfoDialog Dialog å°è©±æ–¹å¡Š &Document 文件(&D) &File 檔案(&F) File: 檔案: &View Page 檢視é é¢(&V) &Close 關閉(&C) File # 檔案 # File Name 檔å File Size æª”æ¡ˆå¤§å° File Type 檔案類別 Page # é  # Page Title é æ¨™é¡Œ <html><b>Document information</b><br>This panel shows information about the document and its component files. Select a component file to display detailled information in the <tt>File</tt> tab. Double click a component file to show the corresponding page in the main window. </html> <html><b>文件資訊</b><br>æ­¤é¢æ¿å¯Ÿçœ‹æ–‡ä»¶åŠå…¶çµ„æˆæª”案的資訊。 é¸ä¸­çµ„æˆæª”案å¯å¯Ÿçœ‹å…¶è©³ç´°è³‡è¨Šæ–¼ <tt>檔案</tt> é ä¸­ã€‚ æŒ‰å…©ä¸‹çµ„æˆæª”案å¯åœ¨ä¸»è¦–窗中察看其é é¢ã€‚ </html> <html><b>File and page information</b><br>This panel shows the structure of the DjVu data corresponding to the component file or the page selected in the <tt>Document</tt> tab. The arrow buttons jump to the previous or next component file.</html> <html><b>檔案和é é¢è³‡è¨Š</b><br>æ­¤é¢æ¿å¯Ÿçœ‹åœ¨ <tt>文件</tt> é ä¸­é¸ä¸­çš„çµ„æˆæª”案或é é¢çš„ DjVu 資料架構。 æ–¹å‘æŒ‰éˆ•è½‰åˆ°ä¸Šä¸€å€‹æˆ–ä¸‹ä¸€å€‹çµ„æˆæª”案。</html> Waiting for data... 等待資料... Page #%1 - « %2 » é  #%1 - « %2 » Page #%1 é  #%1 Thumbnails 縮略圖 Shared annotations 共用註釋 Shared data 共用資料 File #%1 - 檔案 #%1 - Single DjVu page å–®DjVué  Bundled DjVu document 打包的DjVu文件 Indirect DjVu document TODO 間接的DjVu文件 Obsolete bundled DjVu document éŽæ™‚的打包的DjVu文件 Obsolete indexed DjVu document éŽæ™‚的索引的DjVu文件 1 file 1 檔案 %n files %n 檔案 1 page 1 é  %n pages %n é  n/a ä¸å¯ç”¨ Page é  Thumbnails 縮略圖 Shared 共用的 QDjViewMetaDialog Dialog å°è©±æ–¹å¡Š &Document Metadata 文件元資料(&D) &Page Metadata é é¢å…ƒè³‡æ–™(&P) Page: é : &View Page 檢視é é¢(&V) &Close 關閉(&C) Ctrl+C copy Ctrl+C Key æŒ‰éµ Value 值 <html><b>Document metadata</b><br>This panel displays metadata pertaining to the document, such as author, title, references, etc. This information can be saved into the document with program <tt>djvused</tt>: use the commands <tt>create-shared-ant</tt> and <tt>set-meta</tt>.</html> <html><b>文件元資料</b><br>æ­¤é¢æ¿å¯Ÿçœ‹æ–‡ä»¶çš„元資料,諸如作者,標題,åƒç…§ç­‰ã€‚ 這些資訊å¯å„²å­˜åˆ°æ–‡ä»¶ä¸­ï¼Œè«‹ç”¨ç¨‹å¼ <tt>djvused</tt>的指令 <tt>create-shared-ant</tt> å’Œ <tt>set-meta</tt>。</html> <html><b>Page metadata</b><br>This panel displays metadata pertaining to a specific page. Page specific metadata override document metadata. This information can be saved into the document with program <tt>djvused</tt>: use command <tt>select</tt> to select the page and command <tt>set-meta</tt> to specify the metadata entries.</html> <html><b>é é¢å…ƒè³‡æ–™</b><br>æ­¤é¢æ¿å¯Ÿçœ‹é é¢çš„元資料。 é é¢ç‰¹å®šçš„元資料覆寫文件的元資料。 這些資訊å¯å„²å­˜åœ¨æ–‡ä»¶ä¸­ï¼Œè«‹ç”¨ç¨‹å¼ <tt>djvused</tt> 的指令 <tt>select</tt> é¸å–é é¢åŠæŒ‡ä»¤ <tt>set-meta</tt> 設定元資料的å–值。</html> QDjViewOutline <html><b>Document outline.</b><br/> This panel display the document outline, or the page names when the outline is not available, Double-click any entry to jump to the selected page.</html> <html><b>文件書籤。</b><br/> æ­¤é¢æ¿å¯Ÿçœ‹æ–‡ä»¶æ›¸ç±¤ï¼Œæˆ–在書籤ä¸å¯ç”¨æ™‚察看é é¢å稱, 按兩下項目跳到é¸ä¸­çš„é é¢ã€‚</html> Outline data is corrupted 書籤資料è¡çª Pages é  Page %1 é  %1 Go: page %1. 轉到:第 %1 é ã€‚ Go: %1 轉到:%1 QDjViewPSExporter PostScript PostScript PostScript Files (*.ps *.eps) PostScript檔案 (*.ps *.eps) Encapsulated PostScript å°è£çš„PostScript PostScript tab caption PostScript Position tab caption ä½ç½® Booklet tab caption å†Šé  <html><b>PostScript options.</b><br>Option <tt>Color</tt> enables color printing. Document pages can be decorated with frame and crop marks. PostScript language level 1 is only useful with very old printers. Level 2 works with most printers. Level 3 print color document faster on recent printers.</html> <html><b>PostScripté¸é …。</b><br>é¸é … <tt>色彩</tt> 啟用色彩列å°ã€‚ 文件é é¢å¯åŠ é‚Šç·šæ–¹å¡Šå’Œå‰ªè£è¨˜è™Ÿã€‚ PostScript 語言級別 1 僅用於很è€çš„å°è¡¨æ©Ÿã€‚ 級別2用於大多數å°è¡¨æ©Ÿã€‚ 級別3在最新的å°è¡¨æ©Ÿä¸Šåˆ—å°è‰²å½©å¿«äº›ã€‚</html> <html><b>Position and scaling.</b><br>Option <tt>Scale to fit</tt> accommodates whatever paper size your printer uses. Zoom factor <tt>100%</tt> reproduces the initial document size. Orientation <tt>Automatic</tt> chooses portrait or landscape on a page per page basis.</html> <html><b>ä½ç½®èˆ‡ç¸®æ”¾ã€‚</b><br>é¸é … <tt>ç¸®æ”¾åˆ°é©æ‡‰</tt> 驿‡‰å°è¡¨æ©Ÿä½¿ç”¨çš„紙張大å°ã€‚ 縮放率 <tt>100%</tt> 與åˆå§‹æ–‡ä»¶å¤§å°ä¸€æ¨£ã€‚ æ–¹å‘ <tt>自動</tt> 按æ¯é é¸å–垂直或橫å‘。</html> <html><b>Producing booklets.</b><br>The booklet mode prints the selected pages as sheets suitable for folding one or several booklets. Several booklets might be produced when a maximum number of sheets per booklet is specified. You can either use a duplex printer or print rectos and versos separately.<p> Shifting rectos and versos is useful with poorly aligned duplex printers. The center margins determine how much space is left between the pages to fold the sheets. This space slowly increases from the inner sheet to the outer sheet.</html> <html><b>列å°å†Šé ã€‚</b><br>冊é åž‹æ…‹åˆ—å°é¸ä¸­çš„é é¢ä»¥ä¾¿æŠ˜ç–Šæˆä¸€æœ¬æˆ–多本冊é ã€‚ 若指定æ¯å†Šé çš„æœ€å¤§å¼µæ•¸å‰‡å¯ç”Ÿæˆå¤šæœ¬å†Šé ã€‚ ä½ å¯ä½¿ç”¨é›™é¢å°è¡¨æ©Ÿæˆ–分別列å°å¥‡å¶é ã€‚<p> å°æ–¼å°é½Šä¸å¥½çš„é›™é¢å°è¡¨æ©Ÿå¯å移奇å¶é ã€‚ 中間的邊決定折疊é é–“的留白。 留白從內é åˆ°å¤–é é€æ¼¸å¢žå¤§ã€‚</html> Save job creation failed! å„²å­˜ä½œæ¥­å¤±æ•—ï¼ QDjViewPdfExporter PDF Document PDF文件 PDF Files (*.pdf) PDF檔案 (*.pdf) PDF Options tab caption PDFé¸é … <html><b>PDF options.</b><br>These options control the characteristics of the images embedded in the exported PDF files. The resolution box limits their maximal resolution. Forcing bitonal G4 compression encodes all pages in black and white using the CCITT Group 4 compression. Allowing JPEG compression uses lossy JPEG for all non bitonal or subsampled images. Otherwise, allowing deflate compression produces more compact files. </html> <html><b>PDFé¸é …。</b><br>這些é¸é …控制內嵌影åƒçš„特徵。 è§£æžåº¦æ¡†é™åˆ¶æœ€å¤§è§£æžåº¦ã€‚ 強制二值G4壓縮將全部黑白é ç”¨CCITT Group 4壓縮格å¼å£“縮。 å…許JPEG壓縮用有æJPEG壓縮格å¼å£“縮全部éžäºŒå€¼å½±åƒæˆ–å­å–樣影åƒã€‚ å¦å¤–, å…許deflate壓縮將得到更å°çš„æª”案。 </html> Error while creating pdf file. 建立pdf檔案出錯。 Unable to create output file. 未能建立匯出檔案。 System error: %1. 系統錯誤: %1. Unable to reopen temporary file. æœªèƒ½é‡æ–°é–‹å•Ÿæš«å­˜æª”。 PDF export was not compiled. PDF匯出未æˆåŠŸã€‚ Unable to create temporary file. 未能建立暫存檔。 QDjViewPlugin::Document Requesting %1. è¦æ±‚ %1. QDjViewPrefsDialog Dialog å°è©±æ–¹å¡Š &Screen 螢幕(&S) Gamma TODO Gamma <html>Screen color correction.<br>Adjust slider until gray shades look similar.</html> <html>螢幕色彩校正。<br>調節æ²å‹•軸直到ç°è‰²é™°å½±å€çœ‹èµ·ä¾†ç›¸ä¼¼ã€‚</html> Darker æš— Lighter 亮 Display 察看 Force screen &resolution 強制螢幕解æžåº¦(&R) dpi dpi Force inverted luminance 強制å色 &Interface 介é¢(&I) Options for é¸é … Standalone Viewer å–®ç¨å¯Ÿçœ‹ Full Screen Standalone Viewer å…¨å±å–®ç¨å¯Ÿçœ‹ Full Page Plugin 免頿’ä»¶ Embedded Plugin 內嵌æ’ä»¶ &Remember initial state from last invocation 記ä½ä¸Šæ¬¡å•Ÿç”¨çš„åˆå§‹ç‹€æ…‹(&R) Show 察看 &Menu bar 功能表欄(&M) &Tool bar 工具軸(&T) Sc&rollbars æ²å‹•軸(&R) Stat&us bar 狀態欄(&U) &Side bar å´æ¬„(&S) &Zoom: 縮放(&Z): Display page &frames 察看é é¢é‚Šç·šæ–¹å¡Š(&F) Display &annotations 察看註釋(&A) Layout 佈局 Continuous 連續 Side-by-side 并排察看 Cover Page å°é¢é  Right-to-Left 從å³å‘å·¦ &Keys 按éµ(&K) Keys æŒ‰éµ For displaying hyper&links: 察看超éˆçµ(&L): For &selecting text or images: é¸ä¸­çš„字檔或影åƒ(&S): For displaying the &lens: 察看放大é¡(&L): Mouse wheel 滑鼠滾輪 Mouse wheel scrolls the page 滑鼠滾輪æ²å‹•é é¢ Mouse wheel changes the zoom factor 滑鼠滾輪改變縮放率 &Lens 放大é¡(&L) Enable magnifying &lens 啟用放大é¡(&L) Lens options 放大é¡é¸é … Lens &size: 放大é¡å¤§å°(&S): Magnifying &power: æ”¾å¤§å€æ•¸(&P): x x pixels åƒç´  &Network 網路(&N) Proxy settings 代ç†è¨­å®š Use pro&xy to access the network 使用代ç†å­˜å–網路(&X) &Host: 主機(&H): &Port: 通訊埠(&P): &User: 用戶å(&U): Pass&word: 密碼(&W): Cache ç·©è¡å€ &Clear 清除(&C) MB MB &Decoded page cache: 解碼é é¢ç·©è¡å€(&D): &Pixel cache: åƒç´ ç·©è¡å€(&P): &Advanced 進階(&A) Interface ä»‹é¢ Force language (next time djview runs) Force language (when djview is restarted.) 強制介é¢èªžè¨€(下次啟動時) Enable advanced features in menus 在功能表中啟用進階功能 Enable page animations 啟用é é¢å‹•ç•« Show hidden text in status bar åœ¨ç‹€æ…‹æ¬„é¡¯ç¤ºéš±è—æ–‡å­— Miscellaneous å…¶ä»– Override saving and printing restrictions 覆寫儲存和列å°é™åˆ¶ Manual printer color correction 手動å°è¡¨æ©Ÿè‰²å½©æ ¡æ­£ gamma= TODO gamma= &Defaults é è¨­å€¼(&D) &Apply 應用(&A) &Ok 確定(&O) Cancel å–æ¶ˆ Preferences[*] - DjView 設定[*] - DjView <html><b>Screen gamma correction.</b><br>The best color rendition is achieved by adjusting the gamma correction slider and choosing the position that makes the gray square as uniform as possible.<p><b>Screen resolution.</b><br>This option forces a particular resolution instead of using the unreliable resolution advertised by the operating system. Forcing the resolution to 100 dpi matches the behavior of the djvulibre command line tools.</html> <html><b>螢幕色彩Gamma校正。</b><br>用調整器調整Gamma值使ç°è‰²æ–¹å¡Šå€åŸŸå„˜é‡ä¸€è‡´ä»¥ç²å¾—最佳色彩表ç¾ã€‚<p><b>螢幕解æžåº¦ã€‚</b><br>æ­¤é¸é …強制使用指定的解æžåº¦å€¼å–代由作業系統æä¾›çš„ä¸å¯é çš„è§£æžåº¦å€¼ã€‚ 強制解æžåº¦ç‚º 100 dpi 時與 djvulibre 指令行工具一致。</html> <html><b>Initial interface setup.</b><br>DjView can run as a standalone viewer, as a full screen viewer, as a full page browser plugin, or as a plugin embedded inside a html page. For each case, check the <tt>Remember</tt> box to automatically save and restore the interface setup. Otherwise, specify an initial configuration.</html> <html><b>åˆå§‹ä»‹é¢è¨­å®šã€‚</b><br>DjView 坿Œ‰ä»¥ä¸‹æ–¹å¼åŸ·è¡Œï¼š å–®ç¨å¯Ÿçœ‹ï¼Œ å…¨å±å¯Ÿçœ‹ï¼Œ å…¨é é¢ç€è¦½å™¨æ’件, 或 內嵌htmlé é¢ä¸­ã€‚ å°æ–¼æ¯ç¨®æ–¹å¼ï¼Œ å¯é¸ä¸­ <tt>記ä½ä¸Šæ¬¡</tt> 框以便自動儲存åŠé‡ç”¨ä»‹é¢è¨­å®šï¼› 或者,ä¸é¸ä¸­è€ŒæŒ‡å®šä¸€å€‹å›ºå®šçš„åˆå§‹è¨­å®šã€‚</html> <html><b>Modifiers keys.</b><br>Define which combination of modifier keys will show the manifying lens, temporarily enable the selection mode, or highlight the hyperlinks.</html> <html><b>按éµã€‚</b><br>定義一些組åˆéµï¼Œ 如 察看放大é¡ï¼Œ 臨時啟用é¸å–型態, 或高亮察看éˆçµã€‚</html> <html><b>Magnifying lens.</b><br>The magnifying lens appears when you depress the modifier keys specified in tab <tt>Keys</tt>. This panel lets you choose the power and the size of the magnifying lens.</html> <html><b>放大é¡ã€‚</b><br>用 <tt>按éµ</tt> é ä¸­å®šç¾©çš„æŒ‰éµå¯èª¿å‡ºæ”¾å¤§é¡ã€‚ åœ¨æœ¬é¢æ¿å¯é¸å–æ”¾å¤§å€æ•¸å’Œæ”¾å¤§é¡çš„大å°ã€‚</html> <html><b>Advanced.</b><br>You can override the default interface language, disable the page animations, or enable additional menu entries that are useful for authoring DjVu files.You can also disable the printing or saving restrictions dictated by certain web sites. The manual color correction can be useful with old printers.</html> <html><b>進階。</b><br>ä½ å¯é¸å–é è¨­ä»‹é¢èªžè¨€ï¼Œ ç¦ç”¨é é¢å‹•畫, 或 啟用更多編輯 DjVu 檔案的功能表項。亦å¯ç¦ç”¨æŸäº›ç¶²ç«™çš„åˆ—å°æˆ–儲存é™åˆ¶ã€‚ å°æ–¼èˆŠå¼å°è¡¨æ©Ÿå¯ç”¨æ‰‹å‹•色彩校正。</html> <html><b>Network proxy settings.</b><br>These proxy settings are used when the standalone djview viewer accesses a djvu document through a http url. The djview plugin always uses the proxy settings of the web browser.<p><b>Cache settings.</b><br>The <i>pixel cache</i> stores image data located outside the visible area. This cache makes panning smoother. The <i>decoded page cache</i> contains partially decoded pages. It provides faster response times when navigating a multipage document or when returning to a previously viewed page. Clearing this cache might be useful to reflect a change in the page data without restarting the DjVu viewer.</html> <html><b>網路代ç†è¨­å®šã€‚</b><br>本代ç†è¨­å®šç”¨æ–¼ä»¥å–®ç¨å¯Ÿçœ‹æ–¹å¼å¾žhttp URLä½å€å­˜å–djvu文件。 以æ’ä»¶æ–¹å¼æ™‚經通常用ç€è¦½å™¨çš„代ç†è¨­å®šã€‚<p><b>ç·©è¡å€è¨­å®šã€‚</b><br> <i>åƒç´ ç·©è¡å€</i> 儲存å¯è¦‹å€ä¹‹å¤–的影åƒè³‡æ–™ï¼Œ 使平移更平滑。 <i>解碼é é¢ç·©è¡å€</i> åŒ…å«æœ‰éƒ¨åˆ†è§£ç¢¼çš„é é¢ï¼Œ 使得ç€è¦½å¤šé æ–‡ä»¶æˆ–傳回å‰é¢çœ‹éŽçš„é é¢æ™‚忇‰è¿…速; é é¢è³‡æ–™æ”¹è®Šæ™‚坿¸…除此緩è¡å€è€Œä¸å¿…é‡å•Ÿç¨‹å¼ã€‚</html> QDjViewPrintDialog Dialog å°è©±æ–¹å¡Š Print åˆ—å° &Document 文件(&D) C&urrent page ç›®å‰é (&U) &Pages é (&P) to 至 Destination 目標 Print to file 列å°åˆ°æª”案 Printer name: å°è¡¨æ©Ÿå: Choose é¸å– &Defaults é è¨­å€¼(&D) &Ok 確定(&O) &Cancel å–æ¶ˆ(&C) Stop åœæ­¢ <html><b>Printing.</b><br/> You can print the whole document or a page range. Use the <tt>Choose</tt> button to select a print destination and specify printer options. Additional dialog tabs might appear to specify conversion options.</html> <html><b>列å°ã€‚</b><br/> ä½ å¯åˆ—å°æ•´å€‹æ–‡ä»¶æˆ–一些é é¢ã€‚ 用 <tt>é¸å–</tt> 按鈕é¸å–列å°ç›®æ¨™æˆ–指定å°è¡¨æ©Ÿé¸é …。 å…¶ä»–é¸é …é é¢å¯æŒ‡å®šè½‰æ›é¸é …。</html> (invalid printer) (無效å°è¡¨æ©Ÿ) All files save filter 所有檔案 Print To File - DjView dialog caption 列å°åˆ°æª”案 - DjView Question - DjView dialog caption å•題 - DjView A file with this name already exists. Do you want to replace it? è¡•åæª”案已存在。 æ˜¯å¦æ›¿ä»£ï¼Ÿ &Replace 替代(&R) This operation has failed. 作業失敗。 This operation has been interrupted. 作業中斷。 QDjViewPrnExporter Printer data å°è¡¨æ©Ÿè³‡æ–™ PRN Files (*.prn) PRN檔案 (*.prn) Printing Options tab caption 列å°é¸é … <html><b>Printing options.</b><br>Option <tt>Color</tt> enables color printing. Document pages can be decorated with a frame. Option <tt>Scale to fit</tt> accommodates whatever paper size your printer uses. Zoom factor <tt>100%</tt> reproduces the initial document size. Orientation <tt>Automatic</tt> chooses portrait or landscape on a page per page basis.</html> <html><b>列å°é¸é …。</b><br>é¸é … <tt>色彩</tt> 啟用色彩列å°ã€‚ 文件é é¢å¯åŠ é‚Šç·šæ–¹å¡Šå’Œå‰ªè£è¨˜è™Ÿã€‚ é¸é … <tt>ç¸®æ”¾åˆ°é©æ‡‰</tt> 驿‡‰å°è¡¨æ©Ÿä½¿ç”¨çš„紙張大å°ã€‚ 縮放率 <tt>100%</tt> 與åˆå§‹æ–‡ä»¶å¤§å°ä¸€æ¨£ã€‚ æ–¹å‘ <tt>自動</tt> 按æ¯é é¸å–垂直或橫å‘。</html> Cannot render page %1. 未能渲染é é¢ %1. QDjViewSaveDialog Dialog å°è©±æ–¹å¡Š Save 儲存 &Document 文件(&D) C&urrent page ç›®å‰é (&U) &Pages é (&P) to 至 Destination 目標 Format: æ ¼å¼ï¼š Bundled DjVu Document 打包的DjVu文件 Indirect DjVu Document 間接的DjVu文件 &Ok 確定(&O) &Cancel å–æ¶ˆ(&C) Stop åœæ­¢ <html><b>Saving.</b><br/> You can save the whole document or a page range. The bundled format creates a single file. The indirect format creates multiple files suitable for web serving.</html> <html><b>儲存。</b><br/> ä½ å¯å„²å­˜æ•´å€‹æ–‡ä»¶æˆ–其中的一些é é¢ã€‚ å°è£æ ¼å¼ç”Ÿæˆä¸€å€‹æª”案。間接格å¼ç”Ÿæˆå¤šå€‹æª”案,é©åˆç¶²é æ‡‰ç”¨ã€‚</html> Error - DjView dialog caption 錯誤 - DjView Overwriting the current file is not allowed! ä¸å…è¨±è¦†å¯«ç›®å‰æª”æ¡ˆï¼ Question - DjView dialog caption å•題 - DjView A file with this name already exists. Do you want to replace it? è¡•åæª”案已存在。 æ˜¯å¦æ›¿ä»£ï¼Ÿ &Replace 替代(&R) This operation has failed. 作業失敗。 This operation has been interrupted. 作業中斷。 All files save filter 所有檔案 Save - DjView dialog caption 儲存 - DjView QDjViewThumbnails Tiny thumbnail menu æ¥µå° Small thumbnail menu å° Medium thumbnail menu 中 Large thumbnail menu 大 Smart thumbnail menu 智能 Control Left Mouse Button æŽ§åˆ¶æ»‘é¼ å·¦éµ Right Mouse Button 滑鼠å³éµ <html><b>Document thumbnails.</b><br/> This panel display thumbnails for the document pages. Double click a thumbnail to jump to the selected page. %1 to change the thumbnail size or the refresh mode. The smart refresh mode only computes thumbnails when the page data is present (displayed or cached.)</html> <html><b>文件縮略圖。</b><br/> æœ¬é¢æ¿å¯Ÿçœ‹æ–‡ä»¶é é¢çš„縮略圖。 按兩下縮略圖跳到相應的é é¢ã€‚ %1 è¨­å®šç¸®ç•¥åœ–å¤§å°æˆ–清除型態。 智能清除型態åªåœ¨é é¢è³‡æ–™è¢«ä½¿ç”¨ï¼ˆå¯Ÿçœ‹æˆ–ç·©è¡å€ï¼‰æ™‚生æˆç¸®ç•¥åœ–。</html> QDjViewTiffExporter TIFF Document TIFF文件 TIFF Files (*.tiff *.tif) TIFF檔案 (*.tiff *.tif) TIFF Options tab caption TIFFé¸é … <html><b>TIFF options.</b><br>The resolution box specifies an upper limit for the resolution of the TIFF images. Forcing bitonal G4 compression encodes all pages in black and white using the CCITT Group 4 compression. Allowing JPEG compression uses lossy JPEG for all non bitonal or subsampled images. Otherwise, allowing deflate compression produces more compact (but less portable) files than the default packbits compression.</html> <html><b>TIFFé¸é …。</b><br>è§£æžåº¦æ¡†æŒ‡å®šTIFFå½±åƒçš„æœ€å¤§è§£æžåº¦ã€‚ 強制二值G4壓縮將所有黑白é é¢ç”¨CCITT Group 4 æ ¼å¼å£“縮。 å…許JPEG壓縮使用有æJPEGæ ¼å¼å£“縮所有éžäºŒå€¼çš„å½±åƒæˆ–å­å–樣影åƒã€‚ å¦å¤–,相比é è¨­çš„packbits壓縮格å¼ï¼Œå…許deflate壓縮能產生更å°çš„æª”æ¡ˆï¼Œä½†ç§»æ¤æ€§å·®äº›ã€‚</html> Cannot open output file. 未能開啟匯出檔案。 Out of memory. 記憶體ä¸è¶³ã€‚ Internal error. 內部錯誤。 TIFF export has not been compiled. TIFF匯出未æˆåŠŸã€‚ QDjVuNetDocument Requesting '%1' è¦æ±‚ %1 QDjVuNetDocument::Private Received http status %1 while retrieving %2. %1 is an http status code 接收 %2 時收到http狀態 %1。 Received <%1> data while retrieving %2. %1 is a mime type 接收 %2 時收到 %1 資料。 %1 while retrieving '%2'. 接收 %2 時 %1。 Cannot validate the certificate for server %1. 未能驗証æœå‹™å™¨ %1 的証書。 Authentication required for %1 (%2). %1 (%2) 需è¦èº«ä»½èªè¨¼ã€‚ Authentication required for proxy %1. ä»£ç†æœå‹™å™¨ %1 需è¦èº«ä»½èªè¨¼ã€‚ djview4/src/images/000077500000000000000000000000001174072760700145015ustar00rootroot00000000000000djview4/src/images/DjVu.icns000066400000000000000000001601641174072760700162370ustar00rootroot00000000000000icnsàtics#H?þ?þ?þ?þ?þ?þ?þ?þ?þÿþÿþÿþÿü?ø?ð?þ?þ?þ?þ?þ?þ?þ?þ?þÿþÿþÿþÿü?ø?ðis32yÿÿ–—ßɘ„}tj_Yb€ÿ …´°ßÉŒzqg\Vd€ÿ ‰ß¨‡ßÉwkbXSf€ÿ ‚…™ß›‚ßÉa^RNe€ÿ |‰€•߇ŽßÉ›AH]€ÿr‚€r’ßÚ€ÿ7AU€ÿ ˆ|tph„ßÿÿöH8M€ÿ ˆrec]O¡ÿÿÂE3G€ÿ ˆˆ{wwbVj9)16A„ÿ ô™476445<ÿƒô è‰+453.17ÿ„ä‡'5,FjP7ÿ…‚,5.6‰Bÿ3(-543;B‚ÿ†39‘ÿÿÿshiâÁjNI@6+$A€ÿ QœŠcâÁ[F>4("D€ÿ Usâ†]âÁC8/$F€ÿ PQ„âubâÁ+(E€ÿ JUMƒâZlâÁ`=€ÿ@PKE†â˜€¾ 4€ÿ WJA;=yâ¾¾Ÿ-€ÿ W@20))k–¾q'€ÿ WWGB=(1!ÿƒ· ‘Vÿƒ‘‰Lƒÿ„ˆM€5!ÿ…L€U2ÿ‚1‚ÿ†(‘ÿÿÿ½éñØ×îéÜÐõ­œ€ÿ æãøäØ×æØË¾¯§Ÿ€ÿ è½Øéר×ÕŹª£¡€ÿ ÞæÀØã¾Ø×¿±¤¡€ÿ ÖèàµØÏ“Ø×^œ•–€ÿÒÞâÅ©ØH€6…Ž‹€ÿ µÖÐα¥Ø66fˆ‚€ÿ µÒÅ¿§U6Yƒy€ÿ µµŸšš•Xe}}~qÿƒL 1“„}|}jÿƒ '}~}tydÿ„ &z~k…àXÿ….y}raë]ÿb‚|y^‚ÿ†bT‘ÿs8mkÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿICN#ÿÿüÿÿüÿÿüÿÿüÿÿüÿÿüÿÿüÿÿüÿÿüÿÿüÿÿüÿÿüÿÿüÿÿüÿÿüÿÿüÿÿüÿÿüÿÿÿüÿÿÿüÿÿÿüÿÿÿüÿÿÿüÿÿÿüÿÿÿøÿÿÿðÿÿàÿÿÀÿÿ€ÿÿüÿÿüÿÿüÿÿüÿÿüÿÿüÿÿüÿÿüÿÿüÿÿüÿÿüÿÿüÿÿüÿÿüÿÿüÿÿüÿÿüÿÿüÿÿÿüÿÿÿüÿÿÿüÿÿÿüÿÿÿüÿÿÿüÿÿÿøÿÿÿðÿÿàÿÿÀÿÿ€il32áƒÿ{œr¹tpstuvwxxyzz{{€r…ÿ{‰³©x·ŸŽÅ’Ž‹†|vqkf`[SVq…ÿwŒ©¡vÄŠ¸‰ˆ„€{vqlfa[TWt…ÿqÁ©Ÿ‘{Éw«§‚‚}xtojd_ZSWv…ÿk»·²Á˜‡‡Äk¶–{{vqlhb]XPUx…ÿfdÌ›¶µ’z–´k¹…utoje`[UNTy…ÿ`w‚oª£s³volgb]XSLR{…ÿ[‡„‰É…Åšf¼Š§jhc][VPIP{…ÿW‚—u—½„ÇŒwdÈqŽY`cXSNFMw…ÿQ€Žj¦«‰ÄhcÁk·»âÅJPKDJq…ÿM~‰†„c³•”¸|••Þýÿÿè7KHAFk…ÿH|„€ybº ÂÿŶý€ÿ];E=Cf…ÿEz~|zzlfºt§èßÄø€ÿ™,C:>`…ÿ@xywvst_n·jÌìþ€ÿÓ.>6;[…ÿ=vsrqollXm¡žïøýþþÿûM23:W…ÿ:smmkjgedRRíðôü€ÿj'39Q…ÿ7qghfdb`]\R:¼úõÜ«qB,139M…ÿ6gYZXVTROMRJ„¢L+#(/4438HÿÿîUJD73<;6€437Eÿÿïˆÿ þ÷ìêQ@C?=85‚46@ÿÿîÿÿÚj³ÿ¦ÇªÿýòåÎÚD;=:7„46=ÿÿîÿÿ½’ƒ§‡|¸®õãÌÙC585…45:ÿÿîÿÿ½¤‘u«Q“‰†ôßÅ×@0453./1347ÿÿîÿÿÉUŸ…Ê[ÇWñؼÒ>.40A^LA::6ÿÿîÿÿüèíŠøùÿâêçѱÎ?.€46’™†xY€ÿâõ€ñ ððååâåàÙÔÍÎ7/€450mŽ]‡ÿ 64'*++,-/+%‚47U‚\ˆÿ6H-„1ƒ46"Q^‰ÿ6I476ƒ5€4.LäÿƒÿU˜‰a°HBGGHIJKKLMMNNQQ…ÿV\‰{V³„ƒ´\ZWRMHB=72,&"K…ÿQ]|qjYÀm—žRUQLHC=83-( $N…ÿK«jm]eÁZ¨…KOJE@;61,&#Q…ÿF¹—Ÿ¬aTx¶Q²lEHC>94/)$!R…ÿ@Gʰ™ZKŒ¡W²U@@;61,'" T…ÿ:CmÉsº„RD¤Œe¦B;94/*%U…ÿ5QS{ÀlÁpIB¸qy“450*'"V…ÿ1NbF¯oÁ]?IÄV‹w'*,$Q…ÿ,L[X@¡šy¹L3SºLšt“xK…ÿ&JUSO?°€‰ªCOƒº¦ÁÑ¥ F…ÿ"HPNMDC¹iš¥˜u®¸³»¸2  @…ÿFKIGF8N¸Z¡Â›Á®¥¬·\ :…ÿDEDB@?-\³M|þ™œŸ¨‚ 5…ÿB@?=;97'\¡qŒ‘—˜˜šš!1…ÿ?::8641/:†–’—žŸ›5,…ÿ<4431/,*(p–’„e=&…ÿ3&'%$" @Z(‚"ÿÿ¥ÿÿ¢ÒÈÅÄÀ¸½º³­©£›" ‚ÿÿªòë¼WˆÃozfž—†wƒ „ÿÿ¥âá›patYNJnh’†v„…ÿÿ£ÕÖ•}iOl1YTP‘ƒr‚ˆÿÿŸÉÊ–=lX{7x3Ll€ƒ + ÿÿ›¼·°œœT˜˜›‡‹‰zd€ƒ deRD1€ÿ’ ŸŸ š¡¥¥•„‚„GYL6‡ÿƒ „5K5ˆÿ-5‰ÿƒ€*äÿƒÿÆ ¦¹Å¾¿ÁÂÃÅÆÇÈÉÊÔ±…ÿÆÚÿÿ¹½Ô¤çûôíçáÚÔÌž·¯¦©º…ÿÁáÿÿþ¯ËħéñêäÞØÑËĽ¶¯¥ª½…ÿ¹ìÿüÿ÷§×¯°çèáÛÕÏÈÁ»´­£©À…ÿ±¾ô×éÿê£ÝœºãÞØÑËÅ¿¸±ª¡§Á…ÿª—ÏÑÁíÿ×§×ÄÛÕÏÈ»µ®§ž¥Ä…ÿ£Ú¬×ÄÅì÷À²Ì‹ÉÒËÅ¿¸²«¤š£Æ…ÿœêæ¦ØµËèì§À·ŽËÈÁ¼·®¨¡— Æ…ÿ–âþΧիÒâݕΠ™ÍƱ¨®£”Á…ÿáñó¹®Ê§ÖÛ˘܅{eGDž¢š˜¹…ÿŠßêç覷º¨ØÆ_už!Hp1@£–”±…ÿ…ÜäàßÛ˜¼«·¶¯W>S;#““ˆª…ÿÙÝÚ×ØÊ¾¢º@ÈG11{‘„‰£…ÿz×ÕÓÑÎз¼Ÿ¡¼„ a…œ…ÿ uÔÎÍËÈÄÇ«Šµ{„E†|„–…ÿqÑÇÆÄÁ¾»¼¥€†€.y|ƒ…ÿmÍ¿¿½»¸µ±±§Š( %E_x|‚Š…ÿfÓ¾¿½»¸¶³¯¥ªq1Dh{€}{…ÿÿ9š›š”‡ˆ€€|{€ÿÿ-xh[K1' d–‹ˆ}| {zÿÿEàÄ=KP € IŽˆƒ„|~uÿÿ9·¥i>/(  H‡‚~…| ~qÿÿ1˜‹Y<-€ D€}€|}{uvxz{mÿÿ)ynJ€ B~|uŒ±›„ƒfÿÿWL?)B~€|I'íÿæÔ›€ÿ# #!A}€|~r ·óÞ¡‡ÿ fbKOONMLKIV‚|„2’䟈ÿfžy}‚~~‚|S£‰ÿfš|€~‚}|~l…äÿl8mkÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿich#H?ÿÿÿü?ÿÿÿü?ÿÿÿü?ÿÿÿü?ÿÿÿü?ÿÿÿü?ÿÿÿü?ÿÿÿü?ÿÿÿü?ÿÿÿü?ÿÿÿü?ÿÿÿü?ÿÿÿü?ÿÿÿü?ÿÿÿü?ÿÿÿü?ÿÿÿü?ÿÿÿü?ÿÿÿü?ÿÿÿü?ÿÿÿü?ÿÿÿü?ÿÿÿü?ÿÿÿü?ÿÿÿü?ÿÿÿü?ÿÿÿü?ÿÿÿüÿÿÿÿÿüÿÿÿÿÿüÿÿÿÿÿüÿÿÿÿÿüÿÿÿÿÿüÿÿÿÿÿüÿÿÿÿÿüÿÿÿÿÿüÿÿÿÿÿøÿÿÿÿÿðÿÿÿÿÿàÿÿÿÿÿÀ?ÿÿÿ€?ÿÿÿ?ÿÿþ?ÿÿü?ÿÿø?ÿÿð?ÿÿÿü?ÿÿÿü?ÿÿÿü?ÿÿÿü?ÿÿÿü?ÿÿÿü?ÿÿÿü?ÿÿÿü?ÿÿÿü?ÿÿÿü?ÿÿÿü?ÿÿÿü?ÿÿÿü?ÿÿÿü?ÿÿÿü?ÿÿÿü?ÿÿÿü?ÿÿÿü?ÿÿÿü?ÿÿÿü?ÿÿÿü?ÿÿÿü?ÿÿÿü?ÿÿÿü?ÿÿÿü?ÿÿÿü?ÿÿÿü?ÿÿÿüÿÿÿÿÿüÿÿÿÿÿüÿÿÿÿÿüÿÿÿÿÿüÿÿÿÿÿüÿÿÿÿÿüÿÿÿÿÿüÿÿÿÿÿüÿÿÿÿÿøÿÿÿÿÿðÿÿÿÿÿàÿÿÿÿÿÀ?ÿÿÿ€?ÿÿÿ?ÿÿþ?ÿÿü?ÿÿø?ÿÿðih32m‡ÿ#cMNS=]·}8 b^`bcefhiklnoprsuvwxz{|{d‰ÿ gRomkQ¨×apÖ¢kst‡utsvˆo‰ÿ#f|»±°_»ßi†Û±’•‘Ž‹‡„€}yuqmjfb^ZVPVˆr‰ÿ#fv°§¥§ŒfÎÌ[›ÖŸŽŠˆ…~{wtqmjfc_[XRXŠt‰ÿ#’©¤¡Ÿ£}pÛ¶T­Î“Љ†ƒ€}yvsoliea^ZWQXŒu‰ÿ#°À ¡žš› p‚ã›X¼Ãˆ†…~{xuqnkgc`]YUOWŽv‰ÿ#†Ý¼–¼È—™œf•æaŵ‚€}zvspmifb_[XTNVx‰ÿ#LœÞ¯‘ต˜”a¬ÞdrÌ£{~{xurnkhda]ZVSMV‘x‰ÿ#sC¶ÝŒÞ¯‘•‰_¾ÍQƒÍ”wyvspmifc_\XUQKU“z‰ÿ#uleÃØŸÛ¤Œ’|fÒ½G—Ç„tuqnkhda^[WSPJT”{‰ÿ#v}†iÐÏo®Ö›ˆnqã¥F§»wpplifc_\YURNHR•|‰ÿ#xyŸuuØÁd¿Í‘…‰^ë‡K¶­mljgda]ZWSPMFQ–|‰ÿ#zy—˜f…Û°a·‚S–ìhZ¾œehea\[XURNKEP”z‰ÿ#{y“‘[—Û™gÙ·~wN±áLlÀˆ[Y]gZVSPLICNv‰ÿ#}y‰U©Ù…sߪw{jOÈÊ=y¹‘«ÙèiRQNJGAK‰r‰ÿ~yЉŠ~Q¸Ïk„Ý›quQSÔ²±õÿ j6RKHE?I„o‰ÿ€y‰‡…„†pYÅÅZ™ÙŒ}À£…âþ‚ÿ PJFC=Fk‰ÿ‚x…„‚ƒac˶P°Ë¥ýÿ›ªí‚ÿ ÓHHD@;Dzg‰ÿ„x‚€~}{~TsÌ¢MÀÌëÿÒšáþÿ û?6GB>9Bud‰ÿ†w~}|{yxwxI…ÌP¾ÙàÕÄçý‚ÿw$E?<7?p`‰ÿ‡w{yxwvtsroA“ĈFœÇÏåôƒÿ·A=95=k]‰ÿ‰vwvutsqpnnfDŸ¾…X¹Ôïÿþ‚ÿê06;83=96‚438NGÿÿ–¾ JJIDBDB>;85ƒ438JDÿÿ¿ýÿ ûòÿ¯5GEC@?<975„437FAÿÿ¾ûÿíÝùÿÿïóþéüþû÷ñèÜÇç¤ DB@=;96‡46D?ÿÿ¾ûÿU=aøÿ|ÞKþÿÿøñèÜÈç¥@><:85ˆ46A=ÿÿ¾û€ÿþMÜ[§°¯[«e®ÞžëòçÚÅæ¤=;86Š46=;ÿÿ¾û€ÿþNã€SÏSs˜[ÂJàñä×Áã¤975‹45:8ÿÿ¾û€ÿþOåz’Oæc=ÍYÈOßîàÓ»à¤6†41134586ÿÿ¾ûÿF}?ÙHô{úSx9ßìÜ͵ܣ…467I?520/0155ÿÿ¾ûÿžvÕß4ôÑžÿ¶l™åå×Ç­Ø£„4 2"$y™ˆwh\VQ9€ÿ¾û„ÿ€ÿ üþÿüèÛͻΤ„4 6A¢–‰‚wMÿ¿ý„ÿý†ÿü÷ðåý¡„4 6/!“‹„}tJ‚ÿy „™•£|vw xxyzz}€M5„47ƒ„|tJÿi,‡(…46% t|rJŽÿ’W2‰65…45.npIÿŒQ/ƒ340&iIÿ‰P2‚6ˆ5ƒ4/<:876442>’ÿiZZWUSQNLJHFCA@><;98664438éÿ‡ÿ#T-04$U·k'Ž›F?CEFHJJLNOQRSUVWYZ[\^_]P‰ÿ L @=;5¥Î;a×…5€@‚ABABA@?CUL‰ÿ#KN“ˆ„pH¼ÐC|Ý\a^[WTQMIFA>:62.*&""UN‰ÿ#JE†{ww_Tж8–ÓsWZWUQNKGDA=963/+($%WQ‰ÿ#†P}wropQbݘ6¬ÆbUVRPMJFC@<952.*'#$YR‰ÿ#²«oqmhikGyâx@¾´TRQNKHEA>:740-)%!$[S‰ÿ#€à `¡´degBàXNÈLOMIGC@=962/+($ #]U‰ÿ#=“ߊtåŸ_d_C«Ó>e΃EKHDB>;851-*&#"^U‰ÿ#X#²Ûj{á‘[bUFÀ¹,|ÍmBFB@<962/,(%!!_W‰ÿ#[9KÃÑX“Û~V^JRÕ¤'”ÃV>A>;841.*'#  aX‰ÿ#[GVTÒÂJ¨ÓpSZ@cå‡+§°F<<962/,(%"bY‰ÿ#]EjHeÛ­A¼ÇaPT6zëf6¸š88741-*'# cY‰ÿ#_Edc>yÞ–C϶TMM1’çFIÁ‚/42.)(%!aW‰ÿ#`D`]]6ŽÜ|NÛ¥KJC3±Õ)aÂf(()/&#\T‰ÿ#cD]ZYU4¤Ùd`â‘BG89ʶv³W\„Œ/ VO‰ÿ#eDYVUVK7¶ËIvà|;A'F×g¤¯½Î¹8 QL‰ÿ#fDVTRQR?CÅ»7Úh@p\wÚ³´½ÂÆÄV LH‰ÿ#hDRPONLN4Qͨ/«Ëm˜Ÿa¬È«µ¸»Àƒ  GD‰ÿ#iDOMLKIHI*eÐŽ-¿Æ›šzͦ­±³¸¢  B@‰ÿ#kCKJHGFDCB#{Ïv2¾Õ§šÉÍœ¤¨«­®D  ==‰ÿ#mBGFEDCA@?; ŒÆk%“Ì×ܧ— ¢¤ªl  8:‰ÿoBDCBA@>=;:2&šÀj%x€•˜™™›œ 36‰ÿpA??>=<:9865,!¸ƒ‹’“–—˜ ™ž./3‰ÿ#r@<<;:9764210)U¥§Ž’“•––˜œ©Z+0‰ÿr?88765421/.+*(!b“ˆ‹Ž“›ž–Z(&,‰ÿt>453210/-+*('$$‡Œ”–‰lCƒ")‰ÿv=010/.-+*('%#!iƒU-‚&‰ÿu5#$##"!  ƒ#ÿÿ–v  „' ÿÿx«Ã¾º·»¼¸¶ºÂÄÀ¾¹µ²¯ª¥Ÿ–¡g  …%ÿÿvÁúîçßDzÇÀµ¡œ‰•—•“މs‹a ‡$ÿÿv¼îäàÚF1J·ÅbNŠ,ž›œ”Š‚t‹` ˆ" ÿÿv¹æÞÚÒ>«Exzu9j­nY9‡4F[7t,†‡~oŠa‹ÿÿw²ÕÏÍÇ<¯Zd5“=$|6{0…Ž…{kˆaÿÿx®ÌÈÆÀ4[,“/—J—2H!…‹‚xg†a‡ ‚ÿÿx«ÄÀ½»pQ‘“ “_ŸmA[‰‡~tb„bˆKgTD4("€ÿx¨¼¹¶³¸¶±aU››ž”—˜”ˆ€vjV}cˆ,lc]VNC2ÿy¤¢¡ ŸŸ¡£¯²·»ÀÀ»¶±«¥“¤eˆ_XQJA/‚ÿ]u‚prtuzQNSVWUSQPNMKK'ˆ QPIA/ÿX•EG?/Žÿw•><.ÿr•7.ÿoƒ‡„.‘ÿi20.+(%"  &’ÿW46420-+)'$" éÿ‡ÿ#y{zbhµ™T¨Ž’”–˜™›Ÿ¡£¥¦¨ª¬®¯±³´±Š‰ÿ Ž ¼½½€­ã¡ŒÒÑË€ÎÏχЀÏÎÍÑ貉ÿË€ÿñŒ¹û³™Ù÷þùõñíèäßÚÖÑÌǽ¸²­¨¡©é¶‰ÿÊÿäŠÈøŸ¤ÙòõïìèäàÜØÓÏËÆÂ½¹´¯ª£¬ë·‰ÿ¦Ó‚ÿÒŠÖï®ÜïîêæãÞÚÖÒÎÉÅÀ¼·²®©¢«îº‰ÿ#¬çÿÿþþÿÿÀ“ä߆¸ÞëéäàÜØÔÐÌÇþºµ±¬§ ªð¼‰ÿ#ŽØñÿðíýÿÿ­œïȃ¿ßæâßÚÖÒÎÊÅÁ½¸³¯«¦ž¨ò½‰ÿ#e©ÛøÉÔçÿÿúœ«ó¬ŠÆÝáÜØÔÐÌÈÿ»¶²®©¤¨ô¾‰ÿ#ž{½àÙ­Öëüûíºñ”‘ËÛÚÕÒÍÉÅÁ½¹´°«¦¢š§ö¿‰ÿ#¡Ë—Ãç̳ØìöøÛˆÍêÍÖÔÐÌÇÿ»·²®©¥ ˜¥ø¿‰ÿ# Þä‘Ì踸ØìïóĈÞ×u§ÍÐÍÉÅÁ½¸´°¬§£ž–¤ù¿‰ÿ#£ÚÿÍ”Ñä¥ÁÙééìÀq±ÌÉÆÂ¾º¶²­©¥ œ”¢ú¿‰ÿ#¥Úûÿµ›ÔÞ™ËØåãä’›ô¤u·ÉÃÀ¼¹¶°«§£žš’¡ø¿‰ÿ#§Ú÷ôø ¦×Ð“ÓØàÞÖ°ò‰~¼ÅÄõ¤­©¤ œ—ñ¼‰ÿ#©Úóïðí±Ø¿”ØÖÙÚÃsÅé}’³ŽZ5 œ¬¡™”šê·‰ÿ#¬ÙïëêìÞƒ»×ªœØÓÒÚµxÛ²!$&An<1„¤›–’‹˜ã±‰ÿ#®ÚêçåãèÊÃÔ–©×Õ³epÓB>@@BBC€EGG<ÙðÚÿÃ|l39´Õ§òÙ‰˜‡¢ˆ ÿ\>@ABCDEFGGHH7Më¡âÿ¤QB ;Ö»µùÌ`Z[\\]^_`abbcdefgghijjklmnoopqrrstuvvwxxyz{{|}}~€‚ƒƒ„……††‡ˆˆ ÿ\m@ABCDEFGGHJK,eÝšéÿ”S:!Gà­Àø»b\]]^_`abccdefghhijkllmnoppqrsstuvvwxyyz{||}~~€€‚‚ƒ„„…††‡‡ˆ‰‰ ÿ\mAB˜²±°¯­¬«ª¨§R6”Û¡øò¨Z=tæ Òö«˜——–•”“’‘Œ‹Š‰ˆ‡…„ƒ‚~}|zyxvutsqpomlkjhgedca`^]\ZYXVUSR_‰‰Š ÿ\mCD—±°®­¬«ª¨§¦žK6§Å°ÿà –N<’äŸäõž—–•”“’‘ŽŒ‹Š‰‡†…„ƒ€~|{zywvusrqpnmljihfedba`^][ZYWVTSR^ŠŠ‹ ÿ\mDE•¯®­¬«ª¨§¦¥¤ºÿ¾·à𔓓’‘Ž@;¿¡Ôÿljl4=¨»˜ÝÖ„}{zyxwvutrqponmkjihfedca`_]\[ZXWVTSRQONLKJ[€– ÿ\mZ[Šv<[ÚêžãðŸ˜XTÛÿ°ÔΔ“’‘ކ9QÈ“éÿ¶…`3<¹©©àÅ„{zxwvutsrqonmlkjhgfecba`^]\ZYXVUTRQPNMLKI\––— ÿYm[\‹š^;aðãžêß›—DSæø¡ÛÉ“‘ŽŒ‹z3dÖ“ñÿªƒP2OÆ—¸ß°{yxwutsrqponlkjigfedca`_^\[ZXWVUSRQONLKJI[€— ÿ\m\]Š™™S;uðפöÑ•=qòøšé­ŽŒ‹‹Šl-}Ì¡øÿž|A2gÏ‹ÂÞ›xwvutsqponmlkihgfdcba`^]\[YXVUTSQPOMLKIH[——˜ ÿ\m^_Š™™’L;•ýêöÇ•6ÿéšø§ŽŒ‹‹Š‰ˆY,‘··ÿò™v61{ÍŠÍÝ‘vutsrqpnmlkjhgfedba`_]\[ZXWVUSRQONMKJIGZ—˜˜ ÿm_`‹€˜R‹@;¦ü½½ü±“m0’ÿÛ¡ë Œ‹‹Š‰ˆ‡†G9´¡Ìÿß‹p10“¼•×шtsrqponmkjihgedcba_^]\ZYXVUTSQPOMLKIHGZ€˜ ÿm`aŠ€—U–…:E¹öª¼û¬‘`/°ÿÔ°ò“‹ŠŠ‰ˆ‡†…<8É“Ûÿß‚_0:¢¥ŸÛÅ}rqponmlkjhgfedba`_]\[ZXWVUSRQONMKJIHFZ˜˜™ ÿ\mabŠ—––••s9MØõÖîŸS;ºÿ··ß’‰‰ˆ‡†……„s0NÒ“éÿÅ~K/L½™¨Úµtqonmlkjigfedcb`_^]\ZYXVUTSQPONLKIHGFY˜™™ ÿmbc‰–••€”O`9YâèœÛ@QÛÿ°ÔÍŠˆ‡†…„„ƒ‚f*mÉ¡øÿ­y<.[ËŒ¹Øªronmkjihgfdcba`^]\[YXWVUSRQONMKJIHFEY€™ ÿmdd‰•””€“R’T8sîÛœæÛ“‡4Qæø¡Ôlj†…„„ƒ‚€T*†·¨ÿÿ r2-hÉŒÈבnmlkjhgfedba`_^\[ZYXVUTRQPOMLKIHGFDY™˜– ÿmdeˆ€“€’R‘‹H8€úÔ›óÉŒz-nòøšéª…„ƒƒ‚€~C)›¨¾ÿò”h1-½†ÒÖlkjigfedcba_^]\[YXWVTSRQONMKJIHFEDX—–” ÿmfgˆ€’‘‘€P„=7’ù»§òËg-ˆÿéšñ¤ƒ‚€~}w85³šÔÿß„Y,,–«ÕË{jihgfdcba`^]\[ZYWVUTRQPOMLKIHGFDCW•”’ ÿmgh‡€‘€PŽ}O‡†„ ÿmnoƒ‰,ˆˆ‡‡††……„„ƒd2=²ò¯¯ð¡|=)šÿÔ¡ë”utssrqpoD-l¡øææÿá +POMLKJHGFECBA@>=O…„‚ ÿmopƒ€ˆ‡‡††€…&„„ƒ‚‚^2RÐ뢳î•v75¸ÿÌ¡ò„srrq‚¥É÷~T•°°ÿÌŽÿ* ONLKJIHFEDCA@?>=<;:K~|{ ÿmst€€ƒ€‚"€€~~}}||{l4/‰ëȒݵwV&kòñ“隈ÿÿþ€ÿô^|¾¾ÿÌÿ\JIHGFDCBA?>=<:9I|zy ÿmtu‚‚#€€~~}}||{zzya/:¬ê¯œâ¤rB%ÿéšé£öÿþþ€ÿ”b̨ÿÌÿ˜<;:97Gxvu ÿmww~€€€~+}}||{{zzyyxwwvuH-LÇᚬã†n62¸ÿÔ¡øÙåýþþÿ¿ŒÛ¨ÿÌŽÿ3!FEDCBA?>=<:987Fvts ÿmxx}~~€}||€{'zzyxxwwvvutt>,]Úß“¶Ö…g11¸ÿÔšÛæËðþþ–ò¨ÌÿÌŽÿ}@DCBA?>=<;:876Etsq ÿmyy}||€{*zzyyxxwwvvuttsrn9+jãÒŒ¿Ãwf01™ÿ顨ÛÙÊ»ø°·ÿÿÌŽÿ·4CBA@?><;:9765Drqp ÿmzz€|€{zzyy€x&wwvuuttssrqqc/+ƒáφÇÂvd/"zòÿÔ¡“°°“¾ÿÿØòŽÿò*CA@?>=;:98754Dpon ÿm{€zyy€x(wwvvuuttssrqqpoo]**“ß½ŠÌÀsg;!R¹ÿÿøââøÿÿÖæÿSA@?>=<:987654Coml ÿm{|{€y€xwwvv€uttsrrqqpponnmS*5¢Ý»ˆÉ½reO) {´Ù€ÿÙ·ñþþÿœ:?>=<;:976544Cmkj ÿm|}zxx€w€v)uuttssrrqqpponnmllkQ)H¼Ú¹‡Á¼pcbIoiZkwÓüýý€þÿ Õ.>=<;:9765€4Bkjh ÿm}~yw€v€utt€s'rrqqpoonnmmlkkjiH(G¼Ø·€¯¿{a`›ÿüö÷øúúûüýý€þŒÿ 9$><;:98754Bihf ÿm~y€u€t€s,rrqqppoonnmmlkkjiihgG(<žÕÄ„˜Á‰crÿÿõõ÷øùúûüüýýþ‰ÿ r;<:987654Agfe ÿm€wtt€s€rqq€p(oonnmllkkjjihggfeN'1ŒÒÌ‘€®ªqáÿõóõö÷øùúûûü€ýƒþ„ÿ ¹1:98765‚4Afec ÿm€wsrqq€p.oonnmmllkkjjihggffeddL&&qÅΩµÒÿùðòôõö÷øùúûûüüý…þ ÿó):9765ƒ4@dcb ÿm‚vqpp€onn€m+llkkjiihhgffeddcbaR)%R§ËÅ–w§ÿýîïñóôõö÷øùúúûûü„ýÿÿI"9765„4@ba` ÿm‚‚u€p€onn€m-llkkjjiihggffeddcbba``T/$.~¿Çº—øÿîíîðòóôõö÷øøù€úû‚üþÿ 475…4@a_^ ÿmƒƒtoo€n€mllkk€j.ihhggffeedcbbaa`_^^Y<##G‘ÃÂëÿòêëíïðñóôõõö÷÷øøùùú üýþÿÿÖ -5†4?_^\ ÿm„„tm€lkk€j4iihhggffeddcbbaa`_^^]\\[I)#"S‡Ñÿ÷æèêëíîðñòóôõõöö÷÷ùüýÿó¹s %‡4?]\[ ÿm……s€l€k€jiihhggffeeddcbbaa`__^]]\[[ZYU<€!Mÿÿâäæèêëíîïðñòóôøûþÿ ÕœV !3†4>\ZY ÿm…†rkk€jii€hgg€f*eeddcbbaa`__^]]\[[ZYXXWVN8$ äÿèàâäæèéêìíñ÷üÿ ò©p8 %,3†4>ZYX ÿm†‡rjii€h€g€f*eeddccbbaa`__^]]\\[ZYYXWVVUTSRB¦ÿïÜÞàâäèðøþÿ Ô‹C!)/5‰4=YWV ÿm‡ˆphhgff€e'ddccbbaa``__^]]\\[ZYYXXWVUUTSRQQ‡ÿúØÚåñùÿñ¦k"%,5765Š4=WVU ÿmˆˆpgf€eddcc€b aa``_^^]]\\[ZZYXXWVUUTSRRQPONÿÿñýÿÃw;(0:98765‹4=UTS ÿm‰‰oe€dcc€b aa``__^^]]\\[ZZYXXWVVUTTSRQQPONMÈ€ÿç£V "/8<;:98765Œ4=<;:987654>=<;:98765Ž4=<;:9977554;ONM ÿmŒŒk``€_€^€]5\\[[ZZYYXXWWVVUTTSRRQQPONNMLLKJIHHGFEDCCBA@?>=<;:98765‘4;NML ÿmªª„†€…„„‚ƒ‚‚€~} |{{YMLLKJIIHGFFEDCBA@??>=<;:98765’4;MKJÆÿzLKKJIHHGFEDCCBA@?>><<;:98765“4:KJIÆÿxKJIHHGFEEDCBAA@?>=<;::98765”4:JIGˆÿù¥ÿ/þþýýüûúøøöôòðíëèãâïÿÿk::EGFFEDCCBA@?>>=<;:987765•49HGFˆÿô£ÿ/þþýüûúù÷õñðíèåáÚ×ÐÇÄÞÿÿ[##=<<;:98765—49GFEˆÿô£ÿ.þþýüûúù÷õñðíèåáÚ×ÐÇÄÞÿÿZ#":DDCBBA@?>>=<;:998765˜49EDDˆÿô£ÿ-þþýüûúø÷õñïìçäàÙÖÏÆÃÝÿÿY"":CCBA@??>=<<;:987765™48DCBˆÿô‰ÿ™€Df™…ÿˆDU€ÿ1îDDªÿÿþþýüûúøöôñïìçäàÙÕÎÅÂÝÿÿY!!9BAA@?>>=<;::98765›48CBAˆÿô‰ÿD‚3îƒÿˆ€ÿ»Ìÿ€þ(ýüûúøöôñîìçäߨÕÎÅÁÝÿÿY! 7A@?>>=<<;:987765œ48BA@ˆÿô‰ÿDf»ˆDƒÿ5»»ÿÿˆÿÿþþýýüûúøöôðîëæãÞØÔÍÃÀÜÿÿX6??>=<<;:998765548A@?ˆÿô‰ÿDˆÿÿªÝƒÿ2ˆÿÿfDÿÿþþýýüúù÷õóïîêåâÞÖÓË¿ÛÿÿW5>==<;::987765Ÿ47?>>ˆÿô‰ÿDˆ€ÿ:"ˆÿÌDDÿÿDwÿÿDˆÿwD˜ýüuC•÷õóïíêåáÝÕÒËÁ¾ÛÿÿW5=<;::9887655 47>=<ˆÿô‰ÿDˆ€ÿ8ffÿ»ÿÿwDÿÿ»ÿD‡ýüC…÷ôòîìéäáÜÔÑÊÀ½ÚÿÿV3;;:9987655¢47=<<ˆÿô‰ÿDˆ€ÿ6ˆDÿ»ÿÿªÿÌîÿD‡ýüC…öôòîëèãàÛÓÐÈ¿»ÙÿÿV2:9987765¤46<;;ˆÿô‰ÿDˆ€ÿ5ˆDÿ»ÿÿÝݪ3ÿÿD‡üüC„öóñíêçâÞÚÒÎǽºØÿÿV09877655¥46;::ˆÿô‰ÿDˆ€ÿˆDÿ»€ÿ)"ªˆfÿþD‡üûC„ôòðìéæàÝ×ÐËĺ¶×ÿÿU/77655§46:99ˆÿô‰ÿDˆ€ÿUwÿ»€ÿ'UˆU™ÿþD‡üûC„ôòðëèåàÜ×ÎËùµÖÿÿU/655©46988ˆÿô‰ÿDˆ€ÿ"ˆÿ»€ÿ%ˆfDÝþþD†ûûBƒóðîêæäÞÙÕÍÈÁ·²ÕÿÿT-5«45887ˆÿô‰ÿ DˆÿÿªÝÿ»€ÿ$ÌDÿþþC†ûúBƒòïíéåâÛ×ÒÊž³¯ÓÿÿT,¬45776ˆÿô‰ÿ Dˆÿ»Uÿÿ»ÿ€U€þe2úé‚òîìèäáÚÖÑÉĽ²®ÒÿÿS,¬45€6ˆÿô‰ÿD‚3îÿÿ»ÿ#Dˆþþý˜2!‚ðíëæâߨÔÏÆÂº®ªÑÿÿS,˜4•†pbN:‹45655ˆÿô‰ÿU€Dˆî€ÿ‰ÿ#ˆºþþýë22sîëéãàÜÕÑÌ¿¶ª¦ÎÿÿS,˜4 xž›š™™}cbJICƒ455>‰ÿô“ÿfD„ÿ þþýýüû·Æ÷õòñíêèãßÛÔÐÊÁ½´©¥ÎÿÿS,’4$'1Uœ›š™™˜•’Їƒ€}yvrokVŠÿô‘ÿîUˆ„ÿ þýýüûúù÷öóñðìèæáÜØÑÌÆ½¸°¤ ËÿÿS,’4'‚ ›š™™—•“Ї„~{wtplV‹ÿô’ÿfƒÿ€þýüüúùøöõòðîêçäÞÚÕÎÊ嵬 œÉÿÿS,“4‚}™™—•’‹ˆ…‚|xuqnVŒÿô’ÿˆÌƒÿ€þ ýýüûúù÷õôñîíèåâÝØÔÌÇÁ·²©˜ÇÿÿS,“41V˜–”’‹ˆ…‚|yvsoVÿô™ÿþ üüûúøøöóóðìëæâßÙÔÐÈý²®¤—“ÄÿÿS,”48•“‘Šˆ…ƒ€}zwspVÌÿS,”41€%’ŽŒŠ‡…‚€}zwtqVÍÿS,•4 ŽŒ‹‰†„‚}zwtqVŽÿ•Ä¥ÆD,•41 ‹‰‡…ƒ|ywtqV§ÿ33CDC$¢,–4€ n†„‚€~{yvtqV¨ÿ33CCB$¢,–4$€ c‚€}zxvsqV©ÿ33CBB#¢,—4 `}{ywurpVªÿ33o†„H½4 ^{ywusqoV«ÿ33o„‚G½4 [wutrpnV¬ÿ33o‚€G½4 -gsrpnlV­ÿ33o€~F¾4qpnlkV®ÿ33o~|F¾4 mljhV¯ÿ33o|{E¾4 (ihfV°ÿ33ozyE¾4 AedV±ÿ33oxwD¾4 \aT²ÿ33ovuD½41$^R³ÿ033otsfa``^]][ZYYWWVTTSRQPONNMKKJIHHGFEEDCBBA@??>=€<;:€98776554 PH´ÿ?33orqpomljihfedcb`_^\[ZYXWUTSRQPONMKJJIGFEDCBBA@?>=<<;::98876655ƒ43Eµÿ>33oponmkjigfedba`^]\[ZYWVUTSQQPNMLKJIHGFEDCBBA@?>=<;;:998776655ƒ4*C¶ÿ833oonlkjhgedcba_^]\ZYXWVUSRQPONMLKJIHGFEDCBA@?>>=<;;:9887€655„4Hÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ–ÿ €.ÑðÚÿ´WJ&ªÕ§òÒf˜T¢U ÿ\ 9è¡âÿ‹ %λµùÀ/&'()**+,-.//01234566789::;<==>?@AABCCDEFGGHIIJKKLMNNOOPQRRSSTUU ÿ\: SÚšéÿv 2Ú­Àø©1()*+,--./012234566789:;;<=>>?@ABBCDEEFGHHIJJKLLMNNOPPQRRSTTUUV ÿ\: nŒŠˆ‡…‚}{<'ƒÛ¡øï†m>)aã Òöedccba`^^][ZYXWVUSRQPNMLKJHGFDCBA?>=;:9764321/.,+*('%$#! +VVW ÿ\:mŠˆ†…‚}{ys6&—Űÿ×wf5(äŸäõ{dcba`_^]\[ZYXVUTSRQONMLJIHGEDCB@?><;:8764320/-,+)(&%$"!+VWX ÿ\:k‡†„‚€}{yxvf*0¹°¾ÿÈl],(’Пîåucba`_^][ZYXWVUTSQPONMKJIGFEDBA@?=<:98754210.-,*)'&%#" +WXX ÿ\:j…ƒ‚€}{yxvus_%DΡÔÿªhW(2³Ã¥óÎma`_^]\[ZYXWVTSRQPNMLKJHGFECBA?>=;:9865321/.-+*)'&$#! +XXY ÿ\:hƒ~}{yxvusrpS$Uâšéÿ•gJ(Dʰ¶ò¯c`_^]\[YXWVUTSRPONMLJIHGEDCB@?><;:8764320/.,+*('%$#! *YYZ ÿ\:g€~|{yxvusrqonD$mâšøï‚f?'TÞ£Íñ™_^]\[ZYXWVTSRQPONLKJIGFEDBA@?=<;98754310/-,*)(&%#"!+YZ[ ÿ\’e~}|zywvtsrqonml9#‚Ì¡ÿïrb3'iå–Øð‹^][[YXWVUTSRPONMLKIHGFDCBA?>=;:9865321/.-+*)'&$#" +Z[[ ÿ\Þ;d|{yxwvtsrponmlke0-®··ÿ×i`*&|Ø•ãßx\[ZYXWVTSRQPONMKJIHFEDCA@?><;:8764321/.,+*('&$#! *[\\ ÿ\øÓ;czyxvutsqponmlkji_&-Ä¡Ôÿ·gX&0¤Å¡èÏgZYXWVUTSRQONMLKJHGFECBA@>=<:98754310/-,+)(&%$"! *\\] ÿ\ªù­dxwvtsrqponmlkjihhZ"BÙ“âÿ›bK&6Ʋ²íÇ^YXVVTSRQPONMKJIHGEDCB@?>=;:9765321/.-+*)'&%#" +\]] ÿ\¾¹ÿ¢vutsrqpommlkjihhggL"_Ú“ñÿ…a;%AÏŸ½ë©[WVUTSRPONMLKJHGFEDBA@?=<;98764320/.,+*('&$#! *]^^¡ÿ[¬¿ÿ˜srqponmlkkjihhggffC!vÔ¡øïw_3$ZØ“Îê†VUTSRQPONMKJIHGEDCBA?>=;:98654210.-,*)(&%$"! )^^_ ÿ¯ù¬Ùÿƒpponm–¿²tihhgg€fEe:!‹¾°ÿ×lZ+$oÙ—ØéwUTSQPONMLKJHGFEDBA@?><;:8764321/.-+*)'&$#" *^__ ÿDÓìŸßî†nmll¿ÿÿ¸j€g€fFed_-+®¨Åÿ¿aR'#‹Æ—ãÙqSRQPNNLKJIHGEDCBA?>=<:98754310/-,+)('%$#! *_`` ÿ63ÓëžëÖwlk] ÿÅâ¸j€fHeedcc^$AΚÛÿ¡[E#+Ÿ³¢çÁ`QPONMLKIHGFEDBA@?><;:9765321/.-+*)(&%$"!)``a ÿ\: TîØžøÖmj`Tïø¡éœffeedccbaU#GÚšéÿ‘Z:">À¨¬æ«SONMLKJIHFEDCBA?>=<:98764320/.,+*('&$#" )`aa ÿ\:mþÄ«ø¸kh3bÿ顸”eedccbaa`G]Íšøï{X2!MÓ›Ãå—ONMKJIHGFECBA@?><;:97653210.-,*)(&%$#! )aab ÿY:"#ƒþ¾¾þ£hZ&‚ÿâ¡èdccbaa`_^B€Å¨ÿßhS+!YÔŽÓã€MLKJIGFEDCB@?>=<:98764320/.-+*)'&$#"!)€b ÿ\:$!&)¡ø«Äþ”gP"–ÿÔ·ïxcbaa`_^]]5 °·ÿ¸ZJ# tÇŽÞâjKJIHGFDCBA@?=<;:97653210.-,+)('%$#! (bbc ÿY:&&K(2¹ø¤×ífH,®ÿ¾·×pa``_^]]\[)(´¡Ôÿ¶YC (›»˜ÝÓ[IHGFEDCA@?>=;:98764321/.-+*)'&%#"!(€c ÿ\:''XP(FÒêžãíye:BÔÿ°ÔÀc`_^]]\[ZU$?“éÿ R;(®©©à¼XGFEDCBA@>=<;:87653210.-,+)('&$#! (ccd ÿY:()Xg?(KíãžêÕqd-Bßø¡Û·b^]]\[ZYXL PÔ“ñÿŽP1;À—¸ßžKFDCBA@?>=;:98754320/.-+*)'&%#"! '€d ÿ\:)*Wff7(aíפöÅf^(^ïøšé’]\[[ZYXWWDjÌ¡øÿ}K'SÌ‹ÂÞ‚EDCA@?>=<:987643210.-,+)('&$#! 'dde ÿ\:*+Wffa3'‚ýêö¶dU#lÿéšøŠ[[ZYXWVVU8··ÿïuF gÍŠÍÝsCBA@?=<;:97654310/.-+*)'&%$"! 'dee ÿ:+,X€eR\*&•ü½½ü˜`GÿÛ¡è|ZYXWVVUTS,&¨¡ÌÿÖ`B‚¼•×ÍeA@?>=;:98764321/.-,*)('&$#! &€e ÿ:--W€dUcX&0­öª¼û‘^> ÿÔ°ïjXWVVUTSRN$%¿“ÛÿÕU8%•¥ŸÛ¿Q?>=<;987654210/.,+*)'&%#"! &eef ÿ:./W€cUbbK&9ÐõÖê{]5)®ÿ··ÖhVVUTSRQPE<Ì“éÿ³N,7¶™¨Ú©C=<;:98654321/.-+*)('%$#! %eff ÿ:/0Vcbb€aO?%CÜèœÛêjW)?Ôÿ°Ô¾ZUTSRQPON=[Ç¡øÿ”F#FÇŒ¹Ø™C;:987643210.-,+*('&%#"! &€f ÿ:01Vbaa€`R_7$_êÛœæÒiU!?ßø¡ÔµXSRQPONNM2s·¨ÿÿ‚ARÉŒÈ×v:987654210/.-+*)(&%$#! %fec ÿ:12U€`U__^^Z/$kúÔ›óº\M\ïøšéRQPONNMLK(‰¨¾ÿïp:l½†ÒÖ^97654321/.-,+)('&$#"!$dca ÿ:23U€_^^€]PU'#ù»§ò±[@uÿéšñ†PONNMLKJF!$§šÔÿÕX1‡«ÕÈU7643210/-,+*)'&%$"! $ba_ ÿ:34T€^U]]\\[[P&-ªø´´÷ŒU4ÿÛ¡èvNMMLKJIH>;Á“éÿÆF)!¥› Ô²I43210/.-+*)('%$#" "`_] ÿ:45T€]U\\[[ZZYD",´ò§¹öƒS-&­ÿÔ¨ïcLLKJIHGF6AÇ“øÿ¤=%4¬´Ó:320/.-,+)6.&$#"! !^][ ÿ:66S\\€[SZZYYXX<"@Íñ™ÑætN%%¸ÿ··Õ_KJIHGFED,X¹¡ÿÿ€;L¼„½Ò‡21/.-3Ni‹™Y%$#!  \[Y ÿ:78R[[ZZ€Y3XXWWV5!Qçä™ÖåbI<Ôÿ°Ì½PIHGFEDCB#~°·ÿïk7`½ƒÆÐh0C]~‚™|$#"  ZYW ÿ:88RZ€YXXWW€V,UQ* \æÖ˜âÌ`ACïø¡Ô³NGFEDCBA>›¡ÌÿÕR2y²»¨™£±¼™™*"!  XWU ÿ:9:QY€X/WWVVUUTTSP# |ôИì¬R9[ïñ“é‹FEDCBA@@7!§“âÿ£7,-T›™ œ§·ÅÌÍÏ£™H VTS ÿ::;Q€W€V*UUTTSSRRH"óµ£ëžK+sÿéšé‚DCBA@??>07µ“éÿ‹“™# ª·ÃÅÆÈÉÊ̯™a TRQ ÿ:;>=;%T¿¡øß–𣫴º½¾ÀÂÄÅÆÇɽ™‡ RPO ÿ:<=OUU€TSSSRRQQPPOON9=È뢳îtD $¬ÿÌ¡ï\@?>=I^v”L2|°°ÿ¯°²´¶¸º¼¾¿ÁÂÃÄÅÆœ™  PNM ÿ:=>OTT€S RRQQPPOONNML/<Òé”ËÞk=#Äÿ··ÕW>=ˆ™.’@=·“âï°±´¶·¹»½¾¿ÀÁÂæ™F NMK ÿ:>?NS€RQQPPOO€NMLLKK%WßÜ”ÉÎW;:Óÿ¨Å¼D<ˆ™.š‰4TǨÿ¯­¯±³µ·¸º»¼½¾¿À¯™k LKI ÿ:?@NRQQ€POONNMMLLKKJIF!míΓÚÄV1Lïø¡Ô²Cj‚™-›h4š“é®°²´µ·¸¹º»¼½¸™™  JIG ÿ:@AM€POO€N MMLLKKJIIHH?vëÈ’Ý£F0Xïñ“é}K™™˜€™,”:a¾¾ÿŸª¬®°±³´µ¶·¸¹ºº™4 HGE ÿ:ABLOO€N$MMLLKKJJIIHHGFF8%Ÿê¯œâŽ?$}ÿéšéˆ“™˜˜€™+ZCƨÿ¯§©«­®°±²³´µ¶··¦™Y FEC ÿ:BCKNNMM€LQKKJJIIHHGFFEED3%³è¨œå}=#ˆÿÔšø˜•™˜˜™™s<·¨ÿ®¥§¨ª«­®¯°±²³³´¬™‡  DCA ÿ:CDKM€LKKJJ€IHGGFFEEDCCB)8Àᚬãd; «ÿÔ¡øÀ‘€˜,™ssÛ¨ÿ®¢¤¥§¨ª«¬­®¯°°±±™™  BA@ ÿ:DEJ€KJJ€I5HHGGFFEEDCCBBA@#H×ß“¶Óa7«ÿÔšÛÚ””˜˜tï¨Ìÿ­Ÿ¡£¤¥§¨©ª«¬€­® ™G @?> ÿ:EFIJJ€IHHGG€FLEDDCCBBA@@?=UãÒŒ¿ºL5ˆÿ顨ÛÏ«¨ø°·ÿÿ•ž ¡£¤¥¦§¨©©ªª«£™l  ?>< ÿ:FGII€H€G7FFEEDDCCBBA@@??>=6páφǹJ3fïÿÔ¡“°°“¾ÿÿÄ•šœž ¡¢£¤¥¥¦€§¥™‘  =<: ÿ:GHH€G€FEEDD€C$BBA@@??>==<;2€ß½ŠÌ·I3>ªÿÿøââøÿÿÉ–€™ š›žŸ ¡¢¢£¤š™+ ;:8 ÿ:HIGFF€E€D"CCBBAA@@??>==<;;:9, •Ý»ˆÉ´G1&^£Ï€ÿÏ–”˜‚™š›œžŸŸ  €¡œ™Y 987 ÿ:IJGE€D€CBB€A$@@??>==<;;::988*4µÚ¹‡Á²E/."@?:LRa‚——€˜ƒ™š›œœ€žœ™~ €765 ÿ:JKF€C€B€A(@@??>>==<;;::988766%2³Ø·€¯¹W-,T™—“”••–——˜…™€š€› ™™ 643 ÿ:KLE€BAA€@??€>&==<;;::988776544#&‘ÕÄ„˜¾m28™™’’“”•––——‚˜Š™ =  432 ÿ:LMDAA€@??€>)==<<;;::988776554332&{ÒÌ‘€®L„™“‘’“””•––€—ƒ˜†™ k‚ 210 ÿ:MND?€>.==<<;;::9988776554332110$^ÂΩµ‘™•‘‘’“””•––—ˆ˜ ™‘ƒ 1/. ÿ:NNB€>€=<<;;€:+9988776554332210//.&>ËÅ–wŽ™—Ž‘’’“””••––ƒ—ƒ˜™™ „ /., ÿ:OOB==<<€;€:,99887766544332210//.--,&l»Çº——™ŽŽ‘’’“””€•–„—˜™O… -,* ÿ:OPA€;€:€988€7)665443322100/..-,++*'2‚ÃÂ¥™‹ŒŽ‘‘’““€”•€–—˜€™}† +*) ÿ:PQ@::€9€8€7.6655443321100/..-,,+**)(' =w ™“ˆ‰‹ŒŽ‘‘’’€“”•—˜™‘k;‡ *(' ÿ:QR@9877€6255443322110//..--,+**)(''&%# -™™†‡‰Š‹ŒŽŽ‘’•–‚™~X)‡ ('& ÿ:RS?7€6554433€2)110//..--,+**))('&&%$## ˆ™Š„†‡ˆ‰Š‹Œ”—™‘a<€ˆ &%$ ÿ:ST>€655€433€2)1100//..-,,++*))(''&%$$#"! ^™Ž‚ƒ„†‡Š”˜™~O €€‰ %$# ÿ:TU=4€3€2(1100//..--,,+**))(''&%$$#"!! C™–€‡•™a< ‚€Š #"! ÿ:UU<€3€2€100//€.--,++**))(''&%%$##"! ™™—™tE …‹ "  ÿ:UV;22€1€0//€.--,,++**))(''&%%$##"!! q€™ˆa1 € Œ  ÿ:VW;100/..€-',,++**))((''&%%$##"!! QyP.€   ÿ:WX9//.€-,,++€*%))(''&&%%$##"!!  € Ž ÿ:XX9.-,,€+€*5))((''&&%$$##"!!    ÿ:YY8€,€+€*€)4((''&&%%$$##"!!  ‘ ÿC:rsZQRRSRQQPONMMLKKJIHHGFEECCBA@??=<;;" ’†ÿ‰˜P™šœž ¢¥§©«®¯³¶¸¼¾ÁÄÇÉÌÊÉÇÅÃÂÀ¾½»¹¸¶´³±¯®¬ª©§¥¤¢ Ÿ›™9 “†ÿ˜ˆ™Oš›Ÿ¡£¥§ª¬®±´¶¹»¾ÁÃÆÉÌËÉÇÅÄÂÀ¿½»º¸¶µ³±°®¬«©§¥¤¢¡Ÿ›š8 ”†ÿ˜™ŸÈÇÅÅÃÁÀ¿½¼»ºº€¹€¸,·¸·¶··¶··¶·¶¶³°°¯®­¬«ª©¨§¥¤¢ Ÿ›™–“‘Šˆ‘œš3€ •†ÿ#˜™¦öôñðìéèäàßÜØ×ÓÐÎÊÈÅÁ¿¼¸·³¯®ª¦¥¡ œƒ™.˜˜——–•”’Šˆ…€~zsq…œš.  —†ÿ#˜™¦õóðïìéèäàßÛØÖÓÐÍÉÈÅÁ¿»¸·³¯®ª¦¥¡ œƒ™-˜˜——–•”’‰ˆ…~ysq…œ›.  ˜†ÿ#˜™¥òðííêçæâßÞÚ×ÕÑÏÍÉÆÄÀ¾»·¶³¯®©¥¤¡Ÿœ‚™€˜*——–•“’ŽŒ‰‡„~ysq…›- ™†ÿ(˜™¥íìêêçäãàÝÜØÖ776Pwÿ½º¶µ²®\-7¤ Ÿ‘))f™™€˜(—–•”“’ŽŒ‰‡„}xrp…›-  › †ÿ˜™¥ìëééæããàÜÛØÕ8‚'²½º¶´²®\¤ žrz™™€˜'—–•”“’ŽŒ‰‡„}xro…œ- œ †ÿ%˜™¤èçæåãààÝÚÙÖÓ8R”j 2¼¹µ´°¬}xŸžR€™)˜˜——–•”“‘ŽŒˆ†ƒ~|wqo…žœ,  †ÿ%˜™¤åäâáàÞÝÚØ×ÔÑ7lÈÄ‚¢·´³¯««Vž=)€™'˜˜——–•”’‘Ž‹ˆ†ƒ}|vpn…žœ+ Ÿ †ÿO˜™¤ãâáàßÝÜÙÖÖÓÐ7kÇÄÁc·/.«ª,Kž)R™G)[˜—F(Y”’‘Ž‹‡…‚}{vpm…ž+   †ÿB˜™£ßÞÝÜÛÙØÖÔÓÐÎ6jÅÁÀLJµƒ©©M+œ›p™)Q˜—(O“’ŒŠ‡…|zuom„Ÿ+€¢ †ÿK˜™£ÜÜÚÚÙ×ÖÔÒÑÎÌ6jÃÀ¾d1³‚¨¨mœ|™)Q˜—(O“‘ŒŠ†„{ztnk„Ÿ*¤†ÿJ˜™£ÚÙØØÖÔÔÒÐÏÌÊ6i¾½c1³€§§†g™™)Q——(O“‘‹‰…ƒ€{xsmkƒŸž)¥†ÿB˜™¢ÖÕÔÔÒÑÐÎÌËÉÇ5g¿¼ºb0±¥¤¡fR=™™)Q—–(O’ŒŠˆ…‚~yvrkh‚ ž)€§†ÿF˜™¢ÔÓÓÒÑÏÎÍËÊÈÆ4f¾»º=T¯~¥¤ 4R3\™™)Q—–(N’Ž‹Šˆ„‚~yvqjhƒ ž)©†ÿ˜™¢Ð€Ï9ÍÌÌÊÈÇÅÃ4e¼¹·^®}£¢ŸS=)…™˜)Q––(N‘Ž‹‰‡ƒ€|wtphe ž(«†ÿB˜™¡ÌËËÊÉÈÈÆÄÄ¿3c¹¶x—«{¡ œz) ™™˜)Q–•'NŽŠˆ…{usmfc€ Ÿ(­†ÿ˜™¡ËÊÉÉÈÇÇÅÃÃÁ¾3c¸… :­ªz Ÿœ™€3™˜˜=–‹ NŽŒ‰‡…~{urmeb€¡Ÿ(¯€†ÿ˜™¡ÇÆÅÅÄÃÃÁ¿¿½»2‚+#¡ª¨yžš™)R™˜˜[MŒˆ†„|ysokc`¡Ÿ(›fU?/‹†ÿ˜™ ÃÂÂÁÀÀ¿¾¼»º¸=€/]¡©¨¥X››™™Rp€˜EMŽŒŠ†„}{wqnh`^~¡ (› FnljhgfKJ0.ƒ ‡ÿ˜™ ÁÁÀÀ¿¾¾¼»º¸·¶´²±®­«¨§¥A*šš‚™€˜——–mv”’‘‹Š†ƒ|zvpmg_]}¢ (›"kihgfeb_\ZWSPMJFB?;7&ˆÿ˜™ ½½¼¼»ºº¸·¶µ³²°¯­«ª¨¥™6S„™€˜—––•”“‘ŒŠˆ…‚zwsmjd\Z|¢ (›igffdb`]ZWTQNKGD@=9&‰ÿ˜™Ÿ€º¹¸··¶µ´²±°®­«¨§¥£¢>…™˜˜——–•”“’‘Ž‹‰‡ƒ}yvqkhbZW{¢¡(œTffdb_]ZXUROKHEB>;&Šÿ˜™Ÿ¸€·¶µµ³²²°®®«ª©§¥¤¡ T|šƒ™€˜——–••”’‘ŽŠˆ†‚|wtoif_WTy£¡(œ:eca_\ZXUROLIFB?<&‹ÿ˜™Ÿ´€³²±±¯¯®¬«ª¨§¦¤¢ ž›„™€˜——––””“‘‘Œ‹‰…„€|ztqlfb\TQx£¡(œ%b`^\ZWUROLJFC@=&Œÿ˜™/šœžŸ¡¤¦¨«­¯²´·º¼¿ÂÄÇÊÌÊÈÇÅÃÁÀ¾¼»¹·¶´²±¯­¬ª¨§¥£¢(œ^][YVTROLJGDA=&ÿ˜™/š›Ÿ¡£¦¨ª¬¯±´·¹¼¾ÁÄÇÉÌÊÉÇÅÃÂÀ¾½»¹¸¶´³±¯®¬ª©§¥¤¢( [YXVSQNLIGDA>&Žÿ™ ‘“•—š™—–””’‘ŽŒ‹‰ˆ‡……ƒ‚~|{z XVTRPNKIFDA>&§ÿ33€+ À ESPOMJHFCA>&¨ÿ33++) À <&«ÿ33;POÀ4DB@>=:&¬ÿ33;NMÀ:@>=;9&­ÿ33;LKÀ=<;97&®ÿ33;JI¿ :875&¯ÿ33;HG¿643&°ÿ33;GE¿ 20&±ÿ33;EC¾,.$²ÿ33;CA¾+"³ÿ033;A?3.-,+))(&&%$#"!  €€‚#´ÿ?33;?><;:8764321/.-+*)''%$#"  ƒµÿ>33;=<;98754210/.,+*('&%$#!  ƒ¶ÿ833;;:97653210.-,*)('&%#"!  €„!ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ–ÿ‰‰‹’’€”7WãðÚÿÚ¶¢LRÇÕ§ò澘è¢é ÿ\‰‹ŒŽ’“”•––r2jð¡âÿÈ¡ƒ@\ỵùÝ®­®¯±±²´µ¶·¸¹º»¼¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÙÚÛÜÝÞßààáâãäåææçèéé ÿ\Ç‹ŒŽ’“”•–˜™Z3âšéÿÀ¤sAgé­ÀøÔ°°±²³´µ¶·¹¹»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÚÛÜÝÞßàááâãäåææçèéêë ÿÇã‡ÿN~T®Û¡ø÷æÿ“c•ê ÒöÚþýüûùø÷õôóñðïíìêéçæäâáßÞÜÛÙ×ÖÔÒÑÏÍÌÊÈÆÅÃÁ¿¾¼º¹·µ³±°®¬ª¨¦¥£³êëì ÿÇä‡ÿNôtT¿Å°ÿïïõ€c¯äŸäõÚüûúù÷öõóòñïîíëêèçåäâàßÝÛÚØ×ÕÔÒÐÎÍËÉÈÆÄÂÁ¿½¼º¸¶´³±¯­¬ª¨¦¤¢³ëìí ÿÇ‘’äˆÿMß^aÕ°¾ÿæ÷âlc¼ÐŸîìáûùø÷öôóñðïíìëéèæäãáàÞÝÛÚØÖÔÓÑÐÎÌËÉÇÅÄÂÀ¿½»¹¸¶´²°¯­«©§¦¤¢³ìíí ÿÇ“”ä‰ÿLÔTuà¡ÔÿÞÿØcmÐÃ¥óäèù÷öõôòñïîíëêèçåäâáßÞÜÛÙ×ÖÔÓÑÏÍÌÊÈÇÅÃÁÀ¾¼»¹·µ³²°®¬ª©§¥£¡³íîî ÿÇ”–åŠÿK¿T‡éšéÿÞÿºc~ݰ¶òÜð÷öôóòðïíìëéèæåãâàßÝÛÚØ×ÕÔÒÐÏÍËÉÈÆÄÃÁ¿¾¼º¸·µ³±¯®¬ª¨§¥£¡³îïï ÿÇ–—å‹ÿJžTžâšø÷æÿc‹å£ÍñÔöõôòñïîíëêèçæäãáàÞÜÛÙØÖÔÓÑÐÎÌËÉÇÆÄÂÀ¿½»º¸¶´²±¯­¬©¨¦¤¢¡³ïðð ÿʘ˜æŒÿI‰T®Ì¡ÿ÷æôbžå–ØðÔôóñðïíìëéèæåãâàßÝÜÚÙ×ÕÔÒÑÏÍÌÊÈÇÅÃÂÀ¾¼»¹·¶´²°®­«©§¦¤¢ ²ðññ ÿæŒÿIôtaÌ··ÿïîóka«Ø•ãçÛòñïîíëêèçæäãáàÞÝÛÚØÖÕÓÒÐÎÍËÉÈÆÄÃÁ¿¾¼º¹·µ³±°®¬ª¨§¥£¡ ³ñòò ÿøé©æÿHê^aÞ¡ÔÿæôÞakÄÅ¡èßáðïíìëéèæåäâàßÝÜÛÙ×ÖÔÓÑÏÎÌÊÉÇÅÄÂÀ¿½»º¸¶´³±¯­¬ª¨¦¥£¡Ÿ²òóó ÿªùØâŽÿGßTuè“âÿÝú¿`sÙ²²íÞàîíëêèçæäãáàÞÝÛÚØ×ÕÔÒÐÏÍËÊÈÆÅÃÁÀ¾¼»¹·¶´²°¯­«©§¦¤¢ Ÿ²óóô ÿ¾¹ÿÚÿF¿Tâ“ñÿÜø˜`zߟ½ë׿ìëéèæåãâàßÝÜÛÙ×ÖÔÓÑÐÎÌËÉÇÆÄÂÁ¿½¼º¸·µ³±°®¬ª©§¥£¡ ž²ôôõ¡ÿ¬¿ÿÞÿE¨S¦Ô¡ø÷âö…_à“ÎêÏëêèçåäãáàÞÝÛÚØ×ÕÔÒÐÏÍÌÊÈÇÅÃÂÀ¾½»¹¸¶´²±¯­¬ª¨¦¥£¡Ÿ±ôõö ÿÊù¬ÙÿÞ‚ÿ€Þï„ÿFþþ“S¶¾°ÿîèêp^¡Ù—ØéÎéèæäãâàßÝÜÛÙ×ÖÔÓÑÐÎÌËÉÈÆÄÃÁ¿¾¼º¹·µ³²°®­«©§¦¤¢ Ÿ²õöö ÿfåìŸßöæÿÞÿÿÞ÷‚ÿGþþýñr_̨ÅÿæìÖf]´Æ—ãáÔçåäâáàÞÝÛÚØ×ÕÔÒÑÏÍÌÊÉÇÅÄÂÀ¿½»º¸¶´³±¯®¬ª¨§¥£¡ žœ±ö÷÷ ÿHgåëžëîïÿÿ߯ÿÅâæ÷€ÿHþþýüûï\tàšÛÿÜñ¸]f¿³¢çÙÙäãáàßÝÜÚÙ×ÖÔÓÑÐÎÍËÉÈÆÅÃÁÀ¾¼»¹·¶´²°¯­¬ª¨¦¤¢¡Ÿ›±÷øø ÿ\Ç@†öØžøîïÿê‡÷ø¡éÞÿÿþýýüûúùÙ[}âšéÿÚïœ\wÓ¨¬æÑÝâàßÞÜÛÚØÖÕÔÒÐÏÍÌÊÉÇÅÄÂÁ¿½¼º¸·µ³±°®­«©§¦¤¢ Ÿ›±øøù ÿ\ÇTB¡þÄ«øæ÷ÿ~–ÿ顸Þþýüüûúùø÷¸QŽÔšø÷Ýíˆ[„Ú›ÃåÊáàÞÝÛÚÙ×ÖÔÓÑÐÎÍËÉÈÆÅÃÁÀ¾½»¹¸¶´²±¯­¬ª¨§¥£¡ žœš±ùùú ÿ\Ç¢U[²þ¾¾þÝÿß^®ÿâ¡ðæüüûúùø÷öõ¬P­Å¨ÿïáâuZÔŽÓãÈßÝÜÛÙØÖÕÓÒÐÏÍÌÊÉÇÅÄÂÁ¿½¼º¹·µ³²°®­«©¨¦¤¢¡Ÿ›š°ùúú ÿ\Ç«˜ccÈø«ÄþÝÿÉT¿ÿÔ·÷åûúùø÷öõôóŒOư·ÿÝäÎbY£ÇŽÞâÇÜÛÚØ×ÕÔÒÑÏÎÌËÉÈÆÅÃÁÀ¾½»¹¸¶´³±¯®¬ª¨§¥£¢ žœ›™°úúû ÿ\Ǭ­ÇcnÖø¤×õæÿ´aÌÿ¾·ïëùø÷öõôóòñm\ΡÔÿãâºYd»»˜ÝÛÊÚÙ×ÖÔÓÒÐÏÍËÊÈÇÅÄÂÁ¿½¼º¹·µ³²°¯­«©¨¦¤¢¡Ÿœš˜¯ûûü ÿ\Ç®¯ëÄcåêžãõæþ“tæÿ°Ôæð÷öõôóòñðåbqÒ“éÿÚå¦XbÈ©©àÓÎØÖÕÔÒÑÏÎÌËÉÇÆÄÃÁÀ¾½»¹¸¶´³±¯®¬ª©§¥£¢ ž›™—¯ûüü ÿ\ǯ°ëÿc‡õãžêííürtïø¡ÛåïõôóòñðïíÎWƒÛ“ñÿ×ã‹WrÏ—¸ßÌÑÕÔÓÑÐÎÍËÊÈÇÅÃÂÀ¿½¼º¹·µ³²°¯­«©¨¦¥£¡Ÿœš™—¯üüý ÿ\DZ²ìÿÿŠc—õפöäóïg÷øšéÛóóññïïíìë¸M›Ì¡øÿÔ×pV‡Ô‹ÂÞÃÔÓÒÐÏÍÌÊÉÇÆÄÃÁ¿¾¼»¹¸¶´³±¯®¬ª©§¥¤¢ Ÿ›™—–®üýý ÿ\Dz³ìÿÿôb±ýêöäñÙ[ÿéšøÚñðïîíìëêéšL¬··ÿ÷ÖÍ^U™ÍŠÍÝÂÒÑÏÎÌËÉÈÆÅÃÂÀ¿½»º¸·µ³²°¯­«ª¨¦¥£¡ žœš™—•®ýýþ ÿYÇ´µìþþýékb¿ü½½üÚ÷¸Q­ÿÛ¡ðßïîíìëêéèç|XÆ¡ÌÿíÖÃUT¬¼•×ÕÄÐÎÍËÊÈÇÅÄÂÁ¿¾¼»¹·¶´²±¯®¬ª©§¦¤¢ Ÿ›š˜–”­€þ ÿǵ¶ëý€üSÞalÌöª¼ûÚõ¢PÆÿÔ°÷ÜíìëêéèçæÚgWדÛÿíÓ§T^¶¥ŸÛÎÆÍÌÊÉÇÆÄÃÁÀ¾½»º¸·µ³²°®­«©¨¦¥£¡ žœš™—•”­þþ¡ÿZÇ·¸ëüûûúú¿auãõÖòßóŒ\Ìÿ··îáëêéèçåäãÆSnÚ“éÿáÔ„SnÈ™¨ÚÇÈËÉÈÆÅÃÂÀ¿½¼º¹·¶´²±¯®¬ª©§¥¤¢ Ÿ›š˜–”“¬þ¢ÿ\Ǹ¹ëûúúùùø¢`}ëèœÛòÝçmræÿ°Ôåäéèçåäãâá±I‹Í¡øÿÕÖjR}ÏŒ¹ØÅÆÈÇÅÄÂÁ¿¾¼»¹¸¶´³±°®­«©¨¦¥£¡ žœš™—•”’¬ÿÿþ ÿ\Ǻ»êùùøø÷÷öŽ_”òÛœæéãåXqïø¡Ôãâæåäãâáàß’H¢·¨ÿÿÑÌYQˆÉŒÈ×¼ÇÆÄÃÁÀ¾½»º¸·µ³²°¯­¬ª¨§¥£¢ Ÿ›š˜–•“‘«ÿþü ÿ\Ç»¼éø÷÷ööõõêz^ úÔ›óàçÏNŒ÷øšé×åäãâáàßÝÜvH³¨¾ÿ÷йXP›½†ÒÖ¹ÅÃÂÀ¿½¼º¹·¶´³±°®¬«©¨¦¤£¡Ÿžœš™—•”’«ýûù ÿǼ¾é€öUõõôóóßf^®ù»§òßå°M¤ÿéšñÕãâààÞÝÜÛÑcVÅšÔÿìÍŸPO­«ÕϺÂÁ¿¾¼»¹¸¶µ³²°¯­¬ª¨§¥£¢ Ÿ›š˜–”“‘©úøö ÿ\Ǿ¿èõõôôóóòññÕehÊø´´÷ÔéL¬ÿÛ¡ð×àßÞÝÜÛÚÙ¼OkÑ“éÿäˆOY¿› ÔÈ»¿¾½»º¸·µ´²±¯®¬ª©§¦¤¢¡Ÿœš™—•”’¨÷õô ÿ\Ç¿Àçôóóòòññðïï·\gÑò§¹öÓç|XÌÿÔ¨÷ÓÞÝÜÛÚÙ×Ö¨FvÍ“øÿ×Ë|Nj½´Ó»»½¼º¹·¶´³±š£­«©¨¦¥£¡ žœ›™—–”’‘§õóñ ÿ\ÇÁÂçòòññððïïîíí¤[yàñ™Ñí×ÛhXÔÿ··íÖÜÛÚØ×ÖÕÔŒEˆ¿¡ÿÿÍÈlM~Ľҹ¼º¹¸¶©{Ma¬ª¨§¥£¢ Ÿœš˜—•“’Ž¥óñï ÿ>ÇÂÃæñððïïîîííìëëZˆîä™ÖìÓÏSnåÿ°Ìã×ÙØ×ÖÕÔÓÑpDª°·ÿ÷ʾbL‘½ƒÆÐ´¹•g-‚*ª©§¦¤£¡Ÿžœ›™—–”’‘Œ¤ðîì ÿÇÄÄå€ï4îííììëëêéßtZíÖ˜âã׺Ix÷ø¡ÔáÔ×ÖÕÔÒÑÐÆ^C¿¡ÌÿìÅ­RK£²ƒ‹KDHNRW\`cgjmnq4Ÿœš™—•”’‘ŒŠˆ‡ãáß ÿ)ÇÊÌáèèçææååääãââáààßÞˆUsáé”ËæÌºNUÝÿ··ìËÌË%.È“â÷j8=CGLQTY\`begi!Žœ›™—–”“‘ŽŒ‹‰‡†œàßÝ ÿ)ÇÌÍáææååääããâááààßÞÝÝÜnU‹çÜ”ÉÞ̹Ekåÿ¨ÅáÈÉ%. Oͨÿ·27qËÿÿøââøÿÿÚ:€# *9@Œ‹‰ˆ†„ƒ€~}|ÈÆÄ ÿÇÙÚ×Ö€Õ&ÔÔÓÓÒÒÑÑÐÏÏÎÍÌÌËÊÉÈÈÇÆ—LWµÝ»ˆÉ˸»“L=i»æ€ÿæ—ƒ! ;=}‹‰ˆ†…ƒ‚€}||ÆÄ ÿÇÚÛ×€Ô'ÓÓÒÒÑÑÐÏÏÎÎÍÌËËÊÉÈÈÇÆÅÄÕKiÈÚ¹‡ÁÉ·¹¸‰€P€… =>e‰ˆ‡…„‚€}€|ŽÃÁÀ ÿÇÛÜÖÓÒÒ€Ñ&ÐÏÏÎÎÍÍÌËËÊÉÈÈÇÆÅÄÄÃÂÁ…JhÆØ·€¯È´¶µp€‡€ 6@Oˆ‡…„‚~|ŽÁ¿½ ÿ1ÇÜÝÔÑÑÐÐÏÏÎÎÍÍÌËËÊÊÉÈÇÇÆÅÄÄÃÂÁÀ¿¾„I_±ÕÄ„˜Æ²±œ€‚ (ACƒ†„ƒ€~}|¿½¼ ÿÇÞÞÔÏÏ€Î'ÍÍÌÌËÊÊÉÉÈÇÇÆÅÄÄÃÂÁÀÀ¿¾½¼HT¤ÒÌ‘€®»ª €€ƒŠ CDn„ƒ€}‚|½»¹ ÿÇßàÓ€Í+ÌÌËËÊÊÉÉÈÈÇÆÆÅÄÃÃÂÁÀÀ¿¾½¼»ººŽGGÊΩµM€€…†DE^ƒ‚€}ƒ|Œº¹· ÿÇàáÑÌ€Ë,ÊÊÉÉÈÈÇÆÆÅÅÄÃÃÂÁÀÀ¿¾½¼¼»º¹¸·šMFr¶ËÅ–wg€Š7FK‚€}„|Œ¸¶µ ÿ/ÇáâÐÊÊÉÉÈÈÇÇÆÆÅÅÄÄÃÂÂÁÀ¿¿¾½¼¼»º¹¸·¶¶´ŸYEP—ÃǺ—€€€ƒ†#HIw}…|‹¶´³ ÿÇâãÐÈÈ€Ç*ÆÆÅÅÄÄÃÂÂÁÁÀ¿¿¾½¼¼»º¹¸¸·¶µ´³²ªsDDi¦ÃÂ;€‚…€ HJh~†|Š´²° ÿÇãäÏ€ÆÅÅ€Ä,ÃÂÂÁÁÀÀ¿¾¾½¼»»º¹¸¸·¶µ´³²±°¯®PCBužf€ƒ‚,IJX‡|б°® ÿÇäåÍÅ€Ä0ÃÃÂÂÁÁÀÀ¿¿¾½½¼»»º¹¸¸·¶µ´³²²±°¯®­¬¤vBAAK €€‚ 1DEHJKMy†|‰¯®­ ÿÇææÌÃÀÁ2ÀÀ¿¿¾½½¼¼»ºº¹¸¸·¶µ´³²²±°¯®­¬«ª©¨šmF@  $4>@BDFHJXhy†|‰­¬ª ÿÇçèÌ€Á2ÀÀ¿¿¾¾½½¼¼»»º¹¹¸··¶µ´³³²±°¯®®­¬ªª©¨§¦¥£ƒ+ ‚ )57:<>ABK`m}‰|ˆ«ª¨ ÿÇèéÊ€¿€¾,½½¼¼»»º¹¹¸¸·¶¶µ´³²²±°¯®®­¬«ª©¨§¦¥¤£¢¡n  '-0257:µµ´´³³²²±±°°¯®®­¬¬«ª©¨¨§¦¥¥££¢¡ Ÿžœ›š™˜—–•”’pxŽŒ‹‰ˆ‡…„ƒ‚€~}|…Ÿž ÿÇîïĵ€´³³²²€±5°¯¯®®­­¬«ªª©¨¨§¦¥¥££¢¡ Ÿžœ››š™—–•”“’‘ŽŒ‹Š‰ˆ‡…„ƒ€~‘|…žœ› ÿǼ½œ‘€’;‘ŽŒ‹ŠŠˆˆ‡†…„ƒ‚€~}|{zyxw“œ›š™˜—–•”“’‘Œ‹Š‰‡†…„ƒ€}’|„œš™†ÿŠO #%(+.0310.,*)'%$"  u›š™˜—–•”“’‘ŽŒ‹‰ˆ‡†…„‚€}“|„š˜—†ÿ‰O  "%(*-0320.,+)'&$"! s™™—––•”’’‘Œ‹Š‰ˆ‡…„ƒ‚€~}”|ƒ˜—•†ÿ2vsonidc_ZXTQPLJHDC@=<9552..+'($"  € Zww•”“’‘ŽŒ‹‰ˆ‡†…„ƒ€~}•|ƒ–•”†ÿ$1êäÝÛÒÈÆ½³°§Ÿš‘‰…zune`XNJB86," „€)  7II}“’‘ŽŒ‹Š‰ˆ‡†…„ƒ€~—|ƒ”“’†ÿ$1çâÛÙÐÇż³°¦ž™‘‰„zune`WNJB86+" „€(  7HH|‘‘ŽŒ‹‰ˆ‡‡…„ƒ‚€}˜|‚“‘†ÿ#0ÞÚÔÒËÃÁ¸°­¤›—އ‚yrmc^VMH@74* …€'  6GG{ŽŒ‹Š‰ˆ‡†…„ƒ€~}™|‚‘†ÿ#/ÓÐÌÊĽ»³ª¨ —Y%#"/Cj`[TJF>5 …€% 5GGyŽŒ‹Š‰ˆ‡†…„ƒ‚€}›|ކÿ/ÐÍÉÈ»¹±©§ž–'‚YZSJE>4…€$ 5FEwŒŒ‹‰‰ˆ‡†…„ƒ€~}œ|ŽŒ†ÿ#.ÇÄÀ¿º´²ª£¡™’&3Y<WQGC;1" …€# 4DDw‹Š‰ˆ‡†…„ƒ‚€~}|Œ‹Š†ÿ#-¾»·¶²¬ª¤ž›“%BvmEIMDA8.,  „€  3DDu‰ˆ‡†…„ƒ‚€~}Ÿ|€‹Šˆ†ÿ",¹·´³®©§¡š˜‘Š$@tkf ,L5-* …$ 3CCs‡‡…„„ƒ€}} |€‰ˆ‡†ÿ"+°®ª©¦¡Ÿ™”‘Š„"=ofa$ G.*( …" 3BBr……„ƒ‚€~}¢|ˆ‡††ÿ"*¨¦¤£ ›™”Ž‹…!;kb^.C,'%„! 2BAq„ƒ‚€~}¤|††…†ÿ"*¢¡ž™•”‰‡€{ 9g_Z-B)$"„  1A@o‚€}}¥|…„ƒ†ÿ!)˜–””Œ‹†yt5`YT*<% … 1@@m€€~}§|~„ƒ‚†ÿ!(”’Œˆ‡‚}{up4]VR9%„€ 1?>l~}©|~ƒ‚†ÿ'Љ‡‡ƒ€zvtni1WPK 4 † />>k}«|~€†ÿ&€}}zwvqmlfa,PI.-/ † /==i¬|}€†ÿ&}{zywtsnkid_+N43-‡ /==i¬|}~~†ÿ%srppmjiea`[V‚ -,& Œ /==i˜|ï߯¶„‹|}~~}†ÿ$igfec`_]XVRN€ ,(& † /==i˜|΃ÿÝÛ¹·™˜ƒ|}~‰‡ÿ#edcc`]\YUTOKHC?<62-&# †€  /==i’|>6>U]t¥‚ÿýúöóïëçãßÚÖÑÍÈäˆÿ"[ZYXVSSPLJFB@:64.)&‡  /==i’|]‚ÿýú÷óðìèäàÜØÓÏÊŤ‰ÿ!SRRQOLKHED?<951-'$†€€ ! /==i“|.‚ÐÿþüúöóðíéåáÝÙÕÐÌǤŠÿ!NMKKIFFC@?:74/+(#‡€€  ! /==i“|týûøöóïíéåáÞÚÖÑÍɤ‹ÿ CCBA?=<9651-+&#  ‡€ "$ /==i”|>_ú÷õòïìéåâÞÚÖÓÎʤŒÿŽ2 !#&)+.131/.,*('%#"  /==i”|t€>õóñîëèåáÞÚ×ÓÏˤÿŽ2  #%(+.0310.,*)'%$"  /==i•|> ñïíêçäáÞÚ×ÓÏˤŽÿ•4…5#)+-/1355320/.,,*)(&%$#! 3==i•|t íêèåãàÝÚÖÓÏ̤§ÿ33rssJ¢=i–|.€ ½æãáÞÜØÕÒÏˤ¨ÿ33€rI¢=i–|U€ «áßÝÚ×ÕÑÎˤ©ÿ33rrpI¢=i—| ¨ÝÚØÕÓÐÍʤªÿ33Èæä–½| .¤ØÖÓÑÎËɤ«ÿ33Èãᕽ| M ÓÑÏÌÊǤ¬ÿ33Èáß”½| l·ÎÌÊÈŤ­ÿ33ÈÞÜ”¾|ËÉÇÅä®ÿ33ÈÛÙ“¾|&ÆÄÂÀ¤¯ÿ33ÈÙØ“¾|IÁ¿½¤°ÿ33È×Õ’¾|w¼º¤±ÿ33ÈÔÓ‘¾|­·¢²ÿ33ÈÒБ½|tD³Ÿ³ÿ333ÈÏν·¶´³±°¯®¬«ª©¨¦¥¤¢¢¡Ÿžœ›™™˜––”“’‘Ž‹ŠŠ‰ˆ‡‡…€„ƒ‚€€~}}|Mš´ÿ@33ÈÍËÉÈÆÄÃÁ¿½¼º¹·µ´²°¯®¬ª©§¦¤£¢ Ÿœš™˜—•”“‘ŽŒŠ‰ˆ‡†…„ƒ‚€~~}}‚|e‰µÿ>33ÈÊÉÇÆÄÂÀ¿½»º¸¶µ³±°®­«ª¨§¥¤¢¡ ž›š˜˜–•”’‘ŽŽŒ‹Š‰ˆ‡†…„ƒ‚€~~}ƒ|^†¶ÿ=33ÈÈÇÅÃÁÀ¾¼º¹¸¶´³±¯®­«©¨¦¥£¢¡Ÿžœ›™˜—–”“’ŽŒ‹Šˆ‡†……„ƒ‚€~~}}„|‚ÿÿÿÿÿÿÿÿÿÿÿÿÿt8mk@~~~~~~ &¯½§Ë§ƒn((“¡t¿³‹µµµµµµµµµµµµµµµµµµµµµµµµµµµÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ~ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ“ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ“ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ“ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ“ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ“ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ“ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ“ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ—ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ»ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÅÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿxÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ‹ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿËÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ—ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ4ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ“ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ“ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ“ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ“ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ“ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ“ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ“ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ“ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ“ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ“ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ“ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ“ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ“ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ“ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ“ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ“ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ“ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ“ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ“ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ“ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ“ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ“ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ“ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ“ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ“ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ“ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ“ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ“ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ“ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ“ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ“ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ“ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ“ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ“ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ“ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ“ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ“ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ“ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ“ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ“ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ“ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ“ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ“ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ“ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ“ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ“ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ“ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ“ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ“ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ“ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ“ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ“ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ“ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ“ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ“ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ“ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ“ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿýýýýýýýýýýýýûûù÷õóïíëéçåáßÝÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿýÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿýÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿýÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿýÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿýÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿýÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿýÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿýÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿýÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿýÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿýÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿýÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿýÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿýÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿýÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿýÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿýÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿýÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿýÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿýÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿýÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿýÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿýÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿýÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿýÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿýÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿýÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿdjview4/src/images/DjVu.ico000066400000000000000000000163561174072760700160600ustar00rootroot0000000000000000¨6 ¨Þh†(0`€ ÿÿÿæ¢Gj™­Ð JrT#1Â}T¹ùãÅÒR}À'6o«hOVsž“Óûˆ,<Óç÷ƨ¹l¢Ö&„go2l9Ÿå´^…¨”­v‹¼&„Áïàç3'8;Q‹BQ½¹Ò#£øk.D5{¨Ÿu™z·çŽ[ˆ]‰Ÿcp´yƒQFK>¯ùÛ±ÄÀ—£;#„ ÉÉÌÞ'’׆NvaŽÈ†ÓM¨â"Nh v~x¿;ˆ¹íóú"nž‚¤{Ya2N¨Ññ«Px޹âá×àR.?|3K»n‘Й²¤l‰°š@_%œéV{•Pd¢\f½öžø—?]´¤º4Ea©ã=r´xJh mCLŠÉöÕ¥»"u«¦my2ŽÉ–MuÕÀÍ]>D[˜Ó_-6È‹§0áêõDž×ÓÝì·¤¦ˆ¢ôïò2¥î}ÅεÃE«ë„„«M$ŽÙZ²ë¬u’/BæÐØ“[|¿›¯‘8R¾³ÆP²ó„U€úöø­]yºŒ˜y„± ß»Ë,rž´j„N|F`k¡t`g³‚Ž—£Ë™Å‰nwsµŒqŸ,R,4’M[¦Lrh…^ŸSa2–×ë×à3«øG³ø˜ðqJS`h6·t¥Tz#7,EÚÓÞˆ:W¾…¡‰4KaŸ×Ê’«5H˜XeÇ¡­ÄŽŸ?df*=†/C°W‰Ñ›JmÜÈÒ@¥å?ªñ&i“·g‹½|™dIPpZar-B…Ç€¢Ñ j¨ª`„ëåë~½X¥á<š× &aCJCclU[º•ªŠÐû#—â\¼ù4à ø*§øË­¹Z8?ÒŸ·‘€Ä›,šðX§yyúúêêÈ’’’’’’³IÂkSb,ššÐ" @ÜyyúêêÈB’’’’’’ýáz·šÐ""ÏQ¢½yyyêêBBB’’’’’O´‚%Ù›¨šÐ"ÏÏ58üüyyêêBBBB’’’’’’IÿèÚjp{›PCÐÐ"ÏQ…ÕüüüüTêBBBBB’’’’Ií}ºäík‹›{öÐ""ÏQ §üüüüTêBBBBBB’’Oÿ} ëkËË}1,U&Ð"ÏÏ:RRüüüTê’±±BBBBB¡÷ºJ}™¿õÂh,Ð"ÏQ®ÛRRRüüTê’±BBB¡n©t} OÍ0A·¤fÐ""Ïœ¶üRRRRRTê~¹±BBx-Ikv’’Ž¤Í‹ZÐ"ÏQÀŸÈÈRRRRúê~G¹±JvÁí±’’’!4D<š""ÏQ@#ÈÈÈRRRúê~ñG¹¹t}Á÷}GBBBëv’xŠ"ÏÏóÈÈÈÈÈRRúê„ññGòÂ}GnàBBBò}í±J} – çV#ÈÈÈÈÈRúê„ò÷}dx[±BBOÿ}¹IkíB’³_ÈÈÈÈÈúê„àºø[ë} ±±¡´àOÿ}¹’’’’ÈÈÈÈúT à‚äkG¹ÁÓ¡´à’’’’’’ÈÈÈúT Ê™äÿkàGG¹i ±[BBB’’’’’ÈúTJ}í¦÷}Hññä}ÿi BBBBB’’’’’’úNí}[n-ààtíkºä}BBBBBB’’’’’’yÑ}-[} ©ddÖD©tíkñ±±BBBBBB’’’’’y´ßß[[ÓH©¦`-Ö÷}d¹¹±±BBBBBB’’’’’’yô­--[[Ó©vn[ñG¹¹±BBBBBB’’’’’’yTû‚--ßÓÊ©x ñGG¹±±BBBBBB’’’’’yTû‚‚--i}k[i}ÿdàññG¹¹±±BBBBBB’’’’’yTè ‚Êí}‚ikkH©dààññG¹¹±BBBBBB’’’’yêTÔÔÞv*Þvk—TTTTTTTTTêêêêêêêêêêêêêêêÿàÿÿàÿÿàÿÿàÿÿàÿÿà?ÿàÿàÿàÿàÿàÿàÿàÿàÿàÿàÿàÿàÿàÿàÿàÿàÿàÿàÿàÿàÿàÿàÿàÿàÿàÿàÿàÿàÿàÿÿÿÿÿÿ( @€ÿÿÿ’å¡Fi™¯ÑJqV#3aq®Ä€ŸS¹ùáÂÑq¦"4Äåú‘j“ŽÑû‰.?o˜Èǧ¹:“Ë/ ZFLìáè/©ø´]„;O¿Èß~Ã)[zG¤Þ9+<°}‰•T~‡;Yk©Ýp(9b‘°­ÆÙÕá-´„“¼¬ÏíÚ±Äèòú 1½–«¦my™¾ãŸøœ]jB!(’M[«OxÌÀÏLp¯ª»×w2I¼o’R.B.>@±ùÕâñV~0u  eŸZ Û†Ô >cD]ŒJqϘ±ºŒ™Oªí—>[¢u‘ 4Nõïò F49èÒÝŽ6N0-,‡Á˲´~™¨c…%j–]µï­nÖ¨½<ÅŠ¦,"y°@+1c'99о&!]„ M(:™Lmv¼e¡Ö#¤øß»Ì˜ð<«ò„3JR:@ââëÞÌ×È”ª&UqԼɥKp5FLz´h…+<q.AËÞð8$±¦¾€Àk¡Æ£®F¥ìö…ŸÏ¢²±X€½{“‹Y}éÝãK¶ù]¾ù’:U##I,V@F RÅš° Vx4…¸QzšAa¼Ž¥ííóo$14§ñ(q /DµÖ±t‘CdÍܨ÷òõèçîJ-4=V¸gŒ7­ùºÌäN3:Àx™¬Xx¯z”ÀˆŸF'.¬Êç€6PV´ò®gŠFdŸô5y¤„Ð{½·nŠ$ÚÅщ2G>[,pšæÏÙòêî=',Ú·ÅZ&8ºu°^~½‚‡8G®a…Ý¿ÍÓ¦‡6OaŒ.w¥5 áÑÛ:#(6MC/5 FmO,?É©»¶nÓ¡¸Ä ´Z‚Ë‘«ªQsv-BÍœ­É•®¶cˆ²c\¹öíÝå)¦ø8K•¬¨Mt¤Hm¶t•ðïô†0Es+>Š4Jn¥Û•šiñCŒŠŠéä55ãããtÑŸUTo&ò0¥ài1võëŠQ×5555ã.¼U¼æó8¬àñ1-JJëQ¨„÷55UM›qX"•I Þi1g¿JJJQÁÛ„YMÂðqã6*zài1D¹““JQw:£¯Ú·+5ã.¼VêàñkRÿ“““öµ§Ò˾ѻ÷5©ŸÒsÅä 7!ÿÿ““ŠÀìsP.ú£÷V¼\Ô5täääÿÿ“Š…ú”M£ÄðZ‚MÛããttääÿÿë.Mâ¼Ó§Òs»›M§55ããttäääëM+‡jþúåî÷555ãããtäääë¾ZjGÖ.Ÿ\p £„555ãããttääJÙ+ZÓ.ŸZTß§:£„÷555ããttäJƒj+¼ ÔMÖ§:£Û÷555ãããtJƒÆ‡»”Ÿq…ÀµwÜÁ¨×tääÿëÿÿÿÿ?ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿþÿÿÿÿÿÿÿ( @ÿÿÿã¦In©­ÇStV#-[½ùXrš»}›,CßËÖp¨K›Íˆ1E}[‹wªÛÓ¥º.©ø±Éå:C]¦mz0…»f9EAZKX%e4vŸ‚Ì+šâŠ»ãC¥ä U†Ä”£P3NÇÒåڹȵa‡d¯æŸ÷’9S¯S| eŸ”GkÅ­Áu5M4Fºo‘`/c‚Ì—± $5'|²ŠÏ`/;ºŒ˜š?^lBN›NuÒ±Â%s¥@žÚª^†6Pm/E8P¾Š¤O}Ä¥¹¯¨¿)\|ÜÁÏÅœ©%¥ø7­øR¹ù½v–ÏŸµ'`„Ce©Mue,AϬ¸|2J¡Rr5M\¼v”¦JpÔµÅs5MÓ²Ã_‘‘LY Fi¤Im¨Ls ÷Õ·Ç_0;f8D‰1F6N‘9TšA`žCd¥Jo¦Kq­Pz«Ox¥myػɎ7P‘KY¤Hm§Kq¨Lr¨Lt­Tz›Nt€€ˆ¦‘‡X-›gz@’¤K=JI¢f“¯²1.NV<3 l±97ž1FA]0e*?¨b–¥6d 4|5„ŽY_‰•§“¸:yh+‹u•”o¬ ZTDaQUµPx>`EW#~Sv}i°nqC—(mpœr,&'"©Š˜š;LBc†[O{k£M j…·¡«‚Ÿ8$s^G/­ƒ¶™³w\ t2Œ%)®P´ªRH!ðððððððððððøÿdjview4/src/images/DjVuApp.icns000066400000000000000000001453661174072760700167070ustar00rootroot00000000000000icnsÊöics#H?ø?üüüüüüüÿüÿüÿü~?ø?üüüüüüüÿüÿüÿü~is32†Uh˜“‡‡ ‹ïöõï×ÊÛÕÌ©‰€'©ÿøÞÿ§€ KÃÿûϲ±ºÝýÿÿ°€ fÝÿÁŸ°±¨¿Úÿý£€m}⬛­Â²½¸ÇáØt<ŒàŽŸž¶»»¾¿˜Óu”觘—²×Ìé̾ÑwM õ਷ÌÜÒúÈðÍyh´òòÆ®ÉØÖǺîÅ|]¾åàã̺ºÂÖìñÔˆ]~|}Š•›«ºÄñüË„ƒ 0-)Saj•îÿ×¢‰·ë𲊭§‘bœ“‡‡ UíöõïØ×ÜÕÌ‘#€ÿùõÿ}€ ¢ÿúáÙÛÞæûÿÿ€ "ÆÿÙØäáäêãÿÿ|€;×»ÏàçÞðäåäÚJNÞ¦ÔÐÝåçßÞ¨ÕG€M]ê¶ËÈÝùòøÞÆÒH tùàÌåóúüÿÌðÏG‘öñËÐñùóÍ»ç¿H9¤åàâÍÄÆÇØæ¾QDWcel{‹•¡²­¿»|^‚ 0-1KUUmÁÀ„\‰x½¹”Šn˜ªU|˜“‡‡ tïöõïÖÆÛÕÌšL€/•ÿ÷Ùÿ’€K³ÿûóøøïïüÿÿ£ XÑÿñúüöèúëÿþ•jßÔôööîêðííØfiwãÈøëîíåéèÈÔe_ZêÎïåëöåúçÙÐjm^õåæùø÷àÿÖóÎlbe¥ôñ×äøøê×Ìßµtsu¯äßàÒÏÐÑßÞ`&rÿ| „‚ƒœ£«¼žX<8 ¢‘ˆ{……\SAŠP[xЉÚs8mk0N>@3ÖÿÿÿÿÝÇÖ¹ƒV2 ôÿÿÿÿÿÿÿÿÿÿèDÿÿÿÿÿÿÿÿÿÿÿênÿÿÿÿÿÿÿÿÿÿÿç›ÿÿÿÿÿÿÿÿÿÿÿæÄÿÿÿÿÿÿÿÿÿÿÿäåÿÿÿÿÿÿÿÿÿÿÿâ.üÿÿÿÿÿÿÿÿÿÿÿà SÿÿÿÿÿÿÿÿÿÿÿÿÞ ¶ÿÿÿÿÿÿÿÿÿÿÿÿÛZ²ÃÑßêñòÿÿÿÿÿé =TnŠëÿÈ9íÿ]5wICN#þ ÿÿÿÿðÿÿøÿÿøÿÿøÿÿø?ÿÿø?ÿÿø?ÿÿø?ÿÿø?ÿÿø?ÿÿøÿÿøÿÿøÿÿøÿÿøÿÿøÿÿøÿÿÿðÿÿÿðÿÿÿðÿÿø?ÿüþ~> þ ÿÿÿÿðÿÿøÿÿøÿÿøÿÿø?ÿÿø?ÿÿø?ÿÿø?ÿÿø?ÿÿø?ÿÿøÿÿøÿÿøÿÿøÿÿøÿÿøÿÿøÿÿÿðÿÿÿðÿÿÿðÿÿø?ÿüþ~> il32­‚›kv•¬»Àº´¯ž|:UOC‹"{¿…ÿ ýÀ¾ÐÝÖÈ·«‹`F‘ÿ„D‡ã†ÿð×ê‚ÿüáÄ‘fƒT”ñ†ÿç¹Ö…ÿôœKƒc¢ý‚ÿûúöòïÝÕû„ÿþGƒn²ÿ üêÉ®£¢§µÇØîƒÿúšFƒzÀÿ ùÚ¨–œ¢§¥ ¥¸Ëâ‚ÿø˜C‚2‡ÕÿÿûÙŸ˜§®±´¯©¼½Èåÿû—C‚M“åÿÿ檗©³»Á¾¼¥µËÇÇÈ÷ÿÿé¼B‚`žõå˜Ã‘¨¼µÄ«¼·Â»¼ÑÇÜÿÿÕk†D‚o§ÿÅV³Œ›ºÂÒ˜®ÆÂ¡²¿Ô¦³ÿÔrˆ@‚|¯ÿÅw¬œªœµ´Æ¹¤Ë²¯È¨ÛkÿÑs‹<†±ÿÄ{¨›¨ˆ“ºÕµÆ°ÎծݖqÿÍtŒ8@’´ýÄjª‰†«˜ÄÜÊÂÃèæ¸ÔÿÊv7Z˜¿øìºªœ¢¢¢ÑØÞÉ×òóéײòþÆwŽ5nšÖôõﯥ±·®Â××âÈÖöøö¾ÉüüÂz0}˜ßòñõÇ£­ºÅÎ×ÖäÄÌøûã˜êöû¿|3‰™æðïðì­¥¶ÁÌÕÕãËÓô知Ñöù½~)€&”›ë€îð䦢¹ÈÒÓßäçÌ™ÁÅãòî¹€‘'€D£íììíìð赘¢³¿¿´›œÄÓìôä廑 €K™ªéæççèêïõäÄ©š¦²Ñïïìêéîè⤒€U ’š“Œ„‚ƒŠ”¥ÁÖÓàßàäêïÞøÿðèä¡ €"[egoty}~ƒ‚„|xŒŽ‘”›§®ÃýÿðêÜ´ˆ-9HU@6cjqz€ƒ‰—Çÿÿðêݵ“ 3AKÄÿÿðëÛµ–[Ãÿÿðîɪ–N¾ÿÿÙ·Ê—:½âÁ¨™˜k‰ˆi¾$šU%:—¯»Àº´¯ž|5UOC‹3%±…ÿ þÀÇÜÝÖÈ·«ŽQ‡'5ã†ÿñîƒÿüß¹V)ƒ$Lö†ÿâÕ†ÿûaƒ"iƒÿ€ùøñêòú…ÿa‚$!Œÿ ûêÛÒÐÒÕÚÜÜìƒÿþ[ ‚1#¯€ÿ øàÏÎÔÙÛ×ÙááØá‚ÿüV!‚.-ÎÿÿûÞÌÔßãääÚÛæêêÕäÿþR%‚,<çÿÿåÍÓàæêîéèæìñóîÌöÿÿé¿H)‚)Rúé¦ÏÈÖÝêßé׿ôòåæüÝÚÿÿÕn:3ÿ'nÿÎlÍÇÕÐæãíÇÚüïÏÛêô­ÁÿÔt:1?&‹ÿΆÏÓÝÐáÚéäÒüÝÕéÑú…ÿÑt838) ÿ͉ÎÒܼÌÄäúÜöØéðÑø¢‰ÿÍt8541±ýÍz˼ÄÙÉëüëõäùøÔëš–ÿÊt772<Ãøí»ÁÒÓÏÂÐ÷øùüôýþ÷å³ôÿÆt79/MÜôõî¶ÔãáÙêüöúýøüýÿÃÉüüÃt67€?-aåòñõÅ»áçíõüõûýùûýè˜éöûÀt5:€B-wéðïñì­Äçíóúõ€û ýî ¥Ñ÷û¾t5<€<3Žì€îð䦸äôúöýüù×›ÁÅåêØ¼t7;€;<¡íììíìðè´ž¶ÐÜ×áœÄÓížv;=€?G³ìèéèéëïõ䨚¦±Ðïïì⯌w>@€@Lmyzywy}ˆ”¦Ã×Ôâàâåëñ¸¿æ´ŒŒ`7€DDCFLQTZ\^adgmrz}‚ˆ’£§“ÇæµŽx†/=DUU[_WP_bbcb`bf‡Êæ´Ž‹w’ 8HNNP‡Ëæ´ŽŠr–„Êçµ}—Êé™Î˜€¬®ª™˜([‹i¾m]<™ªX]¤´»Àº´¯ž|:UOC‹fP´…ÿ þ½·ÐÝÖÈ·«ŽV…`[ã†ÿíÒë‚ÿüß½jQPƒ]iô†ÿá«×…ÿø|ZƒZƒÿùúýþöÚÕû…ÿ}X‚mX™ÿûïðõ€÷øñæïƒÿüy]‚sW¶€ÿ øëôøùùúôëóùæç‚ÿùv`‚p]Ðÿÿûéôù€ûüòÜêýüâéÿütf‚lgæÿÿêðùûûüýýöÜëÿþû×øÿÿé½mi‚jt÷ðÁâõ÷÷ûñ÷îóæïôòÿçáÿÿÕlbq‚f†ÿݘëòóìöòøâëìêâåò÷ÃÙÿÔrdrc˜ÿÝ©ñøùìòìõòâìââïâú¸´ÿÑsev|c¦ýÜ«ð÷øâçàðüçèáíöâù»¶ÿÍsgzzg±ûÛŸëìäãíâóûðââúúäñµÀÿÊti|xjÁøïÅÜõïéàâùøùßåþýøêÂ÷ÿÆtk|uqÙôôïÉõû÷ëòýöûÜàþüÿÐÒûüÃum}€syâòñôÏ×úúûûüõü×Öýýí­ìöûÀvo€„p…èðïñì¾Þûûúûõüßáþñ´¸Øøþ½wp€p’ë€îðæ¸Ðôüüöüüû߯ÎÑìÞµ¾xsƒ€€r¡íììíìïéÁ³ÉÜäßд¯ÎÚôçC qwƒ€n®ëç€è êïôæÍ¸«·¿×€î×z; R€…€‚z€‡„zz}†’¤ÀÔÑßÞáåëõ~8ŽD \›€ˆˆ„…††ˆˆ…ƒ‚…†‡…‡‹“£ ;>ŽE-…m™—¥¢£¦¢™œ˜•‰‰‡CBD "‘ ªª™ ‚#ED –EEK–E;€Þ— A À­˜ 6ª‡¾l8mk)" ¯þôåÞàâáÔ¹…00@5-þÿÿÿÿÿÿÿÿÿÿ÷ãüÿÿðÑŸh5ZÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿïåÄ#…ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿf±ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿhÖÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿeòÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿbBÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ_lÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ\™ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿZÂÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿWãÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿT-úÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿQSÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿNÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿL«ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿIÑÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿFîÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿC;ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ@sÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ>Îÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ;®ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ3x£¸ÉÖâîöüÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿw%3BQecFƒ¨¿Ôçõþÿÿÿÿÿÿÿo#7NfÄÿÿÿÿÿo¾ÿÿÿÿþ3 ½ÿÿÿÿ? ¼ÿÿßbc"ich#Hÿøÿÿ~ÿÿÿðÿÿÿÿÀÿÿÿÿàÿÿÿÿàÿÿÿÿàÿÿÿÿàÿÿÿÿàÿÿÿÿàÿÿÿÿàÿÿÿÿàÿÿÿÿàÿÿÿÿàÿÿÿÿàÿÿÿÿàÿÿÿÿàÿÿÿÿà?ÿÿÿÿà?ÿÿÿÿà?ÿÿÿÿà?ÿÿÿÿà?ÿÿÿÿà?ÿÿÿÿàÿÿÿÿàÿÿÿÿàÿÿÿÿàÿÿÿÿàÿÿÿÿàÿÿÿÿÿàÿÿÿÿÿàÿÿÿÿÿàÿÿÿÿÿàÿÿÿÿÿà?ÿÿÿÿàÿÿÿð?ÿøüþþþþ~8ÿøÿÿ~ÿÿÿðÿÿÿÿÀÿÿÿÿàÿÿÿÿàÿÿÿÿàÿÿÿÿàÿÿÿÿàÿÿÿÿàÿÿÿÿàÿÿÿÿàÿÿÿÿàÿÿÿÿàÿÿÿÿàÿÿÿÿàÿÿÿÿàÿÿÿÿà?ÿÿÿÿà?ÿÿÿÿà?ÿÿÿÿà?ÿÿÿÿà?ÿÿÿÿà?ÿÿÿÿàÿÿÿÿàÿÿÿÿàÿÿÿÿàÿÿÿÿàÿÿÿÿàÿÿÿÿÿàÿÿÿÿÿàÿÿÿÿÿàÿÿÿÿÿàÿÿÿÿÿà?ÿÿÿÿàÿÿÿð?ÿøüþþþþ~8ih32 ³6iafaYD&’)ðŠÿý±«åÛñîåÕ¸¢{S=–›ŒÿíÕòç„ÿúݼ›†~¥Ì‡T³ŒÿÞºà݈ÿû°…šm‡h‹ËŒÿÙ®ÐÖŠÿêŽ[‡yˆâŒÿéÅÅÏŠÿí‘[†Žˆõ…ÿ øñóïêâãíðäÕò‰ÿç‘Y†4—”„ÿûíä̱ šš¡«¾Ò×Þø‡ÿã‘X†Gœ¥ƒÿ÷æÑ§’–œ £¥¢¡¡©¾ÑÑð†ÿß’U†]˜¼‚ÿöá””ž¢¥¨ª«§£¡«²·ÏÉî…ÿÛ“T†rŽÓÿúàÀ™¢¨¬¯°³²«Ÿ™®»¹ºÏÅõ„ÿ×”R… †‹åÿäÊ’˜£ª°µºº·º·£›¸ÄÂÀÃÌÊ‚ÿüÿØ•O…$š‰÷€ÿóÔ¡”¡©±¸¾ÂÅÀ½À«¥ÀÌÌÊÅξæÿÜ”“—L…<£“ÿÿ×¥ÈÀ˜¢©¸½­·È³°Ä¸¯ÈƸÂÏËËÂÿØshšK…'R¡¦ÿÿ“º©‡•œ˜­Å½ÄΖ’È¸Ϊ—µÖÑÔ³íüÿÿÔxmœG…'hœ¹ÿÿ’FÊ—›¡™¤Ã¼ÉÚ¢Ž¹ËÁŸ¨½©ÃÚ»[‘ÿÿÑzmŸD…'}‘ÌýÿXÆ•œ¤¬ ¥Âº½ÍÁ—©ÍÆ­¢ÂÈŸ¼ÝÅBuÿÿÍzn¢A„(•ˆÕùÿ‘fÁ” ¨®Œ‘¸ŸšÉÔ¯­ÉŦ°ÝÍ¥ÂàÉPyÿÿÊ{n¤?„(/¦…Ù÷ÿd¿•›¢ªˆ|¬˜Í×Í°ÃÆªÊêÑ©ÀàÆNyÿÿÆ}o§>„(D¯‚ß÷ÿŒN¾”†‰‚”šµžÑÛÙ½¿È¸ãí⳯۾ƒ);+kÖðïïððòàš¿Úçëìò÷üô÷ûûýùüú÷Ë|¯°òôô÷°‰X0?‚U7/~Ûðîî€ïóÑ‘¾ÜéïñöûòùûúûúøôÈ|µÉóóöö®ŠV1?‚?67‘ßïíí€îíòÎŽ®Öèñöúòúûúøöè¬|×Ò½Üñê»ç®‹U4@‚A9AžäíëëìíñÚ™Œ³Ôèñóõóîݵ‰ÁÎÏîó󨋥£U8A‚@:M©çëêêëììïîÇ”„ª¨›ˆ{ˆÄðâÒïñô©ŠŽŽTD‚AAY‚‘‘Ž‹•¡®»ÆØèôìÒ÷ôòð€î ííè¸ß뱋{L@‚ ?DJKMQTVVW€XWVW\csŽ­¯¹±²·¾ÈÒÜå븤ÊÝ챋|Qƒ*BDFHKMQUZ\aeinqqpnibbhijmorv€Œ™ªžËÝ챋~sˆ%307A@GJNQUZ``YUcgjkoqqokhffn ËÝ챋‘|j—3FKPUUX\^__^hžËÝ챋‘‘xbŸ<4BDi›ËÝ챌‘u_£ išÌÝ챋‘oQ£ d˜ÌÝ챎„ˆ¯¤_–ÍÝîš{·ë¥[”Ï»‘¿©¡¦[‚|¾£€¨IfpHÿ„ª\U©d^Zeijnswnif_L;œiZMéîòöúú÷ôòíàÅžrAc_faYD&’fVlóŠÿý¯žãÛñîåÕ¸¢{PeQ’ŒÿëÑòç„ÿúÝ»“qKIP3†ÿbM±ŒÿÛ®á݈ÿü«jX[†r_OÍŒÿÔ™ÑÖŠÿña^ÿ…p\YæŒÿã±ÄÏŠÿð__ÿ…o]iø…ÿ øñôøûúúýùæ×õ‰ÿë^`ÿ…nYƒ„ÿüîëñôõö÷÷ö÷÷ðàãú‡ÿå^cÿ…jVžƒÿøèïõö÷ø€ùóðò÷øéØó†ÿá]eÿ„miT»‚ÿ÷åñöøù€ú ùùñéêóûúîÓñ…ÿÜ\f…wgVÖÿûäð÷ùú‚û ùîÜÜïýüûíÐ÷„ÿØ\i…we`èÿçëöùúûû€üûúõÜØñ€ýûâÔ‚ÿüÿØ[j…wfnú€ÿôàôøúûûüü€ý ù÷àÛôÿþþýùÌëÿÜ”’\n…ra†ÿÿèÌÖëõ÷øøüûðòúóï÷èßöúò÷ÿýäÍÿØsg^q…'q\ ÿÿÁ}Íóðôóìôýòñøáß÷íáõéÞæþþõÃóþÿÿÔxj_r„(‡oZºÿÿÁ‘ÝôïôòëíùðóýçÜïðäìâàéæòýË£ÊÿÿÑzkat„(n[ÏýÿÀ™âõ÷úùïí÷ïíûöÞåîæâàçòßéþÔ“¼ÿÿÍ{jcv„(zoaØùþÀžãöøúúåãóæàùþèäëèáàöóàéþÙ–¾ÿÿÊ|iex„(znlÜ÷ýÀœáõõö÷ãØîßßùþñäççàçÿóáèüÖ•ÀÿÿÆ}igx„(xivà÷û¾“ÛòéèáéåñßàúýõëáäßöÿøããøÌ¾ÿÿÂ~ijyƒ)ªxd‚à÷ùÍ“ÎòëêÝßéîæèüüóøßÝæþýþïå÷¼Ââüÿ¿€hkzƒv_—èõôóÝÁìööôôßÛÝìþúôþâÖëÿ€ý ùî«ïüùþ»hm}ƒv_²ñóòôöÄÙöùúùêäëúýøõþâÏéÿ€ý ûÓ°ø÷øý¸‚gp}ƒ)~w`ÁðòñòõÜ»îøúøùúüüýööÿâÊãþüüûñ©×ùööûµ„gr~ƒ~uhË€ð"ññò¼Íôúúùúúûýõ÷ÿâÃÞþüûøÆœïöõöú²†gt€ƒ)}osÔðïïððòä­Øõúúùúûüô÷þâÂÞþúùÖ—ÀÀóôô÷°‡fv‚j|j€Úðîî€ïòاÕôùûúúûòùüññøùöÓ—ÏÅÓóôùø®‰fy‚‚|fßïííîñÕ¤Äê÷úûûñúûûúøì½—ßÛËãöß|Ú±‰f{‚‚d›äíëëìíð߬¤ÈãòõõöõòäÄ™ ÍØÙòùêQK™Žgƒ‚‚e§çëêêëììîíШ¥²¼º°¡– ÍðåØïöëW8ƒj‚†‚ƒ|g¶î€íîïïððòðáɸ °¹ÇßîïìíîðÚ`>4cˆ„‚‚|aƒ‘ŽŒ‹‰‹” ®»ÅØèóêÑöòñï€î ííåQ3x¤>1Œ‚*‚ƒ}yxuqmhda^[XW[bqŒ«­¸°±·¾ÈÒÜåëˆ!=v¤>;qƒ „‡ŠŒŽ‘“–—™€›š–‰|zwqopqruŠ˜«`>v¤>!)ˆ%f…‡Ž”˜›ž £¤¢¡¢£ œ›–‡€zyP =v¤> )—™™šžŸŸžž›™_$?w¤> )žU‡ƒ™–3"?w¥> '£ ##@w¥>£ "#@w¥?P•¤""@w¥2MÃÿ¥"#B^m˽®¦""RÊ·š¨r‘mÿh8mk  fÙáÓÁ§Ÿ£¥¨«¡uM$)ùÿÿÿÿÿÿÿÿÿÿÿÿÿÿóÀV!U}‘ŠzZ5iÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿùÿÿÿÿÿÿý㹄O žÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿðÚ½ª˜l ÇÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿŒåÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÈ2ûÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÉWÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÈ„ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÅ®ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÂÔÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ¿ðÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ½Bÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿºiÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ·—ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ´¿ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ²àÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ¯*ùÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ¬Qÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿª{ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ§§ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ¤Ðÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ¢ëÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿŸ:ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿœeÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ™‘ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ—¹ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ” Þÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ‘(ôÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿNÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿŒ’ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ‰Ðÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ‡ÏÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿƒP÷ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ€2s‘©¾ÏÛäî÷ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÕ  +7GYk} ¯À©}©éôþÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÓ(=Rk†¡¹ÍàóûÿÿÿÿÿÿÿÿÿÓ2G‘ÿÿÿÿÿÿÿÿÔ €ÿÿÿÿÿÿÿÿÑÿÿÿÿÿÿÿï}ÿÿÿÿÿÿó(~ÿÿÿÿÿå}ÿÿÿð[PCT#it32\cÿ™ù™!+;bYÓ³—cP?0"Vø¿Ý( h€ŠyiWLDA?@EKLPXh…¾:‘Ô>/Ÿ€¤¡dczˆ–¤«²¹ÀÇÎÑÊÄ¿º´¯©¤Ÿ™“‚kPLU~ Ѐ¤¡bSå™ÿ ò×·fLLMq?†È Ù+c½4¼ d"¤¤£„VLºýžÿ ð¹sLK_Ì  MP‡LZm‰Ãiµ,A¤¤‘LM¯£ÿí˜LPoZt¢ë²ÀÄÈË̽¯¡”†hMLLMbŒòh±]¤¤‚LѦÿÎ`lÏûɈÿ úÞ¿ ‚cMLVv¶­y¤¤sMô§ÿí¥‚öÇŽÿ ùÙ»œNKeP¿§v•¤¤cb¨ÿâ ‚ñÅ“ÿ ûÓ¤wPNf‹ÐW»CSžŸ9 €¤T‚¨ÿÑ•‚ìÁ—ÿûÚ¥rNPf}–¤¤®ÁÞjÉ™&9¤¤L¢¨ÿÁŽæè½›ÿüâ¶pMx£¤¥†˜R¤¤ŽL¨ÿ³¥À㸞ÿ ûuLZvˆ£¤¤‡—k¤¤~Lâ¨ÿ§´«Þ´Ÿÿ ü«_LLNœ¤k%–?„¤¤oRü¨ÿº¤Ù²ü¡ÿþèR“¤n–S¤¥`o©ÿ”ÀŸÔ±ø£ÿN•¤p–2)€¥Q©ÿœÏ±ô¢ÿúL˜¤r–#B¥¦›L¯¨ÿþ‘­¶€Ê¯ï¢ÿôL›¤r–[¦¦ŒLϨÿ÷¤Â¾ €Å®ë¢ÿîL¤o•u§§}Lï«ÿöÓÐÁÀ¬æ¢ÿèL ¤m•™§§m\¢ÿþþ€ýþþƒÿúæÆâ¢ÿâL¢¤j•E¥¨¨]|–ÿþñãààßÞåìòõøøðæÝåî÷øõðêÞÔÒÑÑÐåü ÿÛM¥¥g•,2€¨Oœ•ÿôä€ßæîöñеª¡˜˜™š›œ§°¼ÑðöëÞÒÎÍÐèýžÿÕP¥¥d• K©©šL¼“ÿ%öåßÞßëöæÆ¨””•——™šœœžŸŸ ¡¢¢²ÌæöçÐËÊÏëþœÿÏR¦¦b•e©ª‹LÜ‘ÿýèÞÝÞèõÚ¢‘’”–—˜š›œŸ ¡€¢££¤¥¥¦§±ÛõâËÇÇÑú›ÿÉU§¦`•ªª{OùÿúâÝÜåó᪑”•˜™šœžŸ ¡¢£¤¥—¤¡¤¥§¨€©¹áóÛÆÄÉñšÿÃX§§]”f™««kiÿ,öÞÛÝîç±’•–˜šœžŸ ¡¢£¤¥¦§™§¢¢›¡¥©««¬¬¿èìÈÁÃç™ÿ½Z¨§Z”:!€«Z‰ÿïÛÚÝñÓ’‘”–—š›œžŸ ¡¢£¤¥¦§¨©œª¤¤œ€¡¥¯®€¯×ñÌ¿¾Úþ—ÿ¶]¨¨X”(;¬¬©M§Žÿ0ëÙÙàñÁŽ’”—š›ž ¡£¤¤¥¦¦§¨©ª«Ÿ¬¦¥Ÿ¢£¤¤±²±±²²ÌòÓ¼»Î—ÿ°`©©U”U¬¬šLÅÿ%ðØ×ã𯓕˜šŸ ¢£¤¥§¨©©ªª«¬­«ž®¦¤¢¤¤¥§„´ÃîÛº¹Ø–ÿªcª©S”o­­‰LâŒÿõØÖâ阓–šœŸ¡£¥§¨€©ª¬­®¯ ©°£—™ž¢¦ª¶¶··¶»êÙ·¶ä•ÿ¤fªªP!“ÑŠ­®yPü‹ÿùØÕÜ‘”—š ¢¥§©ª¬­¯¯®¯°±²¦£³¦˜˜™šœ¨¹¸¹¹º¹¹¸¸ÀíÍ´¶î”ÿži«ªM"“O¥®®hj‹ÿýÛÔ×𰌑”˜› £¦©ª¬­®°±²³±³´µ€¶ ¥¨¶¨™šš›œ«½ƒ¼€»Èð²¹ö“ÿ˜l««K"“3*®®¯Wˆ‹ÿ(ãÓÔìÁŒ“—›ž¡¤§©ª¬®°±³´µ¶¶±µ·¹¹º®¯¸ª™››œšµ€À¿¾½¼¼Ñì¹°¾“ÿ‘o¬«H#“$E¯¯©L¥Šÿ)õÒÑèÒ‹Ž“–𡤧©ª­¯±³µ·¸¹º»·´µº½½±¸»¬™œœ™ÀÂÃÀ€¿Û寭á’ÿ‹r¬¬E#“_¯°˜LÊÿÛÐÙé’•™ £§©«®°²µ·¹»¼½€¾¶·¸½À²¿¾®› ¡¡žÃÄ‚ÅÃÀÁéÊ«µý‘ÿ…u­­C&’mz°°ˆLà‰ÿ,ðÎÎ鵋”˜œ £¦¨«®±³¶¸º¼¾¿ÁÁ½¹º¼Á´Ã𣤥¢ÆÆÇ‚È ÆÅÅÄÃÃÏê­©Ø‹ÿïvv€ÿx®­@&’•±±vOûˆÿ-þÕÌÙá“—šž¢¥§ª®±³¶¹¼¾ÀÁÃÄÅÅÆÂ»½¾¿²Çǵ §§¨¦ÈÉÉƒÊ ÈÇÇÆÅÅäͧ¬ùŠÿë€wvvV{®®='’A­±±eh€ÿ€þƒÿêËËꬑ•˜œ ¤§©­°³¶¹¼¾ÁÃÄÆÇ€ÉȽ¿ÀÀ§Éʸ§ª««ªÊËÌÌƒÍ ÊÉÈÇÇÎ뭤͊ÿçxwU~¯®:(’-3±²²S†ÿÿ„þ€ÿÐÉÚØ‹“—šŸ£¦¨«¯²µ¹¼¿¸¥¨©«º€ÌË¿À¿©Éͽ­­®¯­ÌÍ΀ÏÐ ÏÌËÊÉÉàÑ¢¥ü‰ÿãxwT‚¯¯7)’"N²²¨L£ÿÿ€ý5þþ›rssÇÇè§’—œ  ¡¨®´¸»¾Á»¨ª¬®¹Ìý½ž¡¾¯ÉÏÁµ°±³±ÏÐÐÈ‚­ ÅÒÑÍÌËÊÎꤟâ‰ÿßyy€xR…°¯5)’i³³—LÁÿÿ‚ý3\lÅÍ呇Œ–šžš”¦¹¾Áþ«­°²ºÎʵ±‡‰Š¬µÊÐú´µ¶µÐÓÓ«€˜ ™ŸÌÓÔÑÏÍÌÌå¹Â‰ÿÛyxQˆ°°2,‘ "„³³…LÞÿÿüü€ý\€/ Ã×ÉŒ‘ЉŒ–œžšž—–š¥¿ÂÆÆ¼º½¿ÂÑÖ½¬‰‹Œ“»ÌÐÆ¿·¸·ºÒÕËš› ª¸ÖÖÕÒÐÏÎÜÏ›£þˆÿ×zz€yO‹±±/-‘ _Ÿ´´sNùÿþüFý\-ÁÁâ«“ƒ‹Ž–›œ”˜›Ÿ³ÄÇÊÇÅÈÊÍÕÙР‹ŒŽ¬ÎÑÉú¼¸ÀÓׯžž¡¶ÌÙÙØÕÓÑÐÔå›™æˆÿÓ€zyyN±±,.‘ 8#³´µafÿÿýûû€ü1]_ÀÅç‘“}Œ•ž••™ §ÅÈÇ¿ÂÅÇÑÜÝÛ›Ž’˜ÏÔËÆ¾¿¹ÄÕÍ‚Ÿ°¾¾€º»ÕÓÒÑæ®—Ž€…ЄÿÏ€{zzL’²²)/‘)=µµ´P„ÿÿû4üü]¿ÑÎŒ’‡’–™¡£¡ž—š¡¥¿Êij¶¹½ÌßßÔ¹’”•¶ÔÎÇÁºÉÖ± €¡¦¹Ñ¨¡ÖÕÔÔßÇ–ƒ€%«„ÿ Ë||{{zL–³²&0‘ Xµµ§L¡ÿúùúú€û2\ ½×¸Ž“’‘—›ž£§¦§œ›ž¢¥ºÊÅ´·º¾ÈÝÝËÊŸ’”•—ÖÑÉÄÆ¼ÊË¡¡€¢´ÂÞ©£€¢Æ×ÕÕÛՔހ%«„ÿÇ€|{xL™³³$1 s¶¶•L¿ûõú<ûû\¯»Ú¯”˜›¡¤§©­± ›Ÿ£¦¸ËÆ´·»¾ÇÙÍÊÌ”–—™šÂÓÈÇȿ̱££¤¤ª½Öß«¥€¤ ÄÙ×ÖÙÜ’‘+%%«„ÿ Ä}}||wLœ´³!5 ¡¶·ƒLÚöò‚ú0û\¹¹Þ¦•šœŸ¢¥¨ª«±¡›Ÿ¢¦¸ËÅ´·º½ÀÄÊËÎϧ—™›¶ÒÉÉÊÁÄ€¤¥¥¹Çáᬦ¥¥¦ÅÛØ×Ùã7&&¬„ÿÀ€}|vL ´´6 L«··pMïðïù<úú\.¸·á‘–›Ÿ¢¦©«ª¬›Ÿ£¦¸Ëų¶¸«ž¿ËÍÏÑÊš›žÀÈËÌÍ復¦§®ÀÛâ⮨€§ ÆÞÙØØä•A&&¬‚þÿÿ¼€~}uL£µ³7 1+··¸^cñëï‚ù6ú\>¶·ã”’–›ž £¦©¬­­†ƒ‘ ¦·ÊÄ®¡’‹šÁÍÏÐÒÔ­ž¦Ç·ÎÎÏæ§§¨©¼Ì€ã¯© ÇàÛÙØâœ‹J&&¬„þ¸€~}sL§µ±9 %G¸¸µN~ìåñ€ø€ù5\M´ºà“—œž¡£§ª¬¯­†wy{€¢¿¯†‰‹›ÂÎÐÑÔÖÉ  ½¸³ÏÑÒ稩©²Â߀屫«ªªÉáÝÚÙࣉT&&¬€ýþ´€~rL«¶®: b¸¹¥L–æßôø6ùù\S²ºÜ”˜Ÿ¡¤§ª­°±‡wz}¾¯ˆŠ‹ŽÄÏÑÓÕ×Ͳ©É¥²ÏÐÑ骪«ÀÐæ²¬¬«¬ÊäÞÛÚߦ‡X''¬„ý°€~qL¯¶¬< ¯~¹¹’L­àÜ÷€ø4[E°´à’“˜ž ¢¥§ª­°³Žy{}€ž¿°‰‹žÅÐÓÔ×ÙÉÌÊ®¤±ÏÏÐĪª«¶Æâçµ®®­¬ËåßÜÜß›…N''¬„ý­€€pL²·ª@ pš¹º€LÁÚÜ‚÷5øø[5®­Þš”™Ž“•˜›› £™€|~‚£À²ŠŒŽ‘ ÆÑÓÖØÙÆàȤ¥±ÍÎÏÆ«¬­ÃÕ‚èÀ¯¯®®¶ÈÛÞÛ߃D''¬„ü©€nL¶·§B @µººmMÔÕÞö€÷<\&¬«Ø¢”™„„†ˆŠx–™›‰ЍÁ±‹’¢ÇÒÕרÜ×ÝÛ©§¯ÌÍÎʬ­¹Éæéêêëëα±°€¯ ÝÞÝÞ…:''¬„ü¥€€mM¸¸¤D -4ºº»Z^ÖÐã‚öL÷÷\¦©Òª“š‡„‡‰‹wvŽšœŸ•œ¯Â­‹Ž’§ÉÔÖØÞäÉÙÞ§®ËÌÍÍ®°ÇØêêëëììè¶²²±°²àßÞ×€2((¬üƒû¢€‚lP¹¸¡F "P»»µMtÐÊé„ö4\–§Ë²“š‹…‡‰ŒŽ{tw†›Ÿ¬´¾ÃŒ’”«ÌÕÛáàÜ¿Ýßß­®ÉËÌͱ½Ìéìì‚íÔ´³²²¹áàÞÌ~|*((¬üƒûž€‚jS¹¹ŸH m»»£LˆËÅð‚õ3öö\‡¦Ä»“™‘…ˆŠuxzƒ¢®¹ÅÁ­¦£¢¨¿ÖÜÜÚÚÜÀÞàáÉ­ÉÉË̶ÉÜ€íîî€ïîÑ»´³ÆâáÞÀ}u—¬7¬üƒû›€ƒ‚hWººœJŽ Òˆ¼¼L›ÆÃƒõ7ööÈqnޤ´Ð“˜›‘“•—š“‹Ž™œžƒŒš¡§­²±´ÂÖÖØÙÛÛÁßàâã¼ÇÈÉËÁÎëíîïïðïíÙËÅÚãâܦ{žÿþúÞûƒú˜€ƒ‚gZºº™PŽ V¥¼½}L«¿Èƒô€õ3°­ª¢£× –›œž¡£¢Ÿ¢¬¯‚…ˆŠŒ’”«¿ÔרÚÛÙÄàáããÏÅÇÈÉÆØîïïð„ñðçÞääâÙ†yÆûùùüûƒú•€„ƒe]»»–SŽ 8#»½½iLººÏƒô‚õ2ó¦ŸÆµ–¡¦¨ª­¯±´¶¸«ƒ†ˆ‹’Ÿ´ÍÕØÙÛÜÖÈàââäØÃÆÇÈÊßîððñòó òñððìåäßÇwxëø„ù‘„ca»»”VŽ )>½½¾V]ÜÙçƒóƒô1½²Ê•›¡¦©«­°±³¶¸¢ƒ†‰‹Ž ²¼ÓÕ×ÙÚÜÓÌàâãäßÀÄÆÇÈßððòóóô óóòñêæåÛ¨u‘‚ø„ùŽ€…„bd¼¼YŽ Z½¾´LtÙÖìƒóƒô0×›ŸÕ™Ÿ¦©«®°±´¶¸°˜”ž§±ºÏÔÖØÚÛÜÐÑáâãåå¾ÂÄÅÅßðòòôƒõ ôóñéçå׈s¹‚÷„ø‹…`h½¼Ž\ ‹w¾¾¡LŠÖÓðƒòƒó1õ—ž£¨«®°²´¶¹»®¦¨ª¬³¼ÏÑÓÖØÙÛÜÌÔáâãåæ¾ÀÂÃÃàñòôõõ÷ öõôíèçßÈrqâ‚÷„øˆ€†…^k½½‹` „“¾¿L ÔÔ„ò„ó1¶—¤Ðž›¡¨«®°³´·¹»¾À¿¿ÇÊÍÏÑÔÖØÙÛÝÈ×áâäåçÀ¿ÀÂÁÞðóôõö÷€ø ÷öóêéçÕ”p‡ƒöƒ÷õ€‡††]o¾½ˆd G°¿¿zLµÑ׆ò‚ó0ä–”¾ºšŸ¥«®°³´·¹»¾ÀÃÅÈÊÍÏÒÔÖÙÚÛÝÅÚáâäåçÁ½¾ÀÁØðôõö÷ù øöîëéÞ¿pnσöƒ÷ò‡†[r¾¾…l 3+¿¿ÀfLÈÎÜ„ñ…ò<¹’›Î¢›¤©®°²µ¶¹¼¾ÀÃÅÈÊÍÏÒÔÖØÚÛÝÃÝáâäåçÄ»½¾ÀÓðóõöøùûûúùõìêçÒˆm‡ö€÷‡‡Yv¿¾‚q %HÀÀ¿RZÎËâ„ñ…ò<é”´¾› ¦­°²µ¶¹¼¾ÀÃÅÈÊÍÏÒÔÖØÚÛÝÁßáâäåçÆ¹º¼½Ðïóõöøùûûú÷îëêÛ´klÙ„õƒöꂈWy¿¿w eÀÀ²LqÌÈç„ð†ñ:¿Ž“Ë©ž£©¯²´·¸»½ÀÃÅÇÊÌÏÑÔÖØÙÛÜÁßáâäåçȶ¸¹»ÌîóõöøøúúùðíëåÍ|i‹…õƒö版U}À¿|} ÁÁžL‡ÉÅî„ð†ñ;ì•‹¡É¥ ¦¬²´·¹»½ÀÂÅÇÉÌÏÑÔÖ×ÙÛÙÄßàâãåæÊ´µ·¸Èíòôõ÷÷øøñìëçЙhi—Ä„ôƒõらS€ÀÀy„Œ cžÁŠLœÆÉ…ï‡ð;ÓŠ‰ªÄ¢¡©®´¶¹º¼¿ÂÄÇÉËÎÐÓÖרÚÕÅßàâãåæÍ²³´¶Ãëòóôõö÷ñìëèÒ©gf™²¼ƒôƒõàŠ‰Q„ÁÀw‹Œ >ºÂÂvL°ÃÏ…ïˆð;¼‡†´¾¢£ª°¶¸»¼¿ÂÄÆÉËÎÐÓÕרÚÒÉÞßáâäåЮ°±³ÁíñòóóôïêêéÖµjeŠÉÅ­¸‚óƒôÜ‚ŠO‡ÁÁt™Œ ,5ÂÂÃbOÀÀÕ‡ï‡ð,©„‡»·£¥ª±·º¼¾ÁÄÆÈÊÎÐÒÕרÚÏÌÞßáâãåÒ«±ÍÀ»îðñòòê€è Ú¾nd|ÍÌɸ}¤‚óƒôÙ‹ŠM‹ÂÁqŒ #QÂÃÁOaÀ½Ü…î‰ï+옂†¿¹¦§«±¹¼¾ÁÃÅÇÊÍÏÒÔÖ×ÙËÏÝÞàáãä×±Úéëèíîðîç€æ ×ÅxbpÍÔм€ð‚òƒóÕ‹‰LÂÂn­‹ $nÃðLv½ºå…î‰ï)ðä‹…¶¾©©¬³¸½ÀÂÅÇÊÌÎÑÓÕרÆÒÜÞßáâäâÞçééëìíé€ä ãиraeÈßØÃ‚¡ðƒòƒóÒŒ‡L“ÃÂkº‹ ŒÃÄ›L‰º¸ì…í‰î:ïï܉}~©Á­ª¬±·½ÁÃÆÉËÍÐÒÔÖØÃÔÛÝÞàáããåæçèéçáàáâÞʪhahÙÿÿ䆕íëð‚ñƒò΀Œ†L—ÃÃgÉ‹ O©ÄćL›·¾†í‰î€ï8å–zzšÁ³¬®°µºÁÅÇÊÌÏÑÔÖ׿×ÛÜÝßàâãäåæãÞÝÞßßÖÄ™b_xçÿÿ䈜ÏÍßÛî‚ñäç€òË…L›ÄÃdÚ‹ 5#ÂÄÅrL­µÆ†ì‰íîBë¦xw‹¾¾³¯±´¸½ÂÆÊÍÐÓÕÖ¼ÙÛÛÝÞààáßÜÚÚÛÜÜ×ɾƒ_^‹õÿÿ加âàÑÌÏÐóùúòàÜÜåòòÈ€Ž‚LŸÄÄaï‹ '>ÄÅÆ]Tµ²Ï†ì‰íƒî@ºwtv•º»³²µ·¹¾ÁÇÊÍÏÒÁØØ×ØØ××ÕÕ×רÙÖɼ’d]]”ýÿÿå‹§ðéäàÒäþÿÿøÞÚßÛÚäñÅŽL¢ÅÄ_‹ [ÅÆÁMg²¯×†ë‰ì„í?Ñrquš¼º·¶¸»½¿ÁÃÇÉËÍÌÎÎÏÑÒÓÔÕÕÑɾ™g\\h²ªÑÿå©ýõòéåùþÿÿûÞØÞèæÚØã€ŽL§ÅÅ['Š ayÅÆ®Lx¯¬â†ë‰ì…íìÀnnq•·¾¼»»½¿ÂÄÆÈÊÊÌÍ΀ÐÌÆ¿¸c\[e­êîқƧìóìîòö€ÿûÝÖÝ€èæØÖÌ}LªÆÅX MŠ n–ÆÇ™L‰¬¬êˆë‹ìƒíé³ukjjwª»¼¼¾¿ÁÀŠÄÃÂÀ¼¬Žp\[Z` åîÍŒ©íîïêÚí€ÿûÛÔÛ‚èæ×Ô¸{L¯ÆÆU Š D­ÇÇ„L˜©´‡ê‰ë‰ì诂hggfhŠ’›¤­µ®¤›‘ˆ|`\[ZZe¢æ„í ÞìííîîàëÿÿûÙÒÚ„è åÕÒ·yL³ÇÆR Ê 4 ÁÇÈnM¦¦¾‡ê‰ëŠìííݳ‰gdcbba``_^^]\\€[y§ÔìŠí€îùÿú×Ðâ†è åÓж‘wL·ÈÇN 6Š *1ÇÈÈYZ¦£È‡é‰êŠë‚ìèµ¥—‰ze^]\gtƒ‘Ÿ¯åëŠì€íÿúÖÎáÿÿ†è åÑεuL»ÈÇK Њ %FÇÈÀLj¤¡Ô‡é‰êŠëˆì ÏÚêˆëŠì€í½ÎÌßÿ†è åÐ̨M¿ÉÈH ߊ &\ÈÉ«Ly¡žà‡è‰éŠêˆë•Ùƒê‰ë‡ìéÉÊÞƒÿ†è åÎʘÄÉÈE 3Š((nÈÉ–Lt‘–—”‘Ž‹ˆ…‚{xvvuutwy|~ƒ†Œ›¨µÂÏÝéêˆëŒãŠêŠëìéÍÈÝ…ÿ†èåÌÈÈÊÉA Š/`ÉÊ€‚L NTX]adgikl€mjfgs€°Ëæ…ê‡éŠêŠëìÚǡÿ†èåÌÇÈÉ>‹`7ÇÊ¿±§“‰uj`UM„L NPRTVY[]_ace‰fg|–²Õ€êç‰èŠéŠêëèÊÅÛ‡ÿ†èäÊÅÇ<Œ#]ÅËÌÌÍÎÎÏÏÐÐÑÐÆ¼±§œ‘†|pfZO„L MOQSVXZ\^`bd‚fxžÅÙÞĬ¤Ÿ™’‘–™ ¥­¶¿ÉÒÛæ„êëëçÉÃÚ‡ÿ†èäÉà Œ&&&Ijwƒ‘žª·ÄÑÒÒÓÓÔÔÕÕÖÖ×רØÑÅ»¯¥™Ž‚wk`T…L NQSUWY[e~j‹Ž‘’œª¹ÇÕäé€êæÇÁØþ†ÿ†èäÇÁ…ŽO0# ‚!"$072.+(€)ƒ*+-4<3*Gau‰°Ã×ââ€á€àÝÓÆ¹­ ”ˆ{ocWMLLV§¹Óþ†ÿ†èäÀ¹$´ ª6É™uaSHHª3]-‚+ *3G[oƒ–ª¾ÑßÞÞÝÝÜÜÛÙÍÁ´ª³·Ñþ†ÿ†èã¾·ªÃ­Í‡dOB70+€*€).AUh|£¶ÉÚÜÛÛÚÚÙÖ»µÐþ†ÿ†èã½µÌ ìÿ—jUD93*'((€' *;Nauˆ›®À¸³Îþ†ÿ†èã¼³UÓA«uVE:1*€&€%1œ±Íþ†ÿ†è㺱ªÜ ØÈzZG:Fž¯Ëþ†ÿ†è㸯ã<Ò®Êþ†ÿ†è㸮 ªâ$ϬÉþ†ÿ†è㶬ãrΪÇþ†ÿ†è㵪UâY˨Æþ†ÿ†è㳨3ã?ʦÄþ†ÿ…èⱦ2ä“ǤÃý†ÿƒè⯤ÊÔåxÆ¢Áý†ÿèâ­¢§þçæ]Ä ¿ý†ÿèèᬠ£¢î†ç¸Âž¾ý†ÿ᪞¦¬¥Óè›Àœ¼ý„ÿö¬œ«´­¦Èë龚»ý‚ÿ õªš­Æ¸±«µ[êᾘ¹ý€ÿ õ¨˜®ÍÇÁ±¦©‘ëÒ»—¸ýÿõ§—³ÔÏÊĬ‘Úí´¹•¶ò¥•´áØÒ̧Åï ·“–“Ž¥¶»~qñªñµ‘æÚ“pf~²ô¿µÿÿÿÿÿÿÿüÿfù»R=459=BGO^xªÀÓ³—cP?0"Vø¿Ý t3*(&),6:>ADGILPXh…¾:‘Ôµ2$€#$Aczˆ–¤«²¹ÀÇÎÑÊÄ¿º´¯©¤Ÿ™“‚kPLU~ Ï>(€#$BSå™ÿ ò×·fLLMq?†È Ù+c½4¼4€#2GLºýžÿ ð¹sLKdBU˜kN‡LZm‰Ãiµz0##,LM¯£ÿí˜LJ6AÃ÷¿¸ÀÄÈË̽¯¡”†hMLLMbŒòh±N-##3LѦÿÎ`}åÿêˆÿ úÞ¿ ‚cMLVv¶­:)##:Mô§ÿíÅ‚ÿêŽÿ ùÙ»œNKa›P¿§P7%##Ab¨ÿâÀ‚ÿê“ÿ ûÓ¤wPIGHIK\x°+Ÿœ5€#H‚¨ÿѱ‚ÿê—ÿûÚ¥rNJ@5*##$(.Kj™g3##&L¢¨ÿÁ£þÿê›ÿüâ¶pL7‚#"ð˜N/##-L¨ÿ³œìÿêžÿ ûuLF90$##4˜>+##4Lâ¨ÿ§¡ÚÿêŸÿ ü«_LLK'#+i–o7(##\¢ÿþþ€ýþþ…ÿùô¢ÿâL$#,E•³9€$D|–ÿþñãààßÞåìòõøøôïêîóøøõðêÞÔÒ€Ñåü ÿÛL##,F•r6$$%Kœ•ÿôä€ßæîöôãÕÏËÆÇÉÉÊËÌÑÖÛåôöëÞÒÎÍÐèýžÿÕJ##-G•T3$$*L¼“ÿ%öåßÞßëöîÝÍÃÄÅÇÈÊÌÎÎÍÎÎÍÎÏÐÐ×ãïöçÐËÊÏëþœÿÏI$#.H•C/$$2LÜ‘ÿýèÞÝÞèõçÊÂÂÅÈËÍÏÐÑÒÓÔÕÕ€ÖÕÔÒ€ÓÙëõâËÇÇÑú›ÿÉH$$/K”E:+%%9Oùÿ*úâÝÜåóëÎÀÂÇÊÍÎÏÑÒÓÔÕÖÖרÙË×ÒÕÙÙ×ÕÖÖÝíóÛÆÄÉñšÿÃG$$/L” ;(%%?iÿ,öÞÛÝîîÑ¿ÁÇÊÌÎÏÐÑÓÓÕÖÖØÙÙÚÛÌÚÑÒÙÞÞÝÚØØÙàðìÈÁÃç™ÿ½F$$0M”“:€%F‰ÿ/ïÛÚÝñãÁÀÄÉÍÎÐÒÓÔÕÕÖÖØÙÙÚÛÜÜÎÜÓÔÜààáßßÜÚÛÚêñÌ¿¾Úþ—ÿ¶E$$1N”g7%%&L§ŽÿëÙÙàòÙ¾ÂÉÌÏÒÓÔÕרÙÚÚÜÚÚÛÜ€ÝÑÞÕÖ߀â àããáÞÝÝæóÓ¼»Î—ÿ°C$$1Q”N3%%-LÅÿ2ðØ×ãòϾÄËÏÒÔÖØÙÚÚÛÜÝÞßàßÞÝÝÞÛÎÞÕ×ãäååâåææäáßßäòÛº¹Ø–ÿªB$$2S”?.%%3LâŒÿõØÖâîþÇÍÑÓÕ×ÙÛÝÞ€àßààáàáßÜÜÕÈÛÉÌáãåæäç€è æäááâðÙ·¶ä•ÿ¤A%%2T“<*%&;Pü‹ÿ(ùØÕÜïȾÉÎÑÔÖÙÚÜßàáãäåäàááããäãÞÑÎÞËÐâããäáèê éçãâäñÍ´¶î”ÿž@%%4U“Ë='&&Aj‹ÿ$ýÛÔ×ðϾÉÏÒÔ×ÙÛÞàáâãäããååâäåææççÒÓàÌÓä€åáçèëìèääçñ²¹ö“ÿ˜?%%4Y“:€&Hˆ‹ÿ-ãÓÔìØ¼ÆÍÑÔ×ÙÜÞàááâããäææçæßãèééêÝÚâÏ׿ççååèééìí€îèææêì¹°¾“ÿ‘>%%5Z“\6&&(L¥Šÿ)õÒÑèá½ÄÌÑÔ×ÙÜÞßàâääåæèéêêëåßáèììàæäÐÛèèéãêë íïððîêèèí寭á’ÿ‹=%%5\“H2&&/LÊÿ)ÛÐÙí¾ÀËÐÓÖÙÜÞÞáãåäæèéêìííîíáâãëïâîêÒßêëëãì‚í îðòòðêéêïÊ«µý‘ÿ…<%%6^’‘=/&&6Là‰ÿ,ðÎÎéѾÈÎÒÕØÛÝÞáãäåæéêìíîîïððéãååîãòðÔãìííâîïï‚ð òôôñëëìê­©Ø‹ÿïvv€ÿ;&%7`’?>*&&€'Ch€ÿ€þƒÿ+êËËêÌ¿ÈÎÒÖÙÜÞßâäåçêìííîïððññòñçèéêÐõöæîððñâò€óƒô ÷÷õïîî뭤͊ÿçxwU9&&8d’o:€'I†ÿÿ„þ€ÿ,ÐÉÚâ¼ÄÊÐÔØÛÝÞáãäæéìíæÕÖ××ãñòóóèêëèÑó÷íñòóóâôõ†ö ùùóððîÑ¢¥ü‰ÿãxwT8&&9f’T6''+L£ÿÿ€ýþþ«€‰ ”ÇÇèÊ¿ÈÈÊÒÕ€Ø#ÝáæèëìíçÖ×רàïèäåÍÍÐæ×ñ÷ðõóôõâõ÷÷ðÚÚ€Û îøùûùòñðꤟâ‰ÿßyy€xR6&&:j’C3''1LÁÿÿ‚ýDv??@€ÅÍè½ÄÇÂÇÐÔ×ÒÔÔËÙéìíîçÖרÙÞîíÛÚº¼½ØÝòøñ÷öö÷ãöøùÙÉÉÊÊÏóùúüü÷óòì¹Â‰ÿÛyxQ5&&:l‘ Å?.''8LÞÿÿüü€ý2v?@@¨Ã×Ú½ÇÁÃÇÐÕ×ÒÖÎÌÏÙíîîíâßßàâïõßÔ¼½¾Ããó÷óø÷øøä÷ûòËÌÔÝûüüýúõôïÏ›£þˆÿ×zz€yO5&&;o‘ ë?*''>Nùÿþü4ýv?@NÁÁâËÀɼÅÈÐÖÖÓÓÊÍÑÓâîïðêæçèèñõî̽¿ÀÁ×õ÷õúùúøåøýÜÍ€ÎÐÛñþýööòå›™æˆÿÓ€zyyN4'&€'Efÿÿýûû€ü9v@@uÀÅè¿ÄÉ·ÇÉÎ×ÖÔËÌÎÒÔ×îðìãäåæíõööÊ¿ÀÂÄÈöøöûûüøçùõÏÎÎÏÏ×âç€äæÿúøöë®—™€œÙ„ÿÏ€{zzL3''=u‘c:'((K„ÿÿû;üüv@@™¿ÑÛ½ÆÆ¾ËÎÐÙÙ×ÑÌÏÓÕÖèðêÙÚÛÛæõ÷ôãÁÂÄÅÆßùøýýþ÷éùÝÎÎÏÏÑÜôÔÏüüùùïÇ–‰€M»„ÿ Ë||{{zL2''=x‘ M6((-L¡ÿúùúú€û1v@@§½×ѾÉÇÆÏÓÕÙÜÚÙÐÐÓÕÖäñêÙÛÛÜáñöòòÍÄÅÆÈÍûùþÿÿ÷éïÎÏØãÿÔÏéýùùòÕ”€N»„ÿÇ€|{xL0''>{ A2((3L¿ûõú ûûv@@²»ÚÍÀÊÎÐÔØÛÝßàâÕÐÓÖ×âñëÚÛÜÝâ€ñôêÆÆÈÊËçú€ÿöéÚÏÒÜõþÔÏ åþøøôÜ’‘RNN»„ÿ Ä}}||wL/''?~ ˆ@.((:LÚöò‚ú+ûv@C¹¹ÞÉÂËÏÑÔÙÛÞÞÙâÕÑÔÖ×âòëÛÜÝÞàéñóôöÔÈÊËÍÝú€ÿõã‚ÏÙåþþÔÏ äþøøõãXNN»„ÿÀ€}|vL.''@ƒ ¸@*((@Mïðïù,úúv@N¸·áÅÄËÏÒÔÙÜÞßÙÚÐÐÔרâòìÛÝÜÓÊèóôõ÷òËËÍÎâô€ÿõÕÏÓÜ÷þþÔÏ äþùø÷ä•^OO»‚þÿÿ¼€~}uL.''@‡x>€(Fcñëï‚ù+úv@[¶·ãÁÅÌÐÒÕØÜßàÜÙ¹¸ÆÔØãóìÙÎþÈèôõ÷øúØÍÎÒæê€ÿõ‚ÏÚç€þÔÏ äþú÷÷䜋dOO»„þ¸€~}sL-()@Š Z:(()K~ìåñ€ø€ù*v@f´ºá¾ÇÍÑÓÕ×ÜßàáÚº­®°µÎéܺ¼½¿Éêô÷øúûïÏÎÞÛç€ÿôÏÔÝù€þÔ€Ï Ðäþú÷÷壉jOO»€ýþ´€~rL,()@Ž H6((/L–æßôø,ùùvAk²ºß¾ÇÍÑÔÖ×Ûààáຮ¯±³ÈçÛº½¾ÀÊëö÷úûüòÚÓåÏå€ÿôÏÛéþÔ€Ï Ðäþú÷÷榇kOO»„ý°€~qL+(*A’@1))5L­àÜ÷€ø*vA`°´àÀÆÍÒÔÖØÚßàâä®°²´Éèܼ½ÀÁÌì÷ùúüþíïäÔÎä€ÿö€ÏÔÝúþÕÏ ãþú÷÷ã›…fPP¼„ý­€€pL*(*A˜ A.));LÁÚÜ‚÷,øøvAT®­ÞÃÆÍÆÇÉËÎÐÐÕ×ζ°³¶Íéݽ¿ÀÃÌíøùûýþéøèÎÏâ€ÿøÐÏÏÛê‚þÜÏ Õåõöõàƒ`PP¼„ü©€nL)(+Aœ ™A*))BMÔÕÞö€÷*vAI¬«ØÇÅν½¾ÀÃÄ®ÆÌÏн´»ÑêݽÀÁÄÎîøúüþþïùûÑÏà€ÿüÑÏÕÞú‚þçÏÏÐ ôöôÞ…ZPP¼„ü¥€€mL((+A¡k=€)H^ÖÐã‚ö,÷÷vAA§©ÒÉÄÎÀ½¿ÁÃÅ®¬ÃÏÒÔÊÉ×êÚ¾ÀÂÄÒïúûýýþçùýäÏ߀ÿþÖÐÜìƒýûÒÐ Òööñ×€VQQ¼üƒû¢€‚lK)(,B¦ R:))+LtÐÊé„ö*vAA›§ËÌÃνÀÁÄÆ²ª­¼ÏÔÝãêíÍ¿ÁÃÅÔòúýýþýàüýüÒÝÿÚÖßû„ýçÐ ÖööîÌ~}RQQ¼üƒûž€‚jJ))-B« D5))1LˆËÅð‚õ#öövAA¦ÄÏÁÍǾÀÂÄÆµ«®¯¶ÒÞèóïÝÖÓÑÕäùýþ€ýà€ýçÛÿÞÜî†ýâÓÐÐßõõêÀ}yª¼]¼üƒû›€ƒ‚hI)).B´Ž èB1))7L›ÆÃƒõ"ööÐ|z“¤´ÖÂÊÏÆÈÊÌÎĺ¼ÄÆÉ·¿ÎÔÙÝàÞàçúü€ýüàýãÿæßü†ýûçÛØíõõâ¦{žÿþûäûƒú˜€ƒ‚gH)).BºŽ ÏB-)*=L«¿Èƒô€õ°­ª¢£×ÆÇÑÎÏÑÓÕÒÈÊÍÖÙ·¹»½¿ÁÃÅÕæúü€ýùãýóÿìæ‰ý õíôõóÚ†yÆûùùüûƒú•€„ƒeG))/BÀŽ ƒA)**CLººÏƒô‚õó¦ŸÆÍÄÐÕÙÛÝßàÜßàâ×·¹»½ÀÁÄÌÚóûýöæýùþ€ÿñêŠýúôôêÇwxëø„ù‘„cF))/CÇŽ`=€*I]ÜÙçƒóƒô½²ÓÄÍÔÙÛÝßáÞÞáãзº¼½ÀÂÍØâùûýòêýúü€ÿóéŠý÷ôôá¨u‘‚ø„ùŽ€…„bE))0CÏŽ L9**-LtÙÖìƒóƒô×›ŸÕÆÈÒÙÛÝàâáÞáãÜÇÀ¿ÄËÑ×áöúûýïî‚üù€ÿôè‰ýüôôó؈s¹‚÷„ø‹…`D*)1CÚ çB5**3LŠÖÓðƒòƒóÃÌÅÏÖÜÝßáãßàâå×ÏÐÒÔÚäõ÷ù‚üêñ‚üø€ÿöçüˆý÷óóèÈrqâ‚÷„øˆ€†…^C**1Cã 3C1**9L ÔÔ„ò„ó¶—¤ÒÆÈÕÚÞßáäâáâåçéèçïñôöøù‚üæô‚üø€ÿúçû‡üûóóò×”p‡ƒöƒ÷õ€‡††]B**3Cí ¨C,**?LµÑ׆ò‚óä–”¾ÍÇÏØÞàáäåáãåçéëíðñóöøú‚üã÷‚üø€ÿýçú‡üöóóä¿pnσöƒ÷ò‡†[A**3C÷tA€*ELÈÎÜ„ñ…ò¹’›ÏÈÊÕÜàâãæäãåçéëíðñóõøúûüáú‚üøÿéù†üúòòïÒˆm‡ö€÷‡‡Y@**4D X<**+JZÎËâ„ñ…òé”´ÌÈÎØßâãåçãåçéëíðñóõøú‚ü߃üøÿëø…üûóòòß´klÙ„õƒöꂈW?**4D G8*+/LqÌÈç„ð†ñ¿Ž“ËÊÊÒÛáãåççåæéëíïñóõ÷úû€üû߃üøÿí÷„üûôòòëÍ|i‹…õƒö版U>**5D"Œ [C5++5L‡ÉÅî„ð†ñì•‹¡ÌÊÌÕÝãåçéçæéëíïñóõ÷ùû€üùâƒûøÿïö„ü õññîÑ™hi—Ä„ôƒõらS=**5D2Œ ãD0++;LœÆÉ…ï‡ðÓŠ‰ªËÌÍØßåçéêèèëìîñóõöùûöäƒû÷ÿñöƒü öññïÔ©gf™²¼ƒôƒõàŠ‰Q<++6DCŒ D,++AL°ÃÏ…ïˆð¼‡†´ÊÍÐÚáæèêìéêìîñòôöùú€ûóçƒû÷ÿ÷ø‚ûõ€ñ ÙµjeŠÉÅ­¸‚óƒôÜ‚ŠO;++7EVŒ gA++-GOÀÀÕ‡ï‡ð©„‡»ÊÏÐØáçêìíëìíðòôöøú€ûïëƒû÷ÿû÷øö‚ûó€ð Þ¾nd|ÍÌɸ}¤‚óƒôÙ‹ŠM:++8ElŒ P<+-/KaÀ½Ü…î‰ï옂†¿ÉÐÒØâèëíïííðñóõøù€ûìïƒû÷ùøûûú€ûùñ€ð ÛÅxbpÍÔм€ð‚òƒóÕ‹‰L:++8E‹‹ ‘D8-/5Lv½ºå…î‰ïðä‹…¶ÈÐÓØâèíïððïñòõ÷ùúûûèòƒûúùƒûö€ð îÓ¸raeÈßØÃ‚¡ðƒòƒóÒŒ‡L:-+9E§‹ lD5/0;L‰º¸ì…í‰îïï܉}~©ÅÏÔÖÝåìðòóòòôöøùûûäô‰û÷ð€ïê̪hahÙÿÿ䆕íëð‚ñƒò΀Œ†L:.-9EÉ‹ ·D202@L›·¾†í‰î€ïå–zzšÂÌÔ×Ûáéðóõõôõ÷ùûûâ÷‡û÷ðïßÅ™b_xçÿÿ䈜ÏÍßÛîñí±Â€òË…L;0.;Eð‹ zC024EL­µÆ†ì‰íîë¦xw‹¾ÅÑÙÛÝãéïô÷€øúûßúƒûú÷óïîåξƒ_^‹õÿÿ加âàÑÌÏÐóùú줕•½òòÈ€Ž‚L;20FW‹ J>458Lg²¯×†ë‰ì„íÑrquš¼ÉÓÞàâãæçêíïññðð„î"íáÒ¾™g\\h²ªÑÿå©ýõòéåùþÿÿõ¤’‘’’ºÂ€ŽL<53?FœŠ 0D<57=Lx¯¬â†ë‰ì…íìÀnnq•·¿ÈÔßåæèêë…íêÝÏÁ¸c\[e­êîқƧìóìîòö€ÿõ£‘‘‘‘¤}L=65@FŒ D:78AL‰¬¬êˆë‹ìƒí é³ukjjwª»ÄÉÎÓØÞãßÚÖÑÌǼ¬Žp\[Z` åîÍŒ©íîïêÚí€ÿô¡ƒ€ {L>86AFrŠ žE98:EL˜©´‡ê‰ë‰ì诂hggfhŠ’›¤­µ®¤›‘ˆ|`\[ZZe¢æ„í Þìííîîàëÿÿô Ž… ŽŽyL>:8AFŠ zE8:CLy¡žà‡è‰éŠêˆë•Ùƒê‰ë‡ì ⑈£ÕÜãéïö† ‰ˆpB@>EGÌŠ([A>@FLt‘–—”‘Ž‹ˆ…‚{xvvuutwy|~ƒ†Œ›¨µÂÏÝéêˆëŒãŠêŠë ì㓆žÉÏÖÜãéïö†‡†kA?EGŠkB?AH‚L NTX]adgikl€mjfgs€°Ëæ…ê‡éŠêŠë ì»…‰¼ÃÉÏÖÜãéïö††…kAFF‹ ÛDACEGIKKLMN€M…L NPRTVY[]_ace‰fg|–²Õ€êç‰èŠéŠêë⑃—¼ÃÉÐÖÝãêð÷†…ƒjFG‹UQEDFHIKMOPRTUW‚YXWVUSQOM„L MOQSVXZ\^`bd‚fxžÅÙÞĬ¤Ÿ™’‘–™ ¥­¶¿ÉÒÛæ„êëëá’‚–¼ÃÉÐÖÝãêð÷†„‚kGŒ&ªYFFHIJLNPRTWYZ\^_abdeghjkmljigdb_\YVRO…L NQSUWY[e~j‹Ž‘’œª¹ÇÕäé€ê à€”»ÃÉÐÖÝãêð÷†Ž‚€j±lPGGH(IIJMNPSUX[^adhknpqrtuvwxz{|}}yvrojgc^ZVQM€LSLLMRX_ekqw~„Љ‘š©·ÆÔÙ”»ÃÉÐÖÝãêð÷†ŽË …¼•}k`WRKJ€KL'MMNQTWZ^aeimquz~€‚ƒ„„……††‡‡ƒyppkf`[VQMƒL QX^djpw}ƒ‰„‘ •„}’»ÃÉÐÖÝãêð÷†Ž€}Èš ¼›'潟Œ|nd\U‚O€P€Q#RW[^bgkosx|zhXUUVc{ŠŠ‰‰ˆƒ~ysnid^ZUPM‚LQW]cipv|~|‘»ÃÉÐÖÝãêð÷†Ž|Ŧ ™–-êÁ¥€ri`XRS‚T!UZhxfT]ekpv{†ˆˆ‡†…„„ƒ€|vqmhc_ZVSO€L Psz»ÃÉÐÖÝãêð÷†Ž}zÀ³ w{“/íÅ©”‘UfºZƒU%W]bhlrw{‚€}|{yxwusojfduy»ÃÉÐÖÝãêð÷†Ž|y¾Ã f¡ÈŸ…qbWTT€SRSY^bfknruwwutrqonuwŽ»ÃÉÐÖÝãêð÷†Ž{wºUË ìø0Ùª‹tfYP€QPPQTX[_bdgjtv»ÃÉÐÖÝãêð÷†Žzv¸Ô ”`ó³xfZPNMPnt‹»ÃÉÐÖÝãêð÷†Žyt³UÜå¢Ö|kos‹»ÃÉÐÖÝãêð÷†xs±ã Uˆq‰»ÃÉÐÖÝãêð÷†vq®Uâ Hˆpˆ»ÃÉÐÖÝãêð÷†up«ã r„n‡»ÃÉÐÖÝãêð÷†tn§Uâ fƒm†»ÃÉÐÖÝãêð÷†smÆã Lk„»ÃÉÐÖÝãêð÷…qkÅä †€j„¼ÄÊÐ×Ýäêð÷ƒpj¡æ k~h‚¼ÄÊÐ×Ýäêð÷Œoh‚ýçæ]~g»ÄÊÐ×Ýäêð÷Œng¡î†ç{e€»ÄÊÐ×Ýäêð÷Œle‚«¥Óè{d»ÄÊÐ×Ýäêã|dˆ³­¦Èëécxb}»ÄÊÐ×Ý×xbŠÅ¸±«µ[ê¥xa|»ÄÊÐËtaŒÌÇÁ±¦©‘ë‡u_{»Ä¿p_ÔÏÊĬ‘Úíxt^z±n^’áØÒ̧Åï ¯r\_\k¤¶»~qñªð Ÿq[‘Ú“pf~²õÿÿÿÿÿÿÿüÿ™ù™¬llv~ˆ“¢Âú[>uÓ³—cP?0"Vø¿Ýñk^ZX[][ZZXVTPMLPXh…¾:‘ÔzhTSNczˆ–¤«²¹ÀÇÎÑÊÄ¿º´¯©¤Ÿ™“‚kPLU~ ÏZSNSå™ÿ ò×·fLLMq?†È Ù+c½4¼Ek€SPMLºýžÿð¹sLKp€ HˆLZm‰ÃiµÿfSSRLM¯£ÿí˜LMF/ašë‡²ÀÄÈË̽¯¡”†hMLLMbŒòh±¢aSSPLѦÿÎ`YÌûɈÿ úÞ¿ ‚cMLVv¶­w\SSOMô§ÿ휂öÇŽÿ ùÙ»œNKb›P¿§´pVSSNb¨ÿ│ñÅ“ÿ ûÓ¤wPKRa|¯Þ#«ÓŸBn€SM‚¨ÿу‚ìÁ—ÿûÚ¥rNLNPRSSXaoµj™ÔiSSRL¢¨ÿÁuæè½›ÿüâ¶pLP‚SUF˜ŸdSSQL¨ÿ³‚¾ã¸žÿûuLMOQ€St8—~_SSPLâ¨ÿ§Ž£Þ´Ÿÿü«_€LRS^×–qZSSORü¨ÿ“–Ù²ü¡ÿþèRRS^š–ÙrUSTNo©ÿ”˜‹Ô±ø£ÿNRS^’–o€TL©ÿ™Ï±ô¢ÿúLRS]–¾jTUTL¯¨ÿþ™‰¶€Ê¯ï¢ÿôLRS]‹–’eUURLϨÿ÷ š–€Å®ë¢ÿîLRS^‰–x`VVQLï«ÿðÐÐÁÀ¬æ¢ÿèLSS_Š•Ht[VWP\¢ÿþþ€ýþþƒÿúæÆâ¢ÿâLSS`Œ•ktXWWN|–ÿ þôéææååêðõø€ú€ù€ú øôîåÜÛÚÚÙëý ÿÛLTTa•èpWXXLœ•ÿöé€åëñ÷ù÷öõö‚õ€ö ÷÷øùøïäÚ××ÙìþžÿÕLUTb’•«kXXVL¼“ÿøê€åïøø÷öôõöö€÷ö÷øùøìÚÕÕÙïÿÏMUUd••ˆfYYULÜ‘ÿþì€äí÷øõö÷ö÷÷øùøùø€÷øçÕÒÒÚû›ÿÉMVUd—”¢uaYYSOùÿ ûèäãëõ÷õôôõõ÷÷€ø…ùëöïóöøø÷øõãÒÐÔôšÿÃMVVfš” v]ZZQiÿ ÷åâãò÷õôôõö÷ø‡ùë÷ííéïóöƒøñÓÎÎì™ÿ½NWWgž”-uZZ[N‰ÿ óââåôöôôõõöø‡ùúúëøííé€í ñùùøø÷÷ô×ÌÌâþ—ÿ¶NXWh ”Îp[[ZL§Žÿ îáàçöõóõõ÷÷ùú‚ùúìøíìêíûûú€ø÷öÜÊÉØ—ÿ°OXXi¤”œl[\YLÅÿ óààéöôóõö÷øù†ú ùùúú÷éøëéì€íï€üúù€øöãÉÈà–ÿªOYXj§”€h\\WLâŒÿ ÷àÞèöóóö÷ø€ù€úûû„úû€ú òåöÞÖßäéìðüúù€øöáÆÅé•ÿ¤PYYk«“?xc]]TPü‹ÿ ûáÞãõóó÷÷øùù€úƒûúƒûúúíé÷ßÖ€ÜÝëû‚üúùùøõØÄÆñ”ÿžPZZl®“›y_]]Qj‹ÿýãÝà€ó öøøùùúúûûú€ûúûüûúûû€üûëíøßÕÚ€Ûêûû‚üúùùøôÎÂÇø“ÿ˜QZZn²”v€^Nˆ‹ÿéÜÝðóóö÷øùùúúûúûûú„ûúûû€üðñøàÕ€Ú×òûû€ü€ýúùù÷ðÈÀÌ“ÿ‘Q[[n¶“¸q€^L¥Šÿ ÷ÛÚíôóõ÷øùùú‚ûƒüûúûüýýð÷ùàÔÙÙÚÔûƒü ýýûúùùö뿾ç’ÿ‹R\[oº“’m__ZLÊÿ ãÚáóòó÷øùùú‚û€üýü€ûüýïûûàÕ€ÛÕƒüýýþþü€ùôÕ½Äý‘ÿ…S\\q½’H{i_`XLà‰ÿ óØØîóòö÷øùú‚û€üƒýü€ûüîýüàÕ€ÜÖ†ý þþüúúøï¾ºà‹ÿïvv€ÿT]\qÁ’„ze``UOûˆÿ þÝÖáóòô÷øùù€ú‚û€ü„ýüûëþþåØÝÞÞׇý þþûúúõظ½úŠÿë€wvvVU]]sÅ’I{€aQh€ÿ€þƒÿ ïÖÖïòóõ÷øù€ú‚û€ü†ýûûüüàýþèÝ€ßØýý‡þýúú÷ð½·×ŠÿçxwUU^^tÊ’ßw€aN†ÿÿ„þ€ÿ ÚÔáññô÷øùù€úû€üøììííôý ûüüøáþþëáààáÙýˆþÿûúúôÚµ·ý‰ÿãxwTV_^tÏ’¨sab`L£ÿÿ€ýþþÆ®¯¯¶ÓÓîòóõóõ€÷ööøùû€üýøì€í ðû÷ôôééêõåýýìå€âÚüþþù‚ì øþþÿýúúùð¸³è‰ÿßyy€xRW__vÓ’‡obb]LÁÿÿ‚ý¢€}¦Ñ×ðñôôïñõööòóñêóüüýýøì€í îùùîìÜÜÝêéýþíé€ãÙûþþêà ã÷ýþþÿüúúòȱωÿÛyxQX`_wÙ‘ –|jccYLÞÿÿüü€ý¢}}~¿ÐàðòôðïðôöõòóíëëðüýýûòîùþïéÜÝÝÞíþþîëäåãÜúþù‚àÝßý€þýúúôÚ°¶þˆÿ×zz€yOY``wÞ‘ Õ|fcdUNùÿþüý¢}~‡ÏÎèðóõìððôöõóðêëëìõ€ý÷òúþøä€Ý ÞæýýîíææáÞùÿêáàÜòÿþúú÷ë°®ëˆÿÓ€zyyNZaayä‘|€dQfÿÿýûû€ü¢}~ŸÎÒîñôõéððóöôóìëëììíüýúôùþþýâÝÝÞÞßüþïíççááùù‚áÞâð€îðÿüúúï¿­¶€Ãè„ÿÏ€{zzL[aayê‘ÆwddeM„ÿÿûüü¢~~´ÌÚîñôñéðñòõõò€ë€ìöýø€íîôýþþòÝ€Þ ßëþðíééßã÷êáàÜôåâüýúúóÒ«¦€“Ö„ÿ Ë||{{zL\bb{ï‘ šseeaL¡ÿúùúú€û¢~~½Ëàîòõñîóõõööóòìë€ìòýø€íîîù€ý âÞÞßßàýñîêêàãñ‚áÝãÿäâéþúúõݪ¨€”Ö„ÿÇ€|{xL]cb{÷‘pef^L¿ûõúûû¢~~ÃÉâïòõ÷øøù‚úð€ìíðýùíí€îøüüýõÞ€ßàïñìëëàãçáàÜõþäâ åþúúö㨧•””Ö„ÿ Ä}}||wL_cc|ÿ ~lffZLÚöò‚ú û¢~ÈÈåïòö÷øø€ú ùùúðììííïýøí€îìôü€ýäßßààéî€ìàâáâÝåþþäâ äÿúú÷駦—••Ö„ÿÀ€}|vL_dc~ o~hfgUMïðïùúú¢~ˆÆÆèïóõ÷øøù€úøøîììííïýùîîíèàóýøß€àíé€í áâááââàÜ÷þþäâ äþúùùꫤ™••Ö‚þÿÿ¼€~}uLadd~ ï}€gQcñëï‚ù ú¢ÅÆéðóõ€øù€úùøãßåìíïýøìæßÝÞó‚ýåààãïá€îâáá€âÝç€þåâ äþûùùê±£š••Ö„þ¸€~}sLbee~ ´xghgM~ìåñ€ø€ù ¢•ÃÈèïôõ÷øøùù€úùãÙÚÚÜâúòÜÜÝÝÞóüü€ýòàáëé߀ðãá€âàÝù€þåâ äþûùùë¶¡›––×€ýþ´€~rLcef uhhdL–æßôø ùù¢˜ÂÉèðóõ€øùùû€úã€ÚÛßúòÜ€ÝÞóü€ýþòãäïâÞ€î‚âÝéþåâ äþûùù븠›––ׄý°€~qLdfh% ß~qhi_L­àÜ÷€ø ¢’ÀÄçðòõøø€ùúæ€ÚÛßûòÜ€ÝÞó€ýþþíðîåáÝ€ìááââàÝúþæââããäþûùùé°žš——ׄý­€€pLfgh- €niiZLÁÚÜ‚÷ øø¢‹¾¾åîòõïð ñðòòëÝÚÛÛàûò€ÝÞÞóýý€þéøîááÜ€êáàââÝê‚þé‚ã ïøø÷æ§œ™——ׄü©€nLfgj€52€€jUMÔÕÞö€÷¢„½½áíòõéèééêêÜèëìêàÛÜäúñ€ÝÞÞóýý€þïùüááÛ€çãÞâàÞú‚þðƒã ÷øö埛™˜˜×„ü¥€€mLhhj€A Õ|jjkP^ÖÐã‚ö!÷÷¢€€¹»ÛìñõëèééêêÜÚåììíæÞêúïÝÝÞÞßôýþçùýëáÚ€åäÛâÝìƒýü‚ãäøøôßš™€˜×üƒû¢€‚lMihl€K £yjkiLtÐÊé„ö ¢€€³º×ëñõì€éêêÞÙÙáêíîîøúçÝÝÞÞßö€ýþýàüýýâÚãÚàßû„ýìãçøøò×™˜€™Øüƒûž€‚jNiilU †vkkeLˆËÅð‚õ öö¢€€«¸Ðèïôï€éêêàÙÚÚÜæíôýùîéçåçéüþþ€ýà€ýíÙáÙÝî†ýãáããì÷÷ïΗ—ÍØ Øüƒû›€ƒ‚hOjincŽ Ãrkl_L›ÆÃƒõ ööÝŒ¥·Ãäðòô€êëëãÛÜÝÝÞÜàæéëìîìëê‚ýüàýÚÞ×Þü†ýûçÛÝð÷÷踖²ÿþýïûƒú˜€ƒ‚gPjjnoŽ ™ollZL«¿Èƒô€õ °­¯µ¶ßíñõðî€ïìääæíñÛÜÜÝÝÞÞßßéüýùãýçÜÖã‰ý õíö÷ö។Ñûùùüûƒú•€„ƒeQkjo‚|Ž lmmULººÏƒô‚õô¸³Òèïô÷ø€ùø÷øøùñ€ÜÝÝÞÞßßö‚ýöæýïÙ€ÚÖäŠýû÷÷îÓ“”îø„ù‘„cRkkp‚޽}€mO]ÜÙçƒóƒôʱÂâïóöøù€ø ùìÜÜÝÝÞÞßßçü‚ýòêýöÕ€ØÕãŠýùöö繑§‚ø„ùŽ€…„bSlkq‚œŽ —zmnkLtÙÖìƒóƒôÞ°³Ýíñô÷‚ù øøùóâÝÝÞÞßßçúü‚ýïîüûÒ€ÕÒâ‰ýü€öß Æ‚÷„ø‹…`Tllsƒ¬ ¹‚vnnfLŠÖÓðƒòƒóð°®Ðæïóö€ùúúøéßÞßßäëû„üêñ‚üÒ€ÓÐâüˆýùööíÓŽæ‚÷„øˆ€†…^UmlsƒÀ c‚tno`L ÔÔ„ò„ó Ä­·Ýìðôøùùúúù€øùùöóúûû…üæô‚üÓ€ÑÎàú‡üûööõßªŽŸƒöƒ÷õ€‡††]VmmuƒÓ IƒpooZLµÑ׆ò‚ó 謪Ëãïòöùù€ú€øùù€úûû…üã÷‚üÕ€ÏÎÛù‡ü÷õõê̌׃öƒ÷ò‡†[Wnnu„è äoopTLÈÎÜ„ñ…òÆ©¯Ùëïô÷ù€ú€øùù€úûƒüáú‚ü×Í×ø†üûõõóÜ ‹¦‡ö€÷‡‡YYnnv„Ž­~€pNZÎËâ„ñ…ò몧Äàïñôø€úùøøùù€úûƒü߃üÙÊÕ÷…üûöõõæÃŠŠß„õƒöꂈWZoow„ ‹{pplLqÌÈç„ð†ñË¥©Õèïòöùúøùù‚ú€ûüû߃üÜÈÒö…üöôôï×—ˆ£…õƒö版U[oox„8Œ £ƒxqqfL‡ÉÅî„ð†ñíª£´Øêîòö€úû€ù‚ú€ûüùâƒûÞÆÏõ„ü ÷ôôñÛ®‡ˆ«Î„ôƒõらS\ppy…VŒ À„uqq`LœÆÉ…ï‡ðÚ¡¡¼Ùìïô÷úúûúùø€ùúú„ûöäƒûáÄÌôƒü øôôóݺ†…®Â§ÈƒôƒõàŠ‰Q^qpz…}Œ„€rZL°ÃÏ…ïˆð ÈŸŸÃÜîïó÷úûûúø€ùúú„ûóçƒûäÁÍ÷‚û÷€ô áň„¢ÔѾ›Æ‚óƒôÜ‚ŠO_qqz…£Œ ÌrrsSOÀÀÕ‡ï‡ð ¹ŸÉßîîòöùûûú€ù€úƒûïëƒûç¿ÃÞÐÉ‚ûö€ó æÌŒƒ—ØØÔÆ˜¶‚óƒôÙ‹ŠM`rq{…ÎŒ ž~rssMaÀ½Ü…î‰ïí­›ŸÍÝíïòöùúûûúù‚úûìïƒûíÆíûû÷€ûúô€ó ãÑ“‚ØÞÛË›°ð‚òƒóÕ‹‰Lbrr|†Œ ¶…|stnLv½ºå…î‰ïðç¡™žÅØìîñõøûûüúù‚ú€ûèòƒûøóƒû÷€ó ñÝÆ…ÓåáМµðƒòƒóÒŒ‡Ldsr}†>‹ È„ytuhL‰º¸ì…í‰îïïá¡—™»Ôèîïòöùûüûúù€ú€ûäô‰ûøô€óî×¼†€‡àÿÿêž«ðîð‚ñƒò΀Œ†Lfts~†‹ h…wuvaL›·¾†í‰î€ï窕”¯Ïáíîïò÷úüüû€ú€ûâ÷‡ûøóòåÑ­“ìÿÿê ±ÚØæâïñèc‰€òË…Lhut†Ì‹ ð„uvwZL­µÆ†ì‰íîì·““£ÊÔåîïïóõøúüüûúûûßúƒûúøõ‚òê×Ëœ~£÷ÿÿ꡵éæÛÖÙÙóùúãL++€ñòÈ€Ž‚Livu‡'‹ µ‚vwxRTµ²Ï†ì‰íƒîÆ’‘’«ÈÖèïòôøúûúúçûùø÷÷öõƒñìÙʨ„~ªýÿÿ꣺ôîêæÜéþÿÿéL+(+ðÅŽLkwv€‡•‹ ’wxwLg²¯×†ë‰ì„í כޒ®ÊÙãîï‚ðñóôóóò…ñ!çÛË®†~}‡À»ÚÿꤹþøõîëûþÿÿìN+&+Á€ŽLmxw‡'Š <…}xyqLx¯¬â†ë‰ì…í ìÊ™Œ‹Ž«ÆÌÖáìï€ð†ñîäØÍǧ„}}…¼ëîÙ¯Ò¤¸íôðóõø€ÿëM+€&+i}Lpyx‚‡ÒŠ ÷…|yziL‰¬¬êˆë‹ìƒí êÁ‘Љ‰“§»ÊÒÖÚÞáæéæâÞÛ×Òʽ¥Ž}}|€²çîÕ¤¹íîïìáñ€ÿëM+‚&+U{Lrzyƒˆ²Š 8…{z{bL˜©´‡ê‰ë‰ìé½›‡††…‡š¢©°¶¾Ä¾·°¨ —}}||„´è„í âìííîîäîÿÿëL*„ %*TyLt{zƒˆáŠ ð…z{|ZM¦¦¾‡ê‰ëŠìííáÀ †ƒƒ‚‚€€~~}}|}”·ÙìŠí€îúÿêK*c† %*T‘wLv|{„ˆ‘Š Ã…{|}QZ¦£È‡é‰êŠë‚ìé¶«Ÿ”ƒ~~…›¦°½æëŠì€íÿêK*V®Â† %*TuLy}|…ˆEŠ ¦ƒ|}zLj¤¡Ô‡é‰êŠëˆì ÏÞ‰ëŠì€í¸F*HŠ°Â† $*GL{~}†ˆßŠ §‚}~sLy¡žà‡è‰éŠêˆë•Ùƒê‰ë‡ì ØC*:fx‹°Â†$*8}~†ˆ‹(²‚~jLt‘–—”‘Ž‹ˆ…‚{xvvuutwy|~ƒ†Œ›¨µÂÏÝéêˆëŒãŠêŠë ìÛC*,ASfx‹°Â†$*L‡‰ŠÒƒ€b‚L NTX]adgikl€mjfgs€°Ëæ…ê‡éŠêŠë ì*(.ASfx‹°Â†$*L‡ˆ‹®…€}xtplhd_ZUP…L NPRTVY[]_ace‰fg|–²Õ€êç‰èŠéŠêëÚC*.ASfx‹°Â†$*L†Š‹*ž„‚ƒ„…†‡ˆ‰Š‹Œ‰„€{vpkf`ZTN„L MOQSVXZ\^`bd‚fxžÅÙÞĬ¤Ÿ™’‘–™ ¥­¶¿ÉÒÛæ„êëëØG*.ASfx‹°Â†$*N‰Œ*­ˆ€‡ ˆ‰‰Š‹ŒŽ‘’“”•–—˜™š›–‘‹…ysle_XQ…L NQSUWY[e~j‹Ž‘’œª¹ÇÕäé€ê ×H*.ASfx‹°Â†$*M\Ô›‰€Š*‹‹ŒŒ‘““•–˜™šœžŸ ¡¡¢££¤¥£•‡yrkc\TM€LSLLMRX_ekqw~„Љ‘š©·ÆÔÑH*.ASfx‹°Â†$*B$ùío#òÏ»ª’Ž‘‘’’““•–—˜š›ž ¢£¤¥§¨¨€©€ª€« ¤”Œ…}ume]UMƒL QX^djpw}ƒ‰„‘ =).ASfx‹°Â†#)@šÆB;¸l3 íÔÀ°¢—•€–——˜˜™™š›Ÿ ¢£¤¦§¨¨£Ÿ£©­­¬¬«¥œ”Œƒ{skc[TM‚LQW]cipv|z8).ASfx‹°Â†#)@§ Uö <½s<óÙǵ¨œ€€ž2Ÿ©Ä⾞¢£¥§¨©««¬¬««ª©©¨§Ÿ—‡wohaYRMLLI/).ASfx‹°Â†")?´ U±:¿wAåa«  ‚Ÿ$ ¢£¤¥¦§¨¨§§¦¥¤££¢¡ ž–‡x6).ASfx‹°Â†")?U [{-úÖº¥€ œœ››œžŸ ¡¡¢¢¡ Ÿžœ‘<)/ATfy‹ž°Ã†")?UË 6¶BœBÝ¿¨š™™˜˜€—˜€™šš<)/ATfy‹ž°Ã†")>UÓæžÆXåë—•””““Š;)/BTgyŒž±Ã†")>UÜf%ôp!î³8)/BTgyŒž±Ã†")>Uâ æ0)/BTgyŒž±Ã†")>Uâ æ0)/BTgyŒž±Ã†")=Uã 0)/BTgyŒž±Ã†")=Uâ ò/(/BTgyŒž±Ã†!(Gã ò/(/BTgyŒž±Ã…"(Hä /(/BTgyŒž±Ãƒ"(rå 0(/BTgyŒž±Ã"(_ýçæ 0(/BTgyŒž±Ã"(^µò‘ç*0(/BTgyŒž±Ã"(a½¸Þ«è*0(/BTgyŒž¤A(gþ¸Õé*0(0BUgz‚;(jÐÇÁ¼Ä£êK2(0BUa5(lÖÓÎÁ¸½mëK2(0@/(qÝÙÕн§(íK0(*(sçàÜÖº›ïï _/'&'T·Åʱš6ªð _/'@¾‘…ªñâó¿tÿÿÿÿÿÿÿüt8mk@ ØþýêÛ̽«pQ1%%),/269íÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ;ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ8Jÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ5wÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ2¥ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ/Óÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ,úÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ)/ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ&]ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ#‹ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ¹ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿæÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿCÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿlÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿŒÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ¬ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÊÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÉÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ¾ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ¡ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿþOÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿûÖÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿø Åÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿûc¢ßÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿž.G`y’«¾Ñãöÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿž .@SexŠœ¯ÁÔæøÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿŸ 1CVhzŸ²Ä×éûÿÿÿÿÿÿÿÿÿÿîͲÒþÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ !4FYk}“? sìÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ¡4Ok†¡¼×òÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ¡*E`{–±Íèýÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ¢:UpŒ§ÂÝ÷ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ£/Kfœ½÷ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ¤Òÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ¤Òÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ¥Ñÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ¦Ñÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ‹Ðÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ‰ÐÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿòÏÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ+Îÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿü]Îÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿø†ÍÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿúgÍÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ5ÌÿÿÿÿÿÿÿÿÿÿÿÿÿÿýòÌÿÿÿÿÿÿÿÿÿÿÿÿÿÿLËÿÿÿÿÿÿÿÿÿÿÿû ËÿÿÿýÿÿÿÿùøqÊÿž}¶ìúÃ…Sdjview4/src/images/DjVuApp.ico000066400000000000000000000163561174072760700165210ustar00rootroot0000000000000000¨6 ¨Þh†(0`€ ÿÿÿå®yYU$¥oÈðõÉ“f0BŽpµ²ÔÂ@x£jikÀ¢‘èøÅ;Þ|;ÈžV0s3z9Çÿeƒ“¤¹Žk¦Í"~ÁÛǵMVqNšPBi‹ãÿݳÛÙÙÛæ›Èþ·À²²«‰xynúà­ôóãU“¾…C9Y(‡v1¦–×¥už^Hƒ¨»ÎYX[Sv½ÒÿÒh0bŒnn¡¡¡uQIÊÊÊöâÌd±å‘ToŸbaÒ² o,¼z;R9´îß‘ž\Msáêð˜~~;„·bUsbÔÿáÿ᥎ŽÅÞÎæÒ¤üùÓåݹšd—0Ì`2›'¤ãSATo`†vG­·¤¢áó±€@fúìÂ^izê¿…Bo’ÚÐËtk{žu_t±Ù~ižîÿîÄñÇɽ¼j.‰ôÖ¼„„„U7‚Üî௭±èää¦qŒøÖ sKÉ‚š›g¨¥}nýýæ_,kòïÒT%™^B§µ¿k-±ìâ¢àリ—šŸ‡‡ñç¾bpâáÈõôóõͧt¹æ+|¹q/˜x4ˆåÝÓ±™‹v<»“X}v7`ÛןãùÍÓÿÁd-z.~ˆmª_Lx®š™jaxn2m¤kxŒ›±§Î¼ÖÑÑb©×~=F ‘ÎÌßÙÞÿÉáÊ›gR…Z3©©©xvw•]ŠîìÇè̶æðÛ»»»íÚ°ve6•ÔQbîíìòä׋KJ•ã_&®žu¨]UgâÒ¬q5Ye/¥Ÿ`VÑÆÅÙóÓz7kÝâ¨úç¸ëË•úúÜw3ÄQ-Žîú×ųªýýñb8“c.VñÃúñÉfT}%y¹Ü»ˆñâÀÓÄ·ËñÏŠI?pB¦}~}õÛ¦___rrrQ=r³³³`)•+„ÃéäÔ}C¹g0LåÒÆmP‘tK¤ñО¶ œìౘl³®‘†]Emƶµ‘ttÜí¥g)¶èϽñί÷áµ¥†|æõ½ãÞÛìݹùôÕ÷Û«hcoˆF0U&žãë³·œ‘[?€ã×µäÌ­ûûúá×À£€vWCt÷ЙðÇ›k³á–t¯ˆˆ‰÷öí˜C-´S˜E&a*E€“*E€*EÅY*EÅ?9{Lm/*E?³9’i+®ý^¦Q *EË«¨8† LmÞÞ^¦Qîî ПÍd3ÒÊOE€ÖRÚÙœÄD¯.....ÏÏ Ò•¤•ÊÊ55•©©©]OEŒ4UÌÐ3ggÒžžž333ÒÊ5©©©©Ò©©©©©©©©©©–=EÔkï<…Ÿ5©©©©©©©©©©©©©©h!SBGS!h©©©©©©}üMW'—» Ê©©©©©©©©©©©©aGyS¾ÈȾÜBya©©•©©ö7¬§l '»D¤©©©©©©©©©©•BëzÃqqqqÕZG2ah•©}ö7¬t »')óÒ©©©©©©©©©aG¥¸ÃÃJ¡ºººº%%´â´h´h©}A¤ »'‚Àžh©©©©©©©´õí¸VÃÃJ¡ºº½º%ÿ%êBá´´}}}}Ê ;—¶²xê©©©©©©õθ¸VÃJJ¡ºo‰ µ¿¿ÿêBá!}}}}Êþ ;—<;d©©©}}©Î$¸¸VÃJºqºo‰ µ¿öö}ZB©}}}}5þ u—;[}}}}}´áÛí$ç¸VÃJºìºo‰Šµ¿¿öö%Sa}}}}5þÐu—uŽê}}}}}SõÛ$$çIIëJJºqo‰Š£¿¿¿¿ÿêy}}}ö5dÐu—ó¤©}}©áûjÎíçÆÆ>zJºqo‰š£¿¿¿¿¿%hööö•dв<ÀÒ©}}„è¹>IÎIݺº¡ºwš|¿¿¿%÷%a¾:öödв<‡²3h}}\ߢÂXX¹›çÆ›JºqKw‰ô%ooô°qZ\öödÐN<—ä©öö\Ü¢újÎ¥Æ>JJ¡° °|oq°ôºƒøöêÍÐN<ä[}öö\S¢jÎí>ç>>ÃJ°¥ I°ºqõôºÕèhÍÐN±²Žöö\òåújí¹IV¥ëÃz›I °IKÃIôºƒnhÍбbehöö\"ØÂÂúÛ¹IV¥Çì›>¥ é¡›IzIzJZ\©ÍŸ±‘5\s´ÂXÛ¹íVÇÇÃ>>ÃéTÃI›ôJJìá©©Íб±²žÈ ´æÂúj$¸¸I¥V¥¥VñT¡VÝzJÃq!}ŸŸe±­hƒÂjÎ$¸VVV¸¸V·ãzÃÃÃÃÃZê}ŸŸe1­[cúj$$$¸¸ç¸çˆÝVVVVªae1Óùö}ê~újÎ$$$$$Iˆݸ¸¸6´©ó1‹eh©h~újjjÎÎíÛIvθç6Zh,11Ê}hcÂúújjjÛÛÎÎí6•©œ1×ð3}h©cúúÛÛ~6h•}œpþ}h©ª666ªªê©Qpð©™0`¦p(Ñö5”0É#ppe Fµ}x,pÁ¼Ê©H_fögŽrrð3hHöf}¤x©5ÍP@ÍÐÐ×(à[[ŸŸŸŸŸÍÍdÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÁÿÿÿÿÿÿÿÿÿÿÿÿÿÿþÿÿÿÿüÿÿÿÿðÿÿÿøÿÿ„à€€€€€€ÀÀÀÀÀÀàààààððððððøøøøø?øÿü‡ÿÿüÿÿÿÿÿÿÿÿÿ( @€ÿÿÿ‘é¬|bßÿW,ôË’Kƒ¬ª¢¸E²íÌÞÑ|a€ýòÈq¬ÏŒ‘œÅáÊ«šàéªGžÌ}:xâüâ„m£Ë½»³•‡sH™˜†°¼ÚîîØÆz½é4‡ÃbI€Mf¶ùÞ©žŸŸµÛ•gyãõ×åäàßûïâäÆ¦ã¾‰n2·¤£µµµ †×ÈÄÐêîòƒ„ƒÙоyb–ÓüÓ‚Nxˆlôæ»EÄøéÚ¡ÙÒÒ€ž~A‰Ê¸«éζïè̦³½½Ÿ‘ùõòZ(qgAq0}ûúת«ªâÇ•™¤ ’¶¹zäÝ´åõÕóÍ¡BˆÇ¼¬ªÕŬÑÅÅh£ÉîéçrX ᎂ‰}nƒúØžãèÅ–Ëëe/†Ä¶´ÁÂÁðâØÞëØìí¶ßýËŽhƒóÕ¶jO•åÕ«ÜÜÛÞÞ õòÓìúÇxk˜éΠûùç°ž›sT™ë˱¨¾ëÝÏüå³àÕÉÀ«žñâ§ðïïåçèe,|ëÚ¯»¼»þýôíòÁãòãY€ëêÜÑÒÑÓ»¬ÅãÌËËËüë¾óß³õקñ¨¤¤§õêÃçáÅ““•úúúéç«gJèõº‰{†”Œž°°°™˜ž±Ž}À¥˜§¨³o0‡ýùÏ÷М„…‡g6Ž×××¾Èúûá’„«ÚȾm8”eG†òãÂâÛÚïÓ¡ŠzŸ›‹²ÔÊÊI¸òàúÔöõ×|<„lA‘ôÝ»ñã¹íÞÈìÖ¨[+{_3…0ÂDºîÜǪ¨¤­íÉŸ ‹Þ÷ìÎøðëze›ØúÍçΪííìæßÔèÛÁäÍÆÊÍwbè߸ûæ·éíÀŠÚóóòêääàßßäڻƹ¸¾ª¤Á±¯qP”òï艓åÔ§äÕ²ÛÑËø÷äï˦Iu‰i‰úíÄÌÂÂ÷÷ö’Ž™üõÎäã゙ƬžqD•yfõԞ˹¯éééúâ±úÙ¢øÔ¡ìÏœ”€®³ ŸüüøúíßèôăR{’h}ôîÇðíË­¥½£–¶Ä¨˜iC‹FÂõù÷Ò®~füüñø÷êùúÛéÜÖöФµ –ø ø©-´7©¹#ñbÙÙ5jN7©¹Ø4ð~~~ ãWVÒÒÝ“ˆ,?7©È;Tà‘ÝÒ‹!Fz€œ€ËËwæ¿vµ©¹¬Äƒæææææ¿¿æ9\+m+OÛß¿æwZ UÐ]¿¿¿¿¿¿fOtPÌŠŠ1‡ìÍ9Ê/%Ršââ,¿¿¿¿v9ζ6 ù«žžÖÀOÍQ¤/Ú­¡·¿vvɡ¾ÆÚÞE«žaªûÑÏ+¨ÉÜ€š­*H¿ÉÉv(çÆÚÞE«ža½ííS+¤ÜŒœ0÷—¦æÉÜ&†ç…y‰E«žaªíí{ÕÛŒŒœ0÷D2fÜ&Í(ä¥kGÓùEýaLû{ü\SŒf0÷ЀŒá¸o)G±Âòýó$YÖlÁ>‡JAË0¢­ƒŒá@Mä†)kG6ùÅïK>«Ôh<úAß0¢›á@Mé ê…y‰6eiKÔ>eh<Aw0¢[pö”×ä¥6£ºÂyiÇÓK¯ùåíæ0x§ •=ä „¯‰±6|¯¯˜>9æ0ŒŒþMX Æ„„„6` sSÉ,2nvÉ™X rrÆ…g„„°¤ëCËv™™è †8uư¤Œ³.É^cÿéé醮qÊŒ§²ôŒÉ»'îî_ÉIBŸw"3íõ¼Üw‚ÜwdŽßf }ÉÉæf€:9fËßËfœƒ’ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿñÿÿÿáÿÿÿÁÿÿÿÿÿÀ€€€€€ÀÀÀÀÀààààààððÿðÿÿÿÿÿÿ( @ÿÿÿ Þž’õÒœËîxH‡@·óÊÉÎ=ŽÈâüÓÇ«˜hh›­Ÿ½ôåÀÞÙåu‘öíæ[¹ç°¾Í‚_•!ƒÑáÔË6ÛÖ»£Ê»º”w¨ÓçÖ ‰²·±·éç®ìåÓ~o‰õ÷Õ°¦ªûÞ¨×ǹֳ”îÔ«”…“ÇÔÚôõôçìêçÌ›êï½Æ¼ÑõÚ¸º¯ÄR¿îÄÀÅÖÎÌûç¶äÞÙ©ž¥æóÍ~WŽøøçíâ·êõ×ãäâÒÈÂëáÂúýôõà°ùóÍïïïúìÀýõî~ÛëÕßÙÔª™¸æè¼A²íðèÆiŒñãÎîÌ™ÇÂÍìÛ¶ßÞÞÜÐÈîç¾öã·ûüûêèæôÕ­êПù÷÷÷ÚªöúÚÉÀÔÔ¹ßÕÐíêïðÞ°æààÒÇ·ßß㮢¹T¼ë“|’öòññóñóîã׸ ÓʺõîêïÞ¶~kŠüùøùû÷îäÐáßÛíÞ²ééé=·ôääåßÙÑßÔÍýþþ÷øÙùÙ©õäµìãÃ~i‹ß×ÒɾÓÒÇÀ~mŠßßáêèèòòñõÓäåäîâ¸þþþøóÍ0I deD'5"1t7u†P~`;}G4M+‡!68\qmQ%…WlRH|= F]i?r,9JU ^kV#3{BpXTc.zY_Lf[nChEo- ˆˆx*gAsÿÿÿÿÿøÿñ€€€€€€ÀÀÀÿÿdjview4/src/images/README000066400000000000000000000001231174072760700153550ustar00rootroot00000000000000A number of these images have been stolen from KDE. The GPL applies in full force. djview4/src/images/cursor_hand_closed.png000066400000000000000000000002311174072760700210430ustar00rootroot00000000000000‰PNG  IHDRµú7êsBITýòEéRIDAT(‘­ÁÀ C_ýÿ®gdÇÁq( ZùŽVôÿ$ÈògýIDD°’„‚‘£DÒž´¶ “'ÊÍ´®°²ÅmÃNóÑäaKi²àFˆ¥n IEND®B`‚djview4/src/images/cursor_hand_open.png000066400000000000000000000002531174072760700205370ustar00rootroot00000000000000‰PNG  IHDRµú7êsBITýòEédIDAT(‘}‘A! ÜþÿÏÞbA´7p”Ù'‚9oˆƒOY ,N-°ŸŠfâ'0¼°ÄÆÁãîqôb½üŒ¸v»›æ/ Ôìðš¦E0ÿÐ:Ü’|ÛX/—v?Þ˜)a/ðIEND®B`‚djview4/src/images/djview.png000066400000000000000000000353661174072760700165140ustar00rootroot00000000000000‰PNG  IHDR€€Ã>aËsBIT|dˆ pHYs × ×B(›xtEXtSoftwarewww.inkscape.org›î< IDATxœí½y]×}ç÷9ç.o½7zAƒ¢¸H)Š–m‰¶•¡#‹±­—]åØURÙcÏ$^&OœŒ2Š“šÑ”#Å“”Çv<©šÈ#È&1²6Š¢ERE$¸`ín ÷ííw;'œ{ï{¯,Ešø§îíûî{w9ßóû}˹Wh­¹.ï^±wê‡îùµ]Bpˆ[¨kËUŸý7ÁNóº\½ˆ«Õƒ÷þÚð®æ†ThgµfMH*ÒÂñ#•r­p1gK9+¨d­Às­0°…ªÛ2ªÛR5ZVG³×ý ° ,¯kKÀIàôÑ£G£«º¨w‘\ïýµ2ˆoüT³rׇZuœŽßšÏ+^TÔmMËÖ„ÖæÇBÉdºš‚ ð}ß÷Óu¥Ô圖¼ œˆÛ ÀW=ZÛö…þ=–«À¯vàýö§«K]Û—rŠoì øéÿê8p`Cw6Çq.ûxa¦`H–žç1;;˹sçÒvᢨK xÀ×ÿ8zôèÑ Û¾è¿g²m ÞûëE3ÿ¤²PœÛf}²¬øÞHÀ ná3Ÿù ¹\n§Îõ²% C¦§§™œœLAqüøqêõ:€¾üúÑ£Gg;¿÷±}Lïn&:Zhõ޶œÆh›“Àù£G¾ãõUà}t< ÿ­µyû>¯ñÛ?W[`¦¨øÖDÀÃ?̧>õ)²ÙìNžçŽÊo¼Áç>÷9¦¦¦(µ)ß?Â#?ýsüÄ?@°â­°ÜXæÖ¾[7ý~†T«U*• «««LOOw™ XÓTg0`ø;à»G]}K.ò2eÛºï7žù™úê½´ ·zm âÃ!ø‡ÈÞ½{wð¯ø¾ÏŸþ韲P<Íoþüï!]Ÿ_<Î=ƒ÷lë·—––º199Éää$žçiàU žž:zôè›W{-W#ÛÀÐ}¿QV~cmÞÚú|w,dª¾ô¥/aÛ;^¸¦2??ϱWÿ#ÿàCŸÜðÙ‰¥Ü7pߎKkÍÜܧOŸæå—_æÅ_djj [±’ År¡xª¿%ž¸sÎþþ'O~©µc¾„l·§Þ+ÖXÔ&kÅØØîwLçT«U|¿EÀÆØTÄΆ„ŒŒŒ022Âý÷ßÀÚÚ/½ôRß‹/¾øðK/½ôðk33ÿlª¤xæƒúƒ ±¼«.'‹˜æâ¶ÐÑÎòä—N^íym¯·„8<…¸±öÐ@%£¹ý†®ö|ÞR©T*ÔV— 7|¶Ù¶–žž|ðA|ðA–——íà¾ð #Ï-.Ž”|qïXMrxÁÆ^G'ÿŸ›æ$ð§Ÿ<ù¥Ïl÷¶;\ŒvŒþš«‰ÜðÕkáy;ßõÙfZáZK?=ô=ô <ñÄ|ñ‹_äBQqß›Á¦ìüÊÍÀ¿øÝƒÿð[ÿòÕ?j;Ç”—Þe£Ä‘±°SýMðN@­Vc7ƒ¼ráëþ½àR244Äm·ÝÆÈÈUWó·{þ꟧Ç&Ëmu0gÙߺï7Æ·sŒ+ÖÃïûÇÁí£Ñß”œ «ÕʆÿÃЛI†ô÷÷S(X[[#ËSåM—B (h%_~ïJÿÊM€àF 0Ú¡V3 ×ußVŸË‘z½Î@Î&¬Õ7t¸ŠP…Øò‡KjÃÐh¢L&Ãððpºýĉø‚X ñþíüþ6®N±µfp˜˜˜@q‘ï½ý¤Q¯ãö¸Dµ• ÐBê{ç2æÛ’ëEkM’_“†Œo+ò¶pd$ €@ … êêwœúP*B¬4U³‹(©Ôß ÁÆsHb7VLâN|Ëpx, ÓÈY%£Ñï@ d¬±veÎW§»‰èm€Í4@’—±PB ÛÀë7!Ä‘ÑÐO°–1'óv€ïø~HE„a»%K)±,‰eYDQÀ­‘µ›8~ƒéÚ2C=m«¥&T?|O`3¤@›>P¦âÆÚ°ãeÈ`×ýÿM¸q,>)H=€={ölçøW-­–G½Þ¢^oE!Z·oPçÒ¬v¾{âÆx»æî5ŸV©Ž_l¢¤ÂWþåš:e3°^˜˜¥ØVèò 5€¸caj€ÕŒ"ŸÏ344´ãoKšÍVÚéJE]jY¶-‘Ò4³naY¥T—fÈ  ‚KÙÈ%›ÌR%4™|‰zÎCçõ•Ü^TÄ 2ç÷V€#y­èQµŒzËF³é±¼\Á÷}:sX®ëËeÈf3 $õ@Ó áC³¡i/dÈ;sùÈ9`¡©ÕšÔj jµ&:T*=Ô×^Y>ÅØØ0ýýå·ä×ËV€D Ñâ­Ð‚#ca˜Žˆ@jjε÷|?`y¹B£ÑN’e³.¹\–lÖ¥êéÍä´f¾ž˜'„ˆ×…6ëéß‚d`÷ç»K9ÆòŒŽB½Þ¢Z­³²R¥Ùô9ujŠ ²LL좧§xM¯u½le’Ñ/(£¯=âðXèLJ…Ê5&€a±¼\¡VkÄv\“Ëe)— T|ÉË‹šs«!+-q²e °ÀŠ{ZHL:¿#ë/âJe¬yšŠ¯.CÁ…±B†Ý½Ynìe~~™¥¥5jµ'Nœ¡\.pà £ oM©ÛV@js5©x«LÀX¦7qõ†€›MÙÙ¥´¸Óu]zz øÚæ[ç§—cê#ÁvÒ$H)2öo㥲=úã“Çv@h„°J#"M+„Ó8SÑŒä%‡ìåÂ…VV*¬¬TYY©róÍìÚÕ¿ã×½^¶r“ Ñ’kNG>ð[ãÑoÐ&€°óX[«±°°‚Ö`Y’ÞÞÂvyþ‚â•ù¥A:Ò1*%H!²­ÚeÜÑR®[Æš¡^÷p›Ào ¥Dg$®ë"•BÃB ž<»‹6ûw24ÔÇää,µZ“×_?K­ÖàÆǯ)IÜJXš´B£ý®±â@; (Xu===ôôôlçØDkÍÂÂ*««U@“ɸô÷÷pbž›Žð•Ær¶r!Ò¥LF¸46~«ŽOL…ËDh" ¬iIe#"ãj]hÀlö•²ÜrË LNΰ°°’‚áöÛoĶ·å†_R¶ä:¾`­Ñâ-ÐÀáþ("§5ÉlŸÕLÄ-;4ú£HqáÂBJôŠÅ¥r‰oœVœ\ÖX6ȬIJB ,[ ¥66ž Â=4X´«‚´ã1KK ,iö‹„²e¬5!JøDÊXW­9S‡Õ@pÇžQ²Y—sçfYXXá¹ç^áŽ;ö“Ïï|!ì–@ #‘ÑÛŠZ]A(8®0Ï‚¦½3€Rš©©9êõ&Zkz{KعÿéÕ¸ó]•³p2–ka»Ë2gKHK›m–ÀvÒ–XŽÀ’"6±©†:Y–@ÆŸ×|Nº¿eåHd&œ€µž[Ø¿RJªÕÏ>û ž·ó£­9@›Ò^ ¼l8’ämû¿1€™™šÍZkû¨ª _:±ÔÐØy‰•³°‰ekl[cÛ`;†ü%ͲD €dtÛ¶À²ã¥0Kƒ B"ÏÇÒ øDÊGë!4–ÔH©±bN!-L0)+‘‰-¾¼°* s%º Û¶i6=žþµË¾vÙ²U2¨“^Mà²0úÀï8Œ‡‰3µš1Ç»Z °°°Âêj ¥=Ì7m¾|Bã)U´°\‰e lœ¸“m lK`ÛÛ¸¶Àu¶+MçIL‡k%Œ–°m $†H RòZ´¼* ]¥®+x´ˆd„eI¤XR"¥À–Ç1 °,ÐNÔ$™å¶Ûö‚•• /¾¸³UÞ릸ë5€1\S ÄÎxê VܫוJ¹¹e”R”ËEZ:ÃWO)”vÁ1o Ët¨´ lK¦ÛmI ÇÒ¸N¼¿Û’FXqsÁrJ…¸®…´Œ¦6KƒˆhÒR¢°…­µ!‹²m>,G¤ °$œi ¢lžýû'RSvòäÔ¶ïÉz¹¸0Pfö55G,4ÃQ”š€•LÄàà …Ba;Ç¥Ùô˜ššC)E>Ÿ%W,rìME¨Á-XXŽÀ±;l½-b•.°mei„ÔHD:šeÏ%Éž:ý¾ŒÃɤ­q;æa™}¥Ô¡Ñ""keŒöP Ññç†<Ú¶ÑÒ6¦“M‹ò@{öìB)Å+¯œbvvéR·à²d3 `Œ§ƒ¯-8<FñôosØ•L´mõ¯5LM͆ŽcÓßßËßžT¬y«`–3tK‚e'ª?v÷0¬ßKj£â%ض¥¶%pAäit ‘Âh+fÿ™¼C&름OXÚ¸±Í×:¢`eÓãÛ€C ¬Li[HJÀ›žÍž½ã öEŠï}ïU‚àêÒÉa²ÙÄ.7P@d|ßk qd¼ƒÖE ·ï,/¯Ñh´Ð†‡ûyî¼fºŠ!|¶Qïɨµì ÆÝ³âp¯-M'é|c. '°bdò¡A@Ú&bhIM®ä˜}¥Ùnˆ£iB)\Ûn«})B`kb6^Gt,¤øÎúÞˆë:4›>¯½vv[÷'‘K•ƒ%Àp€kh„àÈxÐv¯†*eü}¥4¥RžOòÒ¬q·,l):ln¢¾E¬†c{Oüè„õÇœÀN¢m–¹¬4Zò5æ÷Ç1fF ¶9®-Vq°:Ñv!- ¶ÖØ:Ž=HŒËÿNUK*ØìÛ7ŽRŠ×_?Û•ÀºRÙ &ÔAcop;Ǹ$Æ>øOûAŒwj€•MBÀ—;Çp~~Ï3Ħ··Ä3S2æçðÍèJT¾©µ‰‰¤ÄΖqÇÇew4KÏ@Ä`BitdÖGbgŒÆ1dPbKãæÙˆ6ãsIø‚”¦ôÆŽƒL†¶1¯,FF‡Èç³AÄK/mß+‚`Ó0sÂÀŒÉÈtãµÒâ0@âÀ¤„'&&6œØf-‘0Œ¸pa­½½%ÎW%35qàFÊDEw¨^­ÊMB¾Ä€±ÚÚ"…€£ª-Žu{j¢0Œ½A¦àÆmþ€LÕ¿É1ˆ.`&àtDr.Ç5ß ¤` ‹ýûo@)Å©SçYY©n§oR `òí¦”ÂNse2^×ÌÉjÍ@¤R›³œ‰Åu]àÒ£?ÂùóóAˆ”år‘g§ ù’¶4l^´‰–ÕË7±~Gð¬$Ý«¾àÅÍ÷taÇo pìŽH -Íj3=–“±°ËŒ~!±„4&fJ€Ö-4`‹ÝÄ–€%,†úèë+Eßÿþ‰íô a\{±^ ´5€H5Àµ«íȬº÷®³ÿ› óÄM¢g¥4ýý%Þ\¬ú`gâfÅÙ¼$\+LÈ6–ЩvHFw(–Wigô3ä\;MûÚx1„€0T&1‚å€t$Y;“æ †3—P¦Û¶Ê÷Ù@(A#®D …`%’ìß¿‡ùù¦¦æh4ZWœ+èäë便MŠ’Àm¹—‘ ‡w5®"ú’öÿwþ÷ïðì+³ A£¹i$Ï/Ô …<ÇßiI¤%i!"2¤Mcn¦§–ÖFµj(8<+ÒÑ,‘úýù>D6kÍfÓ'Tš×§ÖÂD Þ8€ëXhenªšœíª“Tk,“^†åÕ:oœ3Â1÷Á\ïÁ›Fé)æ°5„Rc9¦î a³§·D.—¡^o299Ë{¯¨sÂŽê«ÎûlÜ@ËœÐ׎Ž=ôß ‡Ò°¬d ÐÖ`½Í_«ù,­µÒvãH¥¹\†š/XmtL"(R ê*ÙR‘B MË Y­4Y\n)Õîl[OÛ=ŒU²ú . i´¢HE-?`fa×uLç*£mœ¤\\H,aH H"€¦fWÒߣˆ0Rd\ ª(…¢$2 ZB2<ÜRгgg®¸sÖ{‰9XŠä5"nQØE±J¬¸Ý.àfÉÍ4Âá½e”Ò 9&×âÑ%^’×q‘Zëx„KµÖf„'Ç(ˆZ·µ‚R¬T)¤€¬ãPÈeÓVÌeq,‰%`°§€„qÑH| `a¥nH’R†8J‰\i˜š]îˆG÷3Ÿd3‚á¡4ÝlI<ÃeLXÙslúúJضEDLNÎnz¶’Íâ Í\E2èâ@p¤¬E¥H¬ß²²{÷nÀtˆÖzS;Õ)wì+¡”"›Í"Yh€•Õh¡ ÂÈDb -õ–B£€V<ú“J)Àó#´RHKâÕJ3}PÎ;rquŽm‘q%VS ¤NKÅVk!ad€l©Äû0¤JE GJ„Ð,¯Õi¶,‘X}sÃ{rPÊçyóÜž¢“O…àÎC7 l Eh!,‹]»8{öÿÇŸã©3é=ú½OÿüäÃwlyû×s€äþ&5×"±}/àRnà‘Ý£_ Íš211O· /:ò¹q$—ªÿ銹 ˲ÐQH9§ÈÚšœ Ka¡pmÈHE9«ãÈ]»i­ñ}?fç:¶ÉQl£Q"•ÂP 5û&M5‘ %‘˜<¿³}ŽÔ ±¤©¸ŸšYI›ð޼Y[000@«åÇ- Õòi6<‚VË´0fÀw,víê7….y‡“çæã6Ç /Çó¼-ïÛfHÄÖ2íC¯‘ :SÀRDQ”žàVÁ€RÖB)…ãØ¬¶â¡*À²-òù<¶ec;6ŽëÄs÷Û!_ÈáØ±+&b”ܘ®ÓI”š(ŠP*¢¡ rY‡á¾LÜѤE¤Ë…)ѳ¥!2YË«MšM?žÝAoNP*É:N×öd½ººÚž{D–E>op>Ó­pŸÿþó[=tØ<Ô9/0áe×$4þ¡ßË7uj€„ކáeW¿”r¥4–%i† …!NŽmẎcáX–eaÙ–±Í¶c;X–•xfÄ)pT°¸×EºnöiiM-Ô©Ý¿qb»³ä+Þova)ÌóÉ%"N-›Òùùê†Ñ_tÁµ` ¿¿k{ç:aoÓ4Z ²Y¥Ìlžõ ¸Ú,”Üs;áâêæ^L w'A !XΘþØØXjÿ×_Äú Ê8&¾®”¶-š¡aßÐæB‹Ž€‹‰ôE e|õôN‰æKñB˜êÌÕZ,4ÂÔÞ !Ⱥ6#¹ÔH€šPGiðÇÂÔT‘ñ>èîàžœ §\Ƶí.³Ô©À(8 H Z\׌í.dÝ-oøúû·>´AÄ7B]‹š@‡…Œ…QÚ9KnH&“a```Ë\õz)çúWJcÛ6­Èxé´-ÏuëÚ°éÐS¬®zDña"–Üid 4È7fªÌ¯µ@Äùý8w $ì›±âÊaË„—‹›Z«…•t~ëXX‹6¨þbFàX‚þÞÞ›5AüRƒÄ,Åué®k´@1»¹ØLÖ»ÉþÐÖóŽí’À­½!Ž E.I,gÆÆö ” ŠØ¶}Ép9g¡”ŽÃ»Ð Â1ùùÄVš¸¿JC¯`J·t iÔf< 9›|Þ"Ÿ·)el" -_1½ÔÀ÷#ü˜”óí92àØ’‘þ,3+-$‚rÖØðÕ¦ÏX9×1¢A¨»F´Г…Þr§ãA˜û$’‚@Tì(aÌ@µZ§˜Ûüñø[™€õ÷µ­dLÌSU¸ã¡à#»ƒ¶ý÷%Tíˆ;ÆÇShY›O†è¼˜RÎh×u #M¨À•æW»n êÞ&mRµ¯•¦Ñ4 ŸÕ5°|I>S¢RY­øíÊždn€$ù†ôPŒ Yªx a¼'Ï|µì0Δ)¥ŽîqFàÚ’þÞÞ®Oí>‰vÚÜ$h!Èd”Òä3ݸ˜ÝÌ hss´¨}F;‡ww$–]SóÞ’Rv]Àæ¹kb`ƃ±ÿ´™}âæ Ž4éœ.0Eœv{^_¢ý“¾¡¥Y?Ñž!”€B€VŠáG9„‘b­áÓSÖhI¤Ã¶%B*DdÀ-”³ÐÛÓƒ½ðÓÒø€F£”Žó;|+-ºU= €m V<'@zç8Àî‡ÿ‡1``wØžj½ìšõ‘‘‘Ô²ûë›1ÚJ#D)ç™K9‰ÍGwºd´¢º~.oÇê¼²bs"h»‚€H]2)ƒ€‰Á2½y›©•º¹mq"i–K¥[΂k[ôõôt?8–ÜÀÂÈä"Ð â¦CE½ÞD)Mµyy“G¸Y-€H'…°]/`+ pa”j€%×x###›Úÿ­Õf”j€(2AŸfü› +Ž;2žêenX.'Bàd$½=ªUü±âÒ¯¤’ÎîÌšó!åIØW*EÉu©;&pd§Ñ‰˜p¯»–4èëé‰ëtû@1ëÒìèP \Xh±ZŸâæ=ƒmEÔë-´VÔZ[?ñcý½Lâ,Ÿ§@u”„ ÌÇmÈæ^€àˆ«a(ŒRb´” Èår”J¥Tý¯¿ˆÍÜÀJ3J׾b5( Š4~¨BEF„" 3³5VÖZi' ä-àØ’œŽã˜ Z¥#<Ñ"iåmz3ZZ3Ø_&çŠXh S ÄÓÄ0ÄϱmzÊåT­K­Ó6Гߠ´ÒÔj-liHšˆŒ»\¯7PJSo]úÉcÉýK欙sIŠAbæ´“ 8<†©;ƒ€e7`tt4µÿ[yëÅ5ž¥f +Uì¼Ä5qï%˜ŒòåÅ&+k­Ôfær6{v—Îɘyá~vñ0Ú!õ„ÉÒ儩㛯ÕL=pè!tJiº£É¸Æ°”‰Ý>Ñ&§)€ÑùŒÜÜ4ˆØI‹"šM04Z°î­{ åE"¨‰X²UÛv&^€Øá@БÝaû9@-KѰ¢Ôþ‡a˜¾àRu€k cÞ\l¤^@²mk ú:F?°a ÐW.róîæ×høDšÞb¶½OR©ÔÐZÓô~ò=ž=i¸Cç€YÏ£:s-ɾíyÆymÓÕíy›‘À[ww¥»`hh(=©õ.`§!øì§ïãÿþóOF3¥zYY©°d!²¨H‘u%h…%eWf2f$ZI­ Òœ›n0u¡I¡`“ËZ8ŽÄµ%vìYØBáùŠPõk²{ĪÞx-Ø×Sd8pS˜€ ˜§a’>Êi¢Jexp¬ë²¸´D¤}ùtÿ¨é199‹RŠŒí±{Ðåž{î὇f8yêL×ïlfÖß×´@„ŽËÁ wÎ 8‚˜:Àn`pp0 /ù.@­5Y×âÞ÷ÞÖÏ‹˜šª²¶VC‡>}NH%rBÏf»æîK 9×!Ìd°¤Ie² ™Zž­i6MpZ§sÇú4Ž]N½hw˜)o[¼ÔÍ+©QiŸ;¦’¸˜mgûÖƒ`3é)—)‹´<Út`Ôò8wn¥4÷ß'øÀ]”J%^{íµ´²z3Y¯ ³È˜¢DoíØ#b„8RPŠ>Õ.Xt} …Ùl6Uÿ— ÜyçéúÂÂwh4Z,-­1TʳְAƒí88¶lgêb&›1S¾bP¬Õ½6Ûï:¦i}pmA©\LÏ¥s¿(ŠL Gë®íY;Ú±b[ªikœPlÀf Hr–”¸Ž‹„hÌ蟛[¦Ñð°mÉÃßol,0¿±…&½ØÔpÓ3šH&k;:<ÑáþÑö+Ô^ŒŽ ¢”bqq•A×øô*ŒRBØõ;„Õ &Ï »î|秃EA1 ÅR;ÎÔuŠTát|–thVfLÀȱgIDAT Aç?¡R ¬o[‘ÁÔÔDm«6šœ={¥{÷ŽáºöEÉòzÙ,¤µN5€ö©°c¹€#ADr‹kN„/Ujÿ\N(­5ãーöÚ9–—+Ü¢ 2¢€Î$7¢ýcˆÚàìÍjÑl™ì cAÎ…¬k&‹ô”KôÅ«‚Ô}Lƒ*žK'é "gïM+`3¬»VCÆLSJ¡£˜O(…ßð8sæZkØ|åÅx”RjC H)…Û9)¤}>Wo&>ü?ö ÄîÝIÅ,Ä9€$ljûº'8\ì"îö-G¡˜ß\CÄç„!ùMÞf*0dJÅ|ZÈx\iÝ1'm«Q+aÐ{•:óóæé'BlñÛL:ÝÀõq€Ä 41ÌØêðD\<Ç M⢻ •—ºˆNÙ·o”W_=Ë™3¸çž^.È,­@ 3º+·ŒDi‹vnA±XÄ’¥Žm‘’ÇŽ£¶ë:$ Ã44Û©oŒZ—(’Âж&$Úë~99»(j‡—£HÑ\«ò쳯 ”âÖ[÷P.o|ÆÅxÔf. ´I 9wAØf»;ÂŽŒwp€ÅXôõõ†áû9 D6ÏÓk4ZLOϳǭƒÖ„~D¤6ùN\ÀiFcçAÍÀîLÁvÃî]Òôõf(µìâØ_ø¬g'[q€ÀMàGC}¥Ê¹³³LOÏ¡5|ô£ï»l»¿YÚ ¥I(- ‡ŠTŠ|œkÀ’ëS*•°m›(ŠÈd2—Þ ™ŒËí·ïC)Å™3(ªe ü­*J’2‰UíIë$¹fÏN.¾¹(¥L%ò¦£® €eÞ$£®ÔíÅ:? M¨ Bê«Užyæ8JiÞóž[¼ä½Y^—šb4¿¸jÐ ‡€I\ Á’ã§ö?Š¢4p%#¿óÂÜK6ëâyçÎͰÛ1S§ÃF`¦ˆ­ÓZ¶ãÝ—èãîïmrl™þN|®ñÒBÒéD("¹1w¯;–ɺIr…éÖÊòo¾9Éââ*R >ò‘û®xôw¦‚;¥íÈtD2ÕW€=þŸˆCA;¼êDBÓßߟ–]êµð—†m[Üyç-h­8wnÙª3,h Q+ ŒT×}˜G¸l8NbÒ¢‹Mk-ÒsºøM°’nO[ "”V]ž'n‘Ö´ZJ›7’4j-Ö–*©íß³g„r¹ûñò—;p’Àz-EQš ‰á7Œý*5@ü>À‰ °°Îþ'`»£?iû÷ï¡Tʆ!/¾ø&#¬QÔQ¨ ý0ŒºM¾hKl©tçLV;FyEHËêê¼Îß²buh€ÐŠº´DÒTGK;óNƒÅ™E¾ùÍç©Têæ¡ŽÃ_ÿõÓæz®àþtj€Í" ŠXâêM€yôDg8cÐÛÛ›Úÿõu»ˆ­.ZJÁÃß…‚ÕÕ*¯¾zŠ=b‡ÈˆS : 5’é¿Z·»Ðtt×lì]Œ=µ69ïdW‰µnü+ÏyìØ/93m- Tæ £(b~zžï=÷ §NMÅaß;¸ùæqNšâK_úQ\p¹ƒ¦3 ¸áé *éô„ú‹ñ[ÀX¨Òƒ.¸>BÊåòEGÿÅd+m1<ÜLJ>ô”Rœ?¿À¹ÓÓLDË­Z¡Q{¤9ßt‹îÑÆ3ØH ; X7;[ »mûMHÛÝ 5B ÍV€šs‹”fnz×_;ËsϽŠRŠ»ï¾›n§§§Ä¡C7óÚkgùÊW6·óV÷çò5ÀÎ‚ŽŒ…ÊÌÚŠ싎G©TJmO>ŸßôG.'´Ùwn¹e7 «<ÿük¼ñÆ9òù,cÃ3N?¡"P±n™ß -ÐÚ‹tgï´9¼1Š",ÇIwYo×ml"E¿Àžh‚š¨ÐˆêˆŒìŒR¯åwrqv‰©s3|ãßC)cÞÞ÷¾Cqš»ÑhÑhx ¹ ÷éb÷g«§ƒ/ ­Ò8À„‚LaÚù‘„Çg¢w$µÿù|¾ë".'¼^Öçýï¿¥¥5N:Ï‹/¾Á{ß+ï ™Ë ùš@yÈ‚ƒ6R˜Q¶DhÒ ‘&„­ÝhLÐlK–pE†B«È!ëv2ŽË0CH»#…×ê¨ÿSŠÅó ÌLÏqìØÓø~À®]|ìc¦ûœ;7ÃÓO¿Äáþû²îOr¶ªâXsØŽ\… Øó£ÿ"/7MD âçó,»>èééIsÅâöížð‘ÜKßøîw_aaršÑæ,Nä£"ך!SÊè}-A9rH€3ˆ9@GI÷zFŸ“y[‡±E[å'ö>Òš¦Ðhz)ù ü€ §Ïóú«§ùË¿ü&Õjƒ\.ËÏýÜGÈf]ÇfrrŽ'Ÿü>££<ðÀ‘+¾G[Õ€) 'ñ ’tèU’ÀÛ9EˆØÎ&@­u¸Ô\ 0Çæãˆ‘oøÁÞàÍWO2\›#ë×ÑJ4ZÕ^+ ͼAÐ`K´@wy£°$çÑe9„D »k»Òš–P«·ð‚…E³Þâü©i^xþ5üi<Ï£¿¿‡_ýÕŸ¦¿¿˲8sæ<_ÿúsìß¿‡›oÞÍ×¾öý Š»Ôýé¬ÜPŽLû)©åÛ>”+eÛ ­ÎçóTÒNB€|>ËcýH)úÑûìák_{ž™™%jµ¸ýö›è Qè!(”¨ûD-IèJ쌅ãZ8¶y¥Œ¥M:a :âéyÅ+¥‰âw ëŽ|¾À «æJ•µ¹%f—yúé™]BkÍÃßÃÇ?þ#€&Н¿~Ž'žøwß};øÀ‘ô‰¨û÷OðÒK§xâ‰g¸óÎ[ð¼€Z­IŸ³Èй?@ÂúQðÛô~èAX™®@Ðúûdžf"Œ¼Ê8@’ ?2ªôù|HÁ‚Ó¢X,¦ö(±ÿÛeüWò»ï>ÀÀ@ù—ßbm­Îw¾ó"CCý<¸—r/­R?Q±ˆŠ"/" C¢– p-Ç2o‘æ]2Òd ÅØ~c†s¤¢` R´Jcüt,[••™EVWyþùœ<9•NtýàïâgöÇbí bWïÛ8°GyÚù`vããÔëMæç×p׿@ï¹…V52z‘PäiM?ÃÊ×›Þ‡?»ááæwk¿1ÌÈUi€#‘J;ß·40^N `RǶ•ì40öíå—ù§øú׿ÏË/Ÿbnn‘ÙÙEvïæàÁ}ä{Ê„ù"ºP@g2(4x!: ¥™JfI3ÍÜu2Ô“’2­7-ócã•àUj´VªT—+üàopâÄ™˜™Ñü£?z/o¾9Í“Oþ€~ðN^ý_þò“Ü~û>lÛæÍ7§¸åóÝ ˆ˜Ÿ_"Š47Ü0†ãXDk§°_ü"ª‘µkdÃE´‚šØCóü3¨oüjàç7ÜÃÂp ¨ä —Û­ ¾áÇ>3 ìI<)X´Í®ûEåryÇ:ùrMB¹\àÑGä¾ûòÕ¯>ËéÓ3œ;7ÃÔÔããCŒ ±kW?2“A‹èb•¼ÑSj„$9ÚôY´Y~2êƒF ­fZ½Åìì"çÎÍròädšèâÑGäàÁ}!îåoþæï˜]äÔ©)î½÷6zè=LMÍóì³'ðýÛoßÇ©SSHiqÓMãh­WO!^øçè B¡ìPp\t³ÕZ¡¨'©è=4§ž¡´ZÁâý(ao®„™ÛŽl_Án­ ³FýäóùtØÅÞ r¥|¥@à~áÞ|sŠcÇžcnn‰³gg8sæ–eÆ8>>ÌØØ nÖ%²”c9ÒqŽ…åØè(‚ DFSèx=ðΟŸçܹY¦¦æâ·o¢··ÈÇ>ö÷Ýw°K%öðc?vO<ñ ÷Üs<ÀÄÄ0añío¿D«åÑl¶8p`/®kã/¿IðÝßEûkô SîqQÍ•4Þ Z+”™dMïAUNp„*/ñã¨ØCÙ T p5eá·ŒÄá3! ¶ñ …aÒ××wÍ;ùr¾sË-Ü|ón^yå /¿|š7Þ˜¤Õò™žžgzz”Ëòyó&ñ\.iÙ8íÓhxqt®E£Ñ¤Ñh±²R% Ís´Ë’Üzë ÜqÇ-Ü{ïm8N{TçùŽðK¿ôÎïÞÂ0âäÉóÜpÃ¥RoéMêOþÊ[£ï­ôŽ £›«éw;AÐÃ$+j½zšCâ?óŠõ”°7؉çˆ}Ðm `5‘Ò¼J5Qÿ›É[A7ûÎí·ï‹ÝEÍɓӼòÊ^}õ,kk5–—+,/'‘A~_Ç£Îe’XÒr¹ ‡ÝÈ‘#7qðྮòíKÿfç~óÍã,.®Q,PÕ3,í7Q­U†¾½·¢Z«]‘FèAŸ5Ér¸‡^5ÍA}ŒWìtÀ‚’GÄWaö(3±"ÑóV‹B¡Ö¬·ÿ×Ò¼’ïH)Ø¿‚ýû'xôÑ2==ÏÂÂ*•Jµµkku&'Ïfbj.—¥TÊÓÓ“§§§H¹\ §§Èà`ûöuÕ^IÜ~+Pû~@&¸ÀìßüwDÍUv½÷†¾ÝZI÷¹ú­IÃ=ôDÓܦq^ÀÆJI á„Þv.`|H·@uÑ!»bûE½½½—uÁoµIèÞfìïÄÄp×ö/ùËÜu×]ŒoyœË‘íœ^ÍSûö¿±ûcäž¡Z+[vúú¿Uk…A{’…`½Ñ4(µx]–p¤$y|Nǰ߶ˆ†’ m ŸÏ§I Û¶©V«$sׇ(7Ûv¹7éZ£Ñh¤!ì·ò\ü•Óôœþר Êø÷0vç½à¶³©Wg’o»ìE;PÇ~^#”ɇD"™(º}4{Ð ‰Õ07n~~˲øó?ÿó´¤ý´¨«uÊVàØj=›ÍR,)—Ë”J%Êñ<»äïR©”&s®´3šÍfWû­Ð^þê$çþÚ¯0~Ë ã7@í4²°/ÝïrA@k…¡Ì$sÞûz4âÎïÂîG„2!úì±ß¹x~ ±S«B>œäÛ¤ÑsssÌÍÍmø‚”˲âGºÈ´3“ÖùYòù¥dmmmÓcuJ>ŸOÁ0<<ÌØØccc ^´J)‚t&Ó[1ú…TO‹ ±J626R…ú™®}¶ ‚]™)f›4{gGžÆzñ~"³ó¶F?üÅ«Rþ²¯!ø©p/?¦n a…4DHS„Ô¥Y¯Ð ¤Ô£€†¨ãã_$µ ›d}ÛLFƒ¹¹9Nž<™nÏd2ŒŽŽ2>>ÎÍ7ßÌÞ½{Ó)`ÒÀ–<²FA&“Ù²£·ãþöú8µsߥ1û2'^¨pÛ§7Ôßo#¹).4&höÍ < ¯}”uâk‹ðן³ŸüE#²B’ÃfP´³NI”Ptx ÉgÐ4hP×õxÙÐ>uPÓ>u·À§®š­ð¾\ H)iµZœ={–³gÏòï|×u¹ñÆÙ¿?###d³Y&''YYYannÏóðO±XÜ‚ˆšmÒɱû'ÿW¦¾òß²4ó2¯|¿ÊíwíÆòSœ¯OÐèáÞú þ·×dÛZköþø¿Ìƒø·~~ä z”„ ,ã¥%( AÉ2ëE)p;@ÀzpÄËä³d"ÒTìÔ•H-ò 0"ŸZäS<³-ò©…ñzèé­L½8òù<ƒƒƒ¬®®211‘vòÅLÆåˆ”’r¹œ¶žžž”¯tþ¶ šL~å·h̼L¯Ç¡»JÈòPØÅM+ìCù ã4WÐñRµVQÍets5ýLµVÐñR)˜ªMÐó¼º6ì=UúÐ??sÅo©*nïG>{ÄÏ xÄÝò$凈™gVŠJRR–P”’²eþN€R²eÇŠñ[>SЈp$ëI‚#ÝMRZÔBŸZØ¢/ka‹ZйîQ [xQ{båz5î8N †õ#ýú•€E31D¹\¦\Ȱúägḩ¿×ãÈÝ; ‚Éêõ F³¬Æ£W ±ùØ÷Ñ?è1*`!Æ€Q£b@Ðb@@+FKzCâÃÄÿÍß9))ÛP²%KR¶;–vçRRr=–¤h‹ôyÃÉï% l¦ Òj2Ýl²èµÈ ­<ªA‹ªß¢´¨íe5láG›ÇQlÛÞŠ­@³X,BöÕžÀmN3ÐëqÇ=; ‚³´8f;W‚‹àJäæŸüœ@РĀèGÄ Aôw€&Ý.ý@OgÇuÆlH'ª,AÉik•²#)Ù‚’-(Û%GP 5O¯†¼\ éœe6š±xlÌåǺøªMQ©…~“ªïQ [Ôü¦HXj¡Ñ0Úhv°l’œ+9ÌÓ”õ"}ï¹wgApzµ­ 2îåƒ`ǰ]¹õÑ/Ø M"bÀí’€dD§¶‘kçA:5A'9¯§,cÀ{Š–ÎH]Á +rD¼.t$ƒ¶ kA2Ñ@'E$Iî ^oE5¿I-ð¨MУST ½”ÃÔ"Ãa©øØ¾Fó-û<îºogApju‚šŸılæò@ðCÀvåàÏüq–ÐÇh@}å/~ñÎïzìÏ$ðIàŸ‚Þ¯;‰vGyqÞ 80äJÑÝlÁ€c¸Z›âÔ¤¶Që¸j¹c{üw34¤¶Öð‹Ç°œ†ú=Þû¾Á›Ëq,—»4Þ±¸Z9ôØŸÙÀ(èq »q4ã Í:z\kÆl»Ä8)5×d„`ÐAG2àm°ã¥%´e „ŠÁ¡Ú`ˆ´ÏŒóiZê÷¸ûý;‚HÁÉ¥ ª±&(ä/‚w-.WþÌ¿=Œ£õn f=Žfw  ~ÒûØN9Û"…%°1ÚC 2À)ü'ëñùã5+’(%žº0—áÛßÜYA øˆ›Ïýk¸ÔÛïË[.ŸøüñÚ_|úÐ#êñóó™¾õ =|º;|ÍöRÉ­jfà$Säfà:Þ–’€ ¥Õãçç2|óë>ô#W‚ºÏNÐò%öØû×F£=ÿ3\7o[ùÄçײB>¢´xjz.Ã׿¶}sТÄw»4<‰?pjß'z¦nºç\ÀÛZ>ñù㵺e8Áôl†¯ý핃 eùöÓ‹Ô =|?þØOÑhza«å½®àm/ŸúüñZÓ‘h¥ŸšžuùÛ¯®]6š¾Í7½D½æáîygÿDZ›F£Õj­ýpïùÔç×Zû­xjj&ÃWÿó¥APo ¾úÅ'¨®5(ÜôaJ‡?‰eÛX–¤Ñð¬VË; ×ðŽ‘O}þxÍËÚ(ÍS“3ŽÛõzÈãü郞Vè=ðã ßû‹ØŽm›y7›M»Vk¾×ðŽ’O}þx-¬ÙDЧ&/dx≠¨N=ÏWþÕ¿ º´ÌðáŸ`âÁÿiYX–©²žŸ_QͦwaqÑ~®‡‚ß‘ò…ÇÉ…ìõx䑬ž©†#üÕ¿ŽêJ•‰÷~Œ}ÿ*-/ Õòhµ|¦¦fùÞ÷^#Šøñ?ú£ßú*\À;V¾ðØ¡b” 1|°Ì—ŸPT+{ï{”Û>úiŽæ!L¹âjæ€*Ýþ 14Ü/¤”œ??Ç™33ÁÚZ=TJýãÿð>óouG§_À;\¾ðØ¡¢os ‘ÿ×÷ô£o ­h­ß§”Ê Áóa¨¿+„þ£/~ñ³“ë¿äâ–Œ_–GþÉÿûÆ÷.ù´Îurïr¹î¾Ëå:Þårïr¹€w¹\À»\®à].×ð.—ÿ€Íïáwi—IEND®B`‚djview4/src/images/djvu_fail.png000066400000000000000000000127071174072760700171610ustar00rootroot00000000000000‰PNG  IHDRoVÁ°ÈsBIT|dˆtEXtSoftwarewww.inkscape.org›î<YIDATxœí]Ùo\×yÿÝuVr†C)S¤*’’,Û”-Û²x‰ã8 b;(ܦ ¨§AýZô%Aš¾4}*Ú¢è ¤M‘ 0\´qÇuÜÄŽ9’,‰RLQ)‰ÎpÖ;s·Óå;:÷Ìò’5dÊ@Ìv—ï|¿ó­çÌPaŒa»j¿ØÃÖ±GÞ.Æy»{äíbì‘·‹±GÞ.Æy»{äíbì‘·‹±GÞ.Æy»{äíbèý`#‹EÀ!ÇÜ©)N^SÝ~P>ÓW]ßœpÀ §Ÿrß(;qU¡X,Ž)ð¿djí¯:¾y4¦·œ‘ä"JÜH›Z[1u ¦Öàúl/ކují‘vÙº–“ŠZç”ãſϠþK¡P¸Ðï1mvyÅbñ˜©Yßò˜öØÌ9ÿÐð{ɱô ÍÞÔuÏÄõú®TïìÌWŽyl/ñ ÿV(¼m¾Øä‹Å¼¡¶ÿVQØ3Œ¿?2òŽª©¿3¦àjí0Þ[zºQmÔ\?öÕB¡ðŸ¿–‹÷}'¯X,>¨)öŽŽ¾•ºÿŽÆ mûBÕbí~réù¦ãÅ~ìøñ …ÂÚ¶Ýì6 ¯ä‹Åºj¿úäÔ¿¦dÏ­{,c ß„¡v ([¿§çkxóʳ_–¯¹¾ùd¡P8¿õ«õ}#¯X,Žèª=÷Ééï Mfæ6<þÃò½øŸù/z P4Õu’z£½?s!>>x1618‡ÍºÙ ¥ûÙO/¡æ1óÉB¡ðþVÇÑOô­Î3Ôöß~'…88sãÑ:ƒú, šžoNÔíÜgϯ<ôõ7.=ÿóïüâO[§®?î9žùþ‡GÞS?øýAMµ_-‹¿µÕqô}±¼b±8ª)Ηïý«xLoox|µ=Œ—ÎþñªãÇG …‚r½c†Úù¦®užüì¡o§rÉë‘e9}ã1ïäÒSç?~ßnËDûey¿=‘™ó¢çW¶”¿ # …©þàkÏZÎà‹/Ÿÿ£æÆÈ‚ÌŽ½¡ '—jŠóg‘OÚ!P°Ûýw×Ñ™M_NEÐg*>\{Ä|þw_øó®[(¾ûÔÓÏ¥~4ÿ‡hØ™ÈJxâà÷Rº®ÿ…eY·]å¯/–ç:mÄ4+Ò± kwcx8‡t:éø‰‰ Ü3û ~võK‘åIÇÖ05ôΜ>ùœÕó<0Æøßí€KÁr#Η?‰#wØÔõeë JÍñÈçù .^8ßõÌ;j?–üè8®5ïÝð¸zgkÖ>LNNnêúš¦aö¾8³òéÈç %–‘0jXYYÙÔ½ú ]ùUÅ[­VaY<σëºð}ªzÓ«ªª UU¡i]׊¢ðs ÃàÇÑg„ÉÉI¼õ³q¬4'O]í)ÜùÒÇ0<2†¹¹9hšÏó iZàºÁè:ÿ<ÄÉÚCä¢~<}—æ‰T*×u¡ë:\×ø¾Æ4M ¼_.—qíÚ5˜ŽUUº®ó?”ÎÑ4 ¾ï£ÓéðkŠnY×u<úاðÿŠëõðËg*.¬>„±}œ,zô¼îŒžd£ç‰Dºn`­=YÉ˨®]‡¢(|\$¯x}"–Ëú«‰.{±íöjº¢(ü&ªªÂó¼P«S%@PØ h Š¢p `ŒÁu]~ÆEÁäxüÉgðÚë&rñ˘ʾ‰¡Äu$ŒTø¸R½Éd‰D‚[p“8Ó4»"N0’{p …zgC‰åHÊÈÄWÐ(5ºÆGžHœ|ôc ªª&©¨¿í×¼çyœ8+ô}Ÿ+†„I“Ý% ‚ Nœ¡ø/þ>æçç±xõAœZ,£Ývà3]S1søN~]"0w)‡& ='¥š±Ú#ˆéç–U‹îQUU8ŽpÙDª(<Á·]+éä&IÁ¢1Æ8i¢Õѱ¢@„{ž˲`š& Ãà×;räŽ9Æ*•J öÊ®Ç÷}î6iRˆ÷Ò4»½X< ÛJDV†¡Úp½[ç†a•åºÝLŠ,PNDrt]ç®”Ž‘ !ºœz½Žv»p5ÏóÐjµ¸›¢cD9è¹è%lÛ†eYØdw,j'²2<¦AU‚ºÐu[¶è.Eyå±ß."–' **”H"¥Ð ÈEd+ ø&~±X¬+c¤cWVV`ÇÕ â!ˆ •ªªˆÇã\nJ¤ÛB,ÙŠ¬ ÛMÀÐoɯë:lÛæ“Èu]”Ëe.¯ÃdÛnbžèäDE*Œ¸|= ”®·¼¼Œl6‹x< æî»ïc §NÂÒÒR¨‹ŠÇãH¥R˜œœD:F§Óái¼˜6šM¤²ÕÈʨu†‘J'»ÊÆ<ÏÃÜÜ*•J×y”]ÓDºí ‹˜qÒ#)‚f³ëº¨V«\8Ã0‹ÅJ¥øD¡E«£çäf‰Êå2r¹·Ñšòù<²Ùl „!òs¹w]D¼m÷¹Ø¶VËÁpòZde¬¶ö#;tGW¢ÂC³Ù„ã8˜žžÆÔÔT`l¿iœ·«Î MXÄBœ„¡ºmii Õjp6 aß¾}B"‘$ ñ…œ‚·,‘Ôn·‘Ïça‹º®Ã0 är9Äb±À (^ˆpœ››Œâñ8Çá3\<‡\YX ÏÍÍáÌ™3¨V«ð<©TŠÇN]×±ººŠêZ 3¹è»æJ`rr‚F%‰¢(hµZ`ŒappÉd’G“GôT¤ÇÓ§Ocuu•OÆ0ˆV+êêí·ßÆõë×»š2º¢*]LNRÈjäLTD¶:V\¹;-¢€b Mìô’ĸIŸ‹.™îsúý·0;ú£ÈûZ:nçJâλîãcå&—lF`üò#+ö‡Eå‹®V>@Ç7 žéF"O¼°¨0ñ=Ù„ÅÙGVHŠ®… BhV˳‹ˆ k#…ˆîJ&NÜÜÜY°Î<î}#tÀaxgé9LLD"‘x’‡bðÐÐb±X¨HNÜÝ‹uª8Ù@èsñµYŽëõƒøß«_ÆÀÐA|îóOVâÃbÉÑjµ ª*†††xSBtia]a: {/Ìól„y² äJÉ ¢ ¬.¡x*»IŠuƒƒƒ•z:‡\f¥Rb½‹ß›ýâzô%žRs'o<ƒUk œx ¡.JlÐgív›o¹]¦\h‡!êDcÜzõ\/t‘×+õJ6DeÈñ„>s]­V Žã```€“GîS¬ïTUE&¾™¸•æ~œ¼þʸçžðñé™®® ÉÛ+[¬T*ð<ãããÜ3„e޽¬MÌŽEýÈ1½i›ŠyòMÅ”žjòù<ï_RA-ºD¹S"·¾ÄNõ åX×kðëÁöb˜¯Ìâbåh:#˜=öŸžæ[×Sˆ\cù¾VëæDÉf³<Þ…MpŠ¢ðÅ`9܈™dX¶Yë '' r=‹a||œ Fè7ÄÏek´, Žã ™Lv]/¬YÆ\«OãBùQ\­ƾ}y{è8ÆÇÇ{½½”#fÃõzÇâ°=¢T„&ùððp€$™x±¾ËŸÍ$=]–× ¤H¹o)Î*9v„5œi¹§V«ÁqLNNò%¤°ØzÖ·ÒÜW/½ˆûŽ?„‡¦gH$ø9rGŽq@x,nn@n·Û8pà¿&V;Äkˆ$7—¤ÄÂ_.¾e×)Ê´tÕyaõ}N¯Ãf/½/—"y¤¨J¥‚V«Ó4y&'^—\f×92qôè]]r‹ U¶NÏóÐnßüêY˜Ë4M“/iÉMlQ_òF]ùÞt¿°I]ij=„µnd×& uèËå2cØ¿?’ÉdOK“­p3 âÃ\'Q®ë Óép—)îËÆEë[O?âc¯ÆDXÞ°BÉìU§ÈI†œ9Éä¹®‹µµ5ܸq¾ï#•Jall,à2Å{RÜjç"¬Jg¸ªÕ*ÇÁèè(‰DèD!ë(ÌS‰èƒÅö`T¨tŠeQÚb²2äL’@Jét:(•JXYYA»ÝF:Æääd Fõê^lÅêÄû‡)©×X|ßG³Ùäkw´ü#Ë@ûODkKœ^rËÍgQ&ù½(èùÛc4c{í¯_Ë7¤Þf§ÓA½^GµZÅÚÚÚÍz-“ÁÄÄÆÆÆnI„Øç)&rò÷E6=¡K×®]C½^ïY€ŠI€¸A©y§Ó ìv6 ãããH$ ì,SµZ –eAÓ44›MžÊîs+–G_8Y[[C©T⊖³DS½^‡mÛÜe®EQ`š&<ÏãÛEÂUUE½^‡eYh6›¨T*H&“¼þ+—Ë|,pËuÒ†,`ãä%@ÍÚ—ØKhúL,/ÈŦÓé_}7NçÍe±×¼*• êõ:oüRœë>XkàBéþ€,õNnCÓ^Ïv» ˲r‹žÄ÷}†Ó4‘ÍfC·†!‘H ÝnCQ4›MÔëu.s­VãëétšO^Ú‰×l6Œä@6›íVÞ&c £££æïÉÅøzŠRét¦iv‘ßKžçuÕDrÁ>88ˆFæa\õ¾YnÔkPétwìÏo¨`ÚO›žÂ"Ö˜©T*4y 3c Ùl°¶¶XÂà8‹!NóL:ŸÏó×aÅ{:^·V… ZcB¯Ze#ˆD9vaa½$¬¸'T\Ò4 µZ /^D,ÃÌÌ ’É$?¾—¬a=Ã^ä…¥ýQÆCº ‹¢u‹9CXòv¯^Ùkhcú£`³ †hmbOS|OD©T‚ã8ã¤m„­ÔŠ›™„t\/Ý…•?Q'÷z2ôýgŠI±”ÝŠî’>§ç”xxž‡L&°¸’•†á×}½­\s£ãwy²µ·f)•‹‹‹¸re¶UÀpê} £ûbjj Éd²#è1ïvƒ1†Z­×u±ººÈr‰PÇq°xåZÍ*¦s'1šZ@L·Ð´±Ô8†ÅÚ ŽÅñûOl¹º[Ñwò(П;w¥R)ÈÇÁÊË8œ{ìÿtµû‹–M{o\ù X|Oæ ]¿Nñ›Œ¾’Gð<+++èt:îÍÏß| G2/ãØ¾××=ßg ~|éEĆŸÂc?};DÞØÓTQäóùÀëΜƠqiCâ@Už8ðÏøÞÙI”J÷addd;ÅÝ1ØÿÑ„j8úSUçΞÄñ±—"_ÃÐlýo|púm”tgAðõ~ !cyy9kwZ2’\Œþ»Ã&3gñî¹+¹M¢í(è¾Ño!d¼üòËŸÈ%Ê/* ²›9o Vç1µX,þu¡P¨o—|;;Âm†ÀcØZʯ)® Ú/«îrìTò–švfý5™¸¾×7MÑ~)n—cG’W(æ}¦ZeklSç-ÖÃÐÚoï¶_iß*v$y7¡üý©ëODþbcÀ»‹ŸnØ^ò[Û)ÕNÂŽ%ÏõÍo^^»«±°v4Òñï.}ÆiÚ™9ßÝ^Évúþ ÖC±X¼_Wí×>~àßÓ‡†ßÍ`\_ÇÛW?×¹°úÀ²ëÇ, »çG¢?"v4yP,guµóR6±<|wþg#©«0µ6vKµCÞ™åGÛŒ©¯Ú^â…B¡ýWâ~°ãÉ€b±¨ø’©µ Œ©÷úLMhª·â3í×7ÿ±P(üÿi«Øäí!;6aÙÃÆØ#oc¼]Œ=òv1þ-ú³Ù™þeIEND®B`‚djview4/src/images/djvu_logo.png000066400000000000000000000042551174072760700172050ustar00rootroot00000000000000‰PNG  IHDRo0:v{ž pHYsHHFÉk>çIDATXýXkkÛÊíÿÿ;†:·§Ž8˜ÔY $„,1zóAƒ=ÏÚ{dÇéíMôžÈm)öXk¯µ×~È_Ο{}ùl¼ižçÏÄ?oš•Hã(Ž“Tu­TÛê®{E[d§ÀÇ+â+Éòª6Waº¶mU«”lèßÈɆéSø2Ÿe–&qeyQJ \ß›[U‘Å_Ÿ²²jT9a´ÖŒ(¬Š6¢'G_γ¿$IDQÖÒÒÓfÆ×(¡€HÀ.ð™Þ 'A%mG{ÂtÀ#8â׆NÖÓ{xÑ‹“¬jê+½¾¦á欠@@’=ŽR!*è^ʆÔ[~JU¤gð!¿*O rRâ&Ø™¾qM}Ûóg™%áEAÈT”˜W±èz0\MpÀË>ÂCÐq–çIµÚÒ°7MG æ*ˆÃKöèªqRë 1îÜYv­lØ5>ñûHÏèÜ¢ü4¦µ¡zHÝÑ'<Èã$eÙä>y†ä$·È¦RT8~¨gNÙƒ*EQk‚c¼¾3¦`E÷÷wt=<¥ªÈk´ ˆ;÷‹[êÜá3_3ó¾_Ü™æE!ë0“‚óGô(Õ$ìÂI$1‚À«S%㵦Cljå¤Ä5á¯3ÆLãø^ýèÁ-u¶¡øœPvز:TPGÆ¡ô~z¡Ô}ßì+mÆP‚ß"gSW»‡ *«ºA4½Eìqœ¬w#/á!{µ–|»×Ã`ºRà=­B¿æ"òï¼n˜ZУ²1S}Ä­uUçëoaU•Ìž}†Ô.JÝ´+«§@úd›²µèsà TÆJe‡¦Ÿ‹0ôö?÷~à>×ýL·‡ûIïJ3õìNÙ4ÑWÔà‡ž¡ÊmÉV261­+Pª¯x¨½RJ%¨õ‘—§‘䤼H±-Ì$BŸèÁãSÞ-¹S›~4[ w,gS½üØ—àÇÉÍ6‚8MVÎQ=½ 7¼êI"e޵òLˆL¯­ràÍYx8ì½£mžr=âm*Òa¼ƒ2­…kŠÇU©›¢"8%6BÃ5à ¦q~Bù+·NÎ¥Tçy`·ÈJ<Ô”ùžwØûa´q =ÎàdH©^݉âKœ'¥%ð¨Ä5[¼ièçE™W<‘Ü1rà-™HNÐ+Åv¯ÆÌ?ì÷^·ìO³õqk¡ô½¬žU×°šyGül›êjg§úñ‚WUñ[jgdzª,3w§†ÌƒšAÅn…û˜óô!]j¯)ÖßJܘäT¯xœ½®+6û¼J Ö©¢nø†²×TEêºMŸ }ÐK7n~gv9f¤ŠÓ'e•­7 xu-ÉNbñ wý^›—¼¦°“ÁâÙÓ¡ç#{ež¸ÏrH¼ÃÁãèdñæâ™…ŠAÖµ÷°^ÓPœ™ ?ª«·x5ZSE•W~}·ÐËÂÇ­¸Ýú$î3!lÓñ)Êž¬6¨¸Žz Q?cùÁ½ÎÁ³Auå ?ÐSMY½ScháRÂãûà˜mš_Sgë5€R ž#¨io€êZPþ®þT´Ðœ½òÃ$‚Íe]ŠÓþ?ÂÌ1j==±ÙÚ™7±œ—=¢®Ê໋;jiñtá,ü&Š toù©Ò>S-ü&KÅ'bçžñà–4ù’?à ”b;×Á¯Ú¬J„ªyÿÁÅýŒºÝê¿ðêe(vÜ‹²R—y|_¡¿DD/ÎÊüÂì,=2'èeOß Â£¼ðÌÚ½•“è©ì-ž sÝP¹Œƒ=„ì¥énÛcϱžæ¹ûÌùC½,p¶øªŸ+È Ã»ð[¼ÙZJ/GèPg‹!sïWåˆ~bzeýÊ+Ô®IàüåHrö™üª1Š©O#×(JoùÑ|i»ËÖ‚sÜUžlîö¼¾¤œ½º‘W~gsqgS–ÉÉahŽxV©ÁÂÉøñ&gÍrêÁ§X³[Â÷/-ͧ9hƒ_ù]·NCæ\ðfÍÆÓ‹š¯$„÷+?:Ò/Ó1É*vïïí™§!pìðrÁc~]k³[‘œÍ²sÎ:»el“¦ã)ÓüŠ·¸xñ@‡Ï+ìš®ì–#¢Än7üfÝ”Ø!sºvëC{Ùqg))7ƒiOkWPo%›ÿu‹7ŸwwöúJèµr¶‡ÖnÖ$Z÷ jÅζ¹ìZ³xä/ð_a.73šQ„áäui_ùó»yïæX÷ŽGÏ;zGºü ¥i?ŸC‹èiâ×-y:îÛ/ðb¦¦)qŸžÖ›ßv“ð}ì=G_™áo†OÞ¬Ä7ÿ§Ú£b(葨qÜ+¿óDþÂ:‡ýdšnŸf~wž46 :`߸â½wÜÂÏ ]²~–¿8øíÿ; âûd}ªuŠnø³4>ÄKñT›ÑÛ*ïÛªäôý›x">ÑtSÅw;õÞ³Öÿo~Þ/ŲziÍÊù~ÏšŽî–^;_Ïã8ý½‚G¿UX7Ûg‹?ûüßë>ïo¤=¶¼9>»ltEXtComment CREATOR: XV Version 3.10a Rev: 12/29/94 (PNG patch 1.2) CREATOR: XV Version 3.10a Rev: 12/29/94 ¼ÞuXIEND®B`‚djview4/src/images/djvu_stop.png000066400000000000000000000131161174072760700172260ustar00rootroot00000000000000‰PNG  IHDRo6ÉDÇ_sBIT|dˆtEXtSoftwarewww.inkscape.org›î<àIDATxœÝœÛSW~Ç?§§{† „X¶‘dÉ’A²0B y×UvÖN¶v³UN^’”«ògäi·j_÷=µµ/[Þ¬7eÇNmR›²%!Ù  YF`Ä}`nÝ}ò0œætÓƒcIV~USÝÓsºÏïü¾çw=§GH)yÞIZ#‘È `ÊqœsRʹgÍד&ñ<ƒ'„À˲ºmÛ®|ï½÷tS©”R^ÎK)ÓÏšÏ'EƳfà»’¢Ù²¬Þ=}útââÅ‹|úé§LLL¿üå/E"‘xÍ0Œ„ÝBˆØ³æ÷IÐs§yBˆ&Ó4OÙ¶½ë7Þ¿þõ¯Åüã íæææøÕ¯~Åo~óéºnÁqœಔÒ~ú\?RÊyÖLl…ÆÆÆ*>úè£Ý7oÞ¬Ùµk—üÙÏ~&ÚÚÚyßÇùøãéë룲²2ÿöÛoßy÷ÝwS†a<_³6„„ü«Þââ"½½½ŒŽŽRYYIgg'‡¢èî¶N>¤§§‡[·nQ[[KWW{öìyB\?ŽãH]+”'E+++ 0<Ö'AB‰ÙÙYr¹œžÞ¹išž¶)­R38¨uÁs]HêúíÛ·éééaff†¦¦&ºººhllDJI6›¥P(xf*•JÑwîßܺE›eÑnZ”iϼI¢ƒ¦ƒ¨žwײèG©¨ ëÍ7Ù»w¯÷5a¤”,//Ó××ÇÈÈ•••´··³ÿ~\×õd¡4rff†<[ð>|H.—óix$Á4MŸ¶éZøÌdiu~ÿþ}zzz˜œœdÇŽtwwóòË/û|P6›%ŸÏxî×®_ç`Ää˜aP¹òG:5\çO’H$0£Q®9Ò¥²¦†î7ߤ©©É·ŠéÅÙ³g¹uë555ttt°oß>Ïç¥R)O×” ‰Ôý\Ðd–Ò8€¯¾úŠ3gÎH$èì줥¥eà •è9{–ááaöNÕkæX=³Ô¹îu-„b¾XQQA,+ú0—탎Mm]]§OS__¿!@BpïÞ=Μ9Ãôô4MMMüô§?õÚMOO333ãïi-fð‚ÞYP»tPþIX—––¨¨¨àƒ>ðü˜þ{.—ãËK—øË_þB‚÷­(5!ÏQý…RêwunY…BÁ7" Ý²8lYô§òáïÏžæf:»»I&“¾>xÿý÷éííeppL&ãAø,R,<Å„¢0”i+¤‡ÙRJ …–e!¥ä믿æB?uBðwñ -‹ååeV³YÏ„é¼(‹P^^î=/èï‚÷Äb1VVVˆF£¾8 tG£ýwîò»ßþ–ƒ‡q¢³“ŠŠ /mRÇùùy&&&¼Éçº.ù|ÞûœhO’|àé&3LRJ2™Œ—>(3ª¢Ñ­œmÛ¤Óiþø‡?p\Þ3#¼1¡Ê`uu•H$â›T H˲0MÓ;Ú¶íñ®ûOÅ3€iš>w…!xK˜´=ããüëµk¼ýÎ;ì߿ߋ|———q]—D"áÈ4MâñøS×¾ fü9“ú.„ ŸÏ333C&“ñEUUUTUUQ^^ŽeYž6è‚TÂU`D"–––˜[XàŸ·m÷E}ʼ•——ûf¸ÒÜx<îó±ºù*Eúxt š4 þZXü+™žžæ•W^ðÒ¨ŠŠ ššš|²ŠD"H)±íâ‚…žZ5Q¥?¥ªZ›åÄAò§ƒ¥§ <×uÉd2ضMMM͆t!—ËyÌCyevô¾\×õ„¢ž•ËåÈçó^^¥¯ÀÑͤî{KJº_ŽF£>¿äQ?F¾‰¡Ò(Ã0<3©÷§ËÌqb±˜×ÞÖqdEºÕ º} ›‚.˜ë)ÚµkXVÑÄ)!çóy]ëÂ@ƒ¢ùËår^Τª·û®Lj<÷ª?a%½ E£Q<¿¶ 4·€'p=ÚÊLï/›Í277ǶmÛ<¿ õ{õ¾óù<³³³ÔÔÔøLqØx|œèŽ?Œ1eûãñ¸Ïéëe³`ž¨;ò ‘HW«¢x”LÂ޽Ȋ „m#ïßGܸQ¬]¶¼F:½‚aXÛ¶)++ÎÔBwx¸(ø^€—^B”—!Ò+ˆñqX\,úÇÝ/à46Ay9Ù,"•BÎÎúøv5~”E‰ÅbV5‚·aضÍÔÔ±XÌóËj²”² ŠÇarr’\.GCCƒ—Ú<¼ ù æJ¥Bô°ÀF¡4"X\ÖCmŸfÕÖ»?ÁÑ4IìqðUøô3èìÄ]ZBD"ÈmÛee‰@¡W®ÀñcˆÃ‡ýéÌáVäŸÿ q÷.‘ÇɿôÑD›_j6 Š—×ÀšR¢ Q†a”••y |B ø°R¼/Ì:mv¿¼`q7ÈHXgAf6 T½x”RBeåzûáa˜ž^ç-‘@üÛá“ÿðóôÙbüñ#"µÛAŸÍ!/®3·¶V‹Å¼ÈÀÒ¤ÓPUµÎ¿cƒVýRÂZð¢YÖ4»øûÆ`duuÇq¨®®ö­–„Y¤õ!m œÂªD:‹4ðÔš•þðï ž>˜°ÅMyí¦gjE»å5ˆÅ0. vQ`›„ІiMdrͲ¨@ð/Nœõ\Ñ]¤Š2Unæ§T´»™¹Ü ¸0—ò¨4³¶œì|+|ëpzàTØ5¾þº¨Iêú+ûàç‹Ø^ëãE?z×CŠÂ¾6kcTo¼ûö­÷¿V=R}«¥¤° a3?÷¸&‡Í|×§ÎŒœºù»,oè ¶bNåwúìr]d@Èù<üéßaâözÎY™€¿yÊÊÉC˜¹RG/WæOøè® Ž ^)P¥FAY© ¶DµUÚmo4E>ŸÔº`c«àéŒèárÇÁqýy¡!]Ñß_ôuo¬íÍ,+ÃØÓŒ+Ýá#Jd¸~s+¯"oÞ,úË…?ï5OijÐßÁFm 0LfaׂñÀVdí/ȈòQÊ_m…‚3I=+ òuHIÙZ¢-„@v„¦F„a`|þ9Œ!^}µø{r};_¨é\ËÙJÎ^Çö iq&'CÓ™B¡°aÛÃféN[èA+ô8Z³©K­XoFú楠ÖÍ—ZJq]׫\!®–F±²ºnT€G޽.¸H¹=z&ÓÙÈK)Êd2ÅÕ÷µ5hŠ•œÂâƒà¢¬’®Y›¶ 7TXT§º¶(­°,‹ºº:b±˜×J`Õ÷`€VaQ×U×7K—Ö½ÿX[~B VV½<.”æ×MŸŒÅàÈáuA,."ei³ŒŒóùå@YYYÉp¥ÌdpϺ.‡° ý8Ú·!I×™Ô}ž”’X,FCCƵ+µ&¬„ý®˜- 8ŽCt­vçÑè"—+ò²{7b-m…|óÇO¨ÙL§áêUOóØ·×˹0èõFú$Êår8®ã-oéäQ%HMòíÛ·oIçWÉ$8†G-méº$TŠ)}OKÐy‡%ãÁèRÝã8ÙlÇq¨\3K +iÄG‚–¨ß0 ÄÜ<\½«+Ef 6òÒ%¨­…hÔKÚdObzv¿PÔ¾¥%¸z9ý Ø`l 99YÓôÌ €¢É,Ø6ñx|=Ä¿KM·JALÓ¤¶¶Öç2ôä[7º…z\ò%éa>.h"Ja6<žúd2 …‚·•AäŒl.^,§>ºÿ° È‹— ®®žahæTÂŲW˜@ÆÆ½*NØXTbx¼é\M Û>x; Â"X¨^ß*m(L+¦6£0“Ü®VI‘²¸µouu)%UUU¡5CýüqÓ“Íî š¯°I¨¶T(áŸ\© v Ë;õh¾”ë £MÍf)ÄôkAðÔ*|:FÊâ.lU¥'¤*Rê³U –â‚ü–šxÊœW$*K¾Üì'h ÕõR² ;êµÍ-Qu ïÏÔéQ3X}×?Š ¹\ŽÅÅEo*’L&©ªª"‘Hð»Bžk¦*4ÑøxœÔ%¬rÆ»~>—Íñßùw͵kKPÁ¶ÊêÚ¢W[JM´`ñYn³€¯…n@‚uÚüଠëPÕ6s¹ËËË,..2??”’òòr’É$•••†Á?~ðW®\ዞóyŽ8 !ææ»šP}Gœâ7Œ÷Œ”ô®®r6³ÂÞ}ûø§ŸÿœúúzŠxjÛGPfúwu¯mÛ¬¬¬`Y–w˜•zò§«¬Z¶×¯)æôÚ§€ ýóù<+++¬®®zfÒ¶m"‘±XŒÊÊJ‰„Ϭ´¶¶rðàA. ðñ石SNELvò«Ç%e:ƒ“â çJ¾´ |iØ^WËßÿ䝨¹s'555ž—Ïç=@ÔžÓl6ë“™…«~3™ ©TŠB¡@]]· ¡~WE|5é·j:=ð,Ë"‰pÿþ}–——K& z#Äú˹\ÎRÊbE¾¡¡Û¶áÃ?¤³³“ÖÖVÔ{…BÃ08xèÍ{öpéâEþ04Ä^ Ë4ÙVbÓB)ðLÓ$“ɰ²²âE‘BlW2d¸àØìع“wÞy›êêjo޾Ñhvv–ÞÞ^n޼ɮ]»¼gD£QÇaqqÛ¶=©Ìûòò²×÷üü<ñxÜËÿæææX\\ô¥ ®ëR(¼=32£Þ;éªáèè( %oò…ôZz¡LlEE…·ä¢„WSSƒeY,..Ò××Çøø8ÕÕÕtuuQ__O.—óf­:f2ΟçÚµk´ÄÊè´,kýLOOcµµµÞ¤+±ª 5;;[œ`ÀUÛæ¼c“H&éþÑØ½{·/ਫ«#’N§9¿ÆCee%'Nœ ¥¥eÃÄ™ŸŸ'ŸÏ³ººÊòò²÷ûÒÒ¹\ÎÛ \[[ËŽ;ˆÇãܽ{—™™Ÿ%е¶¡¡íÛ·F½ L%ÁSèÏÍÍy‹²º¦=Ê|©¶‰D‚h4º|]“§§§9wî·o߯²,:;;yùå—6¼ªµ´´D_O´YG…Áb*å y+àIYÜ.8V(Ðç:ñ¸÷Š—ÞNŸ.\`dd˲8~ü8GŽñŠ :éÚ±°°@:½þŸ=ªthš&±XÌÛimYétÚÛ¼–¼«šª "C-¡žîãJå*¢`ȼ}ûí·|üñÇÌÌÌðâ‹/rúôivîÜúºV*•¢ïìY&&&Ø»°H[¬ŒuÖ<€oí=¶CÖ29yú4Ø )‹{&¿üòK.]ºÀÑ£Gioo'‹=rô9r)‹Û¾¯^½Êää$ ¼õÖ[=z4´X<×izzšžžnß¾Mmm-ÝÝÝ477?•q>)úAü÷˜ã8¤R)rk‹°zD¦Âä……†††˜œœ¤®®ŽS§NñÒK/ùžÜüü<½½½Œ“L&éììäÀßk ò¬è^Ø»{êòÄÄçÎóÒ‹îînêëë7´K§Óô÷÷322B<§£££d´ù¼Ò¼ïB£££ôõõ±°°Àþýûéêê"™L’ÍfäòåˆÁ±cÇ8Z"Ú|Þé¹ù¿Í0²m[|òÉ';¿øâ‹2™LäèÑ£bddD:Ž#ÛÛÛü⿸—L&ÿßü9jž»º #!„´†ÑæºîÐ/¥\~Ö|=iú_@°ïáYIEND®B`‚djview4/src/images/djvu_wait.png000066400000000000000000000155341174072760700172130ustar00rootroot00000000000000‰PNG  IHDRo8óN¦/sBIT|dˆtEXtSoftwarewww.inkscape.org›î<îIDATxœíœip\U–ç÷m™ÊEÊT¦$K¶lÉ ƶl0^Á`첡 Š¥ ª¦¡&º'fž1f‰©é‰˜ˆ™þÖ1KwôеtOUôTK†²‹ìòXÆ–llí»r}ËÉ}z/•² U@Õ0'B¡Tæ{ïž{þ÷üÏroJH)ùÿR[„Óß²ù¿¤”å/ZŸjѾh¾hBt !æØA!Ò)ík[6D"ɤ¶ñ‹ÐíZò¥/b‰;Ò Ú !ZƒïÇãÚÍÛ7E’Oý¬fêt !¢Õ÷ !Ú„«>?mÃò¥Ï0àÙï7×/]l|£1¥Ea !ê#&[þâÏ2V2¡ñ/þaÒlLi›Õ=Bˆæ¦FãÑdBûV&­µ^íùŸ¥|©ÁBè–)äúÕG^jü“?J®j¨×þ8™þù¿K[™tÅ<ÿü»õº¬B,jÎßìê0ùïÿ¹qáù7)­T¢øEéÿ¥0cQ!LCðoÿ´ÁØÿTKü};Ùø­¯Ç…º(^'øWÿ¸Þìh7ü‹?K/9¶·-rïÎ:r9I¾è}aà ù%H7¥”¸®‹a¡÷§¦¦xþÙóð½úu<„¿wø„C<½µk×þ.Õ½n1®}ɾ8ŽÃ“Oþ5®k£ëB,ÓDh±¨\¼jàJeAÚ²~÷ _§Çq¤¦Í²§¨¥åÿrìè†ÞáÎÍžÛ–”m‰ˆÍRÂLÎ#×jðê[Ãc1R©zLÓ²"¦‰iFéî^G$ùLçdü>±f±X$“‘û"¥üÔ‹kÍÚuüàÈ;LÏx$K±æ>ëx¯Ã™ó09íבËå©Ot-õ7! 7¬ÑÈ 8NÛ‘8œ9 ‰D6}*=?‰Ê“““ \×Åq<ÏCy¤¦ihš†®ëþoÀ!ê·¿Ç4Mÿ:õÙµäàÁ}¤Rtt,õu(‹¸®‹®ëžç¡ë:†a ®Õ4 Ã0ü§ë:žçQ*•ügJ)¹š——Ëe>¼pžß>ÄÀÀ®ëúÏ;ú›®\þsgOûïWMÄ7–ÒCáƒïy«nZÍÀ°Æødø~Ç‘<û²Íú[v²{Ï}¤ÓéPrÓØØÈÎ{ذq'Ïïs)]‚¡Fõê[’Í›o'‹ùï–¢ !üA‚€)ƒ ªLÚ™ó@µ„躎”Ò÷¢r¹LoooMEz{OÒµDãž:û÷½H¡PðÇêí}Ÿþ+§yä¾gÏž y´Å ÊèŠ! Ã`hhˆB¡À… À¹íavYqãZ–-[z¦ã8¾÷yžGGGÝÝ·òz 1“‚¾ 6År’WÝä/ØÏZ|$\×õW(òD¥¨2ZÐó”òAºÔ4Í÷4)%š¦ùøâ‹/ðÓŸüˆááá"'Žá¦å‚Ɣζ °÷¥çp]—>úˆzrßNƒ†zT½ÁÈȈ¿¸4M£\.s¸çMzÍ_8 ÇqãožüK½ö wmqX¿º’!J)Éå=.öklÚ´mŽÑpjΞç±zM7ã“Æ&+¶’RR,y|ÛåöíwÍYàŸ¥Ì)MªÉ«ø¡€P€©U ³ôäøjZÑ4R©DsÆdÝÊIž}æ)–v­`ëÖíLLL`eS:…B™¥‹ †G ì}éy&&Fyðn‹èljÛò¥.gNŸ$›Í"¥ä½wsêÔû4g!–ìðcaT@~óבÞ4›×ͰliÑhØk†š›Ûp]×(¼Çq0MÃ0XÐÚÆàp •gY¦`Ý*_>ÿs¶ß±“•+oüíP¹N -¥¬ò@œ’ 8†aøTôH%Õ|¯èÓ45Z›=¾W {§ùÑŸdß¾—Y½¬r½çyض͆µ:ñè÷ì0¨OÌÆà:L.}t‰Ó§?àïŸþ1åüI¹Ï`e8¶Š}…B™™‹t¶Fjê7<¦Ñܼл8Ã0|oVžØÚÚÎÐÈlˆnYcñÀãG÷ó³ÿóÓÓÓŸŽO&!ðT|SñC‰I%H'A©¦jmÛÆÐ+Þl™:›ÖG½ºõKñiS•JT< ‚¦U” ×2::Jss3ÙlÖ§#Û¶Ñ 033C4%7Ù½}¶KÑÒÒ‚”’&''kÿ[×ÔE#¤RX–õqBacZfHGÃ00M“Û·ßE× +ùÙÏžâ£Á2;¶XV…-š2’¾K±jÕìÎN0QÙöÚéÓ§çý÷ŽÑÑ6ÈÐéÛE…•Ký.ïž’´´´ÐÖÖöiq¹.ñÁ«Î8ƒô£bã8¾A5MÃ4M"‘ñxÜ/T2sàÀ¯hk‰16éˆÇhjjAb  LÓ¤P(ÌYRJâñ8uuu!*S‹ÅBzHt­H©Tbbb‚ééi&&FI&X»¶›ÛnÛÁ¯àöM`}„×÷¾÷½ïA%Ù¶ígUÁöŽ®ë˜¦I>Ÿgdd„ööv‰„Ÿ–+O­««ócd<žäð‘^V-ÓæÐžêH))—ËX–…'uú‡=Þ?]àð ‡_qxçX‘Sg=G< EC׈Ç4&&&Èår>è†a`è•=9ÅB>8ë‰/eáÂvö¾ô÷î4(•rX–òvt-=q‰Sœ'™Laš¦¿˜.^¼Èë¯í§\àᯥˆÇf×¼ÓÐp=Áåþ"‹ÚW<ôÌ,˲¬P§gu¨ìaÛ6ÇŽÃ0 ¿Ï[}’9´ÕuÊ#•q‚R„”’L&ƒãšLç\1jUhÎEã8œ.W/XŒ«‚©w°÷Yà(±m›±±1FGG1L‹Óç¦X“é+,†‹%øå~›dCЇyˆL&Õ+W(‹äóy"‘ˆ¥KBÐß…Ÿ½øK6®ƒ;¶Ön!ŸòDÉd2tv.Ƕ;±í2Sų Ÿ/‰D1µ î¾C„:I+»,–u¸@Ç•<†‡]G#™LúÙíØ„ã@$¢±À47¯6xûíClØàw™Ó¥ª^dA ƒ]®`²8Ÿ„ÀSYe0ƯÕöñ<ÞÞ^Þï7LMÏ`Jé4Ö»t¯piΆ»0P¡Íþ!‡½.êæÆo -Û¶ýqU cY¦i²dI;wÝÃñ㇙|Åæ¡¯Z̶å”G÷]p™É9Øÿ2 ZÛikk£±±‘ŽŽNFFFBpîô«¡VšZTþ|…Äq*‹-‰„lñöQÉT>†¡ lÛÁu=ÇErÕ«×ówœªEéP«‰ š%µ$žây5Xõj®¦'å•üúÐAîÛ©Ó”Ñ?¤ÔüW)¢iù|™W^wÙ½çëäóy_Ñj€Õßj«GˆJ‰QWWǶmw2ЉžãýÜv+sôÚ¼>Êêƒ#ùˆzatܦ.!“m%•JaèR¶#1ôYƒçóyÊå2uuu¾lWãÎ;¿Bss³¯£ÊR§§§}vªnöײ¥bºàœk±\µøPÏשWŠÍ·¥ãyñxœû¾ö {_s)•g¯ Rpðú×Þq¹qU7©T*Ô*®XÀ4Mß«`¶°iómœ»d08↼G]›ˆit-6Ùr‹Áƒ{tîØ¤ã8.íí혦¢\Þ36?|ºÀ;Çf·‹\×¥P(ðê›%f ÉP†Z¶e(ݯÕqšOjÙQÍIÑfõy›ZâƒWzW»ù|º®µµ• ·ÞÆ‹¯:uSAY­¼óËŒMÅX»v½?‰r¹*‚ÉŒ2Šòº`–hY_ùÊWÙ÷†‹ë1‡ò•ÎRJú‡Þè‘ÜÿÀ7ikk«êïœCÅp«nZÍ¥~ÁÄ”ËþCEººVÒÞÞŽeYÜ|Ë­<ôÇ8y6ÅäTÙ§Qߘ5t«e³«9Áµ ó ø~^«V îo]kƒqbb‚Co`lô ÷ïŽÒÚîH)vÈfù€Ú¶çyÔ××û@cWu  !hjjbdÌôPöpòtÇÕü£>[¼xq(‘R: !¸ùæ<ûò>FÆtvï^b¢D"Á×ïÿçΛ×׻Ѓ‹»V÷Z2¼`Ì«U›TK¡Pà­·^çü¹3lZ§±k‹¢€àŠÆL‹¿·—Ïç±m›d2éƒ-ù^8ÜOéìÚ¨‰ âUÇÖÕ¸§Î:üø›’{>ö8Ýënžszíº.Åbå‹?µ(S•.Ê&ÕFWת]ZL‚ãRCeüÕ¸¼ÖuÕîn…Bž%‹tbus½£)£ñFχd2 R²hÑ"W¼Ú³Ôëꣵddd„L:Ü‘P÷¼üZñéz|ð>‰„¯kµ×))•J8ŽC$ m¬•[XÕcת9ƒ ´zÑ3ûë{W¥ÍZ› µ&£<¡§ç-ò3—ؾј£¤çyXF‰ÁÁAòù<ñxœ–––eÇTq0èuóxáÂY4…'¬ ºy½E!?sÕîE0þLNNút®ö'kÙf>U;À|ÅzõoÜ'Žyóe™ê³«u Ôß|pоÓÇØ}{們z_QQ.—cff†ëàÔ©wioo5{k­ÒZ^X,LLLpòýct¯š›DH)I&4îÜ"øåó¿ðëÊùæây¹\×uI§Ó¡îNPTO3¸O,qæ[dA€ªéò“z\å›±ÊÅ«WV-à._¾ÌÛo¾Ê×véÆl†å8…B©©)fffR²î¦$M‚ñ±Q¿½TËã•êïêÄEýÊË¿äŽM–YÛ3<Ïcq›ÁŠ¥6¯¼òœ&8Ÿb±èo?]í¨‚iš5¿ÍT}]DÇqüc"Õ¶ü4­1¨ŠyÁU©6b«ûu P5ã8¼óö›ÌäK<¿Ï$“²I×—IÕ»ÔE\Êå²c‰±XŒû÷DùùÞC,íºx<îOpzzÚ߬ &,óQÖ±cGH×çX¼°ö÷àTñªõUk|UH)ýäFÙ,ï”7 ?Ënjjò›Ðêóê¦üõR§ž*úûûýý¨j ¦éÁ »zM7ËWÜÈøø8œ½x…‘á!òùO<'›©dmñxÜe·Ýêð÷Oÿo6ܺ͟P.—óž>¡²`Ž;Œ®•xôëñš›tw—\(qéò4ã“EbsÄbÉP ¬ïÊå²O™W!–eẮ²,¸¦iLOOS(ÈårŒ‹Åüúoll,t.UiÛ¶ï×¢Ñxj•(Š›OiõY°…&eå¬åÚµk©«ÛÄÄÄo¿¹—E #¡ŒR°t±IcÊåéçžÁ´ÒlÙºH$âÇ™àõÁ2áòå˼òò ¬Z&¸gW+æ*qIr²o’;¶h46T6a«7t¿ ò¹'¥Äõ<¾åqi@°uë¬X±‚R©Ä¾’í›â>¸}<®ŒX\ì/Ò¾È ¯PÞÔŒG¾¨óøßáÂ… ¼xàe–,tX±T`š_Š£’Ï-T V“¦¶M<ñÄŸ°bÅ  óZ[py°—.z¼s\çá‡ãÎ{xaÿìÎü{xtwß‚‚ÎÎNâOˆ7tóܯtýËžRþ‡Ïc ÏóD¹\ÑhtN×õÀ™Óïÿü†Û4ýþ­mÿé¿ü×ï.Y²¤ð£üõ’™Éc ¾ûHTÿ÷ÿ5ïüÇÿôçG‰Dè_]¾|9ÒÓÓ“~à>¹ü¾ˆø¤ÛŸ‰B õÚ?5 äȘ÷´”r0øycÚxä–5æ¢ãïÛ}C£Î³_”ž¿oò{@"¡µXôzGž¯þLaE#â‰bI>'¥üRy×Õäÿƒvº„IR,ŒIEND®B`‚djview4/src/images/icon_back.png000066400000000000000000000012121174072760700171130ustar00rootroot00000000000000‰PNG  IHDR‰ bKGDÿÿÿ ½§“ pHYsHHFÉk>*IDAT8ËÍ”MHTQÇ÷_cŽ8ij a‹œURd´¢m-ªEBD‹ 0iqÌEPFC¹©$¨¡$ŒÈMÒEEie΄húHŸó|óN‹ ˜`ƹèÀ]{œsþçþ•ˆ°˜¡-*ío€ç/\vÔŠ#` –+‘¾Å©0 Ëížg¸<Þ6µwÊèl>ßz§“!'SâtG—Lp`Ï6N†»‰ÇãDîÝ—‚b/†ibÛ‚¤,*KóñûëTV`S{§ÄgmïÝÉ«I ½¼šÜ©DúÞPã[‡9—dtÆäÆÍ[|Eøýu™+ „Âb؅ٷ•a•í˜ÎDa ê·Ó°i%5Ë–`X6}Ÿuܽ/Q¹ÉÌ-Ba‰éóklà£aq=ªóôÛ‰¸É{»: ƒ„ ¾3).Ô2¤­ñA¼žàQd y«ª1¦LÌ™JÓ˜Kšô~¦w`K¶ra‹†¨ôõL÷µÕþÚ2=ݤ¢#”—âYQFniÅTzó©¬(¢¸$岑¹Øvv•ÛZš•ʵ‡wpçí¦duÉþú‡wŒÅ>JÐ4Á‰"Ë}iïU&s8Þ|F.>³¹cè+Þ±A‚»~ç].”eRUáM[•ÍmŽ‚rõÅ(.·‡µîÏ»Z DÖŸr¶å„:T»}»Çð—P§ÔÁIM;#Šˆ£s®ã’8¹§þ{Çþ ÜÑóGIEND®B`‚djview4/src/images/icon_close.png000066400000000000000000000021371174072760700173270ustar00rootroot00000000000000‰PNG  IHDRÄ´l;gAMA¯È7ŠétEXtSoftwareAdobe ImageReadyqÉe<ñIDATxÚbüÿÿ?-@±€FFFœ ¬­£€”Ì ˆœ8±ò.= 5Ä&Ð ¶±‰RÿÿÿËgdd`eea`cckøùóï_?þþýó¨f"PlÂéÓk?  @ 5R󙘘 LMüý45常Øáj®_̰k×q†Í›·3üùóûÐŒÄ3gÖ]@6 €P †º_HHH °0‰A]]o8>~üŠaòä¥@‹®‚\ìxöìú 0ƒn0Ôûû $%…ÞýÇÀÌÌ„ÕP˜Ü÷ï?º»ç1ܺud¨ã¹s>€Ì d] ïy1pp°]£  Î *ÊÏðþýgüäÉ+mm`¸³0üøñ‹!&ÆŸ››×h`Ì0€bB„Ë¿|e A Ÿ>}e°²Ò*ædæg——€úîÝ'°%%)vv60ÿþýˇ™@,°$Š}eey°Fxñâ=ƒ²2'˜-%% L ¿.\¸Í` ÷â³go6m:Àðôé  ¥€AÃ, §çJžˆªÆ–¤Þ½ûغõ(ƒ««0Eȃù ` ½d¨­ÊðõëW¸;0•ü @L°Xdeeeøüù Ðàp¼rå. +ï`D6CA€“““–‘ˆf0¼}ûÃÓ§¯1¨ ˆ=xðÃPø÷”+ÿÙ pŽz÷î=ŠBKKc†ÔT? ììôdäI‹PÄ¿}ûw$@Á‚â(›þúõ‹á÷ïß`lffÀ“ŒâýC‡.¢ž—Î0üãǰY y€ *P@yÿû÷ï ˜ecÈÏCÉaMM3¦O_ÎpäÈeÃ]]mXXX¾|ù .?®]Û 6 €3ÈÄÞ#€,?-Ú|úô Coïb`æaàååŠod8yò:XDŸ9s¬çõëW`3`† RÁ1þ¯^½6PSS¦†ëàðº}û!ØPn¸ V®ÜÁððás O/‚ů\¹ ÌÚß@YzL @¡B&&A l¹_ZZV@KK”¶ñP¦¹té*0•ÜBׯï‚B„Ql‚ ŸÏÉÉe ££̶ØK¸;w2\¼x˜ö? K„ 3 €°ô††þà‚”÷ÙÙÙ„„D€¥XógÏÞ¼y Lßá=ÐPŒ‚ €°Œ  y\5ýû÷¦ñ,öqUMÄH«Ê ÀàØúÄ`ÃæèIEND®B`‚djview4/src/images/icon_continuous.png000066400000000000000000000014371174072760700204320ustar00rootroot00000000000000‰PNG  IHDRÄ´l;tEXtSoftwarewww.inkscape.org›î<ÁIDAT8­•½o\EÅ3;»’‘b0’XT.ŒH%Qè"Q„bÓ%%%ü?P¹scd)´¦tCJº(²×Š2öó¾õ»çRÌûŒWQ FºšyóqæÌ¹/|óó ·É5dÞš™#f 2P%LÃ=våŒcUŸ:%Ù俸EYÒÚrÙË%,ßWPUõÞz¾=[œñéô¢Ëù¿›ËIã‹¿ùþó[ȸ;ò¼Øõy­íå¸¯Ú §ÿüøÓ?$d|2냃ßxðà)FF£1FBHBEQprrÂb±ÀÌ03$ðúõ1Ϙ F”gPwÇ]¸{ VU———˜Y;|| @£ÑˆÃÃÃú|~ r’›Ú I„ˆ1®Ô.ÆÈb±`{{›#ãñ˜66>áÑ£¯…qwRÖŠöƆͪB ( ÌŒóósö÷÷ aÄlölÀØÍI®>ã¼ø.ÆîŽ™±··GJžŸ³¾þ!³ÙÓÕ 5rò^LÞ¹óåJÀU­y~Ž€xK vÀïùÎËÜ=g^çMÇì”ùü¤ýVíX©?îúììœ<Óé ®_߬5öN €££#nÞÜĘôÒLŽ×Œ$Ïß½'®¥ ^¾xÉtºÙ’8Or<®ñû_\,¡(á¢o½¹~ûa6§IŒc dmâ|uäµ)›É©LTæ˜i ÉÆ¼ê”~[c01ÂÇëW“uö¶ 5V–%R¼r±_ûº AEßÉ}«ªj5ã:Üš §!4Œ¾-—K «-ýº“šÄíÛ÷qwÞ¼9ë5Œs ðF’^ÈÉ*¶¶îrvvN¹(q‰°õÝöÑ%nMp«þ“7¯Áò·¬Y¯_ ï.’òš9þò-ÿø•?Ÿ•[XIEND®B`‚djview4/src/images/icon_djvu.png000066400000000000000000000021151174072760700171660ustar00rootroot00000000000000‰PNG  IHDRÄ´l;IDATxœ}”KlTe†Ÿ33i§)Ó Ði±¥Ó`¤šxcš4®tiâVãŽeÃÆ•+·¸1®Ø Ä/„‹‚ré-ÚN;¶ô"½ÎœÛu1CÞx““óçËžï=ïù¿ã°E—¿ÿÃ6fšqÍ™Æ4Ú(ܧIò£ËžÄ/ ¼¢À/ Ü‚À+¸ë!«QFc¬¡æ‚Û VR!Š*Ôâ4Æž¡ýx Zæ¦Vp"±ª(Uñ‰šÕÉ8' BI(C˜ÈVpË¡=(eHV§È=#Ó”büñ4¯¼ÑLU<ŠV£-FŒ1XcÁZ¬±Ç`ÊÄmàéÙ-íõ´vÔÑܰŸ·&8t¸•{w‡8s®Ç%ÍæK”1hJ÷Á£þ¥>c~nžŽ’Ñ&®_âÕS] Ðs® ¥4R*”T(©Kp«ÑÖ ±;ƒëâ Ü»ž¥¹%M6;Áñ3­Düzþú}ˆŽÃí¬x3œz« %*ëTƒ±»8ÿ ÅXnÛÙÃŒ/uèƒ$«Ó›8±wº_¶•…w»4f\°%%F”£¹ùp%öñíOŸ0ï-‘ˆ§‰&b$ËGlø»'è»z€‹ç€ ô]=ÉÅóôýv²\+éšîB©ÏPNœÚäÞŠålìqÊë(.žØhP©Ê¦Öj«PÖ ”O*-q¡B©%þzÝÎW6ÙÖÌjB#1,‚/¿ê¥ýàòcKä?ãþ,CÅ;@Åq{Ú©É×èòßËbÂJ@qUºšÜè#3·(&FÿwüüáJw•Àçk/P5­5óùUªtŠ·ŸpãáϬEÇ™š,eýÑûgídvÛœl“ƒÁ—I2é×r÷º! þù•5²äg‘J:¥ý[túHß.3I)‚òt…b™–X5‹Þ4…hŽÜÌCTºE¥Vfþ¦®áW¾ð ´ 5ëØše&'ï£Þdò?š°’qk§ážIEND®B`‚djview4/src/images/icon_down.png000066400000000000000000000005421174072760700171670ustar00rootroot00000000000000‰PNG  IHDR‰ )IDAT8íÓ?NÃ0Çñ¯ÇñŸ4iU¡R–P ¦n,\ƒKp&F&.báŒl¬Ý¸\€‰%©ªJi©R uèÀÛ<øã÷ž~!¶Yr«Ú?¸› ªF§wA© tѺK–Ò4˜ù»±’X+ñ>‰R€«ËB¬'_ïDÒP–ŸTå„Yè)ÞG8+ѱ@(Ë@U-çX¬ûðè"H£ÍÖ8_¶:ô÷5YKáìò–n®‡¢\ Jç8_àü€¼}@§­°&BΛåáöD¬Þ] ÖQ)c\:$͎Ѻ‹u ±<=Ž~a`MLÄöp~€ŠsÆÏgk1Ø›·×{ð=ý *'ØFpJå˜US^Æçlù/µû_o÷ÁpˆH3Œ(æ$IEND®B`‚djview4/src/images/icon_empty.png000066400000000000000000000006151174072760700173570ustar00rootroot00000000000000‰PNG  IHDR‰ bKGDÿÿÿ ½§“ pHYs  šœtIMEÖ ÎË/6IDAT8ËíÓ±JÃPÆñî½IÚ*mCÕ¨EqGwGC»ˆ ‚‹ }_Ä7pt´T„bi2$iî­C±‚´Šš1ßtá\~çœáXƒÁ€,#È898>û÷6²w÷îFﳋÇÿ[;·¤iðùYÀÕÍÓßÀÍí&ZGĉ!Ž Æ k×Íçß«§ô“.ÆD¤iH´_Þº}z=M™‰“Z_/ee½1ì$]¤,a;Uw¥¦©z‹Ìûþ¬C±(±m‹“ãåÉ`}í­#¤,€%j )KX–@ÙåìûKxž¢RV\Áåy}d¨qc º`tŒ.i’D¯8…9Z­NgZ­‚ç©ïWÎO/Î;ÿe]$FËyIEND®B`‚djview4/src/images/icon_erase.png000066400000000000000000000060601174072760700173200ustar00rootroot00000000000000‰PNG  IHDRÄ´l; pHYs  d_‘ 9iCCPPhotoshop ICC profilexÚ–wTTׇϽwz¡Í0R†Þ»ÀÒ{“^Ea˜`(34±!¢EDš"HPÄ€ÑP$VD±T°$(1ET,oFÖ‹®¬¼÷òòûã¬oí³÷¹ûì½ÏZ’§/——KÊðƒ<œé‘Qtì€`€)LVFº_°{ÉËÍ…ž!r_ðzX¼pÓÐ3€NÿŸ¤Yé|蘛³9,ˆ8%K.¶ÏŠ˜—,f%f¾(Aˉ9a‘ >û,²£˜Ù©<¶ˆÅ9§³SÙbîñ¶L!GĈ¯ˆ 3¹œ,ß±FŠ0•+â7âØT3IlpX‰"61‰ä"âåàH _qÜW,àd Ä—rIKÏást–.ÝÔÚšA÷äd¥pÃ&+™ÉgÓ]ÒRÓ™¼ïüY2âÚÒEE¶4µ¶´4432ýªPÿuóoJÜÛEzø¹g­ÿ‹í¯üÒ`̉j³ó‹-® €Î-ÈÝûbÓ8€¤¨o׿ºMîòÐ]9ñLaŠ€.®+-%Mȧg¤3YºáŸ‡øþuAœxŸÃE„‰¦ŒËKµ›Çæ ¸i<:—÷ŸšøÃþ¤Å¹‰ÒøPcŒ€Ôu*@~í(  ÑûÅ]ÿ£o¾ø0 ~yá*“‹sÿï7ýgÁ¥â%ƒ›ð9Î%(„Îò3÷ÄÏ H*Ê@èC`¬€-pnÀøƒ VH©€²@Ø A1Ø ö€jPA3hÇA'8΃Kà¸nƒû`L€g`¼ a!2Dä!HÒ‡Ì d¹A¾P ÅB ByÐf¨*ƒª¡z¨ú: ‡®@ƒÐ]h š†~‡ÞÁL‚©°¬Ã Ø öCàUp¼Î… àp%Ü…;àóð5ø6< ?ƒç€¢Š" ÄñG¢x„¬GŠ ¤iEº‘>ä&2ŠÌ oQEG¢lQž¨P µµU‚ªFFu zQ7Qc¨YÔG4­ˆÖGÛ ½Ðètº]nB·£/¢o£'Я1 £±Âxb"1I˜µ˜Ì>Læf3Ž™Ãb±òX}¬ÖËÄ °…Ø*ìQìYìvûGÄ©àÌpî¸(—«ÀÁÁ á&q x)¼&Þïgãsð¥øF|7þ:~¿@&hì!„$Â&B%¡•p‘ð€ð’H$ª­‰D.q#±’xŒx™8F|K’!é‘\HÑ$!iééé.é%™LÖ";’£Èòr3ùùùEÂHÂK‚-±A¢F¢CbHâ¹$^RSÒIrµd®d…ä Éë’3Rx)-))¦Ôz©©“R#RsÒiSiéTéé#ÒW¤§d°2Z2n2l™™ƒ2dÆ)EâBaQ6S))T U›êEM¢S¿£Pgeed—ɆÉfËÖÈž–¥!4-š-…VJ;N¦½[¢´Äi gÉö%­K†–ÌË-•s”ãÈɵÉÝ–{'O—w“O–ß%ß)ÿP¥ §¨¥°_á¢ÂÌRêRÛ¥¬¥EK/½§+ê))®U<¨Ø¯8§¤¬ä¡”®T¥tAiF™¦ì¨œ¤\®|FyZ…¢b¯ÂU)W9«ò”.Kw¢§Ð+é½ôYUEUOU¡j½ê€ê‚š¶Z¨Z¾Z›ÚCu‚:C=^½\½G}VCEÃO#O£Eãž&^“¡™¨¹W³Os^K[+\k«V§Ö”¶œ¶—v®v‹ö²ŽƒÎ[º]†n²î>Ýz°ž…^¢^Þu}XßRŸ«¿OÐm`mÀ3h01$:f¶ŽÑŒ|ò:žkGï2î3þhba’bÒhrßTÆÔÛ4ß´Ûôw3=3–YÙ-s²¹»ùó.óËô—q–í_vÇ‚bág±Õ¢Ç⃥•%ß²ÕrÚJÃ*ÖªÖj„Ae0J—­ÑÖÎÖ¬OY¿µ±´Ø·ùÍÖÐ6ÙöˆíÔríåœåËÇíÔì˜võv£ötûXûö£ªL‡‡ÇŽêŽlÇ&ÇI']§$§£NÏMœùÎíÎó.6.ë\ι"®®E®n2n¡nÕnÜÕÜÜ[Üg=,<ÖzœóD{úxîòñRòby5{Íz[y¯óîõ!ùûTû<öÕóåûvûÁ~Þ~»ý¬Ð\Á[Ñéü½üwû? ÐXðc &0 °&ðIiP^P_0%8&øHðëçÒû¡:¡ÂО0É°è°æ°ùp×ð²ðÑãˆu×""¹‘]Qب°¨¦¨¹•n+÷¬œˆ¶ˆ.Œ^¥½*{Õ•Õ «SVŸŽ‘ŒaÆœˆEdžÇ‰}Ïôg60çâ¼âjãfY.¬½¬glGv9{šcÇ)ãLÆÛÅ—ÅO%Ø%ìN˜NtH¬Hœáºp«¹/’<“ê’æ“ý“%J OiKťƦžäÉð’y½iÊiÙiƒéúé…é£klÖìY3Ë÷á7e@«2ºTÑÏT¿PG¸E8–iŸY“ù&+,ëD¶t6/»?G/g{Îd®{î·kQkYk{òTó6å­sZW¿Z·¾gƒú†‚ =6ÞDØ”¼é§|“ü²üW›Ã7w(l,ßâ±¥¥P¢_8²ÕvkÝ6Ô6î¶íæÛ«¶,b]-6)®(~_Â*¹úé7•ß|Ú¿c Ô²tÿNÌNÞÎá]»—I—å–ïöÛÝQN//*µ'fÏ•Šeu{ {…{G+}+»ª4ªvV½¯N¬¾]ã\ÓV«X»½v~{ßÐ~Çý­uJuÅuïpÜ©÷¨ïhÐj¨8ˆ9˜yðIcXcß·Œo››šŠ›>â=t¸·Ùª¹ùˆâ‘Ò¸EØ2}4úèï\¿ëj5l­o£µDŽǞ~ûýðqŸã=''ZÐü¡¶Ò^ÔuätÌv&vŽvEv žô>ÙÓmÛÝþ£Ñ‡N©žª9-{ºô áLÁ™OgsÏÎK?7s>áüxOLÏý nõö\ô¹xù’û¥ }N}g/Û]>uÅæÊÉ«Œ«×,¯uô[ô·ÿdñSû€å@Çu«ë]7¬ot.<3ä0tþ¦ëÍK·¼n]»½âöàpèð‘è‘Ñ;ì;SwS—yoáþÆèE¥V}šaòäÉ ¥Ï°¹kPDEEýGØø™™™`Œ,Èf#r€#dðY†·oß2\ºt Ã!zzz ÂÂÂ(bQR@³àÁ@X –ó_¼xÁ€&Ï“CPµŒ0>@±àR„‘| |ḂÎ ‚îR\ Yˆb#@Ìy0õø\ʈE €XˆO —¡ @d—ø €Bwñsb ~|†‚@1Òª š›D3ƒˆfŸ À‚˜FÃIEND®B`‚djview4/src/images/icon_export.png000066400000000000000000000014651174072760700175460ustar00rootroot00000000000000‰PNG  IHDRÄ´l;bKGDÿÿÿ ½§“ pHYs  ÒÝ~ütIMEÓ/§â×ÂIDATxœÕ”=E†ŸÙ5w>ðÇÈ2’‚€ˆ?1"uÑEübH@ A‚!sB2úddɾw»3»ÓÝUÕÕ3;ÇÉk;vK­ªî½ýôÛÕ O[«6É?þúQ]OT3³zBÓvĤdËÌê)fÅ,£j¨n¢qçŸ9ó£ÅwÍbõñÏ7>_Ôẞ¼ôʵKPqíê>Ÿ~ñ Ë&pá¹]>ûäýÇÒ}ãÞºýÁ·_ýðáá””. Õ°‰›¿rùÂyêzòÄm/šÜó»#è&‘a{UÕ ï_Üãå¯ð•ËO1–Ë)É8w*,Ѝ1©z·ßx•«Ï_dÿÒ³u/,›–å¢Á,?,œÄÍ”bœ4ï½õ:¥Jùq;äýxÍŒ““–£Çt!bfÛˆ{+º˜øí;¨eÌ2–}Ƚ¯ˆœ1bH4Ë–õ:p|Ò£<ŠXUBJÊr_R–ÿ˜”…¶]ºHJBJŠˆc$ç-Â:Xáîœß=‡ejרŠã“’™–ÌÎlÊd÷³IÅl:á(RröG;ÏÌxçÍ×pwBBH¤¤¨Ú`—õ-6ö/¿þ‰yH÷À,B"AÕ¶Ÿ] ‰ ¢Û­HI͘wïþËýû ª6\a®°Žö˜õâ;;5) IÒvaÈL•ª*ìíÕˆ€*Ôu¡®a:-˜ÁdRP-TUˆÝ·yœ”Õº#›±ZE‹n¤ê O!¡Ù¬¬íÄ1$Öë@qGÕpÏäüp7룻BýB²8ÄD ¼`f”â¸÷½Ïó0îcΛ¼ "¨(î[ˆÃ:²^´äl¬VËñäO«àì!ªæñŸuÛº5¾­Žç‹ë÷þ~pSâö_‡ä\F✠¥øÿæN¿¹îÎé‚âÎužÚöàÿßyK¼IEND®B`‚djview4/src/images/icon_find.png000066400000000000000000000016451174072760700171450ustar00rootroot00000000000000‰PNG  IHDRÄ´l; pHYs  šœWIDAT8•”OLcUƯ´ÐN: Ó> ) °ñ“` 5Ê4Ú ÊLbÈíÓ¤ ºœÛ.ìÆ­ 7*º±IÁn›4  ]‰‰5}ü'$-ÂÐÖæ½Îô•w]Ôb_iù’³8ß=÷ËwOÎ=ÿ"™J ®€s÷¤ç[“{wïàtØLºå2hheÐ4AQýd*-ž'n¹Ì™Ív{CtÕø—_z‹d*- «-_jmE6£³ £gg5Î}Ã>$³úO %ázáºÉý¥Žë¨;î²×ra)ÓÙeàr¿ÉÚ·?°{xbrþ¿7Š×ïìœsÞ›¬ÿ¸nª½’°Å‡„âšÛÛCH§ZÎ\{a«µÝÝ0>.á°×r©i>®,Ü ÆÎ$\yVm{yii ŸÏG,;çb±úøiý«K„õÖ-Ïf³Äãqü~?‰D‚ E!‘Hà÷û‰Çã OLwÎ;“L¥Eðí;¸{Í?/“ɰ¸¸ˆaH’ÄÑÑVkÍ@µZE–e$I"_Ôøâ³O™™™‘.8¶6ÞÚÚbaaééi„ "I³³³LMM!ICCC!ø0tŸh4ÚºÖ³p,£¯¯EQär9ü~?ËËˬ¬¬099I.—# ( ‡ùùyÍsÜ02™L†ÕÕUæææèQ¦\Ñ)‹¨ªŠÍfÃãñ ( Õj•žžúd7Ù¿ŽI¥R{ܸ݂Á î½ìoüŠÅоIÿ+,“ÂétP*•xðÁûdÿø™Ý½ ‹¡WÇ89Í·ÿy›››èn'ƒŽ§Ü¡\1ØÏí ë:v{maäóy´Ü·zʼþÆ0ßÿ²Í៿±{Rj/¬i•§¨ÏÑò\ë„îþwB°¶¶Àèè(Ý×l8³”Žªèš…3!S©TÚÿ¼p8LáÌÊÈä;ô¼vïÌ#ï …p¹\¸\.B¡÷NñÎ<¢wâ=¼c·)œÙ‡Ãÿ %SiQÒ*¢Žr¹,¢Ñ¨¾‰q!˲ˆD"BUÕóUUE$², ßĸðz½"š³p†aˆããcaÆ…³Æš>þ¤ý>þü˯ÛuæR8×Mù?~š%+_AIEND®B`‚djview4/src/images/icon_first.png000066400000000000000000000011061174072760700173440ustar00rootroot00000000000000‰PNG  IHDR‰ bKGDÿÿÿ ½§“ pHYsHHFÉk>˜IDAT8Ëå”ÁNA†ÿž%²{ÑçàL†ÜŒ'cHˆ‰"qXØžÙ]º§««ŠÃÂÀ2CŸðÄ«îê/ý•´QUÜ¥²;¥ýàÜõbyuWË2âÔ>¼_0©‡¯–~ëáqhôÍ8¬*‹ÂÚ˜tñúížúJZûÀñ„á¼Ü {·¾¯DŠ¢ŒœŒÒ@ç“ ƒ¹}ók5’¢,#¬ðî ¡ó _ B Vgpæ§–Ðï Tƒ4|˸˫»še€0´„¼ãÁ¥Þ ºóÆã+‡‹/¶õÑù:ãþa@as„jUI/s®êzçϽÞôºÙEÆP"RÙšsȬ¹~Þ|lž<ý¨ÅEãDP³KoB PΜ}ùôÌx—ûé¨1`vP ià¿ü ¡:™:¸¡ï_Ÿ_Ã"hÓ Pdê.†öæß^fWÊìÓÀH%ˆlk6—ú¹µbnƒ5€ÞåõH)ýÚ~c:.:nãÎÜ¿ö°ju]ÝŒ÷BtEXtComment CREATOR: XV Version 3.10a Rev: 12/29/94 (PNG patch 1.2) ‹3ôIEND®B`‚djview4/src/images/icon_forw.png000066400000000000000000000012111174072760700171670ustar00rootroot00000000000000‰PNG  IHDR‰ bKGDÿÿÿ ½§“ pHYsHHFÉk>)IDAT8Ë­”]H“QÇç}ß½¹UsƒÁ¨5("E"ê"¤ Aa± Œ «Š("B”.‚´ï‹ ›Hú!A©œÒEÐÙ"L­tl8Ýæ¶œ{Owáp›o°?œ‹sxøñ<ÿÿÃRJ )¥ 4³Àö›wMa xïÙ[.´Þ75T——ð¤{ÐÔ´‡n÷F&â×ä…jó/>߀ü=õ¡j(ŠÀªë$#A"‘¶òuœ;PMçóš;ÉÆSµ"PÌ_›ºÃ^Ùçq¨neËtô¢%|òñ.Ò½™‹5T94Ú¾ÄnSh>st4cda±b-]‰kÛª÷ïÁ³×ƒ§þå;w¶óxtŠqÅÂéúÝÄRzVO3(LI•^€¾ï“¼Ñåñ9œ$™e`lšÛ_B %àÈA£¡Ôh†‡RH ©ð&¡?FT )CE( ñXšžñ$ýñIfG~2÷þÞJgîP0 dr¡Ø—ê8lÂBc:¦PTlÇá´þ:ÆL÷ NV­ ­å²ÈÝa*ÁÜ?¢s’€!H”UëÑ7l¢xuÉá1b¯žr¬²„¶–¦¡d¤ìó È_ATM'6þ½7Ýê"Xº«k ÑÁ^¶»h½tvñµÉ¥­µçå·„J:Å»¥ŒëY:Ëšr>‰‘4T9óÂLÓÑ Çk*i»zE,Z,¥\ôÜè¸#ÍÔI)Íyø?*øý,j"0à:IEND®B`‚djview4/src/images/icon_fullscreen.png000066400000000000000000000016201174072760700203600ustar00rootroot00000000000000‰PNG  IHDRÄ´l;gAMA¯È7ŠétEXtSoftwareAdobe ImageReadyqÉe<"IDATxÚbüÿÿ?-@±XM{6Ÿ›ƒ9™‰áÏï¿ ~ýâ¿ ¿¡4ˆÿ› R÷÷÷?†ôÏÏ ÿ~}Z@, CÝÄ~þb`øùƒáÇO þÅß¾éïß¡™ Äÿ˜~= 4—á?Ä¥ŒŒŸ€»ˆ‰“…á'а_ 4ü7ÿ†â? €èFbÿCÂ(¡ÉÌÊÀÈÀÆ@,|¬ÿ¬%@ýò ÿFfÿFпÿëÅÈ‚¿@/,^ÇÄ@,üì r¤GÈaÿþÃöß0ñýüϰï@±ÀRÅw7i„.vVÎ͈2ôW¬ÃÿÇïþ¿ú Øé×`ÄÄð-¹ñri(3Í¿ÆÀ(ÎÇÀ(È–‡¸œ €˜þà fef`æa`åcøQî@„¡ `šÉÀ$) ÔÇÃÀ ÀÆð(R@L° `æeà\~“AL„QLŒá×¼ ¼†‚ø,ç30H+00JI2üYz‹I„*÷Ÿ €à.æXtB7í,ÅÀ–4ÍàÿH‘Ä6à§~4еJ ?sVÅ,¿ — &lYš-v f ,æaÁb3JD“ƒÐÄD¨¬À4“Êÿò@!" üZ”‡ÇÐ(†rm*Çb @1¡§ãù– ÿ_=gøµ¢ n .—r­/aøÿòw·˜Ï›mÀs(@¡¤cáÿ_û‹— L!X\‚šË>ûuñŠáß«· ¼z ÿß|1 €˜0‚(ÉÒq‡¡ ®þX²•áõG†ÿo¿2üÿðƒ ãaüÛ_Kø2`„/ØûÉZ ÿß },S?ÿÄ €bù÷÷?°„úÃÀ¼åˆ ÒüdØ_( Œ –ƒ‰ƒ’Û¤³`ÿ@Eï/°ÁÄhZå¿’3°–þþBh Ep6þ‡,¥ÿýý‡3‰Þzò €iUç@€´àö¾÷!1IEND®B`‚djview4/src/images/icon_last.png000066400000000000000000000010751174072760700171650ustar00rootroot00000000000000‰PNG  IHDR‰ bKGDÿÿÿ ½§“ pHYsHHFÉk>IDAT8ËåÔ¿nAÇñï‘@ŸGHÉÐ „h ä (i(‘@PÑÐ¥ÌãСˆ"‘ÆÂ(R¸ó÷ÿì,…-#Ǿs*®\Ý~f~»£­J)\çwãZµî^]x÷~\BP޼ܯ†6¾~;*u#´pxp{ùïÆwv*^¼:<ܘ )&¿âpd‘Bµ¨÷ôÙI/Z´à|Æ;WDþ:ŸoD§mÆ{E¤É„ hžG»ÿèóê|f2ñ¤XoéÐ)—¿ëtÉ»†{?­ Þ+ª 3 &Q´ÚN¨!„ œý³çÜ}ðq‰“7žíî¦Ec2u#L›ŸÌÚSR¬¹ykoÑͬSTývÐ{Ř̬«±f„5#4Rjørô|p6{/¥i,ÖœcÍÍ€o§V0IóȪ[æ°mÁO°³3$Nøþõ`­3‘ŽëµØk`X3&¥¦ÈÙ‘RGZíc¸œWΡÐìÉyF)iiÉê1€kRœRtu|ªÿïý‹ù Îû’Y—BtEXtComment CREATOR: XV Version 3.10a Rev: 12/29/94 (PNG patch 1.2) ‹3ôIEND®B`‚djview4/src/images/icon_new.png000066400000000000000000000014711174072760700170130ustar00rootroot00000000000000‰PNG  IHDRÄ´l;bKGDÿÿÿ ½§“ pHYs  šœtIMEÕ79ùHwÆIDAT8˵“[Ha†ŸæŸu77-×ÒÜŠˆXŸíx&\)Hl½E°û=âãüehJ *5Áë«íéPÒÛô³·ýîü9άj“éÏu¼´dÚP'…ÇËÈŒŒ’ê  {½¨T†çJíZ[yc—êײºÆdöRBúÛ3&‡ù1z 4%4"Þ³Äß~V%+Tí¢7Oç'¾ÆfRfØÓ[hñ…u[¸ñ¢^¸Åè¥3¹¬4€.%K–ùœžl»Â¸%ßå\ÞSèK‘+x¦òý•äg‹ÿ¤ÿžEó{ÿüþS!=p~/IEND®B`‚djview4/src/images/icon_next.png000066400000000000000000000007161174072760700172010ustar00rootroot00000000000000‰PNG  IHDR‰ bKGDÿÿÿ ½§“ pHYsHHFÉk> IDAT8ËåÔ=NÃ@†áw“Tœ… ‰.-%7 äTP„DAÉ%¸ @ ŒP„ÿd¼ëõ.4`;QDÃTÓÌ£™¯cd“5Ú¨öçàùeOÏ’•2éÝp<ŸÌ£ ÷!>ûã‡Ah'hê€÷ßÎþÁ]/Ú *Õbm ´ÐøÈtï6® Èm¦n1Úâ›’ÝéM\ l| ÄHµôä…ǹ ­¬³½sõ#:éËD©–¼ð”Å+²z¤q9[0šl±2X×)[ä2G«-g„Ðð|!V>YÊ–¢”h•¢Uú…½<]‹ßf:Áªª±æ £S¼+{±^й kç¸ú}ÖÚ kæ„Ð ÂzAï+ÚPÆÄÿ{°þÀ´†‹âceBtEXtComment CREATOR: XV Version 3.10a Rev: 12/29/94 (PNG patch 1.2) ‹3ôIEND®B`‚djview4/src/images/icon_open.png000066400000000000000000000025141174072760700171620ustar00rootroot00000000000000‰PNG  IHDRÄ´l;gAMA¯È7ŠétEXtSoftwareAdobe ImageReadyqÉe<ÞIDATxÚbüÿÿ?-@1ÒÊ`€b$UCyãI…þÏgec2øüù·âä.ëØÔI¨¢édAç„‹ï¯ßúòÿÎýoÿ³J¯Ç¥ €@A Ã@më)ƒªæSç÷xñÿë×ÿÿ_½úýÿýû¿ÿ§Ï»õ?9÷P6sˆQ>ñúÿ1†ÿ~ýe`øýçï? k¶?ýð}‹¾`Cç™zW'y~^V†?þ3üþýLsp03Ô´üðñÓOÅ¥³Q‚ €mËîýï¯Wöh0ˆþù›áéï ßbr‘e01”ûÅÀð÷/Â`¯î>þÂÐ<éÒ†ÝW .9<€ @,è©âPó³SOxÿü`¨ËÓgàâ†=ÿýûÏ £&À`k(ðïßÛ…{/1À  –¿ÿxôáéÙ >. rœx#òý—? 7¼d:èn†[ïÞ÷3è4‡)P €X]óéÅ'+SI‚†~øúÁ»öƒ‹ƒ’,Ø,u …Ï_ÿýþÃðabï^€º¡IZŒ¡jÞsÓ ÿþý÷ ÿ€é–á0lÿ@Ù[O¼cñ”g``8øl0;ÃÅóyï½ó hÔ€B Šõ{^3(¨Š2èI³0Šp1|Ê}ÿ ß~ügøöûà éj ?YYN݃ÊÈÄÀðöáw†WÇüeø÷Eñ @¡¼çð+†[KtÞ¾úÍÀ/ÌÂð‡áõg†7@üð9×÷@öO ºé݇¿ o^ÿdøöö Ãó«¯><ûúáãcÞ¿ê LÿËŸ?C÷ŸúÎ`«ËÇÀ ô«+Ãù[ŸDåøn=a`¸ôî‹×^¿ùËðò ˆþÃðíÃw†ï¾ |Ïðè+†o ¯Xþ²ðÃ-·ÄòšÜž|Çd-ÄŒ†—@W½bâc¸qè³ÿÌà`¥á¿þ1üòãç? k¿1üþLÜÜÜ@³€€˜ù—Ãÿ³@æÓ?`„|úÊÀpùÚ†p`²a`xÄÀ dx÷ùÃÇ/@Ã~ ø h·¿^¼øÆð—…‰ƒ5¹0ÿágøË°Ä pªØsü3ƒ?Ë/ <@ÏHƒƒ˜*ø$Y>¾ûÅð‡…‘Aèß¾ß?xÅ1( 03üûù“áß·Ÿ €Ùôû7`ð¼ý'üðñïW û,²£˜Ù©<¶ˆÅ9§³SÙbîñ¶L!GĈ¯ˆ 3¹œ,ß±FŠ0•+â7âØT3IlpX‰"61‰ä"âåàH _qÜW,àd Ä—rIKÏást–.ÝÔÚšA÷äd¥pÃ&+™ÉgÓ]ÒRÓ™¼ïüY2âÚÒEE¶4µ¶´4432ýªPÿuóoJÜÛEzø¹g­ÿ‹í¯üÒ`̉j³ó‹-® €Î-ÈÝûbÓ8€¤¨o׿ºMîòÐ]9ñLaŠ€.®+-%Mȧg¤3YºáŸ‡øþuAœxŸÃE„‰¦ŒËKµ›Çæ ¸i<:—÷ŸšøÃþ¤Å¹‰ÒøPcŒ€Ôu*@~í(  ÑûÅ]ÿ£o¾ø0 ~yá*“‹sÿï7ýgÁ¥â%ƒ›ð9Î%(„Îò3÷ÄÏ H*Ê@èC`¬€-pnÀøƒ VH©€²@Ø A1Ø ö€jPA3hÇA'8΃Kà¸nƒû`L€g`¼ a!2Dä!HÒ‡Ì d¹A¾P ÅB ByÐf¨*ƒª¡z¨ú: ‡®@ƒÐ]h š†~‡ÞÁL‚©°¬Ã Ø öCàUp¼Î… àp%Ü…;àóð5ø6< ?ƒç€¢Š" ÄñG¢x„¬GŠ ¤iEº‘>ä&2ŠÌ oQEG¢lQž¨P µµU‚ªFFu zQ7Qc¨YÔG4­ˆÖGÛ ½Ðètº]nB·£/¢o£'Я1 £±Âxb"1I˜µ˜Ì>Læf3Ž™Ãb±òX}¬ÖËÄ °…Ø*ìQìYìvûGÄ©àÌpî¸(—«ÀÁÁ á&q x)¼&Þïgãsð¥øF|7þ:~¿@&hì!„$Â&B%¡•p‘ð€ð’H$ª­‰D.q#±’xŒx™8F|K’!é‘\HÑ$!iééé.é%™LÖ";’£Èòr3ùùùEÂHÂK‚-±A¢F¢CbHâ¹$^RSÒIrµd®d…ä Éë’3Rx)-))¦Ôz©©“R#RsÒiSiéTéé#ÒW¤§d°2Z2n2l™™ƒ2dÆ)EâBaQ6S))T U›êEM¢S¿£Pgeed—ɆÉfËÖÈž–¥!4-š-…VJ;N¦½[¢´Äi gÉö%­K†–ÌË-•s”ãÈɵÉÝ–{'O—w“O–ß%ß)ÿP¥ §¨¥°_á¢ÂÌRêRÛ¥¬¥EK/½§+ê))®U<¨Ø¯8§¤¬ä¡”®T¥tAiF™¦ì¨œ¤\®|FyZ…¢b¯ÂU)W9«ò”.Kw¢§Ð+é½ôYUEUOU¡j½ê€ê‚š¶Z¨Z¾Z›ÚCu‚:C=^½\½G}VCEÃO#O£Eãž&^“¡™¨¹W³Os^K[+\k«V§Ö”¶œ¶—v®v‹ö²ŽƒÎ[º]†n²î>Ýz°ž…^¢^Þu}XßRŸ«¿OÐm`mÀ3h01$:f¶ŽÑŒ|ò:žkGï2î3þhba’bÒhrßTÆÔÛ4ß´Ûôw3=3–YÙ-s²¹»ùó.óËô—q–í_vÇ‚bág±Õ¢Ç⃥•%ß²ÕrÚJÃ*ÖªÖj„Ae0J—­ÑÖÎÖ¬OY¿µ±´Ø·ùÍÖÐ6ÙöˆíÔríåœåËÇíÔì˜võv£ötûXûö£ªL‡‡ÇŽêŽlÇ&ÇI']§$§£NÏMœùÎíÎó.6.ë\ι"®®E®n2n¡nÕnÜÕÜÜ[Üg=,<ÖzœóD{úxîòñRòby5{Íz[y¯óîõ!ùûTû<öÕóåûvûÁ~Þ~»ý¬Ð\Á[Ñéü½üwû? ÐXðc &0 °&ðIiP^P_0%8&øHðëçÒû¡:¡ÂО0É°è°æ°ùp×ð²ðÑãˆu×""¹‘]Qب°¨¦¨¹•n+÷¬œˆ¶ˆ.Œ^¥½*{Õ•Õ «SVŸŽ‘ŒaÆœˆEdžÇ‰}Ïôg60çâ¼âjãfY.¬½¬glGv9{šcÇ)ãLÆÛÅ—ÅO%Ø%ìN˜NtH¬Hœáºp«¹/’<“ê’æ“ý“%J OiKťƦžäÉð’y½iÊiÙiƒéúé…é£klÖìY3Ë÷á7e@«2ºTÑÏT¿PG¸E8–iŸY“ù&+,ëD¶t6/»?G/g{Îd®{î·kQkYk{òTó6å­sZW¿Z·¾gƒú†‚ =6ÞDØ”¼é§|“ü²üW›Ã7w(l,ßâ±¥¥P¢_8²ÕvkÝ6Ô6î¶íæÛ«¶,b]-6)®(~_Â*¹úé7•ß|Ú¿c Ô²tÿNÌNÞÎá]»—I—å–ïöÛÝQN//*µ'fÏ•Šeu{ {…{G+}+»ª4ªvV½¯N¬¾]ã\ÓV«X»½v~{ßÐ~Çý­uJuÅuïpÜ©÷¨ïhÐj¨8ˆ9˜yðIcXcß·Œo››šŠ›>â=t¸·Ùª¹ùˆâ‘Ò¸EØ2}4úèï\¿ëj5l­o£µDŽǞ~ûýðqŸã=''ZÐü¡¶Ò^ÔuätÌv&vŽvEv žô>ÙÓmÛÝþ£Ñ‡N©žª9-{ºô áLÁ™OgsÏÎK?7s>áüxOLÏý nõö\ô¹xù’û¥ }N}g/Û]>uÅæÊÉ«Œ«×,¯uô[ô·ÿdñSû€å@Çu«ë]7¬ot.<3ä0tþ¦ëÍK·¼n]»½âöàpèð‘è‘Ñ;ì;SwS—yoáþÆèE¥Vüß½ûäÿõë$k@aE«Ví™òäÃýúýçÎÿW¬Øå@Œ„-^¼mþ‘#P ÿøñËÿE‹¶Þ'F?@1Ìœ¹nþŒk °ÉÍž½~ý… ·àÿôž='ÿõ2 €˜ØØX÷O˜° E1ˆÏÅÅé ¤$ÍðçÏ_0þû÷ƒ  ÃÏŸ¿@ faðð°Þѱl8ˆæããÞïîn!ÀÌÌÄ _a`ÌÂÂÌðãÇ/BPÐOO+°á ³ †Z 011 û Æ¿~ýã§O_ƒ, ˜ìˆ ˜”>@ ç.))2äfff°KÑñýûÏ@é› ÁĬ§g¯ÁÉÉn ""ÀÀÁÁΠª*Ëréß¿Q0ÈÕOŸ¾bd¸}û±Á¼ˆ‡œ¹^b7&o{ý›ÁÄtEãž=§>¼yóîmþÇß¿ÿbxðàÃçÏ߀‰ƒ!LûŠ›8kÿï? û/÷k¡„7PÌ F‘’ÒLûmm ÔÔä€ÄS&AYû7ÐVVÆëSø~íe`÷‚UG†áù•þýcp4)¿öÙ€b„1bbj €¶õËqq!N`†G˜ ??Ã÷s¸¿ídüö’A„ù7ÃGV†ï Ò .ýn]‹0 €ÑÃ&4´BH0(­bqqáù~ïad{Ë ÀÆÀÀÕùé#Ãg~†Û†ÿwtn¾6 €‰ÉkJäe¾×kH`àfcf`DÓõíç_†·ÿy®g»Ü«ãú€"Êà­åš@ ûõÿÈJý‡úªõ×_p\€råó7¬ çÎ1ƒ  &b öî¼þÔŽ'3]xð(ÀÇÁÀÀÏ ‘¦ †—Ÿ˜ŸdáýΠ©öÛà÷_†ùÄDliÜýÃï?ÿaºp÷"0éò°30|Ò_~20¼þÌÀðûÃ÷ ªßXYþ)EiÔÔ@Ãbºpkÿ; ÷ÎÀðã( !©˜æÙ˜ÿ1©åtâl á÷d¾pã ÐÀßœ5ÄxÁ–üüò—áù[¦ÄLN%°å›®ÚÂ+o¿`÷`ÿû[BòÓK «A¹Xµ]dxý…¥ €)©e:CÕA©e=û~Ž? ¯¾²}øõ—ibÅš› ÒSÉÐ+FIEND®B`‚djview4/src/images/icon_prev.png000066400000000000000000000007321174072760700171750ustar00rootroot00000000000000‰PNG  IHDR‰ bKGDÿÿÿ ½§“ pHYsHHFÉk>,IDAT8ËåÔ»JA€á²yßÀ±³ÔÊN+A-Að,í-ÅFlDxC’Õ]vs1;3;3ÇB’;XxªS>ÎŽ–•¥jîî½ÊÆfm쎦O¢M ËÜâžž¿IY Ýž#M»‹gMq¥Pž,shÝ[¿2©3€aˆ?,qÜÄšd>pÿ¨.• „Y^Ò‰-Î °ú}vp{çytIcíŽ%ÏZX“ÄÍÖz”ôû87À•½I+ÿý(W—«*M»Äq“a¢1¢O>ÙÞ¬´„²¤,PíeÓÒ­,ÝËï×ß\|è¶írù&“Éœsæ3'3gޠІ‡SÙd2‘¨æ¸s'“:y²ï“Í|NµMÛ¶%“ííoZëíJ´1ss¹€ÌKƒÙ‹Ò¥ Ri„h­ªm¯VJV…*m„aøê`)Ÿ‚×C¥2ئ2æ2VU¡Jk´6H¹T¼áqzzzÚ¥ «B}?DK…ïûÑÎÎκçfÜÛÛû™RêÃãÇO|ÞÜÜܦµ¶V¡òhà‡()QÂÆóÜÄÙ³çæoݽ12ò÷_–eý><<|@ô÷÷Ûû÷4>0ðõ.Ïó˜™ù‡¢{Þ{‡P­B ~° µžÃ•ËC=|!lŒ1äóyÏÿ28øÃWvKKËé3g¾=‰Ô`Y–eqïá»:Þ¥¼¤ BM(5J„X¶ãº(,ˆ7£ ³a±Tµ=ÚÚ:ºÆÆF†œºOG"5÷ó°¡Ñ®­¥†bh(Ið•Aêe{àzˆÿîÓøú®gïñ~c D£Ñ/œ®®®·Ç^©M¹ì“ 8óÅÆó†Ù,°õ²Ù¿`8ñ†Çá{Ö¬Û·ïØíÁ’çºRJ‚` Ïs™Ð¯qãžàú\5àS 1NEܵµëÚ$“ÉF'• #‘$MM ’ÉŽÿÎ×qûþsykš··F(ÊÌÌ,Ë=ann^9BPTJ×OM嘚Ê!„àü¾8=OQ:<ö¹’!óH«ìHµPZâ©W¯ÎV¦µzìA9Fš—M†¡¡?7ͬaežY¾†ûö}¼L0š|~aÆ)ŸLE£µ]KK>×®]¡µµ•ÖÖÖ—ºŠT*E]]œC‡Ž°¸øß÷'\îÑÏB¨¾X,Žïúúú9räS¶nmxrY]d³Yâñ`1=ýÀLNNþáÄb±_ÇÇoÿØÝ}´¦¾>ÊÁƒ}ìÝû6âùÅ€”Šd²‰»w'¨¯Nf2™LÚ¹xñb˜N§ÛnÞý.‹í>vlà!6oNë¡R*ÇæÁƒûþ¥K?]Ïf§Ç._þ¨ì§.üÖ»¸X2/RJS.¦P(›|¾hÒéqÓÝÝßù,«¢×ÕyßÌÎ.0[Y=dŒAJ‰RË# C\×ý8·ó?…׆â/äêIEND®B`‚djview4/src/images/icon_quit.png000066400000000000000000000023051174072760700172010ustar00rootroot00000000000000‰PNG  IHDRÄ´l;sBIT|dˆtEXtSoftwarewww.inkscape.org›î<WIDAT8¥•ÍOTWÆçœ;w`f˜–ñbCC”ˆ,,(’X£56qa⊅ѥ W¦KWê®$êÂ…[úˆdìÆ„¸‚Q:RÅT‹¬|ˆÀ̽Ì3çtqïŒØ6Ýø&'çMî¹ÏyÎó~‰¡%¤Ôµ]Ž3d)eóV®TJ³++#›•ÊU+¤Ôµ+'O^Èçó¬¸.óÙa)RJ¤¨`—ÿÜ?ZWg—áÂObu8ÎÐF.ÇÂîÝ$z{?ÕŸ„@…Ã!å2Rß¾Uýçω¦Ót8ÎeIi¯¸. èrù3¦ÑŽìŽÂMMD 6>~dci‰Ü«WÄÖ×a p¸½R*…%¥mÀÃf6‹ÞÜÀª¯gÛ‰4öôüKǘãsèîæÏ‰ T*E½1 %¢XD,Œc(e2¨b;aç¥KÔ {ôˆÏžQYZ"c57“èé¡}`€âîÚÅû»wi²,ØÜDƒ¥AÃêä$‰}ûøæÜ9ê r™ ¿ ³ýý{Zb1_ëbéºÈׯy“NÓ<4Dƒã f3™Ä6hcÆ_Š…BÑ(N?c7nÐ>;Kc¥‚ñ<¾:yuô(…L<{zšÌ½{t9»ÆFÈå´²š\J)šNà×û÷‰§ÓXù<Æu©ooÇ9}š¶3g|×ÏäR¬Žïë#·´„ øŒ¥XJïî`vt”mÙ,:›Å¸.R©Zðt(ž®‹ðh?ö•+¼ãÛéi,)1Z£«Y!À¶RlÜºÅÆþýD››é¾y“¹ML`½yCêêB 9v oa¹Û·ù>C¤ñ˜9ÚÙI$®=†B—/ÓúÃüŸý>:ÊÒ;ô†BØJ!„`ymŸ''ýt«j\[ùEMMQ–Ãa6ÊeÊešl›VËBl­6üëëT´.Yk…ÂÈb&sA õõÿ9ª{4èµËÕ3à7züi³’Íòvy™µBaÄÒÆ\M-._]’B|Ñ0ÕÆ”²¥Òˆ6æêßDËð,†XUIEND®B`‚djview4/src/images/icon_rotateleft.png000066400000000000000000000022041174072760700203660ustar00rootroot00000000000000‰PNG  IHDRÄ´l;bKGDÿÿÿ ½§“tIMEÕ%”nZvtEXtCommentCreated with The GIMPïd%nýIDAT8ËÕ•mLeÇÿûÜÞî Çéäô*-%C¯’FÚÚŠ¢V#Si”BãKÔh´¶Ñ6ÄPÛ4¶ú¡J#å¥%!V´`LÑ1Ázå-”‚òzpÇqp»{»ûøÁÄ€@Z¾˜8Ÿgæ—™ÉÌ€ÿ›17sX÷îgŸØM ”ò†Y¿žu«¤küº—’ñIªõP¹/ŸV—_¿epBañ¡Œøô[⣸îaš®ƒÀŸn@£aª)ÔŸdE×X©T˹)ø‘~yçv‡ªÕ?t„P*B#ÃT aX½¤aøüµ£’Ü´‘ÖÔ ûo¨£è\Iác:¦|ož'FßGEÚ2¬¨š8ù øüXý«X·ùqáak™Ðà—¢F]jëj¢ejxñíûÛýÔ9¤Q[žF͹ Éi–t{^Ë:ÌbïÄù1BvÁ·ç~+'î×h\Þ²ò«€ÌwJ[ÿÐÙØHå?^PI§*±µùjéÉJÀÀt#†ÌË>Þï‘>/˜óµÑ“áBZûôΤ`GÌZ›{¨úà9@ÒÚF§Ÿ^P–&.ªT:Wö©ËSC`ÄFï`9²æ°¤œgõ¡9@¬&®}P) ƒ²odJ·;ÿ PÙ¯VŸ<€jXrмÓ-Oºš³F§3DZ]xRöÆ´ A<¯Ÿ µгÏò¸Û²oCÞ{üÆDݰ 8µ\Æ ÿ®SzùÉÀÃÄ›#Ø+…O%úß)»8áÚ’z§ùfNô:ÀA°ÚHájìw¡}3žÝ›Ž-„*ˆFÆ®t@TP€*ƒø¦¾SÕ&f&¸v${«[­¨êëÒf%@às°½#_õ¶ͱAV‰ ;¡°1šb$*µ“ìD¡vB5;¨dÑ(ÏzÖ+þ3Çê™÷²ü9þiŸ˜ù¯"¿ÔüÞÿQÁ½€Ê2§8ñÄ“F›VW}r©v„ðæPŽVK¾ 8sdŸwèžõ„Ýï/=¼méfJK>³>lY'D‡p-0ùǢ͓KO\^’<€ºäOœÅQ»))… L\¡}#—_'+ÖCeqÆQÏg~¸5%ËrB³ó|ÓxUCËÊÀÜø%Ó_.€>·«$9~wÁºØõLÇÕ†™‹G‹¶Ý’/gäá[¤)©Þ‘”k·˜LŒ{ôûé ­ÉžºK½+“ôÍ,Ç_5ß“gÜ´Æ~×v]Ow]À/¶|í,.Î\Ñù˜jÕ«¶KÌ\DL¨ÉLõÊò˜[Gf|=¯¨ —»þ³›÷/çµÀ ?è&IEND®B`‚djview4/src/images/icon_rotateright.png000066400000000000000000000022141174072760700205520ustar00rootroot00000000000000‰PNG  IHDRÄ´l;sBIT|dˆtEXtSoftwarewww.inkscape.org›î<IDAT8µ”]L›UÇÿ=}ûöh)0`0 AÆÄmÙ\ &Œ°Mö¥nFܲ SQ£q7È^(jt‰ûˆ&2Äap‚Y6†¡H¶ƒbËJ ”·}û¶ï·fŒÙ↉ÿ»óœçüÎÿ9Ï“£QUÿ‡¨U7\Z‘‹sÓé' ´æ!P`= ܨÀ‡T92 u— ÿÖüÓ1µÏÿL•éëŠBý6ÄâaåZ$˜Y¦½B\D1Þ<ç?f}ÍÒµÒ}Áå'ý/«1½—“F']®Ž¾€ ­Mœ„x@’IŒ¨>÷øHpéöSÜ÷5ã«‚ëßeZÞ9÷b—CC>éU ø7Ñü¤Ý$ÌÒ”BëuÚ´ÜõæÍzsb*ÃÌúA¦Æ~ò¹Æª¥¾Ãþ(pÞñù’'\뢌ß\ã#ìÒ\;ÇúŸ“ºJ#+“ žý%ù±Â”O7d¦Uå8Ó”`y£Ž¾žùÛ{¤þÆåò µÏ­=ReìpÎSÆöAf\-¯²®„RõOjê&ô£§+|_¾šßÐ?8Ö–ljùé€Ù@°éá¢]F“qÏJdóF݉òBcÖg—–ñ^åÃ7¢:!±„]š;˾–­/93#i6 )HIIÒ[­Ö§ï§ÚHåДFóçË a¦Iêz4z°å`ThÚ½0d5)°[ $&Ù˨íïÓËUê´šŒI@ŒgÃE½QC €£§®ß¬+ÏNn¨ÌVô”Œ8?›³2I#²3°ÓòZÀËŸ¥¶«Âj_×–•WRàqÍ»Ç^aºw®Éf,0P»Úl¶äŒ7lÚRKÀ+>×ÍÁ ö4³à>' ¾óß} ðÙjϰÄÛö úõP…Lž]%‘—Eîì‚çÖçÒpë}/‰ ^)ªìõš¦Ë´±¨rDˆ„–~û(z$× þ¯ú 5™ù‹¾ÎC°IEND®B`‚djview4/src/images/icon_save.png000066400000000000000000000014651174072760700171630ustar00rootroot00000000000000‰PNG  IHDRÄ´l;bKGDÿÿÿ ½§“ pHYs  ÒÝ~ütIMEÓ/§â×ÂIDATxœÕ”=E†ŸÙ5w>ðÇÈ2’‚€ˆ?1"uÑEübH@ A‚!sB2úddɾw»3»ÓÝUÕÕ3;ÇÉk;vK­ªî½ýôÛÕ O[«6É?þúQ]OT3³zBÓvĤdËÌê)fÅ,£j¨n¢qçŸ9ó£ÅwÍbõñÏ7>_Ôẞ¼ôʵKPqíê>Ÿ~ñ Ë&pá¹]>ûäýÇÒ}ãÞºýÁ·_ýðáá””. Õ°‰›¿rùÂyêzòÄm/šÜó»#è&‘a{UÕ ï_Üãå¯ð•ËO1–Ë)É8w*,Ѝ1©z·ßx•«Ï_dÿÒ³u/,›–å¢Á,?,œÄÍ”bœ4ï½õ:¥Jùq;äýxÍŒ““–£Çt!bfÛˆ{+º˜øí;¨eÌ2–}Ƚ¯ˆœ1bH4Ë–õ:p|Ò£<ŠXUBJÊr_R–ÿ˜”…¶]ºHJBJŠˆc$ç-Â:Xáîœß=‡ejרŠã“’™–ÌÎlÊd÷³IÅl:á(RröG;ÏÌxçÍ×pwBBH¤¤¨Ú`—õ-6ö/¿þ‰yH÷À,B"AÕ¶Ÿ] ‰ ¢Û­HI͘wïþËýû ª6\a®°Žö˜õâ;;5) IÒvaÈL•ª*ìíÕˆ€*Ôu¡®a:-˜ÁdRP-TUˆÝ·yœ”Õº#›±ZE‹n¤ê O!¡Ù¬¬íÄ1$Öë@qGÕpÏäüp7룻BýB²8ÄD ¼`f”â¸÷½Ïó0îcΛ¼ "¨(î[ˆÃ:²^´äl¬VËñäO«àì!ªæñŸuÛº5¾­Žç‹ë÷þ~pSâö_‡ä\F✠¥øÿæN¿¹îÎé‚âÎužÚöàÿßyK¼IEND®B`‚djview4/src/images/icon_select.png000066400000000000000000000012441174072760700174770ustar00rootroot00000000000000‰PNG  IHDRÄ´l;bKGDÿÿÿ ½§“ pHYs  ÒÝ~ütIMEÖ /7ïŒÝÏ1IDAT8˵•¿kSQÇ?'&CƒTºµthýêPŠBÁ —N%.Ž  Ò¥ƒC—¥‚KA§àPi) Á!i³”GP^Þ»ïÝwjâKMú#Ú.÷r?ç{Ϲ÷\QU®Â\‘%Dž-[õ™ ÁTk-ÖZTU%Š"T•0 ñ}×uq]ß÷™Ÿ¶â“È ýÆq·ÖEÑårÜÅÇýüÂà~›Ïƒ x!p<ϧOñ{×ùÅë%~+:àÓÅ(‹À"’PÕh â zÜó×\ç6DQÄîî.³³5êõº‘kcÃ0 »€x ¬µ=kãã㬯¿duuu ˜‘ïqå]ÅžçÑn·ûºçyø¾ß ®ªˆ“““ …ìÂÂÂkàF\yO*Œ1=OC†ÝS$ DazzšÍÍÍ;ssso€›¸œD¿l¯ˆ˜™ùL¹\ÂóÐJžÕH™ˆ$FFn5ÆÜ ‚ [Ðåå廵Z-ï8΋äð]Mñ}ŸããcR©kkkÎááá—t:½å8ŽÝ›Í&6—Ëý¨V«d³Ù±J¥²Ýh4¾î°` ‚àq©T*îïï¿ÚÙÙ1KKKd2™À —ê§žv ¸¾¸¸85::ú©^¯k¡Ph´üëŸ'"²²²rÏuÝw"Ò¬V«OÞÊÿøLE$ <š˜˜øyttôhüi¿P®ü~IEND®B`‚djview4/src/images/icon_sidebar.png000066400000000000000000000013071174072760700176310ustar00rootroot00000000000000‰PNG  IHDRÄ´l;gAMA¯È7ŠétEXtSoftwareAdobe ImageReadyqÉe<YIDATxÚbüÿÿ?-@±XM{6Ÿ›ƒ9™‰áÏï¿ ~ýâ¿ ¿¡4ˆÿ› R÷÷÷?†ôÏÏ ÿ~}Z@Œ.s_üw7gøù‹áç†?øg`ø¤¿‡bd6©…{üû'†¿Ÿv1 ' ÃO a¿~Aðoþ Åþ1Ð!ŒÄþ‡„QB“™•‘ €XøXÿ3XK"4€ ú5äþÌþ ÿþÖŠ+ýgX¼Ž‰ €XøÙäH! Ãþý†í¿ÿ` âÿúùŸaß&€bBN?¦ÊÁ1Ô­¸E’¡06H@±0ü#.¹­\¹’ //¨% ÄòŸHƒÃÃÑ\Šp-²KAì¿@q @,ÈAÁ‘ýˆ"»»û‚-™ @(.ž={6œššŠ¢)44 -<1]Œg` £¨šp ãƒh€bAOèÁ‚M#>CA–c‚ €FLãúõk†±ƒƒ'<(ˆWéöj!$Gýgðó ‚jú‡×Õ0‡J:F÷>2{Ó¦u]lkë4¢ €XŒœ*’P öö%~xrÂö @À0þ7,99Ea¥¿"Ÿ8CÿC –ÿK¨?!±ú÷$¬Ë"‡†é¿ÿCÊ^  FÓú+ÿ•„˜5°ôÿóB-‚³ô?d9(ýïï?œa}ëÉw€b¤U@43 Àù¿§¾^PIEND®B`‚djview4/src/images/icon_sidebyside.png000066400000000000000000000013351174072760700203450ustar00rootroot00000000000000‰PNG  IHDRKÖûltEXtSoftwarewww.inkscape.org›î<IDAT8¥T»nA½3;¶d¤L0Øš R§L‰"[¢H ø$(øþ€o@Š”"RÓ„–"RÈ %E ?(@˜¬wÇ{Ï¡˜ÝµcK4\­fG3gîœsîÝ5/>œkuÊð¨ U*È ˜mé55Ë*Ùo§Õ•­ÍvšJx¼Ï'©??É$Ë$Mŧ’ÿ¹×üj ÊAW™ü|ó¤ ’’ åHBtrõ/ßÿr½áxzú…$€0–ïfó~£Ñ&ÇÃáh2I0ëëO¨)"ÍöcR*HæÒjnrq~Ñh´ûý~«õàÊ» )º°pxrwâ%Ne’ÎH¾í E("ik‡'õÌ»Ý>IG )¯:Ì™Ru&£^“ïÁ3²Vå2†*’­;‚Â<Ò4lФ k¥u{3›'[Š,Ëf•Ë•/‡âŠ0çU„÷^DŒ1E ˆ®ƒ¼÷!‡%®±à½`­Í=0Ϣħ]™€ªN§S‰¢¨àŸK0Æ,cHOЕ¬â8FI’¨ªª†K’$ vŠÈ2fmíÁ™cÌ`0c¢(:;;+ŒÌ]XÀ„ÅÜNk­µ6I’ km¥R988¨××¶·Ÿ…Bc–1——ÃÀdž5ŽcUÇûûû€t:{e9Ë›ç1_苜IUíõzÆDÝî^Ù¡šË˜à€HJØ6Æ9Wív÷ŠJçE-…ÌcTÉ¢¨ìõ>‡««7;Ýò|°Ð9w|üɹh4ºÐ=;;ÏËcE¤dsskáO£Ê⯳þúóÃ[Sª„¾#„•`>‡†u Hä*¿ý¿˜yx]Å’IEND®B`‚djview4/src/images/icon_up.png000066400000000000000000000005401174072760700166420ustar00rootroot00000000000000‰PNG  IHDR‰ 'IDAT8íÓ½JQ†áw÷ìO%ÉuU‹ˆ"ˆØˆ¥½¥—¡iDÁF„\‚7âXÚ!²[ìß9ÇBŒ¨ÙD0•äkgx˜aCkÍ(cŽTƒ¹ÙÝ»Õû»_]o(¸½sÓƒNÎÁ­keÁg³ WÑ\p}³©¥ŒˆE+”z¯]6sѾàòÚ±N“JEdYH<='¼vRº]I©ÜI´ÚЦp¢„íTqÜ),k’ª7ϬïàO;‹Û68:\4rÁúÊ–2Bˆ&š@ˆ†abÙåìû xžE¥lQpMÎOë=Ôê7ö*Ó%cLá’e!Iô‚S˜¡Õ i·ç¨Õ*xÞWâÇÊÍ?y½180o71iì]ÍÀIEND®B`‚djview4/src/images/icon_web.png000066400000000000000000000025651174072760700170040ustar00rootroot00000000000000‰PNG  IHDRÄ´l;bKGDÿÿÿ ½§“ pHYs × ×B(›xtIMEÖ 9"mÈÊIDAT8˽•MlåÇ3³»3cïÚëïõ:Ž?;´µchP) &%m%„B€¸€„â> R*ÔSÕªR=T(´*mUõ’V@X`œØ&);^{×_k¯wvgwgvfÞ·Ljšrê#=zo¿çÿþõ×ó(ü:zôy6¢‡ªEûÜøøé,ß¡”ÿÓb{’ï8fì>Ûõíªö…ÀŒ„…¡á„‘Ùr¡øì—ïÿâÂw?ñÚˆÛÒ~.[pš{ûö’èl#ÖE„© ¶]fiq¯fç‰iòй–?íÝüÒëxu6ï½éGê”þ½ vǩנ'%ÑÚˆ¦:uR™-\¡pñ‹ë,-­z™•ü³§Ÿ¹±“R6}üñtÿÓÙW~z$©$;ÛL˜Dëëhˆê˜aU!$ŽP°þôî fOmrcy‹‘ý=ØŽ4¢L]ˆõ½SHߺiÅìÜÚ½ù²š¸šåŽþNöõÞFD×ËU)s™"{ïV¹F¼©‰Ù5ªv‰7ž>Fus”·Ï~~70|áÒBß¡á!Žl6 …$BJòU…@‚第ùÝ?Âõ|j^ÀÒJ!¡ÎÔyë—9>ÚºøÙ¿†¾õXJ©¦–­DgG3ÝÍÚba̰‚ãúXe—RÙŲ¾^X¡æ@Èo{~€‡B{“ɇ3Ëê½GúÞ™ é Ñõ0ñz¦85×m ŽvS±®ëBI BH„”Š6Ë›Uü)ÿþÏË-»âæº57“+ŠŠ¢ ‡5*%›¥MìÃЦqdxˆšçóõ\–ÕµM„üäG˜õ²ö *Š"]Ç›mŒHÊnÀW ¤W-öw7” LÎ\g«X¡Pª1"¨¡0MñÉÖz:ãDë ÒËyJ¥²‚¢ÌîRñçõ•Üà•t³1sm«h3um…_>wœ#•ç¯l°Urqk>š ý{š0ºêØ—lBÓTrVEÞ˜Ë)À»rܸÿxæö=•ÞòÍé´¥L|™¦d;¼ûiвü¸ŸöFÕ|™HHåð¾8Žäà¾v*N¥"|:>-ý@9€ëÚ4#M¤¯ ……ø§R[J\ÛF)Eÿ¾~ÆÇ£Öv+•¬·øa´Vkà{.RX-¿8trˆãƒÌž}ïhKðŸŒÏ–r_÷}E­ÞÀóœk§ ƒÖ­5(â×ßO°mëÌŸŸ!™ 2w´+V­ÊuÝ•n˯~|e¸hÉb<×ÁV×ú«”bÿ¾~ö÷Ï‚R©™˜+'¸ûìVªWë…ÕÛÎån X±âÅÐq›¦§]íSbi)-@ðÇo§¿k4ìÞÎÎjµZŠ ùù•¾ôòL‚‘¡ þåžÙ1|ÜÒZ/”Ò0aÃÿê£u³FžÞðBÄÛ¨ÿ’? rìŒ_xùóábrÂÞyáðíwmù*݇ûöàN ‰-y’¹Ë²xV%ûΚYù ppD˜ÉÕ=Â=7Æ&kCßpáèOs_¼» wê bKÖ°°ó>–ßSξ¾²#`ù‡0{çmü_òŸ¾Meƒié½×éÈf–ÎÈ?÷f7µKÃTŽïáèÁAöü- Æ?„ùöÂF3qß‚1Æp»“[63ûáK÷›èbÁT~ÙlÎì\f^yxŽånm•»õ •Ý,v+íü¹X8üc1÷ñ=4ývv|AæÙI®˜ÔÓëÐ[¹âfÊ.Må}_dÕ¢u «»ÿcn¯£‹… IEND®B`‚djview4/src/images/icon_zoomout.png000066400000000000000000000020701174072760700177320ustar00rootroot00000000000000‰PNG  IHDRÄ´l;bKGDÿÿÿ ½§“ pHYs  šœtIMEÔg̨ ÅIDATxÚ­Ô]ˆ”UÇñïs^ž×™ÙÇM··bÈP2“±Ú,è"I‹jƒ4¨™(ºð¢6Hº(¥ BJÉê˜]‚ðªÕìF1 •؛ݛ¶qt]ue×Ý™qž™yžÓ…/$ådÒÎÝùøŸÃïËõڳç@^ëdK«×&´0(iabFLlÖ­{ú3n±¬kðÀÀ`1VÖ§~à†~*…ç9!hµZÔ+ª³³#QR©ôÂÈ-Á»v}[Ô¾(ÏÏeI§l[!¥ nÅh[#¥¤Z©21~bæÒtkÅÆN¶ƒ¥ëæóÒc0ww·†:2é´ï¹h­‰“„V³…RŠL&…v\wêüd¡ç‘Â@;XÄqõ­°3Gxd2):2iÂtЏ³`þ<|ßŶÙ\óÃ'·ný¼ÐŽâFoxG'Zk\ׯsÒžGG$ ¶Rø¾Kà{x®ƒ­ùEyšÍ¹WÛÁJ“wlRa……”’Ùj ÇuplMb„X–…1†l.K½^k;±Ò¶DJ‰eY\š­R©Ö¹è:Hi‘I§ÐR+uH’„(ºÜ6jn¶z½Ás”V “J8õF¥J„ch% µZ½-,λx2Žc„LÏÌÑl4‘J'1µF)%ZJ´ÖØJa+Åä™ *•FÛ,‹©É™½§NŒà8šVœ'W……¸:©–Gk”R bn.n·JÅúðð¡#3QÔÄs¤°ÚqüÄ8£#ctwß;Ó>th÷ÌäéJé‡Áï‰M\×¾òâƒÁ$ I’ÐŒc~ýý8;w|ÁâÅ2™ pKÅêÕ¥Þ»òåµÏ<.]¾ ×±ÑêÊý*¥8x`ˆƒC?±dIlöNÌ¥ãÜszõËþµ;Ï”n ¬ZõzhÛÍ- ²éÞÎy~^J üñÛ©›M=ÐÓ³r$Š¢0çË‹kƒùG i¦Ç3vÖë_ÿõĸ1æ?¯¯Öç¦/ ¿ojcŸ˜©=›Ÿ7…æË—rå¿îÜFU/Ówlpμùó,zè~–-¬?~naùúUxG1ÿØ} jFdóš\ñ”_ÜÔGtñµÑ½Œcè¿ÛÁ³%Ë;ŠÙßæ¿5>ûÍGma€·ŸÈ +ºÊ¯|ÐG45AmtÃ‡ÇØ?ô[Þö›L ÿ ¼öp¶¸²'[~ckÑäi¦†¿cÛî 7¦âv«¸"[|le¶üò»o²ý½ÝT»Öü?ðU¼ìy¢¨–n`|²¾÷OÖ<¤ãP1lIEND®B`‚djview4/src/images/splash.png000066400000000000000000000405411174072760700165050ustar00rootroot00000000000000‰PNG  IHDRÈñËGÐPLTE½½ÿ½µÿcckµµ÷µ­÷ƽ÷îRRñéÕ{”­RuˆJ9çý½Æœœÿœ”ÿÎÞç””÷ùµµ²VU”Œ÷¥œ÷Œ„凜÷BBZýú÷ÑEEÎÖÖ!9kÞ¡š½½÷Æçïçïÿ½µ÷BççÿàÞ×Ò¯¥îkksk÷UUUkœ½æœ½Ö¤“Ç„{÷ñðîkcïþþþÿ›Î÷ö÷Œ­Æœœ÷úöæÆÎÿœ”÷ÆÆÿwXµ999ïéå”Œï”ÆÞ”„滋””œœ¶GG,|¦Z”ÆäÞçÿÕȾÖï÷ Š¼…~²""¸ï÷ÿ¥­½Îª !!!ïïÿïçÿض­çï÷¶{s÷É™‘¥¥ÿÌüúñÜÔËskïscïãȾm¬Î„{ïîíí„sï3™ÎÖÿcsŒÎÎÿªªª¥ÎçÎÆÿÀjjÈÉÄÆÆ÷ãçåÖpoè558‹·1ZŒ)d„“™þþü÷ÿÿÞç÷cZïJBç÷÷ÿcRŽ÷ïÿï÷÷­­ÿ­¥ÿ[‚—{s便÷{kïV~’s­ÖÁÀ¹ÕÈÐŒ{ïrrrÖÞÿÖÖÿÖÎÿíßÐÎÎ÷çÞÿÎÆ÷)sš¿JJZRï„„÷åÝßRJçÿÿÿR(¥÷ñàkZïýýýRBçÿ÷ÿJ{­&\y÷÷÷cRç•Ãܵµÿµ­ÿ9kœ­­÷p”§ýššÆ½ÿ·µ®­¥÷çççÊ×ÛøöñãããÎ ÞÞÿÞÖÿµÖç””ÿÇÇÇŒŒ÷>•Á¥œÿŒ„÷ZR粬¥ZJçµÆÖ÷ïØ%â³ >IDATxÚí}cÓVž'l-CÇÀ➥iÂÆ3\{Û—`N{i—¶t»ÛNÝ„ …HYÅsÍL'nèv¦eÂ\eφ´Jl~Èj7nÜ6J“È,¹«¸?í¾ß';±'% O'_‚l˲ôÞû¼ïï÷c×Íj)Úõ¤ °Cõ´H‹Ñ -F;€´íÒb´H‹Ñ -F;€´íÒb´H‹‘Í€ á›']±¿T²I’&à.— æ¤`n–m“½€ä¢¾h…$ þü¿Ã6Oö"ùEÉ@ň\$ œ*2;´)Ù H0Z4ŠÅ¢‘ñ†QÌø2Ÿ/ã«a›(‘hÒç9éIW¼®ÜOº5d+ ’O™V¥˜.*†¯FÑ@dÈ_ž¾hßÏš>Ë®|î&(;¼Ÿ?á’¬“€¥O³élz¦á?â“F”Šp°ÊüÊÿ‡ïœÁ €@p@Ž%äë“Z†Iì$×—ŽÇY¤Êk<[‹HA*N#0}(Ä~`.A[´*H‘{‹ÅL´eD¨€HFÖëtz½,@oάN'~Œ¬?„ `¹dd~æûަælµ$Ÿ‘É\‚Π•4þ·Hù®büpd+ E'å âYÖÁ²”wÉB»ÃG8p«Ľ¬7 -’ÎN}ѾÌÖLRµ£'@ÜÛ {ƒRFQ^Íé4v 88O+ðßðý F§ÙåUÞ£(ªàQX]g•¿aGâ”C‰³½#,E±U`•Þ¸2íÌ*†ôItSD$t^:ÃW„7ÐlQˌޠ{‚ÀKÒwk $T0p CY€z4ëȦ£ñã„lDòeu:žŽ÷ê€D:>BÁ'§NS#:;¢Óú{^x…³tÒéDh¼ÎbA>ÙÌÞ‚;fAëxÔÈ{”éÃà3¦³é  º˜ ZD¯˜6¢[·j0 ŠҩiVw¦PB}$ý^\×߮;w@r}>/ÍhGœæ¸$M÷ê4×KÑ×qŽæX ôµÎq_ã»,ë6]L+Ðñ›uÏ`Ô7­ëýu(éMz"‘Ýœ^`DQÅd&ÅÐj^x§¬iwþ€˜WùÃ3 U4¢[4,¨ã=(—‚&{iî§ŽõÒ4°H«hñ,‰pº—‹àë×4¶#¼qê”#‰xv7œõêp…“b{u G<›.‚ ÚØŒÑ¢âŒˆ²èᎨª<Í{J¦¦‰¢ær¹%ÍuÝ ïòÍ­º\Ú*DŠf•ÍûzΧ_ë†J2 ÃíŽ0Lä”î€2;²[IοL@¢F‘‚2:‹ÇSÜnŽav‡ ÊN§fІÞÍ0w"S¢ƒŽ0œW§¼­{G¼Îì´/êkäÐHÞ¯õT¾œ%4í€zÙezò]…Œ—P H ˆ+¥ŸâX_t³2¢Nrr1ÉÉrŒ¹#Ê@´.FhÊ "°%´ˆm€@çShQ$ ?%›;Q¤BbŒXc1šå˜è`dY§c1† ÑÞG{{)°Å cCÿŒ*,ÍzÊ€ƒÛt¹Ü ¾è‚FŸå])# ‰ÕË«ˆ»Œgi1Âú65™¤LVñr§ÄdI ²žxAðÐ2,‚ÎH+°ˆm€@çáb11ÆéØñbSØô4J1™)ˆ©”îáS¼¬‹Ï%SÐ=™S»Qr±zr¢NŽÖuP)š¦h¯hº,@5T·–XÕ\šG­¢y'¹ ÿ\ãîpV¥c½¸) F6ÛËMÉàËf9Zh•bÀ"Šò©oâI£a# Að G"|JNEt9Åó‚L‰½YËû ';‚ ¸Iw—ohšÙåQS"§O§Ó-Á"v’‘Ï2„ zà ¨‚‡WUU %=˜C\ˆãËùr9_RËå²¢9¸(•H"§8šû7]¬ý`)ñˆ®u¾º:¯åYÐ눇+!ãq`uU@J«ä*W~ s¬± ‡H}i´0 tÁ3­Ÿr^ÚéÌ[A‹Øˆ/눤T`UM$j^Í—Q ä•×¼i‚…¯7¬3*/§dQŒpI0·Àq®í A_šåD4!­òvýLóÓ&qd£ÍV'Pœ’U³ö—Õj0øÁôÍaúM ÚÇZv2aÄuF@&0ñŸY¾a‚TÀ3yS<°c^ÆV$À &BJœÝ&W}Íù@‡ˆË®í’¦Néq_Ó·0 žÈçµú_ð±S\á¡ ’‘R°’%ž©}>Œ]€D/-"@ÿ¯òÔ÷2àaDÖéš¾­•Í|@àcLä§ GœÓµ,$€¨ÛÄUNÌjHß4x„Y¨c—™H¡áëŒ?œÈÊIU2 ˜ÀÐqô»"?< Ø~\ʬbàªixè@ ü`n˜µß܆•Ê €ÐªµŽú'ªÚC¢PÛá†R¤M éÔ9QN4"ÈLDwÄ•N~³f ŒÜ´‰â÷µ `cé¡yóiP@M ð!V«ÌD€M §œY£F­÷M³\ ,ß(È—·LžÑ³M]C ô Š©AbN€‡š-öÕ˜û¼2F£±©£¾Ÿ‘D ¦? p 2FÆ02¶É,Û°*Z9Vk­%b »eŒaAàS€D[¿ÉPj¡V-ÖÈpI¡BŒœ"¾[ ¬6UE@ËˆŽ‰÷¾¬Õ=G[×î7Rœ3“kZÈ,E3)Õ¬û‰Áê¥â`õâ ŒÏÌTÉ'ö56µ”A…K+½U4ÒJ«òF1®{oL®£ñ¸æ.ó%`Æ×xÙôÀÕÝ^߯’Œ‘zJ$L ‘Àñj A ±HaÄ©d¢`ðÓ>L´+iCIg‹0@±ÙrFVI;,g³Î¸âeÓv¹†6¥¤ VׯÄÅQft]aáu°^Ž‹è”ã…´ F=´†>ò¡€ ¢àXzä*ªXL¨7ï-›Új‚DyℊxuLGû´ºM€|~6›dÖ9äz%QFŽ$HgqÀ‰3›¦te9FŒÑª•ØÐˆ16î)ç6D³J]½¢iE‰Ã¯P‡‚™F –©Ñ×AÉG‰ùîëü¬%²*€hIzc…>Ãö2|¹µïBcp•@Úk ÄŽƒ†vL;€›uhjŠêÍêý=£~XcÐ`ãN¸¢×‹¬ï (òÙ¤Dì ø²:íqQ꘥€~ RÀYQ€Y4—Ò^:ˆz ¢Ô¹ë(×Üæ 5âôt­2–ÒÔ4¥'i G#8:åÑ)­­z4 $8m¼¢Ô1O…€x8jƒÙ#ùâìt×”z"ððÒwâ¤KÀÁ…hbšÖ{Y`æ÷t¾¬ïüÁ å„ïhÖ‹_â¥TÞÙ¥Õm‹e¥uƽÆ!höþ6A’ÞiˆÞg£O+¬ˆ@\™¡Tbv–È5v9Ï8tG]n) Â#‚.Èn\ùÝ!úcœ·.JoPŒÌ^OWbÀs£Ê!.¹I• °Ìcè¥ÑBã`öæi‡î4ƒtɉ ŠŽãvSÇÅYímFAÅ:à;: ¿ôr481ø3Å&­n# b—åÉÑåY%™VSì%zÁ¼W”iLÆ,Ké\„ÆîœX­d705¶+Û[ëòJF¯÷^ÜB> ŠW2Mžûº¨²U•Yò¬®9†8ØõmÈѧÁ²à hÄ1_õ¬ÞÐTÙÑ‹f.¹:—ý)¡¸HäXê4˜ë»ÛËé¯ÖßÊçwŠŒæØÍvpY»´º€¤ê#XV|¢,²8ðp_àb( «sÌÆ@®6.G¨ìš‘ M½1¢å#Î: "}jÓ4é¾úæ|þ4/8JEPZÆ,tåŸ,Çb1YŒ4tþ¨ƒ«DÄ0@1ņ²É̲ II MÚz´"U§¶I$>d€…OqL“f„Ö©‰ÓN8¹òÆ&"ïÕ7ä7¼ÜTc/Ðò2CSi£jJ(˜Y¶þÈ Ï§R¼XßnJ,8w‹‰ u›‚'ö¢7D }¹`5¯”¤ž(0IÖÛ4V¯©"í\3³$ôÂ7JÔkωtÄlò`—Ï5¤€$ÀM÷®{E:…iLþUUAÔ”c )žPŠpðàCgZ ¢®6„§ëzN#x™´³Ð Ëy™[7i&]œk4g&¼r3@L½¾}qá7H¬x…5iƒ@ia º: ¯&z¦ŽÙ$VäI‚‡çá/eá’⊭H.£'êÆXJ]㓲õóh_1ÍrüúEk¿ÉóõÆÚÓ\~ãǹb£ùd` ²ªÔ×ï©ë Á>–7®ÉƒW¸¦A ªVIø—Ë7HB0¡ë}Œ ‚þ 4¯FŠöؽ¶bèÂé€d|Ž–Z%1MÐ7XÁ 2ă+³•Ñ;eÌi¸78Yë—N·eHßè"càJ«<8’‘éFÃÀ8¿F®ñÖcÁé éºòù¨HJ+#Šx«· ¤ÀÆÊúÖÇû8Õ¥Ê8 cÀ³*ddÞldJ§È„B"áFùàè±Ç3´6„Ž¡–°ò!žÉ‡hr|£9Ê=íýCÀeºeµ„Žá¸}‰'È»×/ö9³x¯ò*Þ88TŽS6x|ñ”f– |ãÝž ôåÈ&[w‘¢GÄúŽw àFþÔºÞEš­ÍŠ $ ³àœßá5fºðçeù¹\Nˆ`@¶¹9Ñ“dâ­Å!àwyÜMò!É&€àdDÊSZˇðîR\¦§¦î¾Ÿj7 Ø…7e2˜Tc7d:rÊ”à)áÐ^I•\Zi°;Uƒ’²Iš.! ^<.×õUÌƒÔ mˆÒwiGK–IèÇ\]u ®©†ØzÚÁƒçÑÊn³–Iå<^{ÛÆöF©óy£.’©¦¹»¢*T°ÂªIbQÆ]Z¬F ù8VM2˜ô?TkTióRÒSyÓSÆ$²’GÓZ—ìRk=‘¨“ó$Æ| ‰F_O˜œÇÃ*µc±¢´¬a rËXÕLÕüä¦TîÀ³œ¦ñåYŽnP5!¶ÕÑUw“|H¾ 7' 6å1kÂï¨fJY¿!1Y ž|ƒ®®´PÌünr(áðÙøCÍ[Ó|,€¯ë•;ºÌ$G;3µ³I¢tÙEqAŠ¡Y¤ÁŽ(:à×e2‚  ¤¿ º†çZqw“|Hžj&Zs>'ô«šUaº&,q1M‘’šÅ!«¥I®fÜ¢‹yxL å$*½öF´ÖTC$÷Ò: ð’®ä={\uÉ{šäCÊM FÍʇ¡Î5TÒH53Dn¸Ä&€ãyB´•C\âzIi.¥Y€¸Ç«\”Ð)vº>“Ô\¬Ë*¿ŠåG@„@2TÝc«HIo1@&ô¼»&‚âÍ“mj|HNqÕÅwUó!¤G¢ðJ5€0˜°¨ÒÅ[iVïhÄ\Sê¤Ã’–R‹5ÏcòØÎ¥ð“ÜÁÆëG¸IºÅ!„ßH> 4âÓñ115òÄTÐ[LdIºé©Í‡$¬|ˆÉ65σJHp]ñã]$‚Æ–šÕ"ÑãÖ\ê ‘qXSM;¢7MÖvBuª€hk†o0ꈙ•¦ÃÇXfoŠ7Œ“G‘…âꪖŸ’iÄ]ÿ˜Õ®qÞ]n5@rIs¶.â!¾øæ€Ü4ˆS“r{JÙšÖa=«Ö·äƼǃW‰MëIYyx,ñ1])TM©êµ9-\®>F®\cŠlãˆÃœ…ª+¿&«®D# ÂÚcx|ŒYòxTW«L6D±*ñ¶ùåéÚ Èúo´Z@¦´&wlˆ©¬EåªW#eÅò†¢%}à+½ñ"ÑiP[>µþ1ÖÅ­HNw5£ïdÃå5ñIlv…Ü|`;Û,)¢Ui‚ÚËÔŽRåÝì‘MiBtkyê›Ôe3@‚ñ‡$ÖìŠTsmš«ÚÈ¾ÐÆH¾–j2±çq±§Ÿ ’÷Q‘7y¼³ÙÅ8/Xd62PyŠÝ8fý¯`”mˆùݲÉã3ÍÒTeŠXQ¹x“ä™ÊÅ3Á‡ªÄ@òÍ®jA@ê'†T"MÉùª2¿á7ùÇP’7L5AÙ$Êeæ‹£‡ŒM•tµöäÛ˲>-5©„kÝÒ¨Jm HcÙZ `ÒJI$fI¶ÁWÉ`›æ€H¾ôì8©™'’ï"sž5yµÎ‰ˆåYîZµò"ÚÀͬ,x~šX ¥.ô4…’•I‘`³O·&UÃ÷²µNJI0™fƒ i´KbåqVŠ¥Ä5¨~Ã\û6ßU²n\–õÖÊ‡Ü :J过xL[¸VgÄ«+g›\+I+¢×¬uaìUsJà"t­ ¡šÎ(…±î.+/b’Lmf]ºÀûÜÉ‹¸ø8Ȭ B‰ä®ò*:¯ª[þƒáÒMg¶ú8’Bæ=ÂlýÜàoa#3\Ür€äØÆ=žB‹YYÁÒ^â‰p$08å À[ecÇ‘¢Ñ,‡¡ÅñÕ7n[LîzÙmjbMfZº³ŠN3Fñ5wÂ¥zÈèÍÉQ¦«2O„Œ*M•°{x}ÒÍ\歹xÜä ã Íæ’.²z‡[%ÃhŒgÜ¥Ö ƒ’Á“’ç­ñÝGÀŒÕb~ˆD‘h/öK("¶ÆTaƒ§ÄalDèr'LÌdÍ¢oìQÕÿp™L Q&…BF¶——Z&!”¿Ù%`˜ªyW^`ŠQ0éªQÆ‘C+»³}Mî¡kØ ²D™´0³£kBôP|Et“‰(-ftf¢õI–«AYmuœ´"Fçn8r8‡ 2Á#oàS˜Õ¬¸6UÃsYÔè>†„'IJD\Ë‹ônTÍD4ò¾ËÄaße²Mj$“3þ€êeXF€ô6›Ë.Ñ™ÈCÒ“x%†=ÓQ+‹ÌÝÌIÑLvmÞY†ˆh«qwËbE{-@ò "Õqr¸ú-‡k,ëSµ€@Ày®ÄgqI‰Ô²i½}œY™'bBb¯u’!.³V⥈<Ý Ø5@Èã<@„4N¤#» à(&Å9»¼»`ÏZBvçC<–ÈZ›°¡q¸ÐO"kôF}}¾(NSh٬̯¯,€µP¹¼¬×’á,‘%»*—pòæ©kIçå’%²ˆyaå<i_d}" AÉ=ÅzµéÄiºfI.ò8ÌŒðY_†Ìm$U0¯X¤´–ÑçlKjw ûó8G¶"àhœ­y‰Lgú.á²ðé¬s„“M"¨ ÆHMÕNëÈp$#AÂù¸ˆŸÅ!ŽÍQ8‘ –à­¼IX” lZµ€æðu¢Ô.³yóEé¼P-¹%²0³#gâ%kцh´˜NïF^#ù´ÿ‚JÝÊè„Q[ì^ÛFüLW‰IÉÆqž²{`œLØÐÄŒ’Æñþ†57 ÅÉR½†ÌbFuƒóDøñ®’vƒÓéÚ1*†ˆÆÁ­¬¼ÊnÓŽôQ¼S&æEVÂÂÔ ´Vy@•Cxw"Ö|5”((»exÜ*‡¸VÇ=ÊtºˆøŠ†/£(wÌ*‡\ •ŒÎxȦ9T¶âÓÕR%mé‹ñUN‹a“Z³Yà “ì³qeÄAÑ´C·ÚK›% óy0óaÊŽÞÚÅ5.E‰&<’}Ï.b6C;ádøULMÔäEÌ«>?Å5àÞÝÖ(2p Ë'õÑf=ƒÓê Sep•tЀbcɉr*ølqDl¹˜¯ ™¬TÖ鬮5žuzY–Òiú”Ø×ȸΈž®¤!†AÞr›Ï“Ò´ i !|Ìl¸žÜDðù@·m\’‹ÑYÖÚeŽq§C­ýrí9ú¥Ö$£7 ¹AAqåñ*QlA§¹ˆ˜Úp±–ˆUkûŒp76ÞÎä6Ÿ\Ê\ßðƒD“B JsT}!1¯m¸Z¤)\Ä»Tª€üÆÅpòºÑZ€MG¿ã̪@­N¨ä" Îo¼N•½fžúÍÏG¸&Üñc{×)êÜ8¨¾é2B›)¢ ÝdE( צaÑYÖËât¶.íÆ†«ºa‹#ò=OG@3‹¦uëÈ*Žæ8†‰ñýð2Y$‰ªÍIï5DÙIÑ妓E˔ݤ3:#l`K Wo¢(;”C×¹)Íe–7*Ö¼[Ô“°YÓ)FØ ³4ùGë¢éHLÓʉ "WÕíY¢É>@(¾AVª“ pv$gM‘dD9%äM×åÚ‹?p©V§Q³TžÿiƒøÇ‹\z‹í‰ú‘íÔd4¹$…=•RË%5åáB„Ái”·)ÍT¶†óÅÏÐF‰aºÂ•˜-YÈŒ“d_ ÑÖdV=2ÅLEô— $Ê®r51«ž™yÆ-FtVé«éýo¤½¡.K~$ˆÉ—f.uËé®ÒtÜ®f5]Q}¼!³UäR|[›«§"‘åUOm>Ä…+sŠDt¯ÓA”Ð}ªQª7n\…âIU(=DB ²àF÷aÜ]"ƒßxfw$&‹Œîeb1æÑ9µl^÷ «pó<'àÜÂ;z„£”ºµ”£ˬ§+A¦l¤Ü—4ÌÂmħPIŽ,ö‹é ëØbX¦®U¡Ë}ÃÅl é%–uN^%ùY+â–ÝPj:Né^ ™ý­d.™J‘Q•䯗»VyZi1@Œ‘Wɇ¨nÍ%{°VÃ0¹$Ï3ºþ¿EAàB5•Lh)wiµ²†Ì•ó¡Â§{_­Í;£ -˜˜.=«Õ)]]·e½¥8´PMWð%â'Ê•P/ðoz3³ ˜aÁgMåóœ îh%’ÐÔ.ê…Sd;…$[H ò”£K#QºåI¢Á¸î¸[ÓxC”ê`ŸU7½A.ã#]VóÀãêøu’ iZ¢Týè—”ňÄrÀ­™r¾„3D¸y&nÏBåöéÊ»´P ²Ú޵ŸŠ!)äóù@Ž!ÙÔÌUkU 2á†)è±TŒ£Ò©Ô­¦—‹Ž€ßM’!düs¿r§<޾-‹AqôªV]ÈÊ‹Tç aêUnó†ó9iV *¨Õ|ˆV–uÙ‰ÅDŠŘ')¯ð¦¦r ³\^MSäÌ<÷^ksÀíïLÑÊе¡ÛT¹¬† àPbÕÔ8¾ºjO£]6ß äU¹0#lœÍëÖ•ÎEߣSI†ÔŠEØ­zb®è¤“¨Ëj!1By P|óŸûœúâ=ž²¦­%¨Ê©dªpJ– à-E"ôî”Y„ÐÑ<¥|~t=ÒZôÅõ‚ê@.—Õ®¸ï.›(\5!„+^—Aj¸ n¿¢i.o&’)ï0 GdzÎt½ –¢i€¯ÄWG@T·Ì±[ÍÐF³™mJYÏ‹ÁIü-&”û²Ôn–‰É´'…Ï[]Ê”“‚îIÉ¢#"BçÁy¼r>‘JBRÝUí¢Õ”®Ø³’¿}ù,E ªÊ•TRÒ|^äòy5$”¡Ë¦©åq ølIÓò¡„fš<­æI&%s\Ö:;’.Ö÷00˜hÞ$–Œ5eW^8v«0wP2دiU«BÆB dšÎlï:È—f½ÞÈ”H• ¸VÆÒ–BšKÉŒ×7áÈÆ@¢ª2É€Ê œ' BŒ²i-eûöQXV±ÀÈ4‡ë3!8xB)1‰SºË>)ònNÍ'T1É )ÎÁq» àrQÓFãÂë’a°S%k¯Dëš@«üÔ±eÌ(è›á„üekݬϸ5„¢Âÿaz‹Ÿ ŽŠ‹T>ÉçËy'€»Ð0SÐ1Æ$ãà°tq¶àÁÅPBÏË:ÍÅmÚ Ñ¾œºád§R|Š£ I ` ¤THOº…J@%\I—>`’1Ð’úî^–Nꬳøjãî§R&ÞK°ÜnäLWÝn×zØ4÷DPW%2L¯Ëí±–&H‘ÉŠ«žžÙœÁrQ\pñ¿÷~͉P™–q¹.ù¡åeŽrP`Szœrè‘$U ÅT*½OŽÅ¦ »‹ö¤ClœŽ`8¹˜H6‘S¸¸8Y„çcä˜Â5Ap r¾Y‹q¸B›ÍN;EHE–7„AòÐ0[ÆŒ‚}i'ͬÇO"f€ŠnH1ë¥0=%ÆR¤ÄdM ”;%’ƒ|¥XÖZbly\¾‰·iÑEûÊù²4Ù ,FÚZŒ‘Å‹pS*\tJ&(‰•E¿8 ÚQ¬366ì×UXNn áiy™f·âE¸‘›d54 /‰([íÔͤqy5ÚŠ¹Å !,xÄõ˜D(2Ø›uR²ZÖ”ˆÏáÊY m×bã6n›§è¦–¦àVŒ¼Ná«De-6¹ƒ$²Å&›â.mB·¸^µuÕ%_Œ!²RÙåê:2diÜ4CˆÅ¿ãÇÀ",ÉÙ@]¦p,ä‚”Õ‡"dçè?qÃEå*Õ%«ÊéöNìD*:¸HÂr“U æa ÄÀ h@õâiܸ±×‘C6d‹.«1d+á€;òÒ OVVÂõzˆ¸! [ÉÀœúÖ’>5ÒqZ: #2Õã îüœ¥kºù¾WOœ/ž$9Ìü´òŸ¼Ô&D ÇuLù°^€C)6ÛwPÊ@»nØaGSc4•îÛbËDš|ªÒ!p¹Ê-þ8£¤ãVÞŸ«æ ¬Ü)yÁÁÆÓE#«“ºÑ!r$’×i“N·`4]ÀÆ&iƒ$½’Ö—Äf¤tA#®(ÅKµ;VÖ­‚z%{P5Ž7PQ©o£À»ÃT€N“?8$+Çôwtã Ȭ"ŠQÀjp(º,(B41?¼€‡´Tc õ¬={w‹Î°¸Îq<î…&Osc+@£³$ÕFÅ)½€›±¥qu¯s:Ï‚¬êë‹NÔ´’ CN£¾ih–BeM¹J>d¶ |0Îkl]÷œÏ ›×ã‘"nmw‚˜Á„¸ó»é\ô¬aÓ^–òf³^’“¢Hù¡ZN¯¸Kl4§âÙ8Ar’GÚ¶ýØmÝO=NQN%Wâdëô4‹{gÓŸ:)à‡´Bö·Ç5ýNgø*¸9„$Õï'™ÁíÞ@å:⥓%k92†ÚÍwý_YL‚ˆÛºY­­ÓÞ°6VˆF @Åçû7üx½‹ðq~š†z5dz¸)ÔÈã¶%P`_|dÄ™þŸ¸_|Zñ¦CµZ›Ñ4´;ô®8¸Wiè¦Ð'¡³9§g<[üÔÈ:É[\Éݰ6q"»ÔcêS²ø¥’õ:{91…›(ÈO%¢•8žð¿µç}e‹…>_ßCí˜N¸wª(:Y\„jÚá`€˜îStý¹`€¾•eЩ¼ØÙâñL‹mWAH*"¸ãCÖ BÃpfÓ™l– €rLC'÷ R|¯ú¢dǃ\ý– Rß«E0+³Å¸·àDëÇ7”«ù-•dzãÙÌöÄ5>ÂÚZêa®Î倩ŒtFÁz8½içˆâ„wqTÈ9Ü+¥ˆ›Ïàæð…ÓëUâÙVÛòȪ˫ÙlGø©òûU%=í›NOCEP¦ûpbЙÅhî,„>m„ô’¡P ûˆ€Üœ,2KEPÎ#cmuæ#Ú· “&ÈR›l™#E eCxŽéŸ7ëó!&|1’.Ú¦@›S§åH¨ä ;AÇúÙ,ã«Ê< °Q ³ù¦•"b6 pÙeôÚ nñ‡V ßG6ž‹N(,Í:©Ö×¹nòûhQéMFD9ÙÅ ¥PÂÔjó!šËôè\Œ³ï{—í µ.zÔ%s‰°5Ù¬RnÉ—‰Œ€‡ ²‡ÏÆØmä¦Å`’ L€‹aíT$}„;z}g;‚[f°tŒ+ÁÌ'’ry &2;›ÿw„sbÛs‚É`Ò‡5š¨±‚p lê>kÏÕ(Ùísû»LoJöBШP0Gh¼œˆàŸ3`\%\—]‚Ûý·•|NÜ1=¡wèS}ÄgŸ|Ø’r9i½25¥¬T9¨º®m6–Ý€­]¶ƒD…$Ÿ;YL¥„ÊâVõc{µ#F­K-ÆP2†Q¼¤( n4m\2|g1›ýãg›­ H% :11}#:!MHŸ?ü›þ…PK‚d-Úü«àŠZjY@þZi£@ZŒvi1Ú¤Åh£@ZŒvi1Ú¤Åh£@ZŒvi1Ú¤Åh£@ZŒvi1Ú¤Åh ¿û¾èI×ô/„vi1ڤŨÕiûHmOº™~8z4@._Z:~üøÈÞÿ†4ó×3øä;i«Ð…uZªÐHpÆäG>但¾“C6r¡‚üoÛÄvÚ¶5æ ‡0±Æˆb²-y¤âÕÌýU Ò¶¥%?!ÐK€ÇÒò 8Œäöß>~áøñðpx1ìŸÿ¾ wü·Ã‡wÌåÂÏttt<3÷ãǤ) Þ`Ñ݃‹‹þÅkôÍâààÌíãßÀۃãÛ@äQJ7<¶264448×ÑÞ>6ÖÞÞßó¤Ûë{§¦€,ýúƒ ½|ìÁààÜÁ—«Ÿ?x¡sròLxù…>8}dpa²óáÕÈ#.Ø¿ÒÝ>³äjß7Öæêà`øÇoÿ6äÁéÏNFèôË&G¿yù³ þlr`øõŸ}öᛓ/Þ Ÿ€ôŒu¯t,õœÛ·Ò1ØÞ>ÓÓ?6ó¤ÛkS 殜½råñEêf€œþìã{û_ú ^ .ŒºGèòåèÂÂàü~áÅû÷'ç:«FÀüÌÞÛ6n_éŸÛ×Þ¿876Öß±§#ü¤Û}’.üõŸŽ;väÈÁùÇ»Óæ€<Ý99zï‹Ó§?>4¹09 Œ±°ðÍ€CçäÂâ±Ó§¿Ø?:¹¸8ì_ Ï_¹²4’mø¸½€gÚdžÃcÝíýÃCcí++í-+²rg/ûxpòt‰ý‹“ƒàõýÉÉѹÛÇídèâÀcåÌ0è’îî‹ýá6ôد êiïýìÙ7$é³g_{î¹çî9räÁãlä½% ÿªäñÁ ¹FœþìÏoŽ.|Y8 óÛÎ…3ÿrúô;ïƒ$Û{û‚½€´ï;¿¯cø™•óç»ÛÏøI=çOÜ"t´U,.é¹³ÒG7?ú(zöµ»w¡o¾ðåÓ½³lÈ2äôg/-Ü¥þ4òà‹Ï>ûâÍ…|öáK“@`/‡„;Ú÷u…ýcçσùë·jé¿uëÒþVWl&ÿrŸüæqÄÖCprÚäYÞø H0È\•Cî 6+õ64{çÃíçÛûç;†ÉÉá['®:thn¸%œÄàÙç^{ Ì+ ³È!ÿöÒÇ/o€œþ° Èý…ÑE´w,ov.4pÈ‹ ƒK¶+õî}=ÁA0³ÎŒ­ìk÷Wñ·õ\éqëhÛÍà7ð²HTʉ«ÁÜQÔ+Á9ü ò,¸ß]>Ó~hl¨ý"xûK¹™±••sÃícó`Tw<>“={å ‹EÎ^º„¦Ö@dÿ#Þ{k+ë.jï{“û ÷ %x÷¸È‹Å/^­2h3 3+çW†znæÆöuÌû;ú-!…€ÌÝúå øâÁ­_ýæÖ/‘öç†á͉E<‡ttþ(y=± swûXÇ:ÖßÞ³rmìç‹+í]÷Øcú @Ͻvé¬E—^+ë.ZY¨×?~·Óf@ÀEp ZüÃ/-‘€Œ†‰xüý’ÎÿC.‰€Àg› v¹ MÙŸCdõ¹* ~ȉ¹£GWÛ®ÂñÖ29'n ýå­£'ÿbÿʹeÿÐÊØò¢¿­cߨÜâ0¤Ó@6–Z.yðàÈÓ,d~ùÐòpÏûËï“`­õÀ\[[[.÷QÓ…Œ7çÓÀ oN®+õðÒû/cLåûIüÃÓ§?øì…ïùöóûú{‚aèàå­NYï9z´g£=þa€âÄp8âÖ­ƒäÜò‰_Þšƒÿû­o†V:æápn>ô·_‚¶ÛHðOþáxõñoÿòÂË_|ñÅŸÿüïO-’KÞúöí§N¾]!|âð'•'ï=< VèêÃ?¼M_ÈÒ<ÿeçÂý…3Ë1Æõá—p5Y¶"å|ûLpi {mÃåz–r5€´ŠýmóÀ-\xn±ÈU?6dÌßÓ6·ol€@†{ìài½£àRAéÊk¥þñS‡H¯úý®]»žýÕ³'ßÚµëÛ“o=?|¨sÞ€ÀÙmÒöþþI¤{‡®X˜üæƒÏÖY$_Œ"C ûß?´ÿÞ¡Éåý“÷–Q„Ù H%–²{l±Ž·ƒÁ`- à˜@ó¡íOœøåQ"²NÀyÄâjr@.Ž vË Œ eìñ¹r÷¹KgA¡[{ú ¯~÷î¯ZäØÓ ÃÏCÓûÒòòKßî:yèÞ¯ž:yò“ÅC pö÷¿Zð?$ ¿»àÏu ÉôÍô× ., /wvšœ„óáðÞð2\r®=ƒ€ømdq¬cn¬»ûÜ<0Èž¹ íVÇ!GQQÜŽ•qbÞRê'æ6²ÒÞÞuß¹yH÷ÊÊÊãréî§g£ˆÇGðï³—ž»û§yDÖŸÿõ_ÿî?¿‰¬³üÖ®“Ðö ºÞÞõ<Âsòí]/a»ïúöjÓ[n’1 wŽNVhÔè’Èò°êëÎpç™å¹3 H¬ûƒsa{ µwwíYÕno?×ÞnPµ€–o â{xׯ ºn-÷ld¬³3|ÕDÖÕÁþÇD:û†TYáWW'\rð Ø½o>ýå³û—v};yr×SÃ7õ-2÷ÖÛûŸBx¶ Èï–ü¤Ñ;;çüTɇƒ“`eu.}µg†&;çààÑ3ƒƒ{oßn³00ÇJ;ôâþÜLûÏáC{}ÓÕ2¿åQ$@·+VÖÑy¢CÐ «rn~>:Äo2¾½ëä'»~?¿m@Ö1i»0l)à†™Ãû*xì{@º<óÌá±±¯†æ@§,Í<óÌW‡Ç3g÷Éûgƒ£ƒ$*¿-@ ÕzP‡`kýç°¬ÔpÉœ¥¹+â‰xæè’€×~bÕ²dØÑÅ\•‹ǃíûVÚÇWöT9ñ8­Ž½ð ÿö§¿¿ ô÷ÿ†EtB@býûßýçg—o¢ˆÚõí·ß‚Iå6y~þ©]'ïD EÖ¡mÒ¶¦ÚæA¥ v.ûÛf:Î!~¥{lSˆƒK_]üçk¿Y¹øLx²sïžW°á^¹¸·sa0ÜñÊŤÒ^P4£··§Cr+ 3rheak¡ÇNh‘Å£€?:wôÄÑ«$N\m>jëÙŸö“=†[fÆú±k×®…{ϵ·w€7œƒÓ ÈÍȬ+o\!šäÒsÀÀOƒ¼¢ñWoïz¬ž§@f! 7ÿíÛ/=ø<¿ü€ÔS®mÉ6ïâè$4öÅî8³€Ñęï¬ô_œé¸xxqù«*÷´wN.÷·ÿü™¯ºÿ¡ͯѹmÒ?6D@,ü ÝÛAÅŸï>WUíóÃs@ÃþÅåaÿòy¿¸ØÌùÉ9ο¸8Œ—,b¸÷fÏpO0سˆŸçƒ=pÞß3ìÏÝl^Ê=6 lÇTº¥:Py}üî¿þÝóPÌOÞ~ëWpÕþ·@—»ë“›Ë¿Gð­“oÝ{‘ÕÖL¿pNéè¾vfòþ‹ ÑŸ¹ØÝ>7 šdÏJØ?SÕ/ÿã\çÌž×—ž9|ígþñÿpÛ ÁðÌ<žú^´÷]ëêÛwþbuÐI0Gl‹ªoÑS¶ÎÝ Zç+Ûü úÈOÐ<ÅóÖ(Høô¸€Ü<øà‹Pw#úüé?~÷Ù“¿Å À¡{÷°õÜ›¼u'¾¹rµóž|Ón>”ôøR£ »tü¶yÐÿÕ+ÿt:þ‹÷á-°Cxtarùð¾Ÿû¡'wÿó?#"׆¿ZºØ>vx/3Ç·iöæ0w c°7ˆlÈŸëYš;·¯»Ã¾A9"õ@é<Þ-¯{øãÁ]UøàÁ7¼ùæ›/ýþ“gŸÝÌÅù®U$7ç¥ùÆ|ÓÒíã–ö>sqßFN&Gý æ÷í‡kO÷ëËá•}c?ÿùØ ‚tø•=;΀Ï5Ø9´=¥^¡ž±óç_oѵBFæ†;öµÛ7 ¨§šš<@rß|ùñÇð÷…EäßA£Ÿ<ô¨7ÜÖü `rÍ\Ü÷Ë ¨ÀKô?Œü°ghPë\^¹88:‰Nݵ0|q ¬­Á™™9p ‹l»hó?ï>ÑésK¤îsí+ö ”›?x•Ðòc&©‚—Þܬq·2ÔöÍ7Ÿþí»Ï?ûæ#ßu[€´]¸MÝ>‡;¡ã/.­¹‰Ý¯weô«WºÿÓâWh§>¼çâ¾~`¦Ñ¹mù!/ý|w?ê’}{:ú‡zÀß7d ÁÊàþÇ^žYzð“ýÉ?&ôÇŸ€‹þwo|éÑc2Ûyâ•‹{ÐÃØî µ†ˆ1ÈÂdÇʾsƒŒ²üGäÅ_ ¤nǾóíþÜâÊy4Ýfóý-1²¡žr‹Gž¶èË/ß}÷ÙgO~yÈîqY›Ò3{ÖX¹øUxtèpõãoF'; W¿zåÚàBçPžֹðâýÉ™G$‡ß±žžsûΟïFŽiE@nbLë·ï"=õÔ³O½{ï±Ê¸=@¾ÚTÅ }æÅÑ™vbëîûOàÿ-îiš\X>ÜÝÃâÏ­ Ó¹ð/ÞÚÛö(£NzúÁÐêï™Ã'ýóè)ö·ÌpÅ:Ê]ÙÿÛwòü³O}òÛýþÇ»ÕöDÖй×_ý7×þ‰´õÊÌ‹/N†‡~síÚoúÏ€}»ÜÑ1xÿ~xìŸàË ᙎß\ûÍëshuî}‚A“Žnÿ>×ÿ‹¡á6`û†Z ÜüâûË‹þÇæàíq¸!WÏœùŹޱk+ÿ0óâýû‡æ''Ï€¿qap°^É<3^>3yfÈËÛ‹öÖÔÒߨ·wÌÌÍ cxÞF+«Ui›€tZI«ÑÎpx¨£óEhx+ŒnÉ`ÿ É#v’H}8|ÈúÞï}$³)7×1LŽœGEÒªÓì£í²ä·2»àî^%¿3<¼<:zæÌ™ÎðíÛáÎAøö*úƒ3·oïí<ß v.ÿ? ÷>Zùæç:Ú+±E`Ž–Ïû½Ñöi[òûýþð"€2Š1ùÑ9¿x±s9ÆD•”áð^Lïbºêv8¼ŒgnÃÛG$Ø6 n§…G÷Ø_ë¤Ï-ßðöÒÒÒ…ùyÿ2pÊœ '®ãôõãÇ/\hà jB`mÖß‘Ä,VW[–EÝ4é;?†,Ij¹ÓÁá¡30<y dçLÌBà2€Â*ÀË£÷Ô8w7Í¥ÒmpÔ‘Èi„Ò™UaQX, ˆ‚@ZË35vöŽu,ÄDÎDtJÊ`nz «÷E\º ¼ûk ËŒ„˜fh6ËD(Ìb,N]yÕUØmò €cEò¦ÉX( ™ ›ëy£Nƒ|ªë`fR#™¼`¹> Ä4 ±p!×Ï,…ÐtÍ0891ÅÙéÊ].ÎϙőE‡,ãeTIB‘$¢™,½CgèèîAÓ 2ŸöC& n$¢^Žaó–ë@¶Ø†"€YàäÔ SÁölíaG«ŸíæƒÈ¢ˆ"I+£¼â“ÓZŽíÍMôž‡ÀðK¿¼¤“×NZŽ_´2ŬVÀ&Š«]NY©*lhöSæ°ãe–I Ó$«ë¨²„*KØDÓ,ŒDð762‹³x¬ <%ˆA<´ÓDȪBñH^(¤uý°*IqE’¸¾©Û:ÚpÈ2ã‘(ádŠ–šêÕ=¯JY&’Ͳ4ÐÏúz‡áìi( ´¦Æó˜fHY«Ÿ,\ÀðRh¤©Ô(öX‘$r†Á¹à"Ûü´TVNg°‰"ª´Òª7O £®í"opð5H§ ´ ÂK`Sd<¥%V©cÀ’5jÅò_ðç[wLH‚ÐëQYB7MgçÙÕÖÌúj/m•åØm2³‰ä ðâ2§?ã–M8ô+â’† ³ÓPçèÜØˆMqZX´VW `¾}~♎Š2l¢HF×q«*µn×êŠIB3 †—šÒÞ½U–WúÏC…–‚+¬ª¦f‰ëwv!ˆËùÚÅâW\ÇŸ¾ðläÞG½I„–œn7M¼.'`,¥Âé`[] %ªŠÓ®ò@ÏFž<òYÕÙ ,ÌCS ø°µvÐ~㎊P…w™SŸ\d@>¯zN7ö—ÛU½DUó¡ËË8ª*Ië:‡Ç&ÑM¯ÃN2•†ÀX¿ &Ç ÎPSG]•—m-ʾwÿÊÊ}€órÍ+In÷íKw¶6m5 }‰ª²Î[Aky)Š$ñÊp€J—“_ÜØƒ*IÌê&#…OûAË¿j}TµµÓÓìçŽ6?w·49ó7Ýìû¬ïãSDÃ!ëüÜ ðÖÞoO/‡T»¸ %nÜŠ »$1O’7 ¾¿©·,c (’¹DÂà­†ª„5 ´ÖÕ²±¶šÆ7åªÂ·nÚyÛã¿ÿ.PØ® lîzÎ.Ig²Œ]’pÊ2ª,q!eïÆN†Cê{‚Œn¬ÜŽ;n_´w"øÛhm¨g[c=ݵU´–zðÚUÖ••8|뮟ìýסѺÖgAWË„…]þPô¹]·™ I¢€$ /…¹«¥‘Þ™ › ·ÃÁ¿ÎÍBpšÛðùýôøÙÝTÏúÊrjvIDEIdgÚM™ÍÛKOLN29–¯’CŒgN½j ”) .YÆc³!Š+°UᎵ­üîÐa_|ú>„¶µ8×Ô³±¡žõl¯­¢ÉíÂm“QD‘`&Kß²ñóú¢/}Ò_I,Ò ”]5}à¾ùƒòþ®öÛóæÊÁ%‹"§–Âdò:¿}êi8ò.ØíÖ¶k¤¦²‚Κ*:*Ê(WI$œÓ8±bßàÐØ«ï:ÁËÏŸ&¼Î`ÿ9ëX¶þ ý¢LX´ýCçþô³ë»{\6¹Ù£*üñég@U©üö^¢±8N‡_•—-M t×ÕÌçyéìùÄÞ|ç=ã—Ç87<ŽaD­» d«¡D¸†‡‰ú«NÜûÐuûâZ^}clŠéx‚þ©âé ~o%Mehº‘:953;ø÷}Ð{ä,¦±®àE l‰§­HVÌ„\ €8_›~jkuåÞùtF<\¢6H<—#•Ó2}ÑÓ‘Wö0üÙy­(¸`+€\"|Õ“ð*­Ð÷Íw´ud}÷æÙDŠ×‡G¦Þû­c£ýòÅì{o÷œÆ4.ë 6m¤.¿/5Úµ¿ U ¢ü7OÜ9;¼†7ÿ™  ]fª˜e4­:ÿפ—|œÚ€rÀ x¬².[)§˜tÍ/3¡ð^DzU `X_Z¸øý$Ì$pÒßIEND®B`‚djview4/src/qdjview.cpp000066400000000000000000004213731174072760700154230ustar00rootroot00000000000000//C- -*- C++ -*- //C- ------------------------------------------------------------------- //C- DjView4 //C- Copyright (c) 2006- Leon Bottou //C- //C- This software is subject to, and may be distributed under, the //C- GNU General Public License, either version 2 of the license, //C- or (at your option) any later version. The license should have //C- accompanied the software or you may obtain a copy of the license //C- from the Free Software Foundation at http://www.fsf.org . //C- //C- This program is distributed in the hope that it will be useful, //C- but WITHOUT ANY WARRANTY; without even the implied warranty of //C- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //C- GNU General Public License for more details. //C- ------------------------------------------------------------------ #if AUTOCONF # include "config.h" #else # define HAVE_STRING_H 1 # define HAVE_STRERROR 1 # ifndef WIN32 # define HAVE_UNISTD_H 1 # endif #endif #if HAVE_STRING_H # include #endif #if HAVE_UNISTD_H # include #endif #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #if QT_VERSION >= 0x40200 # include #endif #include "qdjvu.h" #include "qdjvunet.h" #include "qdjvuwidget.h" #include "qdjview.h" #include "qdjviewprefs.h" #include "qdjviewdialogs.h" #include "qdjviewsidebar.h" /*! \class QDjView \brief The main viewer interface. Class \a QDjView defines the djvu viewer graphical user interface. It is composed of a main window with menubar, toolbar, statusbar and a dockable sidebar. The center is occupied by a \a QDjVuWidget. */ // ---------------------------------------- // FILL USER INTERFACE COMPONENTS void QDjView::fillPageCombo(QComboBox *pageCombo) { pageCombo->clear(); int n = documentPages.size(); for (int j=0; jaddItem(name, QVariant(j)); } } void QDjView::fillZoomCombo(QComboBox *zoomCombo) { zoomCombo->clear(); zoomCombo->addItem(tr("FitWidth","zoomCombo"), QDjVuWidget::ZOOM_FITWIDTH); zoomCombo->addItem(tr("FitPage","zoomCombo"), QDjVuWidget::ZOOM_FITPAGE); zoomCombo->addItem(tr("Stretch","zoomCombo"), QDjVuWidget::ZOOM_STRETCH); zoomCombo->addItem(tr("1:1","zoomCombo"), QDjVuWidget::ZOOM_ONE2ONE); zoomCombo->addItem(tr("300%","zoomCombo"), 300); zoomCombo->addItem(tr("200%","zoomCombo"), 200); zoomCombo->addItem(tr("150%","zoomCombo"), 150); zoomCombo->addItem(tr("100%","zoomCombo"), 100); zoomCombo->addItem(tr("75%","zoomCombo"), 75); zoomCombo->addItem(tr("50%","zoomCombo"), 50); } void QDjView::fillModeCombo(QComboBox *modeCombo) { modeCombo->clear(); modeCombo->addItem(tr("Color","modeCombo"), QDjVuWidget::DISPLAY_COLOR); modeCombo->addItem(tr("Stencil","modeCombo"), QDjVuWidget::DISPLAY_STENCIL); modeCombo->addItem(tr("Foreground","modeCombo"), QDjVuWidget::DISPLAY_FG); modeCombo->addItem(tr("Background","modeCombo"), QDjVuWidget::DISPLAY_BG); modeCombo->addItem(tr("Hidden Text","modeCombo"), QDjVuWidget::DISPLAY_TEXT); } void QDjView::fillToolBar(QToolBar *toolBar) { // Hide toolbar bool wasHidden = toolBar->isHidden(); toolBar->hide(); toolBar->clear(); // Hide combo boxes modeCombo->hide(); pageCombo->hide(); zoomCombo->hide(); // Use options to compose toolbar if (viewerMode == STANDALONE) { if (tools & QDjViewPrefs::TOOL_NEW) toolBar->addAction(actionNew); if (tools & QDjViewPrefs::TOOL_OPEN) toolBar->addAction(actionOpen); } if (tools & QDjViewPrefs::TOOL_SAVE) { toolBar->addAction(actionSave); } if (tools & QDjViewPrefs::TOOL_PRINT) { toolBar->addAction(actionPrint); } if (tools & QDjViewPrefs::TOOL_FIND) { toolBar->addAction(actionFind); } if (tools & QDjViewPrefs::TOOL_SELECT) { toolBar->addAction(actionSelect); } if (tools & QDjViewPrefs::TOOL_LAYOUT) { toolBar->addAction(actionLayoutContinuous); toolBar->addAction(actionLayoutSideBySide); } if ((tools & QDjViewPrefs::TOOL_MODECOMBO) || (tools & QDjViewPrefs::TOOL_MODEBUTTONS) ) { modeCombo->show(); toolBar->addWidget(modeCombo); } if (tools & QDjViewPrefs::TOOL_ZOOMCOMBO) { zoomCombo->show(); toolBar->addWidget(zoomCombo); } if (tools & QDjViewPrefs::TOOL_ZOOMBUTTONS) { toolBar->addAction(actionZoomIn); toolBar->addAction(actionZoomOut); } if (tools & QDjViewPrefs::TOOL_ROTATE) { toolBar->addAction(actionRotateRight); toolBar->addAction(actionRotateLeft); } if (tools & QDjViewPrefs::TOOL_PAGECOMBO) { pageCombo->show(); toolBar->addWidget(pageCombo); } if (tools & QDjViewPrefs::TOOL_FIRSTLAST) { toolBar->addAction(actionNavFirst); } if (tools & QDjViewPrefs::TOOL_PREVNEXT) { toolBar->addAction(actionNavPrev); toolBar->addAction(actionNavNext); } if (tools & QDjViewPrefs::TOOL_FIRSTLAST) { toolBar->addAction(actionNavLast); } if (tools & QDjViewPrefs::TOOL_BACKFORW) { toolBar->addAction(actionBack); toolBar->addAction(actionForw); } if (tools & QDjViewPrefs::TOOL_WHATSTHIS) { toolBar->addAction(actionWhatsThis); } // Allowed areas Qt::ToolBarAreas areas = 0; if (tools & QDjViewPrefs::TOOLBAR_TOP) areas |= Qt::TopToolBarArea; if (tools & QDjViewPrefs::TOOLBAR_BOTTOM) areas |= Qt::BottomToolBarArea; if (!areas) areas = Qt::TopToolBarArea | Qt::BottomToolBarArea; toolBar->setAllowedAreas(areas); if (! (toolBarArea(toolBar) & areas)) { removeToolBar(toolBar); if (areas & Qt::TopToolBarArea) addToolBar(Qt::TopToolBarArea, toolBar); else addToolBar(Qt::BottomToolBarArea, toolBar); } // Done toolBar->setVisible(!wasHidden); toolsCached = tools; } // ---------------------------------------- // ACTIONS QAction * QDjView::makeAction(QString text) { return new QAction(text, this); } QAction * QDjView::makeAction(QString text, bool value) { QAction *action = new QAction(text, this); action->setCheckable(true); action->setChecked(value); return action; } static inline QAction * operator<<(QAction *action, QIcon icon) { action->setIcon(icon); return action; } static inline QAction * operator<<(QAction *action, QActionGroup &group) { action->setActionGroup(&group); return action; } static inline QAction * operator<<(QAction *action, QKeySequence shortcut) { QList shortcuts = action->shortcuts(); # ifdef Q_WS_MAC shortcuts.append(shortcut); # else shortcuts.prepend(shortcut); # endif action->setShortcuts(shortcuts); return action; } static inline QAction * operator<<(QAction *action, QString string) { if (action->text().isEmpty()) action->setText(string); else if (action->statusTip().isEmpty()) action->setStatusTip(string); else if (action->whatsThis().isEmpty()) action->setWhatsThis(string); return action; } struct Trigger { QObject *object; const char *slot; Trigger(QObject *object, const char *slot) : object(object), slot(slot) { } }; static inline QAction * operator<<(QAction *action, Trigger trigger) { QObject::connect(action, SIGNAL(triggered(bool)), trigger.object, trigger.slot); return action; } static inline QAction * operator<<(QAction *action, QVariant variant) { action->setData(variant); return action; } void QDjView::createActions() { // Create action groups zoomActionGroup = new QActionGroup(this); modeActionGroup = new QActionGroup(this); rotationActionGroup = new QActionGroup(this); // Create all actions actionNew = makeAction(tr("&New", "File|")) << QKeySequence(tr("Ctrl+N", "File|New")) << QIcon(":/images/icon_new.png") << tr("Create a new DjView window.") << Trigger(this, SLOT(performNew())); actionOpen = makeAction(tr("&Open", "File|")) << QKeySequence(tr("Ctrl+O", "File|Open")) << QIcon(":/images/icon_open.png") << tr("Open a DjVu document.") << Trigger(this, SLOT(performOpen())); actionOpenLocation = makeAction(tr("Open &Location...", "File|")) << tr("Open a remote DjVu document.") << QIcon(":/images/icon_web.png") << Trigger(this, SLOT(performOpenLocation())); actionClose = makeAction(tr("&Close", "File|")) << QKeySequence(tr("Ctrl+W", "File|Close")) << QIcon(":/images/icon_close.png") << tr("Close this window.") << Trigger(this, SLOT(close())); actionQuit = makeAction(tr("&Quit", "File|")) << QKeySequence(tr("Ctrl+Q", "File|Quit")) << QIcon(":/images/icon_quit.png") << tr("Close all windows and quit the application.") << Trigger(QCoreApplication::instance(), SLOT(closeAllWindows())); actionSave = makeAction(tr("Save &as...", "File|")) << QKeySequence(tr("Ctrl+S", "File|SaveAs")) << QIcon(":/images/icon_save.png") << tr("Save the DjVu document.") << Trigger(this, SLOT(saveAs())); actionExport = makeAction(tr("&Export as...", "File|")) << QKeySequence(tr("Ctrl+E", "File|ExportAs")) << QIcon(":/images/icon_save.png") << tr("Export DjVu page or document to other formats.") << Trigger(this, SLOT(exportAs())); actionPrint = makeAction(tr("&Print...", "File|")) << QKeySequence(tr("Ctrl+P", "File|Print")) << QIcon(":/images/icon_print.png") << tr("Print the DjVu document.") << Trigger(this, SLOT(print())); actionFind = makeAction(tr("&Find...", "Edit|")) << QKeySequence(tr("Ctrl+F", "Edit|Find")) << QIcon(":/images/icon_find.png") << tr("Find text in the document.") << Trigger(this, SLOT(showFind())) << Trigger(findWidget, SLOT(findNext())); actionFindNext = makeAction(tr("Find &Next", "Edit|")) << QKeySequence(tr("Ctrl+F3", "Edit|Find Next")) << QKeySequence(tr("F3", "Edit|Find Next")) << tr("Find next occurence of search text in the document.") << Trigger(findWidget, SLOT(findNext())); actionFindPrev = makeAction(tr("Find &Previous", "Edit|")) << QKeySequence(tr("Shift+F3", "Edit|Find Previous")) << tr("Find previous occurence of search text in the document.") << Trigger(findWidget, SLOT(findPrev())); actionSelect = makeAction(tr("&Select", "Edit|"), false) << QKeySequence(tr("Ctrl+F2", "Edit|Select")) << QKeySequence(tr("F2", "Edit|Select")) << QIcon(":/images/icon_select.png") << tr("Select a rectangle in the document.") << Trigger(this, SLOT(performSelect(bool))); actionZoomIn = makeAction(tr("Zoom &In", "Zoom|")) << QIcon(":/images/icon_zoomin.png") << tr("Increase the magnification.") << Trigger(widget, SLOT(zoomIn())); actionZoomOut = makeAction(tr("Zoom &Out", "Zoom|")) << QIcon(":/images/icon_zoomout.png") << tr("Decrease the magnification.") << Trigger(widget, SLOT(zoomOut())); actionZoomFitWidth = makeAction(tr("Fit &Width", "Zoom|"),false) << tr("Set magnification to fit page width.") << QVariant(QDjVuWidget::ZOOM_FITWIDTH) << Trigger(this, SLOT(performZoom())) << *zoomActionGroup; actionZoomFitPage = makeAction(tr("Fit &Page", "Zoom|"),false) << tr("Set magnification to fit page.") << QVariant(QDjVuWidget::ZOOM_FITPAGE) << Trigger(this, SLOT(performZoom())) << *zoomActionGroup; actionZoomOneToOne = makeAction(tr("One &to one", "Zoom|"),false) << tr("Set full resolution magnification.") << QVariant(QDjVuWidget::ZOOM_ONE2ONE) << Trigger(this, SLOT(performZoom())) << *zoomActionGroup; actionZoom300 = makeAction(tr("&300%", "Zoom|"), false) << tr("Magnify 300%") << QVariant(300) << Trigger(this, SLOT(performZoom())) << *zoomActionGroup; actionZoom200 = makeAction(tr("&200%", "Zoom|"), false) << tr("Magnify 20%") << QVariant(200) << Trigger(this, SLOT(performZoom())) << *zoomActionGroup; actionZoom150 = makeAction(tr("150%", "Zoom|"), false) << tr("Magnify 150%") << QVariant(200) << Trigger(this, SLOT(performZoom())) << *zoomActionGroup; actionZoom100 = makeAction(tr("&100%", "Zoom|"), false) << tr("Magnify 100%") << QVariant(100) << Trigger(this, SLOT(performZoom())) << *zoomActionGroup; actionZoom75 = makeAction(tr("&75%", "Zoom|"), false) << tr("Magnify 75%") << QVariant(75) << Trigger(this, SLOT(performZoom())) << *zoomActionGroup; actionZoom50 = makeAction(tr("&50%", "Zoom|"), false) << tr("Magnify 50%") << QVariant(50) << Trigger(this, SLOT(performZoom())) << *zoomActionGroup; actionNavFirst = makeAction(tr("&First Page", "Go|")) << QIcon(":/images/icon_first.png") << tr("Jump to first document page.") << Trigger(widget, SLOT(firstPage())) << Trigger(this, SLOT(updateActionsLater())); actionNavNext = makeAction(tr("&Next Page", "Go|")) << QIcon(":/images/icon_next.png") << tr("Jump to next document page.") << Trigger(widget, SLOT(nextPage())) << Trigger(this, SLOT(updateActionsLater())); actionNavPrev = makeAction(tr("&Previous Page", "Go|")) << QIcon(":/images/icon_prev.png") << tr("Jump to previous document page.") << Trigger(widget, SLOT(prevPage())) << Trigger(this, SLOT(updateActionsLater())); actionNavLast = makeAction(tr("&Last Page", "Go|")) << QIcon(":/images/icon_last.png") << tr("Jump to last document page.") << Trigger(widget, SLOT(lastPage())) << Trigger(this, SLOT(updateActionsLater())); actionBack = makeAction(tr("&Backward", "Go|")) << QIcon(":/images/icon_back.png") << tr("Backward in history.") << Trigger(this, SLOT(performUndo())) << Trigger(this, SLOT(updateActionsLater())); actionForw = makeAction(tr("&Forward", "Go|")) << QIcon(":/images/icon_forw.png") << tr("Forward in history.") << Trigger(this, SLOT(performRedo())) << Trigger(this, SLOT(updateActionsLater())); actionRotateLeft = makeAction(tr("Rotate &Left", "Rotate|")) << QIcon(":/images/icon_rotateleft.png") << tr("Rotate page image counter-clockwise.") << Trigger(widget, SLOT(rotateLeft())) << Trigger(this, SLOT(updateActionsLater())); actionRotateRight = makeAction(tr("Rotate &Right", "Rotate|")) << QIcon(":/images/icon_rotateright.png") << tr("Rotate page image clockwise.") << Trigger(widget, SLOT(rotateRight())) << Trigger(this, SLOT(updateActionsLater())); actionRotate0 = makeAction(tr("Rotate &0\260", "Rotate|"), false) << tr("Set natural page orientation.") << QVariant(0) << Trigger(this, SLOT(performRotation())) << *rotationActionGroup; actionRotate90 = makeAction(tr("Rotate &90\260", "Rotate|"), false) << tr("Turn page on its left side.") << QVariant(1) << Trigger(this, SLOT(performRotation())) << *rotationActionGroup; actionRotate180 = makeAction(tr("Rotate &180\260", "Rotate|"), false) << tr("Turn page upside-down.") << QVariant(2) << Trigger(this, SLOT(performRotation())) << *rotationActionGroup; actionRotate270 = makeAction(tr("Rotate &270\260", "Rotate|"), false) << tr("Turn page on its right side.") << QVariant(3) << Trigger(this, SLOT(performRotation())) << *rotationActionGroup; actionInformation = makeAction(tr("&Information...", "Edit|")) << QKeySequence(tr("Ctrl+I", "Edit|Information")) << tr("Show information about the document encoding and structure.") << Trigger(this, SLOT(performInformation())); actionMetadata = makeAction(tr("&Metadata...", "Edit|")) #ifndef Q_WS_MAC << QKeySequence(tr("Ctrl+M", "Edit|Metadata")) #endif << tr("Show the document and page meta data.") << Trigger(this, SLOT(performMetadata())); actionWhatsThis = QWhatsThis::createAction(this); actionAbout = makeAction(tr("&About DjView...")) #ifndef Q_WS_MAC << QIcon(":/images/djview.png") #endif << tr("Show information about this program.") << Trigger(this, SLOT(performAbout())); actionDisplayColor = makeAction(tr("&Color", "Display|"), false) << tr("Display everything.") << Trigger(widget, SLOT(displayModeColor())) << Trigger(this, SLOT(updateActionsLater())) << *modeActionGroup; actionDisplayBW = makeAction(tr("&Stencil", "Display|"), false) << tr("Only display the document bitonal stencil.") << Trigger(widget, SLOT(displayModeStencil())) << Trigger(this, SLOT(updateActionsLater())) << *modeActionGroup; actionDisplayForeground = makeAction(tr("&Foreground", "Display|"), false) << tr("Only display the foreground layer.") << Trigger(widget, SLOT(displayModeForeground())) << Trigger(this, SLOT(updateActionsLater())) << *modeActionGroup; actionDisplayBackground = makeAction(tr("&Background", "Display|"), false) << tr("Only display the background layer.") << Trigger(widget, SLOT(displayModeBackground())) << Trigger(this, SLOT(updateActionsLater())) << *modeActionGroup; actionDisplayHiddenText = makeAction(tr("&Hidden Text", "Display|"), false) << tr("Overlay a representation of the hidden text layer.") << Trigger(widget, SLOT(displayModeText())) << Trigger(this, SLOT(updateActionsLater())) << *modeActionGroup; actionInvertLuminance = makeAction(tr("I&nvert Luminance", "View|"), true) << tr("Invert image luminance while preserving hue.") << Trigger(widget, SLOT(setInvertLuminance(bool))) << Trigger(this, SLOT(updateActionsLater())); actionPreferences = makeAction(tr("Prefere&nces...", "Settings|")) << QIcon(":/images/icon_prefs.png") << tr("Show the preferences dialog.") << Trigger(this, SLOT(performPreferences())); actionViewSideBar = makeAction(tr("Show &Sidebar", "Settings|"), true) << QKeySequence(tr("Ctrl+F9", "Settings|Show sidebar")) << QKeySequence(tr("F9", "Settings|Show sidebar")) << tr("Show/hide the side bar.") << Trigger(this, SLOT(showSideBar(bool))); actionViewToolBar = toolBar->toggleViewAction() << tr("Show &Toolbar", "Settings|") << QKeySequence(tr("Ctrl+F10", "Settings|Show toolbar")) << QKeySequence(tr("F10", "Settings|Show toolbar")) << tr("Show/hide the standard tool bar.") << Trigger(this, SLOT(updateActionsLater())); actionViewStatusBar = makeAction(tr("Show Stat&usbar", "Settings|"), true) << tr("Show/hide the status bar.") << Trigger(statusBar,SLOT(setVisible(bool))) << Trigger(this, SLOT(updateActionsLater())); actionViewFullScreen = makeAction(tr("F&ull Screen","View|"), false) << QKeySequence(tr("Ctrl+F11","View|FullScreen")) << QKeySequence(tr("F11","View|FullScreen")) << QIcon(":/images/icon_fullscreen.png") << tr("Toggle full screen mode.") << Trigger(this, SLOT(performViewFullScreen(bool))); actionLayoutContinuous = makeAction(tr("&Continuous", "Layout|"), false) << QIcon(":/images/icon_continuous.png") << QKeySequence(tr("Ctrl+F4", "Layout|Continuous")) << QKeySequence(tr("F4", "Layout|Continuous")) << tr("Toggle continuous layout mode.") << Trigger(widget, SLOT(setContinuous(bool))) << Trigger(this, SLOT(updateActionsLater())); actionLayoutSideBySide = makeAction(tr("Side &by Side", "Layout|"), false) << QIcon(":/images/icon_sidebyside.png") << QKeySequence(tr("Ctrl+F5", "Layout|SideBySide")) << QKeySequence(tr("F5", "Layout|SideBySide")) << tr("Toggle side-by-side layout mode.") << Trigger(widget, SLOT(setSideBySide(bool))) << Trigger(this, SLOT(updateActionsLater())); actionLayoutCoverPage = makeAction(tr("Co&ver Page", "Layout|"), false) #ifdef Q_WS_MAC << QIcon(":/images/icon_coverpage.png") #endif << QKeySequence(tr("Ctrl+F6", "Layout|CoverPage")) << QKeySequence(tr("F6", "Layout|CoverPage")) << tr("Show the cover page alone in side-by-side mode.") << Trigger(widget, SLOT(setCoverPage(bool))) << Trigger(this, SLOT(updateActionsLater())); actionLayoutRightToLeft = makeAction(tr("&Right to Left", "Layout|"), false) #ifdef Q_WS_MAC << QIcon(":/images/icon_righttoleft.png") #endif << QKeySequence(tr("Ctrl+Shift+F6", "Layout|RightToLeft")) << QKeySequence(tr("Shift+F6", "Layout|RightToLeft")) << tr("Show pages right-to-left in side-by-side mode.") << Trigger(widget, SLOT(setRightToLeft(bool))) << Trigger(this, SLOT(updateActionsLater())); actionCopyUrl = makeAction(tr("Copy &URL", "Edit|")) << tr("Save an URL for the current page into the clipboard.") << QKeySequence(tr("Ctrl+C", "Edit|CopyURL")) << Trigger(this, SLOT(performCopyUrl())); actionCopyOutline = makeAction(tr("Copy &Outline", "Edit|")) << tr("Save the djvused code for the outline into the clipboard.") << Trigger(this, SLOT(performCopyOutline())); actionCopyAnnotation = makeAction(tr("Copy &Annotations", "Edit|")) << tr("Save the djvused code for the page annotations into the clipboard.") << Trigger(this, SLOT(performCopyAnnotation())); actionAbout->setMenuRole(QAction::AboutRole); actionQuit->setMenuRole(QAction::QuitRole); actionPreferences->setMenuRole(QAction::PreferencesRole); } void QDjView::createMenus() { // Layout main menu QMenu *fileMenu = menuBar->addMenu(tr("&File", "File|")); if (viewerMode == STANDALONE) { fileMenu->addAction(actionNew); fileMenu->addAction(actionOpen); fileMenu->addAction(actionOpenLocation); recentMenu = fileMenu->addMenu(tr("Open &Recent")); recentMenu->menuAction()->setIcon(QIcon(":/images/icon_open.png")); connect(recentMenu, SIGNAL(aboutToShow()), this, SLOT(fillRecent())); fileMenu->addSeparator(); } fileMenu->addAction(actionSave); fileMenu->addAction(actionExport); fileMenu->addAction(actionPrint); if (viewerMode == STANDALONE) { fileMenu->addSeparator(); fileMenu->addAction(actionClose); fileMenu->addAction(actionQuit); } QMenu *editMenu = menuBar->addMenu(tr("&Edit", "Edit|")); editMenu->addAction(actionSelect); editMenu->addAction(actionCopyUrl); editMenu->addAction(actionCopyOutline); editMenu->addAction(actionCopyAnnotation); editMenu->addSeparator(); editMenu->addAction(actionFind); editMenu->addAction(actionFindNext); editMenu->addAction(actionFindPrev); QMenu *viewMenu = menuBar->addMenu(tr("&View", "View|")); QMenu *zoomMenu = viewMenu->addMenu(tr("&Zoom","View|Zoom")); zoomMenu->addAction(actionZoomIn); zoomMenu->addAction(actionZoomOut); zoomMenu->addSeparator(); zoomMenu->addAction(actionZoomOneToOne); zoomMenu->addAction(actionZoomFitWidth); zoomMenu->addAction(actionZoomFitPage); zoomMenu->addSeparator(); zoomMenu->addAction(actionZoom300); zoomMenu->addAction(actionZoom200); zoomMenu->addAction(actionZoom150); zoomMenu->addAction(actionZoom100); zoomMenu->addAction(actionZoom75); zoomMenu->addAction(actionZoom50); QMenu *rotationMenu = viewMenu->addMenu(tr("&Rotate","View|Rotate")); rotationMenu->addAction(actionRotateLeft); rotationMenu->addAction(actionRotateRight); rotationMenu->addSeparator(); rotationMenu->addAction(actionRotate0); rotationMenu->addAction(actionRotate90); rotationMenu->addAction(actionRotate180); rotationMenu->addAction(actionRotate270); QMenu *modeMenu = viewMenu->addMenu(tr("&Display","View|Display")); modeMenu->addAction(actionDisplayColor); modeMenu->addAction(actionDisplayBW); modeMenu->addAction(actionDisplayForeground); modeMenu->addAction(actionDisplayBackground); modeMenu->addAction(actionDisplayHiddenText); viewMenu->addSeparator(); viewMenu->addAction(actionLayoutContinuous); viewMenu->addAction(actionLayoutSideBySide); viewMenu->addAction(actionLayoutCoverPage); viewMenu->addAction(actionLayoutRightToLeft); viewMenu->addSeparator(); viewMenu->addAction(actionInvertLuminance); viewMenu->addSeparator(); viewMenu->addAction(actionInformation); viewMenu->addAction(actionMetadata); if (viewerMode == STANDALONE) viewMenu->addSeparator(); if (viewerMode == STANDALONE) viewMenu->addAction(actionViewFullScreen); QMenu *gotoMenu = menuBar->addMenu(tr("&Go", "Go|")); gotoMenu->addAction(actionNavFirst); gotoMenu->addAction(actionNavPrev); gotoMenu->addAction(actionNavNext); gotoMenu->addAction(actionNavLast); gotoMenu->addSeparator(); gotoMenu->addAction(actionBack); gotoMenu->addAction(actionForw); QMenu *settingsMenu = menuBar->addMenu(tr("&Settings", "Settings|")); settingsMenu->addAction(actionViewSideBar); settingsMenu->addAction(actionViewToolBar); settingsMenu->addAction(actionViewStatusBar); settingsMenu->addSeparator(); settingsMenu->addAction(actionPreferences); QMenu *helpMenu = menuBar->addMenu(tr("&Help", "Help|")); helpMenu->addAction(actionWhatsThis); helpMenu->addSeparator(); helpMenu->addAction(actionAbout); // Layout context menu gotoMenu = contextMenu->addMenu(tr("&Go", "Go|")); gotoMenu->addAction(actionNavFirst); gotoMenu->addAction(actionNavPrev); gotoMenu->addAction(actionNavNext); gotoMenu->addAction(actionNavLast); zoomMenu = contextMenu->addMenu(tr("&Zoom","View|Zoom")); zoomMenu->addAction(actionZoomIn); zoomMenu->addAction(actionZoomOut); zoomMenu->addSeparator(); zoomMenu->addAction(actionZoomOneToOne); zoomMenu->addAction(actionZoomFitWidth); zoomMenu->addAction(actionZoomFitPage); zoomMenu->addSeparator(); zoomMenu->addAction(actionZoom300); zoomMenu->addAction(actionZoom200); zoomMenu->addAction(actionZoom150); zoomMenu->addAction(actionZoom100); zoomMenu->addAction(actionZoom75); zoomMenu->addAction(actionZoom50); rotationMenu = contextMenu->addMenu(tr("&Rotate","View|Rotate")); rotationMenu->addAction(actionRotateLeft); rotationMenu->addAction(actionRotateRight); rotationMenu->addSeparator(); rotationMenu->addAction(actionRotate0); rotationMenu->addAction(actionRotate90); rotationMenu->addAction(actionRotate180); rotationMenu->addAction(actionRotate270); modeMenu = contextMenu->addMenu(tr("&Display","View|Display")); modeMenu->addAction(actionDisplayColor); modeMenu->addAction(actionDisplayBW); modeMenu->addAction(actionDisplayForeground); modeMenu->addAction(actionDisplayBackground); modeMenu->addAction(actionDisplayHiddenText); contextMenu->addSeparator(); contextMenu->addAction(actionLayoutContinuous); contextMenu->addAction(actionLayoutSideBySide); contextMenu->addAction(actionLayoutCoverPage); contextMenu->addSeparator(); contextMenu->addAction(actionFind); contextMenu->addAction(actionInformation); contextMenu->addAction(actionMetadata); contextMenu->addSeparator(); contextMenu->addAction(actionSave); contextMenu->addAction(actionExport); contextMenu->addAction(actionPrint); contextMenu->addSeparator(); contextMenu->addAction(actionViewSideBar); contextMenu->addAction(actionViewToolBar); contextMenu->addAction(actionViewFullScreen); contextMenu->addSeparator(); contextMenu->addAction(actionPreferences); contextMenu->addSeparator(); contextMenu->addAction(actionWhatsThis); contextMenu->addAction(actionAbout); } /*! Update graphical interface components. This is called whenever something changes using function \a QDjView::updateActionsLater(). It updates the all gui compnents. */ void QDjView::updateActions() { // Rebuild toolbar if necessary if (tools != toolsCached) fillToolBar(toolBar); #ifdef Q_WS_MAC_WITH_UNIFIED_TITLE_AND_TOOLBAR if (viewerMode == STANDALONE && !isFullScreen()) setUnifiedTitleAndToolBarOnMac((! toolBar->isHidden()) && (toolBarArea(toolBar) & Qt::TopToolBarArea) ); #endif // Enable all actions foreach(QObject *object, children()) if (QAction *action = qobject_cast(object)) action->setEnabled(true); // Some actions are explicitly disabled actionSave->setEnabled(savingAllowed || prefs->restrictOverride); actionExport->setEnabled(savingAllowed || prefs->restrictOverride); actionPrint->setEnabled(printingAllowed || prefs->restrictOverride); // Some actions are only available in standalone mode actionNew->setVisible(viewerMode == STANDALONE); actionOpen->setVisible(viewerMode == STANDALONE); actionOpenLocation->setVisible(viewerMode == STANDALONE); actionClose->setVisible(viewerMode == STANDALONE); actionQuit->setVisible(viewerMode == STANDALONE); actionViewFullScreen->setVisible(viewerMode == STANDALONE); setAcceptDrops(viewerMode == STANDALONE); // Zoom combo and actions int zoom = widget->zoom(); actionZoomIn->setEnabled(zoom < QDjVuWidget::ZOOM_MAX); actionZoomOut->setEnabled(zoom < 0 || zoom > QDjVuWidget::ZOOM_MIN); actionZoomFitPage->setChecked(zoom == QDjVuWidget::ZOOM_FITPAGE); actionZoomFitWidth->setChecked(zoom == QDjVuWidget::ZOOM_FITWIDTH); actionZoomOneToOne->setChecked(zoom == QDjVuWidget::ZOOM_ONE2ONE); actionZoom300->setChecked(zoom == 300); actionZoom200->setChecked(zoom == 200); actionZoom150->setChecked(zoom == 150); actionZoom100->setChecked(zoom == 100); actionZoom75->setChecked(zoom == 75); actionZoom50->setChecked(zoom == 50); zoomCombo->setEnabled(!!document); int zoomIndex = zoomCombo->findData(QVariant(zoom)); zoomCombo->clearEditText(); zoomCombo->setCurrentIndex(zoomIndex); if (zoomIndex < 0 && zoom >= QDjVuWidget::ZOOM_MIN && zoom <= QDjVuWidget::ZOOM_MAX) zoomCombo->setEditText(QString("%1%").arg(zoom)); else if (zoomIndex >= 0) zoomCombo->setEditText(zoomCombo->itemText(zoomIndex)); // Mode combo and actions QDjVuWidget::DisplayMode mode = widget->displayMode(); actionDisplayColor->setChecked(mode == QDjVuWidget::DISPLAY_COLOR); actionDisplayBW->setChecked(mode == QDjVuWidget::DISPLAY_STENCIL); actionDisplayBackground->setChecked(mode == QDjVuWidget::DISPLAY_BG); actionDisplayForeground->setChecked(mode == QDjVuWidget::DISPLAY_FG); actionDisplayHiddenText->setChecked(mode == QDjVuWidget::DISPLAY_TEXT); modeCombo->setCurrentIndex(modeCombo->findData(QVariant(mode))); modeCombo->setEnabled(!!document); // Image inversion actionInvertLuminance->setChecked(widget->invertLuminance()); // Rotations int rotation = widget->rotation(); actionRotate0->setChecked(rotation == 0); actionRotate90->setChecked(rotation == 1); actionRotate180->setChecked(rotation == 2); actionRotate270->setChecked(rotation == 3); // Page combo and actions int pagenum = documentPages.size(); int pageno = widget->page(); pageCombo->clearEditText(); pageCombo->setCurrentIndex(pageCombo->findData(QVariant(pageno))); if (pageno >= 0 && pagenum > 0) { if (pageName(pageno,true).isEmpty()) pageCombo->setEditText(QString("%1 / %2").arg(pageno+1).arg(pagenum)); else pageCombo->setEditText(pageName(pageno)); } pageCombo->setEnabled(pagenum > 0); actionNavFirst->setEnabled(pagenum>0 && pageno>0); actionNavPrev->setEnabled(pagenum>0 && pageno>0); actionNavNext->setEnabled(pagenum>0 && pagenosetEnabled(pagenum>0 && pagenosetChecked(widget->continuous()); actionLayoutSideBySide->setChecked(widget->sideBySide()); actionLayoutCoverPage->setEnabled(widget->sideBySide()); actionLayoutCoverPage->setChecked(widget->coverPage()); actionLayoutRightToLeft->setEnabled(widget->sideBySide()); actionLayoutRightToLeft->setChecked(widget->rightToLeft()); // UndoRedo undoTimer->stop(); undoTimer->start(250); actionBack->setEnabled(undoList.size() > 0); actionForw->setEnabled(redoList.size() > 0); // Misc textLabel->setVisible(prefs->showTextLabel); actionCopyOutline->setVisible(prefs->advancedFeatures); actionCopyAnnotation->setVisible(prefs->advancedFeatures); actionCopyUrl->setEnabled(pagenum > 0); actionCopyOutline->setEnabled(pagenum > 0); actionCopyAnnotation->setEnabled(pagenum > 0); actionViewSideBar->setChecked(hiddenSideBarTabs() == 0); // Disable almost everything when document==0 if (! document) { foreach(QObject *object, children()) if (QAction *action = qobject_cast(object)) if (action != actionNew && action != actionOpen && action != actionOpenLocation && action != actionClose && action != actionQuit && action != actionPreferences && action != actionViewToolBar && action != actionViewStatusBar && action != actionViewSideBar && action != actionViewFullScreen && action != actionWhatsThis && action != actionAbout ) action->setEnabled(false); } // Finished updateActionsScheduled = false; // Notify plugin if (viewerMode != STANDALONE) emit pluginOnChange(); } // ---------------------------------------- // WHATSTHIS HELP void QDjView::createWhatsThis() { #define HELP(x,y) { QString s(x); Help h(s); h y; } struct Help { QString s; Help(QString s) : s(s) { } Help& operator>>(QWidget *w) { w->setWhatsThis(s); return *this; } Help& operator>>(QAction *a) { a->setWhatsThis(s); return *this; } }; QString mc, ms, ml; #ifdef Q_WS_MAC mc = tr("Control Left Mouse Button"); #else mc = tr("Right Mouse Button"); #endif ms = prefs->modifiersToString(prefs->modifiersForSelect); ms = ms.replace("+"," "); ml = prefs->modifiersToString(prefs->modifiersForLens); ml = ml.replace("+"," "); HELP(tr("Selecting a rectangle.
" "Once a rectangular area is selected, a popup menu " "lets you copy the corresponding text or image. " "Instead of using this tool, you can also hold %1 " "and use the Left Mouse Button." "").arg(ms), >> actionSelect ); HELP(tr("Zooming.
" "Choose a zoom level for viewing the document. " "Zoom level 100% displays the document for a 100 dpi screen. " "Zoom levels Fit Page and Fit Width ensure " "that the full page or the page width fit in the window. " ""), >> actionZoomIn >> actionZoomOut >> actionZoomFitPage >> actionZoomFitWidth >> actionZoom300 >> actionZoom200 >> actionZoom150 >> actionZoom75 >> actionZoom50 >> zoomCombo ); HELP(tr("Rotating the pages.
" "Choose to display pages in portrait or landscape mode. " "You can also turn them upside down."), >> actionRotateLeft >> actionRotateRight >> actionRotate0 >> actionRotate90 >> actionRotate180 >> actionRotate270 ); HELP(tr("Display mode.
" "DjVu images compose a background layer and a foreground layer " "using a stencil. The display mode specifies with layers " "should be displayed."), >> actionDisplayColor >> actionDisplayBW >> actionDisplayForeground >> actionDisplayBackground >> modeCombo ); HELP(tr("Navigating the document.
" "The page selector lets you jump to any page by name " "and can be activated at any time by pressing Ctrl+G. " "The navigation buttons jump to the first page, the previous " "page, the next page, or the last page. "), >> actionNavFirst >> actionNavPrev >> actionNavNext >> actionNavLast >> pageCombo ); HELP(tr("Document and page information.
" "Display a dialog window for viewing " "encoding information pertaining to the document " "or to a specific page."), >> actionInformation ); HELP(tr("Document and page metadata.
" "Display a dialog window for viewing metadata " "pertaining to the document " "or to a specific page."), >> actionMetadata ); HELP(tr("Continuous layout.
" "Display all the document pages arranged vertically " "inside the scrollable document viewing area."), >> actionLayoutContinuous ); HELP(tr("Side by side layout.
" "Display pairs of pages side by side " "inside the scrollable document viewing area."), >> actionLayoutSideBySide ); HELP(tr("Page information.
" "Display information about the page located under the cursor: " "the sequential page number, the page size in pixels, " "and the page resolution in dots per inch. "), >> pageLabel ); HELP(tr("Cursor information.
" "Display the position of the mouse cursor " "expressed in page coordinates. "), >> mouseLabel ); HELP(tr("Document viewing area.
" "This is the main display area for the DjVu document.

    " "
  • Arrows and page keys to navigate the document.
  • " "
  • Space and BackSpace to read the document.
  • " "
  • Keys + - [ ] " "to zoom or rotate the document.
  • " "
  • Left Mouse Button for panning and selecting links.
  • " "
  • %3 for displaying the contextual menu.
  • " "
  • %1 Left Mouse Button for selecting text or images.
  • " "
  • %2 for popping the magnification lens.
  • " "
").arg(ms).arg(ml).arg(mc), >> widget ); HELP(tr("Document viewing area.
" "This is the main display area for the DjVu document. " "But you must first open a DjVu document to see anything." ""), >> splash ); #undef HELP } // ---------------------------------------- // APPLY PREFERENCES QDjViewPrefs::Saved * QDjView::getSavedPrefs(void) { if (viewerMode==EMBEDDED_PLUGIN) return &prefs->forEmbeddedPlugin; if (viewerMode==FULLPAGE_PLUGIN) return &prefs->forFullPagePlugin; if (actionViewFullScreen->isChecked()) return &prefs->forFullScreen; else return &prefs->forStandalone; } void QDjView::enableContextMenu(bool enable) { QMenu *oldContextMenu = widget->contextMenu(); if (!enable || oldContextMenu != contextMenu) { // remove context menu widget->setContextMenu(0); // disable shortcuts if (oldContextMenu) foreach(QAction *action, widget->actions()) widget->removeAction(action); } if (enable && oldContextMenu != contextMenu) { // setup context menu widget->setContextMenu(contextMenu); // enable shortcuts if (contextMenu) { // all explicit shortcuts in context menu widget->addAction(contextMenu->menuAction()); // things that do not have a context menu entry widget->addAction(actionFindNext); widget->addAction(actionFindPrev); } } } void QDjView::enableScrollBars(bool enable) { Qt::ScrollBarPolicy policy = Qt::ScrollBarAlwaysOff; if (enable) policy = Qt::ScrollBarAsNeeded; widget->setHorizontalScrollBarPolicy(policy); widget->setVerticalScrollBarPolicy(policy); } void QDjView::applyOptions(bool remember) { menuBar->setVisible(options & QDjViewPrefs::SHOW_MENUBAR); toolBar->setVisible(options & QDjViewPrefs::SHOW_TOOLBAR); statusBar->setVisible(options & QDjViewPrefs::SHOW_STATUSBAR); enableScrollBars(options & QDjViewPrefs::SHOW_SCROLLBARS); widget->setDisplayFrame(options & QDjViewPrefs::SHOW_FRAME); widget->setDisplayMapAreas(options & QDjViewPrefs::SHOW_MAPAREAS); widget->setContinuous(options & QDjViewPrefs::LAYOUT_CONTINUOUS); widget->setSideBySide(options & QDjViewPrefs::LAYOUT_SIDEBYSIDE); widget->setCoverPage(options & QDjViewPrefs::LAYOUT_COVERPAGE); widget->setRightToLeft(options & QDjViewPrefs::LAYOUT_RIGHTTOLEFT); widget->enableMouse(options & QDjViewPrefs::HANDLE_MOUSE); widget->enableKeyboard(options & QDjViewPrefs::HANDLE_KEYBOARD); widget->enableHyperlink(options & QDjViewPrefs::HANDLE_LINKS); enableContextMenu(options & QDjViewPrefs::HANDLE_CONTEXTMENU); if (!remember) showSideBar(options & QDjViewPrefs::SHOW_SIDEBAR); } void QDjView::updateOptions(void) { options = 0; if (! menuBar->isHidden()) options |= QDjViewPrefs::SHOW_MENUBAR; if (! toolBar->isHidden()) options |= QDjViewPrefs::SHOW_TOOLBAR; if (! statusBar->isHidden()) options |= QDjViewPrefs::SHOW_STATUSBAR; if (! hiddenSideBarTabs()) options |= QDjViewPrefs::SHOW_SIDEBAR; if (widget->verticalScrollBarPolicy() != Qt::ScrollBarAlwaysOff) options |= QDjViewPrefs::SHOW_SCROLLBARS; if (widget->displayFrame()) options |= QDjViewPrefs::SHOW_FRAME; if (widget->displayMapAreas()) options |= QDjViewPrefs::SHOW_MAPAREAS; if (widget->continuous()) options |= QDjViewPrefs::LAYOUT_CONTINUOUS; if (widget->sideBySide()) options |= QDjViewPrefs::LAYOUT_SIDEBYSIDE; if (widget->coverPage()) options |= QDjViewPrefs::LAYOUT_COVERPAGE; if (widget->rightToLeft()) options |= QDjViewPrefs::LAYOUT_RIGHTTOLEFT; if (widget->mouseEnabled()) options |= QDjViewPrefs::HANDLE_MOUSE; if (widget->keyboardEnabled()) options |= QDjViewPrefs::HANDLE_KEYBOARD; if (widget->hyperlinkEnabled()) options |= QDjViewPrefs::HANDLE_LINKS; if (widget->contextMenu()) options |= QDjViewPrefs::HANDLE_CONTEXTMENU; } void QDjView::applySaved(Saved *saved) { // default dock geometry tabifyDockWidget(thumbnailDock, outlineDock); tabifyDockWidget(thumbnailDock, findDock); thumbnailDock->raise(); // main saved states options = saved->options; if (saved->state.size() > 0) restoreState(saved->state); applyOptions(saved->remember); widget->setZoom(saved->zoom); } static const Qt::WindowStates unusualWindowStates = (Qt::WindowMinimized | Qt::WindowMaximized | Qt::WindowFullScreen ); void QDjView::updateSaved(Saved *saved) { updateOptions(); if (saved->remember) { // main saved states saved->zoom = widget->zoom(); saved->state = saveState(); saved->options = options; // avoid confusing options in standalone mode if (saved == &prefs->forStandalone && !(saved->options & QDjViewPrefs::HANDLE_CONTEXTMENU) && !(saved->options & QDjViewPrefs::SHOW_MENUBAR) ) saved->options |= (QDjViewPrefs::SHOW_MENUBAR | QDjViewPrefs::SHOW_SCROLLBARS | QDjViewPrefs::SHOW_STATUSBAR | QDjViewPrefs::SHOW_FRAME | QDjViewPrefs::HANDLE_CONTEXTMENU ); // main window size in standalone mode if (saved == &prefs->forStandalone) if (! (windowState() & unusualWindowStates)) prefs->windowSize = size(); } } void QDjView::applyPreferences(void) { // Saved preferences applySaved(getSavedPrefs()); // Other preferences QDjVuNetDocument::setProxy(prefs->proxyUrl); djvuContext.setCacheSize(prefs->cacheSize); widget->setPixelCacheSize(prefs->pixelCacheSize); widget->setModifiersForLens(prefs->modifiersForLens); widget->setModifiersForSelect(prefs->modifiersForSelect); widget->setModifiersForLinks(prefs->modifiersForLinks); widget->setGamma(prefs->gamma); widget->setWhite(prefs->white); widget->setScreenDpi(prefs->resolution ? prefs->resolution : physicalDpiY()); widget->setLensSize(prefs->lensSize); widget->setLensPower(prefs->lensPower); widget->enableAnimation(prefs->enableAnimations); widget->setInvertLuminance(prefs->invertLuminance); widget->setMouseWheelZoom(prefs->mouseWheelZoom); // Thumbnail preferences thumbnailWidget->setSize(prefs->thumbnailSize); thumbnailWidget->setSmart(prefs->thumbnailSmart); // Search preferences findWidget->setWordOnly(prefs->searchWordsOnly); findWidget->setCaseSensitive(prefs->searchCaseSensitive); // Too risky: findWidget->setRegExpMode(prefs->searchRegExpMode); // Special preferences for embedded plugins if (viewerMode == EMBEDDED_PLUGIN) { setMinimumSize(QSize(8,8)); widget->setBorderBrush(QBrush(Qt::white)); widget->setBorderSize(0); } // Preload full screen prefs. fsSavedNormal = prefs->forStandalone; fsSavedFullScreen = prefs->forFullScreen; } void QDjView::preferencesChanged(void) { applyPreferences(); createWhatsThis(); updateActions(); } // ---------------------------------------- // SESSION MANAGEMENT void QDjView::saveSession(QSettings *s) { Saved saved; updateSaved(&saved); s->setValue("name", objectName()); s->setValue("options", prefs->optionsToString(saved.options)); s->setValue("state", saved.state); s->setValue("tools", prefs->toolsToString(tools)); s->setValue("documentUrl", getDecoratedUrl().toString()); } void QDjView::restoreSession(QSettings *s) { QUrl du = QUrl(s->value("documentUrl").toString()); Tools tools = this->tools; Saved saved; updateSaved(&saved); if (s->contains("options")) saved.options = prefs->stringToOptions(s->value("options").toString()); if (s->contains("zoom")) // compat saved.zoom = s->value("zoom").toInt(); if (s->contains("state")) saved.state = s->value("state").toByteArray(); if (s->contains("tools")) tools = prefs->stringToTools(s->value("tools").toString()); if (s->contains("name")) setObjectName(s->value("name").toString()); applySaved(&saved); updateActionsLater(); if (du.isValid()) open(du); if (document && s->contains("pageNo")) // compat goToPage(s->value("pageNo", 0).toInt()); } // ---------------------------------------- // QDJVIEW ARGUMENTS static bool string_is_on(QString val) { QString v = val.toLower(); return v == "yes" || v == "on" || v == "true" || v == "1"; } static bool string_is_off(QString val) { QString v = val.toLower(); return v == "no" || v == "off" || v == "false" || v == "0"; } static QString get_boolean(bool b) { return QString(b ? "yes" : "no"); } static bool parse_boolean(QString key, QString val, QList &errors, bool &answer) { answer = false; if (string_is_off(val)) return true; answer = true; if (string_is_on(val) || val.isNull()) return true; errors << QDjView::tr("Option '%1' requires boolean argument.").arg(key); return false; } static void illegal_value(QString key, QString value, QList &errors) { errors << QDjView::tr("Illegal value '%2' for option '%1'.") .arg(key).arg(value); } static bool parse_position(QString value, double &x, double &y) { bool okay0, okay1; QStringList val = value.split(","); if (val.size() == 2) { x = val[0].toDouble(&okay0); y = val[1].toDouble(&okay1); return okay0 && okay1; } return false; } static bool parse_highlight(QString value, int &x, int &y, int &w, int &h, QColor &color) { bool okay0, okay1, okay2, okay3; QStringList val = value.split(","); if (val.size() < 4) return false; x = val[0].toInt(&okay0); y = val[1].toInt(&okay1); w = val[2].toInt(&okay2); h = val[3].toInt(&okay3); if (! (okay0 && okay1 && okay2 && okay3)) return false; if (val.size() < 5) return true; QString c = val[4]; if (c[0] != '#') c = "#" + c; color.setNamedColor(c); if (! color.isValid()) return false; if (val.size() <= 5) return true; return false; } template static inline void set_reset(QFlags &x, bool plus, bool minus, T y) { if (plus) x |= y; else if (minus) x &= ~y; } void QDjView::parseToolBarOption(QString option, QStringList &errors) { QString str = option.toLower(); int len = str.size(); bool wantselect = false; bool wantmode = false; bool minus = false; bool plus = false; int npos = 0; while (npos < len) { int pos = npos; npos = str.indexOf(QRegExp("[-+,]"), pos); if (npos < 0) npos = len; QString key = str.mid(pos, npos-pos).trimmed(); if (string_is_off(key) && !plus && !minus) options &= ~QDjViewPrefs::SHOW_TOOLBAR; else if (string_is_on(key) && !plus && !minus) options |= QDjViewPrefs::SHOW_TOOLBAR; else if (key=="bottom" && !plus && !minus) { options |= QDjViewPrefs::SHOW_TOOLBAR; tools &= ~QDjViewPrefs::TOOLBAR_TOP; } else if (key=="top" && !plus && !minus) { options |= QDjViewPrefs::SHOW_TOOLBAR; tools &= ~QDjViewPrefs::TOOLBAR_BOTTOM; } else if (key=="auto" && !plus && !minus) tools |= QDjViewPrefs::TOOLBAR_AUTOHIDE; else if (key=="always" && !plus && !minus) { options |= QDjViewPrefs::SHOW_TOOLBAR; tools &= ~QDjViewPrefs::TOOLBAR_AUTOHIDE; } else if (key.contains(QRegExp("^(fore|back|color|bw)(_button)?$"))) wantmode |= plus; else if (key=="pan" || key=="zoomsel" || key=="textsel") wantselect |= plus; else if (key=="modecombo") set_reset(tools, plus, minus, QDjViewPrefs::TOOL_MODECOMBO); else if (key=="rescombo" || key=="zoomcombo") set_reset(tools, plus, minus, QDjViewPrefs::TOOL_ZOOMCOMBO); else if (key=="zoom") set_reset(tools, plus, minus, QDjViewPrefs::TOOL_ZOOMBUTTONS); else if (key=="rotate") set_reset(tools, plus, minus, QDjViewPrefs::TOOL_ROTATE); else if (key=="search" || key=="find") set_reset(tools, plus, minus, QDjViewPrefs::TOOL_FIND); else if (key=="print") set_reset(tools, plus, minus, QDjViewPrefs::TOOL_PRINT); else if (key=="save") set_reset(tools, plus, minus, QDjViewPrefs::TOOL_SAVE); else if (key=="pagecombo") set_reset(tools, plus, minus, QDjViewPrefs::TOOL_PAGECOMBO); else if (key=="backforw") set_reset(tools, plus, minus, QDjViewPrefs::TOOL_BACKFORW); else if (key=="prevnext" || key=="prevnextpage") set_reset(tools, plus, minus, QDjViewPrefs::TOOL_PREVNEXT); else if (key=="firstlast" || key=="firstlastpage") set_reset(tools, plus, minus, QDjViewPrefs::TOOL_FIRSTLAST); // lizards else if (key=="doublepage") // lizards! set_reset(tools, plus, minus, QDjViewPrefs::TOOL_LAYOUT); else if (key=="calibrate" || key=="ruler" || key=="lizard") errors << tr("Toolbar option '%1' is not implemented.").arg(key); // djview4 else if (key=="select") set_reset(tools, plus, minus, QDjViewPrefs::TOOL_SELECT); else if (key=="new") set_reset(tools, plus, minus, QDjViewPrefs::TOOL_NEW); else if (key=="open") set_reset(tools, plus, minus, QDjViewPrefs::TOOL_OPEN); else if (key=="layout") set_reset(tools, plus, minus, QDjViewPrefs::TOOL_LAYOUT); else if (key=="help") set_reset(tools, plus, minus, QDjViewPrefs::TOOL_WHATSTHIS); else if (key!="") errors << tr("Toolbar option '%1' is not recognized.").arg(key); // handle + or - if (npos < len) { Tools base = QDjViewPrefs::TOOLBAR_AUTOHIDE | QDjViewPrefs::TOOLBAR_TOP | QDjViewPrefs::TOOLBAR_BOTTOM; if (str[npos] == '-') { if (!minus && !plus) tools |= (prefs->tools & ~base); plus = false; minus = true; } else if (str[npos] == '+') { if (!minus && !plus) tools &= base; minus = false; plus = true; } npos += 1; } } if (wantmode) tools |= QDjViewPrefs::TOOL_MODECOMBO; if (wantselect) tools |= QDjViewPrefs::TOOL_SELECT; } /*! Parse a qdjview option described by a pair \a key, \a value. Such options can be provided on the command line or passed with the document URL as pseudo-CGI arguments. Return a list of error strings. */ QStringList QDjView::parseArgument(QString key, QString value) { bool okay; QStringList errors; key = key.toLower(); if (key == "fullscreen" || key == "fs") { if (viewerMode != STANDALONE) errors << tr("Option '%1' requires a standalone viewer.").arg(key); if (parse_boolean(key, value, errors, okay)) if (actionViewFullScreen->isChecked() != okay) actionViewFullScreen->activate(QAction::Trigger); } else if (key == "toolbar") { parseToolBarOption(value, errors); toolBar->setVisible(options & QDjViewPrefs::SHOW_TOOLBAR); } else if (key == "page") { pendingPage = value; performPendingLater(); } else if (key == "pageno") { pendingPage = QString("$%1").arg(value.toInt()); performPendingLater(); } else if (key == "cache") { // see QDjVuDocument::setUrl(...) parse_boolean(key, value, errors, okay); } else if (key == "passive" || key == "passivestretch") { if (parse_boolean(key, value, errors, okay) && okay) { enableScrollBars(false); enableContextMenu(false); menuBar->setVisible(false); statusBar->setVisible(false); thumbnailDock->setVisible(false); outlineDock->setVisible(false); findDock->setVisible(false); toolBar->setVisible(false); if (key == "passive") widget->setZoom(QDjVuWidget::ZOOM_FITPAGE); else widget->setZoom(QDjVuWidget::ZOOM_STRETCH); widget->setContinuous(false); widget->setSideBySide(false); widget->enableKeyboard(false); widget->enableMouse(false); } } else if (key == "scrollbars") { if (parse_boolean(key, value, errors, okay)) enableScrollBars(okay); } else if (key == "menubar") // new for djview4 { if (parse_boolean(key, value, errors, okay)) menuBar->setVisible(okay); } else if (key == "sidebar" || // new for djview4 key == "navpane" ) // lizards { showSideBar(value, errors); } else if (key == "statusbar") // new for djview4 { if (parse_boolean(key, value, errors, okay)) statusBar->setVisible(okay); } else if (key == "continuous") // new for djview4 { if (parse_boolean(key, value, errors, okay)) widget->setContinuous(okay); } else if (key == "side_by_side" || key == "sidebyside") // new for djview4 { if (parse_boolean(key, value, errors, okay)) widget->setSideBySide(okay); } else if (key == "firstpagealone" || key == "first_page_alone" || key == "cover_page" || key == "coverpage") // new for djview4 { if (parse_boolean(key, value, errors, okay)) widget->setCoverPage(okay); } else if (key == "right_to_left" || key == "righttoleft") // new for djview4 { if (parse_boolean(key, value, errors, okay)) widget->setRightToLeft(okay); } else if (key == "layout") // lizards { bool layout = false; bool continuous = false; bool sidebyside = false; foreach (QString s, value.split(",")) { if (s == "single") layout = true, continuous = sidebyside = false; else if (s == "double") layout = sidebyside = true; else if (s == "continuous") layout = continuous = true; else if (s == "ltor") widget->setRightToLeft(false); else if (s == "rtol") widget->setRightToLeft(true); else if (s == "cover") widget->setCoverPage(true); else if (s == "nocover") widget->setCoverPage(false); else if (s == "gap") widget->setSeparatorSize(12); else if (s == "nogap") widget->setSeparatorSize(0); } if (layout) { widget->setContinuous(continuous); widget->setSideBySide(sidebyside); } } else if (key == "frame") { if (parse_boolean(key, value, errors, okay)) widget->setDisplayFrame(okay); } else if (key == "background") { QColor color; color.setNamedColor((value[0] == '#') ? value : "#" + value); if (color.isValid()) widget->setBorderBrush(color); else illegal_value(key, value, errors); } else if (key == "menu") { if (parse_boolean(key, value, errors, okay)) enableContextMenu(okay); } else if (key == "keyboard") { if (parse_boolean(key, value, errors, okay)) widget->enableKeyboard(okay); } else if (key == "mouse") { if (parse_boolean(key, value, errors, okay)) widget->enableMouse(okay); } else if (key == "links") { if (parse_boolean(key, value, errors, okay)) widget->enableHyperlink(okay); } else if (key == "zoom") { int z = value.toInt(&okay); QString val = value.toLower(); if (val == "one2one") widget->setZoom(QDjVuWidget::ZOOM_ONE2ONE); else if (val == "width" || val == "fitwidth") widget->setZoom(QDjVuWidget::ZOOM_FITWIDTH); else if (val == "page" || val == "fitpage") widget->setZoom(QDjVuWidget::ZOOM_FITPAGE); else if (val == "stretch") widget->setZoom(QDjVuWidget::ZOOM_STRETCH); else if (okay && z >= QDjVuWidget::ZOOM_MIN && z <= QDjVuWidget::ZOOM_MAX) widget->setZoom(z); else illegal_value(key, value, errors); } else if (key == "mode") { QString val = value.toLower(); if (val == "color") widget->setDisplayMode(QDjVuWidget::DISPLAY_COLOR); else if (val == "bw" || val == "mask" || val == "stencil") widget->setDisplayMode(QDjVuWidget::DISPLAY_STENCIL); else if (val == "fore" || val == "foreground" || val == "fg") widget->setDisplayMode(QDjVuWidget::DISPLAY_FG); else if (val == "back" || val == "background" || val == "bg") widget->setDisplayMode(QDjVuWidget::DISPLAY_BG); else if (val == "text" || val == "hiddentext") widget->setDisplayMode(QDjVuWidget::DISPLAY_TEXT); else illegal_value(key, value, errors); } else if (key == "hor_align" || key == "halign") { QString val = value.toLower(); if (val == "left") widget->setHorizAlign(QDjVuWidget::ALIGN_LEFT); else if (val == "center") widget->setHorizAlign(QDjVuWidget::ALIGN_CENTER); else if (val == "right") widget->setHorizAlign(QDjVuWidget::ALIGN_RIGHT); else illegal_value(key, value, errors); } else if (key == "ver_align" || key == "valign") { QString val = value.toLower(); if (val == "top") widget->setVertAlign(QDjVuWidget::ALIGN_TOP); else if (val == "center") widget->setVertAlign(QDjVuWidget::ALIGN_CENTER); else if (val == "bottom") widget->setVertAlign(QDjVuWidget::ALIGN_BOTTOM); else illegal_value(key, value, errors); } else if (key == "highlight") { int x,y,w,h; QColor color; if (value.isEmpty()) widget->clearHighlights(widget->page()); else if (parse_highlight(value, x, y, w, h, color)) pendingHilite << StringPair(pendingPage, value); else illegal_value(key, value, errors); performPendingLater(); } else if (key == "rotate") { if (value == "0") widget->setRotation(0); else if (value == "90") widget->setRotation(1); else if (value == "180") widget->setRotation(2); else if (value == "270") widget->setRotation(3); else illegal_value(key, value, errors); } else if (key == "print") { if (parse_boolean(key, value, errors, okay)) printingAllowed = okay; } else if (key == "save") { if (parse_boolean(key, value, errors, okay)) savingAllowed = okay; } else if (key == "notoolbar" || key == "noscrollbars" || key == "nomenu" ) { QString msg = tr("Deprecated option '%1'").arg(key); qWarning("%s",(const char*)msg.toLocal8Bit()); if (key == "notoolbar" && value.isNull()) toolBar->setVisible(false); else if (key == "noscrollbars" && value.isNull()) enableScrollBars(false); else if (key == "nomenu" && value.isNull()) enableContextMenu(false); } else if (key == "thumbnails") { QStringList junk; if (! showSideBar(value+",thumbnails", junk)) illegal_value(key, value, errors); } else if (key == "outline") { QStringList junk; if (! showSideBar(value+",outline", junk)) illegal_value(key, value, errors); } else if (key == "find") // new for djview4 { if (findWidget) { findWidget->setText(QString::null); findWidget->setRegExpMode(false); findWidget->setWordOnly(true); findWidget->setCaseSensitive(false); } pendingFind = value; if (! value.isEmpty()) performPendingLater(); } else if (key == "showposition") { double x=0, y=0; pendingPosition.clear(); if (! parse_position(value, x, y)) illegal_value(key, value, errors); else { pendingPosition << x << y; performPendingLater(); } } else if (key == "logo" || key == "textsel" || key == "search") { QString msg = tr("Option '%1' is not implemented.").arg(key); qWarning("%s",(const char*)msg.toLocal8Bit()); } else { errors << tr("Option '%1' is not recognized.").arg(key); } updateActionsLater(); return errors; } /*! Parse a \a QDjView option expressed a a string \a key=value. This is very useful for processing command line options. */ QStringList QDjView::parseArgument(QString keyEqualValue) { int n = keyEqualValue.indexOf("="); if (n < 0) return parseArgument(keyEqualValue, QString()); else return parseArgument(keyEqualValue.left(n), keyEqualValue.mid(n+1)); } /*! Parse the \a QDjView options passed via the CGI query arguments of \a url. This is called by \a QDjView::open(QDjVuDocument, QUrl). */ void QDjView::parseDjVuCgiArguments(QUrl url) { QStringList errors; // parse bool djvuopts = false; QPair pair; foreach(pair, url.queryItems()) { if (pair.first.toLower() == "djvuopts") djvuopts = true; else if (djvuopts) errors << parseArgument(pair.first, pair.second); } // warning for errors if (djvuopts && errors.size() > 0) foreach(QString error, errors) qWarning("%s",(const char*)error.toLocal8Bit()); } /*! Return a copy of the url without the CGI query arguments corresponding to DjVu options. */ QUrl QDjView::removeDjVuCgiArguments(QUrl url) { QList > args; bool djvuopts = false; QPair pair; foreach(pair, url.queryItems()) { if (pair.first.toLower() == "djvuopts") djvuopts = true; else if (!djvuopts) args << pair; } QUrl newurl = url; newurl.setQueryItems(args); return newurl; } /*! Returns the most adequate value that could be passed to \a parseArgument for the specified \a key. */ QString QDjView::getArgument(QString key) { key = key.toLower(); if (key == "pages") // readonly return QString::number(pageNum()); else if (key == "page") return pageName(widget->page()); else if (key == "pageno") return QString::number(widget->page()+1); else if (key == "fullscreen" || key == "fs") return get_boolean((viewerMode == STANDALONE) && actionViewFullScreen->isChecked()); else if (key == "scrollbars") return get_boolean(widget->horizontalScrollBarPolicy() != Qt::ScrollBarAlwaysOff ); else if (key == "menubar") return get_boolean(menuBar->isVisible()); else if (key == "statusbar") return get_boolean(statusBar->isVisible()); else if (key == "continuous") return get_boolean(widget->continuous()); else if (key == "side_by_side" || key == "sidebyside") return get_boolean(widget->sideBySide()); else if (key == "coverpage" || key == "firstpagealone" || key == "first_page_alone" ) return get_boolean(widget->coverPage()); else if (key == "righttoleft" || key == "right_to_left") return get_boolean(widget->rightToLeft()); else if (key == "frame") return get_boolean(widget->displayFrame()); else if (key == "keyboard") return get_boolean(widget->keyboardEnabled()); else if (key == "mouse") return get_boolean(widget->mouseEnabled()); else if (key == "links") return get_boolean(widget->hyperlinkEnabled()); else if (key == "menu") return get_boolean(widget->contextMenu() != 0); else if (key == "rotate") return QString::number(widget->rotation() * 90); else if (key == "print") return get_boolean(printingAllowed); else if (key == "save") return get_boolean(savingAllowed); else if (key == "background") { QBrush brush = widget->borderBrush(); if (brush.style() == Qt::SolidPattern) return brush.color().name(); } else if (key == "layout") { QStringList l; if (widget->sideBySide()) l << QString("double"); if (widget->continuous()) l << QString("continuous"); if (l.isEmpty()) l << QString("single"); l << QString(widget->rightToLeft() ? "rtol" : "ltor"); l << QString(widget->coverPage() ? "cover" : "nocover"); l << QString(widget->separatorSize() ? "gap" : "nogap"); return l.join(","); } else if (key == "zoom") { int z = widget->zoom(); if (z == QDjVuWidget::ZOOM_ONE2ONE) return QString("one2one"); else if (z == QDjVuWidget::ZOOM_FITWIDTH) return QString("width"); else if (z == QDjVuWidget::ZOOM_FITPAGE) return QString("page"); else if (z == QDjVuWidget::ZOOM_STRETCH) return QString("stretch"); else if (z >= QDjVuWidget::ZOOM_MIN && z <= QDjVuWidget::ZOOM_MAX) return QString::number(z); } else if (key == "mode") { QDjVuWidget::DisplayMode m = widget->displayMode(); if (m == QDjVuWidget::DISPLAY_COLOR) return QString("color"); else if (m == QDjVuWidget::DISPLAY_STENCIL) return QString("bw"); else if (m == QDjVuWidget::DISPLAY_FG) return QString("fore"); else if (m == QDjVuWidget::DISPLAY_BG) return QString("back"); else if (m == QDjVuWidget::DISPLAY_TEXT) return QString("text"); } else if (key == "hor_align" || key == "halign") { QDjVuWidget::Align a = widget->horizAlign(); if (a == QDjVuWidget::ALIGN_LEFT) return QString("left"); else if (a == QDjVuWidget::ALIGN_CENTER) return QString("center"); else if (a == QDjVuWidget::ALIGN_RIGHT) return QString("right"); } else if (key == "ver_align" || key == "valign") { QDjVuWidget::Align a = widget->vertAlign(); if (a == QDjVuWidget::ALIGN_TOP) return QString("top"); else if (a == QDjVuWidget::ALIGN_CENTER) return QString("center"); else if (a == QDjVuWidget::ALIGN_BOTTOM) return QString("bottom"); } else if (key == "showposition") { QPoint center = widget->rect().center(); QDjVuWidget::Position pos = widget->positionWithClosestAnchor(center); double ha = pos.hAnchor / 100.0; double va = pos.vAnchor / 100.0; return QString("%1,%2").arg(ha).arg(va); } else if (key == "passive" || key == "passivestretch") { if (widget->horizontalScrollBarPolicy() == Qt::ScrollBarAlwaysOff && !menuBar->isVisible() && !statusBar->isVisible() && !thumbnailDock->isVisible() && !outlineDock->isVisible() && !findDock->isVisible() && !toolBar->isVisible() && !widget->continuous() && !widget->sideBySide() && !widget->keyboardEnabled() && !widget->mouseEnabled() && widget->contextMenu() == 0 ) { int z = widget->zoom(); if (key == "passive" && z == QDjVuWidget::ZOOM_FITPAGE) return QString("yes"); if (key == "passivestretch" && z == QDjVuWidget::ZOOM_STRETCH) return QString("yes"); } return QString("no"); } else if (key == "sidebar") { // without position QStringList what; if (thumbnailDock->isVisible()) what << "thumbnails"; if (outlineDock->isVisible()) what << "outline"; if (findDock->isVisible()) what << "find"; if (what.size() > 0) return QString("yes,") + what.join(","); else return QString("no"); } else if (key == "toolbar") { // Currently without toolbar content return get_boolean(toolBar->isVisible()); } else if (key == "highlight") { // Currently not working return QString(); } return QString(); } // ---------------------------------------- // QDJVIEW /*! \enum QDjView::ViewerMode The viewer mode is selected at creation time. Mode \a STANDALONE corresponds to a standalone program. Modes \a FULLPAGE_PLUGIN and \a EMBEDDED_PLUGIN correspond to a netscape plugin. */ QDjView::~QDjView() { closeDocument(); } /*! Construct a \a QDjView object using the specified djvu context and viewer mode. */ QDjView::QDjView(QDjVuContext &context, ViewerMode mode, QWidget *parent) : QMainWindow(parent), viewerMode(mode), djvuContext(context), document(0), hasNumericalPageTitle(true), updateActionsScheduled(false), performPendingScheduled(false), printingAllowed(true), savingAllowed(true) { // Main window setup setWindowTitle(tr("DjView")); setWindowIcon(QIcon(":/images/djview.png")); #ifndef Q_WS_MAC if (QApplication::windowIcon().isNull()) QApplication::setWindowIcon(windowIcon()); #endif // Determine unique object name if (mode == STANDALONE) { QWidgetList wl = QApplication::topLevelWidgets(); static int num = 0; QString name; while(name.isEmpty()) { name = QString("djview%1").arg(num++); foreach(QWidget *w, wl) if (w->objectName() == name) name = QString::null; } setObjectName(name); } // Basic preferences prefs = QDjViewPrefs::instance(); options = QDjViewPrefs::defaultOptions; tools = prefs->tools; toolsCached = 0; fsWindowState = 0; // Create dialogs errorDialog = new QDjViewErrorDialog(this); infoDialog = 0; metaDialog = 0; // Create djvu widget QWidget *central = new QWidget(this); widget = new QDjVuWidget(central); widget->setFrameShape(QFrame::NoFrame); if (viewerMode == STANDALONE) widget->setFrameShadow(QFrame::Sunken); widget->viewport()->installEventFilter(this); connect(widget, SIGNAL(errorCondition(int)), this, SLOT(errorCondition(int))); connect(widget, SIGNAL(error(QString,QString,int)), errorDialog, SLOT(error(QString,QString,int))); connect(widget, SIGNAL(error(QString,QString,int)), this, SLOT(error(QString,QString,int))); connect(widget, SIGNAL(info(QString)), this, SLOT(info(QString))); connect(widget, SIGNAL(layoutChanged()), this, SLOT(updateActionsLater())); connect(widget, SIGNAL(pageChanged(int)), this, SLOT(updateActionsLater())); connect(widget, SIGNAL(pointerPosition(const Position&,const PageInfo&)), this, SLOT(pointerPosition(const Position&,const PageInfo&))); connect(widget, SIGNAL(pointerEnter(const Position&,miniexp_t)), this, SLOT(pointerEnter(const Position&,miniexp_t))); connect(widget, SIGNAL(pointerLeave(const Position&,miniexp_t)), this, SLOT(pointerLeave(const Position&,miniexp_t))); connect(widget, SIGNAL(pointerClick(const Position&,miniexp_t)), this, SLOT(pointerClick(const Position&,miniexp_t))); connect(widget, SIGNAL(pointerSelect(const QPoint&,const QRect&)), this, SLOT(pointerSelect(const QPoint&,const QRect&))); // Create splash screen splash = new QLabel(central); splash->setFrameShadow(QFrame::Sunken); splash->setAlignment(Qt::AlignHCenter|Qt::AlignVCenter); splash->setPixmap(QPixmap(":/images/splash.png")); QPalette palette = splash->palette(); palette.setColor(QPalette::Background, Qt::white); splash->setPalette(palette); splash->setAutoFillBackground(true); // Create central layout layout = new QStackedLayout(central); layout->addWidget(widget); layout->addWidget(splash); layout->setCurrentWidget(splash); setCentralWidget(central); // Create context menu contextMenu = new QMenu(this); recentMenu = 0; // Create menubar menuBar = new QMenuBar(this); setMenuBar(menuBar); // Create statusbar statusBar = new QStatusBar(this); QFont font = QApplication::font(); font.setPointSize((font.pointSize() * 3 + 3) / 4); QFontMetrics metric(font); textLabelTimer = new QTimer(this); textLabelTimer->setSingleShot(true); connect(textLabelTimer,SIGNAL(timeout()),this,SLOT(updateTextLabel())); textLabel = new QLabel(statusBar); textLabel->setFont(font); textLabel->setAutoFillBackground(true); textLabel->setAlignment(Qt::AlignHCenter|Qt::AlignVCenter); textLabel->setFrameStyle(QFrame::Panel); textLabel->setFrameShadow(QFrame::Sunken); textLabel->setMinimumWidth(metric.width("M")*48); statusBar->addWidget(textLabel, 1); pageLabel = new QLabel(statusBar); pageLabel->setFont(font); pageLabel->setTextFormat(Qt::PlainText); pageLabel->setAlignment(Qt::AlignHCenter|Qt::AlignVCenter); pageLabel->setFrameStyle(QFrame::Panel); pageLabel->setFrameShadow(QFrame::Sunken); pageLabel->setMinimumWidth(metric.width(" P88/888 8888x8888 888dpi ")); statusBar->addPermanentWidget(pageLabel); mouseLabel = new QLabel(statusBar); mouseLabel->setFont(font); mouseLabel->setTextFormat(Qt::PlainText); mouseLabel->setAlignment(Qt::AlignHCenter|Qt::AlignVCenter); mouseLabel->setFrameStyle(QFrame::Panel); mouseLabel->setFrameShadow(QFrame::Sunken); mouseLabel->setMinimumWidth(metric.width(" x=888 y=888 ")); statusBar->addPermanentWidget(mouseLabel); setStatusBar(statusBar); // Create toolbar toolBar = new QToolBar(this); toolBar->setObjectName("toolbar"); toolBar->setAllowedAreas(Qt::TopToolBarArea|Qt::BottomToolBarArea); addToolBar(toolBar); // Create mode combo box modeCombo = new QComboBox(toolBar); fillModeCombo(modeCombo); connect(modeCombo, SIGNAL(activated(int)), this, SLOT(modeComboActivated(int)) ); connect(modeCombo, SIGNAL(activated(int)), this, SLOT(updateActionsLater()) ); // Create zoom combo box zoomCombo = new QComboBox(toolBar); zoomCombo->setEditable(true); zoomCombo->setInsertPolicy(QComboBox::NoInsert); fillZoomCombo(zoomCombo); connect(zoomCombo, SIGNAL(activated(int)), this, SLOT(zoomComboActivated(int)) ); connect(zoomCombo->lineEdit(), SIGNAL(editingFinished()), this, SLOT(zoomComboEdited()) ); // Create page combo box pageCombo = new QComboBox(toolBar); pageCombo->setEditable(true); pageCombo->setInsertPolicy(QComboBox::NoInsert); pageCombo->setSizeAdjustPolicy(QComboBox::AdjustToContents); pageCombo->setMinimumWidth(90); connect(pageCombo, SIGNAL(activated(int)), this, SLOT(pageComboActivated(int))); connect(pageCombo->lineEdit(), SIGNAL(editingFinished()), this, SLOT(pageComboEdited()) ); // Create sidebar thumbnailWidget = new QDjViewThumbnails(this); thumbnailDock = new QDockWidget(this); thumbnailDock->setObjectName("thumbnailDock"); thumbnailDock->setWindowTitle(tr("Thumbnails")); thumbnailDock->setWidget(thumbnailWidget); thumbnailDock->installEventFilter(this); addDockWidget(Qt::LeftDockWidgetArea, thumbnailDock); outlineWidget = new QDjViewOutline(this); outlineDock = new QDockWidget(this); outlineDock->setObjectName("outlineDock"); outlineDock->setWindowTitle(tr("Outline")); outlineDock->setWidget(outlineWidget); outlineDock->installEventFilter(this); addDockWidget(Qt::LeftDockWidgetArea, outlineDock); findWidget = new QDjViewFind(this); findDock = new QDockWidget(this); findDock->setObjectName("findDock"); findDock->setWindowTitle(tr("Find")); findDock->setWidget(findWidget); findDock->installEventFilter(this); addDockWidget(Qt::LeftDockWidgetArea, findDock); // Create escape shortcut for sidebar shortcutEscape = new QShortcut(QKeySequence("Esc"), this); connect(shortcutEscape, SIGNAL(activated()), this, SLOT(performEscape())); // Create escape shortcut for activating page dialog shortcutGoPage = new QShortcut(QKeySequence("Ctrl+G"), this); connect(shortcutGoPage, SIGNAL(activated()), this, SLOT(performGoPage())); // Create undoTimer. undoTimer = new QTimer(this); undoTimer->setSingleShot(true); connect(undoTimer,SIGNAL(timeout()), this, SLOT(saveUndoData())); // Actions createActions(); createMenus(); createWhatsThis(); enableContextMenu(true); // Preferences connect(prefs, SIGNAL(updated()), this, SLOT(preferencesChanged())); applyPreferences(); updateActions(); // Remembered geometry (before the window is shown) if (viewerMode == STANDALONE) if (! (prefs->windowSize.isNull())) resize(prefs->windowSize); // Options set so far have default priority widget->reduceOptionsToPriority(QDjVuWidget::PRIORITY_DEFAULT); } void QDjView::closeDocument() { // remember recent document QDjVuDocument *doc = document; if (doc && viewerMode == STANDALONE) { if (documentPages.size() > 0) addRecent(getDecoratedUrl()); } // clear undo data here.clear(); undoList.clear(); redoList.clear(); // kill one-shot timers undoTimer->stop(); textLabelTimer->stop(); // close document layout->setCurrentWidget(splash); if (doc) { doc->ref(); disconnect(doc, 0, this, 0); disconnect(doc, 0, errorDialog, 0); printingAllowed = true; savingAllowed = true; } widget->setDocument(0); documentPages.clear(); documentFileName.clear(); hasNumericalPageTitle = true; documentUrl.clear(); documentModified = QDateTime(); document = 0; if (doc) { emit documentClosed(doc); doc->deref(); } } /*! Open a document represented by a \a QDjVuDocument object. */ void QDjView::open(QDjVuDocument *doc, QUrl url) { closeDocument(); document = doc; if (url.isValid()) documentUrl = url; connect(doc,SIGNAL(destroyed(void)), this, SLOT(closeDocument(void))); connect(doc,SIGNAL(docinfo(void)), this, SLOT(docinfo(void))); widget->setDocument(document); disconnect(document, 0, errorDialog, 0); layout->setCurrentWidget(widget); updateActions(); docinfo(); if (doc) emit documentOpened(doc); // process url options if (url.isValid()) parseDjVuCgiArguments(url); widget->reduceOptionsToPriority(QDjVuWidget::PRIORITY_CGI); // set focus widget->setFocus(); // set title setWindowTitle(QString("%1[*] - ").arg(getShortFileName()) + tr("DjView")); #if QT_VERSION > 0x40400 setWindowFilePath(url.toLocalFile()); #endif } /*! Open the djvu document stored in file \a filename. */ bool QDjView::open(QString filename) { closeDocument(); QDjVuDocument *doc = new QDjVuDocument(true); connect(doc, SIGNAL(error(QString,QString,int)), errorDialog, SLOT(error(QString,QString,int))); doc->setFileName(&djvuContext, filename); if (!doc->isValid()) { delete doc; addToErrorDialog(tr("Cannot open file '%1'.").arg(filename)); raiseErrorDialog(QMessageBox::Critical, tr("Opening DjVu file")); return false; } QFileInfo fileinfo(filename); QUrl url = QUrl::fromLocalFile(fileinfo.absoluteFilePath()); open(doc, url); documentFileName = filename; documentModified = QFileInfo(filename).lastModified(); restoreRecentDocument(url); return true; } /*! Open the djvu document available at url \a url. Only the \a http: and \a file: protocols are supported. */ bool QDjView::open(QUrl url) { closeDocument(); QDjVuNetDocument *doc = new QDjVuNetDocument(true); connect(doc, SIGNAL(error(QString,QString,int)), errorDialog, SLOT(error(QString,QString,int))); connect(doc, SIGNAL(authRequired(QString,QString&,QString&)), this, SLOT(authRequired(QString,QString&,QString&)) ); connect(doc, SIGNAL(sslWhiteList(QString,bool&)), this, SLOT(sslWhiteList(QString,bool&)) ); QUrl docurl = removeDjVuCgiArguments(url); doc->setUrl(&djvuContext, docurl); if (!doc->isValid()) { delete doc; addToErrorDialog(tr("Cannot open URL '%1'.").arg(url.toString())); raiseErrorDialog(QMessageBox::Critical, tr("Opening DjVu document")); return false; } open(doc, url); return true; } void QDjView::sslWhiteList(QString why, bool &okay) { QString ewhy = Qt::escape(why); if (QMessageBox::question(this, tr("Certificate validation error - DjView", "dialog caption"), tr(" %1 Do you want to continue anyway? ").arg(ewhy), QMessageBox::Ok | QMessageBox::Cancel) == QMessageBox::Ok) okay = true; else closeDocument(); } void QDjView::authRequired(QString why, QString &user, QString &pass) { QDjViewAuthDialog *dialog = new QDjViewAuthDialog(this); dialog->setInfo(why); dialog->setUser(user); dialog->setPass(pass); int result = dialog->exec(); user = dialog->user(); pass = dialog->pass(); if (result != QDialog::Accepted) closeDocument(); } /*! Reload the document afresh. */ void QDjView::reloadDocument() { QDjVuDocument *doc = document; QUrl url = getDecoratedUrl(); if (doc && viewerMode==STANDALONE && url.isValid()) { closeDocument(); ddjvu_cache_clear(djvuContext); // Opening files more efficiently QFileInfo file = url.toLocalFile(); if (file.exists()) { open(file.absoluteFilePath()); parseDjVuCgiArguments(url); return; } // Opening the url could do it all in fact. open(url); } } void QDjView::maybeReloadDocument() { QDjVuDocument *doc = document; if (doc && !documentModified.isNull() && !documentFileName.isNull()) { QFileInfo info(documentFileName); if (info.exists() && info.lastModified() > documentModified) QTimer::singleShot(0, this, SLOT(reloadDocument())); } } /*! Jump to the page numbered \a pageno. */ void QDjView::goToPage(int pageno) { int pagenum = documentPages.size(); if (!pagenum || !document) { pendingPage = QString("$%1").arg(pageno+1); } else { if (pageno>=0 && pagenosetPage(pageno); } else { QString msg = tr("Cannot find page numbered: %1").arg(pageno+1); qWarning("%s",(const char*)msg.toLocal8Bit()); } updateActionsLater(); } } /*! Jump to the page named \a name. Names starting with the "#" character are interpreted using the same rules as hyperlinks. In particular, names of the form \a "#+n" and \a "#-n" express relative displacement from the current page or the page specified by argument \a from. */ void QDjView::goToPage(QString name, int from) { int pagenum = documentPages.size(); if (!pagenum || !document) { pendingPage = name; } else { int pageno = pageNumber(name, from); if (pageno >= 0 && pageno < pagenum) { widget->setPage(pageno); } else { QString msg = tr("Cannot find page named: %1").arg(name); qWarning("%s",(const char*)msg.toLocal8Bit()); } updateActionsLater(); } } /* Jump to the page named \a pagename and tries to position the specified point in the center of the window. Arguments \a px and \a py must be in range 0 to 1 indicating a fraction of the page width or height. */ void QDjView::goToPosition(QString name, double px, double py) { int pagenum = documentPages.size(); if (!pagenum || !document) { pendingPosition.clear(); pendingPosition << px << py; if (! name.isEmpty()) pendingPage = name; } else { int pageno = (name.isEmpty()) ? widget->page() : pageNumber(name); if (pageno < 0 || pageno >= pagenum) { QString msg = tr("Cannot find page named: %1").arg(name); qWarning("%s",(const char*)msg.toLocal8Bit()); } else { QDjVuWidget::Position pos; pos.pageNo = pageno; pos.inPage = false; pos.posView = QPoint(0,0); pos.posPage = QPoint(0,0); pos.hAnchor = qBound(0, (int)(px*100), 100); pos.vAnchor = qBound(0, (int)(py*100), 100); widget->setPosition(pos, widget->rect().center()); } updateActionsLater(); } } /*! Add a message to the error dialog. */ void QDjView::addToErrorDialog(QString message) { errorDialog->error(message, __FILE__, __LINE__); } /*! Show the error dialog. */ void QDjView::raiseErrorDialog(QMessageBox::Icon icon, QString caption) { errorDialog->prepare(icon, caption); errorDialog->show(); errorDialog->raise(); errorDialog->activateWindow(); } /*! Show the error dialog and wait until the user clicks "OK". */ int QDjView::execErrorDialog(QMessageBox::Icon icon, QString caption) { errorDialog->prepare(icon, caption); return errorDialog->exec(); } /*! Set the content of the page box in the status bar. */ void QDjView::setPageLabelText(QString s) { QLabel *m = pageLabel; m->setText(s); m->setMinimumWidth(qMax(m->minimumWidth(), m->sizeHint().width())); } /*! Set the content of the mouse box in the status bar. */ void QDjView::setMouseLabelText(QString s) { QLabel *m = mouseLabel; m->setText(s); m->setMinimumWidth(qMax(m->minimumWidth(), m->sizeHint().width())); } /*! Display transient message in the status bar. This also emits signal \a pluginStatusMessage to mirror the message in the browser status bar. */ void QDjView::statusMessage(QString message) { if (message.isEmpty()) statusBar->clearMessage(); else statusBar->showMessage(message); emit pluginStatusMessage(message); } /*! Returns a bitmask of the visible sidebar tabs. */ int QDjView::visibleSideBarTabs() { int tabs = 0; if (! thumbnailDock->isHidden()) tabs |= 1; if (! outlineDock->isHidden()) tabs |= 2; if (! findDock->isHidden()) tabs |= 4; return tabs; } /*! Returns a bitmask of the hidden sidebar tabs. */ int QDjView::hiddenSideBarTabs() { int tabs = 0; if (thumbnailDock->isHidden()) tabs |= 1; if (outlineDock->isHidden()) tabs |= 2; if (findDock->isHidden()) tabs |= 4; return tabs; } /*! Change the position and the visibility of the sidebars specified by bitmask \a tabs. */ bool QDjView::showSideBar(Qt::DockWidgetAreas areas, int tabs) { QList allDocks; allDocks << thumbnailDock << outlineDock << findDock; // find first tab in desired area QDockWidget *first = 0; foreach(QDockWidget *w, allDocks) if (!first && !w->isHidden() && !w->isFloating()) if (dockWidgetArea(w) & areas) first = w; // find relevant docks QList docks; if (tabs & 1) docks << thumbnailDock; if (tabs & 2) docks << outlineDock; if (tabs & 4) docks << findDock; // hide all foreach(QDockWidget *w, docks) w->hide(); if (areas) { Qt::DockWidgetArea area = Qt::LeftDockWidgetArea; if (areas & Qt::LeftDockWidgetArea) area = Qt::LeftDockWidgetArea; else if (areas & Qt::RightDockWidgetArea) area = Qt::RightDockWidgetArea; else if (areas & Qt::TopDockWidgetArea) area = Qt::TopDockWidgetArea; else if (areas & Qt::BottomDockWidgetArea) area = Qt::BottomDockWidgetArea; foreach(QDockWidget *w, docks) { w->show(); if (w->isFloating()) w->setFloating(false); if (! (areas & dockWidgetArea(w))) { removeDockWidget(w); addDockWidget(area, w); if (first) tabifyDockWidget(first, w); else first = w; } w->show(); w->raise(); } } // Okay return true; } /*! Change the position and composition of the sidebar. String \a args contains comma separated keywords: \a left, \a right, \a top, \a bottom, \a yes, or \a no, \a outline, \a bookmarks, \a thumbnails, \a search, etc. Error messages are added to string list \a errors. */ bool QDjView::showSideBar(QString args, QStringList &errors) { bool yes = true; bool ret = true; int tabs = 0; Qt::DockWidgetAreas areas = 0; QString arg; foreach(arg, args.split(",", QString::SkipEmptyParts)) { arg = arg.toLower(); if (arg == "no" || arg == "false") yes = false; else if (arg == "left") areas |= Qt::LeftDockWidgetArea; else if (arg == "right") areas |= Qt::RightDockWidgetArea; else if (arg == "top") areas |= Qt::TopDockWidgetArea; else if (arg == "bottom") areas |= Qt::BottomDockWidgetArea; else if (arg == "thumbnails" || arg == "thumbnail") tabs |= 1; else if (arg == "outline" || arg == "bookmarks") tabs |= 2; else if (arg == "search" || arg == "find") tabs |= 4; else if (arg != "yes" && arg != "true") { errors << tr("Unrecognized sidebar options '%1'.").arg(arg); ret = false; } } if (!tabs) tabs = ~0; if (yes && !areas) areas = Qt::AllDockWidgetAreas; if (showSideBar(areas, tabs)) return ret; return false; } /*! Overloaded version of \a showSideBar for convenience. This version makes great efforts to show docks with the exact layout they had before being hidden. */ bool QDjView::showSideBar(bool show) { if (! show) { // save everything about dock geometry savedDockState = saveState(); } else if (savedDockState.size() > 0) { // hack toolbar name to avoid restoring its state QString savedToolBarName = toolBar->objectName(); toolBar->setObjectName(QString::null); restoreState(savedDockState); toolBar->setObjectName(savedToolBarName); savedDockState.clear(); } // set visibility thumbnailDock->setVisible(show); outlineDock->setVisible(show); findDock->setVisible(show); return true; } /*! Pops up find sidebar */ void QDjView::showFind() { if (! actionViewSideBar->isChecked()) actionViewSideBar->activate(QAction::Trigger); findDock->show(); findDock->raise(); findWidget->selectAll(); findWidget->takeFocus(Qt::ShortcutFocusReason); } bool QDjView::warnAboutPrintingRestrictions() { if (prefs->restrictOverride && !printingAllowed) if (QMessageBox::warning(this, tr("Print - DjView", "dialog caption"), tr(" This file was served with " "printing restrictions. " "Do you want to print it anyway?"), QMessageBox::Yes | QMessageBox::Cancel, QMessageBox::Cancel) != QMessageBox::Yes ) return false; return true; } bool QDjView::warnAboutSavingRestrictions() { if (prefs->restrictOverride && !savingAllowed) if (QMessageBox::warning(this, tr("Save - DjView", "dialog caption"), tr(" This file was served with " "saving restrictions. " "Do you want to save it anyway?"), QMessageBox::Yes | QMessageBox::Cancel, QMessageBox::Cancel) != QMessageBox::Yes ) return false; return true; } /*! Pops up a print dialog */ void QDjView::print() { QDjViewPrintDialog *pd = printDialog; if (! pd) { printDialog = pd = new QDjViewPrintDialog(this); pd->setAttribute(Qt::WA_DeleteOnClose); pd->setWindowTitle(tr("Print - DjView", "dialog caption")); } if (warnAboutPrintingRestrictions()) { pd->show(); pd->raise(); } } /*! Pops up a save dialog */ void QDjView::saveAs() { QDjViewSaveDialog *sd = saveDialog; if (! sd) { saveDialog = sd = new QDjViewSaveDialog(this); sd->setAttribute(Qt::WA_DeleteOnClose); sd->setWindowTitle(tr("Save - DjView", "dialog caption")); } if (warnAboutSavingRestrictions()) { sd->show(); sd->raise(); } } /*! Pops up export dialog */ void QDjView::exportAs() { QDjViewExportDialog *sd = exportDialog; if (! sd) { exportDialog = sd = new QDjViewExportDialog(this); sd->setAttribute(Qt::WA_DeleteOnClose); sd->setWindowTitle(tr("Export - DjView", "dialog caption")); } if (warnAboutSavingRestrictions()) { sd->show(); sd->raise(); } } /*! Start searching string \a find. String might be terminated with a slash followed by letters "w" (words only), "W" (not words only), "c" (case sensitive), or "C" (case insentitive). */ void QDjView::find(QString find) { if (! find.isEmpty()) { QRegExp options("/[wWcCrR]*$"); if (find.contains(options)) { for (int i=find.lastIndexOf("/"); isetCaseSensitive(true); else if (c == 'C') findWidget->setCaseSensitive(false); else if (c == 'w') findWidget->setWordOnly(true); else if (c == 'W') findWidget->setWordOnly(false); else if (c == 'r') findWidget->setRegExpMode(true); else if (c == 'R') findWidget->setRegExpMode(false); } find = find.remove(options); } findWidget->setText(find); } findWidget->findNext(); } // ----------------------------------- // UTILITIES /*! \fn QDjView::getDjVuWidget() Return the \a QDjVuWidget object managed by this window. */ /*! \fn QDjView::getErrorDialog() Return the error dialog for this window. */ /*! \fn QDjView::getDocument() Return the currently displayed \a QDjVuDocument. */ /*! \fn QDjView::getDocumentFileName() Return the filename of the currently displayed \a QDjVuDocument. */ /*! \fn QDjView::getDocumentUrl() Return the url of the currently displayed \a QDjVuDocument. */ /*! \fn QDjView::getViewerMode Return the current viewer mode. */ /*! Return an url that encodes the current view and page. */ QUrl QDjView::getDecoratedUrl() { QUrl url = removeDjVuCgiArguments(documentUrl); QPoint center = widget->rect().center(); QDjVuWidget::Position pos = widget->positionWithClosestAnchor(center); int pageNo = pos.pageNo; if (url.isValid() && pageNo>=0 && pageNo &dp = documentPages; QString pagestr = QString("%1").arg(pageNo+1); if (hasNumericalPageTitle && pageNorotation(); if (rotation) url.addQueryItem("rotate", QString::number(90 * rotation)); int zoom = widget->zoomFactor(); url.addQueryItem("zoom", QString::number(zoom)); double ha = pos.hAnchor / 100.0; double va = pos.vAnchor / 100.0; url.addQueryItem("showposition", QString("%1,%2").arg(ha).arg(va)); } return url; } /*! Return the base name of the current file. */ QString QDjView::getShortFileName() { if (! documentFileName.isEmpty()) return QFileInfo(documentFileName).fileName(); else if (! documentUrl.isEmpty()) return documentUrl.path().section('/', -1); return QString(); } /*! Return true if full screen mode is active */ bool QDjView::getFullScreen() { if (viewerMode == STANDALONE) return actionViewFullScreen->isChecked(); return false; } /*! Return the number of pages in the document. This function returns zero when called before fully decoding the document header. */ int QDjView::pageNum(void) { return documentPages.size(); } /*! Return a name for page \a pageno. */ QString QDjView::pageName(int pageno, bool titleonly) { // obtain page title if (pageno>=0 && pagenopage(); if (from < pagenum && name.contains(QRegExp("^[-+$]\\d+$")) ) { int num = name.mid(1).toInt(); if (name[0]=='+') num = from + 1 + num; else if (name[0]=='-') num = from + 1 - num; return qBound(1, num, pagenum) - 1; } // Then search a matching page title starting // from the current page and wrapping around for (int i=from; iwidget; other->setAttribute(Qt::WA_DeleteOnClose); // copy window geometry if (! (windowState() & unusualWindowStates)) { other->resize( size() ); other->toolBar->setVisible(!toolBar->isHidden()); other->statusBar->setVisible(!statusBar->isHidden()); other->restoreState(saveState()); } // copy essential properties otherWidget->setDisplayMode( widget->displayMode() ); otherWidget->setContinuous( widget->continuous() ); otherWidget->setSideBySide( widget->sideBySide() ); otherWidget->setCoverPage( widget->coverPage() ); otherWidget->setRotation( widget->rotation() ); otherWidget->setZoom( widget->zoom() ); // copy document if (document && openDocument) { other->open(document); other->documentFileName = documentFileName; other->documentUrl = documentUrl; // copy position bool saved = otherWidget->animationEnabled(); otherWidget->enableAnimation(false); otherWidget->setPosition( widget->position() ); otherWidget->enableAnimation(saved); } return other; } /*! Save \a text info the specified file. When argument \a filename is omitted, a file dialog is presented to the user. */ bool QDjView::saveTextFile(QString text, QString filename) { // obtain filename if (filename.isEmpty()) { QString filters; filters += tr("Text files", "save filter")+" (*.txt);;"; filters += tr("All files", "save filter") + " (*)"; QString caption = tr("Save Text - DjView", "dialog caption"); filename = QFileDialog::getSaveFileName(this, caption, "", filters); if (filename.isEmpty()) return false; } // open file errno = 0; QFile file(filename); if (! file.open(QIODevice::WriteOnly|QIODevice::Truncate)) { QString message = file.errorString(); #if HAVE_STRERROR if (file.error() == QFile::OpenError && errno > 0) message = strerror(errno); #endif QMessageBox::critical(this, tr("Error - DjView", "dialog caption"), tr("Cannot write file '%1'.\n%2.") .arg(QFileInfo(filename).fileName()) .arg(message) ); file.remove(); return false; } // save text in current locale encoding QTextStream(&file) << text; return true; } /*! Save \a image info the specified file using a format derived from the filename suffix. When argument \a filename is omitted, a file dialog is presented to the user. */ bool QDjView::saveImageFile(QImage image, QString filename) { // obtain filename with suitable suffix if (filename.isEmpty()) { QString filters; QList formats = QImageWriter::supportedImageFormats(); foreach(QByteArray format, formats) filters += tr("%1 files (*.%2);;", "save image filter") .arg(QString(format).toUpper()) .arg(QString(format).toLower()); filters += tr("All files", "save filter") + " (*)"; QString caption = tr("Save Image - DjView", "dialog caption"); filename = QFileInfo(getShortFileName()).baseName(); if (formats.size()) filename += "." + QString(formats[0]); filename = QFileDialog::getSaveFileName(this, caption, filename, filters); if (filename.isEmpty()) return false; } // suffix QString suffix = QFileInfo(filename).suffix(); if (suffix.isEmpty()) { QMessageBox::critical(this, tr("Error - DjView", "dialog caption"), tr("Cannot determine file format.\n" "Filename '%1' has no suffix.") .arg(QFileInfo(filename).fileName()) ); return false; } // write errno = 0; QFile file(filename); QImageWriter writer(&file, suffix.toLatin1()); if (! writer.write(image)) { QString message = file.errorString(); if (writer.error() == QImageWriter::UnsupportedFormatError) message = tr("Image format %1 not supported.").arg(suffix.toUpper()); #if HAVE_STRERROR else if (file.error() == QFile::OpenError && errno > 0) message = strerror(errno); #endif QMessageBox::critical(this, tr("Error - DjView", "dialog caption"), tr("Cannot write file '%1'.\n%2.") .arg(QFileInfo(filename).fileName()) .arg(message) ); file.remove(); return false; } return true; } /*! Start the preferred browser on \a url. */ bool QDjView::startBrowser(QUrl url) { // Determine browsers to try QStringList browsers; #ifdef Q_WS_MAC browsers << "open"; #endif #ifdef Q_OS_WIN32 # if QT_VERSION < 0x40200 browsers << "firefox.exe"; browsers << "iexplore.exe"; # endif #endif #ifdef Q_OS_UNIX browsers << "x-www-browser" << "firefox" << "konqueror"; const char *varBrowser = ::getenv("BROWSER"); if (varBrowser && varBrowser[0]) browsers = QFile::decodeName(varBrowser).split(":") + browsers; browsers << "sensible-browser"; const char *varPath = ::getenv("PATH"); QStringList path; if (varPath && varPath[0]) path = QFile::decodeName(varPath).split(":"); path << "."; #endif if (! prefs->browserProgram.isEmpty()) browsers.prepend(prefs->browserProgram); // Try them QStringList args(url.toEncoded()); foreach (QString browser, browsers) { #ifdef Q_OS_UNIX int i; for (i=0; i= path.size()) continue; #endif if (QProcess::startDetached(browser, args)) return true; } // fallback #if QT_VERSION >= 0x40200 return QDesktopServices::openUrl(url); #else return false; #endif } /*! \fn QDjView::documentClosed(QDjVuDocument *doc) This signal is emitted when clearing the current document. Argument \a doc is the previous document. */ /*! \fn QDjView::documentOpened(QDjVuDocument *doc) This signal is emitted when opening a new document \a doc. */ /*! \fn QDjView::documentReady(QDjVuDocument *doc) This signal is emitted when the document structure for the current document \a doc is known. */ /*! \fn QDjView::pluginStatusMessage(QString message = QString()) This signal is emitted when a message is displayed in the status bar. This is useful for plugins because the message must be replicated in the browser status bar. */ /*! \fn QDjView::pluginGetUrl(QUrl url, QString target) This signal is emitted when the user clicks an external hyperlink while the viewer is in plugin mode. */ // ----------------------------------- // OVERRIDES void QDjView::closeEvent(QCloseEvent *event) { // Close document. closeDocument(); // Save options. // after closing the document in order to // avoid saving document defined settings. updateSaved(getSavedPrefs()); prefs->thumbnailSize = thumbnailWidget->size(); prefs->thumbnailSmart = thumbnailWidget->smart(); prefs->searchWordsOnly = findWidget->wordOnly(); prefs->searchCaseSensitive = findWidget->caseSensitive(); prefs->searchRegExpMode = findWidget->regExpMode(); prefs->save(); // continue closing the window event->accept(); } void QDjView::dragEnterEvent(QDragEnterEvent *event) { if (viewerMode == STANDALONE) { const QMimeData *data = event->mimeData(); if (data->hasUrls() && data->urls().size()==1) event->accept(); } } void QDjView::dragMoveEvent(QDragMoveEvent *event) { #ifdef Q_OS_WIN QMainWindow::dragMoveEvent(event); #else QRect rect = centralWidget()->geometry(); if (event->answerRect().intersects(rect)) event->accept(rect); else event->ignore(); #endif } void QDjView::dropEvent(QDropEvent *event) { if (viewerMode == STANDALONE) { const QMimeData *data = event->mimeData(); if (data->hasUrls() && data->urls().size()==1) if (open(data->urls()[0])) { event->setDropAction(Qt::CopyAction); event->accept(); } } } bool QDjView::eventFilter(QObject *watched, QEvent *event) { switch(event->type()) { case QEvent::Show: case QEvent::Hide: if (qobject_cast(watched)) updateActionsLater(); break; case QEvent::Leave: if ((watched == widget->viewport()) || (qobject_cast(watched)) ) { mouseLabel->clear(); textLabel->clear(); statusMessage(); return false; } break; case QEvent::Enter: if ((watched == widget->viewport()) || (qobject_cast(watched)) ) maybeReloadDocument(); break; case QEvent::StatusTip: if (qobject_cast(watched)) return QApplication::sendEvent(this, event); break; default: break; } return false; } // ----------------------------------- // PROTECTED SIGNALS void QDjView::info(QString message) { if (! message.contains(QRegExp("^\\[\\d+"))) statusBar->showMessage(message, 2000); qWarning("INFO: %s", (const char*)message.toLocal8Bit()); } void QDjView::error(QString message, QString filename, int lineno) { // just for calling qWarning filename = filename.section("/", -1); if (filename.isEmpty()) qWarning("ERROR: %s", (const char*)message.toLocal8Bit()); else qWarning("ERROR (%s:%d): %s", (const char*)filename.toLocal8Bit(), lineno, (const char*)message.toLocal8Bit() ); } void QDjView::errorCondition(int pageno) { QString message; if (pageno >= 0) message = tr("Cannot decode page %1.").arg(pageno+1); else message = tr("Cannot decode document."); addToErrorDialog(message); raiseErrorDialog(QMessageBox::Warning, tr("Decoding DjVu document")); } void QDjView::docinfo() { if (document && documentPages.size()==0 && ddjvu_document_decoding_status(*document)==DDJVU_JOB_OK) { // Obtain information about pages. int n = ddjvu_document_get_pagenum(*document); int m = ddjvu_document_get_filenum(*document); for (int i=0; i0) { bool saved = widget->animationEnabled(); widget->enableAnimation(false); performPending(); widget->enableAnimation(saved); updateActionsLater(); emit documentReady(document); } } /*! Set options that could not be set before fully decoding the document header. For instance, calling \a QDjView::goToPage before decoding the djvu document header simply stores the page number in a well known variable. Function \a performPending peforms the page change as soon as the document information is available. */ void QDjView::performPending() { if (! documentPages.isEmpty()) { if (! pendingPosition.isEmpty()) { if (pendingPosition.size() == 2) goToPosition(pendingPage, pendingPosition[0], pendingPosition[1]); pendingPosition.clear(); pendingPage.clear(); } if (! pendingPage.isNull()) { goToPage(pendingPage); pendingPage.clear(); } if (pendingHilite.size() > 0) { StringPair pair; foreach(pair, pendingHilite) { int x, y, w, h; QColor color = Qt::blue; int pageno = widget->page(); if (! pair.first.isEmpty()) pageno = pageNumber(pair.first); if (pageno >= 0 && pageno < pageNum() && parse_highlight(pair.second, x, y, w, h, color) && w > 0 && h > 0 ) { color.setAlpha(96); widget->addHighlight(pageno, x, y, w, h, color); } } pendingHilite.clear(); } if (pendingFind.size() > 0) { find(pendingFind); pendingFind.clear(); } } performPendingScheduled = false; } /*! Schedule a call to \a QDjView::performPending(). */ void QDjView::performPendingLater() { if (! performPendingScheduled) { performPendingScheduled = true; QTimer::singleShot(0, this, SLOT(performPending())); } } void QDjView::pointerPosition(const Position &pos, const PageInfo &info) { // setup page label QString p = ""; QString m = ""; if (pos.pageNo >= 0) { p = tr(" P%1/%2 %3x%4 %5dpi ") .arg(pos.pageNo+1).arg(documentPages.size()) .arg(info.width).arg(info.height).arg(info.dpi); } if (pos.inPage || !info.segment.isEmpty()) { if (info.segment.isEmpty()) m = tr(" x=%1 y=%2 ") .arg(pos.posPage.x()) .arg(pos.posPage.y()); else m = tr(" %3x%4+%1+%2 ") .arg(info.segment.left()) .arg(info.segment.top()) .arg(info.segment.width()) .arg(info.segment.height()); } setPageLabelText(p); setMouseLabelText(m); if (textLabel->isVisible()) { textLabelRect = info.selected; textLabelTimer->start(25); } } void QDjView::updateTextLabel() { textLabel->clear(); textLabel->setWordWrap(false); textLabel->setTextFormat(Qt::PlainText); if (document && textLabel->isVisible()) { QString text; QFontMetrics m(textLabel->font()); QString lb = QString::fromUtf8(" \302\253 "); QString rb = QString::fromUtf8(" \302\273 "); int w = textLabel->width() - m.width(lb+rb); if (! textLabelRect.isEmpty()) { text = widget->getTextForRect(textLabelRect); text = text.replace(QRegExp("\\s+"), " "); text = m.elidedText(text, Qt::ElideMiddle, w); } else { QString results[3]; if (widget->getTextForPointer(results)) { if (results[0].size() || results[2].size()) results[1] = "[" + results[1] + "]"; int r1 = m.width(results[1]); int r2 = m.width(results[2]); int r0 = qMax(0, qMax( (w-r1)/2, (w-r1-r2) )); text = m.elidedText(results[0], Qt::ElideLeft, r0) + results[1]; text = m.elidedText(text+results[2], Qt::ElideRight, w); } } text = text.trimmed(); if (text.size()) textLabel->setText(lb + text + rb); } } void QDjView::pointerEnter(const Position&, miniexp_t) { // Display information message about hyperlink QString link = widget->linkUrl(); if (link.isEmpty()) return; QString target = widget->linkTarget(); if (target=="_self" || target=="_page") target.clear(); QString message; if (link.startsWith("#") && link.contains(QRegExp("^#[-+]\\d+$")) ) { int n = link.mid(2).toInt(); if (link[1]=='+') message = (n==1) ? tr("Go: 1 page forward.") : tr("Go: %n pages forward.", 0, n); else message = (n==1) ? tr("Go: 1 page backward.") : tr("Go: %n pages backward.", 0, n); } else if (link.startsWith("#$")) message = tr("Go: page %1.").arg(link.mid(2)); else if (link.startsWith("#")) message = tr("Go: page %1.").arg(link.mid(1)); else message = tr("Go: %1").arg(link); if (!target.isEmpty()) message = message + tr(" (in other window.)"); statusMessage(message); } void QDjView::pointerLeave(const Position&, miniexp_t) { statusMessage(); } void QDjView::pointerClick(const Position &pos, miniexp_t) { goToLink(widget->linkUrl(), widget->linkTarget(), pos.pageNo); } void QDjView::goToLink(QString link, QString target, int fromPage) { bool inPlace = target.isEmpty() || target=="_self" || target=="_page"; QUrl url = documentUrl; // Internal link if (link.startsWith("#")) { QString name = link.mid(1); if (inPlace) { goToPage(name, fromPage); return; } if (viewerMode == STANDALONE) { QDjView *other = copyWindow(); other->goToPage(name, fromPage); other->show(); return; } // Construct url url = removeDjVuCgiArguments(url); url.addQueryItem("djvuopts", ""); int pageno = pageNumber(name, fromPage); if (pageno>=0 && pageno<=documentPages.size()) url.addQueryItem("page", QString::fromUtf8(documentPages[pageno].id)); } else if (link.startsWith("?")) { if (inPlace) { foreach(QString opt, link.mid(1).split("&")) parseArgument(opt); return; } if (viewerMode == STANDALONE) { QDjView *other = copyWindow(); foreach(QString opt, link.mid(1).split("&")) other->parseArgument(opt); other->show(); return; } // Construct url QUrl linkUrl; linkUrl.setEncodedUrl("file://d/d" + link.toUtf8()); url = removeDjVuCgiArguments(url); url.addQueryItem("djvuopts", ""); QPair pair; foreach(pair, linkUrl.queryItems()) url.addQueryItem(pair.first, pair.second); } else { // Decode url QUrl linkUrl; linkUrl.setEncodedUrl(link.toUtf8()); // Resolve url QList > empty; url.setQueryItems(empty); url = url.resolved(linkUrl); url.setQueryItems(linkUrl.queryItems()); } // Check url if (! url.isValid() || url.isRelative()) { QString msg = tr("Cannot resolve link '%1'").arg(link); qWarning("%s", (const char*)msg.toLocal8Bit()); return; } // Signal browser if (viewerMode != STANDALONE) { emit pluginGetUrl(url, target); return; } // Standalone can open djvu documents QFileInfo file = url.toLocalFile(); QString suffix = file.suffix().toLower(); if (file.exists() && (suffix=="djvu" || suffix=="djv")) { if (inPlace) open(url); else { QDjView *other = copyWindow(); other->open(url); other->show(); } return; } // Open a browser if (! startBrowser(url)) { QString msg = tr("Cannot spawn a browser for url '%1'").arg(link); qWarning("%s",(const char*)msg.toLocal8Bit()); } } void QDjView::pointerSelect(const QPoint &pointerPos, const QRect &rect) { // Collect text QString text=widget->getTextForRect(rect); int l = text.size(); int w = rect.width(); int h = rect.height(); QString s = tr("%n characters", 0, l); #ifdef Q_WS_X11 QApplication::clipboard()->setText(text, QClipboard::Selection); #endif // Prepare menu QMenu *menu = new QMenu(this); QAction *copyText = menu->addAction(tr("Copy text (%1)").arg(s)); QAction *saveText = menu->addAction(tr("Save text as...")); copyText->setEnabled(l>0); saveText->setEnabled(l>0); copyText->setStatusTip(tr("Copy text into the clipboard.")); saveText->setStatusTip(tr("Save text into a file.")); menu->addSeparator(); QString copyImageString = tr("Copy image (%1x%2 pixels)").arg(w).arg(h); QAction *copyImage = menu->addAction(copyImageString); QAction *saveImage = menu->addAction(tr("Save image as...")); copyImage->setStatusTip(tr("Copy image into the clipboard.")); saveImage->setStatusTip(tr("Save image into a file.")); menu->addSeparator(); QAction *zoom = menu->addAction(tr("Zoom to rectangle")); zoom->setStatusTip(tr("Zoom the selection to fit the window.")); QAction *copyUrl = 0; QAction *copyMaparea = 0; if (prefs->advancedFeatures) { menu->addSeparator(); copyUrl = menu->addAction(tr("Copy URL")); copyUrl->setStatusTip(tr("Save into the clipboard an URL that " "highlights the selection.")); copyMaparea = menu->addAction(tr("Copy Maparea")); copyMaparea->setStatusTip(tr("Save into the clipboard a maparea " "annotation expression for program " "djvused.")); } // Make sure that status tips work (hack) menu->installEventFilter(this); // Execute menu QAction *action = menu->exec(pointerPos-QPoint(5,5), copyText); if (action == zoom) widget->zoomRect(rect); else if (action == copyText) QApplication::clipboard()->setText(text); else if (action == saveText) saveTextFile(text); else if (action == copyImage) QApplication::clipboard()->setImage(widget->getImageForRect(rect)); else if (action == saveImage) saveImageFile(widget->getImageForRect(rect)); else if (action && action == copyMaparea) { Position pos = widget->position(pointerPos); QRect seg = widget->getSegmentForRect(rect, pos.pageNo); if (! rect.isEmpty()) { QString s = QString("(maparea \"url\"\n" " \"comment\"\n" " (rect %1 %2 %3 %4))") .arg(seg.left()).arg(seg.top()) .arg(seg.width()).arg(seg.height()); QApplication::clipboard()->setText(s); } } else if (action && action == copyUrl) { QUrl url = getDecoratedUrl(); Position pos = widget->position(pointerPos); QRect seg = widget->getSegmentForRect(rect, pos.pageNo); if (url.isValid() && pos.pageNo>=0 && pos.pageNo &dp = documentPages; if (! url.hasQueryItem("page")) if (pos.pageNo>=0 && pos.pageNosetText(url.toString()); } } // Cancel select mode. updateActionsLater(); if (actionSelect->isChecked()) { actionSelect->setChecked(false); performSelect(false); } } /*! Schedule a call to \a QDjView::updateActions(). */ void QDjView::updateActionsLater() { if (! updateActionsScheduled) { updateActionsScheduled = true; QTimer::singleShot(0, this, SLOT(updateActions())); } } void QDjView::modeComboActivated(int index) { int mode = modeCombo->itemData(index).toInt(); widget->setDisplayMode((QDjVuWidget::DisplayMode)mode); widget->setFocus(); } void QDjView::zoomComboActivated(int index) { int zoom = zoomCombo->itemData(index).toInt(); widget->setZoom(zoom); updateActionsLater(); widget->setFocus(); } void QDjView::zoomComboEdited(void) { bool okay; QString text = zoomCombo->lineEdit()->text(); int zoom = text.replace(QRegExp("\\s*%?$"),"").trimmed().toInt(&okay); if (okay && zoom>0) widget->setZoom(zoom); updateActionsLater(); if (okay) widget->setFocus(); } void QDjView::pageComboActivated(int index) { goToPage(pageCombo->itemData(index).toInt()); updateActionsLater(); widget->setFocus(); } void QDjView::pageComboEdited(void) { QString data = pageCombo->lineEdit()->text().trimmed(); int pagenum = documentPages.size(); QRegExp pattern = QRegExp(QString("\\s*(\\d+)\\s*/\\s*%1\\s*").arg(pagenum)); if (pattern.exactMatch(data)) goToPage(qMax(0, pattern.cap(1).toInt() - 1)); else goToPage(data); updateActionsLater(); widget->setFocus(); } // ----------------------------------- // SIGNALS IMPLEMENTING ACTIONS void QDjView::performAbout(void) { #if DDJVUAPI_VERSION >= 20 QString vstr = QString("(%1)

").arg(ddjvu_get_version_string()); #else QString vstr = ""; #endif QString html = tr("" "

DjVuLibre DjView %1

%2" "

" "Viewer for DjVu documents
" "%3
" "Copyright \251 2006-- L\351on Bottou." "

" "

" "This program is free software. " "You can redistribute or modify it under the terms of the " "GNU General Public License as published " "by the Free Software Foundation. " "This program is distributed without any warranty. " "See the GNU General Public License for more details." "

" "") .arg(QDjViewPrefs::versionString()) .arg(vstr) .arg("http://djvu.sourceforge.net"); QMessageBox::about(this, tr("About DjView"), html); } void QDjView::performNew(void) { if (viewerMode != STANDALONE) return; QDjView *other = copyWindow(false); other->show(); } void QDjView::performOpen(void) { if (viewerMode != STANDALONE) return; QString filters; filters += tr("DjVu files") + " (*.djvu *.djv);;"; filters += tr("All files") + " (*)"; QString caption = tr("Open - DjView", "dialog caption"); QString dirname = QDir::currentPath(); QDir dir = QFileInfo(documentFileName).absoluteDir(); if (dir.exists() && !documentFileName.isEmpty()) dirname = dir.absolutePath(); QString fname; fname = QFileDialog::getOpenFileName(this, caption, dirname, filters); if (! fname.isEmpty()) open(fname); } void QDjView::performOpenLocation(void) { if (viewerMode != STANDALONE) return; QString caption = tr("Open Location - DjView", "dialog caption"); QString label = tr("Enter the URL of a DjVu document:"); QString text = "http://"; bool ok; QUrl url = QInputDialog::getText(this, caption, label, QLineEdit::Normal, text, &ok); if (ok && url.isValid()) open(url); } void QDjView::performInformation(void) { if (! documentPages.size()) return; if (! infoDialog) infoDialog = new QDjViewInfoDialog(this); infoDialog->setWindowTitle(tr("Information - DjView", "dialog caption")); infoDialog->setPage(widget->page()); infoDialog->refresh(); infoDialog->raise(); infoDialog->show(); } void QDjView::performMetadata(void) { if (! documentPages.size()) return; if (! metaDialog) metaDialog = new QDjViewMetaDialog(this); metaDialog->setWindowTitle(tr("Metadata - DjView", "dialog caption")); metaDialog->setPage(widget->page()); metaDialog->refresh(); metaDialog->raise(); metaDialog->show(); } void QDjView::performPreferences(void) { QDjViewPrefsDialog *dialog = QDjViewPrefsDialog::instance(); updateSaved(getSavedPrefs()); dialog->load(this); dialog->show(); dialog->raise(); } void QDjView::performRotation(void) { QAction *action = qobject_cast(sender()); int rotation = action->data().toInt(); widget->setRotation(rotation); } void QDjView::performZoom(void) { QAction *action = qobject_cast(sender()); int zoom = action->data().toInt(); widget->setZoom(zoom); } void QDjView::performSelect(bool checked) { if (checked) widget->setModifiersForSelect(Qt::NoModifier); else widget->setModifiersForSelect(prefs->modifiersForSelect); } void QDjView::performViewFullScreen(bool checked) { if (viewerMode != STANDALONE) return; if (checked) { fsSavedNormal.remember = true; updateSaved(&fsSavedNormal); updateSaved(&prefs->forStandalone); Qt::WindowStates wstate = windowState(); fsWindowState = wstate; wstate &= ~unusualWindowStates; wstate |= Qt::WindowFullScreen; setUnifiedTitleAndToolBarOnMac(false); setWindowState(wstate); applySaved(&fsSavedFullScreen); // Make sure full screen action remains accessible (F11) if (! actions().contains(actionViewFullScreen)) addAction(actionViewFullScreen); } else { fsSavedFullScreen.remember = true; updateSaved(&fsSavedFullScreen); updateSaved(&prefs->forFullScreen); Qt::WindowStates wstate = windowState(); wstate &= ~unusualWindowStates; wstate |= fsWindowState & unusualWindowStates; wstate &= ~Qt::WindowFullScreen; setWindowState(wstate); applySaved(&fsSavedNormal); // Demote full screen action if (actions().contains(actionViewFullScreen)) removeAction(actionViewFullScreen); } } void QDjView::performEscape() { if (actionViewSideBar->isChecked()) actionViewSideBar->activate(QAction::Trigger); else if (actionViewFullScreen->isChecked()) actionViewFullScreen->activate(QAction::Trigger); } void QDjView::performGoPage() { if (pageCombo && pageCombo->lineEdit()) { QLineEdit *le = pageCombo->lineEdit(); toolBar->show(); le->setFocus(); updateActionsLater(); QTimer::singleShot(0, le, SLOT(selectAll())); } } void QDjView::restoreRecentDocument(QUrl url) { url.setPassword(QString::null); QUrl cleanUrl = removeDjVuCgiArguments(url); QString prefix = cleanUrl.toString(QUrl::RemoveQuery); foreach (QString recent, prefs->recentFiles) if (recent.startsWith(prefix)) { QUrl recentUrl = recent; QUrl cleanRecentUrl = removeDjVuCgiArguments(recentUrl); if (cleanUrl == cleanRecentUrl) { parseDjVuCgiArguments(recentUrl); return; } } } void QDjView::addRecent(QUrl url) { // never remember passwords url.setPassword(QString::null); // remove matching entries QUrl cleanUrl = removeDjVuCgiArguments(url); QString prefix = cleanUrl.toString(QUrl::RemoveQuery); QStringList::iterator it = prefs->recentFiles.begin(); while (it != prefs->recentFiles.end()) { if (it->startsWith(prefix) && cleanUrl == removeDjVuCgiArguments(QUrl(*it))) it = prefs->recentFiles.erase(it); else ++it; } // add new url (max 50) QString name = url.toString(); prefs->recentFiles.prepend(name); while(prefs->recentFiles.size() > 50) prefs->recentFiles.pop_back(); } void QDjView::fillRecent() { if (recentMenu) { recentMenu->clear(); int n = qMin(prefs->recentFiles.size(), 8); for (int i=0; irecentFiles[i]; QString base = url.path().section("/",-1); QString name = url.toLocalFile(); if (name.isEmpty()) name = removeDjVuCgiArguments(url).toString(); QFontMetrics metrics = QFont(); name = metrics.elidedText(name, Qt::ElideMiddle, 400); name = QString("%1 [%2]").arg(base).arg(name); QAction *action = recentMenu->addAction(name); action->setData(url); connect(action,SIGNAL(triggered()), this, SLOT(openRecent())); } recentMenu->addSeparator(); } QAction *action = recentMenu->addAction(tr("&Clear History")); connect(action, SIGNAL(triggered()), this, SLOT(clearRecent())); } void QDjView::openRecent() { QAction *action = qobject_cast(sender()); if (action && viewerMode == STANDALONE) { QUrl url = action->data().toUrl(); QFileInfo file = url.toLocalFile(); if (file.exists()) open(file.absoluteFilePath()); else open(url); } } void QDjView::clearRecent() { prefs->recentFiles.clear(); prefs->save(); } QDjView::UndoRedo::UndoRedo() : valid(false) { } void QDjView::UndoRedo::clear() { valid = false; } void QDjView::UndoRedo::set(QDjView *djview) { QDjVuWidget *djvu = djview->getDjVuWidget(); rotation = djvu->rotation(); zoom = djvu->zoom(); hotSpot = djvu->hotSpot(); position = djvu->position(hotSpot); valid = true; } void QDjView::UndoRedo::apply(QDjView *djview) { if (valid) { QDjVuWidget *djvu = djview->getDjVuWidget(); djvu->setZoom(zoom); djvu->setRotation(rotation); djvu->setPosition(position, hotSpot); } } bool QDjView::UndoRedo::changed(const QDjVuWidget *djvu) const { if (valid) { if (zoom != djvu->zoom() || rotation != djvu->rotation()) return true; Position curpos = djvu->position(hotSpot); if (curpos.pageNo != position.pageNo || curpos.inPage != position.inPage) return true; if (curpos.inPage) return (curpos.posPage != position.posPage); else return (curpos.posView != position.posView); } return false; } void QDjView::saveUndoData() { if (QApplication::mouseButtons() == Qt::NoButton && widget->pageSizeKnown(widget->page()) ) { if (here.changed(widget)) { undoList.prepend(here); while (undoList.size() > 1024) undoList.removeLast(); redoList.clear(); } here.set(this); actionBack->setEnabled(undoList.size() > 0); actionForw->setEnabled(redoList.size() > 0); } else { undoTimer->stop(); undoTimer->start(250); } } void QDjView::performUndo() { if (undoList.size() > 0) { UndoRedo target = undoList.takeFirst(); UndoRedo saved; saved.set(this); target.apply(this); here.clear(); redoList.prepend(saved); } } void QDjView::performRedo() { if (redoList.size() > 0) { UndoRedo target = redoList.takeFirst(); UndoRedo saved; saved.set(this); target.apply(this); here.clear(); undoList.prepend(saved); } } void QDjView::performCopyUrl() { QUrl url = getDecoratedUrl(); if (url.isValid()) QApplication::clipboard()->setText(url.toString()); } #if DDJVUAPI_VERSION < 21 static QByteArray *qstring_puts_data = 0; static int qstring_puts(const char *s) { if (qstring_puts_data) (*qstring_puts_data) += s; return strlen(s); } static QString miniexp_to_string(miniexp_t expr, int width=40, bool octal=false) { QByteArray buffer; qstring_puts_data = &buffer; int (*saved_puts)(const char*) = minilisp_puts; int saved_print_7bits = minilisp_print_7bits; minilisp_puts = qstring_puts; minilisp_print_7bits = (octal) ? 1 : 0; miniexp_pprint(expr, width); minilisp_print_7bits = saved_print_7bits; minilisp_puts = saved_puts; return QString::fromUtf8(buffer.data()); } #else static int qstring_puts(miniexp_io_t *io, const char *s) { QByteArray *bap = (QByteArray*)io->data[1]; if (bap) *bap += s; return strlen(s); } static QString miniexp_to_string(miniexp_t expr, int width=40, bool octal=false) { static int one = 1; QByteArray buffer; miniexp_io_t io; miniexp_io_init(&io); io.fputs = qstring_puts; io.data[1] = (void*)&buffer; io.p_print7bits = (octal ? &one : 0); miniexp_pprint_r(&io, expr, width); return QString::fromUtf8(buffer.data()); } #endif void QDjView::performCopyOutline() { if (document) { QString s; minivar_t expr = document->getDocumentOutline(); if (miniexp_consp(expr)) s += QString("# This is the existing outline.\n"); else { s += QString("# This is an outline template with all pages.\n"); expr = miniexp_cons(miniexp_symbol("bookmarks"),miniexp_nil); for (int i=0; isetText(s); } } void QDjView::performCopyAnnotation() { int pageNo = widget->page(); if (document && pageNo>=0 && pageNogetPageAnnotations(pageNo); if (expr == miniexp_nil || expr == miniexp_dummy) s += QString("# There were no annotations for page %1.\n"); else s += QString("# These are the annotation for page %1.\n"); s += QString("# Edit this file and store it with command:\n" "# $ djvused foo.djvu -f thisfile -s\n" "# Tip: select an area in djview4 and use 'copy maparea'.\n" "# The following line is the djvused command to set\n" "# the annotation and the rest are the annotations\n" "select %2; set-ant\n\n"); s = s.arg(pageNo+1).arg(pageNo+1); while (miniexp_consp(expr)) { s += miniexp_to_string(miniexp_car(expr)); expr = miniexp_cdr(expr); } // copy to clipboard QApplication::clipboard()->setText(s); } } /* ------------------------------------------------------------- Local Variables: c++-font-lock-extra-types: ( "\\sw+_t" "[A-Z]\\sw*[a-z]\\sw*" ) End: ------------------------------------------------------------- */ djview4/src/qdjview.h000066400000000000000000000275351174072760700150720ustar00rootroot00000000000000//C- -*- C++ -*- //C- ------------------------------------------------------------------- //C- DjView4 //C- Copyright (c) 2006- Leon Bottou //C- //C- This software is subject to, and may be distributed under, the //C- GNU General Public License, either version 2 of the license, //C- or (at your option) any later version. The license should have //C- accompanied the software or you may obtain a copy of the license //C- from the Free Software Foundation at http://www.fsf.org . //C- //C- This program is distributed in the hope that it will be useful, //C- but WITHOUT ANY WARRANTY; without even the implied warranty of //C- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //C- GNU General Public License for more details. //C- ------------------------------------------------------------------ #ifndef QDJVIEW_H #define QDJVIEW_H #if AUTOCONF # include "config.h" #endif #include #include #include #include #include #include #include #include #include #include #include #include #include "qdjvu.h" #include "qdjvuwidget.h" #include "qdjviewprefs.h" #include "qdjviewdialogs.h" class QAction; class QActionGroup; class QBoxLayout; class QCloseEvent; class QComboBox; class QDockWidget; class QDjViewOutline; class QDjViewThumbnails; class QDjViewFind; class QDragEnterEvent; class QDragMoveEvent; class QDropEvent; class QFileDialog; class QFileSystemWatcher; class QLabel; class QMenu; class QMenuBar; class QShortcut; class QSettings; class QStackedLayout; class QStatusBar; class QStringList; class QTimer; class QTabWidget; class QToolBar; #if DDJVUAPI_VERSION < 18 # error "DDJVUAPI_VERSION>=18 is required !" #endif #if QT_VERSION < 0x40200 # error "QT_VERSION>=0x40200 is required !" #endif class QDjView : public QMainWindow { Q_OBJECT public: enum ViewerMode { EMBEDDED_PLUGIN = 0, FULLPAGE_PLUGIN = 1, STANDALONE = 2 }; QDjView(QDjVuContext &context, ViewerMode mode=STANDALONE, QWidget *parent=0); ~QDjView(); QDjVuContext &getDjVuContext() { return djvuContext; } QDjVuWidget *getDjVuWidget() { return widget; } QDjViewErrorDialog *getErrorDialog() { return errorDialog; } QDjVuDocument *getDocument() { return document; } QString getDocumentFileName() { return documentFileName; } QUrl getDocumentUrl() { return documentUrl; } QUrl getDecoratedUrl(); ViewerMode getViewerMode() { return viewerMode; } QString getShortFileName(); bool getFullScreen(); QString getArgument(QString key); QStringList parseArgument(QString key, QString val); QStringList parseArgument(QString keyEqualVal); void parseDjVuCgiArguments(QUrl url); static QUrl removeDjVuCgiArguments(QUrl url); int pageNum(void); QString pageName(int pageno, bool titleonly=false); int pageNumber(QString name, int from = -1); QDjView *copyWindow(bool openDocument=true); int visibleSideBarTabs(); int hiddenSideBarTabs(); bool saveTextFile(QString text, QString filename=QString()); bool saveImageFile(QImage image, QString filename=QString()); bool startBrowser(QUrl url); void fillZoomCombo(QComboBox *zoomCombo); void fillModeCombo(QComboBox *modeCombo); void fillPageCombo(QComboBox *pageCombo); public slots: bool open(QString filename); bool open(QUrl url); void open(QDjVuDocument *document, QUrl url = QUrl()); void closeDocument(); void reloadDocument(); void goToPage(int pageno); void goToPage(QString name, int from=-1); void goToPosition(QString pagename, double px, double py); void goToLink(QString link, QString target=QString(), int from=-1); void addToErrorDialog(QString message); void raiseErrorDialog(QMessageBox::Icon icon, QString caption=QString()); int execErrorDialog (QMessageBox::Icon icon, QString caption=QString()); void setPageLabelText(QString s = QString()); void setMouseLabelText(QString s = QString()); void statusMessage(QString s = QString()); bool showSideBar(Qt::DockWidgetAreas areas, int tabs); bool showSideBar(QString args, QStringList &errors); bool showSideBar(bool); void showFind(void); void print(void); void saveAs(void); void exportAs(void); void find(QString find = QString()); void saveSession(QSettings *s); void restoreSession(QSettings *s); signals: void documentClosed(QDjVuDocument *doc); void documentOpened(QDjVuDocument *doc); void documentReady(QDjVuDocument *doc); void pluginStatusMessage(QString message = QString()); void pluginGetUrl(QUrl url, QString target); void pluginOnChange(); protected: typedef QDjVuWidget::Position Position; typedef QDjVuWidget::PageInfo PageInfo; typedef QDjViewPrefs::Options Options; typedef QDjViewPrefs::Tools Tools; typedef QDjViewPrefs::Saved Saved; void fillToolBar(QToolBar *toolBar); QAction *makeAction(QString text); QAction *makeAction(QString text, bool value); void createActions(void); void createMenus(void); void createWhatsThis(void); Saved *getSavedPrefs(void); void enableContextMenu(bool); void enableScrollBars(bool); void applyOptions(bool remember=true); void updateOptions(void); void applySaved(Saved *saved); void updateSaved(Saved *saved); void applyPreferences(void); void parseToolBarOption(QString option, QStringList &errors); bool warnAboutPrintingRestrictions(); bool warnAboutSavingRestrictions(); void restoreRecentDocument(QUrl); virtual bool eventFilter(QObject *watched, QEvent *event); virtual void closeEvent(QCloseEvent *event); virtual void dragEnterEvent(QDragEnterEvent *event); virtual void dragMoveEvent(QDragMoveEvent *event); virtual void dropEvent(QDropEvent *event); protected slots: void info(QString); void error(QString, QString, int); void errorCondition(int); void docinfo(); void docinfoExtra(); void performPending(); void performPendingLater(); void pointerPosition(const Position &pos, const PageInfo &page); void pointerEnter(const Position &pos, miniexp_t maparea); void pointerLeave(const Position &pos, miniexp_t maparea); void pointerClick(const Position &pos, miniexp_t maparea); void pointerSelect(const QPoint &pointerPos, const QRect &rect); void updateActions(void); void updateActionsLater(void); void updateTextLabel(void); void modeComboActivated(int); void zoomComboActivated(int); void zoomComboEdited(void); void pageComboActivated(int); void pageComboEdited(void); void preferencesChanged(void); void performAbout(void); void performNew(void); void performOpen(void); void performOpenLocation(void); void performInformation(void); void performMetadata(void); void performPreferences(void); void performRotation(void); void performZoom(void); void performSelect(bool); void performViewFullScreen(bool); void performEscape(); void performGoPage(); void addRecent(QUrl); void fillRecent(); void openRecent(); void clearRecent(); void performUndo(); void performRedo(); void saveUndoData(); void performCopyUrl(); void performCopyOutline(); void performCopyAnnotation(); void maybeReloadDocument(); void sslWhiteList(QString why, bool &okay); void authRequired(QString why, QString &user, QString &pass); protected: // mode const ViewerMode viewerMode; // preferences QDjViewPrefs *prefs; Options options; Tools tools; Tools toolsCached; // dialogs QPointer errorDialog; QPointer infoDialog; QPointer metaDialog; QPointer saveDialog; QPointer exportDialog; QPointer printDialog; // widgets QLabel *splash; QDjVuWidget *widget; QStackedLayout *layout; QMenu *contextMenu; QMenu *recentMenu; QMenuBar *menuBar; QStatusBar *statusBar; QLabel *pageLabel; QLabel *mouseLabel; QLabel *textLabel; QToolBar *toolBar; QComboBox *modeCombo; QComboBox *zoomCombo; QComboBox *pageCombo; QDjViewOutline *outlineWidget; QDockWidget *outlineDock; QDjViewThumbnails *thumbnailWidget; QDockWidget *thumbnailDock; QDjViewFind *findWidget; QDockWidget *findDock; // document data QDjVuContext &djvuContext; QDjVuDocument *document; QString documentFileName; QUrl documentUrl; QList documentPages; QDateTime documentModified; bool hasNumericalPageTitle; // delayed settings typedef QPair StringPair; QString pendingPage; QList pendingPosition; QList pendingHilite; QString pendingFind; // delayed updates bool updateActionsScheduled; bool performPendingScheduled; QTimer *textLabelTimer; QRect textLabelRect; // action lists QActionGroup *zoomActionGroup; QActionGroup *modeActionGroup; QActionGroup *rotationActionGroup; // all actions QAction *actionNew; QAction *actionOpen; QAction *actionOpenLocation; QAction *actionClose; QAction *actionQuit; QAction *actionSave; QAction *actionExport; QAction *actionPrint; QAction *actionFind; QAction *actionFindNext; QAction *actionFindPrev; QAction *actionSelect; QAction *actionZoomIn; QAction *actionZoomOut; QAction *actionZoomFitWidth; QAction *actionZoomFitPage; QAction *actionZoomOneToOne; QAction *actionZoom300; QAction *actionZoom200; QAction *actionZoom150; QAction *actionZoom100; QAction *actionZoom75; QAction *actionZoom50; QAction *actionNavFirst; QAction *actionNavNext; QAction *actionNavPrev; QAction *actionNavLast; QAction *actionBack; QAction *actionForw; QAction *actionRotateLeft; QAction *actionRotateRight; QAction *actionRotate0; QAction *actionRotate90; QAction *actionRotate180; QAction *actionRotate270; QAction *actionInformation; QAction *actionMetadata; QAction *actionAbout; QAction *actionWhatsThis; QAction *actionDisplayColor; QAction *actionDisplayBW; QAction *actionDisplayForeground; QAction *actionDisplayBackground; QAction *actionDisplayHiddenText; QAction *actionInvertLuminance; QAction *actionPreferences; QAction *actionViewToolBar; QAction *actionViewSideBar; QAction *actionViewStatusBar; QAction *actionViewFullScreen; QAction *actionLayoutContinuous; QAction *actionLayoutSideBySide; QAction *actionLayoutCoverPage; QAction *actionLayoutRightToLeft; QShortcut *shortcutEscape; QShortcut *shortcutGoPage; QAction *actionCopyUrl; QAction *actionCopyOutline; QAction *actionCopyAnnotation; // permission bool printingAllowed; bool savingAllowed; // fullscreen stuff Saved fsSavedNormal; Saved fsSavedFullScreen; Qt::WindowStates fsWindowState; QByteArray savedDockState; // undo/redo class UndoRedo { public: UndoRedo(); void clear(); void set(QDjView *djview); void apply(QDjView *djview); bool changed(const QDjVuWidget *widget) const; protected: bool valid; QPoint hotSpot; QDjVuWidget::Position position; int rotation; int zoom; }; UndoRedo here; QTimer *undoTimer; QList undoList; QList redoList; }; #endif /* ------------------------------------------------------------- Local Variables: c++-font-lock-extra-types: ( "\\sw+_t" "[A-Z]\\sw*[a-z]\\sw*" ) End: ------------------------------------------------------------- */ djview4/src/qdjview.qrc000066400000000000000000000025641174072760700154230ustar00rootroot00000000000000 images/splash.png images/djview.png images/icon_back.png images/icon_close.png images/icon_continuous.png images/icon_djvu.png images/icon_down.png images/icon_empty.png images/icon_erase.png images/icon_export.png images/icon_find.png images/icon_first.png images/icon_forw.png images/icon_fullscreen.png images/icon_last.png images/icon_new.png images/icon_next.png images/icon_open.png images/icon_prefs.png images/icon_prev.png images/icon_print.png images/icon_quit.png images/icon_rotateleft.png images/icon_rotateright.png images/icon_save.png images/icon_select.png images/icon_sidebar.png images/icon_sidebyside.png images/icon_up.png images/icon_web.png images/icon_zoomin.png images/icon_zoomout.png images/text_pushpin.png djview4/src/qdjviewauthdialog.ui000066400000000000000000000057171174072760700173200ustar00rootroot00000000000000 QDjViewAuthDialog 0 0 318 157 Dialog Qt::Vertical 20 3 300 0 Password: QLineEdit::Password User: Qt::Vertical 20 3 Qt::Horizontal QDialogButtonBox::Cancel|QDialogButtonBox::Ok buttonBox accepted() QDjViewAuthDialog accept() 248 254 157 274 buttonBox rejected() QDjViewAuthDialog reject() 316 260 286 274 djview4/src/qdjviewdialogs.cpp000066400000000000000000001536541174072760700167720ustar00rootroot00000000000000//C- -*- C++ -*- //C- ------------------------------------------------------------------- //C- DjView4 //C- Copyright (c) 2006- Leon Bottou //C- //C- This software is subject to, and may be distributed under, the //C- GNU General Public License, either version 2 of the license, //C- or (at your option) any later version. The license should have //C- accompanied the software or you may obtain a copy of the license //C- from the Free Software Foundation at http://www.fsf.org . //C- //C- This program is distributed in the hope that it will be useful, //C- but WITHOUT ANY WARRANTY; without even the implied warranty of //C- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //C- GNU General Public License for more details. //C- ------------------------------------------------------------------ #if AUTOCONF # include "config.h" #else # define HAVE_STRING_H 1 # define HAVE_SYS_TYPES_H 1 # define HAVE_STRERROR 1 # ifndef WIN32 # define HAVE_UNISTD_H 1 # endif #endif #include #include #include #include #include #include #include #if HAVE_SYS_TYPES_H # include #endif #if HAVE_STRING_H # include #endif #if HAVE_UNISTD_H # include #endif #if HAVE_TIFF # include #endif #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "qdjview.h" #include "qdjviewprefs.h" #include "qdjviewdialogs.h" #include "qdjviewexporters.h" #include "qdjvuwidget.h" #include "qdjvu.h" // ======================================= // QDJVIEWERRORDIALOG // ======================================= #include "ui_qdjviewerrordialog.h" struct QDjViewErrorDialog::Private { Ui::QDjViewErrorDialog ui; QList messages; void compose(); }; QDjViewErrorDialog::~QDjViewErrorDialog() { delete d; } QDjViewErrorDialog::QDjViewErrorDialog(QWidget *parent) : QDialog(parent), d(new Private) { d->ui.setupUi(this); d->ui.textEdit->viewport()->setBackgroundRole(QPalette::Background); setWindowTitle(tr("DjView Error")); } void QDjViewErrorDialog::compose() { QString html; for (int i=0; imessages.size(); i++) html = "
  • " + d->messages[i] + "
  • " + html; d->ui.textEdit->setHtml("
      " + html + "
    "); QScrollBar *scrollBar = d->ui.textEdit->verticalScrollBar(); scrollBar->setValue(scrollBar->maximum()); } void QDjViewErrorDialog::error(QString msg, QString, int) { // Remove [1-nnnnn] prefix from djvulibre-3.5 if (msg.startsWith("[")) msg = msg.replace(QRegExp("^\\[\\d*-?\\d*\\]\\s*") , ""); msg = Qt::escape(msg); // Ignore empty and duplicate messages if (msg.isEmpty()) return; if (!d->messages.isEmpty() && msg == d->messages[0]) return; // Add message d->messages.prepend(msg); while (d->messages.size() >= 16) d->messages.removeLast(); compose(); } void QDjViewErrorDialog::prepare(QMessageBox::Icon icon, QString caption) { if (icon != QMessageBox::NoIcon) d->ui.iconLabel->setPixmap(QMessageBox::standardIcon(icon)); if (caption.isEmpty()) caption = tr("Error - DjView", "dialog caption"); setWindowTitle(caption); } void QDjViewErrorDialog::done(int result) { emit closing(); d->messages.clear(); QDialog::done(result); } // ======================================= // QDJVIEWAUTHDIALOG // ======================================= #include "ui_qdjviewauthdialog.h" struct QDjViewAuthDialog::Private { Ui_QDjViewAuthDialog ui; }; QDjViewAuthDialog::~QDjViewAuthDialog() { delete d; } QDjViewAuthDialog::QDjViewAuthDialog(QWidget *parent) : QDialog(parent), d(new Private) { d->ui.setupUi(this); setWindowTitle(tr("Authentication required - DjView")); } QString QDjViewAuthDialog::user() const { return d->ui.userLineEdit->text(); } QString QDjViewAuthDialog::pass() const { return d->ui.passLineEdit->text(); } void QDjViewAuthDialog::setInfo(QString why) { QString txt = QString("%1").arg(Qt::escape(why)); d->ui.whyLabel->setText(txt); } void QDjViewAuthDialog::setUser(QString user) { d->ui.userLineEdit->setText(user); } void QDjViewAuthDialog::setPass(QString pass) { d->ui.passLineEdit->setText(pass); } // ======================================= // QDJVIEWINFODIALOG // ======================================= #include "ui_qdjviewinfodialog.h" struct QDjViewInfoDialog::Private { Ui::QDjViewInfoDialog ui; QDjView *djview; QDjVuDocument *document; QList files; int fileno; int pageno; bool done; }; QDjViewInfoDialog::~QDjViewInfoDialog() { delete d; } QDjViewInfoDialog::QDjViewInfoDialog(QDjView *parent) : QDialog(parent), d(new Private) { d->djview = parent; d->document = 0; d->fileno = 0; d->pageno = -1; d->done = false; d->ui.setupUi(this); QDjViewPrefs *prefs = QDjViewPrefs::instance(); int index = prefs->infoDialogTab; if (index >= 0 && index < d->ui.tabWidget->count()) d->ui.tabWidget->setCurrentIndex(index); QFont font = d->ui.fileText->font(); font.setFixedPitch(true); font.setFamily("monospace"); font.setPointSize((font.pointSize() * 5 + 5) / 6); d->ui.fileText->setFont(font); d->ui.fileText->viewport()->setBackgroundRole(QPalette::Background); QStringList labels; d->ui.docTable->setColumnCount(6); labels << tr("File #") << tr("File Name") << tr("File Size") << tr("File Type") << tr("Page #") << tr("Page Title"); d->ui.docTable->setHorizontalHeaderLabels(labels); d->ui.docTable->verticalHeader()->hide(); d->ui.docTable->horizontalHeader()->setHighlightSections(false); d->ui.docTable->horizontalHeader()->setStretchLastSection(true); connect(d->djview, SIGNAL(documentClosed(QDjVuDocument*)), this, SLOT(clear())); connect(d->djview, SIGNAL(documentReady(QDjVuDocument*)), this, SLOT(refresh())); connect(d->djview->getDjVuWidget(), SIGNAL(pageChanged(int)), this, SLOT(setPage(int))); connect(d->ui.nextButton, SIGNAL(clicked()), this, SLOT(nextFile()) ); connect(d->ui.jumpButton, SIGNAL(clicked()), this, SLOT(jumpToSelectedPage()) ); connect(d->ui.fileCombo, SIGNAL(activated(int)), this, SLOT(setFile(int)) ); connect(d->ui.prevButton, SIGNAL(clicked()), this, SLOT(prevFile()) ); connect(d->ui.docTable, SIGNAL(currentCellChanged(int,int,int,int)), this, SLOT(setFile(int)) ); connect(d->ui.docTable, SIGNAL(itemDoubleClicked(QTableWidgetItem*)), this, SLOT(jumpToSelectedPage()) ); d->ui.fileCombo->setEnabled(false); d->ui.jumpButton->setEnabled(false); d->ui.prevButton->setEnabled(false); d->ui.nextButton->setEnabled(false); // what's this QWidget *wd = d->ui.tabDocument; wd->setWhatsThis(tr("Document information
    " "This panel shows information about the document and " "its component files. Select a component file " "to display detailled information in the File " "tab. Double click a component file to show " "the corresponding page in the main window. " "")); QWidget *wf = d->ui.tabFile; wf->setWhatsThis(tr("File and page information
    " "This panel shows the structure of the DjVu data " "corresponding to the component file or the page " "selected in the Document tab. " "The arrow buttons jump to the previous or next " "component file.")); } void QDjViewInfoDialog::refresh() { // document known if (! d->document) { QDjVuDocument *doc; doc = d->djview->getDjVuWidget()->document(); if (! doc) return; d->document = doc; connect(doc, SIGNAL(pageinfo()), this, SLOT(refresh()) ); } // document ready if (! d->files.size()) { QDjVuDocument *doc = d->document; if (ddjvu_document_decoding_status(*doc) != DDJVU_JOB_OK) return; int filenum = ddjvu_document_get_filenum(*doc); for (int i=0; ifiles << info; } fillFileCombo(); fillDocLabel(); fillDocTable(); if (d->pageno >= 0) setPage(d->pageno); else if (d->fileno >= 0) setFile(d->fileno); d->ui.fileCombo->setEnabled(true); d->done = false; } // file ready if (! d->done) { QDjVuDocument *doc = d->document; ddjvu_fileinfo_t &info = d->files[d->fileno]; d->done = true; // file dump QString dump = tr("Waiting for data..."); char *s = ddjvu_document_get_filedump(*doc, d->fileno); if (! s) d->done = false; else { dump = QString::fromUtf8(s); free(s); } d->ui.fileText->setPlainText(dump); d->ui.prevButton->setEnabled(d->fileno - 1 >= 0); d->ui.nextButton->setEnabled(d->fileno + 1 < d->files.size()); d->ui.jumpButton->setEnabled(info.type == 'P'); d->ui.fileCombo->setCurrentIndex(d->fileno); QTableWidget *table = d->ui.docTable; int rows = table->rowCount(); int cols = table->columnCount(); QTableWidgetSelectionRange all(0,0,rows-1,cols-1); table->setRangeSelected(all, false); table->selectRow(d->fileno); } } void QDjViewInfoDialog::setPage(int pageno) { if (d->document && d->files.size()) { int i; for (i=0; ifiles.size(); i++) if (d->files[i].pageno == pageno && d->files[i].type == 'P' ) break; if (i < d->files.size()) setFile(i); } else { d->fileno = -1; d->pageno = pageno; } } void QDjViewInfoDialog::setFile(int fileno) { if (d->document && d->files.size()) { if (fileno >= 0 && fileno < d->files.size() && fileno != d->fileno ) { d->fileno = fileno; d->pageno = d->files[fileno].pageno; d->done = false; refresh(); } } else { d->pageno = -1; d->fileno = fileno; } } void QDjViewInfoDialog::prevFile() { if (d->document && d->files.size()) if (d->fileno - 1 >= 0) setFile(d->fileno - 1); } void QDjViewInfoDialog::nextFile() { if (d->document && d->files.size()) if (d->fileno + 1 < d->files.size()) setFile(d->fileno + 1); } void QDjViewInfoDialog::jumpToSelectedPage() { if (d->document && d->files.size()) { ddjvu_fileinfo_t &info = d->files[d->fileno]; if (info.type == 'P') d->djview->goToPage(info.pageno); } } void QDjViewInfoDialog::clear() { hide(); if (d->document) disconnect(d->document, 0, this, 0); d->files.clear(); d->document = 0; QDjViewPrefs *prefs = QDjViewPrefs::instance(); prefs->infoDialogTab = d->ui.tabWidget->currentIndex(); } void QDjViewInfoDialog::fillFileCombo() { QComboBox *fileCombo = d->ui.fileCombo; fileCombo->clear(); for (int fileno=0; filenofiles.size(); fileno++) { ddjvu_fileinfo_t &info = d->files[fileno]; QString msg; if (info.type == 'P') { if (info.title && info.name && strcmp(info.title, info.name)) msg = tr("Page #%1 - \253 %2 \273") // << .. >> .arg(info.pageno + 1).arg(QString::fromUtf8(info.title)); else msg = tr("Page #%1").arg(info.pageno + 1); } else if (info.type == 'T') msg = tr("Thumbnails"); else if (info.type == 'S') msg = tr("Shared annotations"); else msg = tr("Shared data"); fileCombo->addItem(tr("File #%1 - ").arg(fileno+1) + msg); } } void QDjViewInfoDialog::fillDocLabel() { if (d->document && d->files.size()) { QStringList msg; QDjVuDocument *doc = d->document; ddjvu_document_type_t docType = ddjvu_document_get_type(*doc); if (docType == DDJVU_DOCTYPE_SINGLEPAGE) msg << tr("Single DjVu page"); else { if (docType == DDJVU_DOCTYPE_BUNDLED) msg << tr("Bundled DjVu document"); else if (docType == DDJVU_DOCTYPE_INDIRECT) msg << tr("Indirect DjVu document"); else if (docType == DDJVU_DOCTYPE_OLD_BUNDLED) msg << tr("Obsolete bundled DjVu document"); else if (docType == DDJVU_DOCTYPE_OLD_INDEXED) msg << tr("Obsolete indexed DjVu document"); int pagenum = ddjvu_document_get_pagenum(*doc); int filenum = ddjvu_document_get_filenum(*doc); msg << ((filenum==1) ? tr("1 file") : tr("%n files", 0, filenum)); msg << ((pagenum==1) ? tr("1 page") : tr("%n pages", 0, pagenum)); } d->ui.docLabel->setText(msg.join(" - ")); } } void QDjViewInfoDialog::fillDocTable() { int filenum = d->files.size(); QTableWidget *table = d->ui.docTable; table->setRowCount(filenum); table->setSortingEnabled(false); for (int i=0; iresizeColumnsToContents(); table->resizeRowsToContents(); table->horizontalHeader()->setStretchLastSection(true); } void QDjViewInfoDialog::fillDocRow(int i) { ddjvu_fileinfo_t &info = d->files[i]; QTableWidget *table = d->ui.docTable; QTableWidgetItem *numItem = new QTableWidgetItem(); numItem->setText(QString("%1 ").arg(i+1,5)); numItem->setTextAlignment(Qt::AlignRight|Qt::AlignVCenter); numItem->setFlags(Qt::ItemIsSelectable|Qt::ItemIsEnabled); table->setItem(i, 0, numItem); QTableWidgetItem *nameItem = new QTableWidgetItem(); QString name = (info.name) ? QString::fromUtf8(info.name) : tr("n/a"); nameItem->setText(QString(" %1 ").arg(name)); nameItem->setTextAlignment(Qt::AlignLeft|Qt::AlignVCenter); nameItem->setFlags(Qt::ItemIsSelectable|Qt::ItemIsEnabled); table->setItem(i, 1, nameItem); QTableWidgetItem *sizeItem = new QTableWidgetItem(); sizeItem->setText((info.size>0) ? QString(" %1 ").arg(info.size) : tr("n/a")); sizeItem->setTextAlignment(Qt::AlignRight|Qt::AlignVCenter); sizeItem->setFlags(Qt::ItemIsSelectable|Qt::ItemIsEnabled); table->setItem(i, 2, sizeItem); QTableWidgetItem *typeItem = new QTableWidgetItem(); if (info.type == 'P') typeItem->setText(tr(" Page ")); else if (info.type == 'T') typeItem->setText(tr(" Thumbnails ")); else typeItem->setText(tr(" Shared ")); typeItem->setTextAlignment(Qt::AlignLeft|Qt::AlignVCenter); typeItem->setFlags(Qt::ItemIsSelectable|Qt::ItemIsEnabled); table->setItem(i, 3, typeItem); QTableWidgetItem *pnumItem = new QTableWidgetItem(); if (info.type == 'P') pnumItem->setText(QString(" %1 ").arg(info.pageno+1)); pnumItem->setTextAlignment(Qt::AlignRight|Qt::AlignVCenter); pnumItem->setFlags(Qt::ItemIsSelectable|Qt::ItemIsEnabled); table->setItem(i, 4, pnumItem); QTableWidgetItem *titleItem = new QTableWidgetItem(); if (info.type == 'P') { QString title = d->djview->pageName(info.pageno, true); titleItem->setText(QString(" %1 ").arg(title)); } titleItem->setTextAlignment(Qt::AlignLeft|Qt::AlignVCenter); titleItem->setFlags(Qt::ItemIsSelectable|Qt::ItemIsEnabled); table->setItem(i, 5, titleItem); } // ======================================= // QDJVIEWMETADIALOG // ======================================= #include "ui_qdjviewmetadialog.h" struct QDjViewMetaDialog::Private { Ui::QDjViewMetaDialog ui; QDjView *djview; QDjVuDocument *document; int pageno; minivar_t docAnno; minivar_t pageAnno; }; QDjViewMetaDialog::~QDjViewMetaDialog() { delete d; } QDjViewMetaDialog::QDjViewMetaDialog(QDjView *parent) : QDialog(parent), d(new Private) { d->djview = parent; d->document = 0; d->pageno = 0; d->docAnno = miniexp_dummy; d->pageAnno = miniexp_dummy; d->ui.setupUi(this); // get preferences QDjViewPrefs *prefs = QDjViewPrefs::instance(); int index = prefs->metaDialogTab; if (index >= 0 && index < d->ui.tabWidget->count()) d->ui.tabWidget->setCurrentIndex(index); // make ctrl+c work new QShortcut(QKeySequence(tr("Ctrl+C","copy")), this, SLOT(copy())); // tweaks QStringList labels; labels << tr(" Key ") << tr(" Value "); d->ui.docTable->setColumnCount(2); d->ui.docTable->setHorizontalHeaderLabels(labels); d->ui.docTable->horizontalHeader()->setHighlightSections(false); d->ui.docTable->horizontalHeader()->setStretchLastSection(true); d->ui.docTable->verticalHeader()->setResizeMode(QHeaderView::ResizeToContents); d->ui.docTable->verticalHeader()->hide(); d->ui.pageTable->setColumnCount(2); d->ui.pageTable->setHorizontalHeaderLabels(labels); d->ui.pageTable->horizontalHeader()->setHighlightSections(false); d->ui.pageTable->horizontalHeader()->setStretchLastSection(true); d->ui.pageTable->verticalHeader()->setResizeMode(QHeaderView::ResizeToContents); d->ui.pageTable->verticalHeader()->hide(); d->ui.pageCombo->setEnabled(false); d->ui.jumpButton->setEnabled(false); d->ui.prevButton->setEnabled(false); d->ui.nextButton->setEnabled(false); // connections connect(d->djview, SIGNAL(documentClosed(QDjVuDocument*)), this, SLOT(clear()) ); connect(d->djview, SIGNAL(documentReady(QDjVuDocument*)), this, SLOT(refresh())); connect(d->djview->getDjVuWidget(), SIGNAL(pageChanged(int)), this, SLOT(setPage(int)) ); connect(d->ui.jumpButton, SIGNAL(clicked()), this, SLOT(jumpToSelectedPage()) ); connect(d->ui.pageCombo, SIGNAL(activated(int)), this, SLOT(setPage(int)) ); connect(d->ui.prevButton, SIGNAL(clicked()), this, SLOT(prevPage()) ); connect(d->ui.nextButton, SIGNAL(clicked()), this, SLOT(nextPage()) ); connect(d->ui.pageCombo, SIGNAL(activated(int)), this, SLOT(setPage(int)) ); // what's this QWidget *wd = d->ui.docTab; wd->setWhatsThis(tr("Document metadata
    " "This panel displays metadata pertaining " "to the document, such as author, title, " "references, etc. " "This information can be saved into the document " "with program djvused: use the commands " "create-shared-ant and set-meta." "")); QWidget *wp = d->ui.pageTab; wp->setWhatsThis(tr("Page metadata
    " "This panel displays metadata pertaining " "to a specific page. " "Page specific metadata override document metadata. " "This information can be saved into the document " "with program djvused: use command " "select to select the page and command " "set-meta to specify the metadata entries." "")); } static QMap metadataFromAnnotations(miniexp_t p) { QMap m; miniexp_t s_metadata = miniexp_symbol("metadata"); while (miniexp_consp(p)) { if (miniexp_caar(p) == s_metadata) { miniexp_t q = miniexp_cdar(p); while (miniexp_consp(q)) { miniexp_t a = miniexp_car(q); q = miniexp_cdr(q); if (miniexp_consp(a) && miniexp_symbolp(miniexp_car(a)) && miniexp_stringp(miniexp_cadr(a)) ) { QString k; k = QString::fromUtf8(miniexp_to_name(miniexp_car(a))); m[k] = QString::fromUtf8(miniexp_to_str(miniexp_cadr(a))); } } } p = miniexp_cdr(p); } return m; } static void metadataSubtract(QMap &from, QMap m) { QMap::const_iterator i = m.constBegin(); for( ; i != m.constEnd(); i++) if (from.contains(i.key()) && from[i.key()] == i.value()) from.remove(i.key()); } static void metadataFill(QTableWidget *table, QMap m) { QList keys; QMap::const_iterator i = m.constBegin(); for( ; i != m.constEnd(); i++) keys << i.key(); qSort(keys.begin(), keys.end()); int nkeys = keys.size(); table->setRowCount(nkeys); table->setSortingEnabled(false); for(int j = 0; j < nkeys; j++) { QTableWidgetItem *kitem = new QTableWidgetItem(keys[j]); QTableWidgetItem *vitem = new QTableWidgetItem(m[keys[j]]); kitem->setFlags(Qt::ItemIsSelectable|Qt::ItemIsEnabled); vitem->setFlags(Qt::ItemIsSelectable|Qt::ItemIsEnabled); table->setItem(j, 0, kitem); table->setItem(j, 1, vitem); } table->resizeColumnToContents(0); } void QDjViewMetaDialog::refresh() { // new document? if (! d->document) { QDjVuDocument *doc; doc = d->djview->getDjVuWidget()->document(); if (! doc) return; d->document = doc; connect(doc, SIGNAL(pageinfo()), this, SLOT(refresh()) ); } // document ready if (! d->ui.pageCombo->count()) { if (! d->djview->pageNum()) return; d->djview->fillPageCombo(d->ui.pageCombo); d->ui.pageCombo->setEnabled(true); d->ui.jumpButton->setEnabled(true); } // document annotations known if (d->docAnno == miniexp_dummy) { d->docAnno = d->document->getDocumentAnnotations(); if (d->docAnno != miniexp_dummy) { QMap docMeta = metadataFromAnnotations(d->docAnno); metadataFill(d->ui.docTable, docMeta); } } // page annotations if (d->ui.pageCombo->count() > 0) { d->pageno = qBound(0, d->pageno, d->djview->pageNum()-1); d->ui.prevButton->setEnabled(d->pageno-1 >= 0); d->ui.nextButton->setEnabled(d->pageno+1 < d->djview->pageNum()); d->ui.pageCombo->setCurrentIndex(d->pageno); if (d->document && d->pageAnno == miniexp_dummy) { d->pageAnno = d->document->getPageAnnotations(d->pageno); if (d->pageAnno != miniexp_dummy) { QMap docMeta = metadataFromAnnotations(d->docAnno); QMap pageMeta = metadataFromAnnotations(d->pageAnno); metadataSubtract(pageMeta, docMeta); metadataFill(d->ui.pageTable, pageMeta); } } } } void QDjViewMetaDialog::prevPage() { setPage(qMax(d->pageno - 1, 0)); } void QDjViewMetaDialog::nextPage() { setPage(qMin(d->pageno + 1, d->djview->pageNum() - 1)); } void QDjViewMetaDialog::setPage(int pageno) { if (d->document && pageno != d->pageno) { d->pageno = pageno; d->pageAnno = miniexp_dummy; d->ui.pageTable->setRowCount(0); refresh(); } } void QDjViewMetaDialog::jumpToSelectedPage() { if (d->document && d->pageno >= 0 && d->pageno < d->djview->pageNum() ) d->djview->goToPage(d->pageno); } void QDjViewMetaDialog::clear() { hide(); if (d->document) disconnect(d->document, 0, this, 0); d->document = 0; d->pageno = 0; d->docAnno = miniexp_dummy; d->pageAnno = miniexp_dummy; d->ui.pageCombo->clear(); d->ui.pageCombo->setEnabled(false); d->ui.docTable->setRowCount(0); d->ui.pageTable->setRowCount(0); d->ui.jumpButton->setEnabled(false); QDjViewPrefs *prefs = QDjViewPrefs::instance(); prefs->infoDialogTab = d->ui.tabWidget->currentIndex(); } void QDjViewMetaDialog::copy() { QTableWidget *table = d->ui.pageTable; if (d->ui.tabWidget->currentWidget() == d->ui.docTab) table = d->ui.docTable; QList selected = table->selectedItems(); if (selected.size() == 1) QApplication::clipboard()->setText(selected[0]->text()); } // ======================================= // QDJVIEWSAVEDIALOG // ======================================= #include "ui_qdjviewsavedialog.h" struct QDjViewSaveDialog::Private { QDjView *djview; QDjVuDocument *document; Ui::QDjViewSaveDialog ui; QDjViewExporter *exporter; bool stopping; }; QDjViewSaveDialog::~QDjViewSaveDialog() { delete d; } QDjViewSaveDialog::QDjViewSaveDialog(QDjView *djview) : QDialog(djview), d(0) { d = new QDjViewSaveDialog::Private; d->djview = djview; d->document = 0; d->stopping = false; d->exporter = 0; d->ui.setupUi(this); setAttribute(Qt::WA_GroupLeader, true); connect(d->ui.okButton, SIGNAL(clicked()), this, SLOT(start())); connect(d->ui.stopButton, SIGNAL(clicked()), this, SLOT(stop())); connect(d->ui.browseButton, SIGNAL(clicked()), this, SLOT(browse())); connect(d->ui.formatCombo, SIGNAL(activated(int)), this, SLOT(refresh())); connect(d->ui.fileNameEdit, SIGNAL(textChanged(QString)), this, SLOT(refresh())); connect(djview, SIGNAL(documentClosed(QDjVuDocument*)), this, SLOT(clear())); connect(djview, SIGNAL(documentReady(QDjVuDocument*)), this, SLOT(refresh())); setWhatsThis(tr("Saving.
    " "You can save the whole document or a page range. " "The bundled format creates a single file. " "The indirect format creates multiple files " "suitable for web serving.")); refresh(); } void QDjViewSaveDialog::refresh() { bool nodoc = !d->document; if (nodoc && d->djview->pageNum() > 0) { nodoc = false; d->document = d->djview->getDocument(); QString fname = d->djview->getDocumentFileName(); if (fname.isEmpty()) fname = d->djview->getShortFileName(); else fname = QFileInfo(fname).absoluteFilePath(); d->ui.fileNameEdit->setText(fname); d->djview->fillPageCombo(d->ui.fromPageCombo); d->ui.fromPageCombo->setCurrentIndex(0); d->djview->fillPageCombo(d->ui.toPageCombo); d->ui.toPageCombo->setCurrentIndex(d->djview->pageNum()-1); } bool notxt = d->ui.fileNameEdit->text().isEmpty(); bool nojob = true; bool nofmt = true; QDjViewExporter *exporter = d->exporter; QString exporterName = "DJVU/BUNDLED"; if (d->ui.formatCombo->currentIndex() > 0) exporterName = "DJVU/INDIRECT"; if (exporter && exporter->status() <= DDJVU_JOB_STARTED && exporter->name() != exporterName ) { exporter->saveProperties(); delete exporter; exporter = d->exporter = 0; } if (! exporter) { exporter = QDjViewExporter::create(this, d->djview, exporterName); if (exporter) { exporter->loadProperties(); connect(exporter, SIGNAL(progress(int)), this, SLOT(progress(int))); d->exporter = exporter; } } if (exporter) { nofmt = false; if (exporter->status() >= DDJVU_JOB_STARTED) nojob = false; } d->ui.destinationGroupBox->setEnabled(nojob && !nodoc); d->ui.saveGroupBox->setEnabled(nojob && !nodoc && !nofmt); d->ui.formatCombo->setEnabled(nojob && !nodoc && !nofmt); d->ui.okButton->setEnabled(nojob && !nodoc && !notxt && !nofmt); d->ui.cancelButton->setEnabled(nojob); d->ui.stopButton->setEnabled(!nojob); d->ui.stackedWidget->setCurrentIndex(nojob ? 0 : 1); } void QDjViewSaveDialog::clear() { d->stopping = true; reject(); } void QDjViewSaveDialog::start() { QString fname = d->ui.fileNameEdit->text(); QFileInfo info(fname); if (info.exists()) { QString docname = d->djview->getDocumentFileName(); if (info == QFileInfo(docname) && ! docname.isEmpty()) { QMessageBox::critical(this, tr("Error - DjView", "dialog caption"), tr("Overwriting the current file " "is not allowed!" ) ); return; } if ( QMessageBox::question(this, tr("Question - DjView", "dialog caption"), tr("A file with this name already exists.\n" "Do you want to replace it?"), tr("&Replace"), tr("&Cancel") )) return; } QDjViewExporter *exporter = d->exporter; if (exporter) { int lastPage = d->djview->pageNum()-1; int curPage = d->djview->getDjVuWidget()->page(); int fromPage = d->ui.fromPageCombo->currentIndex(); int toPage = d->ui.toPageCombo->currentIndex(); if (d->ui.currentPageButton->isChecked()) exporter->setFromTo(curPage, curPage); else if (d->ui.pageRangeButton->isChecked()) exporter->setFromTo(fromPage, toPage); else exporter->setFromTo(0, lastPage); // ignition! exporter->save(fname); } refresh(); } void QDjViewSaveDialog::progress(int percent) { ddjvu_status_t jobstatus = DDJVU_JOB_NOTSTARTED; QDjViewExporter *exporter = d->exporter; if (exporter) jobstatus = exporter->status(); d->ui.progressBar->setValue(percent); switch(jobstatus) { case DDJVU_JOB_OK: QTimer::singleShot(0, this, SLOT(accept())); break; case DDJVU_JOB_FAILED: exporter->error(tr("This operation has failed."), __FILE__, __LINE__); break; case DDJVU_JOB_STOPPED: exporter->error(tr("This operation has been interrupted."), __FILE__, __LINE__); break; default: break; } } void QDjViewSaveDialog::stop() { QDjViewExporter *exporter = d->exporter; if (exporter && exporter->status() == DDJVU_JOB_STARTED) { exporter->stop(); d->ui.stopButton->setEnabled(false); d->stopping = true; } } void QDjViewSaveDialog::browse() { QString fname = d->ui.fileNameEdit->text(); QStringList info = QDjViewExporter::info("DJVU/BUNDLED"); QString filters = tr("All files", "save filter") + " (*)"; QString suffix; if (info.size() > 3) filters = info[3] + ";;" + filters; if (info.size() > 1) suffix = info[1]; fname = QFileDialog::getSaveFileName(this, tr("Save - DjView", "dialog caption"), fname, filters, 0, QFileDialog::DontConfirmOverwrite); if (! fname.isEmpty()) { QFileInfo finfo(fname); if (finfo.suffix().isEmpty() && !suffix.isEmpty()) fname = QFileInfo(finfo.dir(), finfo.completeBaseName() + "." + suffix).filePath(); d->ui.fileNameEdit->setText(fname); } } void QDjViewSaveDialog::done(int reason) { setEnabled(false); QDjViewExporter *exporter = d->exporter; if (!d->stopping && exporter && exporter->status()==DDJVU_JOB_STARTED) { stop(); return; } if (exporter) exporter->saveProperties(); delete exporter; d->exporter = 0; QDialog::done(reason); } void QDjViewSaveDialog::closeEvent(QCloseEvent *event) { QDjViewExporter *exporter = d->exporter; if (!d->stopping && exporter && exporter->status()==DDJVU_JOB_STARTED) { stop(); event->ignore(); return; } if (exporter) exporter->saveProperties(); delete exporter; d->exporter = 0; event->accept(); QDialog::closeEvent(event); } // ======================================= // QDJVIEWEXPORTDIALOG // ======================================= #include "ui_qdjviewexportdialog.h" struct QDjViewExportDialog::Private { QDjView *djview; QDjVuDocument *document; Ui::QDjViewExportDialog ui; bool stopping; QDjViewExporter *exporter; QStringList exporterNames; }; QDjViewExportDialog::~QDjViewExportDialog() { delete d; } QDjViewExportDialog::QDjViewExportDialog(QDjView *djview) : QDialog(djview), d(0) { d = new QDjViewExportDialog::Private; d->djview = djview; d->document = 0; d->stopping = false; d->exporter = 0; d->ui.setupUi(this); setAttribute(Qt::WA_GroupLeader, true); connect(d->ui.okButton, SIGNAL(clicked()), this, SLOT(start())); connect(d->ui.stopButton, SIGNAL(clicked()), this, SLOT(stop())); connect(d->ui.browseButton, SIGNAL(clicked()), this, SLOT(browse())); connect(d->ui.formatCombo, SIGNAL(activated(int)), this, SLOT(refresh())); connect(d->ui.resetButton, SIGNAL(clicked()), this, SLOT(reset())); connect(d->ui.fileNameEdit, SIGNAL(textChanged(QString)), this, SLOT(refresh())); connect(djview, SIGNAL(documentClosed(QDjVuDocument*)), this, SLOT(clear())); connect(djview, SIGNAL(documentReady(QDjVuDocument*)), this, SLOT(refresh())); setWhatsThis(tr("Saving.
    " "You can save the whole document or a page range " "under a variety of formats. Selecting certain " "formats creates additional dialog pages for " "specifying format options.")); foreach (QString name, QDjViewExporter::names()) if (!name.startsWith("DJVU") && !name.startsWith("PRN")) { QStringList info = QDjViewExporter::info(name); if (info.size() > 2) { d->exporterNames << name; d->ui.formatCombo->addItem(info[2], QVariant(name)); } } d->ui.formatCombo->setCurrentIndex(0); refresh(); } void QDjViewExportDialog::refresh() { bool nodoc = !d->document; if (nodoc && d->djview->pageNum() > 0) { nodoc = false; d->document = d->djview->getDocument(); QString fname = d->djview->getDocumentFileName(); if (fname.isEmpty()) fname = d->djview->getShortFileName(); else fname = QFileInfo(fname).absoluteFilePath(); d->ui.fileNameEdit->setText(fname); d->djview->fillPageCombo(d->ui.fromPageCombo); d->ui.fromPageCombo->setCurrentIndex(0); d->djview->fillPageCombo(d->ui.toPageCombo); d->ui.toPageCombo->setCurrentIndex(d->djview->pageNum()-1); } bool notxt = d->ui.fileNameEdit->text().isEmpty(); bool nojob = true; bool nofmt = true; bool noopt = true; QDjViewExporter *exporter = d->exporter; int formatIndex = d->ui.formatCombo->currentIndex(); QString formatName = d->ui.formatCombo->itemData(formatIndex).toString(); if (exporter && exporter->status() <= DDJVU_JOB_STARTED && exporter->name() != formatName ) { exporter->saveProperties(); delete exporter; exporter = d->exporter = 0; } if (! exporter) { exporter = QDjViewExporter::create(this, d->djview, formatName); if (exporter) { exporter->loadProperties(); connect(exporter, SIGNAL(progress(int)), this, SLOT(progress(int))); d->exporter = exporter; // update tabs while (d->ui.tabWidget->count() > 1) d->ui.tabWidget->removeTab(1); QWidget *w; for (int i=0; ipropertyPages(); i++) if ((w = exporter->propertyPage(i))) d->ui.tabWidget->addTab(w, w->objectName()); // update fname QString fname = d->ui.fileNameEdit->text(); QStringList info = QDjViewExporter::info(formatName); if (info.size() > 1) { QString suffix = info[1]; QFileInfo finfo(fname); if (!finfo.suffix().isEmpty() && !suffix.isEmpty()) fname = QFileInfo(finfo.dir(), finfo.completeBaseName() + "." + suffix).filePath(); d->ui.fileNameEdit->setText(fname); } // update exportgroupbox disconnect(d->ui.fromPageCombo, 0, d->ui.toPageCombo, 0); d->ui.documentButton->setEnabled(true); d->ui.toPageCombo->setEnabled(true); d->ui.toLabel->setEnabled(true); if (exporter->exportOnePageOnly()) { connect(d->ui.fromPageCombo, SIGNAL(activated(int)), d->ui.toPageCombo, SLOT(setCurrentIndex(int))); d->ui.toPageCombo->setEnabled(false); d->ui.toLabel->setEnabled(false); d->ui.documentButton->setEnabled(false); if (d->ui.documentButton->isChecked()) d->ui.currentPageButton->setChecked(true); int page = d->ui.fromPageCombo->currentIndex(); d->ui.toPageCombo->setCurrentIndex(page); } } } if (exporter) { nofmt = false; if (exporter->status() >= DDJVU_JOB_STARTED) nojob = false; if (exporter->propertyPages() > 0) noopt = false; QWidget *w = 0; for (int i=0; ipropertyPages(); i++) if ((w = exporter->propertyPage(i))) w->setEnabled(nojob); } d->ui.destinationGroupBox->setEnabled(nojob && !nodoc); d->ui.saveGroupBox->setEnabled(nojob && !nodoc && !nofmt); d->ui.resetButton->setEnabled(nojob && !nodoc && !noopt); d->ui.okButton->setEnabled(nojob && !nodoc && !notxt && !nofmt); d->ui.cancelButton->setEnabled(nojob); d->ui.stopButton->setEnabled(!nojob); d->ui.stackedWidget->setCurrentIndex(nojob ? 0 : 1); } void QDjViewExportDialog::clear() { d->stopping = true; reject(); } void QDjViewExportDialog::reset() { QDjViewExporter *exporter = d->exporter; if (exporter) exporter->resetProperties(); refresh(); } void QDjViewExportDialog::start() { QString fname = d->ui.fileNameEdit->text(); QFileInfo info(fname); if (info.exists()) { QString docname = d->djview->getDocumentFileName(); if (info == QFileInfo(docname) && ! docname.isEmpty()) { QMessageBox::critical(this, tr("Error - DjView", "dialog caption"), tr("Overwriting the current file " "is not allowed!" ) ); return; } if ( QMessageBox::question(this, tr("Question - DjView", "dialog caption"), tr("A file with this name already exists.\n" "Do you want to replace it?"), tr("&Replace"), tr("&Cancel") )) return; } QDjViewExporter *exporter = d->exporter; if (exporter) { int lastPage = d->djview->pageNum()-1; int curPage = d->djview->getDjVuWidget()->page(); int fromPage = d->ui.fromPageCombo->currentIndex(); int toPage = d->ui.toPageCombo->currentIndex(); if (d->ui.currentPageButton->isChecked()) exporter->setFromTo(curPage, curPage); else if (d->ui.pageRangeButton->isChecked()) exporter->setFromTo(fromPage, toPage); else exporter->setFromTo(0, lastPage); // ignition! exporter->save(fname); } refresh(); } void QDjViewExportDialog::progress(int percent) { QDjViewExporter *exporter = d->exporter; ddjvu_status_t jobstatus = DDJVU_JOB_NOTSTARTED; if (exporter) jobstatus = exporter->status(); d->ui.progressBar->setValue(percent); switch(jobstatus) { case DDJVU_JOB_OK: QTimer::singleShot(0, this, SLOT(accept())); break; case DDJVU_JOB_FAILED: exporter->error(tr("This operation has failed."), __FILE__, __LINE__); break; case DDJVU_JOB_STOPPED: exporter->error(tr("This operation has been interrupted."), __FILE__, __LINE__); break; default: break; } } void QDjViewExportDialog::stop() { QDjViewExporter *exporter = d->exporter; if (exporter && exporter->status() == DDJVU_JOB_STARTED) { exporter->stop(); d->ui.stopButton->setEnabled(false); d->stopping = true; } } void QDjViewExportDialog::browse() { QString fname = d->ui.fileNameEdit->text(); QDjViewExporter *exporter = d->exporter; QString format = (exporter) ? exporter->name() : QString::null; QStringList info = QDjViewExporter::info(format); QString filters = tr("All files", "save filter") + " (*)"; QString suffix; if (info.size() > 3) filters = info[3] + ";;" + filters; if (info.size() > 1) suffix = info[1]; fname = QFileDialog::getSaveFileName(this, tr("Export - DjView", "dialog caption"), fname, filters, 0, QFileDialog::DontConfirmOverwrite); if (! fname.isEmpty()) { QFileInfo finfo(fname); if (finfo.suffix().isEmpty() && !suffix.isEmpty()) fname = QFileInfo(finfo.dir(), finfo.completeBaseName() + "." + suffix).filePath(); d->ui.fileNameEdit->setText(fname); } } void QDjViewExportDialog::done(int reason) { setEnabled(false); QDjViewExporter *exporter = d->exporter; if (!d->stopping && exporter && exporter->status()==DDJVU_JOB_STARTED) { stop(); return; } if (exporter) exporter->saveProperties(); delete exporter; d->exporter = 0; QDialog::done(reason); } void QDjViewExportDialog::closeEvent(QCloseEvent *event) { QDjViewExporter *exporter = d->exporter; if (!d->stopping && exporter && exporter->status()==DDJVU_JOB_STARTED) { stop(); event->ignore(); return; } if (exporter) exporter->saveProperties(); delete exporter; d->exporter = 0; event->accept(); QDialog::closeEvent(event); } // ======================================= // QDJVIEWPRINTDIALOG // ======================================= #include "ui_qdjviewprintdialog.h" struct QDjViewPrintDialog::Private { QDjView *djview; QDjVuDocument *document; Ui::QDjViewPrintDialog ui; QDjViewExporter *exporter; QString groupname; QPrinter *printer; bool stopping; }; QDjViewPrintDialog::~QDjViewPrintDialog() { if (d && d->printer) delete d->printer; if (d) delete d; } QDjViewPrintDialog::QDjViewPrintDialog(QDjView *djview) : QDialog(djview), d(0) { d = new QDjViewPrintDialog::Private; d->djview = djview; d->document = 0; d->stopping = false; d->exporter = 0; d->printer = new QPrinter(QPrinter::HighResolution); d->ui.setupUi(this); setAttribute(Qt::WA_GroupLeader, true); connect(d->ui.okButton, SIGNAL(clicked()), this, SLOT(start())); connect(d->ui.stopButton, SIGNAL(clicked()), this, SLOT(stop())); connect(d->ui.resetButton, SIGNAL(clicked()), this, SLOT(reset())); connect(djview, SIGNAL(documentClosed(QDjVuDocument*)), this, SLOT(clear())); connect(djview, SIGNAL(documentReady(QDjVuDocument*)), this, SLOT(refresh())); connect(d->ui.printToFileCheckBox, SIGNAL(clicked()), this, SLOT(refresh())); connect(d->ui.fileNameEdit, SIGNAL(textChanged(QString)), this, SLOT(refresh())); connect(d->ui.printerButton, SIGNAL(clicked()), this, SLOT(choose())); connect(d->ui.browseButton, SIGNAL(clicked()), this, SLOT(browse())); setWhatsThis(tr("Printing.
    " "You can print the whole document or a page range. " "Use the Choose button to select a print " "destination and specify printer options. Additional " "dialog tabs might appear to specify conversion " "options.")); // Load preferences d->ui.printerLabel->setText(QString::null); d->ui.fileNameEdit->setText("print.ps"); QDjViewPrefs *prefs = QDjViewPrefs::instance(); QString printerName = prefs->printerName; QString printFile = prefs->printFile; if (! printFile.isEmpty()) { d->ui.printToFileCheckBox->setChecked(true); d->ui.fileNameEdit->setText(printFile); printerName = QString::null; } else if (! printerName.isEmpty()) { d->ui.printToFileCheckBox->setChecked(false); d->ui.printerLabel->setText(prefs->printerName); d->printer->setPrinterName(printerName); } else { printFile = "print.ps"; d->ui.printToFileCheckBox->setChecked(true); d->ui.fileNameEdit->setText(printFile); } d->printer->setCollateCopies(prefs->printCollate); if (prefs->printReverse) d->printer->setPageOrder(QPrinter::LastPageFirst); else d->printer->setPageOrder(QPrinter::FirstPageFirst); // Create exporter #ifdef Q_WS_WIN // ... maybe do windows specific things here. if (! d->exporter) d->exporter = QDjViewExporter::create(this, d->djview, "PRN"); #endif #ifdef Q_WS_MAC // ... maybe do mac specific things here. #endif if (! d->exporter) d->exporter = QDjViewExporter::create(this, d->djview, "PS"); if (! d->exporter) d->exporter = QDjViewExporter::create(this, d->djview, "PRN"); if (d->exporter) { QDjViewExporter *exporter = d->exporter; exporter->loadProperties("Print-" + d->exporter->name()); // setup exporter property pages QWidget *w; for (int i=0; ipropertyPages(); i++) if ((w = exporter->propertyPage(i))) d->ui.tabWidget->addTab(w, w->objectName()); // setup exporter connections connect(exporter, SIGNAL(progress(int)), this, SLOT(progress(int))); } // Refresh Ui refresh(); } void QDjViewPrintDialog::refresh() { bool nodoc = !d->document; if (nodoc && d->djview->pageNum() > 0) { nodoc = false; d->document = d->djview->getDocument(); d->djview->fillPageCombo(d->ui.fromPageCombo); d->ui.fromPageCombo->setCurrentIndex(0); d->djview->fillPageCombo(d->ui.toPageCombo); d->ui.toPageCombo->setCurrentIndex(d->djview->pageNum()-1); } bool tofile = d->ui.printToFileCheckBox->isChecked(); bool noexp = !d->exporter; bool nojob = true; bool notxt = true; if (tofile) { notxt = d->ui.fileNameEdit->text().isEmpty(); } else if (d->printer) { QString pName = d->printer->printerName(); notxt = pName.isEmpty(); d->ui.printerLabel->setText(pName); if (notxt) d->ui.printerLabel->setText(tr("(invalid printer)")); } if (d->exporter) { noexp = false; if (d->exporter->status() >= DDJVU_JOB_STARTED) nojob = false; QWidget *w = 0; for (int i=0; iexporter->propertyPages(); i++) if ((w = d->exporter->propertyPage(i))) w->setEnabled(nojob); } d->ui.pageFile->setEnabled(tofile); d->ui.pagePrinter->setEnabled(!tofile); d->ui.destStackedWidget->setCurrentIndex(tofile ? 0 : 1); d->ui.destinationGroupBox->setEnabled(nojob && !noexp); d->ui.printGroupBox->setEnabled(nojob && !nodoc && !noexp); d->ui.resetButton->setEnabled(!noexp && nojob && !nodoc); d->ui.okButton->setEnabled(nojob && !nodoc && !notxt && !noexp); d->ui.cancelButton->setEnabled(nojob); d->ui.stopButton->setEnabled(!nojob); d->ui.stackedWidget->setCurrentIndex(nojob ? 0 : 1); } void QDjViewPrintDialog::browse() { QString fname = d->ui.fileNameEdit->text(); QDjViewExporter *exporter = d->exporter; QString format = (exporter) ? exporter->name() : QString::null; QStringList info = QDjViewExporter::info(format); QString filters = tr("All files", "save filter") + " (*)"; QString suffix; if (info.size() > 3) filters = info[3] + ";;" + filters; if (info.size() > 1) suffix = info[1]; fname = QFileDialog::getSaveFileName(this, tr("Print To File - DjView", "dialog caption"), fname, filters, 0, 0); if (! fname.isEmpty()) { QFileInfo finfo(fname); if (finfo.suffix().isEmpty() && !suffix.isEmpty()) fname = QFileInfo(finfo.dir(), finfo.completeBaseName() + "." + suffix).filePath(); d->ui.fileNameEdit->setText(fname); } } void QDjViewPrintDialog::choose() { if (d->exporter) { d->exporter->savePrintSetup(d->printer); QPrintDialog *dialog = new QPrintDialog(d->printer, this); // options QPrintDialog::PrintDialogOptions options = dialog->enabledOptions(); options |= QPrintDialog::PrintCollateCopies; options &= ~QPrintDialog::PrintToFile; options &= ~QPrintDialog::PrintSelection; dialog->setEnabledOptions(options); // copy page spec int pagenum = d->djview->pageNum(); int curpage = d->djview->getDjVuWidget()->page(); int frompage = d->ui.fromPageCombo->currentIndex(); int topage = d->ui.toPageCombo->currentIndex(); dialog->setMinMax(1, pagenum); dialog->setFromTo(1, pagenum); dialog->setPrintRange(QPrintDialog::PageRange); if (d->ui.currentPageButton->isChecked()) dialog->setFromTo(curpage+1, curpage+1); else if (d->ui.pageRangeButton->isChecked()) dialog->setFromTo(frompage+1, topage+1); else dialog->setPrintRange(QPrintDialog::AllPages); // exec if (dialog->exec() == QDialog::Accepted) { d->exporter->loadPrintSetup(d->printer, dialog); // copy page spec back frompage = qBound(0, dialog->fromPage()-1, pagenum-1); topage = qBound(0, dialog->toPage()-1, pagenum-1); if (dialog->printRange() == QPrintDialog::AllPages) { d->ui.documentButton->setChecked(true); d->ui.fromPageCombo->setCurrentIndex(0); d->ui.toPageCombo->setCurrentIndex(pagenum-1); } else { d->ui.fromPageCombo->setCurrentIndex(frompage); d->ui.toPageCombo->setCurrentIndex(topage); if (frompage == curpage && topage == curpage) d->ui.currentPageButton->setChecked(true); else d->ui.pageRangeButton->setChecked(true); } } delete dialog; } refresh(); } void QDjViewPrintDialog::clear() { d->stopping = true; reject(); } void QDjViewPrintDialog::reset() { QDjViewExporter *exporter = d->exporter; if (exporter) exporter->resetProperties(); refresh(); } void QDjViewPrintDialog::start() { // start conversion QDjViewExporter *exporter = d->exporter; if (exporter) { int lastPage = d->djview->pageNum()-1; int curPage = d->djview->getDjVuWidget()->page(); int fromPage = d->ui.fromPageCombo->currentIndex(); int toPage = d->ui.toPageCombo->currentIndex(); if (d->ui.currentPageButton->isChecked()) exporter->setFromTo(curPage, curPage); else if (d->ui.pageRangeButton->isChecked()) exporter->setFromTo(fromPage, toPage); else exporter->setFromTo(0, lastPage); // ignition! if (d->ui.printToFileCheckBox->isChecked()) { QString fname = d->ui.fileNameEdit->text(); QFileInfo info(fname); if (info.exists() && QMessageBox::question(this, tr("Question - DjView", "dialog caption"), tr("A file with this name already exists.\n" "Do you want to replace it?"), tr("&Replace"), tr("&Cancel") )) return; // save preferences QDjViewPrefs *prefs = QDjViewPrefs::instance(); prefs->printerName = QString::null; prefs->printFile = fname; // print to file exporter->save(fname); } else { QPrinter *printer = d->printer; // save preferences QDjViewPrefs *prefs = QDjViewPrefs::instance(); prefs->printFile = QString::null; prefs->printerName = printer->printerName(); // print exporter->print(d->printer); } } // refresh ui refresh(); } void QDjViewPrintDialog::progress(int percent) { ddjvu_status_t jobstatus = DDJVU_JOB_NOTSTARTED; QDjViewExporter *exporter = d->exporter; if (exporter) jobstatus = exporter->status(); d->ui.progressBar->setValue(percent); switch(jobstatus) { case DDJVU_JOB_OK: QTimer::singleShot(0, this, SLOT(accept())); break; case DDJVU_JOB_FAILED: exporter->error(tr("This operation has failed."), __FILE__, __LINE__); break; case DDJVU_JOB_STOPPED: exporter->error(tr("This operation has been interrupted."), __FILE__, __LINE__); break; default: break; } } void QDjViewPrintDialog::stop() { QDjViewExporter *exporter = d->exporter; if (exporter && exporter->status() == DDJVU_JOB_STARTED) { exporter->stop(); d->ui.stopButton->setEnabled(false); d->stopping = true; } } void QDjViewPrintDialog::done(int reason) { setEnabled(false); QDjViewExporter *exporter = d->exporter; if (!d->stopping && exporter && exporter->status()==DDJVU_JOB_STARTED ) { stop(); return; } if (exporter) exporter->saveProperties("Printer-" + exporter->name()); delete exporter; d->exporter = 0; QDialog::done(reason); } void QDjViewPrintDialog::closeEvent(QCloseEvent *event) { QDjViewExporter *exporter = d->exporter; if (!d->stopping && exporter && exporter->status() == DDJVU_JOB_STARTED) { stop(); event->ignore(); return; } if (exporter) exporter->saveProperties("Printer-" + exporter->name()); delete exporter; d->exporter = 0; event->accept(); QDialog::closeEvent(event); } /* ------------------------------------------------------------- Local Variables: c++-font-lock-extra-types: ( "\\sw+_t" "[A-Z]\\sw*[a-z]\\sw*" ) End: ------------------------------------------------------------- */ djview4/src/qdjviewdialogs.h000066400000000000000000000104701174072760700164230ustar00rootroot00000000000000//C- -*- C++ -*- //C- ------------------------------------------------------------------- //C- DjView4 //C- Copyright (c) 2006- Leon Bottou //C- //C- This software is subject to, and may be distributed under, the //C- GNU General Public License, either version 2 of the license, //C- or (at your option) any later version. The license should have //C- accompanied the software or you may obtain a copy of the license //C- from the Free Software Foundation at http://www.fsf.org . //C- //C- This program is distributed in the hope that it will be useful, //C- but WITHOUT ANY WARRANTY; without even the implied warranty of //C- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //C- GNU General Public License for more details. //C- ------------------------------------------------------------------ #ifndef QDJVIEWDIALOGS_H #define QDJVIEWDIALOGS_H #if AUTOCONF # include "config.h" #endif #include #include #include #include #include #include #include #include class QCloseEvent; class QComboBox; class QDjView; class QDjViewExporter; class QDjVuDocument; class QDjVuJob; class QProgressBar; class QPushButton; class QRadioButton; // ----------- QDJVIEWERRORDIALOG class QDjViewErrorDialog : public QDialog { Q_OBJECT public: ~QDjViewErrorDialog(); QDjViewErrorDialog(QWidget *parent); void prepare(QMessageBox::Icon icon, QString caption); public slots: void error(QString message, QString filename, int lineno); virtual void done(int); signals: void closing(); private: void compose(void); struct Private; Private *d; }; // ----------- QDJVIEWAUTHDIALOG class QDjViewAuthDialog : public QDialog { Q_OBJECT public: ~QDjViewAuthDialog(); QDjViewAuthDialog(QWidget *parent); QString user() const; QString pass() const; public slots: void setInfo(QString why); void setUser(QString user); void setPass(QString pass); private: struct Private; Private *d; }; // ----------- QDJVIEWINFODIALOG class QDjViewInfoDialog : public QDialog { Q_OBJECT public: ~QDjViewInfoDialog(); QDjViewInfoDialog(QDjView *parent); public slots: void clear(); void refresh(); void setPage(int pageno); void setFile(int fileno); protected slots: void prevFile(); void nextFile(); void jumpToSelectedPage(); private: void fillFileCombo(); void fillDocLabel(); void fillDocTable(); void fillDocRow(int); struct Private; Private *d; }; // ----------- QDJVIEWMETADIALOG class QDjViewMetaDialog : public QDialog { Q_OBJECT public: ~QDjViewMetaDialog(); QDjViewMetaDialog(QDjView *parent); public slots: void clear(); void refresh(); void prevPage(); void nextPage(); void setPage(int pageno); protected slots: void jumpToSelectedPage(); void copy(); private: struct Private; Private *d; }; // ----------- QDJVIEWSAVEDIALOG class QDjViewSaveDialog : public QDialog { Q_OBJECT public: QDjViewSaveDialog(QDjView *djview); ~QDjViewSaveDialog(); protected slots: void refresh(); void clear(); void start(); void progress(int); void stop(); void browse(); virtual void done(int); protected: virtual void closeEvent(QCloseEvent *event); struct Private; Private *d; }; // ----------- QDJVIEWEXPORTDIALOG class QDjViewExportDialog : public QDialog { Q_OBJECT public: QDjViewExportDialog(QDjView *djview); ~QDjViewExportDialog(); protected slots: void refresh(); void clear(); void start(); void progress(int); void stop(); void browse(); void reset(); virtual void done(int); protected: virtual void closeEvent(QCloseEvent *event); struct Private; Private *d; }; // ----------- QDJVIEWPRINTDIALOG class QDjViewPrintDialog : public QDialog { Q_OBJECT public: QDjViewPrintDialog(QDjView *djview); ~QDjViewPrintDialog(); protected slots: void refresh(); void clear(); void choose(); void browse(); void start(); void progress(int); void stop(); void reset(); virtual void done(int); protected: virtual void closeEvent(QCloseEvent *event); struct Private; Private *d; }; #endif /* ------------------------------------------------------------- Local Variables: c++-font-lock-extra-types: ( "\\sw+_t" "[A-Z]\\sw*[a-z]\\sw*" ) End: ------------------------------------------------------------- */ djview4/src/qdjviewerrordialog.ui000066400000000000000000000070321174072760700175000ustar00rootroot00000000000000 QDjViewErrorDialog 0 0 538 142 DjView Error 9 6 0 6 Qt::Horizontal QSizePolicy::Fixed 16 20 28 28 Qt::AlignCenter Qt::NoFocus QFrame::NoFrame QFrame::Plain Qt::ScrollBarAsNeeded true 0 6 Qt::Horizontal 40 20 &Ok true Qt::Horizontal 40 20 okButton clicked() QDjViewErrorDialog accept() 280 122 386 115 djview4/src/qdjviewexportdialog.ui000066400000000000000000000230531174072760700176710ustar00rootroot00000000000000 QDjViewExportDialog 0 0 427 335 Dialog 9 6 Export 9 6 Export 9 6 &Document true C&urrent page 0 6 &Pages to Qt::AlignCenter Qt::Horizontal QSizePolicy::MinimumExpanding 40 10 Destination 9 6 0 6 Format: 3 0 1 0 280 0 0 6 :/images/icon_open.png 3 3 0 0 0 9 6 &Defaults false Qt::Horizontal QSizePolicy::MinimumExpanding 150 20 &Ok true true false &Cancel false 9 6 Qt::Horizontal Stop false fromPageCombo activated(int) pageRangeButton click() 158 163 76 158 toPageCombo activated(int) pageRangeButton click() 248 155 44 154 cancelButton clicked() QDjViewExportDialog reject() 375 342 443 367 djview4/src/qdjviewexporters.cpp000066400000000000000000001742071174072760700174000ustar00rootroot00000000000000//C- -*- C++ -*- //C- ------------------------------------------------------------------- //C- DjView4 //C- Copyright (c) 2006- Leon Bottou //C- //C- This software is subject to, and may be distributed under, the //C- GNU General Public License, either version 2 of the license, //C- or (at your option) any later version. The license should have //C- accompanied the software or you may obtain a copy of the license //C- from the Free Software Foundation at http://www.fsf.org . //C- //C- This program is distributed in the hope that it will be useful, //C- but WITHOUT ANY WARRANTY; without even the implied warranty of //C- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //C- GNU General Public License for more details. //C- ------------------------------------------------------------------ #if AUTOCONF # include "config.h" #else # define HAVE_STRING_H 1 # define HAVE_SYS_TYPES_H 1 # define HAVE_STRERROR 1 # ifndef WIN32 # define HAVE_SYS_WAIT_H 1 # define HAVE_WAITPID 1 # define HAVE_UNISTD_H 1 # endif #endif #include #include #include #include #include #include #include #if HAVE_SYS_TYPES_H # include #endif #if HAVE_SYS_WAIT_H # include #endif #if HAVE_STRING_H # include #endif #if HAVE_UNISTD_H # include #endif #if HAVE_TIFF # include # include # include # include "tiff2pdf.h" #endif #ifdef WIN32 # include #endif #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "qdjview.h" #include "qdjviewprefs.h" #include "qdjviewdialogs.h" #include "qdjviewexporters.h" #include "qdjvuwidget.h" #include "qdjvu.h" #ifdef WIN32 # define wdup(fh) _dup(fh) #else # define wdup(fh) (fh) #endif // ---------------------------------------- // FACTORY typedef QDjViewExporter* (*exporter_creator_t)(QDialog*,QDjView*,QString); static QStringList exporterNames; static QMap exporterInfo; static QMap exporterCreators; static void addExporterData(QString name, QString suffix, QString lname, QString filter, exporter_creator_t creator) { QStringList info; info << name << suffix << lname << filter; exporterNames << name; exporterInfo[name] = info; exporterCreators[name] = creator; } static void createExporterData(); QDjViewExporter * QDjViewExporter::create(QDialog *dialog, QDjView *djview, QString name) { if (exporterNames.isEmpty()) createExporterData(); if (exporterCreators.contains(name)) return (*exporterCreators[name])(dialog, djview, name); return 0; } QStringList QDjViewExporter::names() { if (exporterNames.isEmpty()) createExporterData(); return exporterNames; } QStringList QDjViewExporter::info(QString name) { if (exporterNames.isEmpty()) createExporterData(); if (exporterInfo.contains(name)) return exporterInfo[name]; return QStringList(); } // ---------------------------------------- // QDJVIEWEXPORTER QDjViewExporter::~QDjViewExporter() { } bool QDjViewExporter::exportOnePageOnly() { return false; } void QDjViewExporter::resetProperties() { // reset all properties to default values } void QDjViewExporter::loadProperties(QString) { // fill properties from settings keyed by string } void QDjViewExporter::saveProperties(QString) { // save properties into settings keyed by string } bool QDjViewExporter::loadPrintSetup(QPrinter*, QPrintDialog*) { // fill properties using printer and print dialog data return false; } bool QDjViewExporter::savePrintSetup(QPrinter*) { // save properties into printer settings return false; } int QDjViewExporter::propertyPages() { return 0; } QWidget* QDjViewExporter::propertyPage(int) { return 0; } void QDjViewExporter::setFromTo(int fp, int tp) { fromPage = fp; toPage = tp; } void QDjViewExporter::setErrorCaption(QString caption) { errorCaption = caption; } ddjvu_status_t QDjViewExporter::status() { return DDJVU_JOB_NOTSTARTED; } QString QDjViewExporter::name() { return exporterName; } bool QDjViewExporter::print(QPrinter *) { qWarning("QDjViewExporter does not support printing."); return false; } void QDjViewExporter::stop() { } void QDjViewExporter::error(QString message, QString filename, int lineno) { if (! errorDialog) { errorDialog = new QDjViewErrorDialog(parent); errorDialog->prepare(QMessageBox::Critical, errorCaption); connect(errorDialog, SIGNAL(closing()), parent, SLOT(reject())); errorDialog->setWindowModality(Qt::WindowModal); } errorDialog->error(message, filename, lineno); errorDialog->show(); } QDjViewExporter::QDjViewExporter(QDialog *parent, QDjView *djview, QString name) : parent(parent), djview(djview), errorDialog(0), exporterName(name), fromPage(0), toPage(-1) { } // ---------------------------------------- // QDJVIEWDJVUEXPORTER class QDjViewDjVuExporter : public QDjViewExporter { Q_OBJECT public: static QDjViewExporter *create(QDialog*, QDjView*, QString); static void setup(); public: ~QDjViewDjVuExporter(); QDjViewDjVuExporter(QDialog *parent, QDjView *djview, QString name, bool indirect); virtual bool save(QString fileName); virtual void stop(); virtual ddjvu_status_t status(); protected: QFile file; QDjVuJob *job; FILE *output; bool indirect; bool failed; }; QDjViewExporter* QDjViewDjVuExporter::create(QDialog *parent, QDjView *djview, QString name) { if (name == "DJVU/BUNDLED") return new QDjViewDjVuExporter(parent, djview, name, false); if (name == "DJVU/INDIRECT") return new QDjViewDjVuExporter(parent, djview, name, true); return 0; } void QDjViewDjVuExporter::setup() { addExporterData("DJVU/BUNDLED", "djvu", tr("DjVu Bundled Document"), tr("DjVu Files (*.djvu *.djv)"), QDjViewDjVuExporter::create); addExporterData("DJVU/INDIRECT", "djvu", tr("DjVu Indirect Document"), tr("DjVu Files (*.djvu *.djv)"), QDjViewDjVuExporter::create); } QDjViewDjVuExporter::QDjViewDjVuExporter(QDialog *parent, QDjView *djview, QString name, bool indirect) : QDjViewExporter(parent, djview, name), job(0), output(0), indirect(indirect), failed(false) { } QDjViewDjVuExporter::~QDjViewDjVuExporter() { QIODevice::OpenMode mode = file.openMode(); ddjvu_status_t st = status(); if (st == DDJVU_JOB_STARTED) if (job) ddjvu_job_stop(*job); if (output) ::fclose(output); output = 0; if (file.openMode()) file.close(); if (st != DDJVU_JOB_OK) if (mode & (QIODevice::WriteOnly|QIODevice::Append)) file.remove(); if (djview) ddjvu_cache_clear(djview->getDjVuContext()); } bool QDjViewDjVuExporter::save(QString fname) { QDjVuDocument *document = djview->getDocument(); int pagenum = djview->pageNum(); if (output || document==0 || pagenum <= 0 || fname.isEmpty()) return false; QFileInfo info(fname); QDir::Filters filters = QDir::AllEntries|QDir::NoDotAndDotDot; if (indirect && !info.dir().entryList(filters).isEmpty() && QMessageBox::question(parent, tr("Question - DjView", "dialog caption"), tr(" This file belongs to a non empty " "directory. Saving an indirect document " "creates many files in this directory. " "Do you want to continue and risk " "overwriting files in this directory?" ""), tr("Con&tinue"), tr("&Cancel") ) ) return false; toPage = qBound(0, toPage, pagenum-1); fromPage = qBound(0, fromPage, pagenum-1); QByteArray pagespec; if (fromPage == toPage && pagenum > 1) pagespec.append(QString("--pages=%1").arg(fromPage+1)); else if (fromPage != 0 || toPage != pagenum - 1) pagespec.append(QString("--pages=%1-%2").arg(fromPage+1).arg(toPage+1)); QByteArray namespec; if (indirect) namespec = "--indirect=" + fname.toUtf8(); int argc = 0; const char *argv[2]; if (! namespec.isEmpty()) argv[argc++] = namespec.data(); if (! pagespec.isEmpty()) argv[argc++] = pagespec.data(); file.setFileName(fname); file.remove(); if (file.open(QIODevice::WriteOnly)) output = ::fdopen(wdup(file.handle()), "wb"); if (! output) { failed = true; QString message = tr("Unknown error."); if (! file.errorString().isEmpty()) message = tr("System error: %1.").arg(file.errorString()); error(message, __FILE__, __LINE__); return false; } ddjvu_job_t *pjob; pjob = ddjvu_document_save(*document, output, argc, argv); if (! pjob) { failed = true; // error messages went to the document connect(document, SIGNAL(error(QString,QString,int)), this, SLOT(error(QString,QString,int)) ); qApp->sendEvent(&djview->getDjVuContext(), new QEvent(QEvent::User)); disconnect(document, 0, this, 0); // main error message QString message = tr("Save job creation failed!"); error(message, __FILE__, __LINE__); return false; } job = new QDjVuJob(pjob, this); connect(job, SIGNAL(error(QString,QString,int)), this, SLOT(error(QString,QString,int)) ); connect(job, SIGNAL(progress(int)), this, SIGNAL(progress(int)) ); emit progress(0); return true; } void QDjViewDjVuExporter::stop() { if (job && status() == DDJVU_JOB_STARTED) ddjvu_job_stop(*job); } ddjvu_status_t QDjViewDjVuExporter::status() { if (job) return ddjvu_job_status(*job); else if (failed) return DDJVU_JOB_FAILED; else return DDJVU_JOB_NOTSTARTED; } // ---------------------------------------- // QDJVIEWPSEXPORTER #include "ui_qdjviewexportps1.h" #include "ui_qdjviewexportps2.h" #include "ui_qdjviewexportps3.h" class QDjViewPSExporter : public QDjViewExporter { Q_OBJECT public: static QDjViewExporter *create(QDialog*, QDjView*, QString); static void setup(); public: ~QDjViewPSExporter(); QDjViewPSExporter(QDialog *parent, QDjView *djview, QString name, bool eps); virtual bool exportOnePageOnly(); virtual void resetProperties(); virtual void loadProperties(QString group); virtual void saveProperties(QString group); virtual bool loadPrintSetup(QPrinter *printer, QPrintDialog *dialog); virtual bool savePrintSetup(QPrinter *printer); virtual int propertyPages(); virtual QWidget* propertyPage(int num); virtual bool save(QString fileName); virtual bool print(QPrinter *printer); virtual ddjvu_status_t status(); virtual void stop(); public slots: void refresh(); protected: bool start(); void openFile(); void closeFile(); protected: QFile file; QDjVuJob *job; FILE *output; int outputfd; int copies; bool collate; bool lastfirst; bool duplex; bool failed; bool encapsulated; QPrinter *printer; QPointer page1; QPointer page2; QPointer page3; Ui::QDjViewExportPS1 ui1; Ui::QDjViewExportPS2 ui2; Ui::QDjViewExportPS3 ui3; }; QDjViewExporter* QDjViewPSExporter::create(QDialog *parent, QDjView *djview, QString name) { if (name == "PS") return new QDjViewPSExporter(parent, djview, name, false); if (name == "EPS") return new QDjViewPSExporter(parent, djview, name, true); return 0; } void QDjViewPSExporter::setup() { addExporterData("PS", "ps", tr("PostScript"), tr("PostScript Files (*.ps *.eps)"), QDjViewPSExporter::create); addExporterData("EPS", "eps", tr("Encapsulated PostScript"), tr("PostScript Files (*.ps *.eps)"), QDjViewPSExporter::create); } QDjViewPSExporter::~QDjViewPSExporter() { // cleanup output QIODevice::OpenMode mode = file.openMode(); ddjvu_status_t st = status(); if (st == DDJVU_JOB_STARTED) if (job) ddjvu_job_stop(*job); closeFile(); if (st != DDJVU_JOB_OK) if (mode & (QIODevice::WriteOnly|QIODevice::Append)) file.remove(); // delete property pages delete page1; delete page2; delete page3; } QDjViewPSExporter::QDjViewPSExporter(QDialog *parent, QDjView *djview, QString name, bool eps) : QDjViewExporter(parent, djview, name), job(0), output(0), outputfd(-1), copies(1), collate(true), lastfirst(false), duplex(false), failed(false), encapsulated(eps), printer(0) { // create pages page1 = new QWidget(); page2 = new QWidget(); page3 = new QWidget(); ui1.setupUi(page1); ui2.setupUi(page2); ui3.setupUi(page3); page1->setObjectName(tr("PostScript","tab caption")); page2->setObjectName(tr("Position","tab caption")); page3->setObjectName(tr("Booklet","tab caption")); resetProperties(); // connect stuff connect(ui2.autoOrientCheckBox, SIGNAL(clicked()), this, SLOT(refresh()) ); connect(ui3.bookletCheckBox, SIGNAL(clicked()), this, SLOT(refresh()) ); connect(ui2.zoomSpinBox, SIGNAL(valueChanged(int)), ui2.zoomButton, SLOT(click()) ); // whatsthis page1->setWhatsThis(tr("PostScript options.
    " "Option Color enables color printing. " "Document pages can be decorated with frame " "and crop marks. " "PostScript language level 1 is only useful " "with very old printers. Level 2 works with most " "printers. Level 3 print color document faster " "on recent printers.") ); page2->setWhatsThis(tr("Position and scaling.
    " "Option Scale to fit accommodates " "whatever paper size your printer uses. " "Zoom factor 100% reproduces the initial " "document size. Orientation Automatic " "chooses portrait or landscape on a page per " "page basis.") ); page3->setWhatsThis(tr("Producing booklets.
    " "The booklet mode prints the selected " "pages as sheets suitable for folding one or several " "booklets. Several booklets might be produced when " "a maximum number of sheets per booklet is " "specified. You can either use a duplex printer or " "print rectos and versos separately.

    " "Shifting rectos and versos is useful " "with poorly aligned duplex printers. " "The center margins determine how much " "space is left between the pages to fold the " "sheets. This space slowly increases from the " "inner sheet to the outer sheet." "") ); // adjust ui refresh(); } bool QDjViewPSExporter::exportOnePageOnly() { return encapsulated; } void QDjViewPSExporter::resetProperties() { ui1.colorButton->setChecked(true); ui1.frameCheckBox->setChecked(false); ui1.cropMarksCheckBox->setChecked(false); ui1.levelSpinBox->setValue(3); ui2.autoOrientCheckBox->setChecked(true); ui2.scaleToFitButton->setChecked(true); ui2.zoomSpinBox->setValue(100); ui3.bookletCheckBox->setChecked(false); ui3.sheetsSpinBox->setValue(0); ui3.rectoVersoCombo->setCurrentIndex(0); ui3.rectoVersoShiftSpinBox->setValue(0); ui3.centerMarginSpinBox->setValue(18); ui3.centerIncreaseSpinBox->setValue(40); refresh(); } void QDjViewPSExporter::loadProperties(QString group) { // load settings (ui1) QSettings s; if (group.isEmpty()) group = "Export-" + name(); s.beginGroup(group); bool color = s.value("color", true).toBool(); ui1.colorButton->setChecked(color); ui1.grayScaleButton->setChecked(!color); ui1.frameCheckBox->setChecked(s.value("frame", false).toBool()); ui1.cropMarksCheckBox->setChecked(s.value("cropMarks", false).toBool()); int level = s.value("psLevel", 3).toInt(); ui1.levelSpinBox->setValue(qBound(1,level,3)); // load settings (ui2) ui2.autoOrientCheckBox->setChecked(s.value("autoOrient", true).toBool()); bool landscape = s.value("landscape",false).toBool(); ui2.portraitButton->setChecked(!landscape); ui2.landscapeButton->setChecked(landscape); int zoom = s.value("zoom",0).toInt(); ui2.scaleToFitButton->setChecked(zoom == 0); ui2.zoomButton->setChecked(zoom!=0); ui2.zoomSpinBox->setValue(zoom ? qBound(25,zoom,2400) : 100); // load settings (ui3) ui3.bookletCheckBox->setChecked(s.value("booklet", false).toBool()); ui3.sheetsSpinBox->setValue(s.value("bookletSheets", 0).toInt()); int rectoVerso = qBound(0, s.value("bookletRectoVerso",0).toInt(), 2); ui3.rectoVersoCombo->setCurrentIndex(rectoVerso); int rectoVersoShift = qBound(-72, s.value("bookletShift",0).toInt(), 72); ui3.rectoVersoShiftSpinBox->setValue(rectoVersoShift); int centerMargin = qBound(0, s.value("bookletCenter", 18).toInt(), 144); ui3.centerMarginSpinBox->setValue(centerMargin); int centerIncrease = qBound(0, s.value("bookletCenterAdd", 40).toInt(), 200); ui3.centerIncreaseSpinBox->setValue(centerIncrease); } void QDjViewPSExporter::saveProperties(QString group) { // save properties QSettings s; if (group.isEmpty()) group = "Export-" + name(); s.beginGroup(group); s.setValue("color", ui1.colorButton->isChecked()); s.setValue("frame", ui1.frameCheckBox->isChecked()); s.setValue("cropMarks", ui1.cropMarksCheckBox->isChecked()); s.setValue("psLevel", ui1.levelSpinBox->value()); s.setValue("autoOrient", ui2.autoOrientCheckBox->isChecked()); s.setValue("landscape", ui2.landscapeButton->isChecked()); int zoom = ui2.zoomSpinBox->value(); s.setValue("zoom", QVariant(ui2.zoomButton->isChecked() ? zoom : 0)); s.setValue("booklet", ui3.bookletCheckBox->isChecked()); s.setValue("bookletSheets", ui3.sheetsSpinBox->value()); s.setValue("bookletRectoVerso", ui3.rectoVersoCombo->currentIndex()); s.setValue("bookletShift", ui3.rectoVersoShiftSpinBox->value()); s.setValue("bookletCenter", ui3.centerMarginSpinBox->value()); s.setValue("bookletCenterAdd", ui3.centerIncreaseSpinBox->value()); } bool QDjViewPSExporter::loadPrintSetup(QPrinter *printer, QPrintDialog *dialog) { bool grayscale = (printer->colorMode() == QPrinter::GrayScale); bool landscape = (printer->orientation() == QPrinter::Landscape); ui1.grayScaleButton->setChecked(grayscale); ui1.colorButton->setChecked(!grayscale); ui2.landscapeButton->setChecked(landscape); ui2.portraitButton->setChecked(!landscape); // BEGIN HACK // // Directly steal settings from print dialog. copies = 1; collate = true; lastfirst = false; #if QT_VERSION >= 0x40400 QSpinBox* lcop = qFindChild(dialog, "copies"); QCheckBox* lcol = qFindChild(dialog, "collate"); QCheckBox* lplf = qFindChild(dialog, "reverse"); #else QSpinBox* lcop = qFindChild(dialog, "sbNumCopies"); QCheckBox* lcol = qFindChild(dialog, "chbCollate"); QCheckBox* lplf = qFindChild(dialog, "chbPrintLastFirst"); #endif if (lcop) copies = qMax(1, lcop->value()); if (lcol) collate = lcol->isChecked(); if (lplf) lastfirst = lplf->isChecked(); // END HACK // return true; } bool QDjViewPSExporter::savePrintSetup(QPrinter *printer) { bool g = ui1.grayScaleButton->isChecked(); bool l = ui2.landscapeButton->isChecked(); printer->setColorMode(g ? QPrinter::GrayScale : QPrinter::Color); printer->setOrientation(l ? QPrinter::Landscape : QPrinter::Portrait); return true; } int QDjViewPSExporter::propertyPages() { return (encapsulated) ? 1 : 3; } QWidget* QDjViewPSExporter::propertyPage(int n) { if (n == 0) return page1; else if (n == 1) return page2; else if (n == 2) return page3; return 0; } void QDjViewPSExporter::refresh() { if (encapsulated) { ui1.cropMarksCheckBox->setEnabled(false); ui1.cropMarksCheckBox->setChecked(false); } bool autoOrient = ui2.autoOrientCheckBox->isChecked(); ui2.portraitButton->setEnabled(!autoOrient); ui2.landscapeButton->setEnabled(!autoOrient); bool booklet = ui3.bookletCheckBox->isChecked(); ui3.bookletGroupBox->setEnabled(booklet); bool nojob = (status() < DDJVU_JOB_STARTED); page1->setEnabled(nojob); page2->setEnabled(nojob && !encapsulated); page3->setEnabled(nojob && !encapsulated); } void QDjViewPSExporter::openFile() { if (printer) { file.close(); if (! printer->outputFileName().isEmpty()) file.setFileName(printer->outputFileName()); } if (! file.fileName().isEmpty()) { file.remove(); if (file.open(QIODevice::WriteOnly)) output = ::fdopen(wdup(file.handle()), "wb"); } else if (printer) { QString printerName = printer->printerName(); // disable sigpipe #ifdef SIGPIPE # ifndef HAVE_SIGACTION # ifdef SA_RESTART # define HAVE_SIGACTION 1 # endif # endif # if HAVE_SIGACTION sigset_t mask; struct sigaction act; sigemptyset(&mask); sigaddset(&mask, SIGPIPE); sigprocmask(SIG_BLOCK, &mask, 0); sigaction(SIGPIPE, 0, &act); act.sa_handler = SIG_IGN; sigaction(SIGPIPE, &act, 0); # else signal(SIGPIPE, SIG_IGN); # endif #endif // Arguments for lp/lpr QVector lpargs; QVector lprargs; lpargs << "lp"; lprargs << "lpr"; QByteArray pname = printerName.toLocal8Bit(); if (! pname.isEmpty()) { lpargs << "-d"; lpargs << pname.data(); lprargs << "-P"; lprargs << pname.data(); } // Arguments for cups. bool cups = false; QList cargs; QPrintEngine *engine = printer->printEngine(); # define PPK_CupsOptions QPrintEngine::PrintEnginePropertyKey(0xfe00) # define PPK_CupsStringPageSize QPrintEngine::PrintEnginePropertyKey(0xfe03) QVariant cPageSize = engine->property(PPK_CupsStringPageSize); QVariant cOptions = engine->property(PPK_CupsOptions); if (! cPageSize.toString().isEmpty()) { cups = true; cargs << "-o" << "media=" + cPageSize.toString().toLocal8Bit(); } QStringList options = cOptions.toStringList(); if (! options.isEmpty()) { cups = true; QStringList::const_iterator it = options.constBegin(); while (it != options.constEnd()) { cargs << "-o"; cargs << (*it).toLocal8Bit() + "=" + (*(it+1)).toLocal8Bit(); it += 2; } } QByteArray bCopies = QByteArray::number(copies); if (cups) { if (collate) cargs << "-o" << "Collate=True"; if (lastfirst) cargs << "-o" << "outputorder=reverse"; lastfirst = false; if (duplex) cargs << "-o" << "sides=two-sided-long-edge"; // add cups option for number of copies if (copies > 1) { lprargs << "-#" << bCopies.data(); lpargs << "-n" << bCopies.data(); } // add remaining cups options for(int i=0; i= 0 && fork() == 0) { // try lp and lpr (void)execvp("lpr", (char**)lprargs.data()); (void)execv("/bin/lpr", (char**)lprargs.data()); (void)execv("/usr/bin/lpr", (char**)lprargs.data()); (void)execvp("lp", (char**)lpargs.data()); (void)execv("/bin/lp", (char**)lpargs.data()); (void)execv("/usr/bin/lp", (char**)lpargs.data()); } // exit without running destructors (void)execlp("true", "true", (char *)0); (void)execl("/bin/true", "true", (char *)0); (void)execl("/usr/bin/true", "true", (char *)0); ::_exit(0); ::exit(0); } ::close(fds[0]); outputfd = fds[1]; output = fdopen(outputfd, "wb"); if (pid >= 0) { # if HAVE_WAITPID ::waitpid(pid, 0, 0); # else ::wait(0); # endif } else closeFile(); } #endif } } void QDjViewPSExporter::closeFile() { if (output) ::fclose(output); if (outputfd >= 0) ::close(outputfd); if (file.openMode()) file.close(); output = 0; outputfd = -1; printer = 0; } bool QDjViewPSExporter::save(QString fname) { if (output) return false; printer = 0; file.close(); file.setFileName(fname); return start(); } bool QDjViewPSExporter::print(QPrinter *qprinter) { if (output) return false; printer = qprinter; file.close(); file.setFileName(QString::null); QDjViewPrefs *prefs = QDjViewPrefs::instance(); prefs->printReverse = lastfirst; prefs->printCollate = collate; return start(); } bool QDjViewPSExporter::start() { QDjViewPrefs *prefs = QDjViewPrefs::instance(); QDjVuDocument *document = djview->getDocument(); int pagenum = djview->pageNum(); if (document==0 || pagenum <= 0) return false; int tpg = qBound(0, toPage, pagenum-1); int fpg = qBound(0, fromPage, pagenum-1); openFile(); if (! output) return false; // prepare arguments QList args; if (copies > 1) args << QString("--copies=%1").arg(copies).toLocal8Bit(); if (fromPage == toPage && pagenum > 1) args << QString("--pages=%1").arg(fpg+1).toLocal8Bit(); else if (fromPage != 0 || toPage != pagenum - 1) args << QString("--pages=%1-%2").arg(fpg+1).arg(tpg+1).toLocal8Bit(); if (! ui2.autoOrientCheckBox->isChecked()) { if (ui2.portraitButton->isChecked()) args << QByteArray("--orientation=portrait"); else if (ui2.landscapeButton->isChecked()) args << QByteArray("--orientation=landscape"); } if (ui2.zoomButton->isChecked()) args << QString("--zoom=%1").arg(ui2.zoomSpinBox->value()).toLocal8Bit(); if (ui1.frameCheckBox->isChecked()) args << QByteArray("--frame=yes"); if (ui1.cropMarksCheckBox->isChecked()) args << QByteArray("--cropmarks=yes"); if (ui1.levelSpinBox) args << QString("--level=%1").arg(ui1.levelSpinBox->value()).toLocal8Bit(); if (ui1.grayScaleButton->isChecked()) args << QByteArray("--color=no"); if (prefs && prefs->printerGamma != 0.0) { double gamma = qBound(0.3, prefs->printerGamma, 5.0); args << QByteArray("--colormatch=no"); args << QString("--gamma=%1").arg(gamma).toLocal8Bit(); } if (ui3.bookletCheckBox->isChecked()) { int bMode = ui3.rectoVersoCombo->currentIndex(); if (bMode == 1) args << QByteArray("--booklet=recto"); else if (bMode == 2) args << QByteArray("--booklet=verso"); else args << QByteArray("--booklet=yes"); int bMax = ui3.sheetsSpinBox->value(); if (bMax > 0) args << QString("--bookletmax=%1").arg(bMax).toLocal8Bit(); int bAlign = ui3.rectoVersoShiftSpinBox->value(); args << QString("--bookletalign=%1").arg(bAlign).toLocal8Bit(); int bCenter = ui3.centerMarginSpinBox->value(); int bIncr = ui3.centerIncreaseSpinBox->value() * 10; args << QString("--bookletfold=%1+%2") .arg(bCenter).arg(bIncr).toLocal8Bit(); } if (encapsulated) args << QByteArray("--format=eps"); QDjVuWidget::DisplayMode displayMode; displayMode = djview->getDjVuWidget()->displayMode(); if (displayMode == QDjVuWidget::DISPLAY_STENCIL) args << QByteArray("--mode=black"); else if (displayMode == QDjVuWidget::DISPLAY_BG) args << QByteArray("--mode=background"); else if (displayMode == QDjVuWidget::DISPLAY_FG) args << QByteArray("--mode=foreground"); // convert arguments int argc = args.count(); QVector argv(argc); for (int i=0; isendEvent(&djview->getDjVuContext(), new QEvent(QEvent::User)); disconnect(document, 0, this, 0); // main error message QString message = tr("Save job creation failed!"); error(message, __FILE__, __LINE__); return false; } job = new QDjVuJob(pjob, this); connect(job, SIGNAL(error(QString,QString,int)), this, SLOT(error(QString,QString,int)) ); connect(job, SIGNAL(progress(int)), this, SIGNAL(progress(int)) ); emit progress(0); refresh(); return true; } void QDjViewPSExporter::stop() { if (job && status() == DDJVU_JOB_STARTED) ddjvu_job_stop(*job); } ddjvu_status_t QDjViewPSExporter::status() { if (job) return ddjvu_job_status(*job); else if (failed) return DDJVU_JOB_FAILED; else return DDJVU_JOB_NOTSTARTED; } // ---------------------------------------- // QDJVIEWPAGEEXPORTER class QDjViewPageExporter : public QDjViewExporter { Q_OBJECT public: ~QDjViewPageExporter(); QDjViewPageExporter(QDialog *parent, QDjView *djview, QString name); virtual ddjvu_status_t status() { return curStatus; } public slots: virtual bool start(); virtual void stop(); virtual void error(QString message, QString filename, int lineno); protected slots: void checkPage(); protected: virtual void openFile() {} virtual void closeFile() {} virtual void doFinal() {} virtual void doPage() = 0; ddjvu_status_t curStatus; QDjVuPage *curPage; int curProgress; }; QDjViewPageExporter::~QDjViewPageExporter() { curStatus = DDJVU_JOB_NOTSTARTED; closeFile(); } QDjViewPageExporter::QDjViewPageExporter(QDialog *parent, QDjView *djview, QString name) : QDjViewExporter(parent, djview, name), curStatus(DDJVU_JOB_NOTSTARTED), curPage(0), curProgress(0) { } bool QDjViewPageExporter::start() { if (curStatus != DDJVU_JOB_STARTED) { curStatus = DDJVU_JOB_STARTED; openFile(); checkPage(); } if (curStatus <= DDJVU_JOB_OK) return true; return false; } void QDjViewPageExporter::stop() { if (curStatus == DDJVU_JOB_STARTED) curStatus = DDJVU_JOB_STOPPED; if (curPage) if (ddjvu_page_decoding_status(*curPage) == DDJVU_JOB_STARTED) ddjvu_job_stop(ddjvu_page_job(*curPage)); emit progress(curProgress); } void QDjViewPageExporter::error(QString message, QString filename, int lineno) { if (curStatus == DDJVU_JOB_STARTED) curStatus = DDJVU_JOB_FAILED; QDjViewExporter::error(message, filename, lineno); } void QDjViewPageExporter::checkPage() { QDjVuDocument *document = djview->getDocument(); int pagenum = djview->pageNum(); if (document==0 || pagenum <= 0) return; ddjvu_status_t pageStatus = DDJVU_JOB_NOTSTARTED; if (curPage) pageStatus = ddjvu_page_decoding_status(*curPage); if (pageStatus > DDJVU_JOB_OK) { curStatus = pageStatus; emit progress(curProgress); disconnect(curPage, 0, this, 0); delete curPage; curPage = 0; closeFile(); return; } int tpg = qBound(0, toPage, pagenum-1); int fpg = qBound(0, fromPage, pagenum-1); int nextPage = fpg; if (pageStatus == DDJVU_JOB_OK) { nextPage = curPage->pageNo() + 1; doPage(); curProgress = 100 * (nextPage - fpg) / (1 + tpg - fpg); disconnect(curPage, 0, this, 0); delete curPage; curPage = 0; if (curStatus < DDJVU_JOB_OK && nextPage > tpg) { curStatus = DDJVU_JOB_OK; doFinal(); } emit progress(curProgress); if (curStatus >= DDJVU_JOB_OK) closeFile(); } if (curStatus == DDJVU_JOB_STARTED && !curPage) { curPage = new QDjVuPage(document, nextPage, this); connect(curPage, SIGNAL(pageinfo()), this, SLOT(checkPage())); connect(curPage, SIGNAL(error(QString,QString,int)), this, SLOT(error(QString,QString,int)) ); if (ddjvu_page_decoding_done(*curPage)) QTimer::singleShot(0, this, SLOT(checkPage())); } } // ---------------------------------------- // QDJVIEWTIFFEXPORTER #include "ui_qdjviewexporttiff.h" class QDjViewTiffExporter : public QDjViewPageExporter { Q_OBJECT public: static QDjViewExporter *create(QDialog*, QDjView*, QString); static void setup(); public: ~QDjViewTiffExporter(); QDjViewTiffExporter(QDialog *parent, QDjView *djview, QString name); virtual void resetProperties(); virtual void loadProperties(QString group); virtual void saveProperties(QString group); virtual int propertyPages(); virtual QWidget* propertyPage(int num); virtual bool save(QString fileName); protected: virtual void closeFile(); virtual void doPage(); protected: void checkTiffSupport(); Ui::QDjViewExportTiff ui; QPointer page; QFile file; #if HAVE_TIFF TIFF *tiff; #else FILE *tiff; #endif }; QDjViewExporter* QDjViewTiffExporter::create(QDialog *parent, QDjView *djview, QString name) { if (name == "TIFF") return new QDjViewTiffExporter(parent, djview, name); return 0; } void QDjViewTiffExporter::setup() { addExporterData("TIFF", "tiff", tr("TIFF Document"), tr("TIFF Files (*.tiff *.tif)"), QDjViewTiffExporter::create); } QDjViewTiffExporter::~QDjViewTiffExporter() { closeFile(); delete page; } QDjViewTiffExporter::QDjViewTiffExporter(QDialog *parent, QDjView *djview, QString name) : QDjViewPageExporter(parent, djview, name), tiff(0) { page = new QWidget(); ui.setupUi(page); page->setObjectName(tr("TIFF Options", "tab caption")); resetProperties(); page->setWhatsThis(tr("TIFF options.
    " "The resolution box specifies an upper " "limit for the resolution of the TIFF images. " "Forcing bitonal G4 compression " "encodes all pages in black and white " "using the CCITT Group 4 compression. " "Allowing JPEG compression uses lossy JPEG " "for all non bitonal or subsampled images. " "Otherwise, allowing deflate compression " "produces more compact (but less portable) files " "than the default packbits compression." "") ); } void QDjViewTiffExporter::checkTiffSupport() { #ifdef CCITT_SUPPORT ui.bitonalCheckBox->setEnabled(true); #else ui.bitonalCheckBox->setEnabled(false); #endif #ifdef JPEG_SUPPORT ui.jpegCheckBox->setEnabled(true); ui.jpegSpinBox->setEnabled(true); #else ui.jpegCheckBox->setEnabled(false); ui.jpegSpinBox->setEnabled(false); #endif #ifdef ZIP_SUPPORT ui.deflateCheckBox->setEnabled(true); #else ui.deflateCheckBox->setEnabled(false); #endif } void QDjViewTiffExporter::resetProperties() { ui.dpiSpinBox->setValue(600); ui.bitonalCheckBox->setChecked(false); ui.jpegCheckBox->setChecked(true); ui.jpegSpinBox->setValue(75); ui.deflateCheckBox->setChecked(true); checkTiffSupport(); } void QDjViewTiffExporter::loadProperties(QString group) { QSettings s; if (group.isEmpty()) group = "Export-" + name(); s.beginGroup(group); ui.dpiSpinBox->setValue(s.value("dpi", 600).toInt()); ui.bitonalCheckBox->setChecked(s.value("bitonal", false).toBool()); ui.jpegCheckBox->setChecked(s.value("jpeg", true).toBool()); ui.jpegSpinBox->setValue(s.value("jpegQuality", 75).toInt()); ui.deflateCheckBox->setChecked(s.value("deflate", true).toBool()); checkTiffSupport(); } void QDjViewTiffExporter::saveProperties(QString group) { QSettings s; if (group.isEmpty()) group = "Export-" + name(); s.beginGroup(group); s.setValue("dpi", ui.dpiSpinBox->value()); s.setValue("bitonal", ui.bitonalCheckBox->isChecked()); s.setValue("jpeg", ui.jpegCheckBox->isChecked()); s.setValue("jpegQuality", ui.jpegSpinBox->value()); s.setValue("deflate", ui.deflateCheckBox->isChecked()); } int QDjViewTiffExporter::propertyPages() { return 1; } QWidget* QDjViewTiffExporter::propertyPage(int num) { if (num == 0) return page; return 0; } #if HAVE_TIFF static QDjViewTiffExporter *tiffExporter; static void tiffHandler(const char *, const char *fmt, va_list ap) { QString message; message.vsprintf(fmt, ap); tiffExporter->error(message, __FILE__, __LINE__); } #endif void QDjViewTiffExporter::closeFile() { #if HAVE_TIFF tiffExporter = this; TIFFSetErrorHandler(tiffHandler); TIFFSetWarningHandler(0); if (tiff) TIFFClose(tiff); #endif tiff = 0; QIODevice::OpenMode mode = file.openMode(); file.close(); if (curStatus > DDJVU_JOB_OK) if (mode & (QIODevice::WriteOnly|QIODevice::Append)) file.remove(); } bool QDjViewTiffExporter::save(QString fname) { if (file.openMode()) return false; file.setFileName(fname); return start(); } void QDjViewTiffExporter::doPage() { ddjvu_format_t *fmt = 0; char *image = 0; QString message; #if HAVE_TIFF tiffExporter = this; TIFFSetErrorHandler(tiffHandler); TIFFSetWarningHandler(0); QDjVuPage *page = curPage; // open file or write directory if (tiff) TIFFWriteDirectory(tiff); else if (file.open(QIODevice::ReadWrite)) tiff = TIFFFdOpen(wdup(file.handle()), file.fileName().toLocal8Bit().data(),"w"); if (!tiff) message = tr("Cannot open output file."); else { // determine rectangle ddjvu_rect_t rect; int imgdpi = ddjvu_page_get_resolution(*page); int dpi = qMin(imgdpi, ui.dpiSpinBox->value()); rect.x = rect.y = 0; rect.w = ( ddjvu_page_get_width(*page) * dpi + imgdpi/2 ) / imgdpi; rect.h = ( ddjvu_page_get_height(*page) * dpi + imgdpi/2 ) / imgdpi; // determine mode ddjvu_render_mode_t mode = DDJVU_RENDER_COLOR; QDjVuWidget::DisplayMode displayMode; displayMode = djview->getDjVuWidget()->displayMode(); if (ui.bitonalCheckBox->isChecked()) mode = DDJVU_RENDER_BLACK; else if (displayMode == QDjVuWidget::DISPLAY_STENCIL) mode = DDJVU_RENDER_BLACK; else if (displayMode == QDjVuWidget::DISPLAY_BG) mode = DDJVU_RENDER_BACKGROUND; else if (displayMode == QDjVuWidget::DISPLAY_FG) mode = DDJVU_RENDER_FOREGROUND; // determine format and compression ddjvu_page_type_t type = ddjvu_page_get_type(*page); ddjvu_format_style_t style = DDJVU_FORMAT_RGB24; int compression = COMPRESSION_NONE; if (ui.bitonalCheckBox->isChecked()) style = DDJVU_FORMAT_MSBTOLSB; else if (mode==DDJVU_RENDER_BLACK || type==DDJVU_PAGETYPE_BITONAL) style = (dpi == imgdpi) ? DDJVU_FORMAT_MSBTOLSB : DDJVU_FORMAT_GREY8; #ifdef CCITT_SUPPORT if (style == DDJVU_FORMAT_MSBTOLSB && TIFFFindCODEC(COMPRESSION_CCITT_T6)) compression = COMPRESSION_CCITT_T6; #endif #ifdef JPEG_SUPPORT else if (ui.jpegCheckBox->isChecked() && style != DDJVU_FORMAT_MSBTOLSB && TIFFFindCODEC(COMPRESSION_JPEG)) compression = COMPRESSION_JPEG; #endif #ifdef ZIP_SUPPORT else if (ui.deflateCheckBox->isChecked() && style != DDJVU_FORMAT_MSBTOLSB && TIFFFindCODEC(COMPRESSION_DEFLATE)) compression = COMPRESSION_DEFLATE; #endif #ifdef PACKBITS_SUPPORT else if (TIFFFindCODEC(COMPRESSION_PACKBITS)) compression = COMPRESSION_PACKBITS; #endif fmt = ddjvu_format_create(style, 0, 0); ddjvu_format_set_row_order(fmt, 1); ddjvu_format_set_gamma(fmt, 2.2); // set parameters int quality = ui.jpegSpinBox->value(); TIFFSetField(tiff, TIFFTAG_IMAGEWIDTH, (uint32)rect.w); TIFFSetField(tiff, TIFFTAG_IMAGELENGTH, (uint32)rect.h); TIFFSetField(tiff, TIFFTAG_XRESOLUTION, (float)(dpi)); TIFFSetField(tiff, TIFFTAG_YRESOLUTION, (float)(dpi)); TIFFSetField(tiff, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG); TIFFSetField(tiff, TIFFTAG_ORIENTATION, ORIENTATION_TOPLEFT); #ifdef CCITT_SUPPORT if (compression != COMPRESSION_CCITT_T6) #endif #ifdef JPEG_SUPPORT if (compression != COMPRESSION_JPEG) #endif #ifdef ZIP_SUPPORT if (compression != COMPRESSION_DEFLATE) #endif TIFFSetField(tiff, TIFFTAG_ROWSPERSTRIP, (uint32)64); if (style == DDJVU_FORMAT_MSBTOLSB) { TIFFSetField(tiff, TIFFTAG_BITSPERSAMPLE, (uint16)1); TIFFSetField(tiff, TIFFTAG_SAMPLESPERPIXEL, (uint16)1); TIFFSetField(tiff, TIFFTAG_FILLORDER, FILLORDER_MSB2LSB); TIFFSetField(tiff, TIFFTAG_COMPRESSION, compression); TIFFSetField(tiff, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_MINISWHITE); } else { TIFFSetField(tiff, TIFFTAG_BITSPERSAMPLE, (uint16)8); TIFFSetField(tiff, TIFFTAG_COMPRESSION, compression); #ifdef JPEG_SUPPORT if (compression == COMPRESSION_JPEG) TIFFSetField(tiff, TIFFTAG_JPEGQUALITY, quality); #endif if (style == DDJVU_FORMAT_GREY8) { TIFFSetField(tiff, TIFFTAG_SAMPLESPERPIXEL, (uint16)1); TIFFSetField(tiff, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_MINISBLACK); } else { TIFFSetField(tiff, TIFFTAG_SAMPLESPERPIXEL, (uint16)3); TIFFSetField(tiff, TIFFTAG_COMPRESSION, compression); #ifdef JPEG_SUPPORT if (compression == COMPRESSION_JPEG) { TIFFSetField(tiff, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_YCBCR); TIFFSetField(tiff, TIFFTAG_JPEGCOLORMODE, JPEGCOLORMODE_RGB); } else #endif TIFFSetField(tiff, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_RGB); } } // render and save char white = (char)0xff; int rowsize = rect.w * 3; if (style == DDJVU_FORMAT_MSBTOLSB) { white = 0x00; rowsize = (rect.w + 7) / 8; } else if (style == DDJVU_FORMAT_GREY8) rowsize = rect.w; if (! (image = (char*)malloc(rowsize * rect.h))) message = tr("Out of memory."); else if (rowsize != TIFFScanlineSize(tiff)) message = tr("Internal error."); else { char *s = image; ddjvu_rect_t *r = ▭ if (! ddjvu_page_render(*page, mode, r, r, fmt, rowsize, image)) memset(image, white, rowsize * rect.h); for (int i=0; i<(int)rect.h; i++, s+=rowsize) TIFFWriteScanline(tiff, s, i, 0); } } #else message = tr("TIFF export has not been compiled."); #endif if (! message.isEmpty()) error(message, __FILE__, __LINE__); if (fmt) ddjvu_format_release(fmt); if (image) free(image); } // ---------------------------------------- // QDJVIEWPDFEXPORTER class QDjViewPdfExporter : public QDjViewTiffExporter { Q_OBJECT public: static QDjViewExporter *create(QDialog*, QDjView*, QString); static void setup(); public: QDjViewPdfExporter(QDialog *parent, QDjView *djview, QString name); virtual bool save(QString fileName); protected: virtual void doFinal(); protected: QTemporaryFile tempFile; QFile pdfFile; }; QDjViewExporter* QDjViewPdfExporter::create(QDialog *parent, QDjView *djview, QString name) { if (name == "PDF") return new QDjViewPdfExporter(parent, djview, name); return 0; } void QDjViewPdfExporter::setup() { addExporterData("PDF", "pdf", tr("PDF Document"), tr("PDF Files (*.pdf)"), QDjViewPdfExporter::create); } QDjViewPdfExporter::QDjViewPdfExporter(QDialog *parent, QDjView *djview, QString name) : QDjViewTiffExporter(parent, djview, name) { page->setObjectName(tr("PDF Options", "tab caption")); page->setWhatsThis(tr("PDF options.
    " "These options control the characteristics of " "the images embedded in the exported PDF files. " "The resolution box limits their maximal resolution. " "Forcing bitonal G4 compression " "encodes all pages in black and white " "using the CCITT Group 4 compression. " "Allowing JPEG compression uses lossy JPEG " "for all non bitonal or subsampled images. " "Otherwise, allowing deflate compression " "produces more compact files. " "") ); } void QDjViewPdfExporter::doFinal() { QString message; // close tiff #if HAVE_TIFF2PDF tiffExporter = this; TIFFSetErrorHandler(tiffHandler); TIFFSetWarningHandler(0); if (tiff) TIFFClose(tiff); tiff = 0; // open files TIFF *input = 0; FILE *output = 0; QByteArray inameArray = file.fileName().toLocal8Bit(); QByteArray onameArray = pdfFile.fileName().toLocal8Bit(); file.close(); if (file.open(QIODevice::ReadOnly)) input = TIFFFdOpen(wdup(file.handle()), inameArray.data(), "r"); if (pdfFile.open(QIODevice::WriteOnly)) output = ::fdopen(wdup(pdfFile.handle()),"wb"); if (input && output) { const char *argv[3]; argv[0] = "tiff2pdf"; argv[1] = "-o"; argv[2] = onameArray.data(); if (tiff2pdf(input, output, 3, argv) != EXIT_SUCCESS) message = tr("Error while creating pdf file."); } else if (! output) { message = tr("Unable to create output file."); if (! pdfFile.errorString().isEmpty()) message = tr("System error: %1.").arg(pdfFile.errorString()); } else message = tr("Unable to reopen temporary file."); // close all if (input) TIFFClose(input); if (output) fclose(output); if (file.openMode()) file.close(); if (pdfFile.openMode()) pdfFile.close(); if (tempFile.openMode()) tempFile.close(); if (tempFile.exists()) tempFile.remove(); #else message = tr("PDF export was not compiled."); #endif if (!message.isEmpty()) { curStatus = DDJVU_JOB_FAILED; error(message, __FILE__, __LINE__); } } bool QDjViewPdfExporter::save(QString fname) { if (file.openMode() || tempFile.openMode() || pdfFile.openMode()) return false; pdfFile.setFileName(fname); tempFile.setFileTemplate(fname); if (tempFile.open()) { file.setFileName(tempFile.fileName()); tempFile.close(); return start(); } // prepare error message QString message = tr("Unable to create temporary file."); if (! tempFile.errorString().isEmpty()) message = tr("System error: %1.").arg(tempFile.errorString()); error(message, __FILE__, __LINE__); return false; } // ---------------------------------------- // QDJVIEWIMGEXPORTER class QDjViewImgExporter : public QDjViewPageExporter { Q_OBJECT public: static QDjViewExporter *create(QDialog*, QDjView*, QString); static void setup(); public: QDjViewImgExporter(QDialog *parent, QDjView *djview, QString name, QByteArray format); virtual bool exportOnePageOnly(); virtual bool save(QString fname); protected: virtual void doPage(); QString fileName; QByteArray format; }; QDjViewExporter* QDjViewImgExporter::create(QDialog *parent, QDjView *djview, QString name) { QByteArray format = name.toLocal8Bit(); QList formats = QImageWriter::supportedImageFormats(); if (formats.contains(format)) return new QDjViewImgExporter(parent, djview, name, format); return 0; } void QDjViewImgExporter::setup() { QByteArray format; QList formats = QImageWriter::supportedImageFormats(); foreach(format, formats) { QString name = QString::fromLocal8Bit(format); QString uname = name.toUpper(); QString suffix = name.toLower(); addExporterData(name, suffix, tr("%1 Image", "JPG Image").arg(uname), tr("%1 Files (*.%2)", "JPG Files").arg(uname).arg(suffix), QDjViewImgExporter::create); } } QDjViewImgExporter::QDjViewImgExporter(QDialog *parent, QDjView *djview, QString name, QByteArray format) : QDjViewPageExporter(parent, djview, name), format(format) { } bool QDjViewImgExporter::exportOnePageOnly() { return true; } bool QDjViewImgExporter::save(QString fname) { fileName = fname; return start(); } void QDjViewImgExporter::doPage() { QDjVuPage *page = curPage; // determine rectangle ddjvu_rect_t rect; int imgdpi = ddjvu_page_get_resolution(*page); int dpi = imgdpi; // (TODO: add property page with resolution!) rect.x = rect.y = 0; rect.w = ( ddjvu_page_get_width(*page) * dpi + imgdpi/2 ) / imgdpi; rect.h = ( ddjvu_page_get_height(*page) * dpi + imgdpi/2 ) / imgdpi; // prepare format ddjvu_format_t *fmt = 0; #if DDJVUAPI_VERSION < 18 unsigned int masks[3] = { 0xff0000, 0xff00, 0xff }; fmt = ddjvu_format_create(DDJVU_FORMAT_RGBMASK32, 3, masks); #else unsigned int masks[4] = { 0xff0000, 0xff00, 0xff, 0xff000000 }; fmt = ddjvu_format_create(DDJVU_FORMAT_RGBMASK32, 4, masks); #endif ddjvu_format_set_row_order(fmt, true); ddjvu_format_set_gamma(fmt, 2.2); // determine mode (TODO: add property page with mode!) ddjvu_render_mode_t mode = DDJVU_RENDER_COLOR; QDjVuWidget::DisplayMode displayMode; displayMode = djview->getDjVuWidget()->displayMode(); if (displayMode == QDjVuWidget::DISPLAY_STENCIL) mode = DDJVU_RENDER_BLACK; else if (displayMode == QDjVuWidget::DISPLAY_BG) mode = DDJVU_RENDER_BACKGROUND; else if (displayMode == QDjVuWidget::DISPLAY_FG) mode = DDJVU_RENDER_FOREGROUND; // compute image QString message; QImage img(rect.w, rect.h, QImage::Format_RGB32); if (! ddjvu_page_render(*page, mode, &rect, &rect, fmt, img.bytesPerLine(), (char*)img.bits() )) message = tr("Cannot render page."); else { QFile file(fileName); QImageWriter writer(&file, format); if (! writer.write(img)) { message = file.errorString(); file.remove(); if (writer.error() == QImageWriter::UnsupportedFormatError) message = tr("Image format %1 not supported.") .arg(QString::fromLocal8Bit(format).toUpper()); #if HAVE_STRERROR if (file.error() == QFile::OpenError && errno > 0) message = strerror(errno); #endif } } if (! message.isEmpty()) error(message, __FILE__, __LINE__); if (fmt) ddjvu_format_release(fmt); } // ---------------------------------------- // QDJVIEWPRNEXPORTER #include "ui_qdjviewexportprn.h" class QDjViewPrnExporter : public QDjViewPageExporter { Q_OBJECT public: static QDjViewExporter *create(QDialog*, QDjView*, QString); static void setup(); public: ~QDjViewPrnExporter(); QDjViewPrnExporter(QDialog *parent, QDjView *djview, QString name); virtual void resetProperties(); virtual void loadProperties(QString group); virtual void saveProperties(QString group); virtual bool loadPrintSetup(QPrinter *printer, QPrintDialog *dialog); virtual bool savePrintSetup(QPrinter *printer); virtual int propertyPages(); virtual QWidget* propertyPage(int num); virtual bool save(QString fileName); virtual bool print(QPrinter *printer); protected: virtual void closeFile(); virtual void doPage(); protected: Ui::QDjViewExportPrn ui; QPointer page; QPrinter *printer; QPainter *painter; QString fileName; }; QDjViewExporter* QDjViewPrnExporter::create(QDialog *parent, QDjView *djview, QString name) { if (name == "PRN") return new QDjViewPrnExporter(parent, djview, name); return 0; } void QDjViewPrnExporter::setup() { addExporterData("PRN", "prn", tr("Printer data"), tr("PRN Files (*.prn)"), QDjViewPrnExporter::create); } QDjViewPrnExporter::~QDjViewPrnExporter() { closeFile(); delete page; } QDjViewPrnExporter::QDjViewPrnExporter(QDialog *parent, QDjView *djview, QString name) : QDjViewPageExporter(parent, djview, name), printer(0), painter(0) { page = new QWidget(); ui.setupUi(page); page->setObjectName(tr("Printing Options", "tab caption")); resetProperties(); page->setWhatsThis(tr("Printing options.
    " "Option Color enables color printing. " "Document pages can be decorated with a frame. " "Option Scale to fit accommodates " "whatever paper size your printer uses. " "Zoom factor 100% reproduces the initial " "document size. Orientation Automatic " "chooses portrait or landscape on a page per " "page basis.") ); } void QDjViewPrnExporter::resetProperties() { ui.colorButton->setChecked(true); ui.frameCheckBox->setChecked(false); ui.cropMarksCheckBox->setChecked(false); ui.autoOrientCheckBox->setChecked(true); ui.scaleToFitButton->setChecked(true); ui.zoomSpinBox->setValue(100); } void QDjViewPrnExporter::loadProperties(QString group) { QSettings s; if (group.isEmpty()) group = "Export-" + name(); s.beginGroup(group); bool color = s.value("color", true).toBool(); ui.colorButton->setChecked(color); ui.grayScaleButton->setChecked(!color); ui.frameCheckBox->setChecked(s.value("frame", false).toBool()); ui.cropMarksCheckBox->setChecked(false); ui.autoOrientCheckBox->setChecked(s.value("autoOrient", true).toBool()); bool landscape = s.value("landscape",false).toBool(); ui.portraitButton->setChecked(!landscape); ui.landscapeButton->setChecked(landscape); int zoom = s.value("zoom",0).toInt(); ui.scaleToFitButton->setChecked(zoom == 0); ui.zoomButton->setChecked(zoom!=0); ui.zoomSpinBox->setValue(zoom ? qBound(25,zoom,2400) : 100); } void QDjViewPrnExporter::saveProperties(QString group) { QSettings s; if (group.isEmpty()) group = "Export-" + name(); s.beginGroup(group); s.setValue("color", ui.colorButton->isChecked()); s.setValue("frame", ui.frameCheckBox->isChecked()); s.setValue("autoOrient", ui.autoOrientCheckBox->isChecked()); s.setValue("landscape", ui.landscapeButton->isChecked()); int zoom = ui.zoomSpinBox->value(); s.setValue("zoom", QVariant(ui.zoomButton->isChecked() ? zoom : 0)); } bool QDjViewPrnExporter::loadPrintSetup(QPrinter *printer, QPrintDialog *) { bool grayscale = (printer->colorMode() == QPrinter::GrayScale); bool landscape = (printer->orientation() == QPrinter::Landscape); ui.grayScaleButton->setChecked(grayscale); ui.colorButton->setChecked(!grayscale); ui.landscapeButton->setChecked(landscape); ui.portraitButton->setChecked(!landscape); return true; } bool QDjViewPrnExporter::savePrintSetup(QPrinter *printer) { bool grayscale = ui.grayScaleButton->isChecked(); bool landscape = ui.landscapeButton->isChecked(); printer->setColorMode(grayscale ? QPrinter::GrayScale : QPrinter::Color); printer->setOrientation(landscape ? QPrinter::Landscape : QPrinter::Portrait); return true; } int QDjViewPrnExporter::propertyPages() { return 1; } QWidget* QDjViewPrnExporter::propertyPage(int num) { if (num == 0) return page; return 0; } bool QDjViewPrnExporter::save(QString fileName) { closeFile(); this->fileName = fileName; printer = new QPrinter(QPrinter::HighResolution); printer->setOutputFileName(fileName); #if defined(Q_OS_UNIX) && !defined(Q_WS_MAC) printer->setOutputFormat(QPrinter::PostScriptFormat); #endif return start(); } bool QDjViewPrnExporter::print(QPrinter *printer) { closeFile(); this->printer = printer; return start(); } void QDjViewPrnExporter::closeFile() { if (painter) delete painter; painter = 0; if (printer && !fileName.isEmpty()) delete printer; printer = 0; if (curStatus > DDJVU_JOB_OK && !fileName.isEmpty()) ::remove(QFile::encodeName(fileName).data()); fileName = QString(); } void QDjViewPrnExporter::doPage() { QDjVuPage *page = curPage; // determine zoom factor and rectangles ddjvu_rect_t rect; rect.x = rect.y = 0; rect.w = ddjvu_page_get_width(*page); rect.h = ddjvu_page_get_height(*page); QRect pageRect = printer->pageRect(); bool landscape = false; int prndpi = printer->resolution(); int imgdpi = ddjvu_page_get_resolution(*page); if (ui.autoOrientCheckBox->isChecked()) landscape = (rect.w > rect.h) ^ (pageRect.width() > pageRect.height()); else if (ui.landscapeButton->isChecked()) landscape = true; int printW = (landscape) ? pageRect.height() : pageRect.width(); int printH = (landscape) ? pageRect.width() : pageRect.height(); int targetW = (rect.w * prndpi + imgdpi/2 ) / imgdpi; int targetH = (rect.h * prndpi + imgdpi/2 ) / imgdpi; int zoom = 100; if (ui.zoomButton->isChecked()) zoom = qBound(25, ui.zoomSpinBox->value(), 2400); else if (ui.scaleToFitButton->isChecked()) zoom = qMin( printW * 100 / targetW, printH * 100 / targetH); targetW = targetW * zoom / 100; targetH = targetH * zoom / 100; int dpi = qMin(prndpi * zoom / 100, imgdpi); rect.w = ( rect.w * dpi + imgdpi/2 ) / imgdpi; rect.h = ( rect.h * dpi + imgdpi/2 ) / imgdpi; // create image QImage::Format imageFormat = QImage::Format_RGB32; if (ddjvu_page_get_type(*page) == DDJVU_PAGETYPE_BITONAL && dpi >= imgdpi) imageFormat = QImage::Format_Mono; else if (ui.grayScaleButton->isChecked()) imageFormat = QImage::Format_Indexed8; QImage img(rect.w, rect.h, imageFormat); // render bool rendered = false; ddjvu_format_t *fmt = 0; ddjvu_render_mode_t mode = DDJVU_RENDER_COLOR; QDjViewPrefs *prefs = QDjViewPrefs::instance(); if (imageFormat == QImage::Format_RGB32) { #if DDJVUAPI_VERSION < 18 unsigned int masks[3] = { 0xff0000, 0xff00, 0xff }; fmt = ddjvu_format_create(DDJVU_FORMAT_RGBMASK32, 3, masks); #else unsigned int masks[4] = { 0xff0000, 0xff00, 0xff, 0xff000000 }; fmt = ddjvu_format_create(DDJVU_FORMAT_RGBMASK32, 4, masks); #endif if (prefs->printerGamma > 0) ddjvu_format_set_gamma(fmt, prefs->printerGamma); ddjvu_format_set_row_order(fmt, true); if (ddjvu_page_render(*page, mode, &rect, &rect, fmt, img.bytesPerLine(), (char*)img.bits() )) rendered = true; } else if (imageFormat == QImage::Format_Indexed8) { img.setNumColors(256); for (int i=0; i<256; i++) img.setColor(i, qRgb(i,i,i)); fmt = ddjvu_format_create(DDJVU_FORMAT_GREY8, 0, 0); if (prefs->printerGamma > 0) ddjvu_format_set_gamma(fmt, prefs->printerGamma); ddjvu_format_set_row_order(fmt, true); if (ddjvu_page_render(*page, mode, &rect, &rect, fmt, img.bytesPerLine(), (char*)img.bits() )) rendered = true; } else if (imageFormat == QImage::Format_Mono) { fmt = ddjvu_format_create(DDJVU_FORMAT_MSBTOLSB, 0, 0); ddjvu_format_set_row_order(fmt, true); if (ddjvu_page_render(*page, mode, &rect, &rect, fmt, img.bytesPerLine(), (char*)img.bits() )) rendered = true; if (rendered) img.invertPixels(); } // prepare painter if (! painter) painter = new QPainter(printer); else printer->newPage(); // prepare settings painter->save(); if (landscape) { painter->translate(QPoint(pageRect.width(),0)); painter->rotate(90); } painter->translate(qMax(0, (printW-targetW)/2), qMax(0, (printH-targetH)/2)); // print page QRect sourceRect(0,0,rect.w,rect.h); QRect targetRect(0,0,targetW,targetH); if (rendered) painter->drawImage(targetRect, img, sourceRect); QPen pen(Qt::black, 0, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin); painter->setPen(pen); painter->setBrush(Qt::NoBrush); if (ui.frameCheckBox->isChecked()) painter->drawRect(targetRect); // finish painter->restore(); if (! rendered) { QString pageName = djview->pageName(curPage->pageNo()); error(tr("Cannot render page %1.").arg(pageName), __FILE__, __LINE__); } if (fmt) ddjvu_format_release(fmt); fmt = 0; } // ---------------------------------------- // CREATEEXPORTERDATA static void createExporterData() { QDjViewDjVuExporter::setup(); #if HAVE_TIFF2PDF QDjViewPdfExporter::setup(); #endif #if HAVE_TIFF QDjViewTiffExporter::setup(); #endif QDjViewPSExporter::setup(); QDjViewImgExporter::setup(); QDjViewPrnExporter::setup(); } // ---------------------------------------- // MOC #include "qdjviewexporters.moc" /* ------------------------------------------------------------- Local Variables: c++-font-lock-extra-types: ( "\\sw+_t" "[A-Z]\\sw*[a-z]\\sw*" ) End: ------------------------------------------------------------- */ djview4/src/qdjviewexporters.h000066400000000000000000000052101174072760700170300ustar00rootroot00000000000000//C- -*- C++ -*- //C- ------------------------------------------------------------------- //C- DjView4 //C- Copyright (c) 2006- Leon Bottou //C- //C- This software is subject to, and may be distributed under, the //C- GNU General Public License, either version 2 of the license, //C- or (at your option) any later version. The license should have //C- accompanied the software or you may obtain a copy of the license //C- from the Free Software Foundation at http://www.fsf.org . //C- //C- This program is distributed in the hope that it will be useful, //C- but WITHOUT ANY WARRANTY; without even the implied warranty of //C- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //C- GNU General Public License for more details. //C- ------------------------------------------------------------------ #ifndef QDJVIEWEXPORTERS_H #define QDJVIEWEXPORTERS_H #if AUTOCONF # include "config.h" #endif #include #include #include #include #include #include class QPrinter; class QPrintDialog; #include #include #include "qdjview.h" #include "qdjviewdialogs.h" // ----------- QDJVIEWEXPORTER class QDjViewExporter : public QObject { Q_OBJECT public: virtual ~QDjViewExporter(); virtual bool exportOnePageOnly(); virtual void setFromTo(int fromPage, int toPage); virtual void setErrorCaption(QString); virtual void resetProperties(); virtual void loadProperties(QString group=QString::null); virtual void saveProperties(QString group=QString::null); virtual bool loadPrintSetup(QPrinter *printer, QPrintDialog *dialog); virtual bool savePrintSetup(QPrinter *printer); virtual int propertyPages(); virtual QWidget* propertyPage(int num); virtual ddjvu_status_t status(); virtual QString name(); public slots: virtual bool save(QString fileName) = 0; virtual bool print(QPrinter *printer); virtual void stop(); virtual void error(QString, QString, int); signals: void progress(int i); protected: friend class QDjViewExporterFactory; QDjViewExporter(QDialog *parent, QDjView *djview, QString name); QDialog *parent; QDjView *djview; QDjViewErrorDialog *errorDialog; QString errorCaption; QString exporterName; int fromPage; int toPage; public: static QDjViewExporter *create(QDialog*, QDjView*, QString name); static QStringList names(); static QStringList info(QString name); }; #endif /* ------------------------------------------------------------- Local Variables: c++-font-lock-extra-types: ( "\\sw+_t" "[A-Z]\\sw*[a-z]\\sw*" ) End: ------------------------------------------------------------- */ djview4/src/qdjviewexportprn.ui000066400000000000000000000141121174072760700172250ustar00rootroot00000000000000 QDjViewExportPrn 0 0 350 255 Form Color 6 &Color true &GrayScale Marks 6 Print image &frame false Print crop &marks Scaling Scale to &fit the page true 6 &Zoom false % 25 2400 25 100 Orientation 6 Automatic true false &Portrait false &Landscape zoomButton toggled(bool) zoomSpinBox setEnabled(bool) 60 204 128 212 autoOrientCheckBox toggled(bool) portraitButton setDisabled(bool) 298 162 309 195 autoOrientCheckBox toggled(bool) landscapeButton setDisabled(bool) 255 155 264 222 djview4/src/qdjviewexportps1.ui000066400000000000000000000077301174072760700171410ustar00rootroot00000000000000 QDjViewExportPS1 0 0 323 202 Form 9 6 0 6 Color 9 6 &Color true &GrayScale Marks 9 6 Print image &frame Print crop &marks PostScript 9 6 Language Level 3 1 2 Qt::Horizontal 5 5 Qt::Vertical 1 1 djview4/src/qdjviewexportps2.ui000066400000000000000000000100471174072760700171350ustar00rootroot00000000000000 QDjViewExportPS2 0 0 344 157 Form 9 6 0 6 Scaling 9 6 Scale to &fit the page true 0 6 &Zoom % 2400 25 25 100 Orientation 9 6 Automatic true &Portrait &Landscape Qt::Vertical 20 0 djview4/src/qdjviewexportps3.ui000066400000000000000000000155501174072760700171420ustar00rootroot00000000000000 QDjViewExportPS3 0 0 417 230 Form 9 6 Print sheets suitable for folding a booklet. Advanced 9 6 0 6 Sheets per booklet: Unlimited at most 1000 Qt::Horizontal 5 5 0 6 Print 160 10 rectos and versos. rectos only. versos only. Qt::Horizontal 5 5 0 6 Shift rectos and versos by points. 72 -72 Qt::Horizontal 5 5 0 6 Center: points 144 18 plus /100 200 10 40 per page. Qt::Vertical 20 0 djview4/src/qdjviewexporttiff.ui000066400000000000000000000125221174072760700173610ustar00rootroot00000000000000 QDjViewExportTiff 0 0 355 248 Form 9 6 Resolution 9 6 Maximum image resolution dpi 9600 50 600 Qt::Horizontal 5 5 Compression 9 6 Force &bitonal G4 compression. Allow &lossy JPEG compression. true 0 6 Qt::Horizontal QSizePolicy::Fixed 40 5 JPEG &quality jpegSpinBox 100 50 75 Qt::Horizontal 5 5 Allow &deflate compression. true Qt::Vertical 305 16 bitonalCheckBox jpegCheckBox jpegSpinBox jpegCheckBox toggled(bool) jpegSpinBox setEnabled(bool) 94 80 194 115 djview4/src/qdjviewinfodialog.ui000066400000000000000000000151001174072760700172750ustar00rootroot00000000000000 QDjViewInfoDialog 0 0 600 320 Dialog 9 6 &Document 9 6 5 5 0 0 0 30 QFrame::Box QFrame::Raised Qt::PlainText Qt::AlignCenter Qt::ScrollBarAlwaysOff QAbstractItemView::NoEditTriggers QAbstractItemView::SelectRows true &File 9 6 0 6 File: :/images/icon_prev.png 1 0 1 0 :/images/icon_next.png Qt::Horizontal 40 20 &View Page QFrame::Box QFrame::Raised QTextEdit::NoWrap true 0 6 Qt::Horizontal 131 31 &Close true Qt::Horizontal 40 20 okButton clicked() QDjViewInfoDialog accept() 278 253 96 254 djview4/src/qdjviewmetadialog.ui000066400000000000000000000130421174072760700172730ustar00rootroot00000000000000 QDjViewMetaDialog 0 0 600 320 Dialog 9 6 &Document Metadata 9 6 QAbstractItemView::NoEditTriggers QAbstractItemView::SingleSelection true &Page Metadata 9 6 0 6 Page: :/images/icon_prev.png 1 0 1 0 :/images/icon_next.png Qt::Horizontal 40 20 &View Page QAbstractItemView::NoEditTriggers QAbstractItemView::SingleSelection true 0 6 Qt::Horizontal 131 31 &Close true Qt::Horizontal 40 20 okButton clicked() QDjViewMetaDialog accept() 278 253 96 254 djview4/src/qdjviewplugin.cpp000066400000000000000000001115651174072760700166410ustar00rootroot00000000000000//C- -*- C++ -*- //C- ------------------------------------------------------------------- //C- DjView4 //C- Copyright (c) 2006- Leon Bottou //C- //C- This software is subject to, and may be distributed under, the //C- GNU General Public License, either version 2 of the license, //C- or (at your option) any later version. The license should have //C- accompanied the software or you may obtain a copy of the license //C- from the Free Software Foundation at http://www.fsf.org . //C- //C- This program is distributed in the hope that it will be useful, //C- but WITHOUT ANY WARRANTY; without even the implied warranty of //C- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //C- GNU General Public License for more details. //C- ------------------------------------------------------------------ #if AUTOCONF # include "config.h" #endif #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "qdjvu.h" #include "qdjview.h" #include "qdjviewplugin.h" #include "djview.h" #include #include #include #include #include #include #include #include #include #ifdef Q_WS_X11 # ifndef X_DISPLAY_MISSING # include # include # include # undef FocusOut # undef FocusIn # undef KeyPress # undef KeyRelease # undef None # undef RevertToParent # undef GrayScale # undef CursorShape # define HAVE_X11 1 # endif #endif #ifdef Q_WS_X11 # include # include # define HAVE_QX11EMBED 1 #endif // ======================================== // STRUCTURES // ======================================== class QDjViewPlugin::Document : public QDjVuDocument { Q_OBJECT public: QDjViewPlugin::Instance * const instance; Document(QDjViewPlugin::Instance *instance); virtual void newstream(int streamid, QString name, QUrl url); }; class QDjViewPlugin::Forwarder : public QObject { Q_OBJECT public: QDjViewPlugin * const dispatcher; Forwarder(QDjViewPlugin *dispatcher); virtual bool eventFilter(QObject*, QEvent*); public slots: void containerClosed(); void showStatus(QString message); void getUrl(QUrl url, QString target); void onChange(); void quit(); void dispatch(); void lastViewerClosed(); void continueExec(); }; // QDjViewPlugin, Stream and Instance cannot be QObjects // because subtle errors occur when one creates QObjects // before the QApplication. struct QDjViewPlugin::Stream { typedef QDjViewPlugin::Instance Instance; QUrl url; Instance *instance; int streamid; bool started; bool checked; bool closed; ~Stream(); Stream(int streamid, QUrl url, Instance *instance); }; struct QDjViewPlugin::Instance { QUrl url; QDjViewPlugin *dispatcher; QPointer document; QPointer shell; QPointer djview; XID container; QStringList args; QByteArray saved; int savedformat; int onchange; QDjView::ViewerMode viewerMode; ~Instance(); Instance(QDjViewPlugin *dispatcher); void open(); void destroy(); void save(QDjVuWidget*); void restore(QDjVuWidget*); }; // ======================================== // FIXING TRANSIENT WINDOW PROPERTIES // ======================================== #if HAVE_X11 static Atom wm_state; static Atom wm_client_leader; static Window x11ToplevelWindow(Display *dpy, Window start) { Window shell = 0; if (!dpy || !start) return 0; if (! wm_state) wm_state = XInternAtom(dpy, "WM_STATE", True); if (! wm_state) return 0; while (1) { int nprops; Atom *props = XListProperties(dpy, start, &nprops); if (props && nprops) { for(int i=0; iparentWidget(); Display *dpy = QX11Info::display(); if (dpy && parent && (widget->windowFlags() & Qt::Window)) { Window transient = 0; XGetTransientForHint(dpy, widget->winId(), &transient); if (transient) { Window group = 0; XWMHints *wmhints = XGetWMHints(dpy, widget->winId()); if (wmhints && (wmhints->flags & WindowGroupHint)) group = wmhints->window_group; Window ntransient = x11ToplevelWindow(dpy, parent->winId()); Window ngroup = 0; if (ntransient) { XWMHints *morehints = XGetWMHints(dpy, ntransient); if (morehints && (morehints->flags & WindowGroupHint)) ngroup = morehints->window_group; if (morehints) XFree(morehints); if (transient == group && ngroup) ntransient = ngroup; XSetTransientForHint(dpy, widget->winId(), ntransient); } if (ngroup) { wmhints->flags |= WindowGroupHint; wmhints->window_group = ngroup; XSetWMHints(dpy, widget->winId(), wmhints); if (! wm_client_leader) wm_client_leader = XInternAtom(dpy, "WM_CLIENT_LEADER", True); if (wm_client_leader) XChangeProperty(dpy, widget->winId(), wm_client_leader, XA_WINDOW, 32, PropModeReplace, (unsigned char*)&ngroup, 1); } if (wmhints) XFree(wmhints); } } } #endif // ======================================== // STREAM // ======================================== QDjViewPlugin::Stream::Stream(int streamid, QUrl url, Instance *instance) : url(url), instance(instance), streamid(streamid), started(false), checked(false), closed(false) { if (instance->dispatcher) instance->dispatcher->streamCreated(this); } QDjViewPlugin::Stream::~Stream() { if (instance->dispatcher) instance->dispatcher->streamDestroyed(this); } // ======================================== // DOCUMENT // ======================================== QDjViewPlugin::Document::Document(QDjViewPlugin::Instance *instance) : QDjVuDocument(true), instance(instance) { QUrl docurl = QDjView::removeDjVuCgiArguments(instance->url); setUrl(instance->dispatcher->context, docurl); } void QDjViewPlugin::Document::newstream(int streamid, QString, QUrl url) { if (streamid > 0) { new QDjViewPlugin::Stream(streamid, url, instance); QString message = tr("Requesting %1.").arg(url.toString()); instance->dispatcher->showStatus(instance, message); instance->dispatcher->getUrl(instance, url, QString()); } } // ======================================== // FORWARDER // ======================================== QDjViewPlugin::Forwarder::Forwarder(QDjViewPlugin *dispatcher) : QObject(), dispatcher(dispatcher) { // The purpose of the Forwarder is to redirect // certain signals towards the QDjViewPlugin // (which cannot be a QObject.) } void QDjViewPlugin::Forwarder::containerClosed() { #if HAVE_QX11EMBED QX11EmbedWidget *shell = qobject_cast(sender()); Instance *instance = dispatcher->findInstance(shell); if (instance && dispatcher->xembedFlag) instance->destroy(); #endif } void QDjViewPlugin::Forwarder::showStatus(QString message) { QDjView *viewer = qobject_cast(sender()); Instance *instance = dispatcher->findInstance(viewer); if (instance) dispatcher->showStatus(instance, message); } void QDjViewPlugin::Forwarder::getUrl(QUrl url, QString target) { QDjView *viewer = qobject_cast(sender()); Instance *instance = dispatcher->findInstance(viewer); if (! target.size()) target = "_self"; if (instance) dispatcher->getUrl(instance, url, target); } void QDjViewPlugin::Forwarder::onChange() { QDjView *viewer = qobject_cast(sender()); Instance *instance = dispatcher->findInstance(viewer); if (instance) dispatcher->onChange(instance); } void QDjViewPlugin::Forwarder::quit() { dispatcher->quit(); } void QDjViewPlugin::Forwarder::dispatch() { dispatcher->dispatch(); } void QDjViewPlugin::Forwarder::lastViewerClosed() { dispatcher->lastViewerClosed(); } void QDjViewPlugin::Forwarder::continueExec() { dispatcher->continueExec(); } #if HAVE_X11 static bool x11EventFilter(void *message, long *) { // We define a low level handler because we need to make // the window active before calling the QX11EmbedWidget event filter. XEvent *event = reinterpret_cast(message); if (event->type == ButtonPress) { QWidget *w = QWidget::find(event->xbutton.window); if (w && w->window()->objectName() == "djvu_shell") { QApplication *app = (QApplication*)QCoreApplication::instance(); app->setActiveWindow(w->window()); } } return false; } #endif bool QDjViewPlugin::Forwarder::eventFilter(QObject *o, QEvent *e) { if (o->isWidgetType()) { QWidget *w = static_cast(o); switch( e->type() ) { #ifdef Q_WS_X11 // Try to fix transient windows properties. // - this does not work too well... case QEvent::Show: if (w->windowFlags() & Qt::Window) QApplication::postEvent(w, new QEvent(QEvent::User)); break; case QEvent::User: if (w->windowFlags() & Qt::Window) x11SetTransientForHint(w); break; #endif default: break; } } // Keep processing return false; } // ======================================== // INSTANCE // ======================================== QDjViewPlugin::Instance::~Instance() { destroy(); delete shell; delete djview; if (document) document->deref(); document = 0; } QDjViewPlugin::Instance::Instance(QDjViewPlugin *parent) : url(), dispatcher(parent), document(0), shell(0), djview(0), container(0), onchange(0) { } void QDjViewPlugin::Instance::open() { if (!document && url.isValid()) { document = new QDjViewPlugin::Document(this); document->ref(); } if (document && djview && !djview->getDocument()) { djview->open(document, url); restore(djview->getDjVuWidget()); shell->show(); } } void QDjViewPlugin::Instance::destroy() { if (djview) { save(djview->getDjVuWidget()); djview->close(); djview = 0; } if (shell) { #if HAVE_X11 Display *dpy = QX11Info::display(); XUnmapWindow(dpy, shell->winId()); XReparentWindow(dpy, shell->winId(), QX11Info::appRootWindow(), 0,0); #endif shell->close(); dispatcher->registerForDeletion(shell); container = 0; shell = 0; } } void QDjViewPlugin::Instance::save(QDjVuWidget *widget) { if (widget) { int q[4]; // get info int zoom = widget->zoom(); int rotation = widget->rotation(); bool sideBySide = widget->sideBySide(); bool continuous = widget->continuous(); QDjVuWidget::DisplayMode mode = widget->displayMode(); QDjVuWidget::Position pos = widget->position(); // pack info into four bytes for compatibility. q[0] = 0; q[1] = pos.pageNo; q[2] = pos.posView.x(); q[3] = pos.posView.y(); q[0] |= (rotation & 0x3) << 12; if (zoom >= 0) q[0] = zoom & 0x7ff; else q[0] = 0x1000 - ((- zoom) & 0x7ff); if (sideBySide) q[0] |= 0x4000; if (continuous) q[0] |= 0x8000; q[0] |= (((int)mode) & 0xf) << 16; // make sure first two integers are positive. q[0] |= 0x40000000; q[1] |= 0x40000000; // store saved = QByteArray((const char*)q, sizeof(q)); } } void QDjViewPlugin::Instance::restore(QDjVuWidget *widget) { int q[4]; if (saved.size()==sizeof(q) && widget) { // unpack memcpy((void*)q, (const char*)saved, sizeof(q)); int zoom = q[0] & 0xfff; if (zoom & 0x800) zoom -= 0x1000; int rotation = (q[0] & 0x3000) >> 12; bool sideBySide = !! (q[0] & 0x4000); bool continuous = !! (q[0] & 0x8000); QDjVuWidget::DisplayMode mode = (QDjVuWidget::DisplayMode)((q[0] & 0xf0000) >> 16); QDjVuWidget::Position pos; pos.inPage = false; pos.pageNo = (q[1] & 0xfffffff); pos.posView.rx() = q[2]; pos.posView.ry() = q[3]; // apply widget->setZoom(zoom); widget->setRotation(rotation); widget->setSideBySide(sideBySide); widget->setContinuous(continuous); widget->setDisplayMode(mode); widget->setPosition(pos); } } // ======================================== // PROTOCOL // ======================================== enum { TYPE_INTEGER = 1, TYPE_DOUBLE = 2, TYPE_STRING = 3, TYPE_POINTER = 4, TYPE_ARRAY = 5 }; enum { CMD_SHUTDOWN = 0, CMD_NEW = 1, CMD_DETACH_WINDOW = 2, CMD_ATTACH_WINDOW = 3, CMD_RESIZE = 4, CMD_DESTROY = 5, CMD_PRINT = 6, CMD_NEW_STREAM = 7, CMD_WRITE = 8, CMD_DESTROY_STREAM = 9, CMD_SHOW_STATUS = 10, CMD_GET_URL = 11, CMD_GET_URL_NOTIFY = 12, CMD_URL_NOTIFY = 13, CMD_HANDSHAKE = 14, CMD_SET_DJVUOPT = 15, CMD_GET_DJVUOPT = 16, CMD_ON_CHANGE = 17, }; #define OK_STRING "OK" #define ERR_STRING "ERR" void QDjViewPlugin::write(int fd, const char *ptr, int size) { while(size>0) { errno = 0; int res = ::write(fd, ptr, size); if (res<0 && errno==EINTR) continue; if (res<=0) throw res; size -= res; ptr += res; } } void QDjViewPlugin::read(int fd, char *buffer, int size) { char *ptr = buffer; while(size>0) { errno = 0; int res = ::read(fd, ptr, size); if (res<0 && errno==EINTR) continue; if (res <= 0) throw res; size -= res; ptr += res; } } void QDjViewPlugin::writeString(int fd, QByteArray s) { int type = TYPE_STRING; int length = s.size(); write(fd, (const char*)&type, sizeof(type)); write(fd, (const char*)&length, sizeof(length)); write(fd, s.data(), length+1); } void QDjViewPlugin::writeString(int fd, QString x) { writeString(fd, x.toUtf8()); } void QDjViewPlugin::writeInteger(int fd, int x) { int type = TYPE_INTEGER; write(fd, (const char*)&type, sizeof(type)); write(fd, (const char*)&x, sizeof(x)); } void QDjViewPlugin::writeDouble(int fd, double x) { int type = TYPE_DOUBLE; write(fd, (const char*)&type, sizeof(type)); write(fd, (const char*)&x, sizeof(x)); } void QDjViewPlugin::writePointer(int fd, const void *x) { int type = TYPE_POINTER; write(fd, (const char*)&type, sizeof(type)); write(fd, (const char*)&x, sizeof(x)); } void QDjViewPlugin::writeArray(int fd, QByteArray s) { int type = TYPE_ARRAY; int length = s.size(); write(fd, (const char*)&type, sizeof(type)); write(fd, (const char*)&length, sizeof(length)); write(fd, s.data(), length); } QString QDjViewPlugin::readString(int fd) { int type, length; read(fd, (char*)&type, sizeof(type)); if (type != TYPE_STRING) throw 1; read(fd, (char*)&length, sizeof(length)); if (length < 0) throw 2; QByteArray utf(length+1, 0); read(fd, utf.data(), length+1); return QString::fromUtf8(utf); } QByteArray QDjViewPlugin::readRawString(int fd) { int type, length; read(fd, (char*)&type, sizeof(type)); if (type != TYPE_STRING) throw 1; read(fd, (char*)&length, sizeof(length)); if (length < 0) throw 2; QByteArray x(length+1, 0); read(fd, x.data(), length+1); x.truncate(length); return x; } int QDjViewPlugin::readInteger(int fd) { int type; read(fd, (char*)&type, sizeof(type)); if (type != TYPE_INTEGER) throw 1; int x; read(fd, (char*)&x, sizeof(x)); return x; } double QDjViewPlugin::readDouble(int fd) { int type; read(fd, (char*)&type, sizeof(type)); if (type != TYPE_DOUBLE) throw 1; double x; read(fd, (char*)&x, sizeof(x)); return x; } void* QDjViewPlugin::readPointer(int fd) { int type; read(fd, (char*)&type, sizeof(type)); if (type != TYPE_POINTER) throw 1; void *x; read(fd, (char*)&x, sizeof(x)); return x; } QByteArray QDjViewPlugin::readArray(int fd) { int type, length; read(fd, (char*)&type, sizeof(type)); if (type != TYPE_ARRAY) throw 1; read(fd, (char*)&length, sizeof(length)); if (length < 0) throw 2; QByteArray x(length, 0); read(fd, x.data(), length); return x; } // ======================================== // COMMANDS // ======================================== void QDjViewPlugin::cmdNew() { // read arguments bool fullPage = !!readInteger(pipeRead); readString(pipeRead); // djvuDir (unused) int argc = readInteger(pipeRead); QStringList args; for (int i=0; i(argv)); application->setQuitOnLastWindowClosed(false); #if HAVE_X11 application->setEventFilter(x11EventFilter); XCloseDisplay(dpy); #endif argc = 1; context = application->djvuContext(); forwarder = new Forwarder(this); application->installEventFilter(forwarder); QObject::connect(application, SIGNAL(lastWindowClosed()), forwarder, SLOT(lastViewerClosed())); notifier = new QSocketNotifier(pipeRead, QSocketNotifier::Read); QObject::connect(notifier, SIGNAL(activated(int)), forwarder, SLOT(dispatch())); timer = new QTimer(); timer->setSingleShot(true); timer->start(5*60*1000); QObject::connect(timer, SIGNAL(timeout()), forwarder, SLOT(quit())); #if HAVE_QX11EMBED if (protocol.startsWith("XEMBED")) xembedFlag = true; #endif } // create djview object QWidget *shell = instance->shell; QDjView *djview = instance->djview; if (! shell) { #if HAVE_QX11EMBED if (xembedFlag) { QX11EmbedWidget *embed = new QX11EmbedWidget(); shell = embed; QObject::connect(shell, SIGNAL(containerClosed()), forwarder, SLOT(containerClosed()) ); shell->setObjectName("djvu_shell"); shell->setGeometry(0, 0, width, height); embed->embedInto(window); } else #endif { shell = new QWidget(); shell->setObjectName("djvu_shell"); shell->setGeometry(0, 0, width, height); #if HAVE_X11 Display *dpy = QX11Info::display(); XReparentWindow(dpy, shell->winId(), (Window)window, 0,0); #else qWarning("djview: unable to embed the djview window."); #endif } djview = new QDjView(*context, instance->viewerMode, shell); djview->setWindowFlags(djview->windowFlags() & ~Qt::Window); djview->setAttribute(Qt::WA_DeleteOnClose, false); #if QT_VERSION >= 0x40400 djview->setAttribute(Qt::WA_NativeWindow, true); #endif QLayout *layout = new QHBoxLayout(shell); layout->setMargin(0); layout->setSpacing(0); layout->addWidget(djview); QObject::connect(djview, SIGNAL(pluginStatusMessage(QString)), forwarder, SLOT(showStatus(QString)) ); QObject::connect(djview, SIGNAL(pluginGetUrl(QUrl,QString)), forwarder, SLOT(getUrl(QUrl,QString)) ); QObject::connect(djview, SIGNAL(pluginOnChange()), forwarder, SLOT(onChange()) ); instance->shell = shell; instance->djview = djview; instance->container = window; // apply arguments while (instance->args.size() > 0) djview->parseArgument(instance->args.takeFirst()); instance->args.clear(); } // map and reparent djview object instance->open(); writeString(pipeWrite, QByteArray(OK_STRING)); timer->stop(); } void QDjViewPlugin::cmdDetachWindow() { Instance *instance = (Instance*) readPointer(pipeRead); if (instances.contains(instance)) instance->destroy(); writeString(pipeWrite, QByteArray(OK_STRING)); } void QDjViewPlugin::cmdResize() { Instance *instance = (Instance*) readPointer(pipeRead); int width = readInteger(pipeRead); int height = readInteger(pipeRead); #if HAVE_X11 if (instance->container) { // the plugin lies sometimes (why?) int x, y; unsigned int w, h, b, d; Window r; if (XGetGeometry(QX11Info::display(), (Window)(instance->container), &r, &x, &y, &w, &h, &b, &d)) { width = qMin(width, (int)w); height = qMin(height, (int)h); } } #endif if (instances.contains(instance) && width>0 && height>0) if (instance->shell && application) instance->shell->resize(width, height); writeString(pipeWrite, QByteArray(OK_STRING)); } void QDjViewPlugin::cmdDestroy() { int savedformat = 0; QByteArray saved; Instance *instance = (Instance*) readPointer(pipeRead); if (instances.contains(instance)) { instance->destroy(); QList streamList = streams.toList(); foreach(Stream *stream, streamList) if (stream->instance == instance) delete(stream); savedformat = instance->savedformat; saved = instance->saved; delete instance; instances.remove(instance); } writeString(pipeWrite, QByteArray(OK_STRING)); if (savedformat == 1 || savedformat == 0) { int q[4]; q[0] = q[1] = q[2] = q[3] = 0; if (saved.size() == sizeof(q)) memcpy((void*)q, (const char*)saved, sizeof(q)); writeInteger(pipeWrite, q[0]); writeInteger(pipeWrite, q[1]); writeInteger(pipeWrite, q[2]); writeInteger(pipeWrite, q[3]); } else writeArray(pipeWrite, saved); } void QDjViewPlugin::cmdNewStream() { // read Instance *instance = (Instance*) readPointer(pipeRead); QUrl url = QUrl::fromEncoded(readRawString(pipeRead)); // check if (! url.isValid() ) { fprintf(stderr,"djview dispatcher: invalid url '%s'\n", (const char*) url.toEncoded()); writeString(pipeWrite, QByteArray(ERR_STRING)); return; } // proceed Stream *stream = 0; if (instances.contains(instance)) { // first stream if (! instance->url.isValid()) { instance->url = url; url = QDjView::removeDjVuCgiArguments(url); Stream *s = new QDjViewPlugin::Stream(0, url, instance); s->checked = true; instance->open(); } // search stream foreach(Stream *s, streams) if (!stream && !s->started) if (s->instance == instance && s->url == url) stream = s; } // mark if (stream) stream->started = true; // reply (null means discard stream) writeString(pipeWrite, QByteArray(OK_STRING)); writePointer(pipeWrite, (void*)stream); } void QDjViewPlugin::cmdWrite() { Stream *stream = (Stream*) readPointer(pipeRead); QByteArray data = readArray(pipeRead); // locate stream if (!streams.contains(stream) || stream->closed) { // -- null return value means that stream must be discarded. writeString(pipeWrite, QByteArray(OK_STRING)); writeInteger(pipeWrite, 0); return; } // check stream if (!stream->checked && data.size()>0) { stream->checked = true; // -- if the stream is not a djvu file, // this is probably a html error message. // But we need at least 8 bytes to check if (data.size() >= 8) { const char *cdata = (const char*)data; if (strncmp(cdata, "FORM", 4) && strncmp(cdata+4, "FORM", 4)) { getUrl(stream->instance, stream->url, QString("_self")); delete stream; writeString(pipeWrite, QByteArray(OK_STRING)); writeInteger(pipeWrite, 0); return; } } } // pass data Document *document = stream->instance->document; ddjvu_stream_write(*document, stream->streamid, data, data.size()); writeString(pipeWrite, QByteArray(OK_STRING)); writeInteger(pipeWrite, data.size()); } void QDjViewPlugin::cmdDestroyStream() { Stream *stream = (Stream*) readPointer(pipeRead); int okay = readInteger(pipeRead); if (streams.contains(stream)) { Document *document = stream->instance->document; if (document && !stream->closed) ddjvu_stream_close(*document, stream->streamid, !okay); stream->closed = true; showStatus(stream->instance, QString()); delete stream; } writeString(pipeWrite, QByteArray(OK_STRING)); } void QDjViewPlugin::cmdUrlNotify() { QUrl url = QUrl::fromEncoded(readRawString(pipeRead)); readInteger(pipeRead); // notification code (unused) Stream *stream = 0; QList streamList = streams.toList(); foreach(stream, streamList) if (!stream->started && stream->url == url) delete stream; writeString(pipeWrite, QByteArray(OK_STRING)); } void QDjViewPlugin::cmdPrint() { Instance *instance = (Instance*) readPointer(pipeRead); readInteger(pipeRead); // full mode (unused) if (instances.contains(instance)) if (instance->djview) QTimer::singleShot(0, instance->djview, SLOT(print())); writeString(pipeWrite, QByteArray(OK_STRING)); } void QDjViewPlugin::cmdHandshake() { writeString(pipeWrite, QByteArray(OK_STRING)); } void QDjViewPlugin::cmdSetDjVuOpt() { // protocol extension for plugin scripting Instance *instance = (Instance*) readPointer(pipeRead); QString key = readString(pipeRead); QString value = readString(pipeRead); // check instance if (!instances.contains(instance)) { fprintf(stderr, "djview dispatcher: bad instance\n"); writeString(pipeWrite, QByteArray(ERR_STRING)); return; } // return code writeString(pipeWrite, QByteArray(OK_STRING)); // apply options QStringList errors; if (instance->djview) errors = instance->djview->parseArgument(key, value); else instance->args += key + QString("=") + value; // print error messages if (errors.size() > 0) foreach(QString error, errors) qWarning("djvuopt: %s",(const char*)error.toLocal8Bit()); } void QDjViewPlugin::cmdGetDjVuOpt() { // protocol extension for plugin scripting. Instance *instance = (Instance*) readPointer(pipeRead); QString key = readString(pipeRead); // check instance. if (!instances.contains(instance)) { fprintf(stderr, "djview dispatcher: bad instance\n"); writeString(pipeWrite, QByteArray(ERR_STRING)); return; } // get argument. QString value; if (instance->djview) value = instance->djview->getArgument(key); writeString(pipeWrite, QByteArray(OK_STRING)); writeString(pipeWrite, value); } void QDjViewPlugin::cmdOnChange() { Instance *instance = (Instance*) readPointer(pipeRead); instance->onchange = readInteger(pipeRead); writeString(pipeWrite, QByteArray(OK_STRING)); } void QDjViewPlugin::cmdShutdown() { QList streamList = streams.toList(); QList instanceList = instances.toList(); foreach(Instance *s, instanceList) s->destroy(); foreach(Stream *s, streamList) delete(s); foreach(Instance *s, instanceList) delete(s); streams.clear(); instances.clear(); lastViewerClosed(); } // ======================================== // QDJVIEWPLUGIN // ======================================== static QDjViewPlugin *thePlugin; QDjViewPlugin::~QDjViewPlugin() { thePlugin = 0; QList streamList = streams.toList(); QList instanceList = instances.toList(); foreach(Stream *s, streamList) delete(s); foreach(Instance *s, instanceList) delete(s); delete forwarder; delete notifier; delete timer; delete application; } QDjViewPlugin::QDjViewPlugin(const char *progname) : progname(progname), context(0), timer(0), notifier(0), application(0), forwarder(0), xembedFlag(false), eventLoop(0), returnCode(0), quitFlag(false), pipeRead(3), pipeWrite(4), pipeRequest(5) { // Disable SIGPIPE #ifdef SIGPIPE # ifndef HAVE_SIGACTION # ifdef SA_RESTART # define HAVE_SIGACTION 1 # endif # endif # if HAVE_SIGACTION sigset_t mask; struct sigaction act; sigemptyset(&mask); sigaddset(&mask, SIGPIPE); sigprocmask(SIG_BLOCK, &mask, 0); sigaction(SIGPIPE, 0, &act); act.sa_handler = SIG_IGN; sigaction(SIGPIPE, &act, 0); # else signal(SIGPIPE, SIG_IGN); # endif #endif // Set global dispatcher if (thePlugin) qWarning("Constructing multiple dispatchers"); thePlugin = this; } QDjViewPlugin * QDjViewPlugin::instance() { return thePlugin; } int QDjViewPlugin::exec() { #ifndef QT_NO_DEBUG const char *s = ::getenv("DJVIEW_DEBUG"); if (s && strcmp(s,"0")) { static int loop = 1; qWarning("QDjViewPlugin::exec() looping for gdb"); while (loop) sleep(1); } #endif returnCode = 0; quitFlag = false; qWarning("QDjViewPlugin::exec() begin"); try { // startup message announcing capabilities #if HAVE_QX11EMBED const char *djviewName = "DJVIEW/4 SCRIPT XEMBED"; #else const char *djviewName = "DJVIEW/4 SCRIPT"; #endif writeString(pipeWrite, QByteArray(djviewName)); // dispatch until we get display while (!application && !quitFlag) dispatch(); // start application if (application && forwarder) { QTimer::singleShot(0, forwarder, SLOT(continueExec())); application->exec(); } } catch(int err) { reportError(err); returnCode = 10; } qWarning("QDjViewPlugin::exec() end code=%d", returnCode); return returnCode; } void QDjViewPlugin::continueExec() { try { // handle events in private loop while (!quitFlag) { QEventLoop loop; eventLoop = &loop; eventLoop->exec(); eventLoop = 0; // see registerForDeletion() QObjectList toDelete = pendingDelete; pendingDelete.clear(); foreach(QObject *o, toDelete) delete o; } } catch(int err) { reportError(err); returnCode = 10; } if (application) application->exit(returnCode); } void QDjViewPlugin::exit(int retcode) { returnCode = retcode; quitFlag = true; if (timer) timer->stop(); if (eventLoop) eventLoop->exit(retcode); else if (application) application->exit(retcode); } void QDjViewPlugin::quit() { this->exit(0); } void QDjViewPlugin::reportError(int err) { if (err < 0) perror("djview dispatcher"); else if (err > 0) fprintf(stderr, "djview dispatcher: protocol error (%d)\n", err); } void QDjViewPlugin::streamCreated(Stream *stream) { streams.insert(stream); } void QDjViewPlugin::streamDestroyed(Stream *stream) { if (streams.contains(stream)) { if (instances.contains(stream->instance)) { Document *document = stream->instance->document; if (document && !stream->closed) ddjvu_stream_close(*document, stream->streamid, true); } stream->closed = true; stream->started = stream->checked = false; streams.remove(stream); } } QDjViewPlugin::Instance* QDjViewPlugin::findInstance(QWidget *widget) { if (widget) foreach(Instance *instance, instances) if (widget == instance->djview || widget == instance->shell) return instance; return 0; } void QDjViewPlugin::getUrl(Instance *instance, QUrl url, QString target) { try { writeInteger(pipeRequest, CMD_GET_URL); writePointer(pipeRequest, (void*) instance); writeString(pipeRequest, url.toEncoded()); writeString(pipeRequest, target); } catch(int err) { reportError(err); exit(10); } } void QDjViewPlugin::onChange(Instance *instance) { try { if (!instance->onchange) return; writeInteger(pipeRequest, CMD_ON_CHANGE); writePointer(pipeRequest, (void*) instance); } catch(int err) { reportError(err); exit(10); } } void QDjViewPlugin::showStatus(Instance *instance, QString message) { try { message.replace(QRegExp("\\s"), " "); writeInteger(pipeRequest, CMD_SHOW_STATUS); writePointer(pipeRequest, (void*) instance); writeString(pipeRequest, message); } catch(int err) { reportError(err); exit(10); } } void QDjViewPlugin::dispatch() { try { int cmd = readInteger(pipeRead); switch (cmd) { case CMD_SHUTDOWN: cmdShutdown(); break; case CMD_NEW: cmdNew(); break; case CMD_DETACH_WINDOW: cmdDetachWindow(); break; case CMD_ATTACH_WINDOW: cmdAttachWindow(); break; case CMD_RESIZE: cmdResize(); break; case CMD_DESTROY: cmdDestroy(); break; case CMD_PRINT: cmdPrint(); break; case CMD_NEW_STREAM: cmdNewStream(); break; case CMD_WRITE: cmdWrite(); break; case CMD_DESTROY_STREAM: cmdDestroyStream(); break; case CMD_URL_NOTIFY: cmdUrlNotify(); break; case CMD_HANDSHAKE: cmdHandshake(); break; case CMD_SET_DJVUOPT: cmdSetDjVuOpt(); break; case CMD_GET_DJVUOPT: cmdGetDjVuOpt(); break; case CMD_ON_CHANGE: cmdOnChange(); break; default: throw 3; } } catch(int err) { reportError(err); exit(err ? 10 : 0); } } void QDjViewPlugin::lastViewerClosed() { if (timer) { timer->stop(); timer->start(5*60*1000); return; } exit(0); } void QDjViewPlugin::registerForDeletion(QObject *p) { // QObject::deleteLater() deletes when // returning to the current event loop. // Here we want deletions to happen when // returning to the main loop. // Otherwise Instance::destroy() might // delete window modal dialogs while // they are running. if (application) { pendingDelete.append(p); if (eventLoop) eventLoop->exit(0); return; } // Fallback p->deleteLater(); } // ---------------------------------------- // MOC #include "qdjviewplugin.moc" // ---------------------------------------- // END /* ------------------------------------------------------------- Local Variables: c++-font-lock-extra-types: ( "\\sw+_t" "[A-Z]\\sw*[a-z]\\sw*" ) End: ------------------------------------------------------------- */ djview4/src/qdjviewplugin.h000066400000000000000000000067701174072760700163070ustar00rootroot00000000000000//C- -*- C++ -*- //C- ------------------------------------------------------------------- //C- DjView4 //C- Copyright (c) 2006- Leon Bottou //C- //C- This software is subject to, and may be distributed under, the //C- GNU General Public License, either version 2 of the license, //C- or (at your option) any later version. The license should have //C- accompanied the software or you may obtain a copy of the license //C- from the Free Software Foundation at http://www.fsf.org . //C- //C- This program is distributed in the hope that it will be useful, //C- but WITHOUT ANY WARRANTY; without even the implied warranty of //C- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //C- GNU General Public License for more details. //C- ------------------------------------------------------------------ #ifndef QDJVIEWPLUGIN_H #define QDJVIEWPLUGIN_H #if AUTOCONF # include "config.h" #endif #include #include #include #include #include #include #include #include #ifdef Q_WS_X11 #include "qdjvu.h" #include "qdjview.h" #include "djview.h" class QMutex; class QSocketNotifier; class QTimer; class QEventLoop; class QDjViewPlugin { public: ~QDjViewPlugin(); QDjViewPlugin(const char *progname); static QDjViewPlugin *instance(); int exec(); void exit(int retcode); void quit(); private: void write(int fd, const char *buffer, int size); void read(int fd, char *buffer, int size); void writeString(int fd, QByteArray x); void writeString(int fd, QString x); void writeInteger(int fd, int x); void writeDouble(int fd, double x); void writePointer(int fd, const void *x); void writeArray(int fd, QByteArray x); QString readString(int fd); QByteArray readRawString(int fd); int readInteger(int fd); double readDouble(int fd); void * readPointer(int fd); QByteArray readArray(int fd); void cmdNew(); void cmdAttachWindow(); void cmdDetachWindow(); void cmdResize(); void cmdDestroy(); void cmdNewStream(); void cmdWrite(); void cmdDestroyStream(); void cmdUrlNotify(); void cmdPrint(); void cmdHandshake(); void cmdShutdown(); void cmdSetDjVuOpt(); void cmdGetDjVuOpt(); void cmdOnChange(); class Document; class Forwarder; struct Instance; struct Stream; void reportError(int err); void streamCreated(Stream *s); void streamDestroyed(Stream *s); Instance *findInstance(QWidget *widget); void getUrl(Instance *instance, QUrl url, QString target); void showStatus(Instance *instance, QString message); void onChange(Instance *instance); void continueExec(); void dispatch(); void lastViewerClosed(); void registerForDeletion(QObject*); QByteArray progname; QDjVuContext *context; QTimer *timer; QSocketNotifier *notifier; QDjViewApplication *application; Forwarder *forwarder; QSet instances; QSet streams; bool xembedFlag; int argc; const char* argv[4]; QEventLoop *eventLoop; QObjectList pendingDelete; int returnCode; bool quitFlag; int pipeRead; int pipeWrite; int pipeRequest; }; #endif // Q_WS_X11 #endif // QDJVIEWPLUGIN_H /* ------------------------------------------------------------- Local Variables: c++-font-lock-extra-types: ( "\\sw+_t" "Q[A-Z]\\sw*[a-z]\\sw*" ) End: ------------------------------------------------------------- */ djview4/src/qdjviewprefs.cpp000066400000000000000000001133531174072760700164570ustar00rootroot00000000000000//C- -*- C++ -*- //C- ------------------------------------------------------------------- //C- DjView4 //C- Copyright (c) 2006- Leon Bottou //C- //C- This software is subject to, and may be distributed under, the //C- GNU General Public License, either version 2 of the license, //C- or (at your option) any later version. The license should have //C- accompanied the software or you may obtain a copy of the license //C- from the Free Software Foundation at http://www.fsf.org . //C- //C- This program is distributed in the hope that it will be useful, //C- but WITHOUT ANY WARRANTY; without even the implied warranty of //C- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //C- GNU General Public License for more details. //C- ------------------------------------------------------------------ #if AUTOCONF # include "config.h" #endif #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "qdjviewprefs.h" #include "qdjview.h" #include "qdjvu.h" #include "djview.h" // ======================================== // QDJVIEWPREFS // ======================================== /*! \class QDjViewPrefs \brief Holds the preferences for the \a QDjView instances. */ /*! \enum QDjViewPrefs::Option \brief Miscellanenous flags. This enumeration defines flags describing (i) the visibility of the menubar, toolbar, etc. (ii) the page layout flags continuous and side by side. (iii) the interactive capabilities of the djvu widget. */ /*! \enum QDjViewPrefs::Tool \brief Toolbar flags. This enumeration defines flags describing the composition of the toolbar. */ /*! \class QDjViewPrefs::Saved \brief Mode dependent preferences. This structure holds the preferences that are saved separately for each viewer mode. There are four copies of this structure, for the standalone viewer mode, for the full screen mode, for the full page plugin mode, and for the embedded plugin mode. */ /*! The default toolbar composition. */ const QDjViewPrefs::Tools QDjViewPrefs::defaultTools = TOOLBAR_TOP | TOOLBAR_BOTTOM | TOOL_ZOOMCOMBO | TOOL_ZOOMBUTTONS | TOOL_PAGECOMBO | TOOL_PREVNEXT | TOOL_FIRSTLAST | TOOL_BACKFORW | TOOL_OPEN | TOOL_FIND | TOOL_SELECT | TOOL_PRINT | TOOL_LAYOUT | TOOL_WHATSTHIS; /*! The default set of miscellaneous flags. */ const QDjViewPrefs::Options QDjViewPrefs::defaultOptions = SHOW_MENUBAR | SHOW_TOOLBAR | SHOW_SIDEBAR | SHOW_STATUSBAR | SHOW_SCROLLBARS | SHOW_FRAME | SHOW_MAPAREAS | HANDLE_MOUSE | HANDLE_KEYBOARD | HANDLE_LINKS | HANDLE_CONTEXTMENU; static QPointer preferences; /*! Returns the single preference object. */ QDjViewPrefs * QDjViewPrefs::instance(void) { QMutex mutex; QMutexLocker locker(&mutex); if (! preferences) { preferences = new QDjViewPrefs(); preferences->load(); } return preferences; } QDjViewPrefs::Saved::Saved(void) : remember(true), options(defaultOptions), zoom(QDjVuWidget::ZOOM_FITWIDTH) { } QDjViewPrefs::QDjViewPrefs(void) : QObject(QCoreApplication::instance()), windowSize(640,400), tools(defaultTools), gamma(2.2), white(QColor(Qt::white)), resolution(100), cacheSize(10*1024*1024), pixelCacheSize(256*1024), lensSize(300), lensPower(3), enableAnimations(true), advancedFeatures(false), showTextLabel(false), invertLuminance(false), mouseWheelZoom(false), restrictOverride(false), modifiersForLens(Qt::ControlModifier|Qt::ShiftModifier), modifiersForSelect(Qt::ControlModifier), modifiersForLinks(Qt::ShiftModifier), thumbnailSize(64), thumbnailSmart(true), searchWordsOnly(true), searchCaseSensitive(false), searchRegExpMode(false), infoDialogTab(0), metaDialogTab(0), printerGamma(0.0), printReverse(false), printCollate(true) { Options mss = (SHOW_MENUBAR|SHOW_STATUSBAR|SHOW_SIDEBAR); forFullScreen.options &= ~(mss|SHOW_SCROLLBARS|SHOW_TOOLBAR|SHOW_SIDEBAR); forFullPagePlugin.options &= ~(mss); forEmbeddedPlugin.options &= ~(mss|SHOW_TOOLBAR); forEmbeddedPlugin.remember = false; } /*! Return a string with the djview version. */ QString QDjViewPrefs::versionString() { QString version = QString("%1.%2"); version = version.arg((DJVIEW_VERSION>>16)&0xFF); version = version.arg((DJVIEW_VERSION>>8)&0xFF); if (DJVIEW_VERSION & 0xFF) version = version + QString(".%1").arg(DJVIEW_VERSION&0xFF); return version; } /*! Return a string describing a set of modifier keys. */ QString QDjViewPrefs::modifiersToString(Qt::KeyboardModifiers m) { QStringList l; #ifdef Q_WS_MAC if (m & Qt::MetaModifier) l << "Control"; if (m & Qt::AltModifier) l << "Alt"; if (m & Qt::ControlModifier) l << "Command"; #else if (m & Qt::MetaModifier) l << "Meta"; if (m & Qt::ControlModifier) l << "Control"; if (m & Qt::AltModifier) l << "Alt"; #endif if (m & Qt::ShiftModifier) l << "Shift"; return l.join("+"); } /*! Return the modifiers described in string \a s. */ Qt::KeyboardModifiers QDjViewPrefs::stringToModifiers(QString s) { Qt::KeyboardModifiers m = Qt::NoModifier; QStringList l = s.split("+"); foreach(QString key, l) { key = key.toLower(); if (key == "shift") m |= Qt::ShiftModifier; #ifdef Q_WS_MAC else if (key == "control") m |= Qt::MetaModifier; else if (key == "command") m |= Qt::ControlModifier; #else else if (key == "meta") m |= Qt::MetaModifier; else if (key == "control") m |= Qt::ControlModifier; #endif else if (key == "alt") m |= Qt::AltModifier; } return m; } /*! Return a string describing a set of option flags. */ QString QDjViewPrefs::optionsToString(Options options) { const QMetaObject *mo = metaObject(); QMetaEnum me = mo->enumerator(mo->indexOfEnumerator("Option")); return me.valueToKeys(static_cast(options)); } /*! Return the option flags described by a string. */ QDjViewPrefs::Options QDjViewPrefs::stringToOptions(QString s) { const QMetaObject *mo = metaObject(); QMetaEnum me = mo->enumerator(mo->indexOfEnumerator("Option")); int options = me.keysToValue(s.toLatin1()); return QFlag(options); } /*! Return a string describing a set of toolbar flags. */ QString QDjViewPrefs::toolsToString(Tools tools) { const QMetaObject *mo = metaObject(); QMetaEnum me = mo->enumerator(mo->indexOfEnumerator("Tool")); return me.valueToKeys(tools); } /*! Return the toolbar flags described by a string. */ QDjViewPrefs::Tools QDjViewPrefs::stringToTools(QString s) { const QMetaObject *mo = metaObject(); QMetaEnum me = mo->enumerator(mo->indexOfEnumerator("Tool")); int tools = me.keysToValue(s.toLatin1()); return QFlag(tools); } void QDjViewPrefs::loadGroup(QSettings &s, QString name, Saved &saved) { s.beginGroup(name); if (s.contains("remember")) saved.remember = s.value("remember").toBool(); if (s.contains("options")) saved.options = stringToOptions(s.value("options").toString()); if (s.contains("zoom")) saved.zoom = s.value("zoom").toInt(); if (s.contains("state")) saved.state = s.value("state").toByteArray(); s.endGroup(); // we always want these options saved.options |= (QDjViewPrefs::HANDLE_MOUSE | QDjViewPrefs::HANDLE_KEYBOARD | QDjViewPrefs::HANDLE_LINKS ); } /*! Load saved preferences and set all member variables. */ void QDjViewPrefs::load() { QSettings s; int versionFix = 0; if (s.contains("versionFix")) versionFix = s.value("versionFix").toInt(); loadGroup(s, "forEmbeddedPlugin", forEmbeddedPlugin); loadGroup(s, "forFullPagePlugin", forFullPagePlugin); loadGroup(s, "forStandalone", forStandalone); loadGroup(s, "forFullScreen", forFullScreen); if (s.contains("windowSize")) windowSize = s.value("windowSize").toSize(); if (s.contains("tools")) tools = stringToTools(s.value("tools").toString()); if (versionFix < 0x40200) tools |= TOOL_BACKFORW; if (s.contains("gamma")) gamma = s.value("gamma").toDouble(); if (s.contains("white")) white = QColor(s.value("white").toString()); if (s.contains("resolution")) resolution = s.value("resolution").toInt(); if (s.contains("cacheSize")) cacheSize = s.value("cacheSize").toLongLong(); if (s.contains("pixelCacheSize")) pixelCacheSize = s.value("pixelCacheSize").toInt(); if (s.contains("lensSize")) lensSize = s.value("lensSize").toInt(); if (s.contains("lensPower")) lensPower = s.value("lensPower").toInt(); if (s.contains("browserProgram")) browserProgram = s.value("browserProgram").toString(); if (s.contains("proxyUrl")) proxyUrl = s.value("proxyUrl").toString(); if (s.contains("enableAnimations")) enableAnimations = s.value("enableAnimations").toBool(); if (s.contains("advancedFeatures")) advancedFeatures = s.value("advancedFeatures").toBool(); if (s.contains("showTextLabel")) showTextLabel = s.value("showTextLabel").toBool(); if (s.contains("invertLuminance")) invertLuminance = s.value("invertLuminance").toBool(); if (s.contains("mouseWheelZoom")) mouseWheelZoom = s.value("mouseWheelZoom").toBool(); if (s.contains("language")) languageOverride = s.value("language").toString(); if (s.contains("restrictOverride")) restrictOverride = s.value("restrictOverride").toBool(); if (s.contains("modifiersForLens")) modifiersForLens = stringToModifiers(s.value("modifiersForLens").toString()); if (s.contains("modifiersForSelect")) modifiersForSelect = stringToModifiers(s.value("modifiersForSelect").toString()); if (s.contains("modifiersForLinks")) modifiersForLinks = stringToModifiers(s.value("modifiersForLinks").toString()); if (s.contains("thumbnailSize")) thumbnailSize = s.value("thumbnailSize").toInt(); if (s.contains("thumbnailSmart")) thumbnailSmart = s.value("thumbnailSmart").toBool(); if (s.contains("searchWordsOnly")) searchWordsOnly = s.value("searchWordsOnly").toBool(); if (s.contains("searchCaseSensitive")) searchCaseSensitive = s.value("searchCaseSensitive").toBool(); if (s.contains("searchRegExpMode")) searchRegExpMode = s.value("searchRegExpMode").toBool(); if (s.contains("infoDialogTab")) infoDialogTab = s.value("infoDialogTab").toInt(); if (s.contains("metaDialogTab")) metaDialogTab = s.value("metaDialogTab").toInt(); if (s.contains("printerGamma")) printerGamma = s.value("printerGamma").toDouble(); if (s.contains("printerName")) printerName = s.value("printerName").toString(); if (s.contains("printFile")) printFile = s.value("printFile").toString(); if (s.contains("printCollate")) printCollate = s.value("printCollate").toBool(); if (s.contains("printReverse")) printCollate = s.value("printReverse").toBool(); if (s.contains("recentFiles")) recentFiles = s.value("recentFiles").toStringList(); } void QDjViewPrefs::saveGroup(QSettings &s, QString name, Saved &saved) { s.beginGroup(name); s.setValue("remember", saved.remember); s.setValue("options", optionsToString(saved.options)); s.setValue("zoom", saved.zoom); s.setValue("state", saved.state); s.endGroup(); } /*! Save all member variables for later use. */ void QDjViewPrefs::save(void) { QSettings s; s.setValue("version", versionString()); int versionFix = 0; if (s.contains("versionFix")) versionFix = s.value("versionFix").toInt(); if (DJVIEW_VERSION > versionFix) s.setValue("versionFix", DJVIEW_VERSION); saveGroup(s, "forEmbeddedPlugin", forEmbeddedPlugin); saveGroup(s, "forFullPagePlugin", forFullPagePlugin); saveGroup(s, "forStandalone", forStandalone); saveGroup(s, "forFullScreen", forFullScreen); s.setValue("windowSize", windowSize); s.setValue("tools", toolsToString(tools)); s.setValue("gamma", gamma); s.setValue("white", white.name()); s.setValue("resolution", resolution); s.setValue("cacheSize", cacheSize); s.setValue("pixelCacheSize", pixelCacheSize); s.setValue("lensSize", lensSize); s.setValue("lensPower", lensPower); s.setValue("browserProgram", browserProgram); s.setValue("proxyUrl", proxyUrl.toString()); s.setValue("enableAnimations", enableAnimations); s.setValue("advancedFeatures", advancedFeatures); s.setValue("showTextLabel", showTextLabel); s.setValue("invertLuminance", invertLuminance); s.setValue("mouseWheelZoom", mouseWheelZoom); s.setValue("modifiersForLens", modifiersToString(modifiersForLens)); s.setValue("modifiersForSelect", modifiersToString(modifiersForSelect)); s.setValue("modifiersForLinks", modifiersToString(modifiersForLinks)); s.setValue("language", languageOverride); s.setValue("restrictOverride", restrictOverride); s.setValue("thumbnailSize", thumbnailSize); s.setValue("thumbnailSmart", thumbnailSmart); s.setValue("searchWordsOnly", searchWordsOnly); s.setValue("searchCaseSensitive", searchCaseSensitive); s.setValue("searchRegExpMode", searchRegExpMode); s.setValue("infoDialogTab", infoDialogTab); s.setValue("metaDialogTab", metaDialogTab); s.setValue("printerGamma", printerGamma); s.setValue("printerName", printerName); s.setValue("printFile", printFile); s.setValue("printCollate", printCollate); s.setValue("printReverse", printReverse); s.setValue("recentFiles", recentFiles); } /*! Emit the updated() signal. */ void QDjViewPrefs::update() { emit updated(); } /*! \fn QDjViewPrefs::updated() This signal indicates that viewers should reload the preferences. */ // ======================================== // QDJVIEWGAMMAWIDGET // ======================================== class QDjViewGammaWidget : public QFrame { Q_OBJECT public: QDjViewGammaWidget(QWidget *parent = 0); double gamma() const; public slots: void setGamma(double); void setGammaTimesTen(int); protected: virtual void paintEvent(QPaintEvent *event); private: void paintRect(QPainter &painter, QRect r, bool strip); double g; }; QDjViewGammaWidget::QDjViewGammaWidget(QWidget *parent) : QFrame(parent), g(2.2) { setMinimumSize(64,64); setFrameShape(QFrame::Panel); setFrameShadow(QFrame::Sunken); setLineWidth(1); } double QDjViewGammaWidget::gamma() const { return g; } void QDjViewGammaWidget::setGamma(double gamma) { g = qBound(0.3, gamma, 5.0); update(); } void QDjViewGammaWidget::setGammaTimesTen(int gamma) { setGamma((double)gamma/10); } void QDjViewGammaWidget::paintEvent(QPaintEvent *event) { int w = width() - 16; int h = height() - 16; if (w >= 8 && h >= 8) { QPoint c = rect().center(); QPainter painter; painter.begin(this); int m = qMin( w, h ) / 4; m = m + m; QRect r(c.x()-m, c.y()-m, m, m); painter.fillRect(rect(), Qt::white); paintRect(painter, r.translated(m,0), true); paintRect(painter, r.translated(0,m+1), true); paintRect(painter, r.translated(m,m), false); paintRect(painter, r, false); painter.end(); QFrame::paintEvent(event); } } void QDjViewGammaWidget::paintRect(QPainter &painter, QRect r, bool strip) { if (strip) { // draw stripes painter.setPen(QPen(Qt::black, 1)); painter.setRenderHint(QPainter::Antialiasing, false); for(int i=r.top(); i<=r.bottom(); i+=2) painter.drawLine(r.left(), i, r.right(), i); } else { // see DjVuImage.cpp double gamma = g; if (gamma < 0.1) gamma = 0.1; else if (gamma > 10) gamma = 10; // see GPixmap.cpp double x = ::pow(0.5, 1.0/gamma); int gray = (int)floor(255.0 * x + 0.5); // fill gray = qBound(0, gray, 255); painter.fillRect(r, QColor(gray,gray,gray)); } } // ======================================== // QDJVIEWMODIFIERSCOMBOBOX // ======================================== class QDjViewModifiersComboBox : public QComboBox { Q_OBJECT Q_PROPERTY(Qt::KeyboardModifiers value READ value WRITE setValue) public: QDjViewModifiersComboBox(QWidget *parent); Qt::KeyboardModifiers value() const; public slots: void setValue(Qt::KeyboardModifiers m); void insertValue(Qt::KeyboardModifiers m); protected slots: void editingFinished(); private: static const char *none; }; const char* QDjViewModifiersComboBox::none = "None"; QDjViewModifiersComboBox::QDjViewModifiersComboBox(QWidget *parent) : QComboBox(parent) { setEditable(true); setInsertPolicy(QComboBox::NoInsert); // validator QStringList keynames; keynames << "Shift"; keynames << "Control"; keynames << "Alt"; #ifdef Q_WS_MAC keynames << "Command"; #else keynames << "Meta"; #endif QString keys = "(" + keynames.join("|") + ")"; keys = keys + "(\\+" + keys + ")*"; keys = keys + "|" + none; QRegExp re( keys, Qt::CaseInsensitive); setValidator(new QRegExpValidator(re, this)); // menu entries insertValue(Qt::ShiftModifier); insertValue(Qt::ControlModifier); insertValue(Qt::AltModifier); insertValue(Qt::MetaModifier); insertValue(Qt::ShiftModifier|Qt::ControlModifier); insertValue(Qt::ControlModifier|Qt::AltModifier); setValue(Qt::NoModifier); connect(lineEdit(), SIGNAL(editingFinished()), this, SLOT(editingFinished()) ); } void QDjViewModifiersComboBox::editingFinished() { QDjViewPrefs *prefs = QDjViewPrefs::instance(); QString text = lineEdit()->text(); Qt::KeyboardModifiers m = prefs->stringToModifiers(text); text = (m) ? prefs->modifiersToString(m) : none; setEditText(text); } Qt::KeyboardModifiers QDjViewModifiersComboBox::value() const { const_cast(this)->editingFinished(); QString text = lineEdit()->text(); QDjViewPrefs *prefs = QDjViewPrefs::instance(); return prefs->stringToModifiers(text); } void QDjViewModifiersComboBox::setValue(Qt::KeyboardModifiers m) { QDjViewPrefs *prefs = QDjViewPrefs::instance(); QString text = (m) ? prefs->modifiersToString(m) : none; setEditText(text); } void QDjViewModifiersComboBox::insertValue(Qt::KeyboardModifiers m) { QDjViewPrefs *prefs = QDjViewPrefs::instance(); QString text = (m) ? prefs->modifiersToString(m) : none; QVariant vm(m); if (findData(vm) < 0) insertItem(count(), text, vm); } // ======================================== // QDJVIEWPREFSDIALOG // ======================================== #include "ui_qdjviewprefsdialog.h" static QPointer prefsDialog; /*! Returns the single preference dialog. */ QDjViewPrefsDialog * QDjViewPrefsDialog::instance() { QMutex mutex; QMutexLocker locker(&mutex); if (! prefsDialog) { QDjViewPrefsDialog *main = new QDjViewPrefsDialog(); main->setWindowTitle(tr("Preferences[*] - DjView")); main->setAttribute(Qt::WA_DeleteOnClose, true); main->setAttribute(Qt::WA_QuitOnClose, false); prefsDialog = main; } return prefsDialog; } struct QDjViewPrefsDialog::Private { QDjVuContext *context; Ui::QDjViewPrefsDialog ui; QDjViewPrefs::Saved saved[4]; int currentSaved; }; QDjViewPrefsDialog::~QDjViewPrefsDialog() { delete d; } static inline void setHelp(QWidget *w, QString s) { w->setWhatsThis(s); } QDjViewPrefsDialog::QDjViewPrefsDialog() : QDialog(), d(new Private) { // sanitize d->context = 0; d->currentSaved = -1; // prepare ui setAttribute(Qt::WA_GroupLeader, true); d->ui.setupUi(this); // connect buttons (some are connected in the ui file) connect(d->ui.applyButton, SIGNAL(clicked()), this, SLOT(apply()) ); connect(d->ui.gammaSlider, SIGNAL(valueChanged(int)), d->ui.gammaWidget, SLOT(setGammaTimesTen(int)) ); connect(d->ui.forceResolutionCheckBox, SIGNAL(toggled(bool)), this, SLOT(forceResolutionChanged()) ); connect(d->ui.resetButton, SIGNAL(clicked()), this, SLOT(reset()) ); connect(d->ui.cacheClearButton, SIGNAL(clicked()), this, SLOT(cacheClear()) ); connect(d->ui.modeComboBox, SIGNAL(activated(int)), this, SLOT(modeComboChanged(int)) ); connect(d->ui.zoomCombo->lineEdit(), SIGNAL(editingFinished()), this, SLOT(zoomComboEdited()) ); // modified connectModified(d->ui.screenTab); connectModified(d->ui.rememberCheckBox); connectModified(d->ui.showGroupBox); connectModified(d->ui.modeGroupBox); connectModified(d->ui.keysTab); connectModified(d->ui.lensTab); connectModified(d->ui.networkTab); connectModified(d->ui.advancedTab); // whatsthis setHelp(d->ui.screenTab, tr("Screen gamma correction." "
    The best color rendition is achieved" " by adjusting the gamma correction slider" " and choosing the position that makes the" " gray square as uniform as possible." "

    Screen resolution." "
    This option forces a particular resolution instead of using" " the unreliable resolution advertised by the operating system." " Forcing the resolution to 100 dpi matches the behavior" " of the djvulibre command line tools." "") ); setHelp(d->ui.interfaceTab, tr("Initial interface setup." "
    DjView can run as a standalone viewer," " as a full screen viewer, as a full page browser plugin," " or as a plugin embedded inside a html page." " For each case, check the Remember box to" " automatically save and restore the interface setup." " Otherwise, specify an initial configuration." "") ); setHelp(d->ui.keysTab, tr("Modifiers keys." "
    Define which combination of modifier keys" " will show the manifying lens, temporarily enable" " the selection mode, or highlight the hyperlinks." "") ); setHelp(d->ui.lensTab, tr("Magnifying lens." "
    The magnifying lens appears when you depress" " the modifier keys specified in tab Keys." " This panel lets you choose the power and the size" " of the magnifying lens." "") ); setHelp(d->ui.advancedTab, tr("Advanced." "
    You can override the default interface language, " "disable the page animations, or enable additional " "menu entries that are useful for authoring DjVu files." "You can also disable the printing or saving restrictions " "dictated by certain web sites. The manual color " "correction can be useful with old printers." "")); setHelp(d->ui.networkTab, tr("Network proxy settings." "
    These proxy settings are used when" " the standalone djview viewer accesses" " a djvu document through a http url." " The djview plugin always uses the proxy" " settings of the web browser." "

    Cache settings." "
    The pixel cache stores image data" " located outside the visible area." " This cache makes panning smoother." " The decoded page cache contains partially" " decoded pages. It provides faster response times" " when navigating a multipage document or when returning" " to a previously viewed page. Clearing this cache" " might be useful to reflect a change in the page" " data without restarting the DjVu viewer.""" "") ); } void QDjViewPrefsDialog::connectModified(QWidget *w) { if (w->inherits("QComboBox")) connect(w, SIGNAL(editTextChanged(QString)), this, SLOT(setModified())); if (w->inherits("QComboBox")) connect(w, SIGNAL(currentIndexChanged(int)), this, SLOT(setModified())); if (w->inherits("QSpinBox")) connect(w, SIGNAL(valueChanged(int)), this, SLOT(setModified())); if (w->inherits("QAbstractButton")) connect(w, SIGNAL(toggled(bool)), this, SLOT(setModified())); if (w->inherits("QAbstractSlider")) connect(w, SIGNAL(valueChanged(int)), this, SLOT(setModified())); QObject *child; foreach(child, w->children()) if (child->isWidgetType()) connectModified(qobject_cast(child)); } void QDjViewPrefsDialog::load(QDjView *djview) { // load preferences into ui QDjViewPrefs *prefs = QDjViewPrefs::instance(); d->context = &djview->getDjVuContext(); // 1- screen tab d->ui.gammaSlider->setValue((int)(prefs->gamma * 10)); int res = prefs->resolution; d->ui.forceResolutionCheckBox->setChecked(res > 0); d->ui.resolutionSpinBox->setValue((res>0) ? res : logicalDpiY()); d->ui.invertLuminanceCheckBox->setChecked(prefs->invertLuminance); // 2- interface tab d->saved[0] = prefs->forStandalone; d->saved[1] = prefs->forFullScreen; d->saved[2] = prefs->forFullPagePlugin; d->saved[3] = prefs->forEmbeddedPlugin; djview->fillZoomCombo(d->ui.zoomCombo); int n = 0; if (djview->getViewerMode() == QDjView::EMBEDDED_PLUGIN) n = 3; else if (djview->getViewerMode() == QDjView::FULLPAGE_PLUGIN) n = 2; else if (djview->getFullScreen()) n = 1; modeComboChanged(n); d->ui.modeComboBox->setCurrentIndex(n); // 3- keys tab d->ui.keysForLensCombo->setValue(prefs->modifiersForLens); d->ui.keysForSelectCombo->setValue(prefs->modifiersForSelect); d->ui.keysForLinksCombo->setValue(prefs->modifiersForLinks); d->ui.wheelScrollButton->setChecked(! prefs->mouseWheelZoom); d->ui.wheelZoomButton->setChecked(prefs->mouseWheelZoom); // 4- lens tab bool lens = (prefs->lensPower > 0) && (prefs->lensSize > 0); d->ui.lensEnableCheckBox->setChecked(lens); d->ui.lensPowerSpinBox->setValue(lens ? qBound(1,prefs->lensPower,10) : 3); d->ui.lensSizeSpinBox->setValue(lens ? qBound(50,prefs->lensSize,500) : 300); // 5- network tab bool proxy = prefs->proxyUrl.isValid(); if (prefs->proxyUrl.scheme() != "http" || prefs->proxyUrl.host().isEmpty()) proxy = false; if (proxy) { QUrl url = prefs->proxyUrl; int port = url.port(); d->ui.proxyHostLineEdit->setText(url.host()); d->ui.proxyPortSpinBox->setValue(port>=0 ? port : 8080); d->ui.proxyUserLineEdit->setText(url.userName()); d->ui.proxyPasswordLineEdit->setText(url.password()); } d->ui.proxyCheckBox->setChecked(proxy); qreal k256 = 256 * 1024; qreal k1024 = 1024 * 1024; d->ui.pixelCacheSpinBox->setValue(qRound(prefs->pixelCacheSize / k256)); d->ui.pageCacheSpinBox->setValue(qRound(prefs->cacheSize / k1024)); // 6- advanced tab double pgamma = prefs->printerGamma; loadLanguageComboBox(prefs->languageOverride); d->ui.advancedCheckBox->setChecked(prefs->advancedFeatures); d->ui.animationCheckBox->setChecked(prefs->enableAnimations); d->ui.textLabelCheckBox->setChecked(prefs->showTextLabel); d->ui.restrictOverrideCheckBox->setChecked(prefs->restrictOverride); d->ui.printerManualCheckBox->setChecked(pgamma > 0); d->ui.printerGammaSpinBox->setValue((pgamma > 0) ? pgamma : 2.2); // no longer modified setWindowModified(false); d->ui.applyButton->setEnabled(false); } void QDjViewPrefsDialog::loadLanguageComboBox(QString lang) { // supported languages static const char *languages[] = { "cs","de","en","fr","it","ja","ru","uk","zh_cn","zh_tw",0 } ; // get application QComboBox *cb = d->ui.languageComboBox; QCheckBox *db = d->ui.languageCheckBox; QDjViewApplication *app = qobject_cast(qApp); db->setEnabled(app != 0); cb->clear(); // prepare combobox static struct { const char *src; const char *com; } thisLang[] = { QT_TRANSLATE_NOOP3("Generic", "thisLanguage", "Name of THIS language") }; QString myLanguage = QApplication::translate("Generic", thisLang[0].src); if (myLanguage == thisLang[0].src) myLanguage = "English"; int index = -1; if (app) for (int i=0; languages[i]; i++) { QString nlang = languages[i]; QString xlang = QString::null; QTranslator *trans = new QTranslator(); if (app->loadTranslator(trans, "djview", QStringList(nlang))) xlang = trans->translate("Generic", thisLang[0].src); else if (nlang == "en" || nlang.startsWith("en")) xlang = "English"; if (lang == nlang && xlang.size() > 0) index = cb->count(); if (index < 0 && xlang == myLanguage) index = cb->count(); if (xlang.size() > 0) cb->addItem(xlang, nlang); delete trans; } db->setChecked(index >= 0 && lang.size() > 0); cb->setCurrentIndex(index); } void QDjViewPrefsDialog::apply() { // save ui into preferences QDjViewPrefs *prefs = QDjViewPrefs::instance(); // 1- screen tab prefs->gamma = d->ui.gammaSlider->value() / 10.0; prefs->resolution = 0; if (d->ui.forceResolutionCheckBox->isChecked()) prefs->resolution = d->ui.resolutionSpinBox->value(); prefs->invertLuminance = d->ui.invertLuminanceCheckBox->isChecked(); // 2- interface tab int n = d->ui.modeComboBox->currentIndex(); modeComboChanged(n); prefs->forStandalone = d->saved[0]; prefs->forFullScreen = d->saved[1]; prefs->forFullPagePlugin = d->saved[2]; prefs->forEmbeddedPlugin = d->saved[3]; // 3- keys prefs->modifiersForLens = d->ui.keysForLensCombo->value(); prefs->modifiersForSelect = d->ui.keysForSelectCombo->value(); prefs->modifiersForLinks = d->ui.keysForLinksCombo->value(); prefs->mouseWheelZoom = d->ui.wheelZoomButton->isChecked(); // 4- lens tab bool lens = d->ui.lensEnableCheckBox->isChecked(); prefs->lensPower = (lens) ? d->ui.lensPowerSpinBox->value() : 0; prefs->lensSize = d->ui.lensSizeSpinBox->value(); // 5- network tab prefs->proxyUrl = QUrl(); if (d->ui.proxyCheckBox->isChecked()) { prefs->proxyUrl.setScheme("http"); prefs->proxyUrl.setHost(d->ui.proxyHostLineEdit->text()); prefs->proxyUrl.setPort(d->ui.proxyPortSpinBox->value()); prefs->proxyUrl.setUserName(d->ui.proxyUserLineEdit->text()); prefs->proxyUrl.setPassword(d->ui.proxyPasswordLineEdit->text()); } prefs->pixelCacheSize = d->ui.pixelCacheSpinBox->value() * 256 * 1024; prefs->cacheSize = d->ui.pageCacheSpinBox->value() * 1024 * 1024; // 6- advanced tab prefs->languageOverride = QString::null; if (d->ui.languageCheckBox->isChecked()) { int n = d->ui.languageComboBox->currentIndex(); prefs->languageOverride = d->ui.languageComboBox->itemData(n).toString(); } prefs->enableAnimations = d->ui.animationCheckBox->isChecked(); prefs->advancedFeatures = d->ui.advancedCheckBox->isChecked(); prefs->showTextLabel = d->ui.textLabelCheckBox->isChecked(); prefs->restrictOverride = d->ui.restrictOverrideCheckBox->isChecked(); prefs->printerGamma = 0; if (d->ui.printerManualCheckBox->isChecked()) prefs->printerGamma = d->ui.printerGammaSpinBox->value(); // broadcast change setWindowModified(false); d->ui.applyButton->setEnabled(false); prefs->save(); prefs->update(); } void QDjViewPrefsDialog::reset() { // 1- gamma tab d->ui.gammaSlider->setValue(22); d->ui.forceResolutionCheckBox->setChecked(true); d->ui.resolutionSpinBox->setValue(100); // 2- interface tab QDjViewPrefs::Saved defsaved; QDjViewPrefs::Options optMSS = (QDjViewPrefs::SHOW_MENUBAR| QDjViewPrefs::SHOW_STATUSBAR| QDjViewPrefs::SHOW_SIDEBAR); QDjViewPrefs::Options optS = QDjViewPrefs::SHOW_SCROLLBARS; QDjViewPrefs::Options optT = QDjViewPrefs::SHOW_TOOLBAR; d->saved[0] = defsaved; d->saved[1] = defsaved; d->saved[1].options &= ~(optMSS|optS|optT); d->saved[2] = defsaved; d->saved[2].options &= ~(optMSS); d->saved[3] = defsaved; d->saved[3].options &= ~(optMSS|optT); d->saved[3].remember = false; d->currentSaved = -1; modeComboChanged(d->ui.modeComboBox->currentIndex()); // 3- keys tab d->ui.keysForLensCombo->setValue(Qt::ShiftModifier|Qt::ControlModifier); d->ui.keysForSelectCombo->setValue(Qt::ControlModifier); d->ui.keysForLinksCombo->setValue(Qt::ShiftModifier); // 4- lens tab d->ui.lensEnableCheckBox->setChecked(true); d->ui.lensPowerSpinBox->setValue(3); d->ui.lensSizeSpinBox->setValue(300); // 5- network tab d->ui.proxyCheckBox->setChecked(false); // 6- advanced tab d->ui.pixelCacheSpinBox->setValue(1); d->ui.pageCacheSpinBox->setValue(10); d->ui.languageCheckBox->setChecked(false); d->ui.printerManualCheckBox->setChecked(false); d->ui.printerGammaSpinBox->setValue(2.2); d->ui.advancedCheckBox->setChecked(false); d->ui.textLabelCheckBox->setChecked(false); } void QDjViewPrefsDialog::setModified() { d->ui.applyButton->setEnabled(true); setWindowModified(true); } void QDjViewPrefsDialog::done(int result) { if (result == QDialog::Accepted) apply(); QDialog::done(result); } void QDjViewPrefsDialog::cacheClear() { if (d->context) ddjvu_cache_clear(*d->context); } template static inline void set_reset(QFlags &x, T y, bool plus, bool minus=true) { if (plus) x |= y; else if (minus) x &= ~y; } void QDjViewPrefsDialog::modeComboChanged(int n) { if (d->currentSaved >=0 && d->currentSaved <4) { // save ui values QDjViewPrefs::Saved &saved = d->saved[d->currentSaved]; saved.remember = d->ui.rememberCheckBox->isChecked(); set_reset(saved.options, QDjViewPrefs::SHOW_MENUBAR, d->ui.menuBarCheckBox->isChecked() ); set_reset(saved.options, QDjViewPrefs::SHOW_TOOLBAR, d->ui.toolBarCheckBox->isChecked() ); set_reset(saved.options, QDjViewPrefs::SHOW_SCROLLBARS, d->ui.scrollBarsCheckBox->isChecked() ); set_reset(saved.options, QDjViewPrefs::SHOW_STATUSBAR, d->ui.statusBarCheckBox->isChecked() ); set_reset(saved.options, QDjViewPrefs::SHOW_SIDEBAR, d->ui.sideBarCheckBox->isChecked() ); set_reset(saved.options, QDjViewPrefs::SHOW_FRAME, d->ui.frameCheckBox->isChecked() ); set_reset(saved.options, QDjViewPrefs::SHOW_MAPAREAS, d->ui.mapAreasCheckBox->isChecked() ); set_reset(saved.options, QDjViewPrefs::LAYOUT_CONTINUOUS, d->ui.continuousCheckBox->isChecked() ); set_reset(saved.options, QDjViewPrefs::LAYOUT_SIDEBYSIDE, d->ui.sideBySideCheckBox->isChecked() ); set_reset(saved.options, QDjViewPrefs::LAYOUT_COVERPAGE, d->ui.coverPageCheckBox->isChecked() ); set_reset(saved.options, QDjViewPrefs::LAYOUT_RIGHTTOLEFT, d->ui.rtolCheckBox->isChecked() ); // zoom bool okay; int zoomIndex = d->ui.zoomCombo->currentIndex(); QString zoomText = d->ui.zoomCombo->lineEdit()->text(); int zoom = zoomText.replace(QRegExp("\\s*%?$"),"").trimmed().toInt(&okay); if (okay && zoom>=QDjVuWidget::ZOOM_MIN && zoom<=QDjVuWidget::ZOOM_MAX) saved.zoom = zoom; else if (zoomIndex >= 0) saved.zoom = d->ui.zoomCombo->itemData(zoomIndex).toInt(); } d->currentSaved = n; if (d->currentSaved >=0 && d->currentSaved <4) { // save modified flag bool modified = isWindowModified(); // load ui values QDjViewPrefs::Saved &saved = d->saved[d->currentSaved]; d->ui.rememberCheckBox->setChecked(saved.remember); QDjViewPrefs::Options opt = saved.options; d->ui.menuBarCheckBox->setChecked(opt & QDjViewPrefs::SHOW_MENUBAR); d->ui.toolBarCheckBox->setChecked(opt & QDjViewPrefs::SHOW_TOOLBAR); d->ui.scrollBarsCheckBox->setChecked(opt & QDjViewPrefs::SHOW_SCROLLBARS); d->ui.statusBarCheckBox->setChecked(opt & QDjViewPrefs::SHOW_STATUSBAR); d->ui.sideBarCheckBox->setChecked(opt & QDjViewPrefs::SHOW_SIDEBAR); d->ui.frameCheckBox->setChecked(opt & QDjViewPrefs::SHOW_FRAME); d->ui.mapAreasCheckBox->setChecked(opt & QDjViewPrefs::SHOW_MAPAREAS); d->ui.continuousCheckBox->setChecked(opt & QDjViewPrefs::LAYOUT_CONTINUOUS); d->ui.sideBySideCheckBox->setChecked(opt & QDjViewPrefs::LAYOUT_SIDEBYSIDE); d->ui.coverPageCheckBox->setChecked(opt & QDjViewPrefs::LAYOUT_COVERPAGE); d->ui.rtolCheckBox->setChecked(opt & QDjViewPrefs::LAYOUT_RIGHTTOLEFT); // zoom int zoomIndex = d->ui.zoomCombo->findData(QVariant(saved.zoom)); d->ui.zoomCombo->clearEditText(); d->ui.zoomCombo->setCurrentIndex(zoomIndex); if (zoomIndex < 0 && saved.zoom >= QDjVuWidget::ZOOM_MIN && saved.zoom <= QDjVuWidget::ZOOM_MAX) d->ui.zoomCombo->setEditText(QString("%1%").arg(saved.zoom)); else if (zoomIndex >= 0) d->ui.zoomCombo->setEditText(d->ui.zoomCombo->itemText(zoomIndex)); // reset modified flag setWindowModified(modified); } } void QDjViewPrefsDialog::zoomComboEdited() { bool okay; QString zoomText = d->ui.zoomCombo->lineEdit()->text(); int zoom = zoomText.replace(QRegExp("\\s*%?$"),"").trimmed().toInt(&okay); if (d->ui.zoomCombo->findText(zoomText) >= 0) d->ui.zoomCombo->setEditText(zoomText); else if (okay && zoom >= QDjVuWidget::ZOOM_MIN && zoom <= QDjVuWidget::ZOOM_MAX) d->ui.zoomCombo->setEditText(QString("%1%").arg(zoom)); } void QDjViewPrefsDialog::forceResolutionChanged() { if (! d->ui.forceResolutionCheckBox->isChecked()) d->ui.resolutionSpinBox->setValue(physicalDpiY()); } // ---------------------------------------- // MOC #include "qdjviewprefs.moc" /* ------------------------------------------------------------- Local Variables: c++-font-lock-extra-types: ( "\\sw+_t" "[A-Z]\\sw*[a-z]\\sw*" ) End: ------------------------------------------------------------- */ djview4/src/qdjviewprefs.h000066400000000000000000000164171174072760700161270ustar00rootroot00000000000000//C- -*- C++ -*- //C- ------------------------------------------------------------------- //C- DjView4 //C- Copyright (c) 2006- Leon Bottou //C- //C- This software is subject to, and may be distributed under, the //C- GNU General Public License, either version 2 of the license, //C- or (at your option) any later version. The license should have //C- accompanied the software or you may obtain a copy of the license //C- from the Free Software Foundation at http://www.fsf.org . //C- //C- This program is distributed in the hope that it will be useful, //C- but WITHOUT ANY WARRANTY; without even the implied warranty of //C- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //C- GNU General Public License for more details. //C- ------------------------------------------------------------------ #ifndef QDJVIEWPREFS_H #define QDJVIEWPREFS_H #if AUTOCONF # include "config.h" #endif #include #include #include #include #include #include #include #include #include #include #include #include #include #include #ifndef DJVIEW_ORG # define DJVIEW_ORG "DjVuLibre" #endif #ifndef DJVIEW_DOMAIN # define DJVIEW_DOMAIN "djvu.org" #endif #ifndef DJVIEW_APP # define DJVIEW_APP "DjView" #endif #ifndef DJVIEW_VERSION # define DJVIEW_VERSION 0x40900 #endif // ======================================== // QDJVIEWPREFS // ======================================== class QDjViewPrefs : public QObject { Q_OBJECT Q_ENUMS(Option Tool) public: enum Option { SHOW_MENUBAR = 0x000001, SHOW_TOOLBAR = 0x000002, SHOW_SIDEBAR = 0x000004, SHOW_STATUSBAR = 0x000010, SHOW_SCROLLBARS = 0x000020, SHOW_FRAME = 0x000100, SHOW_MAPAREAS = 0x000200, SHOW_MASK = 0x000FFF, LAYOUT_CONTINUOUS = 0x001000, LAYOUT_SIDEBYSIDE = 0x002000, LAYOUT_COVERPAGE = 0x004000, LAYOUT_RIGHTTOLEFT = 0x008000, LAYOUT_MASK = 0x00F000, HANDLE_MOUSE = 0x100000, HANDLE_KEYBOARD = 0x200000, HANDLE_LINKS = 0x400000, HANDLE_CONTEXTMENU = 0x800000, }; enum Tool { TOOLBAR_TOP = 0x80000000, TOOLBAR_BOTTOM = 0x40000000, TOOLBAR_AUTOHIDE = 0x10000000, TOOL_MODECOMBO = 0x00001, TOOL_MODEBUTTONS = 0x00002, TOOL_ZOOMCOMBO = 0x00004, TOOL_ZOOMBUTTONS = 0x00008, TOOL_PAGECOMBO = 0x00010, TOOL_PREVNEXT = 0x00020, TOOL_FIRSTLAST = 0x00040, TOOL_BACKFORW = 0x00080, TOOL_NEW = 0x00100, TOOL_OPEN = 0x00200, TOOL_FIND = 0x00400, TOOL_SELECT = 0x00800, TOOL_SAVE = 0x01000, TOOL_PRINT = 0x02000, TOOL_LAYOUT = 0x04000, TOOL_ROTATE = 0x08000, TOOL_WHATSTHIS = 0x10000, }; Q_DECLARE_FLAGS(Options, Option) Q_DECLARE_FLAGS(Tools, Tool) static const Options defaultOptions; static const Tools defaultTools; static QString versionString(); QString modifiersToString(Qt::KeyboardModifiers); Qt::KeyboardModifiers stringToModifiers(QString); QString optionsToString(Options); Options stringToOptions(QString); QString toolsToString(Tools); Tools stringToTools(QString); struct Saved { Saved(); bool remember; //!< Save before closing. Options options; //!< Miscellaneous flags. int zoom; //!< Zoom factor. QByteArray state; //!< Toolbar and sidebar geometry. }; // Preferences remembered between program invocations. Saved forEmbeddedPlugin; //!< Prefs for the embedded plugin mode. Saved forFullPagePlugin; //!< Prefs for the full page plugin mode. Saved forStandalone; //!< Prefs for the standalone viewer mode. Saved forFullScreen; //!< Prefs for the full screen mode. QSize windowSize; //!< Size of the standalone window. // Preferences set via the preference dialog. Tools tools; //!< Toolbar composition. double gamma; //!< Gamma value of the target screen. QColor white; //!< White point of the target screen. int resolution; //!< Forced screen resolution or zero. qlonglong cacheSize; //!< Size of the decoded page cache. int pixelCacheSize; //!< Size of the pixel cache. int lensSize; //!< Size of the magnification lens. int lensPower; //!< Power of the magnification lens. QString browserProgram; //!< Preferred web browser. QUrl proxyUrl; //!< Proxy information. bool enableAnimations; //!< Animated page movements. bool advancedFeatures; //!< Advanced features. bool showTextLabel; //!< Show text label. bool invertLuminance; //!< Invert luminance by default. bool mouseWheelZoom; //!< Mouse wheel zooms instead of scroll. QString languageOverride; //!< Language settings bool restrictOverride; //!< Override noprint/nosave Qt::KeyboardModifiers modifiersForLens; //!< Keys for the lens. Qt::KeyboardModifiers modifiersForSelect; //!< Keys for selecting. Qt::KeyboardModifiers modifiersForLinks; //!< Keys for showing the links. // Sidebar preferences int thumbnailSize; bool thumbnailSmart; bool searchWordsOnly; bool searchCaseSensitive; bool searchRegExpMode; // Dialog preferences int infoDialogTab; //!< Active tab in info dialog. int metaDialogTab; //!< Active tab in meta dialog. double printerGamma; //!< Gamma value for the printer. QString printerName; //!< Name of the printer QString printFile; //!< Output file for print data bool printReverse; //!< Print revere flag bool printCollate; //!< Print collate flag // Recent files QStringList recentFiles; //!< Recently opened files public: static QDjViewPrefs *instance(void); public slots: void load(); void save(); void update(); signals: void updated(); private: QDjViewPrefs(void); void loadGroup(QSettings &s, QString name, Saved &saved); void saveGroup(QSettings &s, QString name, Saved &saved); }; Q_DECLARE_OPERATORS_FOR_FLAGS(QDjViewPrefs::Options) Q_DECLARE_OPERATORS_FOR_FLAGS(QDjViewPrefs::Tools) // ======================================== // QDJVIEWPREFSDIALOG // ======================================== class QDjView; class QDjViewPrefsDialog : public QDialog { Q_OBJECT public: ~QDjViewPrefsDialog(); static QDjViewPrefsDialog *instance(); public slots: void load(QDjView *djview); void apply(); void reset(); virtual void done(int); protected slots: void cacheClear(); void modeComboChanged(int); void zoomComboEdited(); void setModified(); void forceResolutionChanged(); private: QDjViewPrefsDialog(); void connectModified(QWidget *w); void loadLanguageComboBox(QString lang); struct Private; Private *d; }; #endif /* ------------------------------------------------------------- Local Variables: c++-font-lock-extra-types: ( "\\sw+_t" "[A-Z]\\sw*[a-z]\\sw*" "qlonglong" ) End: ------------------------------------------------------------- */ djview4/src/qdjviewprefsdialog.ui000066400000000000000000001337111174072760700174720ustar00rootroot00000000000000 QDjViewPrefsDialog 0 0 509 374 Dialog 0 Qt::ElideNone &Screen Gamma 6 0 0 0 <html>Screen color correction.<br>Adjust slider until gray shades look similar.</html> Qt::RichText Qt::AlignCenter true gammaSlider 5 50 22 Qt::Horizontal QSlider::TicksBelow 5 6 0 Darker Qt::Horizontal 40 20 Lighter Qt::Horizontal 5 20 119 119 119 119 QFrame::StyledPanel QFrame::Raised Qt::Horizontal 5 20 true Display Force screen &resolution true Qt::Horizontal QSizePolicy::Maximum 40 20 0 0 Qt::AlignCenter dpi 25 600 100 Qt::Horizontal QSizePolicy::Maximum 80 20 Force inverted luminance &Interface 6 0 Options for modeComboBox Standalone Viewer Full Screen Standalone Viewer Full Page Plugin Embedded Plugin Qt::Horizontal 40 20 &Remember initial state from last invocation Show &Menu bar &Tool bar Sc&rollbars Stat&us bar &Side bar Display &Zoom: Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter zoomCombo true Qt::Vertical 20 40 0 0 QFrame::HLine QFrame::Raised 3 Qt::Vertical 20 40 Display page &frames Display &annotations Qt::Vertical 20 40 Qt::Vertical 20 5 Layout Continuous Qt::Vertical 20 20 0 0 QFrame::HLine QFrame::Raised 3 Qt::Vertical 20 40 Side-by-side true Qt::Horizontal QSizePolicy::MinimumExpanding 16 20 Cover Page Right-to-Left Qt::Vertical 20 40 &Keys Keys 9 9 For displaying hyper&links: keysForLinksCombo For &selecting text or images: keysForSelectCombo For displaying the &lens: keysForLensCombo true true true Mouse wheel Mouse wheel scrolls the page true Mouse wheel changes the zoom factor Qt::Vertical 20 5 &Lens 6 9 Enable magnifying &lens true Lens options 9 6 Lens &size: lensSizeSpinBox Magnifying &power: lensPowerSpinBox x 1 10 3 pixels 50 500 50 300 Qt::Vertical 20 5 &Network true Proxy settings Use pro&xy to access the network false &Host: proxyHostLineEdit 1 0 &Port: proxyPortSpinBox 65535 8080 &User: proxyUserLineEdit 1 0 Pass&word: proxyPasswordLineEdit QLineEdit::Password Cache 9 6 &Clear false MB 32 10 MB 6 1 1 &Decoded page cache: pageCacheSpinBox &Pixel cache: pixelCacheSpinBox Qt::Vertical 17 8 &Advanced Interface Force language (next time djview runs) false Qt::Horizontal 40 20 Enable page animations true Enable advanced features in menus Show hidden text in status bar Miscellaneous Override saving and printing restrictions Manual printer color correction false Qt::AlignCenter gamma= 1 0.500000000000000 5.000000000000000 0.100000000000000 2.200000000000000 Qt::Horizontal 5 20 Qt::Vertical 20 5 6 0 &Defaults false Qt::Horizontal 32 32 false &Apply &Ok Cancel QDjViewModifiersComboBox QComboBox

    qdjviewprefs.h
    QDjViewGammaWidget QFrame
    qdjviewprefs.h
    1
    tabWidget gammaSlider forceResolutionCheckBox resolutionSpinBox invertLuminanceCheckBox modeComboBox rememberCheckBox menuBarCheckBox toolBarCheckBox scrollBarsCheckBox statusBarCheckBox sideBarCheckBox zoomCombo frameCheckBox mapAreasCheckBox continuousCheckBox sideBySideCheckBox coverPageCheckBox rtolCheckBox keysForLensCombo keysForSelectCombo keysForLinksCombo wheelScrollButton wheelZoomButton lensEnableCheckBox lensPowerSpinBox lensSizeSpinBox proxyCheckBox proxyHostLineEdit proxyPortSpinBox proxyUserLineEdit proxyPasswordLineEdit pixelCacheSpinBox pageCacheSpinBox cacheClearButton languageCheckBox languageComboBox animationCheckBox advancedCheckBox textLabelCheckBox restrictOverrideCheckBox printerManualCheckBox printerGammaSpinBox resetButton applyButton okButton cancelButton okButton clicked() QDjViewPrefsDialog accept() 397 342 96 254 cancelButton clicked() QDjViewPrefsDialog reject() 478 342 179 282 lensEnableCheckBox toggled(bool) lensGroupBox setEnabled(bool) 80 63 101 104 printerManualCheckBox toggled(bool) printerGammaSpinBox setEnabled(bool) 213 230 364 231 forceResolutionCheckBox toggled(bool) resolutionSpinBox setEnabled(bool) 204 266 388 266 rememberCheckBox toggled(bool) showGroupBox setDisabled(bool) 118 95 117 169 sideBySideCheckBox toggled(bool) coverPageCheckBox setEnabled(bool) 386 196 472 247 sideBySideCheckBox toggled(bool) rtolCheckBox setEnabled(bool) 474 217 472 271 rememberCheckBox toggled(bool) modeGroupBox setDisabled(bool) 162 85 180 123 rememberCheckBox toggled(bool) layoutGroupBox setDisabled(bool) 249 86 351 118 languageCheckBox toggled(bool) languageComboBox setEnabled(bool) 137 81 405 94 proxyCheckBox toggled(bool) proxySettings setEnabled(bool) 157 81 168 100 djview4/src/qdjviewprintdialog.ui000066400000000000000000000245731174072760700175140ustar00rootroot00000000000000 QDjViewPrintDialog 0 0 427 361 Dialog 9 6 0 Print 9 6 Print 9 6 &Document true C&urrent page 0 6 &Pages to Qt::AlignCenter Qt::Horizontal QSizePolicy::Minimum 40 10 Destination 9 6 Print to file 1 0 6 :/images/icon_open.png 0 6 0 5 0 0 Printer name: QFrame::Box QFrame::Sunken 0 0 0 0 Choose 0 9 6 &Defaults false false Qt::Horizontal 61 20 &Ok true true false &Cancel false 9 6 Qt::Horizontal Stop cancelButton clicked() QDjViewPrintDialog reject() 426 310 472 336 fromPageCombo activated(int) pageRangeButton click() 150 152 44 163 toPageCombo activated(int) pageRangeButton click() 245 155 40 161 djview4/src/qdjviewsavedialog.ui000066400000000000000000000177501174072760700173150ustar00rootroot00000000000000 QDjViewSaveDialog 0 0 405 300 Dialog 9 6 Save 9 6 &Document true C&urrent page 0 6 &Pages to Qt::AlignCenter Qt::Horizontal QSizePolicy::Minimum 40 16 Destination 9 6 0 6 0 5 0 0 Format: Bundled DjVu Document Indirect DjVu Document 0 6 :/images/icon_open.png 0 9 6 Qt::Horizontal 40 10 &Ok true true false &Cancel false 9 6 Qt::Horizontal Stop false fromPageCombo activated(int) pageRangeButton click() 158 163 76 158 toPageCombo activated(int) pageRangeButton click() 248 155 44 154 cancelButton clicked() QDjViewSaveDialog reject() 375 342 443 367 djview4/src/qdjviewsidebar.cpp000066400000000000000000001345551174072760700167600ustar00rootroot00000000000000//C- -*- C++ -*- //C- ------------------------------------------------------------------- //C- DjView4 //C- Copyright (c) 2006- Leon Bottou //C- //C- This software is subject to, and may be distributed under, the //C- GNU General Public License, either version 2 of the license, //C- or (at your option) any later version. The license should have //C- accompanied the software or you may obtain a copy of the license //C- from the Free Software Foundation at http://www.fsf.org . //C- //C- This program is distributed in the hope that it will be useful, //C- but WITHOUT ANY WARRANTY; without even the implied warranty of //C- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //C- GNU General Public License for more details. //C- ------------------------------------------------------------------ #if AUTOCONF # include "config.h" #endif #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "qdjvu.h" #include "qdjvuwidget.h" #include "qdjviewsidebar.h" #include "qdjview.h" // ======================================= // QDJVIEWOUTLINE // ======================================= QDjViewOutline::QDjViewOutline(QDjView *djview) : QWidget(djview), djview(djview), loaded(false) { tree = new QTreeWidget(this); tree->setColumnCount(1); tree->setItemsExpandable(true); tree->setUniformRowHeights(true); tree->header()->hide(); tree->header()->setStretchLastSection(true); tree->setEditTriggers(QAbstractItemView::NoEditTriggers); tree->setSelectionBehavior(QAbstractItemView::SelectRows); tree->setSelectionMode(QAbstractItemView::SingleSelection); tree->setTextElideMode(Qt::ElideRight); QVBoxLayout *layout = new QVBoxLayout(this); layout->setMargin(0); layout->setSpacing(0); layout->addWidget(tree); connect(tree, SIGNAL(itemActivated(QTreeWidgetItem*, int)), this, SLOT(itemActivated(QTreeWidgetItem*)) ); connect(djview, SIGNAL(documentClosed(QDjVuDocument*)), this, SLOT(clear()) ); connect(djview, SIGNAL(documentOpened(QDjVuDocument*)), this, SLOT(clear()) ); connect(djview, SIGNAL(documentReady(QDjVuDocument*)), this, SLOT(refresh()) ); connect(djview->getDjVuWidget(), SIGNAL(pageChanged(int)), this, SLOT(pageChanged(int)) ); connect(djview->getDjVuWidget(), SIGNAL(layoutChanged()), this, SLOT(refresh()) ); setWhatsThis(tr("Document outline.
    " "This panel display the document outline, " "or the page names when the outline is not available, " "Double-click any entry to jump to the selected page." "")); if (djview->pageNum() > 0) refresh(); } void QDjViewOutline::clear() { tree->clear(); loaded = false; } void QDjViewOutline::refresh() { QDjVuDocument *doc = djview->getDocument(); if (doc && !loaded && djview->pageNum()>0) { miniexp_t outline = doc->getDocumentOutline(); if (outline == miniexp_dummy) return; loaded = true; if (outline) { if (!miniexp_consp(outline) || miniexp_car(outline) != miniexp_symbol("bookmarks")) { QString msg = tr("Outline data is corrupted"); qWarning("%s", (const char*)msg.toLocal8Bit()); } tree->clear(); QTreeWidgetItem *root = new QTreeWidgetItem(); fillItems(root, miniexp_cdr(outline)); while (root->childCount() > 0) tree->insertTopLevelItem(tree->topLevelItemCount(), root->takeChild(0) ); if (tree->topLevelItemCount() == 1) tree->topLevelItem(0)->setExpanded(true); delete root; } else { tree->clear(); QTreeWidgetItem *root = new QTreeWidgetItem(tree); root->setText(0, tr("Pages")); root->setFlags(Qt::ItemIsEnabled); root->setData(0, Qt::UserRole, -1); for (int pageno=0; pagenopageNum(); pageno++) { QTreeWidgetItem *item = new QTreeWidgetItem(root); QString name = djview->pageName(pageno); item->setText(0, tr("Page %1").arg(name)); item->setData(0, Qt::UserRole, pageno); item->setData(0, Qt::UserRole+1, pageno); item->setFlags(Qt::ItemIsSelectable|Qt::ItemIsEnabled); item->setToolTip(0, tr("Go: page %1.").arg(name)); item->setWhatsThis(0, whatsThis()); } tree->setItemExpanded(root, true); } pageChanged(djview->getDjVuWidget()->page()); } } int QDjViewOutline::pageNumber(const char *link) { if (link && link[0] == '#') return djview->pageNumber(QString::fromUtf8(link+1)); if (link == 0 || link[0] != '?') return -1; QUrl url = QUrl::fromEncoded(QByteArray("http://f/f") + link); if (url.hasQueryItem("page")) return djview->pageNumber(url.queryItemValue("page")); else if (url.hasQueryItem("pageno")) return djview->pageNumber("$" + url.queryItemValue("pageno")); return -1; } void QDjViewOutline::fillItems(QTreeWidgetItem *root, miniexp_t expr) { while(miniexp_consp(expr)) { miniexp_t s = miniexp_car(expr); expr = miniexp_cdr(expr); if (miniexp_consp(s) && miniexp_consp(miniexp_cdr(s)) && miniexp_stringp(miniexp_car(s)) && miniexp_stringp(miniexp_cadr(s)) ) { // fill item const char *name = miniexp_to_str(miniexp_car(s)); const char *link = miniexp_to_str(miniexp_cadr(s)); int pageno = pageNumber(link); QString pagename = (pageno>=0)?djview->pageName(pageno):QString(); QTreeWidgetItem *item = new QTreeWidgetItem(root); if (name && name[0]) item->setText(0, QString::fromUtf8(name)); else if (! pagename.isEmpty()) item->setText(0, tr("Page %1").arg(pagename)); item->setFlags(0); item->setWhatsThis(0, whatsThis()); if (link && link[0]) { QString slink = QString::fromUtf8(link); item->setData(0, Qt::UserRole+1, slink); item->setFlags(Qt::ItemIsSelectable|Qt::ItemIsEnabled); item->setToolTip(0, tr("Go: %1").arg(slink)); if (pageno >= 0) item->setData(0, Qt::UserRole, pageno); if (! pagename.isEmpty()) item->setToolTip(0, tr("Go: page %1.").arg(pagename)); } // recurse fillItems(item, miniexp_cddr(s)); } } } void QDjViewOutline::pageChanged(int pageno) { int fp = -1; QTreeWidgetItem *fi = 0; // find current selection QList sel = tree->selectedItems(); QTreeWidgetItem *si = 0; if (sel.size() == 1) si = sel[0]; // current selection has priority if (si) searchItem(si, pageno, fi, fp); // search for (int i=0; itopLevelItemCount(); i++) searchItem(tree->topLevelItem(i), pageno, fi, fp); // select if (si && fi && si != fi) tree->setItemSelected(si, false); if (fi && si != fi) { tree->setCurrentItem(fi); tree->setItemSelected(fi, true); tree->scrollToItem(fi); } } void QDjViewOutline::searchItem(QTreeWidgetItem *item, int pageno, QTreeWidgetItem *&fi, int &fp) { QVariant data = item->data(0, Qt::UserRole); if (data.type() == QVariant::Int) { int page = data.toInt(); if (page>=0 && page<=pageno && page>fp) { fi = item; fp = page; } } for (int i=0; ichildCount(); i++) searchItem(item->child(i), pageno, fi, fp); } void QDjViewOutline::itemActivated(QTreeWidgetItem *item) { QVariant data = item->data(0, Qt::UserRole+1); if (data.type() == QVariant::String) { QString link = data.toString(); if (link.size() > 0) djview->goToLink(link); } else if (data.type() == QVariant::Int) { int pageno = data.toInt(); if (pageno >= 0) djview->goToPage(pageno); } } // ======================================= // QDJVIEWTHUMBNAILS // ======================================= class QDjViewThumbnails::View : public QListView { Q_OBJECT public: View(QDjViewThumbnails *widget); protected: QStyleOptionViewItem viewOptions() const; private: QDjViewThumbnails *widget; QDjView *djview; }; class QDjViewThumbnails::Model : public QAbstractListModel { Q_OBJECT public: ~Model(); Model(QDjViewThumbnails*); virtual int rowCount(const QModelIndex &parent) const; virtual QVariant data(const QModelIndex &index, int role) const; int getSize() { return size; } int getSmart() { return smart; } public slots: void setSize(int); void setSmart(bool); void scheduleRefresh(); protected slots: void documentClosed(QDjVuDocument *doc); void documentReady(QDjVuDocument *doc); void thumbnail(int); void refresh(); private: QDjView *djview; QDjViewThumbnails *widget; QStringList names; ddjvu_format_t *format; QIcon icon; int size; bool smart; bool refreshScheduled; int pageInProgress; QIcon makeIcon(int pageno) const; QSize makeHint(int pageno) const; }; // ---------------------------------------- // QDJVIEWTHUMBNAILS::VIEW QDjViewThumbnails::View::View(QDjViewThumbnails *widget) : QListView(widget), widget(widget), djview(widget->djview) { setDragEnabled(false); setEditTriggers(QAbstractItemView::NoEditTriggers); setSelectionBehavior(QAbstractItemView::SelectRows); setSelectionMode(QAbstractItemView::SingleSelection); setTextElideMode(Qt::ElideRight); setViewMode(QListView::IconMode); setFlow(QListView::LeftToRight); setWrapping(true); setMovement(QListView::Static); setResizeMode(QListView::Adjust); setSpacing(8); setUniformItemSizes(true); } QStyleOptionViewItem QDjViewThumbnails::View::viewOptions() const { int size = widget->model->getSize(); QStyleOptionViewItem opt = QListView::viewOptions(); opt.decorationAlignment = Qt::AlignCenter; opt.decorationPosition = QStyleOptionViewItem::Top; opt.decorationSize = QSize(size, size); opt.displayAlignment = Qt::AlignCenter; return opt; } // ---------------------------------------- // QDJVIEWTHUMBNAILS::MODEL QDjViewThumbnails::Model::~Model() { if (format) ddjvu_format_release(format); } QDjViewThumbnails::Model::Model(QDjViewThumbnails *widget) : QAbstractListModel(widget), djview(widget->djview), widget(widget), format(0), size(0), smart(true), refreshScheduled(false), pageInProgress(-1) { // create format #if DDJVUAPI_VERSION < 18 unsigned int masks[3] = { 0xff0000, 0xff00, 0xff }; format = ddjvu_format_create(DDJVU_FORMAT_RGBMASK32, 3, masks); #else unsigned int masks[4] = { 0xff0000, 0xff00, 0xff, 0xff000000 }; format = ddjvu_format_create(DDJVU_FORMAT_RGBMASK32, 4, masks); #endif ddjvu_format_set_row_order(format, true); ddjvu_format_set_y_direction(format, true); ddjvu_format_set_ditherbits(format, QPixmap::defaultDepth()); // set size setSize(64); // connect connect(djview, SIGNAL(documentClosed(QDjVuDocument*)), this, SLOT(documentClosed(QDjVuDocument*)) ); connect(djview, SIGNAL(documentReady(QDjVuDocument*)), this, SLOT(documentReady(QDjVuDocument*)) ); // update if (djview->pageNum() > 0) documentReady(djview->getDocument()); } void QDjViewThumbnails::Model::documentClosed(QDjVuDocument *doc) { if (names.size() > 0) { beginRemoveRows(QModelIndex(),0,names.size()-1); names.clear(); pageInProgress = -1; endRemoveRows(); } disconnect(doc, 0, this, 0); } void QDjViewThumbnails::Model::documentReady(QDjVuDocument *doc) { if (names.size() > 0) { beginRemoveRows(QModelIndex(),0,names.size()-1); names.clear(); pageInProgress = -1; endRemoveRows(); } int pagenum = djview->pageNum(); if (pagenum > 0) { beginInsertRows(QModelIndex(),0,pagenum-1); for (int pageno=0; pagenopageName(pageno); endInsertRows(); } connect(doc, SIGNAL(thumbnail(int)), this, SLOT(thumbnail(int)) ); connect(doc, SIGNAL(pageinfo()), this, SLOT(scheduleRefresh()) ); connect(doc, SIGNAL(idle()), this, SLOT(scheduleRefresh()) ); widget->pageChanged(djview->getDjVuWidget()->page()); scheduleRefresh(); } void QDjViewThumbnails::Model::thumbnail(int pageno) { QModelIndex mi = index(pageno); emit dataChanged(mi, mi); scheduleRefresh(); } void QDjViewThumbnails::Model::scheduleRefresh() { if (! refreshScheduled) QTimer::singleShot(0, this, SLOT(refresh())); refreshScheduled = true; } void QDjViewThumbnails::Model::refresh() { QDjVuDocument *doc = djview->getDocument(); ddjvu_status_t status; refreshScheduled = false; if (doc && pageInProgress >= 0) { status = ddjvu_thumbnail_status(*doc, pageInProgress, 0); if (status >= DDJVU_JOB_OK) pageInProgress = -1; } if (doc && pageInProgress < 0 && widget->isVisible()) { QRect dr = widget->view->rect(); for (int i=0; iview->visualRect(mi))) { status = ddjvu_thumbnail_status(*doc, i, 0); if (status == DDJVU_JOB_NOTSTARTED) { if (smart && !ddjvu_document_check_pagedata(*doc, i)) continue; status = ddjvu_thumbnail_status(*doc, i, 1); if (status == DDJVU_JOB_STARTED) { pageInProgress = i; break; } } } } } } void QDjViewThumbnails::Model::setSmart(bool b) { if (b != smart) { smart = b; scheduleRefresh(); } } void QDjViewThumbnails::Model::setSize(int newSize) { newSize = qBound(16, newSize, 256); if (newSize != size) { size = newSize; QPixmap pixmap(size,size); pixmap.fill(); QPainter painter; int s8 = size/8; if (s8 >= 1) { QPolygon poly; poly << QPoint(s8,0) << QPoint(size-2*s8,0) << QPoint(size-s8-1,s8) << QPoint(size-s8-1,size-1) << QPoint(s8,size-1); QPainter painter(&pixmap); painter.setBrush(Qt::NoBrush); painter.setPen(Qt::darkGray); painter.drawPolygon(poly); } icon = QIcon(pixmap); } emit layoutChanged(); } QIcon QDjViewThumbnails::Model::makeIcon(int pageno) const { QDjVuDocument *doc = djview->getDocument(); if (doc) { // render thumbnail int w = size; int h = size; QImage img(size, size, QImage::Format_RGB32); int status = ddjvu_thumbnail_status(*doc, pageno, 0); if (status == DDJVU_JOB_NOTSTARTED) { const_cast(this)->scheduleRefresh(); } else if (ddjvu_thumbnail_render(*doc, pageno, &w, &h, format, img.bytesPerLine(), (char*)img.bits() )) { QPixmap pixmap(size,size); pixmap.fill(); QPoint dst((size-w)/2, (size-h)/2); QRect src(0,0,w,h); QPainter painter; painter.begin(&pixmap); painter.drawImage(dst, img, src); painter.setBrush(Qt::NoBrush); painter.setPen(Qt::darkGray); painter.drawRect(dst.x(), dst.y(), w-1, h-1); painter.end(); return QIcon(pixmap); } } return icon; } QSize QDjViewThumbnails::Model::makeHint(int) const { QFontMetrics metrics(widget->view->font()); return QSize(size, size+metrics.height()); } int QDjViewThumbnails::Model::rowCount(const QModelIndex &) const { return names.size(); } QVariant QDjViewThumbnails::Model::data(const QModelIndex &index, int role) const { if (index.isValid()) { int pageno = index.row(); if (pageno>=0 && pagenowhatsThis(); case Qt::UserRole: return pageno; case Qt::SizeHintRole: return makeHint(pageno); default: break; } } } return QVariant(); } // ---------------------------------------- // QDJVIEWTHUMBNAILS QDjViewThumbnails::QDjViewThumbnails(QDjView *djview) : QWidget(djview), djview(djview) { model = new Model(this); selection = new QItemSelectionModel(model); view = new View(this); view->setModel(model); view->setSelectionModel(selection); QVBoxLayout *layout = new QVBoxLayout(this); layout->setMargin(0); layout->setSpacing(0); layout->addWidget(view); connect(djview->getDjVuWidget(), SIGNAL(pageChanged(int)), this, SLOT(pageChanged(int)) ); connect(view, SIGNAL(activated(const QModelIndex&)), this, SLOT(activated(const QModelIndex&)) ); menu = new QMenu(this); QActionGroup *group = new QActionGroup(this); QAction *action; action = menu->addAction(tr("Tiny","thumbnail menu")); connect(action,SIGNAL(triggered()),this,SLOT(setSize()) ); action->setCheckable(true); action->setActionGroup(group); action->setData(32); action = menu->addAction(tr("Small","thumbnail menu")); connect(action,SIGNAL(triggered()),this,SLOT(setSize()) ); action->setCheckable(true); action->setActionGroup(group); action->setData(64); action = menu->addAction(tr("Medium","thumbnail menu")); connect(action,SIGNAL(triggered()),this,SLOT(setSize()) ); action->setCheckable(true); action->setActionGroup(group); action->setData(96); action = menu->addAction(tr("Large","thumbnail menu")); connect(action,SIGNAL(triggered()),this,SLOT(setSize()) ); action->setCheckable(true); action->setActionGroup(group); action->setData(160); menu->addSeparator(); action = menu->addAction(tr("Smart","thumbnail menu")); connect(action,SIGNAL(toggled(bool)),this,SLOT(setSmart(bool)) ); action->setCheckable(true); action->setData(true); updateActions(); #ifdef Q_WS_MAC QString mc = tr("Control Left Mouse Button"); #else QString mc = tr("Right Mouse Button"); #endif setWhatsThis(tr("Document thumbnails.
    " "This panel display thumbnails for the document pages. " "Double click a thumbnail to jump to the selected page. " "%1 to change the thumbnail size or the refresh mode. " "The smart refresh mode only computes thumbnails " "when the page data is present (displayed or cached.)" "").arg(mc) ); } void QDjViewThumbnails::updateActions(void) { QAction *action; int size = model->getSize(); bool smart = model->getSmart(); foreach(action, menu->actions()) { QVariant data = action->data(); if (data.type() == QVariant::Bool) action->setChecked(smart); else action->setChecked(data.toInt() == size); } } void QDjViewThumbnails::pageChanged(int pageno) { if (pageno >= 0 && pageno < djview->pageNum()) { QModelIndex mi = model->index(pageno); if (! selection->isSelected(mi)) selection->select(mi, QItemSelectionModel::ClearAndSelect); view->scrollTo(mi); } } void QDjViewThumbnails::activated(const QModelIndex &index) { if (index.isValid()) { int pageno = index.row(); if (pageno>=0 && pagenopageNum()) djview->goToPage(pageno); } } int QDjViewThumbnails::size() { return model->getSize(); } void QDjViewThumbnails::setSize(int size) { model->setSize(size); updateActions(); } void QDjViewThumbnails::setSize() { QAction *action = qobject_cast(sender()); if (action) setSize(action->data().toInt()); } bool QDjViewThumbnails::smart() { return model->getSmart(); } void QDjViewThumbnails::setSmart(bool smart) { model->setSmart(smart); updateActions(); } void QDjViewThumbnails::contextMenuEvent(QContextMenuEvent *event) { menu->exec(event->globalPos()); event->accept(); } // ======================================= // QDJVIEWFIND // ======================================= class QDjViewFind::Model : public QAbstractListModel { // This class implements the listview model. // But the bulk contains private data for qdjviewfind! Q_OBJECT public: Model(QDjViewFind*); // model stuff public: virtual int rowCount(const QModelIndex &parent) const; virtual QVariant data(const QModelIndex &index, int role) const; void modelClear(); int modelFind(int pageno); bool modelSelect(int pageno); void modelAdd(int pageno, int hits); private: struct RowInfo { int pageno; int hits; QString name; }; QList pages; // private data stuff public: void nextHit(bool backwards); void startFind(bool backwards, int delay=0); void stopFind(); typedef QList Hit; typedef QList Hits; QMap hits; protected: virtual bool eventFilter(QObject*, QEvent*); public slots: void documentClosed(QDjVuDocument*); void documentReady(QDjVuDocument*); void clear(); void doHighlights(int pageno); void doPending(); void workTimeout(); void animTimeout(); void makeSelectionVisible(); void pageChanged(int); void textChanged(); void pageinfo(); void itemActivated(const QModelIndex&); private: friend class QDjViewFind; QDjViewFind *widget; QDjView *djview; QTimer *animTimer; QTimer *workTimer; QItemSelectionModel *selection; QAbstractButton *animButton; QIcon animIcon; QIcon findIcon; QRegExp find; int curWork; int curPage; int curHit; bool searchBackwards; bool caseSensitive; bool wordOnly; bool regExpMode; bool working; bool pending; }; // ---------------------------------------- // QDJVIEWFIND::MODEL QDjViewFind::Model::Model(QDjViewFind *widget) : QAbstractListModel(widget), widget(widget), djview(widget->djview), selection(0), animButton(0), curPage(0), curHit(0), searchBackwards(false), caseSensitive(false), wordOnly(true), regExpMode(false), working(false), pending(false) { selection = new QItemSelectionModel(this); animTimer = new QTimer(this); workTimer = new QTimer(this); workTimer->setSingleShot(true); connect(animTimer, SIGNAL(timeout()), this, SLOT(animTimeout())); connect(workTimer, SIGNAL(timeout()), this, SLOT(workTimeout())); findIcon = QIcon(":/images/icon_empty.png"); } int QDjViewFind::Model::rowCount(const QModelIndex&) const { return pages.size(); } QVariant QDjViewFind::Model::data(const QModelIndex &index, int role) const { if (index.isValid()) { int row = index.row(); if (row>=0 && rowwhatsThis(); default: break; } } } return QVariant(); } void QDjViewFind::Model::modelClear() { int nrows = pages.size(); if (nrows > 0) { beginRemoveRows(QModelIndex(), 0, nrows-1); pages.clear(); endRemoveRows(); } } int QDjViewFind::Model::modelFind(int pageno) { int lo = 0; int hi = pages.size(); while (lo < hi) { int k = (lo + hi - 1) / 2; if (pageno > pages[k].pageno) lo = k + 1; else if (pageno < pages[k].pageno) hi = k; else lo = hi = k; } return lo; } bool QDjViewFind::Model::modelSelect(int pageno) { int lo = modelFind(pageno); QModelIndex mi = index(lo); if (lo < pages.size() && pages[lo].pageno == pageno) { if (!selection->isSelected(mi)) selection->select(mi, QItemSelectionModel::ClearAndSelect); return true; } selection->select(mi, QItemSelectionModel::Clear); return false; } void QDjViewFind::Model::modelAdd(int pageno, int hits) { QString name = djview->pageName(pageno); RowInfo info; info.pageno = pageno; info.hits = hits; if (hits == 1) info.name = tr("Page %1 (1 hit)").arg(name); else info.name = tr("Page %1 (%n hits)", 0, hits).arg(name); int lo = modelFind(pageno); if (lo < pages.size() && pages[lo].pageno == pageno) { pages[lo] = info; QModelIndex mi = index(lo); emit dataChanged(mi, mi); } else { beginInsertRows(QModelIndex(), lo, lo); pages.insert(lo, info); endInsertRows(); if (pageno == djview->getDjVuWidget()->page()) modelSelect(pageno); } } bool QDjViewFind::Model::eventFilter(QObject*, QEvent *event) { switch (event->type()) { case QEvent::Show: if (working) { animTimer->start(); workTimer->start(); } default: break; } return false; } void QDjViewFind::Model::documentClosed(QDjVuDocument *doc) { disconnect(doc, 0, this, 0); stopFind(); clear(); curWork = 0; curPage = 0; curHit = -1; searchBackwards = false; pending = false; widget->eraseText(); widget->combo->setEnabled(false); widget->label->setText(QString()); widget->stack->setCurrentWidget(widget->label); } void QDjViewFind::Model::documentReady(QDjVuDocument *doc) { curWork = djview->getDjVuWidget()->page(); curPage = curWork; curHit = -1; if (doc) { widget->combo->setEnabled(true); connect(doc, SIGNAL(pageinfo()), this, SLOT(pageinfo())); connect(doc, SIGNAL(idle()), this, SLOT(pageinfo())); if (! find.isEmpty()) startFind(false); } } static bool miniexp_get_int(miniexp_t &r, int &x) { if (! miniexp_numberp(miniexp_car(r))) return false; x = miniexp_to_int(miniexp_car(r)); r = miniexp_cdr(r); return true; } static bool miniexp_get_rect(miniexp_t &r, QRect &rect) { int x1,y1,x2,y2; if (! (miniexp_get_int(r, x1) && miniexp_get_int(r, y1) && miniexp_get_int(r, x2) && miniexp_get_int(r, y2) )) return false; if (x2 &positions, int &state) { miniexp_t type = miniexp_car(exp); int typenum = parse_text_type(type); miniexp_t r = exp = miniexp_cdr(exp); if (! miniexp_symbolp(type)) return false; QRect rect; if (! miniexp_get_rect(r, rect)) return false; miniexp_t s = miniexp_car(r); state = qMax(state, typenum); if (miniexp_stringp(s) && !miniexp_cdr(r)) { result += (state >= 2) ? "\n" : (state >= 1) ? " " : ""; state = -1; positions[result.size()] = exp; result += QString::fromUtf8(miniexp_to_str(s)); r = miniexp_cdr(r); } while(miniexp_consp(s)) { miniexp_get_text(s, result, positions, state); r = miniexp_cdr(r); s = miniexp_car(r); } if (r) return false; state = qMax(state, typenum); return true; } static QList > miniexp_search_text(miniexp_t exp, QRegExp regex) { QList > hits; QString text; QMap positions; // build string int state = -1; if (! miniexp_get_text(exp, text, positions, state)) return hits; // search hits int offset = 0; int match; while ((match = regex.indexIn(text, offset)) >= 0) { QList hit; int endmatch = match + regex.matchedLength(); offset += 1; if (endmatch <= match) continue; QMap::const_iterator pos = positions.lowerBound(match); while (pos != positions.begin() && pos.key() > match) --pos; for (; pos != positions.end() && pos.key() < endmatch; ++pos) hit += pos.value(); hits += hit; if (pos != positions.end()) offset = pos.key(); else break; } return hits; } void QDjViewFind::Model::clear() { QDjVuWidget *djvuWidget = djview->getDjVuWidget(); QMap::const_iterator pos; for (pos=hits.begin(); pos!=hits.end(); ++pos) if (pos.value().size() > 0) djvuWidget->clearHighlights(pos.key()); pending = false; hits.clear(); modelClear(); } void QDjViewFind::Model::doHighlights(int pageno) { if (hits.contains(pageno)) { QColor color = Qt::blue; QDjVuWidget *djvu = djview->getDjVuWidget(); Hit pageHit; color.setAlpha(96); foreach(pageHit, hits[pageno]) { QRect rect; miniexp_t exp; foreach(exp, pageHit) { if (miniexp_get_rect(exp, rect)) djvu->addHighlight(pageno, rect.x(), rect.y(), rect.width(), rect.height(), color, true ); } } } } void QDjViewFind::Model::doPending() { QDjVuWidget *djvu = djview->getDjVuWidget(); while (pending && hits.contains(curPage) && pages.size()>0) { Hits pageHits = hits[curPage]; int nhits = pageHits.size(); if (searchBackwards) { if (curHit < 0 || curHit >= nhits) curHit = nhits; curHit--; } else { if (curHit < 0 || curHit >= nhits) curHit = -1; curHit++; } if (curHit >= 0 && curHit < nhits) { // jump to position pending = false; Hit hit = pageHits[curHit]; QRect rect; if (hit.size() > 0 && miniexp_get_rect(hit[0], rect)) { QDjVuWidget::Position pos; pos.pageNo = curPage; pos.posPage = rect.center(); pos.inPage = true; djvu->setPosition(pos, djvu->viewport()->rect().center()); } } else { // next page curHit = -1; if (searchBackwards) { curPage -= 1; if (curPage < 0) curPage = djview->pageNum() - 1; } else { curPage += 1; if (curPage >= djview->pageNum()) curPage = 0; } } } if (! pending) djview->statusMessage(QString()); } void QDjViewFind::Model::workTimeout() { // do some work int startingPoint = curWork; bool somePagesWithText = false; doPending(); while (working) { if (hits.contains(curWork)) { somePagesWithText = true; } else { QString name = djview->pageName(curWork); QDjVuDocument *doc = djview->getDocument(); miniexp_t exp = doc->getPageText(curWork, false); if (exp == miniexp_dummy) { // data not present if (pending) djview->statusMessage(tr("Searching page %1 (waiting for data.)") .arg(name) ); if (pending || widget->isVisible()) doc->getPageText(curWork, true); // timer will be reactivated by pageinfo() return; } Hits pageHits; hits[curWork] = pageHits; if (exp != miniexp_nil) { somePagesWithText = true; if (pending) djview->statusMessage(tr("Searching page %1.").arg(name)); pageHits = miniexp_search_text(exp, find); hits[curWork] = pageHits; if (pageHits.size() > 0) { modelAdd(curWork, pageHits.size()); doHighlights(curWork); doPending(); makeSelectionVisible(); } // enough break; } } // next page int pageNum = djview->pageNum(); if (searchBackwards) { if (curWork <= 0) curWork = pageNum; curWork -= 1; } else { curWork += 1; if (curWork >= pageNum) curWork = 0; } // finished? if (curWork == startingPoint) { stopFind(); djview->statusMessage(QString()); if (! pages.size()) { QString msg = tr("No hits!"); if (! somePagesWithText) { widget->eraseText(); widget->combo->setEnabled(false); msg = tr("Document is not searchable. " "No page contains information " "about its textual content."); } else if (! find.isValid()) { msg = tr("Invalid regular expression."); } widget->stack->setCurrentWidget(widget->label); widget->label->setText(msg); } } } // restart timer if (working) workTimer->start(0); } void QDjViewFind::Model::animTimeout() { if (animButton && !animIcon.isNull()) { if (animButton->icon().serialNumber() == findIcon.serialNumber()) animButton->setIcon(animIcon); else animButton->setIcon(findIcon); } } void QDjViewFind::Model::nextHit(bool backwards) { djview->getDjVuWidget()->terminateAnimation(); if (working && backwards != searchBackwards) { pending = false; startFind(backwards); } searchBackwards = backwards; if (! find.isEmpty()) { pending = true; doPending(); if (working && pending && !workTimer->isActive()) workTimer->start(0); } } void QDjViewFind::Model::startFind(bool backwards, int delay) { stopFind(); searchBackwards = backwards; if (! find.isEmpty() && djview->pageNum() > 0) { widget->label->setText(QString()); widget->stack->setCurrentWidget(widget->view); animButton = (backwards) ? widget->upButton : widget->downButton; animIcon = animButton->icon(); animTimer->start(250); workTimer->start(delay); curWork = djview->getDjVuWidget()->page(); working = true; } } void QDjViewFind::Model::stopFind() { animTimer->stop(); workTimer->stop(); if (animButton) { animButton->setIcon(animIcon); animButton = 0; } working = false; } void QDjViewFind::Model::pageinfo() { if (working && !workTimer->isActive()) workTimer->start(0); } void QDjViewFind::Model::makeSelectionVisible() { QModelIndexList s = selection->selectedIndexes(); if (s.size() > 0) widget->view->scrollTo(s[0]); } void QDjViewFind::Model::pageChanged(int pageno) { QDjVuWidget *djvu = djview->getDjVuWidget(); if (djvu && djvu->animationInProgress()) return; if (pageno != curPage) { curHit = -1; curPage = pageno; pending = false; } curWork = pageno; } void QDjViewFind::Model::textChanged() { stopFind(); clear(); QString s = widget->text(); widget->label->setText(QString()); widget->stack->setCurrentWidget(widget->label); if (s.isEmpty()) { find = QRegExp(); } else { if (!regExpMode) { s = QRegExp::escape(widget->text()); s.replace(QRegExp("\\s+"), " "); } if (wordOnly) s = "\\b" + s; find = QRegExp(s); if (caseSensitive) find.setCaseSensitivity(Qt::CaseSensitive); else find.setCaseSensitivity(Qt::CaseInsensitive); startFind(searchBackwards, 250); } } void QDjViewFind::Model::itemActivated(const QModelIndex &mi) { if (mi.isValid()) { int row = mi.row(); if (row >= 0 && row < pages.size() && pages[row].hits > 0) { curPage = pages[row].pageno; curHit = -1; pending = true; doPending(); } } } // ---------------------------------------- // QDJVIEWFIND QDjViewFind::QDjViewFind(QDjView *djview) : QWidget(djview), djview(djview), model(0), view(0) { model = new Model(this); installEventFilter(model); view = new QListView(this); view->setModel(model); view->setSelectionModel(model->selection); view->setDragEnabled(false); view->setEditTriggers(QAbstractItemView::NoEditTriggers); view->setSelectionBehavior(QAbstractItemView::SelectRows); view->setSelectionMode(QAbstractItemView::SingleSelection); view->setTextElideMode(Qt::ElideMiddle); view->setViewMode(QListView::ListMode); view->setWrapping(false); view->setResizeMode(QListView::Adjust); caseSensitiveAction = new QAction(tr("Case sensitive"), this); caseSensitiveAction->setCheckable(true); caseSensitiveAction->setChecked(model->caseSensitive); wordOnlyAction = new QAction(tr("Words only"), this); wordOnlyAction->setCheckable(true); wordOnlyAction->setChecked(model->wordOnly); regExpModeAction = new QAction(tr("Regular expression"), this); regExpModeAction->setCheckable(true); regExpModeAction->setChecked(model->regExpMode); menu = new QMenu(this); menu->addAction(caseSensitiveAction); menu->addAction(wordOnlyAction); menu->addAction(regExpModeAction); QBoxLayout *vlayout = new QVBoxLayout(this); combo = new QComboBox(this); combo->setEditable(true); combo->setMaxCount(8); combo->setInsertPolicy(QComboBox::InsertAtTop); combo->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); vlayout->addWidget(combo); QBoxLayout *hlayout = new QHBoxLayout; hlayout->setSpacing(0); vlayout->addLayout(hlayout); upButton = new QToolButton(this); upButton->setIcon(QIcon(":/images/icon_up.png")); upButton->setToolTip(tr("Find Previous (Shift+F3) ")); upButton->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum); hlayout->addWidget(upButton); downButton = new QToolButton(this); downButton->setIcon(QIcon(":/images/icon_down.png")); downButton->setToolTip(tr("Find Next (F3) ")); downButton->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum); hlayout->addWidget(downButton); hlayout->addStretch(2); resetButton = new QToolButton(this); resetButton->setIcon(QIcon(":/images/icon_erase.png")); resetButton->setToolTip(tr("Reset search options to default values.")); resetButton->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum); hlayout->addWidget(resetButton); QToolButton *optionButton = new QToolButton(this); optionButton->setText(tr("Options")); optionButton->setPopupMode(QToolButton::InstantPopup); optionButton->setToolButtonStyle(Qt::ToolButtonTextOnly); optionButton->setMenu(menu); optionButton->setAttribute(Qt::WA_CustomWhatsThis); optionButton->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum); hlayout->addWidget(optionButton); stack = new QStackedLayout(); view->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); view->setFrameShadow(QFrame::Sunken); view->setFrameShape(QFrame::StyledPanel); stack->addWidget(view); label = new QLabel(this); label->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); label->setAlignment(Qt::AlignCenter); label->setWordWrap(true); label->setFrameShadow(QFrame::Sunken); label->setFrameShape(QFrame::StyledPanel); stack->addWidget(label); vlayout->addLayout(stack); connect(djview, SIGNAL(documentClosed(QDjVuDocument*)), model, SLOT(documentClosed(QDjVuDocument*)) ); connect(djview, SIGNAL(documentReady(QDjVuDocument*)), model, SLOT(documentReady(QDjVuDocument*)) ); connect(view, SIGNAL(activated(const QModelIndex&)), model, SLOT(itemActivated(const QModelIndex&))); connect(djview->getDjVuWidget(), SIGNAL(pageChanged(int)), this, SLOT(pageChanged(int))); connect(combo->lineEdit(), SIGNAL(textChanged(QString)), model, SLOT(textChanged())); connect(combo->lineEdit(), SIGNAL(returnPressed()), this, SLOT(findAgain())); connect(caseSensitiveAction, SIGNAL(triggered(bool)), this, SLOT(setCaseSensitive(bool))); connect(wordOnlyAction, SIGNAL(triggered(bool)), this, SLOT(setWordOnly(bool))); connect(regExpModeAction, SIGNAL(triggered(bool)), this, SLOT(setRegExpMode(bool))); connect(upButton, SIGNAL(clicked()), this, SLOT(findPrev())); connect(downButton, SIGNAL(clicked()), this, SLOT(findNext())); connect(resetButton, SIGNAL(clicked()), this, SLOT(eraseText())); setWhatsThis (tr("Finding text.
    " "Search hits appear progressively as soon as you type " "a search string. Typing enter jumps to the next hit. " "To move to the previous or next hit, you can also use " "the arrow buttons or the shortcuts F3 or " "Shift-F3. You can also double click a page name. " "Use the Options menu to search words only or " "to specify the case sensitivity." "")); wordOnlyAction->setStatusTip (tr("Specify whether search hits must begin on a word boundary.")); caseSensitiveAction->setStatusTip (tr("Specify whether searches are case sensitive.")); regExpModeAction->setStatusTip (tr("Regular expressions describe complex string matching patterns.")); regExpModeAction->setWhatsThis (tr("Regular Expression Quick Guide
      " "
    • The dot . matches any character.
    • " "
    • Most characters match themselves.
    • " "
    • Prepend a backslash \\ to match special" " characters ()[]{}|*+.?!^$\\.
    • " "
    • \\b matches a word boundary.
    • " "
    • \\w matches a word character.
    • " "
    • \\d matches a digit character.
    • " "
    • \\s matches a blank character.
    • " "
    • \\n matches a newline character.
    • " "
    • [a-b] matches characters in range" " a-b.
    • " "
    • [^a-b] matches characters outside range" " a-b.
    • " "
    • a|b matches either regular expression" " a or regular expression b.
    • " "
    • a{n,m} matches regular expression" " a repeated n to m" " times.
    • " "
    • a?, a*, and a+" " are shorthands for a{0,1}, a{0,}, " " and a{1,}.
    • " "
    • Use parentheses () to group regular expressions " " before ?+*{.
    • " "
    ")); eraseText(); combo->setEnabled(false); label->setText(QString()); stack->setCurrentWidget(label); if (djview->getDocument()) model->documentReady(djview->getDocument()); } void QDjViewFind::contextMenuEvent(QContextMenuEvent *event) { menu->exec(event->globalPos()); event->accept(); } void QDjViewFind::takeFocus(Qt::FocusReason reason) { if (combo->isVisible()) combo->setFocus(reason); } QString QDjViewFind::text() { return combo->lineEdit()->text(); } bool QDjViewFind::caseSensitive() { return model->caseSensitive; } bool QDjViewFind::wordOnly() { return model->wordOnly; } bool QDjViewFind::regExpMode() { return model->regExpMode; } void QDjViewFind::setText(QString s) { if (s != text()) combo->lineEdit()->setText(s); } void QDjViewFind::selectAll() { combo->lineEdit()->selectAll(); combo->lineEdit()->setFocus(); } void QDjViewFind::eraseText() { setText(QString::null); setRegExpMode(false); setWordOnly(true); setCaseSensitive(false); } void QDjViewFind::setCaseSensitive(bool b) { if (b != model->caseSensitive) { caseSensitiveAction->setChecked(b); model->caseSensitive = b; model->textChanged(); } } void QDjViewFind::setWordOnly(bool b) { if (b != model->wordOnly) { wordOnlyAction->setChecked(b); model->wordOnly = b; model->textChanged(); } } void QDjViewFind::setRegExpMode(bool b) { if (b != model->regExpMode) { regExpModeAction->setChecked(b); model->regExpMode = b; model->textChanged(); } } void QDjViewFind::findNext() { if (text().isEmpty()) djview->showFind(); model->nextHit(false); } void QDjViewFind::findPrev() { if (text().isEmpty()) djview->showFind(); model->nextHit(true); } void QDjViewFind::findAgain() { if (model->searchBackwards) findPrev(); else findNext(); } void QDjViewFind::pageChanged(int pageno) { if (pageno >= 0 && pageno < djview->pageNum()) { model->pageChanged(pageno); if (model->modelSelect(pageno)) model->makeSelectionVisible(); } } // ---------------------------------------- // MOC #include "qdjviewsidebar.moc" /* ------------------------------------------------------------- Local Variables: c++-font-lock-extra-types: ( "\\sw+_t" "[A-Z]\\sw*[a-z]\\sw*" ) End: ------------------------------------------------------------- */ djview4/src/qdjviewsidebar.h000066400000000000000000000100201174072760700164010ustar00rootroot00000000000000//C- -*- C++ -*- //C- ------------------------------------------------------------------- //C- DjView4 //C- Copyright (c) 2006- Leon Bottou //C- //C- This software is subject to, and may be distributed under, the //C- GNU General Public License, either version 2 of the license, //C- or (at your option) any later version. The license should have //C- accompanied the software or you may obtain a copy of the license //C- from the Free Software Foundation at http://www.fsf.org . //C- //C- This program is distributed in the hope that it will be useful, //C- but WITHOUT ANY WARRANTY; without even the implied warranty of //C- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //C- GNU General Public License for more details. //C- ------------------------------------------------------------------ #ifndef QDJVIEWSIDEBAR_H #define QDJVIEWSIDEBAR_H #if AUTOCONF # include "config.h" #endif #include #include #include #include #include #include #include #include #include "qdjvu.h" #include "qdjvuwidget.h" #include "qdjview.h" class QAction; class QComboBox; class QContextMenuEvent; class QItemSelectionModel; class QLabel; class QLineEdit; class QListView; class QMenu; class QPushButton; class QStackedLayout; class QToolButton; class QTreeWidget; class QTreeWidgetItem; // ---------------------------------------- // OUTLINE class QDjViewOutline : public QWidget { Q_OBJECT public: QDjViewOutline(QDjView *djview); public slots: void clear(); void refresh(); protected slots: void pageChanged(int pageno); void itemActivated(QTreeWidgetItem *item); private: QDjView *djview; QTreeWidget *tree; bool loaded; int pageNumber(const char *link); void fillItems(QTreeWidgetItem *item, miniexp_t expr); void searchItem(QTreeWidgetItem *item, int pageno, QTreeWidgetItem *&fi, int &fp); }; // ---------------------------------------- // THUMBNAILS class QDjViewThumbnails : public QWidget { Q_OBJECT Q_PROPERTY(int size READ size WRITE setSize) Q_PROPERTY(bool smart READ smart WRITE setSmart) public: QDjViewThumbnails(QDjView *djview); int size(); bool smart(); public slots: void setSize(int); void setSmart(bool); protected slots: void setSize(); void pageChanged(int pageno); void activated(const QModelIndex &index); protected: void contextMenuEvent(QContextMenuEvent *event); void updateActions(); private: class Model; class View; QDjView *djview; Model *model; View *view; QItemSelectionModel *selection; QMenu *menu; }; // ---------------------------------------- // THUMBNAILS class QDjViewFind : public QWidget { Q_OBJECT Q_PROPERTY(QString text READ text WRITE setText) Q_PROPERTY(bool caseSensitive READ caseSensitive WRITE setCaseSensitive) Q_PROPERTY(bool wordOnly READ wordOnly WRITE setWordOnly) public: QDjViewFind(QDjView *djview); void takeFocus(Qt::FocusReason); QString text(); bool caseSensitive(); bool wordOnly(); bool regExpMode(); public slots: void selectAll(); void eraseText(); void setText(QString s); void setCaseSensitive(bool); void setWordOnly(bool); void setRegExpMode(bool); void findNext(); void findPrev(); void findAgain(); protected slots: void pageChanged(int); protected: void contextMenuEvent(QContextMenuEvent *event); private: class Model; QDjView *djview; Model *model; QListView *view; QMenu *menu; QComboBox *combo; QToolButton *upButton; QToolButton *downButton; QToolButton *resetButton; QStackedLayout *stack; QLabel *label; QAction *caseSensitiveAction; QAction *wordOnlyAction; QAction *regExpModeAction; }; #endif /* ------------------------------------------------------------- Local Variables: c++-font-lock-extra-types: ( "\\sw+_t" "[A-Z]\\sw*[a-z]\\sw*" ) End: ------------------------------------------------------------- */ djview4/src/qdjvu.cpp000066400000000000000000000631351174072760700151010ustar00rootroot00000000000000//C- -*- C++ -*- //C- ------------------------------------------------------------------- //C- DjView4 //C- Copyright (c) 2006- Leon Bottou //C- //C- This software is subject to, and may be distributed under, the //C- GNU General Public License, either version 2 of the license, //C- or (at your option) any later version. The license should have //C- accompanied the software or you may obtain a copy of the license //C- from the Free Software Foundation at http://www.fsf.org . //C- //C- This program is distributed in the hope that it will be useful, //C- but WITHOUT ANY WARRANTY; without even the implied warranty of //C- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //C- GNU General Public License for more details. //C- ------------------------------------------------------------------ #if AUTOCONF # include "config.h" #endif #include #include #include #include #include #include "qdjvu.h" #include #include #include #include #include #include #include #include #include #include #include #include #include #include #if DDJVUAPI_VERSION < 17 # error "DDJVUAPI_VERSION>=17 is required !" #endif // ---------------------------------------- // QDJVUCONTEXT /*! \class QDjVuContext \brief Represents a \a ddjvu_context_t object. This QObject subclass holds a \a ddjvu_context_t object and transparently hooks the DDJVUAPI message queue into the Qt messaging system. DDJVUAPI messages are then forwarded to the virtual function \a QDjVuContext::handle which transforms then into signals emitted by the proper object from the message loop thread. */ /*! Construct a \a QDJVuContext object. Argument \a programname is the name of the program. This name is used to report error messages and locate localized messages. Argument \a parent defines its parent in the \a QObject hierarchy. */ QDjVuContext::QDjVuContext(const char *programname, QObject *parent) : QObject(parent), context(0), flag(false) { context = ddjvu_context_create(programname); ddjvu_message_set_callback(context, callback, (void*)this); ddjvu_cache_set_size(context, 30*1024*1024); } QDjVuContext::~QDjVuContext() { ddjvu_context_release(context); context = 0; } /*! \property QDjVuContext::cacheSize \brief The size of the decoded page cache in bytes. The default cache size is 30 megabytes. */ long QDjVuContext::cacheSize() const { return ddjvu_cache_get_size(context); } void QDjVuContext::setCacheSize(long size) { ddjvu_cache_set_size(context, size); } void QDjVuContext::callback(ddjvu_context_t *, void *closure) { QDjVuContext *qcontext = (QDjVuContext*)closure; if (! qcontext->flag) { qcontext->flag = true; QEvent *qevent = new QEvent(QEvent::User); QCoreApplication::postEvent(qcontext, qevent); } } bool QDjVuContext::event(QEvent *event) { if (event->type() == QEvent::User) { flag = false; ddjvu_message_t *message; while ((message = ddjvu_message_peek(context))) { handle(message); ddjvu_message_pop(context); } return true; } return QObject::event(event); } /*! Processes DDJVUAPI messages. The Qt message loop automatically passes all DDJVUAPI messages to this virtual function . This function then forwards them to the \a handle function of the suitable \a QDjVuDocument, \a QDjVuPage or \a QDjVuJob object. Most messages eventually result into the emission of a suitable signal. */ bool QDjVuContext::handle(ddjvu_message_t *msg) { if (msg->m_any.page) { QObject *p = (QObject*)ddjvu_page_get_user_data(msg->m_any.page); QDjVuPage *q = (p) ? qobject_cast(p) : 0; if (q && q->handle(msg)) return true; } if (msg->m_any.job) { ddjvu_job_t *djob = 0; ddjvu_job_t *pjob = 0; if (msg->m_any.document) djob = ddjvu_document_job(msg->m_any.document); if (msg->m_any.page) pjob = ddjvu_page_job(msg->m_any.page); if (msg->m_any.job != djob && msg->m_any.job != pjob) { QObject *p = (QObject*)ddjvu_job_get_user_data(msg->m_any.job); QDjVuJob *q = (p) ? qobject_cast(p) : 0; if (q && q->handle(msg)) return true; } } if (msg->m_any.document) { QObject *p = (QObject*)ddjvu_document_get_user_data(msg->m_any.document); QDjVuDocument *q = (p) ? qobject_cast(p) : 0; if (q && q->handle(msg)) return true; } switch(msg->m_any.tag) { case DDJVU_ERROR: emit error(QString::fromLocal8Bit(msg->m_error.message), QString::fromLocal8Bit(msg->m_error.filename), msg->m_error.lineno); return true; case DDJVU_INFO: emit info(QString::fromLocal8Bit(msg->m_info.message)); return true; default: break; } return false; } /*! \fn QDjVuContext::isValid() Indicate if this object is associated with a \a ddjvu_context_t object. Use this function to determine if the construction was successful. */ /*! \fn QDjVuContext::operator ddjvu_context_t*() Return a pointer to the corresponding \a ddjvu_context_t object. */ /*! \fn QDjVuContext::error(QString msg, QString filename, int lineno) This signal is emitted when processing a DDJVUAPI error message that is not attached to any document, page, or job. This only hapens when a DDJVUAPI function is used incorrectly or when calling \a QDjVuDocument::setFileName or \a QDjVuDocument::setUrl. */ /*! \fn QDjVuContext::info(QString msg) This signal is emitted when processing a DDJVUAPI info message that is not attached to any document, page, or job. This is quite rare and not very useful. */ // ---------------------------------------- // QDJVUDOCUMENTPRIVATE class QDjVuDocumentPrivate : public QObject { Q_OBJECT public: QMutex mutex; bool autoDelete; int refCount; QSet running; bool docReady; QDjVuDocument *docPointer; minivar_t documentOutline; minivar_t documentAnnotations; QVector pageAnnotations; QVector pageText; QDjVuDocumentPrivate(); void add(QObject *p); void add(QDjVuPage *p); public slots: void docinfo(); protected slots: void remove(QObject *p); void pageinfo(); void emitidle(); signals: void idle(); }; QDjVuDocumentPrivate::QDjVuDocumentPrivate() : mutex(QMutex::Recursive), autoDelete(false), refCount(0), docReady(false), docPointer(0) { } void QDjVuDocumentPrivate::add(QObject *p) { connect(p, SIGNAL(destroyed(QObject*)), this, SLOT(remove(QObject*))); mutex.lock(); running.insert(p); mutex.unlock(); } void QDjVuDocumentPrivate::emitidle() { emit idle(); } void QDjVuDocumentPrivate::remove(QObject *p) { mutex.lock(); running.remove(p); int size = running.size(); disconnect(p, 0, this, 0); mutex.unlock(); if (! size) QTimer::singleShot(0, this, SLOT(emitidle())); } void QDjVuDocumentPrivate::add(QDjVuPage *p) { if (ddjvu_page_decoding_done(*p)) return; connect(p, SIGNAL(pageinfo()), this, SLOT(pageinfo())); add((QObject*)(p)); } void QDjVuDocumentPrivate::pageinfo() { QDjVuPage *p = qobject_cast(sender()); if (p && ddjvu_page_decoding_done(*p)) remove(p); } void QDjVuDocumentPrivate::docinfo() { if (!docReady && ddjvu_document_decoding_done(*docPointer)) { QMutexLocker locker(&mutex); int pageNum = ddjvu_document_get_pagenum(*docPointer); documentOutline = miniexp_dummy; documentAnnotations = miniexp_dummy; pageAnnotations.resize(pageNum); pageText.resize(pageNum); for (int i=0; iautoDelete = autoDelete; priv->docPointer = this; connect(priv, SIGNAL(idle()), this, SIGNAL(idle())); connect(this, SIGNAL(docinfo()), priv, SLOT(docinfo())); } /*! \overload */ QDjVuDocument::QDjVuDocument(QObject *parent) : QObject(parent), document(0), priv(new QDjVuDocumentPrivate) { priv->autoDelete = false; priv->docPointer = this; connect(priv, SIGNAL(idle()), this, SIGNAL(idle())); connect(this, SIGNAL(docinfo()), priv, SLOT(docinfo())); } /*! Increments the reference count. */ void QDjVuDocument::ref() { priv->mutex.lock(); priv->refCount++; priv->mutex.unlock(); } /*! Decrements the reference count. If the object was created with flag \a autoDelete, function \a deleteLater() is called when the reference count reaches 0. */ void QDjVuDocument::deref() { priv->mutex.lock(); bool finished = !(--priv->refCount) && priv->autoDelete; priv->mutex.unlock(); if (finished) delete this; } /*! Associates the \a QDjVuDocument object with the \a QDjVuContext object \ctx in order to decode the DjVu file \a f. */ bool QDjVuDocument::setFileName(QDjVuContext *ctx, QString f, bool cache) { QMutexLocker locker(&priv->mutex); if (isValid()) { ddjvu_document_set_user_data(document, 0); ddjvu_document_release(document); priv->running.clear(); document = 0; } QFileInfo info(f); if (! info.isReadable()) { qWarning("QDjVuDocument::setFileName: cannot read file"); return false; } #if DDJVUAPI_VERSION >= 19 QByteArray b = f.toUtf8(); document = ddjvu_document_create_by_filename_utf8(*ctx, b, cache); #else QByteArray b = QFile::encodeName(f); document = ddjvu_document_create_by_filename(*ctx, b, cache); #endif if (! document) { qWarning("QDjVuDocument::setFileName: cannot create decoder"); return false; } ddjvu_document_set_user_data(document, (void*)this); priv->docinfo(); return true; } /*! Associates the \a QDjVuDocument object with with the \a QDjVuContext object \ctx in order to decode the DjVu data located at URL \a url. This is only useful inside a subclass of this class because you must redefine virtual function \a newstream in order to provide access to the data. */ bool QDjVuDocument::setUrl(QDjVuContext *ctx, QUrl url, bool cache) { QMutexLocker locker(&priv->mutex); if (isValid()) { ddjvu_document_set_user_data(document, 0); ddjvu_document_release(document); priv->running.clear(); document = 0; } QByteArray b = url.toEncoded(); if (! b.size()) { qWarning("QDjVuDocument::setUrl: invalid url"); return false; } document = ddjvu_document_create(*ctx, b, cache); if (! document) { qWarning("QDjVuDocument::setUrl: cannot create"); return false; } ddjvu_document_set_user_data(document, (void*)this); priv->docinfo(); return true; } static bool string_is_on(QString val) { QString v = val.toLower(); return v == "yes" || v == "on" || v == "true" || v == "1"; } static bool string_is_off(QString val) { QString v = val.toLower(); return v == "no" || v == "off" || v == "false" || v == "0"; } /*! Overloaded version of \a setUrl. Cache setup is determined heuristically from the url and the url arguments. */ bool QDjVuDocument::setUrl(QDjVuContext *ctx, QUrl url) { bool cache = true; if (url.path().section('/', -1).indexOf('.') < 0) cache = false; bool djvuopts = false; QPair pair; foreach(pair, url.queryItems()) { if (pair.first.toLower() == "djvuopts") djvuopts = true; else if (!djvuopts || pair.first.toLower() != "cache") continue; else if (string_is_on(pair.second)) cache = true; else if (string_is_off(pair.second)) cache = false; } return setUrl(ctx, url, cache); } /*! This virtual function is called when receiving a DDJVUAPI \a m_newstream message. This happens when the decoder has been setup with functon \a setUrl. You must then override this virtual function in order to setup the data transfer. Data is passed to the decoder using the \a streamWrite and \a streamClose member functions with the specified \a streamid. See also the DDJVUAPI documentation for the \a m_newstream message. */ void QDjVuDocument::newstream(int, QString, QUrl) { qWarning("QDjVuDocument::newstream called but not implemented"); } /*! Write data into the decoder stream \a streamid. */ void QDjVuDocument::streamWrite(int streamid, const char *data, unsigned long len ) { QMutexLocker locker(&priv->mutex); if (! isValid()) qWarning("QDjVuDocument::streamWrite: invalid document"); else ddjvu_stream_write(document, streamid, data, len); } /*! Close the decoder stream \a streamid. Setting argument \a stop to \a true indicates that the stream was closed because the data transfer was interrupted by the user. */ void QDjVuDocument::streamClose(int streamid, bool stop) { QMutexLocker locker(&priv->mutex); if (! isValid()) qWarning("QDjVuDocument::streamClose: invalid document"); else ddjvu_stream_close(document, streamid, stop); } /*! Processes DDJVUAPI messages for this document. The default implementation emits signals for the \a m_error, \a m_info, \a m_docinfo, \a m_pageingo and \a m_thumbnail messsages. It also calls the virtual function \a newstream when processing a \m newstream message. The return value is a boolean indicating if the message has been processed or rejected. */ bool QDjVuDocument::handle(ddjvu_message_t *msg) { switch(msg->m_any.tag) { case DDJVU_DOCINFO: ddjvu_document_check_pagedata(document, 0); emit docinfo(); return true; case DDJVU_PAGEINFO: emit pageinfo(); return true; case DDJVU_THUMBNAIL: emit thumbnail(msg->m_thumbnail.pagenum); return true; case DDJVU_NEWSTREAM: { QUrl url; QString name; if (msg->m_newstream.url) url = QUrl::fromEncoded(msg->m_newstream.url); if (msg->m_newstream.name) name = QString::fromLatin1(msg->m_newstream.name); newstream(msg->m_newstream.streamid, name, url); } return true; case DDJVU_ERROR: emit error(QString::fromLocal8Bit(msg->m_error.message), QString::fromLocal8Bit(msg->m_error.filename), msg->m_error.lineno); return true; case DDJVU_INFO: emit info(QString::fromLocal8Bit(msg->m_info.message)); return true; default: break; } return false; } /*! Return number of decoding threads running for this document. */ int QDjVuDocument::runningProcesses(void) { return priv->running.size(); } /*! Obtains the cached document annotations. This function returns \a miniexp_dummy if this information is not yet available. Check again some time after receiving signal \a docinfo(). */ miniexp_t QDjVuDocument::getDocumentAnnotations() { QMutexLocker locker(&priv->mutex); if (! priv->docReady) return miniexp_dummy; if (priv->documentAnnotations != miniexp_dummy) return priv->documentAnnotations; #if DDJVUAPI_VERSION <= 17 priv->documentAnnotations = miniexp_nil; #else priv->documentAnnotations = ddjvu_document_get_anno(document,1); ddjvu_miniexp_release(document, priv->documentAnnotations); #endif return priv->documentAnnotations; } /*! Obtains the cached document outline. This function returns \a miniexp_dummy if this information is not yet available. Check again some time after receiving signal \a docinfo(). */ miniexp_t QDjVuDocument::getDocumentOutline() { QMutexLocker locker(&priv->mutex); if (! priv->docReady) return miniexp_dummy; if (priv->documentOutline != miniexp_dummy) return priv->documentOutline; priv->documentOutline = ddjvu_document_get_outline(document); ddjvu_miniexp_release(document, priv->documentOutline); return priv->documentOutline; } /*! Obtains the cached annotations for page \a pageno. If this information is not yet available, this function returns \a miniexp_dummy and, if \a start is true, starts loading the page data. Check again after receiving signal \a pageinfo(). */ miniexp_t QDjVuDocument::getPageAnnotations(int pageno, bool start) { QMutexLocker locker(&priv->mutex); if (! priv->docReady) return miniexp_dummy; if (pageno<0 || pageno>=priv->pageAnnotations.size()) return miniexp_dummy; minivar_t expr = priv->pageAnnotations[pageno]; if (expr != miniexp_dummy) return expr; if (! (start || ddjvu_document_check_pagedata(*this, pageno))) return expr; expr = ddjvu_document_get_pageanno(document, pageno); ddjvu_miniexp_release(document, expr); if (expr != miniexp_dummy) priv->pageAnnotations[pageno] = expr; return expr; } /*! Obtains the cached hidden text for page \a pageno. If this information is not yet available, this function returns \a miniexp_dummy and, if \a start is true, starts loading the page data. Check again after receiving signal \a pageinfo(). */ miniexp_t QDjVuDocument::getPageText(int pageno, bool start) { QMutexLocker locker(&priv->mutex); if (! priv->docReady) return miniexp_dummy; if (pageno<0 || pageno>=priv->pageText.size()) return miniexp_dummy; minivar_t expr = priv->pageText[pageno]; if (expr != miniexp_dummy) return expr; if (! (start || ddjvu_document_check_pagedata(*this, pageno))) return expr; expr = ddjvu_document_get_pagetext(document, pageno, 0); ddjvu_miniexp_release(document, expr); if (expr != miniexp_dummy) priv->pageText[pageno] = expr; return expr; } /*! \fn QDjVuDocument::isValid() Indicate if this object is associated with a valid \a ddjvu_document_t object. Use this function to determine whether \a setFileName or \a setUrl was successful. */ /*! \fn QDjVuDocument::operator ddjvu_document_t*() Return a pointer to the corresponding \a ddjvu_document_t object. */ /*! \fn QDjVuDocument::error(QString msg, QString filename, int lineno) This signal is emitted when processing a DDJVUAPI \a m_error message that is related to this document. */ /*! \fn QDjVuDocument::info(QString msg) This signal is emitted when processing a DDJVUAPI \a m_info message that is related to this document. */ /*! \fn QDjVuDocument::docinfo() This signal is emitted when the document initialization is complete. Use \a ddjvu_document_decoding_status to determine whether the operation was successful. */ /*! \fn QDjVuDocument::pageinfo() This signal is emitted when the data for a new page has been received in full. This is useful when used in relation with the DDJVUAPI function \a ddjvu_document_get_pageinfo. */ /*! \fn QDjVuDocument::thumbnail(int pagenum) This signal is emitted when the thumbnail for page \a pagenum is ready. This is useful when used in relation with the DDJVUAPI functions \a ddjvu_thumnail_status and \a ddjvu_thumbnail_render. */ /*! \fn QDjVuDocument::idle() This signal is emitted when all decoding threads for this document are terminated. */ // ---------------------------------------- // QDJVUPAGE /*! \class QDjVuPage \brief Represent a \a ddjvu_page_t object. */ /*! Construct a \a QDjVuPage object for page \a pageno of document \a doc. Argument \a parent indicates its parent in the \a QObject hierarchy. */ QDjVuPage::QDjVuPage(QDjVuDocument *doc, int pageno, QObject *parent) : QObject(parent), page(0), pageno(pageno) { page = ddjvu_page_create_by_pageno(*doc, pageno); if (! page) { qWarning("QDjVuPage: invalid page number"); return; } ddjvu_page_set_user_data(page, (void*)this); doc->priv->add(this); } QDjVuPage::~QDjVuPage() { pageno = -1; if (page) { ddjvu_page_set_user_data(page, 0); ddjvu_page_release(page); page = 0; } } /*! Processes DDJVUAPI messages for this page. The default implementation emits signals for the \a m_error, \a m_info, \a m_pageinfo, \a m_chunk and \a m_relayout and \a m_redisplay messsages. The return value is a boolean indicating if the message has been processed or rejected. */ bool QDjVuPage::handle(ddjvu_message_t *msg) { switch(msg->m_any.tag) { case DDJVU_PAGEINFO: emit pageinfo(); return true; case DDJVU_CHUNK: emit chunk(QString::fromAscii(msg->m_chunk.chunkid)); return true; case DDJVU_RELAYOUT: emit relayout(); return true; case DDJVU_REDISPLAY: emit redisplay(); return true; case DDJVU_ERROR: emit error(QString::fromLocal8Bit(msg->m_error.message), QString::fromLocal8Bit(msg->m_error.filename), msg->m_error.lineno); return true; case DDJVU_INFO: emit info(QString::fromLocal8Bit(msg->m_info.message)); return true; default: break; } return false; } /*! Returns the page number associated with this page. */ int QDjVuPage::pageNo() { return pageno; } /*! \fn QDjVuPage::isValid() Indicate if this object is associated with a valid \a ddjvu_page_t object. Use this function to determine whether the construction was successful. */ /*! \fn QDjVuPage::operator ddjvu_page_t * () Return a pointer to the corresponding \a ddjvu_page_t object. */ /*! \fn QDjVuPage::error(QString msg, QString filename, int lineno) This signal is emitted when processing a DDJVUAPI \a m_error message that is related to this page. */ /*! \fn QDjVuPage::info(QString msg) This signal is emitted when processing a DDJVUAPI \a m_info message that is related to this page. */ /*! \fn QDjVuPage::pageinfo() This signal is emitted when processing a DDJVUAPI \a m_pageinfo message that is related to this page. This happens twice during the page decoding process. The first time when the basic page information is present, and the second time when the decoding process terminates. Use \a ddjvu_page_decoding_status function to determine what is going on. */ /*! \fn QDjVuPage::relayout() This signal is emitted when processing a DDJVUAPI \a m_relayout message that is related to this page. */ /*! \fn QDjVuPage::redisplay() This signal is emitted when processing a DDJVUAPI \a m_redisplay message that is related to this page. */ /*! \fn QDjVuPage::chunk(QString chunkid) This signal is emitted when processing a DDJVUAPI \a m_chunk message that is related to this page. */ // ---------------------------------------- // QDJVUJOB /*! \class QDjVuJob \brief Represents a \a ddjvu_job_t object. */ /*! Construct a \a QDjVuJob object. Argument \a job is the \a ddjvu_job_t object. Argument \a parent defines its parent in the \a QObject hierarchy. */ QDjVuJob::QDjVuJob(ddjvu_job_t *job, QObject *parent) : QObject(parent), job(job) { if (! job) qWarning("QDjVuJob: invalid job"); else ddjvu_job_set_user_data(job, (void*)this); } QDjVuJob::~QDjVuJob() { ddjvu_job_set_user_data(job, 0); ddjvu_job_release(job); job = 0; } /*! Processes DDJVUAPI messages for this job. The default implementation emits signals for the \a m_error, \a m_info, and \a m_progress messages. The return value is a boolean indicating if the message has been processed or rejected. */ bool QDjVuJob::handle(ddjvu_message_t *msg) { switch(msg->m_any.tag) { case DDJVU_ERROR: emit error(QString::fromLocal8Bit(msg->m_error.message), QString::fromLocal8Bit(msg->m_error.filename), msg->m_error.lineno); return true; case DDJVU_INFO: emit info(QString::fromLocal8Bit(msg->m_info.message)); return true; case DDJVU_PROGRESS: emit progress(msg->m_progress.percent); return true; default: break; } return false; } /*! \fn QDjVuJob::isValid() Indicate if this object is associated with a \a ddjvu_job_t object. */ /*! \fn QDjVuJob::operator ddjvu_job_t * () Return a pointer to the corresponding \a ddjvu_job_t object. */ /*! \fn QDjVuJob::error(QString msg, QString filename, int lineno) This signal is emitted when processing a DDJVUAPI \a m_error message that is related to this job. */ /*! \fn QDjVuJob::info(QString msg) This signal is emitted when processing a DDJVUAPI \a m_info message that is related to this job. */ /*! \fn QDjVuJob::progress(int percent) This signal is emitted when processing a DDJVUAPI \a m_progress message that is related to this job. Argument indicates the progress level from 1 to 100. */ // ---------------------------------------- // MOC #include "qdjvu.moc" /* ------------------------------------------------------------- Local Variables: c++-font-lock-extra-types: ( "\\sw+_t" "Q[A-Z]\\sw*[a-z]\\sw*" ) End: ------------------------------------------------------------- */ djview4/src/qdjvu.h000066400000000000000000000120741174072760700145420ustar00rootroot00000000000000//C- -*- C++ -*- //C- ------------------------------------------------------------------- //C- DjView4 //C- Copyright (c) 2006- Leon Bottou //C- //C- This software is subject to, and may be distributed under, the //C- GNU General Public License, either version 2 of the license, //C- or (at your option) any later version. The license should have //C- accompanied the software or you may obtain a copy of the license //C- from the Free Software Foundation at http://www.fsf.org . //C- //C- This program is distributed in the hope that it will be useful, //C- but WITHOUT ANY WARRANTY; without even the implied warranty of //C- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //C- GNU General Public License for more details. //C- ------------------------------------------------------------------ #ifndef QDJVU_H #define QDJVU_H #if AUTOCONF # include "config.h" #endif // The following definition allow for using // this file without the libdjvu include files. #ifndef DDJVUAPI_H typedef struct ddjvu_context_s ddjvu_context_t; typedef union ddjvu_message_s ddjvu_message_t; typedef struct ddjvu_job_s ddjvu_job_t; typedef struct ddjvu_document_s ddjvu_document_t; typedef struct ddjvu_page_s ddjvu_page_t; #endif #ifndef MINIEXP_H typedef struct miniexp_s* miniexp_t; #endif // Qt includes #include #include #include // The following classes integrate the ddjvuapi with // the Qt memory management and event management scheme. // All ddjvuapi events are converted into signals sent // when the Qt event loop is called. These signal are // emitted by all objects listed in the event message. // // All classes below define implicit conversion // into pointers to the corresponding ddjvuapi objects. class QDjVuContext; class QDjVuDocument; class QDjVuDocumentPrivate; class QDjVuPage; class QDjVuJob; class QDjVuContext : public QObject { Q_OBJECT Q_PROPERTY(long cacheSize READ cacheSize WRITE setCacheSize) private: static void callback(ddjvu_context_t *context, void *closure); ddjvu_context_t *context; bool flag; // might become private pointer in the future protected: virtual bool handle(ddjvu_message_t*); public: virtual ~QDjVuContext(); QDjVuContext(const char *programname=0, QObject *parent=0); long cacheSize() const; void setCacheSize(long); virtual bool event(QEvent*); operator ddjvu_context_t*() { return context; } signals: void error(QString msg, QString filename, int lineno); void info(QString msg); }; class QDjVuDocument : public QObject { Q_OBJECT private: friend class QDjVuContext; friend class QDjVuPage; friend class QDjVuJob; ddjvu_document_t *document; QDjVuDocumentPrivate *priv; protected: virtual bool handle(ddjvu_message_t*); public: virtual ~QDjVuDocument(); QDjVuDocument(QObject *parent); QDjVuDocument(bool autoDelete=false, QObject *parent=0); void ref(); void deref(); bool setFileName(QDjVuContext *ctx, QString filename, bool cache=true); protected: bool setUrl(QDjVuContext *ctx, QUrl url); bool setUrl(QDjVuContext *ctx, QUrl url, bool cache); virtual void newstream(int streamid, QString name, QUrl url); public: void streamWrite(int streamid, const char *data, unsigned long len ); void streamClose(int streamid, bool stop = false); operator ddjvu_document_t*() { return document; } virtual bool isValid() { return document != 0; } public: int runningProcesses(void); miniexp_t getDocumentAnnotations(); miniexp_t getDocumentOutline(); miniexp_t getPageAnnotations(int pageno, bool start=true); miniexp_t getPageText(int pageno, bool start=true); signals: void error(QString msg, QString filename, int lineno); void info(QString msg); void docinfo(void); void pageinfo(void); void thumbnail(int pagenum); void idle(void); }; class QDjVuPage : public QObject { Q_OBJECT private: friend class QDjVuContext; friend class QDjVuDocument; ddjvu_page_t *page; int pageno; // might become private pointer in the future protected: virtual bool handle(ddjvu_message_t*); public: virtual ~QDjVuPage(); QDjVuPage(QDjVuDocument *doc, int pageno, QObject *parent=0); operator ddjvu_page_t*() { return page; } bool isValid() { return page!=0; } int pageNo(); signals: void error(QString msg, QString filename, int lineno); void info(QString msg); void chunk(QString chunkid); void pageinfo(); void relayout(); void redisplay(); }; class QDjVuJob : public QObject { Q_OBJECT private: friend class QDjVuContext; friend class QDjVuDocument; ddjvu_job_t *job; protected: virtual bool handle(ddjvu_message_t*); public: virtual ~QDjVuJob(); QDjVuJob(ddjvu_job_t *job, QObject *parent=0); operator ddjvu_job_t*() { return job; } signals: void error(QString msg, QString filename, int lineno); void info(QString msg); void progress(int percent); }; #endif /* ------------------------------------------------------------- Local Variables: c++-font-lock-extra-types: ( "\\sw+_t" "Q[A-Z]\\sw*[a-z]\\sw*" ) End: ------------------------------------------------------------- */ djview4/src/qdjvunet.cpp000066400000000000000000000306111174072760700156010ustar00rootroot00000000000000//C- -*- C++ -*- //C- ------------------------------------------------------------------- //C- DjView4 //C- Copyright (c) 2006- Leon Bottou //C- //C- This software is subject to, and may be distributed under, the //C- GNU General Public License, either version 2 of the license, //C- or (at your option) any later version. The license should have //C- accompanied the software or you may obtain a copy of the license //C- from the Free Software Foundation at http://www.fsf.org . //C- //C- This program is distributed in the hope that it will be useful, //C- but WITHOUT ANY WARRANTY; without even the implied warranty of //C- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //C- GNU General Public License for more details. //C- ------------------------------------------------------------------ #if AUTOCONF # include "config.h" #endif #include "qdjvunet.h" #include "qdjviewprefs.h" #include #include #include #include #include #include #include #if QT_VERSION >= 0x40400 #include #include #include #include #include #include #include class QDjVuNetDocument::Private : public QObject { Q_OBJECT public: Private(QDjVuNetDocument *q); ~Private(); QDjVuNetDocument *q; QMap reqid; QMap reqok; QDjVuContext *ctx; QUrl url; bool cache; public slots: void readyRead(); void finished(); void error(QNetworkReply::NetworkError code); void sslErrors(const QList&); void authenticationRequired (QNetworkReply *reply, QAuthenticator *auth); void proxyAuthenticationRequired (const QNetworkProxy &proxy, QAuthenticator *auth); private: void doRead(QNetworkReply *reply, int streamid); void doError(QNetworkReply *reply, int streamid); bool doAuth(QString why, QAuthenticator *auth); }; QDjVuNetDocument::Private::Private(QDjVuNetDocument *q) : QObject(q), q(q) { QNetworkAccessManager *mgr = manager(); connect(mgr, SIGNAL(authenticationRequired(QNetworkReply*,QAuthenticator*)), this, SLOT(authenticationRequired(QNetworkReply*,QAuthenticator*)) ); connect(mgr, SIGNAL(proxyAuthenticationRequired(const QNetworkProxy&,QAuthenticator*)), this, SLOT(proxyAuthenticationRequired(const QNetworkProxy&,QAuthenticator*)) ); } QDjVuNetDocument::Private::~Private() { QMap::iterator it; for(it = reqid.begin(); it != reqid.end(); ++it) { QNetworkReply *reply = it.key(); int streamid = it.value(); if (streamid >= 0) ddjvu_stream_close(*q, streamid, true); reply->abort(); reply->deleteLater(); } reqid.clear(); reqok.clear(); } void QDjVuNetDocument::Private::doRead(QNetworkReply *reply, int streamid) { QByteArray b = reply->readAll(); if (streamid >= 0 && b.size() > 0) { if (! reqok.value(reply, false)) { int status = reply->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt(); QUrl location = reply->attribute(QNetworkRequest::RedirectionTargetAttribute).toUrl(); QByteArray type = reply->header(QNetworkRequest::ContentTypeHeader).toByteArray(); // check redirection if (location.isValid()) { reqid[reply] = -1; QUrl nurl = reply->url().resolved(location); if (streamid > 0 || status == 307) { q->newstream(streamid, QString(), nurl); return; } // Permanent redirect on main stream changes the base url. ddjvu_stream_close(*q, streamid, false); q->setUrl(ctx, nurl, cache); if (q->isValid()) return; } // check status code if (status != 200 && status != 203 && status != 0) { QString msg = tr("Received http status %1 while retrieving %2.", "%1 is an http status code") .arg(status) .arg(reply->url().toString()); emit q->error(msg, __FILE__, __LINE__); return; } // check content type if (type.startsWith("text/")) { QString msg = tr("Received <%1> data while retrieving %2.", "%1 is a mime type") .arg(QString::fromLatin1(type)) .arg(reply->url().toString()); emit q->error(msg, __FILE__, __LINE__); } reqok[reply] = true; } // process data ddjvu_stream_write(*q, streamid, b.data(), b.size()); } } void QDjVuNetDocument::Private::doError(QNetworkReply *reply, int streamid) { QNetworkReply::NetworkError code = reply->error(); if (streamid >= 0 && code != QNetworkReply::NoError) { QString msg = tr("%1 while retrieving '%2'.") .arg(reply->errorString()) .arg(reply->url().toString()); emit q->error(msg , __FILE__, __LINE__); ddjvu_stream_close(*q, streamid, false); reqid[reply] = -1; } } void QDjVuNetDocument::Private::readyRead() { QNetworkReply *reply = qobject_cast(sender()); if (reply) { int streamid = reqid.value(reply, -1); if (streamid >= 0) doRead(reply, streamid); } } void QDjVuNetDocument::Private::finished() { QNetworkReply *reply = qobject_cast(sender()); if (reply) { int streamid = reqid.value(reply, -1); if (streamid >= 0) { if (reply->bytesAvailable() > 0) doRead(reply, streamid); if (reply->error() != QNetworkReply::NoError) doError(reply, streamid); else ddjvu_stream_close(*q, streamid, false); } } reqid.remove(reply); reqok.remove(reply); reply->deleteLater(); } void QDjVuNetDocument::Private::error(QNetworkReply::NetworkError) { QNetworkReply *reply = qobject_cast(sender()); if (reply) { int streamid = reqid.value(reply, -1); if (streamid >= 0) doError(reply, streamid); } } void QDjVuNetDocument::Private::sslErrors(const QList&) { QNetworkReply *reply = qobject_cast(sender()); if (reply) { static QSet sslWhiteList; QString host = reply->url().host(); bool okay = sslWhiteList.contains(host); if (! okay) { QString why = tr("Cannot validate the certificate for server %1.").arg(host); emit q->sslWhiteList(why, okay); if (okay) sslWhiteList += host; } if (okay) reply->ignoreSslErrors(); } } bool QDjVuNetDocument::Private::doAuth(QString why, QAuthenticator *auth) { QString user = auth->user(); QString pass = QString::null; q->emit authRequired(why, user, pass); if (pass.isNull()) return false; auth->setUser(user); auth->setPassword(pass); return true; } void QDjVuNetDocument::Private::authenticationRequired(QNetworkReply *reply, QAuthenticator *auth) { QString host = reply->url().host(); QString why = tr("Authentication required for %1 (%2).").arg(auth->realm()).arg(host); if (! doAuth(why, auth)) reply->abort(); } void QDjVuNetDocument::Private::proxyAuthenticationRequired(const QNetworkProxy &proxy, QAuthenticator *auth) { QString why = tr("Authentication required for proxy %1.").arg(proxy.hostName()); doAuth(why, auth); } /*! \class QDjVuNetDocument \brief Represents DjVu documents accessible via the network This class is derived from \a QDjVuDocument and reimplements method \a newstream to handle documents available throught network requests. */ QDjVuNetDocument::~QDjVuNetDocument() { delete p; } /*! Construct a \a QDjVuNetDocument object. See \a QDjVuDocument::QDjVuDocument for the other two arguments. */ QDjVuNetDocument::QDjVuNetDocument(bool autoDelete, QObject *parent) : QDjVuDocument(autoDelete, parent), p(new QDjVuNetDocument::Private(this)) { } /*! \overload */ QDjVuNetDocument::QDjVuNetDocument(QObject *parent) : QDjVuDocument(parent), p(new QDjVuNetDocument::Private(this)) { } /*! Returns the \a QNetworkAccessManager used to reach the network. */ QNetworkAccessManager* QDjVuNetDocument::manager() { static QPointer mgr; QObject *app = QCoreApplication::instance(); if (! mgr) mgr = new QNetworkAccessManager(app); return mgr; } /*! Sets the application proxy using the host, port, user, and password specified by url \a proxyUrl. The proxy type depends on the url scheme. Recognized schemes are \a "http", \a "ftp", and \a "socks5". */ void QDjVuNetDocument::setProxy(QUrl proxyUrl) { QNetworkProxy proxy; QString scheme = proxyUrl.scheme(); if (scheme == "http") proxy.setType(QNetworkProxy::HttpCachingProxy); if (scheme == "ftp") proxy.setType(QNetworkProxy::FtpCachingProxy); else if (scheme == "socks5") proxy.setType(QNetworkProxy::Socks5Proxy); proxy.setHostName(proxyUrl.host()); proxy.setPort(proxyUrl.port()); proxy.setUser(proxyUrl.userName()); proxy.setPassword(proxyUrl.password()); QNetworkProxy::setApplicationProxy(proxy); } /*! Associates the \a QDjVuDocument object with with the \a QDjVuContext object \ctx in order to decode the DjVu data located at URL \a url. */ bool QDjVuNetDocument::setUrl(QDjVuContext *ctx, QUrl url, bool cache) { if (url.isValid()) { if (url.scheme() == "file" && url.host().isEmpty()) QDjVuDocument::setFileName(ctx, url.toLocalFile(), cache); else QDjVuDocument::setUrl(ctx, url, cache); } if (isValid()) { p->url = url; p->ctx = ctx; p->cache = cache; return true; } return false; } /* Perform a request. */ void QDjVuNetDocument::newstream(int streamid, QString, QUrl url) { // network request QNetworkRequest request(url); QString agent = "Djview/" + QDjViewPrefs::versionString(); request.setRawHeader("User-Agent", agent.toAscii()); QNetworkReply *reply = manager()->get(request); connect(reply, SIGNAL(readyRead()), p, SLOT(readyRead()) ); connect(reply, SIGNAL(finished()), p, SLOT(finished()) ); connect(reply, SIGNAL(sslErrors(const QList&)), p, SLOT(sslErrors(const QList&)) ); connect(reply, SIGNAL(error(QNetworkReply::NetworkError)), p, SLOT(error(QNetworkReply::NetworkError)) ); emit info(tr("Requesting '%1'").arg(url.toString())); p->reqid[reply] = streamid; p->reqok[reply] = false; } /*! \fn void QDjVuNetDocument::authRequired(QString why, QString &user, QString &pass) This signal is emitted when a username and password is required. String \a why contains a suitable description of the purpose of the username and password. Simply set \a user and \a pass and the credentials will be remembered. */ /*! \fn QDjVuNetDocument::sslWhiteList(QString host, bool &okay) This signal is emitted when there are recoverable errors on a ssl connection such as an inability to validate the certificate. String \a why contains a description of the problem. Setting \a okay to true allows the connection to proceed for the current session. */ // ---------------------------------------- // MOC #include "qdjvunet.moc" #else // QT_VERSION < 0x40400 // ---------------------------------------- // STUBS QT < 4.4.0 class QDjVuNetDocument::Private : public QObject { Q_OBJECT public: Private() : QObject() { } }; QDjVuNetDocument::~QDjVuNetDocument() { } QDjVuNetDocument::QDjVuNetDocument(bool autoDelete, QObject *parent) : QDjVuDocument(autoDelete, parent) { } QDjVuNetDocument::QDjVuNetDocument(QObject *parent) : QDjVuDocument(parent) { } bool QDjVuNetDocument::setUrl(QDjVuContext *ctx, QUrl url, bool cache) { if (url.isValid() && url.scheme() == "file") if (url.host().isEmpty() || url.host() == "localhost") return setFileName(ctx, url.toLocalFile(), cache); return false; } QNetworkAccessManager* QDjVuNetDocument::manager() { return 0; } void QDjVuNetDocument::setProxy(QUrl) { } void QDjVuNetDocument::newstream(int, QString, QUrl) { } #endif /* ------------------------------------------------------------- Local Variables: c++-font-lock-extra-types: ( "\\sw+_t" "Q[A-Z]\\sw*[a-z]\\sw*" ) End: ------------------------------------------------------------- */ djview4/src/qdjvunet.h000066400000000000000000000033571174072760700152550ustar00rootroot00000000000000//C- -*- C++ -*- //C- ------------------------------------------------------------------- //C- DjView4 //C- Copyright (c) 2006- Leon Bottou //C- //C- This software is subject to, and may be distributed under, the //C- GNU General Public License, either version 2 of the license, //C- or (at your option) any later version. The license should have //C- accompanied the software or you may obtain a copy of the license //C- from the Free Software Foundation at http://www.fsf.org . //C- //C- This program is distributed in the hope that it will be useful, //C- but WITHOUT ANY WARRANTY; without even the implied warranty of //C- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //C- GNU General Public License for more details. //C- ------------------------------------------------------------------ #ifndef QDJVUNET_H #define QDJVUNET_H #if AUTOCONF # include "config.h" #endif #include class QAuthenticator; class QNetworkAccessManager; class QDjVuNetDocument : public QDjVuDocument { Q_OBJECT public: ~QDjVuNetDocument(); QDjVuNetDocument(bool autoDelete=false, QObject *parent=0); QDjVuNetDocument(QObject *parent); bool setUrl(QDjVuContext *ctx, QUrl url, bool cache=true); static QNetworkAccessManager* manager(); static void setProxy(QUrl proxyurl); protected: virtual void newstream(int streamid, QString name, QUrl url); signals: void authRequired(QString why, QString &user, QString &pass); void sslWhiteList(QString why, bool &okay); private: class Private; Private *p; }; #endif /* ------------------------------------------------------------- Local Variables: c++-font-lock-extra-types: ( "\\sw+_t" "Q[A-Z]\\sw*[a-z]\\sw*" ) End: ------------------------------------------------------------- */ djview4/src/qdjvuwidget.cpp000066400000000000000000005042251174072760700163050ustar00rootroot00000000000000//C- -*- C++ -*- //C- ------------------------------------------------------------------- //C- DjView4 //C- Copyright (c) 2006- Leon Bottou //C- //C- This software is subject to, and may be distributed under, the //C- GNU General Public License, either version 2 of the license, //C- or (at your option) any later version. The license should have //C- accompanied the software or you may obtain a copy of the license //C- from the Free Software Foundation at http://www.fsf.org . //C- //C- This program is distributed in the hope that it will be useful, //C- but WITHOUT ANY WARRANTY; without even the implied warranty of //C- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //C- GNU General Public License for more details. //C- ------------------------------------------------------------------ #if AUTOCONF # include "config.h" #endif #include #include #include #include #include #include "qdjvu.h" #include "qdjvuwidget.h" #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #if DDJVUAPI_VERSION < 17 # error "DDJVUAPI_VERSION>=17 is required !" #endif #if DDJVUAPI_VERSION >= 18 # ifndef QDJVUWIDGET_PIXMAP_CACHE # define QDJVUWIDGET_PIXMAP_CACHE 1 # endif #endif #ifdef Q_NO_USING_KEYWORD # define BEGIN_ANONYMOUS_NAMESPACE # define END_ANONYMOUS_NAMESPACE # define QRectMapper QDjVu_QRectMapper # define Page QDjVu_Page # define Cache QDjVu_Cache # define MapArea QDjVu_MapArea # define Keywords QDjVu_Keywords # define DragMode QDjVu_DragMode #else # define BEGIN_ANONYMOUS_NAMESPACE namespace { # define END_ANONYMOUS_NAMESPACE } #endif typedef QDjVuWidget::Align Align; typedef QDjVuWidget::DisplayMode DisplayMode; typedef QDjVuWidget::Position Position; typedef QDjVuWidget::PageInfo PageInfo; typedef QDjVuWidget::Priority Priority; #define ZOOM_STRETCH QDjVuWidget::ZOOM_STRETCH #define ZOOM_ONE2ONE QDjVuWidget::ZOOM_ONE2ONE #define ZOOM_FITPAGE QDjVuWidget::ZOOM_FITPAGE #define ZOOM_FITWIDTH QDjVuWidget::ZOOM_FITWIDTH #define ZOOM_MIN QDjVuWidget::ZOOM_MIN #define ZOOM_100 QDjVuWidget::ZOOM_100 #define ZOOM_MAX QDjVuWidget::ZOOM_MAX #define DISPLAY_COLOR QDjVuWidget::DISPLAY_COLOR #define DISPLAY_STENCIL QDjVuWidget::DISPLAY_STENCIL #define DISPLAY_BG QDjVuWidget::DISPLAY_BG #define DISPLAY_FG QDjVuWidget::DISPLAY_FG #define DISPLAY_TEXT QDjVuWidget::DISPLAY_TEXT #define ALIGN_TOP QDjVuWidget::ALIGN_TOP #define ALIGN_LEFT QDjVuWidget::ALIGN_LEFT #define ALIGN_CENTER QDjVuWidget::ALIGN_CENTER #define ALIGN_BOTTOM QDjVuWidget::ALIGN_BOTTOM #define ALIGN_RIGHT QDjVuWidget::ALIGN_RIGHT #define PRIORITY_DEFAULT QDjVuWidget::PRIORITY_DEFAULT #define PRIORITY_ANNO QDjVuWidget::PRIORITY_ANNO #define PRIORITY_CGI QDjVuWidget::PRIORITY_CGI #define PRIORITY_USER QDjVuWidget::PRIORITY_USER // ---------------------------------------- // UTILITIES static inline void rect_to_qrect(const ddjvu_rect_t &rect, QRect &qrect) { qrect.setRect(rect.x, rect.y, rect.w, rect.h ); } static inline void qrect_to_rect(const QRect &qrect, ddjvu_rect_t &rect) { qrect.getRect(&rect.x, &rect.y, (int*)&rect.w, (int*)&rect.h); } static inline int scale_int(int x, int numerator, int denominator) { qint64 y = (qint64)x * numerator; return (int)(y + denominator - 1)/denominator; } static QSize scale_size(int w, int h, int numerator, int denominator, int rot=0) { int sw = scale_int(w,numerator,denominator); int sh = scale_int(h,numerator,denominator); return (rot & 1) ? QSize(sh, sw) : QSize(sw, sh); } static bool all_numbers(const char *s) { for (int i=0; s[i]; i++) if (s[i]<'0' || s[i]>'9') return false; return true; } template static inline int ksmallest(T *v, int n, int k) { int lo = 0; int hi = n-1; while (lov[m]) qSwap(v[lo],v[m]); if (v[m]>v[hi]) { qSwap(v[m],v[hi]); if (v[lo]>v[m]) qSwap(v[lo],v[m]); } /* Extract pivot, place sentinel */ pivot = v[m]; v[m] = v[lo+1]; v[lo+1] = v[lo]; v[lo] = pivot; /* Partition */ l = lo; h = hi; loop: do ++l; while (v[l]pivot); if (l < h) { qSwap(v[l],v[h]); goto loop; } /* Finish up */ if (k <= h) hi = h; else if (k >= l) lo = l; else break; } return v[k]; } static QCursor qcursor_by_name(const char *s, int hotx=8, int hoty=8) { QString name(s); QPixmap pixmap(name); if (pixmap.isNull()) return QCursor(); hotx = (hotx * pixmap.width()) / 16; hoty = (hoty * pixmap.height()) / 16; return QCursor(pixmap, hotx, hoty); } static QRegion cover_region(QRegion region, const QRect &brect) { QVector rects = region.rects(); // dilate region QRegion dilated; for (int i=0; i myarea; QList myrect; for (int i=0; i= 0) { int na = myarea[j] + a; QRect nr = myrect[j].unite(r); if (nr.width() * nr.height() < 2 * na ) { myarea[j] = na; myrect[j] = nr; break; } } if (j < 0) { myarea << a; myrect << r; } } // recompose region QRegion ret; for (int i=0; i 0) m = qMin(m, (r.right() - s.x()) / v.x()); if (v.x() < 0) m = qMin(m, (r.left() - s.x()) / v.x()); if (v.y() > 0) m = qMin(m, (r.bottom() - s.y()) / v.y()); if (v.y() < 0) m = qMin(m, (r.top() - s.y()) / v.y()); return m; } static bool miniexp_get_int(miniexp_t &r, int &x) { if (! miniexp_numberp(miniexp_car(r))) return false; x = miniexp_to_int(miniexp_car(r)); r = miniexp_cdr(r); return true; } static bool miniexp_get_rect(miniexp_t &r, QRect &rect) { int x, y, w, h; if (! (miniexp_get_int(r, x) && miniexp_get_int(r, y) && miniexp_get_int(r, w) && miniexp_get_int(r, h) )) return false; if (w<0 || h<0 || r) return false; rect.setRect(x, y, w, h); return true; } static bool miniexp_get_rect_from_points(miniexp_t &r, QRect &rect) { int x1,y1,x2,y2; if (! (miniexp_get_int(r, x1) && miniexp_get_int(r, y1) && miniexp_get_int(r, x2) && miniexp_get_int(r, y2) )) return false; if (x2 &points) { rect = QRect(); points.clear(); while (miniexp_consp(r)) { int x, y; if (!miniexp_get_int(r, x) || !miniexp_get_int(r, y)) return false; points << QPoint(x,y); rect |= QRect(x,y,1,1); } if (r || points.size() < 2) return false; return true; } static bool miniexp_get_color(miniexp_t &r, QColor &color) { const char *s = miniexp_to_name(miniexp_car(r)); if (! (s && s[0]=='#')) return false; color.setNamedColor(QString::fromUtf8(s)); if (! color.isValid()) return false; r = miniexp_cdr(r); return true; } QString miniexp_to_qstring(miniexp_t r) { const char *s = miniexp_to_str(r); if (s) return QString::fromUtf8(s); return QString(); } void flatten_hiddentext_sub(miniexp_t p, minivar_t &d) { miniexp_t type = miniexp_car(p); miniexp_t r = miniexp_cdr(p); QRect rect; if (miniexp_symbolp(type) && miniexp_get_rect_from_points(r, rect) ) { if (miniexp_stringp(miniexp_car(r))) { d = miniexp_cons(p, d); } else { while (miniexp_consp(r)) { flatten_hiddentext_sub(miniexp_car(r), d); r = miniexp_cdr(r); } d = miniexp_cons(type, d); } } } miniexp_t flatten_hiddentext(miniexp_t p) { // Output list contains // - terminals of the hidden text tree // (keyword x1 y1 x2 y2 string) // - or a keyword symbol indicating the need for a separator // page,column,region,para,line,word minivar_t d; flatten_hiddentext_sub(p, d); d = miniexp_reverse(d); // Uncomment the following line to print it: // miniexp_pprint(d, 72); return d; } void invert_luminance(QImage &img) { if (img.format() == QImage::Format_RGB32 || img.format() == QImage::Format_ARGB32 ) { int w = img.width(); int h = img.height(); for (int y=0; y> 16) & 0xff; qint32 g = (word >> 8) & 0xff; qint32 b = (word >> 0) & 0xff; word &= 0xff000000; qint32 s = 255 - qMax(r,qMax(g,b)) - qMin(r,qMin(g,b)); word |= ((r+s)<<16) | ((b+s)<<8) | (g+s); *words++ = word; } } } else { // revert to standard inversion. img.invertPixels(); } } // ---------------------------------------- // Position /*! \class QDjVuWidget::Position \brief Defines a position in the document. Variable \a pageNo indicates the closest page number. Flag \a inPage indicates that the position falls inside a page with known geometry. Variable \a posPage then indicates the position within the full resolution page coordinates (same coordinates as those used for the DjVu page annotations). Variable \a posView usually indicates the position relative to, in general, the top-left corner of the page rectangle. In fact variables \a hAnchor and \a vAnchor indicate the coordinates of the reference point as a percentages of the width and height relative to the top left corner. These are always zero when the position is returned by QDjVuWidget::position. Finally flag \a doPage makes sure that \a pageNo is indeed the closest page. This is always false when the position is returned by QDjVuWidget::position. */ Position::Position() : pageNo(0), posPage(0,0), posView(0,0), inPage(false), doPage(false), hAnchor(0), vAnchor(0) { } // ---------------------------------------- // QRECTMAPPER BEGIN_ANONYMOUS_NAMESPACE class QRectMapper { private: ddjvu_rectmapper_t *p; public: ~QRectMapper(); QRectMapper(); QRectMapper(const QRect &in, const QRect &out); void setMap(const QRect &in, const QRect &out); void setTransform(int rotation, bool mirrorx=false, bool mirrory=false); QPoint mapped(const QPoint &p); QRect mapped(const QRect &r); QPoint unMapped(const QPoint &p); QRect unMapped(const QRect &r); }; QRectMapper::~QRectMapper() { ddjvu_rectmapper_release(p); p = 0; } QRectMapper::QRectMapper() : p(0) { } QRectMapper::QRectMapper(const QRect &in, const QRect &out) : p(0) { setMap(in, out); } void QRectMapper::setMap(const QRect &in, const QRect &out) { ddjvu_rect_t rin, rout; ddjvu_rectmapper_release(p); p = 0; qrect_to_rect(in, rin); qrect_to_rect(out, rout); p = ddjvu_rectmapper_create(&rin, &rout); } void QRectMapper::setTransform(int rotation, bool mirrorx, bool mirrory) { if (!p) qWarning("QRectMapper: please call setMap first."); ddjvu_rectmapper_modify(p, rotation, (mirrorx?1:0), (mirrory?1:0)); } QPoint QRectMapper::mapped(const QPoint &qp) { QPoint q = qp; if (p) ddjvu_map_point(p, &q.rx(), &q.ry()); return q; } QRect QRectMapper::mapped(const QRect &qr) { QRect q; ddjvu_rect_t r; qrect_to_rect(qr, r); if (p) ddjvu_map_rect(p, &r); rect_to_qrect(r, q); return q; } QPoint QRectMapper::unMapped(const QPoint &qp) { QPoint q = qp; if (p) ddjvu_unmap_point(p, &q.rx(), &q.ry()); return q; } QRect QRectMapper::unMapped(const QRect &qr) { QRect q; ddjvu_rect_t r; qrect_to_rect(qr, r); if (p) ddjvu_unmap_rect(p, &r); rect_to_qrect(r, q); return q; } END_ANONYMOUS_NAMESPACE // ---------------------------------------- // PRIORITIZED SETTINGS // Some settings can be set/unset from several sources BEGIN_ANONYMOUS_NAMESPACE template class Prioritized { public: Prioritized(); operator Value() const; void set(Priority priority, Value value); void unset(Priority priority); void reduce(Priority priority); private: bool flags[PRIORITY_USER+1]; Value values[PRIORITY_USER+1]; }; template Prioritized::Prioritized() { for (int i=0; i<=PRIORITY_USER; i++) flags[i] = false; } template Prioritized::operator Value() const { for (int i=PRIORITY_USER; i>0; i--) if (flags[i]) return values[i]; return values[PRIORITY_DEFAULT]; } template void Prioritized::set(Priority priority, Value val) { values[priority] = val; flags[priority] = true; } template void Prioritized::unset(Priority priority) { flags[priority] = false; } template void Prioritized::reduce(Priority priority) { for (int i=PRIORITY_USER; i>priority; i--) if (flags[i]) { flags[i-1] = flags[i]; values[i-1] = values[i]; flags[i] = false; } } END_ANONYMOUS_NAMESPACE // ---------------------------------------- // QDJVULENS (declaration) class QDjVuLens : public QWidget { Q_OBJECT public: QDjVuLens(int size, int mag, QDjVuPrivate *priv, QDjVuWidget *widget); protected: virtual bool event(QEvent *event); virtual void paintEvent(QPaintEvent *event); virtual void moveEvent(QMoveEvent *event); virtual void resizeEvent(QResizeEvent *event); virtual bool eventFilter(QObject*, QEvent*); private: QDjVuPrivate *priv; QDjVuWidget *widget; QRect lensRect; int mag; public slots: void recenter(const QPoint &p); void redisplay(); private: void refocus(); }; // ---------------------------------------- // QDJVUPRIVATE BEGIN_ANONYMOUS_NAMESPACE struct MapArea { minivar_t expr; miniexp_t url; miniexp_t target; miniexp_t comment; miniexp_t areaType; QRect areaRect; QList areaPoints; miniexp_t borderType; QColor borderColor; QColor hiliteColor; QColor foregroundColor; unsigned char borderWidth; bool borderAlwaysVisible; unsigned char hiliteOpacity; bool pushpin; bool lineArrow; unsigned char lineWidth; bool rectNeedsRotation; MapArea(); bool error(const char *err, int pageno, miniexp_t info); bool parse(miniexp_t anno, int pageno=-1); bool isClickable(bool hyperlink=true); bool clicked(void); bool hasTransient(); bool hasPermanent(); bool contains(const QPoint &p); void maybeRotate(struct Page *p); QPainterPath contour(QRectMapper &m, QPoint &offset); void update(QWidget *w, QRectMapper &m, QPoint offset); void paintBorder(QPaintDevice *w, QRectMapper &m, QPoint offset); void paintPermanent(QPaintDevice *w, QRectMapper &m, QPoint o, double z=100); void paintTransient(QPaintDevice *w, QRectMapper &m, QPoint o); }; struct Page { int pageno; int width; // page coordinates int height; // page coordinates int dpi; // zero to indicate unknown size QRect rect; // desk coordinates QRect viewRect; // viewport coordinates QRectMapper mapper; // from page to desk coordinates QDjVuPage *page; // the page decoder minivar_t annotations; // the djvu page annotations minivar_t hiddenText; // the hidden djvu page text int initialRot; // initial rotation (used for text) QList mapAreas; // the list of mapareas bool redisplay; // must redisplay bool infoNeeded; // we want the page info now. void clear() { delete page; page=0; } ~Page() { clear(); }; Page() : pageno(-1),width(0),height(0),dpi(0),page(0), annotations(miniexp_dummy),hiddenText(miniexp_dummy), initialRot(-1),redisplay(false), infoNeeded(false) { clear(); } }; struct Cache { QRect rect; // desk coordinates QImage image; #if QDJVUWIDGET_PIXMAP_CACHE QPixmap pixmap; #endif }; enum { CHANGE_STATS = 0x1, // recompute estimated page sizes CHANGE_PAGES = 0x2, // change the displayed pages CHANGE_SIZE = 0x4, // update the recorded size of displayed pages CHANGE_SCALE = 0x8, // update the scale of displayed pages CHANGE_POSITIONS = 0x10, // update the disposition of the pages CHANGE_SCALE_PASS2 = 0x20, // internal CHANGE_VIEW = 0x40, // move to a new position CHANGE_VISIBLE = 0x80, // update the visible rectangle CHANGE_SCROLLBARS = 0x100, // update the scrollbars UPDATE_BORDERS = 0x200, // redisplay the visible desk surface UPDATE_PAGES = 0x400, // redisplay, possibly by scrolling smartly UPDATE_ALL = 0x800, // redisplay everything REFRESH_PAGES = 0x1000, // redraw pages with new pixels SCHEDULED = 0x8000 // internal: change scheduled }; enum DragMode { DRAG_NONE, DRAG_PANNING, DRAG_LENSING, DRAG_SELECTING, DRAG_LINKING }; END_ANONYMOUS_NAMESPACE class QDjVuPrivate : public QObject { Q_OBJECT private: virtual ~QDjVuPrivate(); QDjVuPrivate(QDjVuWidget *widget); friend class QDjVuWidget; friend class QDjVuLens; public: QDjVuWidget * const widget; // the widget QDjVuDocument *doc; bool docFailed; // page decoding has failed bool docStopped; // page decoding has stopped bool docReady; // page decoding is done int numPages; // total number of pages Position currentPos; // last clicked position QPoint currentPoint; // last clicked point Position cursorPos; // cursor position QPoint cursorPoint; // cursor point // display int zoom; int rotation; DisplayMode display; Align hAlign; Align vAlign; bool frame; bool continuous; bool sideBySide; bool coverPage; bool rightToLeft; QBrush borderBrush; // layout int layoutChange; // scheduled changes QPoint movePoint; // desired viewport point (CHANGE_VIEW) Position movePos; // desired page point (CHANGE_VIEW) QVector pageData; // all pages QList pageLayout; // pages in current layout QList pageVisible; // pages visible in viewport QMap pageMap; // keyed by page number QRect deskRect; // desk rectangle (0,0,w,h) QRect visibleRect; // visible rectangle (desk coordinates) int zoomFactor; // effective zoom level int estimatedWidth; // median of known page widths int estimatedHeight; // median of known page heights QSize unknownSize; // displayed page size when unknown (pixels) int borderSize; // size of borders around pages (pixels) int separatorSize; // size of separation between pages (pixels) int shadowSize; // size of the page shadow (pixels) // page requests int pageRequestDelay; // delay when scrollbars are down QTimer *pageRequestTimer; // timer for page requests // painting int pixelCacheSize; // size of pixel cache QRect selectedRect; // selection rectangle (viewport coord) double gamma; // display gamma bool invertLuminance; // invert images QColor white; // display white point int sdpi; // screen dpi ddjvu_format_t *renderFormat; // ddjvu format QList pixelCache; // pixel cache // gui bool keyboardEnabled; // obey keyboard commands bool mouseEnabled; // obey mouse commands bool hyperlinkEnabled; // follow hyperlinks bool animationEnabled; // animate position changes bool changingSBars; // set while changing scrollbars bool mouseWheelZoom; // mouse wheel function DragMode dragMode; // dragging mode QPoint dragStart; // starting point for dragging QMenu* contextMenu; // popup menu QDjVuLens *lens; // lens (only while lensing) int lensMag; // lens maginification int lensSize; // lens size int lineStep; // pixels moved by arrow keys Qt::MouseButtons buttons; // current mouse buttons Qt::KeyboardModifiers modifiers; // current modifiers Qt::KeyboardModifiers modifiersForLinks; // keys to show hyperlink Qt::KeyboardModifiers modifiersForLens; // keys to show lens Qt::KeyboardModifiers modifiersForSelect; // keys to select QList animationPosition; // list of positions to hit QPoint animationPoint; // reference point QTimer *animationTimer; // animation timer // prioritized settings Prioritized qBorderSize; Prioritized qZoom; Prioritized qBorderBrush; Prioritized qDisplay; Prioritized qHAlign; Prioritized qVAlign; // hyperlinks bool displayMapAreas; Page *currentMapAreaPage; MapArea *currentMapArea; QString currentUrl; QString currentTarget; QString currentComment; bool currentLinkDisplayed; bool allLinksDisplayed; QTimer *toolTipTimer; // messages int maxMessages; QList errorMessages; QList infoMessages; // cursors QCursor cursHandOpen; QCursor cursHandClosed; void changeLayout(int change, int delay=0); void getAnnotationsAndText(Page *p); bool requestPage(Page *p); int findClosestPage(const QPoint&, const QList&, Page**, int*); Position findPosition(const QPoint &point, bool closestAnchor=false); void updateModifiers(Qt::KeyboardModifiers, Qt::MouseButtons); void updatePosition(const QPoint &point, bool click=false, bool links=true); void updateCurrentPoint(const Position &pos); void adjustSettings(Priority priority, miniexp_t expr); void prepareMapAreas(Page*); bool mustDisplayMapArea(MapArea*); void checkCurrentMapArea(bool forceno=false); void showTransientMapAreas(bool); void updateTransientMapArea(Page*, MapArea*); void trimPixelCache(); void addToPixelCache(const QRect &rect, QImage image); bool paintHiddenText(QImage&, Page*, const QRect&, const QRect *pr=0); bool paintMapAreas(QImage&, Page*, const QRect&, bool, const QRect *pr=0); bool paintPage(QPainter&, Page*, const QRegion&); void paintAll(QPainter&, const QRegion&); bool pointerScroll(const QPoint &p); void changeSelectedRectangle(const QRect &rect); bool eventFilter(QObject*, QEvent*); void clearAnimation(void); bool computeAnimation(const Position&, const QPoint&); void changeBorderSize(void); void changeZoom(void); void changeBorderBrush(void); void changeDisplay(void); void changeHAlign(void); void changeVAlign(void); public slots: void makeLayout(); void makePageRequests(); void docinfo(); void pageinfo(); void pageinfoPage(); void redisplayPage(); void error(QString msg, QString filename, int lineno); void info(QString msg); void makeToolTip(); void animate(); }; QDjVuPrivate::~QDjVuPrivate() { if (doc) doc->deref(); doc = 0; if (renderFormat) ddjvu_format_release(renderFormat); renderFormat = 0; } QDjVuPrivate::QDjVuPrivate(QDjVuWidget *widget) : widget(widget) { // doc doc = 0; docReady = false; docStopped = false; docFailed = false; numPages = 1; // aspect zoom = 100; rotation = 0; frame = true; display = DISPLAY_COLOR; hAlign = ALIGN_CENTER; vAlign = ALIGN_CENTER; sideBySide = false; continuous = false; coverPage = false; rightToLeft = false; borderBrush = QBrush(Qt::lightGray); unknownSize = QSize(128,128); borderSize = 8; separatorSize = 12; shadowSize = 2; // prioritized qBorderSize.set(PRIORITY_DEFAULT, borderSize); qZoom.set(PRIORITY_DEFAULT, zoom); qBorderBrush.set(PRIORITY_DEFAULT, borderBrush); qDisplay.set(PRIORITY_DEFAULT, display); qHAlign.set(PRIORITY_DEFAULT, hAlign); qVAlign.set(PRIORITY_DEFAULT, vAlign); // gui contextMenu = 0; keyboardEnabled = true; hyperlinkEnabled = true; mouseEnabled = true; animationEnabled = true; lineStep = 12; buttons = (Qt::MouseButtons)(-1); modifiers = (Qt::KeyboardModifiers)(-1); modifiersForLinks = Qt::ShiftModifier; modifiersForLens = Qt::ShiftModifier|Qt::ControlModifier; modifiersForSelect = Qt::ControlModifier; changingSBars = false; dragMode = DRAG_NONE; lens = 0; lensMag = 3; lensSize = 300; animationTimer = new QTimer(this); animationTimer->setSingleShot(false); connect(animationTimer, SIGNAL(timeout()), this, SLOT(animate())); // scheduled changes layoutChange = 0; pageRequestDelay = 250; pageRequestTimer = new QTimer(this); pageRequestTimer->setSingleShot(true); // render format gamma = 2.2; invertLuminance = false; white = QColor(Qt::white); sdpi = 100; #if DDJVUAPI_VERSION < 18 unsigned int masks[3] = { 0xff0000, 0xff00, 0xff }; renderFormat = ddjvu_format_create(DDJVU_FORMAT_RGBMASK32, 3, masks); #else unsigned int masks[4] = { 0xff0000, 0xff00, 0xff, 0xff000000 }; renderFormat = ddjvu_format_create(DDJVU_FORMAT_RGBMASK32, 4, masks); #endif ddjvu_format_set_row_order(renderFormat, true); ddjvu_format_set_y_direction(renderFormat, true); ddjvu_format_set_ditherbits(renderFormat, QPixmap::defaultDepth()); ddjvu_format_set_gamma(renderFormat, gamma); // misc maxMessages = 20; displayMapAreas = true; currentMapAreaPage = 0; currentMapArea = 0; currentLinkDisplayed = false; allLinksDisplayed = false; pixelCacheSize = 256 * 1024; // cursors cursHandOpen = qcursor_by_name(":/images/cursor_hand_open.png"); cursHandClosed = qcursor_by_name(":/images/cursor_hand_closed.png"); // tooltips toolTipTimer = new QTimer(this); toolTipTimer->setSingleShot(true); // connect connect(pageRequestTimer, SIGNAL(timeout()), this, SLOT(makePageRequests()) ); connect(toolTipTimer, SIGNAL(timeout()), this, SLOT(makeToolTip()) ); connect(widget->horizontalScrollBar(), SIGNAL(sliderReleased()), this, SLOT(makePageRequests()) ); connect(widget->verticalScrollBar(), SIGNAL(sliderReleased()), this, SLOT(makePageRequests()) ); } // ---------------------------------------- // LAYOUT // Schedule a layout recomputation. void QDjVuPrivate::changeLayout(int change, int delay) { int oldChange = layoutChange; layoutChange = oldChange | change | SCHEDULED; if (! (oldChange & SCHEDULED)) QTimer::singleShot(delay, this, SLOT(makeLayout())); } // Perform a scheduled layout recomputation. void QDjVuPrivate::makeLayout() { // save position int futureLayoutChange = 0; if (docReady && !(layoutChange & CHANGE_VIEW)) { movePoint = currentPoint; movePos = currentPos; } // adjust layout information while (layoutChange && docReady) { // Recompute estimated page sizes if (layoutChange & CHANGE_STATS) { int k = 0; QVector widthVec(numPages+1); QVector heightVec(numPages+1); layoutChange &= ~CHANGE_STATS; futureLayoutChange |= CHANGE_STATS; for (int i=0; i 0) { int dpi = pageData[i].dpi; widthVec[k] = pageData[i].width * 100 / dpi; heightVec[k] = pageData[i].height * 100 / dpi; k += 1; } if (k > 0) { futureLayoutChange &= ~CHANGE_STATS; estimatedWidth = ksmallest(widthVec.data(), k, k/2); estimatedHeight = ksmallest(heightVec.data(), k, k/2); for (int i=0; i=numPages) { qWarning("makeLayout: invalid page number"); movePos.pageNo = widget->page(); } int loPage = movePos.pageNo; int hiPage = qMin(numPages, loPage+1); if (continuous) { loPage = 0; hiPage = numPages; } else if (sideBySide && coverPage) { loPage = qMax(0, (loPage & 1) ? loPage : loPage-1); hiPage = qMin(numPages, (loPage & 1) ? loPage+2 : loPage+1); } else if (sideBySide) { loPage = qMax(0, (loPage & 1) ? loPage-1 : loPage); hiPage = qMin(numPages, loPage+2); } for (int i=loPage; i= hiPage + 2) pageData[i].clear(); if (continuous || sideBySide) adjustSettings(PRIORITY_ANNO, miniexp_nil); else adjustSettings(PRIORITY_ANNO, pageLayout[0]->annotations); } // Layout page sizes else if (layoutChange & CHANGE_SIZE) { layoutChange &= ~CHANGE_SIZE; Page *p; foreach(p, pageLayout) { int n = p->pageno; if (! p->infoNeeded) continue; if (p->dpi <= 0) { ddjvu_pageinfo_t info; ddjvu_status_t status; status = ddjvu_document_get_pageinfo(*doc, n, &info); if (status == DDJVU_JOB_OK) if (info.dpi > 0 && info.width > 0 && info.height > 0) { p->dpi = info.dpi; p->width = info.width; p->height = info.height; #if DDJVUAPI_VERSION >= 18 p->initialRot = info.rotation; #endif } layoutChange |= CHANGE_SCALE; layoutChange |= UPDATE_BORDERS; } getAnnotationsAndText(p); } } // Layout scaled page size else if (layoutChange & CHANGE_SCALE) { // some setups require two passes layoutChange &= ~CHANGE_SCALE; layoutChange &= ~CHANGE_SCALE_PASS2; layoutChange |= CHANGE_POSITIONS; if (pageLayout.size() > 1) if (zoom==ZOOM_FITWIDTH || zoom==ZOOM_FITPAGE) layoutChange |= CHANGE_SCALE_PASS2; // rescale pages Page *p; int r = rotation; int vpw = qMax(64, widget->viewport()->width() - 2*borderSize); int vph = qMax(64, widget->viewport()->height() - 2*borderSize); zoomFactor = zoom; foreach(p, pageLayout) { QSize size; if (p->width <= 0 || p->height <= 0) size = unknownSize; else if (p->dpi <= 0) size = scale_size(p->width, p->height, zoom*sdpi, 10000, r); else if (layoutChange & CHANGE_SCALE_PASS2) size = scale_size(p->width, p->height, sdpi, p->dpi, r); else if (zoom == ZOOM_ONE2ONE) size = scale_size(p->width, p->height, p->dpi, p->dpi, r); else if (zoom == ZOOM_STRETCH) size = QSize(vpw, vph); else if (zoom == ZOOM_FITWIDTH) { int pgw = (r&1) ? p->height : p->width; size = scale_size(p->width, p->height, vpw, pgw, r); zoomFactor = (vpw * p->dpi * 100) / (pgw * sdpi); } else if (zoom == ZOOM_FITPAGE) { int pgw = (r&1) ? p->height : p->width; int pgh = (r&1) ? p->width : p->height; if (vpw*pgh > vph*pgw) { vpw = vph; pgw = pgh; } size = scale_size(p->width, p->height, vpw, pgw, r); zoomFactor = (vpw * p->dpi * 100) / (pgw * sdpi); } else size = scale_size(p->width, p->height, zoom*sdpi,100*p->dpi,r); p->rect.setSize(size); } } // Layout page positions else if (layoutChange & CHANGE_POSITIONS) { layoutChange |= CHANGE_VIEW; layoutChange |= CHANGE_SCROLLBARS; layoutChange &= ~CHANGE_POSITIONS; // position pages Page *p; QRect fullRect; if (! continuous) { // single page or side by side pages int x = borderSize; int s = pageLayout.size(); for (int i=0; irect.moveTo(x,borderSize); fullRect |= p->rect; x = x + p->rect.width() + separatorSize; } foreach(p, pageLayout) { int dy = fullRect.height() - p->rect.height(); if (vAlign == ALIGN_CENTER) p->rect.translate(0, dy/2); else if (vAlign == ALIGN_BOTTOM) p->rect.translate(0, dy); } } else if (!sideBySide) { // continuous single pages int y = borderSize; foreach(p, pageLayout) { p->rect.moveTo(borderSize, y); y = y + p->rect.height() + separatorSize; fullRect |= p->rect; } foreach(p, pageLayout) { int dx = fullRect.width() - p->rect.width(); if (hAlign == ALIGN_CENTER) p->rect.translate(dx/2, 0); else if (hAlign == ALIGN_RIGHT) p->rect.translate(dx,0); } } else { // continuous side-by-side pages int wLeft = 0; int wTotal = 0; int k = 0; while(k < pageLayout.size()) { Page *lp = pageLayout[k++]; Page *rp = lp; if (k < pageLayout.size() && (k>1 || !coverPage)) rp = pageLayout[k++]; if (rightToLeft) { Page *tmp=lp; lp=rp; rp=tmp; } int lw = lp->rect.width(); wLeft = qMax(wLeft, lw); wTotal = qMax(wTotal, lw); if (rp) wTotal = qMax(wTotal, lw+rp->rect.width()+separatorSize); } int y = borderSize; k = 0; while(k < pageLayout.size()) { Page *lp = pageLayout[k++]; Page *rp = lp; if (k < pageLayout.size() && (k > 1 || !coverPage)) rp = pageLayout[k++]; if (rightToLeft) { Page *tmp=lp; lp=rp; rp=tmp; } int h = qMax(lp->rect.height(), rp->rect.height()); int ly, ry, lx, rx; ly = ry = y; if (vAlign==ALIGN_BOTTOM) { ly += (h - lp->rect.height()); ry += (h - rp->rect.height()); } else if (vAlign==ALIGN_CENTER) { ly += (h - lp->rect.height())/2; ry += (h - rp->rect.height())/2; } if (hAlign==ALIGN_LEFT) { lx = borderSize; rx = lx + lp->rect.width() + separatorSize; } else if (hAlign==ALIGN_RIGHT) { if (rp == lp) rx = wTotal + borderSize + separatorSize; else rx = wTotal + borderSize - rp->rect.width(); lx = rx - separatorSize - lp->rect.width(); } else if (lp == rp) { lx = borderSize+wLeft+(separatorSize-lp->rect.width())/2; rx = lx; } else { lx = borderSize + wLeft - lp->rect.width(); rx = borderSize + wLeft + separatorSize; } lp->rect.moveTo(lx, ly); if (rp != lp) rp->rect.moveTo(rx, ry); fullRect |= lp->rect; fullRect |= rp->rect; y = y + h + separatorSize; } } // setup rectangles fullRect.adjust(-borderSize, -borderSize, +borderSize, +borderSize ); deskRect = fullRect; // setup mappers foreach(p, pageLayout) { int w = (p->width>0) ? p->width : unknownSize.width(); int h = (p->height>0) ? p->height : unknownSize.height(); p->mapper.setMap(QRect(0,0,w,h), p->rect); p->mapper.setTransform(rotation, false, true); } // clear pixel cache pixelCache.clear(); } // Layout page positions else if (layoutChange & CHANGE_SCALE_PASS2) { Page *p; // compute usable viewport size (minus margins and separators) int vw = widget->viewport()->width() - 2*borderSize; int vh = widget->viewport()->height() - 2*borderSize; if (sideBySide && pageLayout.size()>1) vw = vw - separatorSize; vw = qMax(64, vw); vh = qMax(64, vh); // compute target size for zoom 100% int dw = deskRect.width() - 2*borderSize; int dh = deskRect.height() + 2*borderSize; if (sideBySide && pageLayout.size()>1) dw = dw - separatorSize; if (continuous) { dh = 0; foreach(p, pageLayout) dh = qMax(dh, p->rect.height()); } // compute zoom factor into vw/dw if (zoom == ZOOM_FITPAGE && vw*dh > vh*dw) { vw = vh; dw = dh; } zoomFactor = vw * 100 / dw; // apply zoom int r = rotation; foreach(p, pageLayout) { QSize size = unknownSize; int dpi = (p->dpi > 0) ? p->dpi : 100; if (p->width>0 && p->height>0) size = scale_size(p->width, p->height, vw * sdpi, dw * dpi, r); p->rect.setSize(size); } // prepare further adjustments layoutChange |= CHANGE_POSITIONS; layoutChange &= ~CHANGE_SCALE_PASS2; } // Viewport adjustment else if (layoutChange & CHANGE_VIEW) { if (pageMap.contains(movePos.pageNo)) { Page *p = pageMap[movePos.pageNo]; QPoint dp = p->rect.topLeft(); if (movePos.hAnchor > 0 && movePos.hAnchor <= 100) dp.rx() += (p->rect.width() - 1) * movePos.hAnchor / 100; if (movePos.vAnchor > 0 && movePos.vAnchor <= 100) dp.ry() += (p->rect.height() - 1) * movePos.vAnchor / 100; QPoint sdp = dp; if (movePos.inPage && p->dpi) dp = p->mapper.mapped(movePos.posPage); else if (!movePos.inPage) dp += movePos.posView; // special case: unknown page geometry if (! p->dpi) if (movePos.inPage || movePos.vAnchor || movePos.hAnchor) futureLayoutChange = CHANGE_VIEW; // special case: not the closest page if (movePos.doPage) if (movePos.pageNo != findClosestPage(dp, pageLayout, 0, 0)) dp = sdp; // perform move visibleRect.moveTo(dp - movePoint); } layoutChange |= CHANGE_VISIBLE; layoutChange &= ~CHANGE_VIEW; } // Layout page visibility adjustment else if (layoutChange & CHANGE_VISIBLE) { Page *p; QSize vpSize = widget->viewport()->size(); QRect &rv = visibleRect; QRect &rd = deskRect; // adjust size rv.setSize(vpSize); // reposition rectVisible according to alignment. rv.moveRight(qMin(rv.right(), rd.right())); rv.moveLeft(qMax(rv.left(), rd.left())); rv.moveBottom(qMin(rv.bottom(), rd.bottom())); rv.moveTop(qMax(rv.top(), rd.top())); if (hAlign == ALIGN_RIGHT) rv.moveRight(qMin(rv.right(), rd.right())); if (vAlign == ALIGN_BOTTOM) rv.moveBottom(qMin(rv.bottom(), rd.bottom())); QPoint cd = rd.center(); QPoint cv = rv.center(); if (hAlign==ALIGN_CENTER && rv.width()>=rd.width()) cv.setX(cd.x()); if (vAlign==ALIGN_CENTER && rv.height()>=rd.height()) cv.setY(cd.y()); rv.moveCenter(cv); // delete QDjVuPage that are too far away int sw = rv.width(); int sh = rv.height(); QRect v = rv.adjusted(-sw, -sh, +sw, +sh); foreach(p, pageLayout) if (p->page && !v.intersects(p->rect)) p->clear(); // construct pageVisible array and schedule page requests pageVisible.clear(); foreach(p, pageLayout) if (rv.intersects(p->rect)) pageVisible.append(p); // schedule page requests QScrollBar *hBar = widget->horizontalScrollBar(); QScrollBar *vBar = widget->verticalScrollBar(); if (hBar->isSliderDown() || vBar->isSliderDown()) pageRequestTimer->start(pageRequestDelay); else pageRequestTimer->start(0); // synchronize currentpoint and cursorpos updateCurrentPoint(movePos); updatePosition(cursorPoint, false, false); // continue layoutChange |= UPDATE_PAGES; layoutChange &= ~CHANGE_VISIBLE; } // scrollbar adjustment else if (layoutChange & CHANGE_SCROLLBARS) { QRect &rv = visibleRect; QRect &rd = deskRect; QScrollBar *hBar = widget->horizontalScrollBar(); QScrollBar *vBar = widget->verticalScrollBar(); int hStep = qMin(rv.width(), rd.width()); int vStep = qMin(rv.height(), rd.height()); int vcorr = 0; if (zoom == ZOOM_FITWIDTH && vBar->isVisible() && widget->verticalScrollBarPolicy() == Qt::ScrollBarAsNeeded ) { // detect and prevent infinite loops int vw = rv.width(); int sw = vBar->width(); if (scale_int(rd.height(), vw+sw, vw) > rv.height()) vcorr = 1; } changingSBars = true; vBar->setMinimum(rd.top()); vBar->setMaximum(rd.top()+rd.height()-vStep+vcorr); vBar->setPageStep(vStep); vBar->setSingleStep(lineStep * 2); vBar->setValue(rv.top()); hBar->setMinimum(rd.left()); hBar->setMaximum(rd.left()+rd.width()-hStep); hBar->setPageStep(hStep); hBar->setSingleStep(lineStep * 2); hBar->setValue(rv.left()); changingSBars = false; layoutChange &= ~CHANGE_SCROLLBARS; } // force redraw else if (layoutChange & UPDATE_ALL) { Page *p; QRect &rv = visibleRect; foreach(p, pageLayout) p->viewRect = p->rect.translated(-rv.topLeft()); layoutChange &= ~UPDATE_ALL; layoutChange &= ~UPDATE_PAGES; layoutChange &= ~UPDATE_BORDERS; widget->viewport()->update(); checkCurrentMapArea(); emit widget->layoutChanged(); } // otherwise try scrolling else if (layoutChange & UPDATE_PAGES) { Page *p; QRect &rv = visibleRect; // redraw on failure layoutChange |= UPDATE_ALL; // determine potential scroll int dx = 0; int dy = 0; bool scroll = false; foreach(p, pageVisible) if (p->viewRect.size() == p->rect.size()) { scroll = true; dx = p->rect.left() - rv.left() - p->viewRect.left(); dy = p->rect.top() - rv.top() - p->viewRect.top(); break; } if (! scroll) continue; // verify potential scroll QRect rs = widget->viewport()->rect(); rs &= rs.translated(-dx,-dy); if (rs.isEmpty()) continue; foreach(p, pageLayout) { QRect rect = p->rect.translated(-rv.topLeft()); if (rs.intersects(p->viewRect)) p->viewRect.translate(dx,dy); else p->viewRect = rect; if (rv.intersects(p->rect)) if (p->viewRect != rect) scroll = false; } if (! scroll) continue; layoutChange &= ~UPDATE_PAGES; layoutChange &= ~UPDATE_ALL; dragStart += QPoint(dx,dy); selectedRect.translate(dx, dy); // Tooltips mess things up during scrolls QToolTip::showText(QPoint(),QString()); // Attention: scroll can generate a paintEvent // and call makeLayout again. This is why we // do these four things before. widget->viewport()->scroll(dx,dy); checkCurrentMapArea(); emit widget->layoutChanged(); } else if (layoutChange & UPDATE_BORDERS) { Page *p; QRegion region = widget->viewport()->rect(); foreach(p, pageVisible) region -= p->viewRect; layoutChange &= ~UPDATE_BORDERS; widget->viewport()->update(region); emit widget->layoutChanged(); } else if (layoutChange & REFRESH_PAGES) { Page *p; bool changes = false; foreach(p, pageLayout) if (p->redisplay) { if (visibleRect.intersects(p->rect)) widget->viewport()->update(p->viewRect); p->redisplay = false; changes = true; } if (changes) pixelCache.clear(); layoutChange &= ~REFRESH_PAGES; } else { // deschedule if (layoutChange & ~SCHEDULED) qWarning("QDjVuWidget::makeLayout: unknown bits"); layoutChange = 0; } } // deschedule layoutChange &= ~SCHEDULED; layoutChange |= futureLayoutChange; } // Make all page requests void QDjVuPrivate::makePageRequests(void) { Page *p; QRect &rv = visibleRect; bool found = false; if (! doc) return; // visible pages foreach(p, pageVisible) if (p && rv.intersects(p->rect)) found |= requestPage(p); // search more if document is idle (prefetch/predecode) if (!found && !doc->runningProcesses()) { if (continuous) { int sw = rv.width() / 2; int sh = rv.height() / 2; QRect brv = rv.adjusted(-sw,-sh,sw,sh); foreach(p, pageLayout) if (!p->page && brv.intersects(p->rect)) found |= requestPage(p); } else if (pageVisible.size() > 0) { int pmin = pageVisible[0]->pageno; int pmax = pageVisible[0]->pageno; foreach(p, pageVisible) { pmax = qMax(pmax, p->pageno); pmin = qMin(pmin, p->pageno); } if (pmax+1 < numPages) found |= requestPage(&pageData[pmax+1]); if (! found && pmin-1 >= 0) found |= requestPage(&pageData[pmin-1]); if (! found && pmax+2 < numPages) found |= requestPage(&pageData[pmax+2]); if (! found && pmin-2 >= 0) found |= requestPage(&pageData[pmin-2]); } } } // Obtain page annotations and hidden text if not present void QDjVuPrivate::getAnnotationsAndText(Page *p) { if (p->annotations == miniexp_dummy) { p->annotations = doc->getPageAnnotations(p->pageno); if (p->annotations && !continuous && !sideBySide) adjustSettings(PRIORITY_ANNO, p->annotations); if (p->annotations) prepareMapAreas(p); } if (p->hiddenText == miniexp_dummy) { miniexp_t expr = doc->getPageText(p->pageno); if (expr != miniexp_dummy) p->hiddenText = flatten_hiddentext(expr); } } // Create the page decoder and connects its slots. bool QDjVuPrivate::requestPage(Page *p) { bool result = false; if (! p->page) { // create and connect page p->page = new QDjVuPage(doc, p->pageno); connect(p->page, SIGNAL(pageinfo()), this, SLOT(pageinfoPage())); connect(p->page, SIGNAL(redisplay()), this, SLOT(redisplayPage())); connect(p->page, SIGNAL(error(QString,QString,int)), this, SLOT(error(QString,QString,int)) ); connect(p->page, SIGNAL(info(QString)), this, SLOT(info(QString)) ); p->redisplay = true; changeLayout(REFRESH_PAGES); result = true; } if (! p->infoNeeded) { p->infoNeeded = true; changeLayout(CHANGE_SIZE); } getAnnotationsAndText(p); return result; } // finds closest page to a point in desk coordinates int QDjVuPrivate::findClosestPage(const QPoint &deskPoint, const QList &pages, Page **pp, int *pd) { Page *p; Page *bestPage = 0; int bestDistance = 0; foreach(p, pages) { int distance = 0; if (deskPoint.y() < p->rect.top()) distance += p->rect.top() - deskPoint.y(); else if (deskPoint.y() > p->rect.bottom() - 1) distance += deskPoint.y() - p->rect.bottom() + 1; if (deskPoint.x() < p->rect.left()) distance += p->rect.left() - deskPoint.x(); else if (deskPoint.x() > p->rect.right() - 1) distance += deskPoint.x() - p->rect.right() + 1; if (bestPage==0 || distancepageno; } // compute Position for a given viewport point. Position QDjVuPrivate::findPosition(const QPoint &point, bool closestAnchor) { Position pos; Page *bestPage = 0; int bestDistance = 0; QPoint deskPoint = visibleRect.topLeft() + point; findClosestPage(deskPoint, pageVisible, &bestPage, &bestDistance); if (bestPage) { pos.pageNo = bestPage->pageno; pos.posView = deskPoint - bestPage->rect.topLeft(); pos.posPage = bestPage->mapper.unMapped(deskPoint); pos.inPage = (bestDistance == 0 && bestPage->dpi > 0); if (closestAnchor) { int w = bestPage->rect.width() - 1; int h = bestPage->rect.height() - 1; pos.hAnchor = 100 * qBound(0, pos.posView.x(), w) / w; pos.vAnchor = 100 * qBound(0, pos.posView.y(), h) / h; int x = w * pos.hAnchor / 100; int y = h * pos.vAnchor / 100; pos.posView = pos.posView - QPoint(x,y); } } return pos; } // when the pointer moves void QDjVuPrivate::updatePosition(const QPoint &point, bool click, bool links) { if (point.isNull()) return; // locate bool changed = false; cursorPoint = point; Position pos = findPosition(point); if (! pageMap.contains(pos.pageNo)) return; if (pos.pageNo != cursorPos.pageNo || pos.inPage != cursorPos.inPage || pos.posView != cursorPos.posView || pos.posPage != cursorPos.posPage ) changed = true; // update cursorPos = pos; if (click) updateCurrentPoint(pos); if (! changed) return; // emit pointerposition signal PageInfo info; Page *p = pageMap.value(pos.pageNo,0); if (p != 0) { info.pageno = pos.pageNo; info.width = p->width; info.height = p->height; info.dpi = p->dpi; info.segment = widget->getSegmentForRect(selectedRect, info.pageno); info.selected = selectedRect; emit widget->pointerPosition(pos, info); } // check mapareas if (links) checkCurrentMapArea(); } // when the view moves void QDjVuPrivate::updateCurrentPoint(const Position &pos) { QPoint point; bool changePos = !pos.doPage; if (pageMap.contains(pos.pageNo)) { Page *p = pageMap[pos.pageNo]; point = p->rect.topLeft(); if (pos.hAnchor > 0 && pos.hAnchor <= 100) point.rx() += (p->rect.width() - 1) * pos.hAnchor / 100; if (pos.vAnchor > 0 && pos.vAnchor <= 100) point.ry() += (p->rect.height() - 1) * pos.vAnchor / 100; if (pos.inPage && p->dpi > 0) point = p->mapper.mapped(pos.posPage); else if (!pos.inPage) point += pos.posView; } else { int n = pageLayout.size(); if (n > 0 && pos.pageNo < pageLayout[0]->pageno) point = pageLayout[0]->rect.topLeft(); else if (n > 0 && pos.pageNo > pageLayout[n-1]->pageno) point = pageLayout[n-1]->rect.bottomRight(); } // check visibility if (! visibleRect.contains(point)) { changePos = true; point.ry() = qBound(visibleRect.top() + borderSize, point.y(), visibleRect.bottom() - borderSize); point.rx() = qBound(visibleRect.left() + borderSize, point.x(), visibleRect.right() - borderSize); } // update currentPoint currentPoint = point - visibleRect.topLeft(); // update currentPos int oldPage = currentPos.pageNo; if (changePos || pos.hAnchor || pos.vAnchor) currentPos = findPosition(currentPoint); else currentPos = pos; if (oldPage != currentPos.pageNo) emit widget->pageChanged(currentPos.pageNo); } // ---------------------------------------- // QDJVUPRIVATE SLOTS void QDjVuPrivate::docinfo() { ddjvu_status_t status; status = ddjvu_document_decoding_status(*doc); if (status == DDJVU_JOB_OK && !docReady) { docReady = true; numPages = ddjvu_document_get_pagenum(*doc); pageData.clear(); pageData.resize(numPages); for (int i=0; i 0) requestPage(&pageData[0]); } else if (status == DDJVU_JOB_STOPPED && !docStopped) { docStopped = true; emit widget->stopCondition(-1); widget->viewport()->update(); } else if (status == DDJVU_JOB_FAILED && !docFailed) { docFailed = true; emit widget->errorCondition(-1); widget->viewport()->update(); } } void QDjVuPrivate::pageinfo() { changeLayout(CHANGE_SIZE, 250); } void QDjVuPrivate::pageinfoPage() { QObject *send = sender(); QDjVuPage *page = qobject_cast(send); if (page) { Page *p = 0; int pageno = page->pageNo(); if (pageMap.contains(pageno)) p = pageMap[pageno]; switch(ddjvu_page_decoding_status(*page)) { case DDJVU_JOB_OK: if (p) getAnnotationsAndText(p); // no break! case DDJVU_JOB_STARTED: if (p && p->dpi <= 0) { ddjvu_page_rotation_t rot; rot = ddjvu_page_get_initial_rotation(*page); ddjvu_page_set_rotation(*page, rot); int w = ddjvu_page_get_width(*page); int h = ddjvu_page_get_height(*page); int d = ddjvu_page_get_resolution(*page); if (d > 0 && w > 0 && h > 0) { p->width = w; p->height = h; p->dpi = d; p->initialRot = rot; changeLayout(CHANGE_STATS|CHANGE_SCALE|UPDATE_BORDERS); } } break; case DDJVU_JOB_STOPPED: docStopped = true; emit widget->stopCondition(page->pageNo()); break; case DDJVU_JOB_FAILED: emit widget->errorCondition(page->pageNo()); break; default: break; } } } void QDjVuPrivate::redisplayPage() { QObject *send = sender(); QDjVuPage *page = qobject_cast(send); if (page) { int pageno = page->pageNo(); if (pageMap.contains(pageno)) { Page *p = pageMap[pageno]; if (p && !p->redisplay) { p->redisplay = true; changeLayout(REFRESH_PAGES); } } } } void QDjVuPrivate::error(QString message, QString filename, int lineno) { emit widget->error(message, filename, lineno); errorMessages.prepend(message); while (errorMessages.size() > maxMessages) errorMessages.removeLast(); } void QDjVuPrivate::info(QString message) { emit widget->info(message); infoMessages.prepend(message); while (infoMessages.size() > maxMessages) infoMessages.removeLast(); } // ---------------------------------------- // QDJVUWIDGET /*! \class QDjVuWidget \brief Widget for display DjVu documents. Class \a QDjVuWidget implements the elementary widget for displaying DjVu documents. It appears as a display area possibly surrounded by horizontal and vertical scrollbars. The display area can show a single page, two pages side by side, or all pages in continuously scrollable area. */ QDjVuWidget::~QDjVuWidget() { delete priv; priv = 0; } /*! Construct a \a QDjVuWidget instance. Argument \a parent is the parent of this widget in the \a QObject hierarchy. */ QDjVuWidget::QDjVuWidget(QWidget *parent) : QAbstractScrollArea(parent), priv(new QDjVuPrivate(this)) { setFocusPolicy(Qt::StrongFocus); setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding); // setup viewport #if QT_VERSION >= 0x040100 viewport()->setAttribute(Qt::WA_OpaquePaintEvent); #endif viewport()->setAttribute(Qt::WA_NoSystemBackground); viewport()->setAttribute(Qt::WA_StaticContents); viewport()->setMouseTracking(true); } /*! This overloaded constructor calls \a setDocument. */ QDjVuWidget::QDjVuWidget(QDjVuDocument *doc, QWidget *parent) : QAbstractScrollArea(parent), priv(new QDjVuPrivate(this)) { setFocusPolicy(Qt::StrongFocus); setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding); #if QT_VERSION >= 0x040100 viewport()->setAttribute(Qt::WA_OpaquePaintEvent); #endif viewport()->setAttribute(Qt::WA_NoSystemBackground); viewport()->setAttribute(Qt::WA_StaticContents); viewport()->setMouseTracking(true); setDocument(doc); } // ---------------------------------------- // MESSAGE /*! Return one of the last error messages. Argument \a n indicates which message should be returned. Value 0 corresponds to the most recent message. */ QString QDjVuWidget::pastErrorMessage(int n) { if (0 <= n && n < priv->errorMessages.size()) return priv->errorMessages.at(n); return QString(); } /*! Return one of the last informational messages. Argument \a n indicates which message should be returned. Value 0 corresponds to the most recent message. */ QString QDjVuWidget::pastInfoMessage(int n) { if (0 <= n && n < priv->infoMessages.size()) return priv->infoMessages.at(n); return QString(); } // ---------------------------------------- // QDJVUWIDGET PROPERTIES /*! \property QDjVuWidget::document The \a QDjVuDocument object shown in this widget. */ QDjVuDocument * QDjVuWidget::document(void) const { return priv->doc; } /*! Specify the \a QDjVuDocument shown by this widget. The caller is responsible to ensure that the document object \a d remains allocated until the djvu widget is either destroyed or directed to use another document. Two techniques are interesting: The first consists of capturing the document signal \a destroyed() and to call \a setDocument(0) before the destruction occurs. The second consists of allocating the document object in \a autoDelete mode, since the djvu widget calls methods \a ref() and \a deref() adequately. */ void QDjVuWidget::setDocument(QDjVuDocument *d) { if (d != priv->doc) { // cleanup if (priv->doc) { priv->adjustSettings(PRIORITY_ANNO, miniexp_nil); priv->adjustSettings(PRIORITY_CGI, miniexp_nil); disconnect(priv->doc, 0, priv, 0); priv->doc->deref(); } priv->doc = 0; priv->pageData.clear(); priv->pageLayout.clear(); priv->pageMap.clear(); priv->pageVisible.clear(); priv->currentMapAreaPage = 0; priv->currentMapArea = 0; priv->dragMode = DRAG_NONE; delete priv->lens; priv->lens = 0; // setup if (d) d->ref(); priv->doc = d; priv->docReady = false; priv->docStopped = false; priv->docFailed = false; priv->numPages = 1; if (! (priv->doc && priv->doc->isValid())) priv->docFailed = true; // connect if (priv->doc) { connect(priv->doc, SIGNAL(docinfo()), priv, SLOT(docinfo())); connect(priv->doc, SIGNAL(pageinfo()), priv, SLOT(pageinfo())); connect(priv->doc, SIGNAL(error(QString,QString,int)), priv, SLOT(error(QString,QString,int))); connect(priv->doc, SIGNAL(info(QString)), priv, SLOT(info(QString))); connect(priv->doc, SIGNAL(idle()), priv, SLOT(makePageRequests())); priv->docinfo(); } // update priv->estimatedWidth = 0; priv->estimatedHeight = 0; priv->visibleRect.setRect(0,0,0,0); priv->currentPos = Position(); priv->currentPoint = QPoint(priv->borderSize,priv->borderSize); priv->cursorPos = Position(); priv->cursorPoint = QPoint(0,0); priv->layoutChange = 0; priv->changeLayout(CHANGE_STATS|CHANGE_PAGES|UPDATE_ALL); } } /*! \property QDjVuWidget::page The page currently displayed. When getting the property, this is the number of the page that is closest to the center of the display area. When setting the property, the topleft corner of the desired page replaces the topleft corner of the current page. Default: page 0. */ int QDjVuWidget::page(void) const { return qBound(0, priv->currentPos.pageNo, priv->numPages); } void QDjVuWidget::setPage(int n) { int currentPageNo = page(); if (n != currentPageNo && n>=0 && nnumPages) { Position pos = priv->findPosition(priv->currentPoint); pos.pageNo = n; pos.doPage = true; pos.inPage = false; setPosition(pos, priv->currentPoint); } } /*! \property QDjVuWidget::position The document position associated with a viewport point. The default point is close to the topLeft corner of the viewport. When setting the position, flag \a Position::inPage is used to determine if the document position is expressed in full resolution page coordinates (\a Position::posPage) or in pixels relative to the top left page corner (\a Position::posView) or the point specified by the \a Position::hAnchor and \a Position::vAnchor. When \a Position::inPage is \a true, variable \a Position::posPage must be contained inside the full resolution page rectangle. */ Position QDjVuWidget::position(void) const { QPoint topLeft(priv->borderSize, priv->borderSize); return position(topLeft); } QPoint QDjVuWidget::hotSpot() const { return priv->currentPoint; } Position QDjVuWidget::position(const QPoint &point) const { return priv->findPosition(point); } void QDjVuWidget::setPosition(const Position &pos) { QPoint topLeft(priv->borderSize, priv->borderSize); setPosition(pos, topLeft); } void QDjVuWidget::setPosition(const Position &pos, const QPoint &p, bool animate) { // animation priv->clearAnimation(); if (animate && priv->animationEnabled) if (priv->computeAnimation(pos, p)) return; // standard procedure priv->movePoint = p; priv->movePos = pos; if (priv->pageMap.contains(pos.pageNo)) priv->changeLayout(CHANGE_VIEW|CHANGE_SCROLLBARS); else priv->changeLayout(CHANGE_PAGES|CHANGE_VIEW|CHANGE_SCROLLBARS); } /*! Unlike \a position() which sets the anchor fields \a pos.hAnchor and \a pos.vAnchor to zero, this version determines where to place the anchor to minimize the length of vector \a pos.posView. */ Position QDjVuWidget::positionWithClosestAnchor(const QPoint &point) const { return priv->findPosition(point, true); } /*! \property QDjVuWidget::rotation Number of counter-clockwise quarter turns applied to the pages. Only the low two bits of this number are meaningful. Default: 0. */ int QDjVuWidget::rotation(void) const { return priv->rotation; } void QDjVuWidget::setRotation(int r) { if (r != priv->rotation) { priv->rotation = r; priv->changeLayout(CHANGE_SCALE|UPDATE_ALL); } } /*! \property QDjVuWidget::zoom Zoom factor applied to the pages. Positive zoom factors take into account the resolution of the page images and assumes that the display resolution is 100 dpi. Negative zoom factors define special behaviors: \a ZOOM_ONE2ONE displays one image pixel for one screen pixel. \a ZOOM_FITWIDTH and \a ZOOM_FITPAGE dynamically compute the zoom factor to fit the page(s) inside the display area. Default: \a ZOOM_100. */ int QDjVuWidget::zoom(void) const { return priv->zoom; } void QDjVuWidget::setZoom(int z) { priv->qZoom.set(PRIORITY_USER, z); priv->changeZoom(); } void QDjVuPrivate::changeZoom(void) { int z = qZoom; switch(z) { case ZOOM_STRETCH: case ZOOM_ONE2ONE: case ZOOM_FITWIDTH: case ZOOM_FITPAGE: break; default: z = qBound((int)ZOOM_MIN, z, (int)ZOOM_MAX); break; } if (zoom != z) { zoom = z; changeLayout(CHANGE_SCALE|UPDATE_ALL); } } /*! Return the effective zoom factor of the current page. This is the same as \a zoom() when the zoom factor is positive. Otherwise this function returns the dynamically computed zoom factor. */ int QDjVuWidget::zoomFactor(void) const { if (priv->zoom >= ZOOM_MIN && priv->zoom <= ZOOM_MAX) return priv->zoom; if (priv->zoomFactor >= ZOOM_MIN && priv->zoomFactor <= ZOOM_MAX) return priv->zoomFactor; // Only when ZOOM_ONE2ONE or ZOOM_STRETCH is selected: priv->makeLayout(); if (! priv->pageMap.contains(priv->currentPos.pageNo)) return 100; Page *p = priv->pageMap[priv->currentPos.pageNo]; if (p->dpi>0 && p->width>0) return (p->rect.width() * p->dpi * 100) / (p->width * priv->sdpi); return 100; } /*! \property QDjVuWidget::gamma Gamma factor of the display. Default 2.2. */ double QDjVuWidget::gamma(void) const { return priv->gamma; } void QDjVuWidget::setGamma(double gamma) { priv->gamma = gamma; ddjvu_format_set_gamma(priv->renderFormat, gamma); priv->pixelCache.clear(); priv->changeLayout(UPDATE_ALL); } /*! \property QDjVuWidget::invertLuminance Display image with inverted luminance. */ bool QDjVuWidget::invertLuminance(void) const { return priv->invertLuminance; } void QDjVuWidget::setInvertLuminance(bool b) { priv->invertLuminance = b; priv->pixelCache.clear(); priv->changeLayout(UPDATE_ALL); } /*! \property QDjVuWidget::invertLuminance Specify whether mouse wheel zooms the image or scrolls the page. */ bool QDjVuWidget::mouseWheelZoom(void) const { return priv->mouseWheelZoom; } void QDjVuWidget::setMouseWheelZoom(bool b) { priv->mouseWheelZoom = b; } /*! \property QDjVuWidget::white White point of the display. This is a noop when DDJVUAPI_VERSION<20. Default 0xffffff. */ QColor QDjVuWidget::white(void) const { return priv->white; } void QDjVuWidget::setWhite(QColor w) { #if DDJVUAPI_VERSION >= 20 priv->white = w; ddjvu_format_set_white(priv->renderFormat, w.blue(), w.green(), w.red()); priv->pixelCache.clear(); priv->changeLayout(UPDATE_ALL); #endif } /*! \property QDjVuWidget::screenDpi Resolution of the screen. Default is 100dpi. */ int QDjVuWidget::screenDpi(void) const { return priv->sdpi; } void QDjVuWidget::setScreenDpi(int sdpi) { sdpi = qBound(25, sdpi, 600); if (priv->sdpi != sdpi) { priv->sdpi = sdpi; priv->changeLayout(CHANGE_SCALE|UPDATE_ALL); } } /*! \property QDjVuWidget::displayMode Display mode for the DjVu images. Default: \a DISPLAY_COLOR. */ DisplayMode QDjVuWidget::displayMode(void) const { return priv->display; } void QDjVuWidget::setDisplayMode(DisplayMode m) { priv->qDisplay.set(PRIORITY_USER, m); priv->changeDisplay(); } void QDjVuPrivate::changeDisplay() { if (display != qDisplay) { display = qDisplay; pixelCache.clear(); changeLayout(UPDATE_ALL); } } /*! \property QDjVuWidget::displayFrame When this property is true, a frame is displayed around each page. Default: \a true. */ bool QDjVuWidget::displayFrame(void) const { return priv->frame; } void QDjVuWidget::setDisplayFrame(bool b) { if (b != priv->frame) { priv->frame = b; priv->changeLayout(UPDATE_ALL); } } /*! \property QDjVuWidget::sideBySide Determine the layout of the pages shown in the displayed area. Setting this property to \a true displays pages side by side. This can be combined with the \a continuous property. Default: \a false. */ bool QDjVuWidget::sideBySide(void) const { return priv->sideBySide; } void QDjVuWidget::setSideBySide(bool b) { if (b != priv->sideBySide) { priv->sideBySide = b; priv->changeLayout(CHANGE_PAGES|UPDATE_ALL); } } /*! \property QDjVuWidget::coverPage Determine whether the first page must be show alone when multipage documents are displayed side-by-side. Default: \a false. */ bool QDjVuWidget::coverPage(void) const { return priv->coverPage; } void QDjVuWidget::setCoverPage(bool b) { if (b != priv->coverPage) { priv->coverPage = b; if (priv->sideBySide) priv->changeLayout(CHANGE_PAGES|UPDATE_ALL); } } /*! \property QDjVuWidget::rightToLeft Determine whether the side-by-side pages should be displayed right-to-left instead of left-to-right. Default: \a false. */ bool QDjVuWidget::rightToLeft(void) const { return priv->rightToLeft; } void QDjVuWidget::setRightToLeft(bool b) { if (b != priv->rightToLeft) { priv->rightToLeft = b; if (priv->sideBySide) priv->changeLayout(CHANGE_PAGES|UPDATE_ALL); } } /*! \property QDjVuWidget::continuous Determine the layout of the pages shown in the displayed area. Setting this property to \a true displays all the document pages in a continuously scrollable area. This can be combined with the \a sideBySide property. Default: \a false. */ bool QDjVuWidget::continuous(void) const { return priv->continuous; } void QDjVuWidget::setContinuous(bool b) { if (b != priv->continuous) { priv->continuous = b; priv->changeLayout(CHANGE_PAGES|UPDATE_ALL); } } /*! \property QDjVuWidget::horizAlign Determine the horizontal alignment of the pages in the display area. Horizontal alignment can be complicated in continuous mode. Default: \a ALIGN_CENTER. */ Align QDjVuWidget::horizAlign(void) const { return priv->hAlign; } void QDjVuWidget::setHorizAlign(Align a) { priv->qHAlign.set(PRIORITY_USER, a); priv->changeHAlign(); } void QDjVuPrivate::changeHAlign(void) { if (hAlign != qHAlign) { hAlign = qHAlign; changeLayout(CHANGE_POSITIONS); } } /*! \property QDjVuWidget::vertAlign Determine the vertical alignment of the pages in the display area. Vertical alignment can be very subtle in continuous mode because it only matters when pages are also displayed side by side. Default: \a ALIGN_CENTER. */ Align QDjVuWidget::vertAlign(void) const { return priv->vAlign; } void QDjVuWidget::setVertAlign(Align a) { priv->qVAlign.set(PRIORITY_USER, a); priv->changeVAlign(); } void QDjVuPrivate::changeVAlign(void) { if (vAlign != qVAlign) { vAlign = qVAlign; changeLayout(CHANGE_POSITIONS); } } /*! \property QDjVuWidget::borderBrush Brush used to fill the part of the display area that is not covered by a page. Default: light gray. */ QBrush QDjVuWidget::borderBrush(void) const { return priv->borderBrush; } void QDjVuWidget::setBorderBrush(QBrush b) { priv->qBorderBrush.set(PRIORITY_USER, b); priv->changeBorderBrush(); } void QDjVuPrivate::changeBorderBrush(void) { if (borderBrush != qBorderBrush) { borderBrush = qBorderBrush; changeLayout(UPDATE_BORDERS); } } /*! \property QDjVuWidget::borderSize The minimal size of the border around the pages. Default: 8 pixels. */ int QDjVuWidget::borderSize(void) const { return priv->borderSize; } void QDjVuWidget::setBorderSize(int b) { priv->qBorderSize.set(PRIORITY_USER, b); priv->changeBorderSize(); } void QDjVuPrivate::changeBorderSize(void) { if (borderSize != qBorderSize) { borderSize = qBorderSize; changeLayout(CHANGE_POSITIONS); } } /*! \property QDjVuWidget::separatorSize The size of the gap between pages in side-by-side mode. Default: 12 pixels. */ int QDjVuWidget::separatorSize(void) const { return priv->separatorSize; } void QDjVuWidget::setSeparatorSize(int b) { b = qMax(0, b); if (b != priv->separatorSize) { priv->separatorSize = b; if (priv->sideBySide || priv->continuous) priv->changeLayout(CHANGE_PAGES|UPDATE_ALL); } } /*! \property QDjVuWidget::contextMenu Menu displayed when the user invokes a context menu for this widget. Default: no context menu. */ QMenu* QDjVuWidget::contextMenu(void) const { return priv->contextMenu; } void QDjVuWidget::setContextMenu(QMenu *m) { priv->contextMenu = m; } /*! \property QDjVuWidget::displayMapAreas Indicates whether the mapareas specified in the annotations should be displayed. Default: \a true. */ bool QDjVuWidget::displayMapAreas(void) const { return priv->displayMapAreas; } void QDjVuWidget::setDisplayMapAreas(bool b) { if (b != priv->displayMapAreas) { priv->displayMapAreas = b; viewport()->update(); priv->checkCurrentMapArea(); priv->showTransientMapAreas(priv->allLinksDisplayed); } } /*! \property QDjVuWidget::keyboardEnabled Enables keyboard interaction. This property controls the behavior of arrows keys, page movement keys, and various shortcut keys. Default: \a true. */ bool QDjVuWidget::keyboardEnabled(void) const { return priv->keyboardEnabled; } void QDjVuWidget::enableKeyboard(bool b) { if (b != priv->keyboardEnabled) priv->keyboardEnabled = b; } /*! \property QDjVuWidget::mouseEnabled Enables mouse interaction. Default: \a true. */ bool QDjVuWidget::mouseEnabled(void) const { return priv->mouseEnabled; } void QDjVuWidget::enableMouse(bool b) { if (b != priv->mouseEnabled) priv->mouseEnabled = b; } /*! \property QDjVuWidget::hyperlinkEnabled Enables hyperlinks. This propery indicates whether hyperlink feedback is displayed, and whether the signals \a pointerEnter, \a pointerLeave and \a pointerClick are emitted. You must also set \a mouseEnabled and \a displayMapAreas to \a true. Default: \a true. */ bool QDjVuWidget::hyperlinkEnabled(void) const { return priv->hyperlinkEnabled; } void QDjVuWidget::enableHyperlink(bool b) { if (b != priv->hyperlinkEnabled) { priv->hyperlinkEnabled = b; priv->checkCurrentMapArea(); } } /*! \property QDjVuWidget::animationEnabled Enables animation on position changes. This property indicates whether certain position changes are performed using a display animation. Default: \a true. */ bool QDjVuWidget::animationEnabled(void) const { return priv->animationEnabled; } void QDjVuWidget::enableAnimation(bool b) { priv->clearAnimation(); priv->animationEnabled = b; } /*! \property QDjVuWidget::animationInProgress Read-only property that tells whether an animation is in progress. */ bool QDjVuWidget::animationInProgress(void) const { if (priv->animationEnabled) if (! priv->animationPosition.isEmpty()) return true; return false; } /*! \property QDjVuWidget::pixelCacheSize Defines the maximal number of pixels in the cache for decoded images segments. */ int QDjVuWidget::pixelCacheSize(void) const { return priv->pixelCacheSize; } void QDjVuWidget::setPixelCacheSize(int s) { int oldPixelCacheSize = priv->pixelCacheSize; priv->pixelCacheSize = s; if (s < oldPixelCacheSize) priv->trimPixelCache(); } /*! \property QDjVuWidget::lensPower Sets the power of the magnification lens. Legal value range from 0x to 10x. Value 0x disables the lens. Default is 3x. */ int QDjVuWidget::lensPower(void) const { return priv->lensMag; } void QDjVuWidget::setLensPower(int mag) { priv->lensMag = qBound(0,mag,10); } /*! \property QDjVuWidget::lensSize Sets the size of the magnification lens. Legal value range from 0 to 500 pixels. Value 0 disables the lens. Default is 300. */ int QDjVuWidget::lensSize(void) const { return priv->lensSize; } void QDjVuWidget::setLensSize(int size) { priv->lensSize = qBound(0,size,500); } /*! \property QDjVuWidget::modifiersForLens Sets the modifier that should be depressed in order to display the magnifying lens. Default: Control + Shift. */ Qt::KeyboardModifiers QDjVuWidget::modifiersForLens() const { return priv->modifiersForLens; } void QDjVuWidget::setModifiersForLens(Qt::KeyboardModifiers m) { if (priv->modifiersForLens != m) { priv->modifiersForLens = m; if (priv->dragMode == DRAG_NONE) modifierEvent(priv->modifiers, priv->buttons, priv->cursorPoint); } } /*! \property QDjVuWidget::modifiersForSelect Sets the modifier that should be depressed in conjunction with the left mouse button in order to select a rectangular area. Default: Control. */ Qt::KeyboardModifiers QDjVuWidget::modifiersForSelect() const { return priv->modifiersForSelect; } void QDjVuWidget::setModifiersForSelect(Qt::KeyboardModifiers m) { if (priv->modifiersForSelect != m) { priv->modifiersForSelect = m; if (priv->dragMode == DRAG_NONE) modifierEvent(priv->modifiers, priv->buttons, priv->cursorPoint); } } /*! \property QDjVuWidget::modifiersForLinks Sets the modifier that should be depressed in order to display all hyperlinks. Default: Shift. */ Qt::KeyboardModifiers QDjVuWidget::modifiersForLinks() const { return priv->modifiersForLinks; } void QDjVuWidget::setModifiersForLinks(Qt::KeyboardModifiers m) { if (priv->modifiersForLinks != m) { priv->modifiersForLinks = m; priv->showTransientMapAreas(m!=Qt::NoModifier && m==priv->modifiers); if (priv->dragMode == DRAG_NONE) modifierEvent(priv->modifiers, priv->buttons, priv->cursorPoint); } } // ---------------------------------------- // MAPAREAS AND HIDDEN TEXT BEGIN_ANONYMOUS_NAMESPACE struct Keywords { // maparea keywords miniexp_t url, rect, oval, poly, line, text; miniexp_t none, xxor, border; miniexp_t shadow_in, shadow_out, shadow_ein, shadow_eout; miniexp_t border_avis, hilite, opacity; miniexp_t arrow, width, lineclr; miniexp_t backclr, textclr, pushpin; // hiddentext keywords miniexp_t h[7]; Keywords() { #define S(n,s) n=miniexp_symbol(s) #define D(n) S(n,#n) // maparea D(url); D(rect); D(oval); D(poly); D(line); D(text); D(none); S(xxor,"xor"); D(border); D(shadow_in); D(shadow_out); D(shadow_ein); D(shadow_eout); D(border_avis); D(hilite); D(opacity); D(arrow); D(width); D(lineclr); D(backclr); D(textclr); D(pushpin); // hidden text S(h[0],"page"); S(h[1],"column"); S(h[2],"region"); S(h[3],"para"); S(h[4],"line"); S(h[5],"word"); S(h[6],"char"); #undef D #undef S } }; Q_GLOBAL_STATIC(Keywords, keywords) END_ANONYMOUS_NAMESPACE MapArea::MapArea() { expr = miniexp_nil; url = target = comment = miniexp_nil; areaType = borderType = miniexp_nil; borderWidth = 0; borderAlwaysVisible = false; hiliteOpacity = 50; lineArrow = false; lineWidth = 1; foregroundColor = Qt::black; pushpin = false; rectNeedsRotation = false; } bool MapArea::error(const char *err, int pageno, miniexp_t info) { if (pageno >= 0) qWarning("Error in maparea for page %d\n%s\n%s\n", pageno+1, err, miniexp_to_str(miniexp_pname(info, 72)) ); return false; } bool MapArea::parse(miniexp_t full, int pageno) { Keywords &k = *keywords(); expr = full; miniexp_t anno = miniexp_cdr(full); miniexp_t q = miniexp_car(anno); int itmp; // hyperlink if (miniexp_stringp(q)) { const char *s = miniexp_to_str(q); url = (s && s[0]) ? q : miniexp_nil; } else if (miniexp_consp(q) && miniexp_car(q)==k.url) { if (! (miniexp_stringp(miniexp_cadr(q)) && miniexp_stringp(miniexp_caddr(q)) && ! miniexp_cdddr(q) ) ) return error("Bad url", pageno, q); url = miniexp_cadr(q); target = miniexp_caddr(q); const char *s = miniexp_to_str(url); if (! (s && s[0])) url = target = miniexp_nil; } else if (q) return error("Bad url", pageno, full); else error("Some viewers prefer \"\" over () for empty urls.", pageno, full ); // comment anno = miniexp_cdr(anno); q = miniexp_car(anno); if (miniexp_stringp(q)) { const char *s = miniexp_to_str(q); if (s && s[0]) comment = q; } else if (q) return error("Bad comment", pageno, full); else error("Some viewers prefer \"\" over () for empty comments.", pageno, full ); // area anno = miniexp_cdr(anno); q = miniexp_car(anno); areaType = miniexp_car(q); if (areaType == k.rect || areaType == k.oval || areaType == k.text) { q = miniexp_cdr(q); if (!miniexp_get_rect(q, areaRect) || q) return error("Bad rectangle", pageno, miniexp_car(anno)); } else if (areaType == k.poly) { q = miniexp_cdr(q); if (!miniexp_get_points(q, areaRect, areaPoints)) return error("Bad polygon", pageno, miniexp_car(anno)); } else if (areaType == k.line) { q = miniexp_cdr(q); if (!miniexp_get_points(q,areaRect,areaPoints) || areaPoints.size()!=2) return error("Bad line", pageno, miniexp_car(anno)); } else return error("Bad area", pageno, full); // remaining while (miniexp_consp(anno = miniexp_cdr(anno))) { q = miniexp_car(anno); miniexp_t s = miniexp_car(q); miniexp_t a = miniexp_cdr(q); // borders if (s==k.none || s==k.xxor || s==k.border || s==k.shadow_in || s==k.shadow_out || s==k.shadow_ein || s==k.shadow_eout ) { if (s==k.none) { borderWidth = 0; } else if (s==k.xxor) { borderWidth = 1; } else if (s==k.border) { if (! miniexp_get_color(a, borderColor)) return error("Color expected", pageno, q); } else { if (! miniexp_get_int(a, itmp)) return error("Integer expected", pageno, q); borderWidth = qBound(1, itmp, 32); if (areaType != k.rect) return error("Only for rectangle maparea", pageno, q); } if (borderType) error("Multiple border specification", pageno, full); borderType = s; } // border avis else if (s == k.border_avis) { borderAlwaysVisible = true; } // hilite else if (s == k.hilite) { if (areaType != k.rect) error("Only for rectangle maparea", pageno, q); else if (! miniexp_get_color(a, hiliteColor)) return error("Color expected", pageno, q); } else if (s == k.opacity) { if (areaType != k.rect) error("Only for rectangle maparea", pageno, q); else if (! miniexp_get_int(a, itmp)) return error("Integer expected", pageno, q); hiliteOpacity = qBound(0, itmp, 200); } // line stuff else if (s == k.arrow) { if (areaType != k.line) error("Only for line maparea", pageno, q); lineArrow = true; } else if (s == k.width) { if (areaType != k.line) error("Only for line maparea", pageno, q); if (! miniexp_get_int(a, itmp)) return error("Integer expected", pageno, q); lineWidth = qBound(1, itmp, 32); } else if (s == k.lineclr) { if (areaType != k.line) error("Only for line maparea", pageno, q); if (! miniexp_get_color(a, foregroundColor)) return error("Color expected", pageno, q); } // text stuff else if (s == k.backclr) { if (areaType != k.text) error("Only for text maparea", pageno, q); if (! miniexp_get_color(a, hiliteColor)) return error("Color expected", pageno, q); hiliteOpacity = 200; } else if (s == k.textclr) { if (areaType != k.text) error("Only for text maparea", pageno, q); if (! miniexp_get_color(a, foregroundColor)) return error("Color expected", pageno, q); } else if (s == k.pushpin) { if (areaType != k.text) error("Only for text maparea", pageno, q); pushpin = true; } else error("Unrecognized specification", pageno, q); // test for extra arguments if (a) error("Extra arguments were ignored", pageno, q); } return true; } bool MapArea::clicked(void) { Keywords &k = *keywords(); if (areaType == k.text && pushpin) { areaType = k.pushpin; // fake area type borderType = miniexp_nil; // no border hiliteColor = QColor(); // no hilite return true; } else if (areaType == k.pushpin) { parse(expr); // restore return true; } return false; } bool MapArea::isClickable(bool hyperlink) { Keywords &k = *keywords(); if (url && hyperlink) return true; if (areaType == k.pushpin) return true; if (areaType == k.text && pushpin) return true; return false; } bool MapArea::hasTransient() { Keywords &k = *keywords(); if (areaType == miniexp_nil || borderType == k.none || borderType == miniexp_nil || borderAlwaysVisible ) return false; return true; } bool MapArea::hasPermanent() { Keywords &k = *keywords(); if (hiliteColor.isValid() || areaType == k.line || areaType == k.text || areaType == k.pushpin ) return true; return false; } void MapArea::maybeRotate(struct Page *p) { if (rectNeedsRotation && p->dpi >= 0) { int rot = p->initialRot; if (rot > 0) { int rw = (rot&1) ? p->height : p->width; int rh = (rot&1) ? p->width : p->height; QRectMapper mapper; mapper.setMap(QRect(0,0,rw,rh), QRect(0,0,p->width,p->height)); mapper.setTransform(rot, false, false); areaRect = mapper.mapped(areaRect); } rectNeedsRotation = false; } } QPainterPath MapArea::contour(QRectMapper &m, QPoint &offset) { Keywords &k = *keywords(); QRect rect = m.mapped(areaRect).translated(-offset); QPainterPath path; if (areaType == k.poly) { QPoint p = m.mapped(areaPoints[0]) - offset; path.moveTo(p); for (int j=1; j maps page coordinates to // widget coordinates translated by . Keywords &k = *keywords(); int bw = borderWidth; QRect rect = m.mapped(areaRect).translated(-offset); if (! rect.intersects(w->rect())) return; if (areaType == k.oval || areaType == k.poly) { int bw2 = (bw / 2) + 1; QPainterPath path = contour(m, offset); rect.adjust(-bw2, -bw2, bw2, bw2); QBitmap bm(rect.width(),rect.height()); bm.clear(); QPainter paint; paint.begin(&bm); paint.translate(-rect.topLeft()); paint.strokePath(path, QPen(Qt::black, bw+4)); paint.end(); QRegion region(bm); region.translate(rect.topLeft()); w->update(region); } else { QRegion region = rect.adjusted(-1, -1, 1, 1); region.subtract(rect.adjusted(bw+1, bw+1, -bw-1, -bw-1)); w->update(region); } } void MapArea::paintBorder(QPaintDevice *w, QRectMapper &m, QPoint offset) { // The mapper maps page coordinates to // widget coordinates translated by . Keywords &k = *keywords(); QRect rect = m.mapped(areaRect).translated(-offset); QPainter paint(w); paint.setRenderHint(QPainter::Antialiasing); paint.setRenderHint(QPainter::TextAntialiasing); if (borderType == k.border) { QPainterPath path = contour(m, offset); paint.strokePath(path, QPen(borderColor, borderWidth)); } else if (borderType == k.xxor) { QPainterPath path = contour(m, offset); paint.strokePath(path, QPen(Qt::white, borderWidth)); paint.strokePath(path, QPen(Qt::black, borderWidth, Qt::DashLine)); } else if (borderType == k.shadow_in || borderType==k.shadow_out) { rect.adjust(0,0,+1,+1); int bw = borderWidth; bw = qMin(bw, qMin(rect.width()/4, rect.height()/4)); QRect irect = rect.adjusted(bw, bw, -bw, -bw); paint.setPen(Qt::NoPen); QColor c1(255,255,255,100); QColor c2(0,0,0,100); QPolygon p(6); p[0] = irect.bottomLeft(); p[1] = rect.bottomLeft(); p[2] = rect.bottomRight(); p[3] = rect.topRight(); p[4] = irect.topRight(); p[5] = irect.bottomRight(); paint.setBrush((borderType==k.shadow_in) ? c1 : c2); paint.drawPolygon(p); p[0] = irect.bottomLeft(); p[1] = rect.bottomLeft(); p[2] = rect.topLeft(); p[3] = rect.topRight(); p[4] = irect.topRight(); p[5] = irect.topLeft(); paint.setBrush((borderType==k.shadow_in) ? c2 : c1); paint.drawPolygon(p); } else if (borderType == k.shadow_ein || borderType==k.shadow_eout) { rect.adjust(0,0,+1,+1); int bw = borderWidth; bw = qMin(bw, qMin(rect.width()/4, rect.height()/4)); QRect irect = rect.adjusted(bw, bw, -bw, -bw); paint.setBrush(Qt::NoBrush); QColor c1(255,255,255,100); QColor c2(0,0,0,100); QPolygon p(3); paint.setPen(QPen((borderType==k.shadow_ein) ? c1 : c2, 1)); p[0] = irect.bottomLeft(); p[1] = irect.topLeft(); p[2] = irect.topRight(); paint.drawPolyline(p); p[0] = rect.bottomLeft(); p[1] = rect.bottomRight(); p[2] = rect.topRight(); paint.drawPolyline(p); paint.setPen(QPen((borderType==k.shadow_ein) ? c2 : c1, 1)); p[0] = irect.bottomLeft(); p[1] = irect.bottomRight(); p[2] = irect.topRight(); paint.drawPolyline(p); p[0] = rect.bottomLeft(); p[1] = rect.topLeft(); p[2] = rect.topRight(); paint.drawPolyline(p); } } void MapArea::paintPermanent(QPaintDevice *w, QRectMapper &m, QPoint offset, double z) { // The mapper maps page coordinates to // widget coordinates translated by . Keywords &k = *keywords(); QRect rect = m.mapped(areaRect).translated(-offset); if (hasPermanent()) { QPainter paint(w); paint.setRenderHint(QPainter::Antialiasing); paint.setRenderHint(QPainter::TextAntialiasing); if (hiliteColor.isValid() && hiliteOpacity>0) { QColor color = hiliteColor; color.setAlpha(hiliteOpacity*255/200); paint.fillRect(rect, color); } if (areaType == k.line) { QPen pen(foregroundColor, lineWidth); pen.setJoinStyle(Qt::MiterJoin); paint.setPen(pen); paint.setBrush(foregroundColor); QPoint pFrom = m.mapped(areaPoints[0]) - offset; QPoint pTo = m.mapped(areaPoints[1]) - offset; if (lineArrow) { QPointF v = pFrom - pTo; qreal vn = sqrt(v.x() * v.x() + v.y() * v.y()); v = v * qMin(0.25, (10.0 / vn)); QPointF v90 = QPointF(-v.y()/2.0, v.x()/2.0); QPointF p[3]; p[0] = pTo; p[1] = pTo + v - v90; p[2] = pTo + v + v90; paint.drawPolygon(p, 3); paint.drawLine(pFrom, pTo+ v * 0.5); } else { paint.drawLine(pFrom, pTo); } } else if (areaType == k.text) { int bw = borderWidth + 2; bw = qMin(bw, qMin(rect.width()/4, rect.height()/4)); QRect r = rect.adjusted(bw, bw, -bw, -bw); QString s = miniexp_to_qstring(comment); paint.setPen(foregroundColor); int flags = Qt::AlignCenter|Qt::AlignVCenter|Qt::TextWordWrap; QFont font = paint.font(); // estimate font size int size = (int)(z * 0.12); while (size > 1) { QRect br; font.setPixelSize(size); paint.setFont(font); paint.drawText(r,flags|Qt::TextDontPrint,s,&br); if (r.contains(br)) { // found good font size paint.drawText(r,flags,s,0); break; } size -= 1; } } else if (areaType == k.pushpin) { QPixmap pixmap; pixmap.load(":/images/text_pushpin.png"); if (! pixmap.isNull()) { QRect r = pixmap.rect().translated(rect.topLeft()); if (r.width() > rect.width()) { r.setHeight(r.height() * rect.width() / r.width()); r.setWidth(rect.width()); } if (r.height() > rect.height()) { r.setWidth(r.width() * rect.height() / r.height()); r.setHeight(rect.height()); } paint.drawPixmap(r, pixmap); } } } if (! hasTransient()) paintBorder(w, m, offset); } void MapArea::paintTransient(QPaintDevice *w, QRectMapper &m, QPoint offset) { if (hasTransient()) paintBorder(w, m, offset); } void QDjVuPrivate::prepareMapAreas(Page *p) { // remove annotation mapareas. int j = p->mapAreas.size(); while (--j >= 0) if (p->mapAreas[j].expr) p->mapAreas.removeAt(j); // parse annotations. if (p->annotations && p->annotations != miniexp_dummy) { miniexp_t *annos; annos = ddjvu_anno_get_hyperlinks(p->annotations); if (annos) { for (int i=0; annos[i]; i++) { MapArea data; miniexp_t anno = annos[i]; if (data.parse(anno, p->pageno)) { data.clicked(); // collapse pushpins p->mapAreas << data; } } free(annos); } } } bool QDjVuPrivate::mustDisplayMapArea(MapArea *area) { if (allLinksDisplayed) return true; if (area != currentMapArea) return false; if (hyperlinkEnabled && mouseEnabled) return true; return false; } void QDjVuPrivate::checkCurrentMapArea(bool forceno) { const Position &pos = cursorPos; Page *savedMapAreaPage = currentMapAreaPage; MapArea *savedMapArea = currentMapArea; Page *newMapAreaPage = 0; MapArea *newMapArea = 0; // locate new maparea if (displayMapAreas && !forceno && pos.inPage) if (pageMap.contains(pos.pageNo)) { Page *p = pageMap[pos.pageNo]; for (int i=0; imapAreas.size(); i++) { MapArea &area = p->mapAreas[i]; area.maybeRotate(p); if (area.expr && area.areaRect.contains(pos.posPage) && area.contains(pos.posPage) ) { newMapArea = &area; newMapAreaPage = p; break; } } } // change map area if (savedMapArea != newMapArea) { currentMapArea = 0; currentMapAreaPage = 0; if (savedMapArea) { if (savedMapArea->hasTransient()) if (currentLinkDisplayed && !allLinksDisplayed) savedMapArea->update(widget->viewport(), savedMapAreaPage->mapper, visibleRect.topLeft()); emit widget->pointerLeave(pos, savedMapArea->expr); } currentUrl = QString(); currentTarget = QString(); currentComment = QString(); currentLinkDisplayed = false; if (newMapArea) { currentMapArea = newMapArea; currentMapAreaPage = newMapAreaPage; currentUrl = miniexp_to_qstring(currentMapArea->url); currentTarget = miniexp_to_qstring(currentMapArea->target); currentComment = miniexp_to_qstring(currentMapArea->comment); if (mustDisplayMapArea(newMapArea)) newMapArea->update(widget->viewport(), newMapAreaPage->mapper, visibleRect.topLeft()); emit widget->pointerEnter(pos, currentMapArea->expr); } widget->modifierEvent(modifiers, buttons, cursorPoint); widget->chooseTooltip(); } } void QDjVuPrivate::showTransientMapAreas(bool b) { b = b && displayMapAreas && hyperlinkEnabled && mouseEnabled; if (b != allLinksDisplayed) { Page *p; allLinksDisplayed = b; foreach (p, pageVisible) for (int i=0; imapAreas.size(); i++) { MapArea &area = p->mapAreas[i]; area.maybeRotate(p); if (area.hasTransient()) area.update(widget->viewport(), p->mapper, visibleRect.topLeft() ); } } } /*! Removes all highlight rectangles installed for page \a pageno. */ void QDjVuWidget::clearHighlights(int pageno) { if (pageno>=0 && pagenopageData.size()) { Page *p = &priv->pageData[pageno]; int j = p->mapAreas.size(); while (--j >= 0) if (! p->mapAreas[j].expr) { MapArea &area = p->mapAreas[j]; if (priv->pageMap.contains(pageno) && p->dpi>0) area.update(viewport(), p->mapper, priv->visibleRect.topLeft()); priv->pixelCache.clear(); p->mapAreas.removeAt(j); } } } /*! Add a new highlight rectangle with color \a color, at position \a x, \a y, \a w, \a h on page \a pageno. Argument \a rc indicates whether coordinates are rotated (like annotations) or unrotated (like text). */ void QDjVuWidget::addHighlight(int pageno, int x, int y, int w, int h, QColor color, bool rc) { if (pageno>=0 && pagenopageData.size() && w>0 && h>0) { Page *p = &priv->pageData[pageno]; Keywords &k = *keywords(); MapArea area; area.areaType = k.rect; area.areaRect = QRect(x,y,w,h); area.hiliteColor = color; area.hiliteColor.setAlpha(255); area.hiliteOpacity = color.alpha() * 200 / 255; area.borderType = miniexp_nil; area.rectNeedsRotation = rc; area.maybeRotate(p); p->mapAreas << area; priv->pixelCache.clear(); if (priv->pageMap.contains(pageno) && p->dpi>0) area.update(viewport(), p->mapper, priv->visibleRect.topLeft()); } } /*! Returns the url string for the maparea located below the pointer. This function is valid when called from signal \a pointerEnter, \a pointerLeave, or \a pointerClick. */ QString QDjVuWidget::linkUrl(void) { if (priv->hyperlinkEnabled && priv->mouseEnabled) return priv->currentUrl; return QString(); } /*! Returns the target string for the maparea located below the pointer. This function is valid when called from signal \a pointerEnter, \a pointerLeave, or \a pointerClick. */ QString QDjVuWidget::linkTarget(void) { if (priv->hyperlinkEnabled && priv->mouseEnabled) return priv->currentTarget; return QString(); } /*! Returns the comment string for the maparea located below the pointer. This function is valid when called from signal \a pointerEnter, \a pointerLeave, or \a pointerClick. */ QString QDjVuWidget::linkComment(void) { return priv->currentComment; } /*! Determine the text around a particular point. Produces an array of three string. The middle string is the selected information. All the strings represent the line. Returns true on success. */ bool QDjVuWidget::getTextForPointer(QString results[]) { Position &pos = priv->cursorPos; if (!pos.inPage || !priv->pageMap.contains(pos.pageNo)) return false; Page *page = priv->pageMap[pos.pageNo]; // map point int rot = page->initialRot; int w = (rot&1) ? page->height : page->width; int h = (rot&1) ? page->width : page->height; QRectMapper mapper; mapper.setMap(QRect(0,0,w,h), page->rect); mapper.setTransform(rot + priv->rotation, false, true); QPoint posRot = mapper.unMapped(pos.posView + page->rect.topLeft()); // search zones Keywords &k = *keywords(); miniexp_t q = page->hiddenText; miniexp_t l = page->hiddenText; while(miniexp_consp(q)) { QRect rect; miniexp_t type = miniexp_car(q); miniexp_t r = miniexp_cdr(type); if (miniexp_consp(type)) type = miniexp_car(type); if (miniexp_consp(r) && miniexp_get_rect_from_points(r, rect) && rect.adjusted(-2,-2,2,2).contains(posRot) ) break; q = miniexp_cdr(q); int sep = 0; for (sep=0; sep<7; sep++) if (type == k.h[sep]) break; if (sep <= 4) l = q; } if (miniexp_consp(q)) { int state = 0; bool separator = false; results[0] = results[1] = results[2] = QString(); while (miniexp_consp(l)) { miniexp_t type = miniexp_car(l); miniexp_t s = miniexp_nth(5, type); bool is = miniexp_stringp(s); if (miniexp_consp(type)) type = miniexp_car(type); if (state == 1) state = 2; if (is && separator) results[state] += " "; if (l == q) state = 1; l = miniexp_cdr(l); if (miniexp_stringp(s)) results[state] += miniexp_to_qstring(s); int sep = 0; for (sep=0; sep<7; sep++) if (type == k.h[sep]) break; if (sep <= 5) separator = true; else if (is) separator = false; if (sep <= 4 && state >= 1) break; } return true; } return false; } /*! Returns the text spanned with a particular rectangle \a target in viewport coordinates. Returns the empty string if no text is available. */ QString QDjVuWidget::getTextForRect(const QRect &vtarget) { QRect target = vtarget; target.translate(priv->visibleRect.topLeft()); Keywords &k = *keywords(); int separator = 6; QString ans; Page *p; foreach(p, priv->pageVisible) { // quick check miniexp_t q = p->hiddenText; if (p->initialRot < 0 || q == miniexp_nil || q == miniexp_dummy) continue; QRect pagerect = target.intersect(p->rect); if (!p->hiddenText || pagerect.isEmpty()) { separator = 0; continue; } // map rectangle int rot = p->initialRot; int w = (rot&1) ? p->height : p->width; int h = (rot&1) ? p->width : p->height; QRectMapper mapper; mapper.setMap(QRect(0,0,w,h), p->rect); mapper.setTransform(rot + priv->rotation, false, true); pagerect = mapper.unMapped(pagerect); // loop while (miniexp_consp(q)) { miniexp_t r = miniexp_car(q); q = miniexp_cdr(q); miniexp_t type = r; if (miniexp_consp(r)) { QRect rect; type = miniexp_car(r); r = miniexp_cdr(r); if (miniexp_symbolp(type) && miniexp_get_rect_from_points(r, rect) && pagerect.intersects(rect) ) { if (!ans.isEmpty()) { if (separator == 0) ans += "\n\f"; else if (separator <= 4) ans += "\n"; else if (separator <= 5) ans += " "; } separator = 6; ans += miniexp_to_qstring(miniexp_car(r)); } } for (int s=separator-1; s>=0; s--) if (type == k.h[s]) separator = s; } } return ans; } /*! Returns the image corresponding to a particular rectangle \a rect in viewport coordinates. Image is painted using the current display mode. */ QImage QDjVuWidget::getImageForRect(const QRect &rect) { priv->changeSelectedRectangle(QRect()); QImage img(rect.width(), rect.height(), QImage::Format_RGB32); QRegion region = rect; QPainter paint; paint.begin(&img); paint.translate(- rect.topLeft()); priv->paintAll(paint, region); paint.end(); return img; } /*! Returns a page coordinate rectangle describing the part of page \a pageNo that is covered by rectangle \a rect. */ QRect QDjVuWidget::getSegmentForRect(const QRect &rect, int pageNo) { QRect ans; if (priv->pageMap.contains(pageNo)) { Page *p = priv->pageMap[pageNo]; const QRect &v = priv->visibleRect; QRect d = rect.translated(v.topLeft()).intersected(p->rect); if (p->dpi && !d.isEmpty()) ans = p->mapper.unMapped(d.intersected(p->rect)); } return ans; } /*! Indicate whether the page size if known */ bool QDjVuWidget::pageSizeKnown(int pageno) const { if (pageno >= 0 && pageno < priv->pageData.size()) return (priv->pageData[pageno].dpi > 0); return false; } // ---------------------------------------- // SETTINGS FROM ANNOTATIONS /*! \enum QDjVuWidget::Priority Levels for prioritized properties. Certain properties can be set at various priority levels for defining the default values, annotation options, cgi options, and user specified values. Priority levels matter when one changes the current document or the current page: new property values might be unmasked when the annotation or cgi level values are unset. The prioritized properties are: \a borderSize, \a zoom, \a borderBrush, \a displayMode, \a horizAlign, \a vertAlign. */ /*! The property setting function always set the prioritized properties at priority level \a PRIORITY_USER. This function downgrades all options set with a priority higher than \a priority to priority level \a priority. */ void QDjVuWidget::reduceOptionsToPriority(Priority priority) { priv->qBorderSize.reduce(priority); priv->qZoom.reduce(priority); priv->qBorderBrush.reduce(priority); priv->qDisplay.reduce(priority); priv->qHAlign.reduce(priority); priv->qVAlign.reduce(priority); // Apply changes priv->changeZoom(); priv->changeHAlign(); priv->changeVAlign(); priv->changeDisplay(); priv->changeBorderSize(); priv->changeBorderBrush(); } void QDjVuPrivate::adjustSettings(Priority priority, miniexp_t annotations) { // Reset everything qZoom.unset(priority); qBorderBrush.unset(priority); qDisplay.unset(priority); qHAlign.unset(priority); qVAlign.unset(priority); qBorderSize.unset(priority); // Analyse annotations if (annotations && annotations != miniexp_dummy) { const char *xbgcolor = ddjvu_anno_get_bgcolor(annotations); const char *xzoom = ddjvu_anno_get_zoom(annotations); const char *xmode = ddjvu_anno_get_mode(annotations); const char *xhorizalign = ddjvu_anno_get_horizalign(annotations); const char *xvertalign = ddjvu_anno_get_vertalign(annotations); // border color if (xbgcolor && xbgcolor[0]=='#') { QColor color(xbgcolor); qBorderBrush.set(priority, QBrush(color)); } // zoom if (xzoom == QLatin1String("stretch")) qZoom.set(priority, ZOOM_STRETCH); else if (xzoom == QLatin1String("one2one")) qZoom.set(priority, ZOOM_ONE2ONE); else if (xzoom == QLatin1String("width")) qZoom.set(priority, ZOOM_FITWIDTH); else if (xzoom == QLatin1String("page")) qZoom.set(priority, ZOOM_FITPAGE); else if (xzoom && xzoom[0]=='d' && all_numbers(xzoom+1)) { int zoom = strtol(xzoom+1,0,10); qZoom.set(priority, qBound((int)ZOOM_MIN, zoom, (int)ZOOM_MAX)); } // display mode if (xmode == QLatin1String("color")) qDisplay.set(priority, DISPLAY_COLOR); else if (xmode == QLatin1String("bw") || xmode == QLatin1String("black")) qDisplay.set(priority, DISPLAY_STENCIL); else if (xmode == QLatin1String("fore") || xmode == QLatin1String("fg")) qDisplay.set(priority, DISPLAY_FG); else if (xmode == QLatin1String("back") || xmode == QLatin1String("bg")) qDisplay.set(priority, DISPLAY_BG); // horiz align if (xhorizalign == QLatin1String("left")) qHAlign.set(priority, ALIGN_LEFT); else if (xhorizalign == QLatin1String("center")) qHAlign.set(priority, ALIGN_CENTER); else if (xhorizalign == QLatin1String("right")) qHAlign.set(priority, ALIGN_RIGHT); // vert align if (xvertalign == QLatin1String("top")) qVAlign.set(priority, ALIGN_TOP); else if (xvertalign == QLatin1String("center")) qVAlign.set(priority, ALIGN_CENTER); else if (xvertalign == QLatin1String("bottom")) qVAlign.set(priority, ALIGN_BOTTOM); // border size if (xbgcolor || xzoom || xhorizalign || xvertalign) qBorderSize.set(priority, 0); } // Apply changes changeZoom(); changeHAlign(); changeVAlign(); changeDisplay(); changeBorderSize(); changeBorderBrush(); } // ---------------------------------------- // PAINTING void QDjVuPrivate::trimPixelCache() { int pos; int pixels = 0; int sz = pixelCache.size(); for (pos = 0; pos < sz; pos++) { Cache &p = pixelCache[pos]; pixels += p.rect.width() * p.rect.height(); if (pixels > pixelCacheSize) break; } pos = qMin(pos, 256); // hard limit! while (sz-- > pos) pixelCache.removeLast(); } void QDjVuPrivate::addToPixelCache(const QRect &rect, QImage image) { if (qMin(rect.width(), rect.height()) < 128) { Cache c; c.rect = rect; c.image = image; pixelCache.prepend(c); trimPixelCache(); } } bool QDjVuPrivate::paintHiddenText(QImage &img, Page *p, const QRect &drect, const QRect *prect) { // do not paint anything unless display is display text bool okay = false; if (display != DISPLAY_TEXT) return okay; miniexp_t q = p->hiddenText; if (p->initialRot < 0 || q == miniexp_nil || q == miniexp_dummy) return okay; if (! prect) prect = &p->rect; // setup mapper int rot = p->initialRot; int w = (rot&1) ? p->height : p->width; int h = (rot&1) ? p->width : p->height; QRectMapper mapper; mapper.setMap(QRect(0,0,w,h), *prect); mapper.setTransform(rot + rotation, false, true); // setup painter QPainter paint(&img); paint.setRenderHint(QPainter::TextAntialiasing); QColor qblue = Qt::blue; QColor qwhite = Qt::white; qwhite.setAlpha(192); // loop over text int orientation = (4 - rot - rotation) & 3; while (miniexp_consp(q)) { miniexp_t r = miniexp_car(q); q = miniexp_cdr(q); if (miniexp_consp(r)) { QRect rect; miniexp_t s = miniexp_nth(5, r); miniexp_t g = miniexp_cdr(r); if (miniexp_symbolp(miniexp_car(r)) && miniexp_stringp(s) && miniexp_get_rect_from_points(g, rect) ) { rect = mapper.mapped(rect); // heuristically choose orientation int w = rect.width(); int h = rect.height(); QString text = miniexp_to_qstring(s).trimmed(); if (text.size() >= 2) if (((orientation & 1) && (w > 2*h)) || (!(orientation & 1) && (h > 2*w)) ) orientation ^= 1; if (!drect.intersects(rect)) continue; // paint frame okay = true; rect.translate(-drect.topLeft()); paint.setPen(QPen(qblue, 1)); paint.setBrush(qwhite); paint.drawRect(rect.adjusted(0,0,-1,-1)); if (w < 6 || h < 6) continue; // paint text paint.save(); paint.setClipRect(rect); rect = rect.adjusted(2,2,-2,-2); paint.translate(rect.topLeft()); paint.setPen(Qt::black); paint.setBrush(Qt::NoBrush); QFont font = paint.font(); font.setPixelSize(128); QFontMetrics metrics(font); #if QT_VERSION >= 0x40300 && ! defined(Q_WS_WIN) QRect brect = metrics.tightBoundingRect(text); #else QRect brect = metrics.boundingRect(text); #endif double dw = rect.width(); double dh = rect.height(); double bw = brect.width(); double bh = brect.height(); if (dw > 1 && dh > 1 && bw > 1 && bh > 1) { switch(orientation) { case 2: paint.translate(dw, dh); paint.rotate(180); default: paint.scale(dw/bw, dh/bh); break; case 3: paint.translate(dw, dh); paint.rotate(180); case 1: paint.translate(dw, 0); paint.rotate(90); paint.scale(dh/bw, dw/bh); break; } paint.setFont(font); paint.drawText(-brect.topLeft(), text); } paint.restore(); } } } return okay; } bool QDjVuPrivate::paintMapAreas(QImage &img, Page *p, const QRect &r, bool perm, const QRect *prect) { // do not paint anything when disabled if (! displayMapAreas) return false; // setup mapper QRectMapper mapper; QRectMapper *pmapper = &p->mapper; if (! prect) prect = &p->rect; else { mapper.setMap(QRect(0,0,p->width,p->height), *prect); mapper.setTransform(rotation, false, true); pmapper = &mapper; } // warning: rect in desk coordinates. bool changed = false; for (int i=0; imapAreas.size(); i++) { MapArea &area = p->mapAreas[i]; QRect arect = pmapper->mapped(area.areaRect); if (r.intersects(arect.adjusted(-16,-16,16,16))) { if (perm) { double z = (prect->width() * p->dpi * 100.0) / (p->width * sdpi); area.paintPermanent(&img, *pmapper, r.topLeft(), z); changed = true; } else if (mustDisplayMapArea(&area) && area.hasTransient()) { img.detach(); area.paintTransient(&img, *pmapper, r.topLeft()); changed = true; } } } return changed; } bool QDjVuPrivate::paintPage(QPainter &paint, Page *p, const QRegion ®ion) { // check if (region.isEmpty()) return true; if (p->dpi<=0 || p->page==0) return false; // caching QList cachelist; QRegion remainder = region; QPoint deskToView = - visibleRect.topLeft(); for (int i=0; iviewRect); // prune cache list QRegion shown = cover; for (int i=cachelist.size()-1; i>=0; i--) { QRect r = cachelist[i]->rect.translated(deskToView); r = region.intersect(r).boundingRect(); if (shown.intersect(r) == r) cachelist.removeAt(i); shown += r; } // process cached segments QRegion displayed; for (int i=0; iimage; QRect r = cache->rect; #if QDJVUWIDGET_PIXMAP_CACHE if (cache->pixmap.isNull()) cache->pixmap = QPixmap::fromImage(img, Qt::ThresholdDither); bool hastransient = paintMapAreas(img, p, r, false); #else paintMapAreas(img, p, r, false); #endif r.translate(deskToView); QRegion dr = region.intersect(r) - displayed; if (dr.isEmpty()) continue; QRect d = dr.boundingRect(); displayed += d; QRect s = d.translated(-r.topLeft()); #if QDJVUWIDGET_PIXMAP_CACHE if (hastransient) paint.drawImage(d.topLeft(), img, s, Qt::ThresholdDither); else paint.drawPixmap(d.topLeft(), cachelist[i]->pixmap, s); #else paint.drawImage(d.topLeft(), img, s, Qt::ThresholdDither); #endif } // mode for new segments ddjvu_render_mode_t mode = DDJVU_RENDER_COLOR; if (display == DISPLAY_STENCIL) mode = DDJVU_RENDER_BLACK; else if (display == DISPLAY_BG) mode = DDJVU_RENDER_BACKGROUND; else if (display == DISPLAY_FG) mode = DDJVU_RENDER_FOREGROUND; // render new segments QVector rects = cover.rects(); for (int i=0; ipage; qrect_to_rect(r, rr); qrect_to_rect(p->rect, pr); #if DDJVUAPI_VERSION < 18 p->initialRot = ddjvu_page_get_initial_rotation(*dp); #endif rot = p->initialRot + rotation; ddjvu_page_set_rotation(*dp, (ddjvu_page_rotation_t)(rot & 0x3)); if (! ddjvu_page_render(*dp, mode, &pr, &rr, renderFormat, img.bytesPerLine(), (char*)img.bits() )) return false; paintHiddenText(img, p, r); if (invertLuminance) invert_luminance(img); paintMapAreas(img, p, r, true); addToPixelCache(r, img); paintMapAreas(img, p, r, false); r.translate(deskToView); QRegion dr = region.intersect(r) - displayed; if (dr.isEmpty()) continue; QRect d = dr.boundingRect(); displayed += d; QRect s = d.translated(-r.topLeft()); paint.drawImage(d.topLeft(), img, s, Qt::ThresholdDither); } return true; } void QDjVuPrivate::paintAll(QPainter &paint, const QRegion &paintRegion) { // Document not ready yet if (pageVisible.isEmpty()) { bool waiting = (docReady || !docFailed) && !docStopped; QRect rect(QPoint(borderSize,borderSize), unknownSize); widget->paintEmpty(paint, rect, waiting, docStopped, docFailed); widget->paintDesk(paint, paintRegion-rect); widget->paintFrame(paint, rect, shadowSize); return; } // Document ready. Page *p; QRect viewportRect = widget->viewport()->rect(); foreach(p, pageVisible) { // Paint page QRegion region = paintRegion & viewportRect & p->viewRect; if (! paintPage(paint, p, region)) { // Cannot paint page yet ddjvu_status_t s = DDJVU_JOB_FAILED; if (pageRequestTimer->isActive()) s = DDJVU_JOB_STARTED; if (p->page) s = ddjvu_page_decoding_status(*(p->page)); widget->paintEmpty(paint, p->viewRect, s==DDJVU_JOB_STARTED, s==DDJVU_JOB_STOPPED, s==DDJVU_JOB_FAILED); } // Paint frames to reduce flashing. if (frame) widget->paintFrame(paint, p->viewRect, shadowSize); } // Paint desk QRegion deskRegion = paintRegion; foreach(p, pageVisible) deskRegion -= p->viewRect; widget->paintDesk(paint, deskRegion); // Paint frames again if (frame) foreach(p, pageLayout) { QRect rect = p->rect.adjusted(0,0,shadowSize,shadowSize); if (visibleRect.intersects(rect)) widget->paintFrame(paint, p->viewRect, shadowSize); } // Paint selected rectangle if (! selectedRect.isEmpty()) { paint.setBrush(QColor(128,128,192,64)); paint.setPen(QPen(QColor(64,64,96,255), 1)); paint.drawRect(selectedRect.adjusted(0,0,-1,-1)); } } /*! \internal */ void QDjVuWidget::paintEvent(QPaintEvent *event) { // mark maparea if (priv->currentMapArea) { MapArea *a = priv->currentMapArea; priv->currentLinkDisplayed = priv->mustDisplayMapArea(a); } // paint everything QPainter paint(viewport()); QRegion region = event->region(); priv->paintAll(paint, region); // debugging code #ifdef DEBUG_SHOW_PAINTED_AREAS QColor color(rand()%256,rand()%256,rand()%256); color.setAlpha(128); paint.setClipRegion(region); paint.fillRect(region.boundingRect(), color); #endif } // ---------------------------------------- // USER INTERFACE /*! Overridden \a QAbstractScrollArea virtual function. */ void QDjVuWidget::scrollContentsBy(int, int) { if (! priv->changingSBars) { QScrollBar *hBar = horizontalScrollBar(); QScrollBar *vBar = verticalScrollBar(); QPoint p = priv->visibleRect.topLeft(); if (hBar->maximum() > hBar->minimum()) p.rx() = hBar->sliderPosition(); if (vBar->maximum() > vBar->minimum()) p.ry() = vBar->sliderPosition(); QPoint np = p - priv->visibleRect.topLeft(); priv->movePoint = priv->currentPoint; priv->movePos = priv->findPosition(np + priv->movePoint); priv->changeLayout(CHANGE_VIEW); priv->clearAnimation(); } } /*! Overridden \a QAbstractScrollArea virtual function. */ bool QDjVuWidget::viewportEvent(QEvent *event) { switch (event->type()) { case QEvent::Enter: // Install filter to capture modifiers QApplication::instance()->installEventFilter(priv); break; case QEvent::Leave: // Remove filter to capture modifiers QApplication::instance()->removeEventFilter(priv); // Uncheck any active map area priv->checkCurrentMapArea(true); break; default: break; } // The default function calls the following // QAbstractScrollArea handlers: // - resizeEvent, paintEvent // - mouse{Press,Release,Move}Event // - contextMenuEvent return QAbstractScrollArea::viewportEvent(event); } /*! Overridden \a QAbstractScrollArea virtual function. */ void QDjVuWidget::resizeEvent(QResizeEvent *event) { QAbstractScrollArea::resizeEvent(event); int change = CHANGE_VISIBLE|CHANGE_SCROLLBARS; if (priv->zoom == ZOOM_FITWIDTH || priv->zoom == ZOOM_FITPAGE || priv->zoom == ZOOM_STRETCH ) change |= CHANGE_SCALE; priv->changeLayout(change); // Update layout immediately because Qt40 gets confused // by asynchronous mixes of scrolls and resizes. // Also note that WA_StaticContents is set. priv->makeLayout(); } /* capture modifier changes */ bool QDjVuPrivate::eventFilter(QObject *, QEvent *event) { QEvent::Type type = event->type(); switch (type) { default: return false; case QEvent::KeyPress: case QEvent::KeyRelease: Qt::KeyboardModifiers change = Qt::NoModifier; QKeyEvent *kevent = (QKeyEvent*)event; switch (kevent->key()) { case Qt::Key_Shift: change = Qt::ShiftModifier; break; case Qt::Key_Control: change = Qt::ControlModifier; break; case Qt::Key_Alt: change = Qt::AltModifier; break; case Qt::Key_Meta: change = Qt::MetaModifier; break; default: return false; } if (type == QEvent::KeyPress) updateModifiers(modifiers | change, buttons); else updateModifiers(modifiers & ~change, buttons); } return false; } void QDjVuPrivate::updateModifiers(Qt::KeyboardModifiers newModifiers, Qt::MouseButtons newButtons) { Qt::KeyboardModifiers oldModifiers = modifiers; Qt::MouseButtons oldButtons = buttons; modifiers = newModifiers; buttons = newButtons; if (modifiers != oldModifiers) showTransientMapAreas(modifiers == modifiersForLinks && modifiers != Qt::NoModifier ); if (modifiers != oldModifiers || buttons != oldButtons ) widget->modifierEvent(modifiers, buttons, cursorPoint); } void QDjVuPrivate::changeSelectedRectangle(const QRect& rect) { QRect normRect = rect.normalized(); QRect newRect; if (normRect.width() >= 2 && normRect.height() >= 2) newRect = normRect; QRect oldRect = selectedRect; selectedRect = newRect; if (oldRect.isEmpty()) widget->viewport()->update(newRect.adjusted(-2,-2,2,2)); else if (newRect.isEmpty()) widget->viewport()->update(oldRect.adjusted(-2,-2,2,2)); else { QRegion region = QRegion(newRect) ^ QRegion(oldRect); QVector rects = region.rects(); QRegion dilated; for(int i=0; iviewport()->update(dilated); } } /*! This function should be called from \a modifierEvent. It sets the specified cursor, initiates the interactively selection of a rectangular area, and returns immediately. The interactive selection stops when all mouse buttons and modifiers are released. */ bool QDjVuWidget::startSelecting(const QPoint &point) { priv->updatePosition(point, true); if (priv->dragMode == DRAG_NONE) { priv->dragStart = point; priv->dragMode = DRAG_SELECTING; return true; } return false; } /*! This function should be called from \a modifierEvent. It initiates panning the display area, and returns immediately. Panning stops when all mouse buttons and modifiers are released. */ bool QDjVuWidget::startPanning(const QPoint &point) { priv->updatePosition(point, true); if (priv->dragMode == DRAG_NONE) { priv->dragStart = point; priv->dragMode = DRAG_PANNING; return true; } return false; } /*! This function should be called from \a modifierEvent. It initiates selecting the current hyperlink and returns immediately. Interaction stops when all mouse buttons and modifiers are released. Interaction changes to panning of the mouse moves more than 8 pixels. */ bool QDjVuWidget::startLinking(const QPoint &point) { priv->updatePosition(point, true); if (priv->dragMode == DRAG_NONE) { priv->dragStart = point; priv->dragMode = DRAG_LINKING; return true; } return false; } /*! This function should be called from \a modifierEvent. It initiates user interaction with the magnification lens and returns immediately. Lensing stops when all mouse buttons and modifiers are released. */ bool QDjVuWidget::startLensing(const QPoint &point) { if (priv->dragMode == DRAG_NONE && priv->lensMag>0 && priv->lensSize>0 ) { priv->dragStart = point; priv->dragMode = DRAG_LENSING; priv->lens = new QDjVuLens(priv->lensSize, priv->lensMag, priv, this); QRect r = priv->lens->geometry(); QPoint p = viewport()->mapToGlobal(point); r.translate(p - r.center()); priv->lens->setGeometry(r); priv->lens->show(); return true; } return false; } /*! Terminates user interaction initiated by \a startSelecting, \a startPanning ot \a startLensing. Returns \a true if such interaction was ongoing, \a false otherwise. */ bool QDjVuWidget::stopInteraction(void) { QRect temp; switch (priv->dragMode) { case DRAG_LINKING: priv->updatePosition(priv->cursorPoint, true); if (priv->currentMapArea && priv->currentMapArea->clicked()) { priv->pixelCache.clear(); priv->currentMapArea->update(priv->widget->viewport(), priv->currentMapAreaPage->mapper, priv->visibleRect.topLeft()); } else if (priv->currentMapArea && priv->currentMapArea->url && priv->hyperlinkEnabled ) emit pointerClick(priv->cursorPos, priv->currentMapArea->expr); break; case DRAG_SELECTING: priv->updatePosition(priv->cursorPoint, true); temp = priv->selectedRect; emit pointerSelect(viewport()->mapToGlobal(priv->cursorPoint), temp); priv->changeSelectedRectangle(QRect()); break; case DRAG_LENSING: priv->lens->hide(); priv->lens->deleteLater(); priv->lens = 0; break; case DRAG_PANNING: priv->updatePosition(priv->cursorPoint, true); break; default: return false; } priv->dragMode = DRAG_NONE; return true; } /*! This function is called when the set of depressed modifiers and mouse button changes while the cursor is at position \a point in the viewport. It is also called when the pointer crosses hyperlink boundaries or when the gui interaction settings change. */ void QDjVuWidget::modifierEvent(Qt::KeyboardModifiers modifiers, Qt::MouseButtons buttons, QPoint point) { if (priv->dragMode != DRAG_NONE && modifiers == Qt::NoModifier && buttons == Qt::NoButton) { stopInteraction(); } if (priv->dragMode == DRAG_NONE) { if (! priv->mouseEnabled) { viewport()->setCursor(Qt::ArrowCursor); } else if (buttons & Qt::RightButton) { return; // Wait for the contextMenuEvent } else if (modifiers == Qt::NoModifier && buttons == Qt::MidButton ) { viewport()->setCursor(Qt::CrossCursor); startSelecting(point); } else if (modifiers == Qt::ControlModifier && buttons == Qt::MidButton ) { viewport()->setCursor(priv->cursHandClosed); startPanning(point); } else if (modifiers == priv->modifiersForLens && modifiers != Qt::NoModifier ) { viewport()->setCursor(Qt::CrossCursor); startLensing(point); } else if (modifiers == priv->modifiersForSelect) { viewport()->setCursor(Qt::CrossCursor); if (buttons != Qt::NoButton) startSelecting(point); } else if (priv->currentMapArea && priv->currentMapArea->isClickable(priv->hyperlinkEnabled) ) { viewport()->setCursor(Qt::ArrowCursor); if (buttons != Qt::NoButton) startLinking(point); } else if (buttons != Qt::NoButton) { viewport()->setCursor(priv->cursHandClosed); startPanning(point); } else { viewport()->setCursor(priv->cursHandOpen); } } } /*! Override \a QAbstractScrollArea virtual function. */ void QDjVuWidget::mousePressEvent(QMouseEvent *event) { mouseMoveEvent(event); } /*! Override \a QAbstractScrollArea virtual function. */ void QDjVuWidget::mouseDoubleClickEvent(QMouseEvent *event) { mouseMoveEvent(event); } /*! Override \a QAbstractScrollArea virtual function. */ void QDjVuWidget::mouseReleaseEvent(QMouseEvent *event) { mouseMoveEvent(event); } bool QDjVuPrivate::pointerScroll(const QPoint &p) { int dx = 0; int dy = 0; QRect r = widget->viewport()->rect(); if (p.x() >= r.right()) dx = lineStep; else if (p.x() < r.left()) dx = -lineStep; if (p.y() >= r.bottom()) dy = lineStep; else if (p.y() < r.top()) dy = -lineStep; if (dx == 0 && dy == 0) return false; movePos = cursorPos; movePoint = cursorPoint - QPoint(dx,dy); changeLayout(CHANGE_VIEW|CHANGE_SCROLLBARS); clearAnimation(); return true; } /*! Override \a QAbstractScrollArea virtual function. */ void QDjVuWidget::mouseMoveEvent(QMouseEvent *event) { event->accept(); QPoint p = event->pos(); priv->cursorPoint = p; priv->updateModifiers(event->modifiers(), event->buttons()); switch (priv->dragMode) { case DRAG_LINKING: priv->updatePosition(event->pos()); p = p - priv->dragStart; if (p.manhattanLength() <= 8) break; viewport()->setCursor(priv->cursHandClosed); priv->dragMode = DRAG_PANNING; // fall through case DRAG_PANNING: priv->movePoint = priv->cursorPoint; priv->movePos = priv->cursorPos; priv->changeLayout(CHANGE_VIEW|CHANGE_SCROLLBARS); priv->clearAnimation(); break; case DRAG_SELECTING: priv->updatePosition(p); priv->changeSelectedRectangle(QRect(priv->dragStart, event->pos())); priv->pointerScroll(p); break; case DRAG_LENSING: priv->updatePosition(p); if (! priv->pointerScroll(p)) priv->lens->recenter(event->pos()); break; default: priv->updatePosition(p); break; } } /*! Override \a QAbstractScrollArea virtual function. */ void QDjVuWidget::keyPressEvent(QKeyEvent *event) { if (priv->keyboardEnabled) { // Capturing this signal can override any key binding bool done = false; emit keyPressSignal(event, done); if (done) return; // Standard key bindings event->accept(); switch(event->key()) { case Qt::Key_1: setZoom(100); return; case Qt::Key_2: setZoom(200); return; case Qt::Key_3: setZoom(300); return; case Qt::Key_W: setZoom(ZOOM_FITWIDTH); return; case Qt::Key_P: setZoom(ZOOM_FITPAGE); return; case Qt::Key_BracketLeft: priv->updateCurrentPoint(priv->cursorPos); rotateLeft(); return; case Qt::Key_BracketRight: priv->updateCurrentPoint(priv->cursorPos); rotateRight(); return; case Qt::Key_Plus: case Qt::Key_Equal: priv->updateCurrentPoint(priv->cursorPos); zoomIn(); return; case Qt::Key_Minus: priv->updateCurrentPoint(priv->cursorPos); zoomOut(); return; case Qt::Key_Home: if (event->modifiers() == Qt::ControlModifier) firstPage(); else moveToPageTop(); return; case Qt::Key_End: if (event->modifiers()==Qt::ControlModifier) lastPage(); else moveToPageBottom(); return; case Qt::Key_PageUp: prevPage(); return; case Qt::Key_PageDown: nextPage(); return; case Qt::Key_Space: if (event->modifiers()==Qt::ShiftModifier) readPrev(); else readNext(); return; case Qt::Key_B: case Qt::Key_Backspace: if (event->modifiers()==Qt::ShiftModifier) readNext(); else readPrev(); return; case Qt::Key_Left: case Qt::Key_Right: case Qt::Key_Up: case Qt::Key_Down: { int svstep = verticalScrollBar()->singleStep(); int shstep = horizontalScrollBar()->singleStep(); verticalScrollBar()->setSingleStep(priv->lineStep); horizontalScrollBar()->setSingleStep(priv->lineStep); QAbstractScrollArea::keyPressEvent(event); verticalScrollBar()->setSingleStep(svstep); horizontalScrollBar()->setSingleStep(shstep); return; } default: event->ignore(); return; } } } /*! Override \a QAbstractScrollArea virtual function. */ void QDjVuWidget::contextMenuEvent (QContextMenuEvent *event) { if (priv->contextMenu) { priv->contextMenu->exec(event->globalPos()); event->accept(); } } /*! Override \a QAbstractScrollArea virtual function. */ void QDjVuWidget::wheelEvent (QWheelEvent *event) { if (priv->mouseEnabled) { bool zoom = priv->mouseWheelZoom; if (event->modifiers() == Qt::ControlModifier) zoom = ! zoom; if (zoom) { priv->updateCurrentPoint(priv->cursorPos); if (event->delta() > 0) zoomIn(); else zoomOut(); } else if (!priv->continuous && !verticalScrollBar()->isVisible()) { if (event->delta() > 0) prevPage(); else nextPage(); } else { QAbstractScrollArea::wheelEvent(event); } } } bool QDjVuPrivate::computeAnimation(const Position &pos, const QPoint &p) { // no animation unless layout is finalized. if (layoutChange) return false; if (0 > pos.pageNo || pos.pageNo >= numPages) return false; Position currentPos = findPosition(p); Position targetPos = pos; Page *currentPage = pageMap.value(currentPos.pageNo, 0); Page *targetPage = pageMap.value(targetPos.pageNo, 0); // Standardize target position if (targetPos.inPage && targetPage && targetPage->dpi > 0) { QPoint dp = targetPage->mapper.mapped(targetPos.posPage); targetPos.hAnchor = targetPos.vAnchor = 0; targetPos.posView = dp - targetPage->rect.topLeft(); targetPos.inPage = false; } if (targetPos.inPage) return false; // Both position on the same page if (currentPos.pageNo == targetPos.pageNo) { char dHAnchor = targetPos.hAnchor - currentPos.hAnchor; char dVAnchor = targetPos.vAnchor - currentPos.vAnchor; QPoint dPosView = targetPos.posView - currentPos.posView; const double profile[] = { 0.05, 0.3, 0.5, 0.7, 0.95 }; const int profileSize = (int)(sizeof(profile)/sizeof(double)); for (int i=0; istart(10); return true; } // Both position in the same view if (currentPage && targetPage) { // compute desk positions. QPointF cPoint = currentPage->rect.topLeft() + currentPos.posView; if (currentPos.hAnchor > 0 && currentPos.hAnchor <= 100) cPoint.rx() += currentPage->rect.width() * currentPos.hAnchor / 100.0; if (currentPos.vAnchor > 0 && currentPos.vAnchor <= 100) cPoint.ry() += currentPage->rect.height() * currentPos.vAnchor / 100.0; QPointF tPoint = targetPage->rect.topLeft() + targetPos.posView; if (targetPos.hAnchor > 0 && targetPos.hAnchor <= 100) tPoint.rx() += targetPage->rect.width() * targetPos.hAnchor / 100.0; if (targetPos.vAnchor > 0 && targetPos.vAnchor <= 100) tPoint.ry() += targetPage->rect.height() * targetPos.vAnchor / 100.0; // compute delta QPointF v = tPoint - cPoint; qreal cs = max_stay_in_rect(cPoint, currentPage->rect, v); qreal ts = max_stay_in_rect(tPoint, targetPage->rect, -v); const double profile[] = { 0.05, 0.3, 0.5, 0.75, 1 }; const int profileSize = (int)(sizeof(profile)/sizeof(double)); for (int i=0; irect.topLeft(); animationPosition << ipos; } for (int i=profileSize-1; i>=0; i--) { QPointF ipoint = tPoint - ts * profile[i] * v; Position ipos; ipos.pageNo = targetPos.pageNo; ipos.hAnchor = ipos.vAnchor = 0; ipos.inPage = ipos.doPage = false; ipos.posView = ipoint.toPoint() - targetPage->rect.topLeft(); animationPosition << ipos; } animationPoint = p; animationPosition << pos; animationTimer->start(10); return true; } // Too complex return false; } void QDjVuPrivate::clearAnimation(void) { animationTimer->stop(); animationPosition.clear(); } void QDjVuPrivate::animate(void) { if (! animationPosition.isEmpty()) { movePoint = animationPoint; movePos = animationPosition.takeFirst(); if (! pageMap.contains(movePos.pageNo)) changeLayout(CHANGE_VIEW|CHANGE_SCROLLBARS); else changeLayout(CHANGE_PAGES|CHANGE_VIEW|CHANGE_SCROLLBARS); } if (animationPosition.isEmpty()) animationTimer->stop(); } /*! Terminates all animations in progress and make sure the page layout is fully updated. */ void QDjVuWidget::terminateAnimation(void) { while (priv->animationPosition.size() > 1) priv->animationPosition.removeFirst(); priv->animate(); if (priv->layoutChange) priv->makeLayout(); } // ---------------------------------------- // VIRTUALS /*! Paint the gray area that surrounds the pages. Overload this function to redefine the appearance of this area. */ void QDjVuWidget::paintDesk(QPainter &p, const QRegion ®ion) { p.save(); p.setClipRegion(region, Qt::IntersectClip); p.setBrushOrigin(- priv->visibleRect.topLeft()); p.fillRect(region.boundingRect(), priv->borderBrush); p.restore(); } /*! Paint the frame and the shadow surrounding a page. Argument \a rect is the page rectangle. Overload this function to redefine the appearance of the page frame. */ void QDjVuWidget::paintFrame(QPainter &p, const QRect &crect, int sw) { QRect rect = crect.adjusted(0,0,-1,-1); if (!rect.isValid()) return; // draw shadow QBrush brush(QColor(0,0,0,80)); p.setPen(Qt::NoPen); p.setBrush(brush); p.drawRect(rect.right()+1, rect.top()+sw, sw, rect.height()); if (rect.width() > sw) p.drawRect(rect.left()+sw, rect.bottom()+1, rect.width()-sw, sw); // draw frame p.setBrush(Qt::NoBrush); QPen pen(Qt::black, 1, Qt::SolidLine, Qt::FlatCap, Qt::MiterJoin); p.setPen(pen); p.drawRect(rect); } /*! Paint the page area while waiting for page data or when the decoding job has failed or has been stopped. Argument \a rect is the page rectangle. Argument \a status indicates what is going on. Overload this function to redefine the transient appearance of such pages. */ void QDjVuWidget::paintEmpty(QPainter &p, const QRect &rect, bool waiting, bool stopped, bool error ) { QString name; QPixmap pixmap; if (waiting) name = ":/images/djvu_logo.png"; else if (stopped) name = ":/images/djvu_stop.png"; else if (error) name = ":/images/djvu_fail.png"; if (!name.isEmpty()) pixmap.load(name); // start painting QBrush brush(priv->white); p.fillRect(rect, brush); if (pixmap.isNull()) return; if (pixmap.width() > rect.width()) return; if (pixmap.height() > rect.height()) return; p.save(); p.setClipRect(rect, Qt::IntersectClip); QSize s = pixmap.size() * 5 / 4; QPoint c = rect.center(); int imin = (rect.left() - c.x())/s.width(); int imax = (rect.right() - c.x())/s.width(); int jmin = (rect.top() - c.y())/s.height(); int jmax = (rect.bottom() - c.y())/s.height(); c -= QPoint( pixmap.width()/2, pixmap.height()/2 ); for (int i=imin; i<=imax; i++) for (int j=jmin; j<=jmax; j++) if (! ((i + j) & 1)) p.drawPixmap(c.x()+i*s.width(), c.y()+j*s.height(), pixmap); p.restore(); } /*! This function displays the current hyperlink comment in a tooltip. It is called whenever the pointer crosses hyperlink boundaries. */ void QDjVuWidget::chooseTooltip(void) { QToolTip::showText(QPoint(), QString()); priv->toolTipTimer->stop(); if (!linkComment().isEmpty()) priv->toolTipTimer->start(250); } void QDjVuPrivate::makeToolTip(void) { QWidget *w = widget->viewport(); QPoint p = w->mapToGlobal(cursorPoint); QToolTip::showText(p, currentComment, w); } // ---------------------------------------- // QDJVULENS QDjVuLens::QDjVuLens(int size, int magx, QDjVuPrivate *priv, QDjVuWidget *widget) : QWidget(widget, Qt::Window|Qt::Popup), priv(priv), widget(widget) { mag = qBound(1,magx,10); size = qBound(50,size,500); setGeometry(0,0,size,size); setCursor(Qt::CrossCursor); setMouseTracking(true); connect(widget,SIGNAL(layoutChanged()), this, SLOT(redisplay())); QApplication::instance()->installEventFilter(this); } bool QDjVuLens::eventFilter(QObject *object, QEvent *event) { return priv->eventFilter(object, event); } bool QDjVuLens::event(QEvent *event) { switch (event->type()) { case QEvent::MouseButtonPress: case QEvent::MouseButtonDblClick: case QEvent::MouseButtonRelease: case QEvent::MouseMove: { QMouseEvent *oldEvent = (QMouseEvent*)event; QPoint pos = oldEvent->globalPos(); QMouseEvent newEvent(oldEvent->type(), widget->viewport()->mapFromGlobal(pos), pos, oldEvent->button(), oldEvent->buttons(), oldEvent->modifiers()); return widget->viewportEvent(&newEvent); } default: break; } return QWidget::event(event); } void QDjVuLens::recenter(const QPoint &p) { QPoint npos; QRect rect = geometry(); QPoint pos = rect.center(); QRect vrect = widget->viewport()->rect(); npos.rx() = qBound(vrect.left(), p.x(), vrect.right()); npos.ry() = qBound(vrect.top(), p.y(), vrect.bottom()); npos = widget->viewport()->mapToGlobal(npos); rect.translate(npos - pos); vrect.moveTo(widget->viewport()->mapToGlobal(vrect.topLeft())); setVisible(vrect.intersects(rect)); setGeometry(rect); QCoreApplication::flush(); } void QDjVuLens::refocus(void) { QRect r = rect(); QPoint p = mapToGlobal(rect().center()); int sx = ( r.width() + mag - 1 ) / mag; int sy = ( r.height() + mag - 1 ) / mag; lensRect.setRect(0,0,sx,sy); QPoint vp = widget->viewport()->mapFromGlobal(p); lensRect.translate(vp - lensRect.center()); } void QDjVuLens::moveEvent(QMoveEvent *event) { refocus(); QPoint delta = event->pos() - event->oldPos(); QRect r = rect().adjusted(1,1,-1,-1); #ifdef Q_WS_MAC repaint(r); // scroll broken ? #else scroll(-mag*delta.x(), -mag*delta.y(), r); #endif } void QDjVuLens::resizeEvent(QResizeEvent *) { refocus(); } void QDjVuLens::redisplay(void) { refocus(); update(); } void QDjVuLens::paintEvent(QPaintEvent *event) { qWarning("paintEvent"); // Copied from main painting code but simpler // TODO: maybe hyperlinks. QPainter paint(this); QRegion paintRegion = event->region(); QRegion deskRegion = paintRegion; QRectMapper mapper(lensRect, rect()); Page *p; ddjvu_render_mode_t mode = DDJVU_RENDER_COLOR; if (priv->display == DISPLAY_STENCIL) mode = DDJVU_RENDER_BLACK; else if (priv->display == DISPLAY_BG) mode = DDJVU_RENDER_BACKGROUND; else if (priv->display == DISPLAY_FG) mode = DDJVU_RENDER_FOREGROUND; foreach(p, priv->pageVisible) { QRect prect = mapper.mapped(p->viewRect); QRegion region = paintRegion & prect; if (region.isEmpty()) continue; paint.fillRect(prect, Qt::white); if (p->dpi>0 && p->page) { QRegion prgn = cover_region(region, prect); QVector rects = prgn.rects(); for (int i=0; ipage; QRect &r = rects[i]; qrect_to_rect(prect, pr); qrect_to_rect(r, rr); QImage img(r.width(), r.height(), QImage::Format_RGB32); rot = p->initialRot + priv->rotation; ddjvu_page_set_rotation(*dp,(ddjvu_page_rotation_t)(rot & 0x3)); if (ddjvu_page_render(*dp, mode, &pr, &rr, priv->renderFormat, img.bytesPerLine(), (char*)img.bits() )) { // priv->paintHiddenText(img, p, r, &prect); // When displaying in hidden text mode, // the above line paints the hidden text in the lens. // But the opposite behavior is more convenient // for proofreading. if (priv->invertLuminance) invert_luminance(img); priv->paintMapAreas(img, p, r, true, &prect); paint.drawImage(r.topLeft(), img, img.rect(), Qt::ThresholdDither); } } } deskRegion -= prect; } widget->paintDesk(paint, deskRegion); if (priv->frame) foreach(p, priv->pageVisible) { QRect prect = mapper.mapped(p->viewRect); widget->paintFrame(paint, prect, priv->shadowSize); } paint.setPen(Qt::gray); paint.setBrush(Qt::NoBrush); paint.drawRect(rect().adjusted(0,0,-1,-1)); } // ---------------------------------------- // MORE SLOTS static int preferredZoom[] = { ZOOM_MIN, ZOOM_MIN, 10, 25, 50, 75, 100, 150, 200, 300, 400, 600, 800, ZOOM_MAX, ZOOM_MAX }; /*! Increase the zoom factor. */ void QDjVuWidget::zoomIn(void) { int s = 1; int z = qBound((int)ZOOM_MIN, zoomFactor(), (int)ZOOM_MAX); while (z >= preferredZoom[s]) { s += 1; } setZoom(preferredZoom[s]); } /*! Decrease the zoom factor. */ void QDjVuWidget::zoomOut(void) { int s = 1; int z = qBound((int)ZOOM_MIN, zoomFactor(), (int)ZOOM_MAX); while (z > preferredZoom[s]) { s += 1; } setZoom(preferredZoom[s-1]); } /*! Maximize the maginification in order to keep rectangle \a rect visible. The rectangle is expressed in viewport coordinates. */ void QDjVuWidget::zoomRect(QRect rect) { rect = rect.normalized(); Position pos = priv->findPosition(rect.center()); pos.inPage = true; int z = zoomFactor(); int zw = z * viewport()->width() / qMax(1,rect.width()); int zh = z * viewport()->height() / qMax(1,rect.height()); z = qBound((int)ZOOM_MIN, qMin(zw, zh), (int)ZOOM_MAX); setZoom(z); setPosition(pos, viewport()->rect().center()); } /*! Rotate the page images clockwise. */ void QDjVuWidget::rotateRight(void) { setRotation((rotation() - 1) & 0x3); } /*! Rotate the page images counter-clockwise. */ void QDjVuWidget::rotateLeft(void) { setRotation((rotation() + 1) & 0x3); } /*! Set the display mode to \a DISPLAY_COLOR. */ void QDjVuWidget::displayModeColor(void) { setDisplayMode(DISPLAY_COLOR); } /*! Set the display mode to \a DISPLAY_STENCIL. */ void QDjVuWidget::displayModeStencil(void) { setDisplayMode(DISPLAY_STENCIL); } /*! Set the display mode to \a DISPLAY_BG. */ void QDjVuWidget::displayModeBackground(void) { setDisplayMode(DISPLAY_BG); } /*! Set the display mode to \a DISPLAY_FG. */ void QDjVuWidget::displayModeForeground(void) { setDisplayMode(DISPLAY_FG); } /*! Set the display mode to \a DISPLAY_TEXT. */ void QDjVuWidget::displayModeText(void) { setDisplayMode(DISPLAY_TEXT); } /*! Move to the next page. */ void QDjVuWidget::nextPage(void) { terminateAnimation(); int pageNo = page(); const QRect &dr = priv->deskRect; const QRect &vr = priv->visibleRect; const Page *pg = priv->pageMap.value(pageNo,0); while (pageNo < priv->numPages - 1) { pageNo += 1; if (priv->layoutChange || !priv->pageMap.contains(pageNo) || !pg) break; // Skip pages until we get a meaningful change. const QRect &pr = priv->pageMap[pageNo]->rect; if (! vr.contains(pr)) if (pr.top() != pg->rect.top() || vr.width() < dr.width()) break; } setPage(pageNo); } /*! Move to the previous page. */ void QDjVuWidget::prevPage(void) { terminateAnimation(); int pageNo = page(); const QRect &dr = priv->deskRect; const QRect &vr = priv->visibleRect; const Page *pg = priv->pageMap.value(pageNo,0); while (pageNo > 0) { pageNo -= 1; if (priv->layoutChange || !priv->pageMap.contains(pageNo) || !pg) break; // Skip pages until we get a meaningful change. const QRect &pr = priv->pageMap[pageNo]->rect; if (! vr.contains(pr)) if (pr.top() != pg->rect.top() || vr.width() < dr.width()) break; } setPage(pageNo); } /*! Move to the first page. */ void QDjVuWidget::firstPage(void) { terminateAnimation(); Position pos; pos.pageNo = 0; pos.inPage = false; pos.posView = pos.posPage = QPoint(0,0); setPosition(pos); } /*! Move to the last page. */ void QDjVuWidget::lastPage(void) { terminateAnimation(); Position pos; pos.pageNo = priv->numPages - 1; pos.inPage = false; pos.posView = pos.posPage = QPoint(0,0); pos.hAnchor = pos.vAnchor = 100; QPoint p; p.rx() = priv->visibleRect.width() - priv->borderSize; p.ry() = priv->visibleRect.height() - priv->borderSize; setPosition(pos, p); } /*! Move to top of current page. */ void QDjVuWidget::moveToPageTop(void) { terminateAnimation(); Position pos = priv->currentPos; pos.inPage = false; pos.posView = pos.posPage = QPoint(0,0); pos.hAnchor = 0; pos.vAnchor = 0; setPosition(pos); } /*! Move to bottom of current page. */ void QDjVuWidget::moveToPageBottom(void) { terminateAnimation(); Position pos = priv->currentPos; pos.inPage = false; pos.posView = pos.posPage = QPoint(0,0); pos.hAnchor = 0; pos.vAnchor = 100; QPoint p; p.rx() = priv->visibleRect.width() - priv->borderSize; p.ry() = priv->visibleRect.height() - priv->borderSize; setPosition(pos, p); } /*! Move to next position in approximate reading order. */ void QDjVuWidget::readNext(void) { terminateAnimation(); QPoint point = priv->currentPoint; Position pos = priv->currentPos; int bs = priv->borderSize; if (priv->pageMap.contains(pos.pageNo)) { Page *p = priv->pageMap[pos.pageNo]; QRect nv = priv->visibleRect.adjusted(bs,bs,-bs,-bs); QRect v = priv->visibleRect.intersect(p->rect); if (v.bottom() < p->rect.bottom()) { // scroll in page point.ry() = bs; nv.moveTop(v.bottom()); nv.moveBottom(qMin(nv.bottom(), p->rect.bottom())); pos.inPage = false; pos.posView.ry() = nv.top() - p->rect.top(); setPosition(pos, point); return; } } // find forward a partially hidden page while (pos.pageNo < priv->numPages - 1) { pos.pageNo += 1; pos.posView.ry() = 0; pos.vAnchor = 0; pos.hAnchor = 0; point.ry() = bs; if (! priv->pageMap.contains(pos.pageNo) || ! priv->visibleRect.contains(priv->pageMap[pos.pageNo]->rect) ) break; } pos.inPage = false; pos.doPage = true; setPosition(pos, point); } /*! Move to previous position in approximate reading order. */ void QDjVuWidget::readPrev(void) { terminateAnimation(); QPoint point = priv->currentPoint; Position pos = priv->currentPos; int bs = priv->borderSize; if (priv->pageMap.contains(pos.pageNo)) { Page *p = priv->pageMap[pos.pageNo]; QRect nv = priv->visibleRect.adjusted(bs,bs,-bs,-bs); QRect v = priv->visibleRect.intersect(p->rect); if (v.top() > p->rect.top()) { // scroll in page point.ry() = bs; nv.moveBottom(v.top()); nv.moveTop(qMax(nv.top(), p->rect.top())); pos.inPage = false; pos.posView.ry() = nv.top() - p->rect.top(); setPosition(pos, point); return; } } // find backward a partially hidden page while (pos.pageNo > 0) { pos.pageNo -= 1; pos.posView.ry() = 0; pos.vAnchor = 100; pos.hAnchor = 0; point.ry() = priv->visibleRect.height() - bs; if (! priv->pageMap.contains(pos.pageNo) || ! priv->visibleRect.contains(priv->pageMap[pos.pageNo]->rect) ) break; } pos.inPage = false; pos.doPage = true; setPosition(pos, point); } // ---------------------------------------- // MOC #include "qdjvuwidget.moc" // ---------------------------------------- // DOCUMENTATION /*! \class QDjVuWidget::PageInfo \brief Additional information for pointerPosition signal. Variable \a pageno is the page number. Variables \a width and \a height give the page size in pixels. Variable \a dpi gives the page resolution. Variable \a segment gives the page coordinates of the page segment covered by the selected rectangle All these variables are null when the page geometry is still unknown. */ /*! \enum QDjVuWidget::DisplayMode Modes for displaying a DjVu image. Only mode \a DISPLAY_COLOR is really useful. The other modes show various layers of the DjVu image. */ /*! \enum QDjVuWidget::Align Possible values of the alignment properties. */ /*! \fn QDjVuWidget::layoutChanged() This signal is emitted when the layout of the displayed pages has changed. This can happen when more data is available, or when the user changes zoom, rotation, layout, display mode, etc. */ /*! \fn QDjVuWidget::pageChanged(int pageno) This signal is emitted when the current page number is changed. This refer to the current page used when moving the document to keep reading (space bar). */ /*! \fn QDjVuWidget::pointerPosition(const Position &pos, const PageInfo &page) This signal is emitted when the mouse move. Variable \a pos reports the position of the mouse in the document. Variable \a page reports the page geometry. */ /*! \fn QDjVuWidget::pointerEnter(const Position &pos, miniexp_t maparea) This signal is emitted when the mouse enters a maparea. Variable \a pos reports the position of the mouse in the document. Variable \a maparea contains the area description. Additional information can be obtained using functions \a linkUrl, \a linkTarget, and \a linkComment. */ /*! \fn QDjVuWidget::pointerLeave(const Position &pos, miniexp_t maparea) This signal is emitted when the mouse leaves a maparea. Variable \a pos reports the position of the mouse in the document. Variable \a maparea contains the area description. Additional information can be obtained using functions \a linkUrl, \a linkTarget, and \a linkComment. */ /*! \fn QDjVuWidget::pointerClick(const Position &pos, miniexp_t maparea) This signal is emitted when the user clicks an hyperlink maparea. Variable \a pos reports the position of the mouse in the document. Variable \a maparea contains the area description. Additional information can be obtained using functions \a linkUrl, \a linkTarget, and \a linkComment. */ /*! \fn QDjVuWidget::pointerSelect(const QPoint &pos, const QRect &rect) This signal is emitted when the user has selected a rectangular area in the image. Argument \a rect gives the rectangle coordinates in the viewport. Argument \a pos is the global mouse position. Use \a getTextForRect and \a getImageForRect to extract associated information. */ /*! \fn QDjVuWidget::errorCondition(int pageno) This signal is emitted when an error occurs during decoding. Recorded error messages can be obtained using function \a errorMessage. Argument \a pageno is -1 if the error occurs at the document level. Otherwise it indicates the page with the error. */ /*! \fn QDjVuWidget::stopCondition(int pageno) This signal is emitted when decoding stops. Recorded error messages can be obtained using function \a errorMessage. Argument \a pageno is -1 if the condition occurs at the document level. Otherwise it indicates the page with the error. */ /*! \fn QDjVuWidget::keyPressSignal(QKeyEvent *event, bool &done) This signal is emitted from the widget's \a keyPressEvent routine. Setting flag \a done to \a true suppress any further processing. Otherwise default key bindings are applied. */ /*! \fn QDjVuWidget::error(QString message, QString filename, int lineno) This signal relays all error messages generated by the \a QDjVuDocument and \a QDjVuPage objects associated with this widget. The last few error messages are saved and are available via function \a pastErrorMessage(). Error message occur asynchronously and might be related to a background job such as prefetching pages. Use instead signal \a errorCondition() as an indicator that an error has just ocurred. */ /*! \fn QDjVuWidget::info(QString message) This signal relays all informational messages generated by the \a QDjVuDocument and \a QDjVuPage objects associated with this widget. The last few messages are saved and are available via function \a pastInfoMessage(). Note that informational message occur asynchronously and might not be relevant. */ /* ------------------------------------------------------------- Local Variables: c++-font-lock-extra-types: ( "\\sw+_t" "[A-Z]\\sw*[a-z]\\sw*" ) End: ------------------------------------------------------------- */ djview4/src/qdjvuwidget.h000066400000000000000000000263711174072760700157530ustar00rootroot00000000000000//C- -*- C++ -*- //C- ------------------------------------------------------------------- //C- DjView4 //C- Copyright (c) 2006- Leon Bottou //C- //C- This software is subject to, and may be distributed under, the //C- GNU General Public License, either version 2 of the license, //C- or (at your option) any later version. The license should have //C- accompanied the software or you may obtain a copy of the license //C- from the Free Software Foundation at http://www.fsf.org . //C- //C- This program is distributed in the hope that it will be useful, //C- but WITHOUT ANY WARRANTY; without even the implied warranty of //C- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //C- GNU General Public License for more details. //C- ------------------------------------------------------------------ #ifndef QDJVUWIDGET_H #define QDJVUWIDGET_H #if AUTOCONF # include "config.h" #endif #include "qdjvu.h" #include #include #include #include class QDjVuPrivate; class QDjVuLens; class QDjVuWidget : public QAbstractScrollArea { Q_OBJECT Q_ENUMS(DisplayMode PointerMode Align Priority) Q_PROPERTY(int page READ page WRITE setPage) Q_PROPERTY(int rotation READ rotation WRITE setRotation) Q_PROPERTY(int zoom READ zoom WRITE setZoom) Q_PROPERTY(double gamma READ gamma WRITE setGamma) Q_PROPERTY(double bool READ invertLuminance WRITE setInvertLuminance) Q_PROPERTY(QColor white READ white WRITE setWhite) Q_PROPERTY(int screenDpi READ screenDpi WRITE setScreenDpi) Q_PROPERTY(DisplayMode displayMode READ displayMode WRITE setDisplayMode) Q_PROPERTY(bool displayFrame READ displayFrame WRITE setDisplayFrame) Q_PROPERTY(Align horizAlign READ horizAlign WRITE setHorizAlign) Q_PROPERTY(Align vertAlign READ vertAlign WRITE setVertAlign) Q_PROPERTY(bool continuous READ continuous WRITE setContinuous) Q_PROPERTY(bool sideBySide READ sideBySide WRITE setSideBySide) Q_PROPERTY(bool coverPage READ coverPage WRITE setCoverPage) Q_PROPERTY(bool rightToLeft READ rightToLeft WRITE setRightToLeft) Q_PROPERTY(QBrush borderBrush READ borderBrush WRITE setBorderBrush) Q_PROPERTY(int borderSize READ borderSize WRITE setBorderSize) Q_PROPERTY(int separatorSize READ separatorSize WRITE setSeparatorSize) Q_PROPERTY(int pixelCacheSize READ pixelCacheSize WRITE setPixelCacheSize) Q_PROPERTY(bool displayMapAreas READ displayMapAreas WRITE setDisplayMapAreas) Q_PROPERTY(bool keyboardEnabled READ keyboardEnabled WRITE enableKeyboard) Q_PROPERTY(bool hyperlinkEnabled READ hyperlinkEnabled WRITE enableHyperlink) Q_PROPERTY(bool mouseEnabled READ mouseEnabled WRITE enableMouse) Q_PROPERTY(bool animationEnabled READ animationEnabled WRITE enableAnimation) Q_PROPERTY(bool animationInProgress READ animationInProgress) Q_PROPERTY(bool mouseWheelZoom READ mouseWheelZoom WRITE setMouseWheelZoom) Q_PROPERTY(int lensPower READ lensPower WRITE setLensPower) Q_PROPERTY(int lensSize READ lensSize WRITE setLensSize) Q_PROPERTY(QDjVuDocument* document READ document WRITE setDocument) Q_PROPERTY(QMenu* contextMenu READ contextMenu WRITE setContextMenu) Q_PROPERTY(Position position READ position WRITE setPosition) Q_PROPERTY(Qt::KeyboardModifiers modifiersForLens READ modifiersForLens WRITE setModifiersForLens) Q_PROPERTY(Qt::KeyboardModifiers modifiersForSelect READ modifiersForSelect WRITE setModifiersForSelect) Q_PROPERTY(Qt::KeyboardModifiers modifiersForLinks READ modifiersForLinks WRITE setModifiersForLinks) public: enum { ZOOM_STRETCH = -4, //!< Stretch full page into viewport ZOOM_ONE2ONE = -3, //!< Maximal resolution for each page ZOOM_FITPAGE = -2, //!< Fit entire pages into viewport ZOOM_FITWIDTH = -1, //!< Fit page width into viewport ZOOM_MIN = 5, //!< Minimal magnification ZOOM_100 = 100, //!< Standard magnification ZOOM_MAX = 1200, //!< Maximal magnification }; enum DisplayMode { DISPLAY_COLOR, //!< Default dislplay mode DISPLAY_STENCIL, //!< Only display the b&w mask layer DISPLAY_BG, //!< Only display the background layer DISPLAY_FG, //!< Only display the foregroud layer DISPLAY_TEXT, //!< Overprint the text layer }; enum Align { ALIGN_TOP, //!< Align page top sides. ALIGN_LEFT = ALIGN_TOP, //!< Align page left sides. ALIGN_CENTER, //!< Center pages. ALIGN_BOTTOM, //!< Align page bottom sides. ALIGN_RIGHT = ALIGN_BOTTOM, //!< Align page right sides. }; enum Priority { PRIORITY_DEFAULT, //!< Priority for default option values. PRIORITY_ANNO, //!< Priority for annotation defined options. PRIORITY_CGI, //!< Priority for cgi defined options. PRIORITY_USER, //!< Priority for gui defined options. }; struct Position { int pageNo; QPoint posPage; QPoint posView; bool inPage; bool doPage; char hAnchor; char vAnchor; Position(); }; struct PageInfo { int pageno; int dpi; int width; int height; QRect segment; QRect selected; }; ~QDjVuWidget(); QDjVuWidget(QWidget *parent=0); QDjVuWidget(QDjVuDocument *doc, QWidget *parent=0); QDjVuDocument *document(void) const; int page(void) const; QPoint hotSpot(void) const; Position position(void) const; Position position(const QPoint &point) const; Position positionWithClosestAnchor(const QPoint &point) const; int rotation(void) const; int zoom(void) const; int zoomFactor(void) const; double gamma(void) const; bool invertLuminance(void) const; QColor white(void) const; int screenDpi(void) const; DisplayMode displayMode(void) const; bool displayFrame(void) const; Align horizAlign(void) const; Align vertAlign(void) const; bool continuous(void) const; bool sideBySide(void) const; bool coverPage(void) const; bool rightToLeft(void) const; QBrush borderBrush(void) const; int borderSize(void) const; int separatorSize(void) const; QMenu* contextMenu(void) const; int pixelCacheSize(void) const; bool displayMapAreas(void) const; bool keyboardEnabled(void) const; bool mouseEnabled(void) const; bool hyperlinkEnabled(void) const; bool animationEnabled(void) const; bool animationInProgress(void) const; bool mouseWheelZoom(void) const; int lensPower(void) const; int lensSize(void) const; Qt::KeyboardModifiers modifiersForLens() const; Qt::KeyboardModifiers modifiersForSelect() const; Qt::KeyboardModifiers modifiersForLinks() const; public slots: void setDocument(QDjVuDocument *d); void setPage(int p); void setPosition(const Position &pos); void setPosition(const Position &pos, const QPoint &p, bool animate=true); void setRotation(int); void setZoom(int); void setGamma(double); void setInvertLuminance(bool); void setWhite(QColor); void setScreenDpi(int); void setDisplayMode(DisplayMode m); void setDisplayFrame(bool); void setHorizAlign(Align); void setVertAlign(Align); void setContinuous(bool); void setSideBySide(bool); void setCoverPage(bool); void setRightToLeft(bool); void setBorderBrush(QBrush); void setBorderSize(int); void setSeparatorSize(int); void setContextMenu(QMenu*); void setDisplayMapAreas(bool); void setPixelCacheSize(int); void enableKeyboard(bool); void enableMouse(bool); void enableHyperlink(bool); void enableAnimation(bool); void terminateAnimation(void); void setMouseWheelZoom(bool); void setLensPower(int); void setLensSize(int); void setModifiersForLens(Qt::KeyboardModifiers); void setModifiersForSelect(Qt::KeyboardModifiers); void setModifiersForLinks(Qt::KeyboardModifiers); void reduceOptionsToPriority(Priority); public: QString pastErrorMessage(int n=0); QString pastInfoMessage(int n=0); bool startSelecting(const QPoint &point); bool startPanning(const QPoint &point); bool startLensing(const QPoint &point); bool startLinking(const QPoint &point); bool stopInteraction(void); QString linkUrl(void); QString linkTarget(void); QString linkComment(void); QString getTextForRect(const QRect &rect); bool getTextForPointer(QString results[]); QImage getImageForRect(const QRect &rect); QRect getSegmentForRect(const QRect &rect, int pageNo); bool pageSizeKnown(int pageno) const; void clearHighlights(int pageno); void addHighlight(int pageno, int x, int y, int w, int h, QColor color, bool rc=false); protected: virtual bool viewportEvent (QEvent *event); virtual void scrollContentsBy(int dx, int dy); virtual void resizeEvent(QResizeEvent *event); virtual void keyPressEvent(QKeyEvent *event); virtual void modifierEvent(Qt::KeyboardModifiers, Qt::MouseButtons, QPoint); virtual void mousePressEvent(QMouseEvent *event); virtual void mouseDoubleClickEvent(QMouseEvent *event); virtual void mouseReleaseEvent(QMouseEvent *event); virtual void mouseMoveEvent(QMouseEvent *event); virtual void contextMenuEvent (QContextMenuEvent *event); virtual void wheelEvent(QWheelEvent *e); virtual void paintEvent(QPaintEvent *event); virtual void chooseTooltip(void); virtual void paintDesk(QPainter &p, const QRegion ®ion); virtual void paintFrame(QPainter &p, const QRect &rect, int width); virtual void paintEmpty(QPainter &p, const QRect &rect, bool, bool, bool); public slots: void nextPage(void); void prevPage(void); void firstPage(void); void lastPage(void); void moveToPageTop(void); void moveToPageBottom(void); void readNext(void); void readPrev(void); void zoomIn(void); void zoomOut(void); void zoomRect(QRect rect); void displayModeColor(void); void displayModeStencil(void); void displayModeBackground(void); void displayModeForeground(void); void displayModeText(void); void rotateRight(void); void rotateLeft(void); signals: void layoutChanged(); void pageChanged(int pageno); void pointerPosition(const Position &pos, const PageInfo &page); void pointerEnter(const Position &pos, miniexp_t maparea); void pointerLeave(const Position &pos, miniexp_t maparea); void pointerClick(const Position &pos, miniexp_t maparea); void pointerSelect(const QPoint &pointerPos, const QRect &rect); void errorCondition(int pageno); void stopCondition(int pageno); void keyPressSignal(QKeyEvent *event, bool &done); void error(QString message, QString filename, int lineno); void info(QString message); private: QDjVuPrivate *priv; friend class QDjVuPrivate; friend class QDjVuLens; }; #endif /* ------------------------------------------------------------- Local Variables: c++-font-lock-extra-types: ( "\\sw+_t" "[A-Z]\\sw*[a-z]\\sw*" ) End: ------------------------------------------------------------- */ djview4/src/qdjvuwidget.qrc000066400000000000000000000004741174072760700163050ustar00rootroot00000000000000 images/djvu_wait.png images/djvu_fail.png images/djvu_stop.png images/djvu_logo.png images/cursor_hand_closed.png images/cursor_hand_open.png djview4/src/tiff2pdf.c000066400000000000000000004702401174072760700151130ustar00rootroot00000000000000/* -*- C -*- //C- ------------------------------------------------------------------- //C- DjView4 //C- Copyright (c) 2006 Leon Bottou //C- //C- This software is subject to, and may be distributed under, the //C- GNU General Public License, either version 2 of the license, //C- or (at your option) any later version. The license should have //C- accompanied the software or you may obtain a copy of the license //C- from the Free Software Foundation at http://www.fsf.org . //C- //C- This program is distributed in the hope that it will be useful, //C- but WITHOUT ANY WARRANTY; without even the implied warranty of //C- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //C- GNU General Public License for more details. //C- ------------------------------------------------------------------ */ /* The following code is derived from program "tiff2pdf" * whose copyright notice is reproduced below. * Changes were made to make it independent from the private * include file tiffiop.h. * * +-------------------------------------------------------------------- * | tiff2pdf - converts a TIFF image to a PDF document * | * | Copyright (c) 2003 Ross Finlayson * | * | Permission to use, copy, modify, distribute, and sell this software and * | its documentation for any purpose is hereby granted without fee, provided * | that (i) the above copyright notices and this permission notice appear in * | all copies of the software and related documentation, and (ii) the name of * | Ross Finlayson may not be used in any advertising or * | publicity relating to the software without the specific, prior written * | permission of Ross Finlayson. * | * | THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, * | EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY * | WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. * | * | IN NO EVENT SHALL ROSS FINLAYSON BE LIABLE FOR * | ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, * | OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, * | WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF * | LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE * | OF THIS SOFTWARE. * +-------------------------------------------------------------------- */ #include "tiff2pdf.h" #if HAVE_TIFF2PDF #include #include #include #include #include #if HAVE_UNISTD_H # include #endif #ifndef NULL # define NULL ((void*)0) #endif #ifdef __GNUC__ # define unused __attribute__((unused)) #else # define unused /**/ #endif /* -------------------------------------------------- * Tiff2Pdf declarations * -------------------------------------------------- */ #define TIFF2PDF_MODULE "tiff2pdf" #define T2P_VERSION "d" /* This type is of PDF color spaces. */ typedef enum{ T2P_CS_BILEVEL=0x01, /* Bilevel, black and white */ T2P_CS_GRAY=0x02, /* Single channel */ T2P_CS_RGB=0x04, /* Three channel tristimulus RGB */ T2P_CS_CMYK=0x08, /* Four channel CMYK print inkset */ T2P_CS_LAB=0x10, /* Three channel L*a*b* color space */ T2P_CS_PALETTE=0x1000 /* One of the above with a color map */ , T2P_CS_CALGRAY=0x20 /* Calibrated single channel */ , T2P_CS_CALRGB=0x40 /* Calibrated three channel tristimulus RGB */ , T2P_CS_ICCBASED=0x80 /* ICC profile color specification */ } t2p_cs_t; /* This type is of PDF compression types. */ typedef enum{ T2P_COMPRESS_NONE=0x00 #ifdef CCITT_SUPPORT , T2P_COMPRESS_G4=0x01 #endif #if defined(JPEG_SUPPORT) || defined(OJPEG_SUPPORT) , T2P_COMPRESS_JPEG=0x02 #endif #ifdef ZIP_SUPPORT , T2P_COMPRESS_ZIP=0x04 #endif } t2p_compress_t; /* This type is whether TIFF image data can be used in PDF without transcoding. */ typedef enum{ T2P_TRANSCODE_RAW=0x01, /* The raw data from the input can be used without recompressing */ T2P_TRANSCODE_ENCODE=0x02 /* The data from the input is perhaps unencoded and reencoded */ } t2p_transcode_t; /* This type is of information about the data samples of the input image. */ typedef enum{ T2P_SAMPLE_NOTHING=0x0000, /* The unencoded samples are normal for the output colorspace */ T2P_SAMPLE_ABGR_TO_RGB=0x0001, /* The unencoded samples are the result of ReadRGBAImage */ T2P_SAMPLE_RGBA_TO_RGB=0x0002, /* The unencoded samples are contiguous RGBA */ T2P_SAMPLE_RGBAA_TO_RGB=0x0004, /* The unencoded samples are RGBA with premultiplied alpha */ T2P_SAMPLE_YCBCR_TO_RGB=0x0008, T2P_SAMPLE_YCBCR_TO_LAB=0x0010, T2P_SAMPLE_REALIZE_PALETTE=0x0020, /* The unencoded samples are indexes into the color map */ T2P_SAMPLE_SIGNED_TO_UNSIGNED=0x0040, /* The unencoded samples are signed instead of unsignd */ T2P_SAMPLE_LAB_SIGNED_TO_UNSIGNED=0x0040, /* The L*a*b* samples have a* and b* signed */ T2P_SAMPLE_PLANAR_SEPARATE_TO_CONTIG=0x0100 /* The unencoded samples are separate instead of contiguous */ } t2p_sample_t; /* This type is of error status of the T2P struct. */ typedef enum{ T2P_ERR_OK = 0, /* This is the value of t2p->t2p_error when there is no error */ T2P_ERR_ERROR = 1 /* This is the value of t2p->t2p_error when there was an error */ } t2p_err_t; /* This struct defines a logical page of a TIFF. */ typedef struct { tdir_t page_directory; uint32 page_number; ttile_t page_tilecount; uint32 page_extra; } T2P_PAGE; /* This struct defines a PDF rectangle's coordinates. */ typedef struct { float x1; float y1; float x2; float y2; float mat[9]; } T2P_BOX; /* This struct defines a tile of a PDF. */ typedef struct { T2P_BOX tile_box; } T2P_TILE; /* This struct defines information about the tiles on a PDF page. */ typedef struct { ttile_t tiles_tilecount; uint32 tiles_tilewidth; uint32 tiles_tilelength; uint32 tiles_tilecountx; uint32 tiles_tilecounty; uint32 tiles_edgetilewidth; uint32 tiles_edgetilelength; T2P_TILE* tiles_tiles; } T2P_TILES; /* This struct is the context of a function to generate PDF from a TIFF. */ typedef struct { t2p_err_t t2p_error; T2P_PAGE* tiff_pages; T2P_TILES* tiff_tiles; tdir_t tiff_pagecount; uint16 tiff_compression; uint16 tiff_photometric; uint16 tiff_fillorder; uint16 tiff_bitspersample; uint16 tiff_samplesperpixel; uint16 tiff_planar; uint32 tiff_width; uint32 tiff_length; float tiff_xres; float tiff_yres; uint16 tiff_orientation; toff_t tiff_dataoffset; tsize_t tiff_datasize; TIFFReadWriteProc tiff_readproc; TIFFReadWriteProc tiff_writeproc; TIFFSeekProc tiff_seekproc; uint16 tiff_resunit; uint16 pdf_centimeters; uint16 pdf_overrideres; uint16 pdf_overridepagesize; float pdf_defaultxres; float pdf_defaultyres; float pdf_xres; float pdf_yres; float pdf_defaultpagewidth; float pdf_defaultpagelength; float pdf_pagewidth; float pdf_pagelength; float pdf_imagewidth; float pdf_imagelength; T2P_BOX pdf_mediabox; T2P_BOX pdf_imagebox; uint16 pdf_majorversion; uint16 pdf_minorversion; uint32 pdf_catalog; uint32 pdf_pages; uint32 pdf_info; uint32 pdf_palettecs; uint16 pdf_fitwindow; uint32 pdf_startxref; char* pdf_fileid; char* pdf_datetime; char* pdf_creator; char* pdf_author; char* pdf_title; char* pdf_subject; char* pdf_keywords; t2p_cs_t pdf_colorspace; uint16 pdf_colorspace_invert; uint16 pdf_switchdecode; uint16 pdf_palettesize; unsigned char* pdf_palette; int pdf_labrange[4]; t2p_compress_t pdf_defaultcompression; uint16 pdf_defaultcompressionquality; t2p_compress_t pdf_compression; uint16 pdf_compressionquality; uint16 pdf_nopassthrough; t2p_transcode_t pdf_transcode; t2p_sample_t pdf_sample; uint32* pdf_xrefoffsets; uint32 pdf_xrefcount; tdir_t pdf_page; #ifdef OJPEG_SUPPORT tdata_t pdf_ojpegdata; uint32 pdf_ojpegdatalength; uint32 pdf_ojpegiflength; #endif float tiff_whitechromaticities[2]; float tiff_primarychromaticities[6]; float tiff_referenceblackwhite[2]; float* tiff_transferfunction[3]; int pdf_image_interpolate; /* 0 (default) : do not interpolate, 1 : interpolate */ uint16 tiff_transferfunctioncount; uint32 pdf_icccs; uint32 tiff_iccprofilelength; tdata_t tiff_iccprofile; /* LB additional fields */ FILE *outputfile; int outputdisable; tsize_t outputwritten; } T2P; /* These functions are called by main. */ static int tiff2pdf_match_paper_size(float*, float*, char*); /* These functions are used to generate a PDF from a TIFF. */ static T2P* t2p_init(void); static void t2p_validate(T2P*); static tsize_t t2p_write_pdf(T2P*, TIFF*, TIFF*); static void t2p_free(T2P*); static void t2p_read_tiff_init(T2P*, TIFF*); static int t2p_cmp_t2p_page(const void*, const void*); static void t2p_read_tiff_data(T2P*, TIFF*); static void t2p_read_tiff_size(T2P*, TIFF*); static void t2p_read_tiff_size_tile(T2P*, TIFF*, ttile_t); static int t2p_tile_is_right_edge(T2P_TILES, ttile_t); static int t2p_tile_is_bottom_edge(T2P_TILES, ttile_t); static tsize_t t2p_readwrite_pdf_image(T2P*, TIFF*, TIFF*); static tsize_t t2p_readwrite_pdf_image_tile(T2P*, TIFF*, TIFF*, ttile_t); #ifdef OJPEG_SUPPORT static int t2p_process_ojpeg_tables(T2P*, TIFF*); #endif #ifdef JPEG_SUPPORT static int t2p_process_jpeg_strip(unsigned char*, tsize_t*, unsigned char*, tsize_t*, tstrip_t, uint32); #endif static void t2p_tile_collapse_left(tdata_t, tsize_t, uint32, uint32, uint32); static void t2p_write_advance_directory(T2P*, TIFF*); static tsize_t t2p_sample_planar_separate_to_contig(T2P*, unsigned char*, unsigned char*, tsize_t); static tsize_t t2p_sample_realize_palette(T2P*, unsigned char*); static tsize_t t2p_sample_abgr_to_rgb(tdata_t, uint32); static tsize_t t2p_sample_rgba_to_rgb(tdata_t, uint32); static tsize_t t2p_sample_rgbaa_to_rgb(tdata_t, uint32); static tsize_t t2p_sample_lab_signed_to_unsigned(tdata_t, uint32); static tsize_t t2p_write_pdf_header(T2P*, TIFF*); static tsize_t t2p_write_pdf_obj_start(uint32, TIFF*); static tsize_t t2p_write_pdf_obj_end(TIFF*); static tsize_t t2p_write_pdf_string(char*, TIFF*); static tsize_t t2p_write_pdf_stream(tdata_t, tsize_t, TIFF*); static tsize_t t2p_write_pdf_stream_start(TIFF*); static tsize_t t2p_write_pdf_stream_end(TIFF*); static tsize_t t2p_write_pdf_stream_dict(tsize_t, uint32, TIFF*); static tsize_t t2p_write_pdf_stream_dict_start(TIFF*); static tsize_t t2p_write_pdf_stream_dict_end(TIFF*); static tsize_t t2p_write_pdf_stream_length(tsize_t, TIFF*); static tsize_t t2p_write_pdf_catalog(T2P*, TIFF*); static tsize_t t2p_write_pdf_info(T2P*, TIFF*, TIFF*); static void t2p_pdf_currenttime(T2P*); static void t2p_pdf_tifftime(T2P*, TIFF*); static tsize_t t2p_write_pdf_pages(T2P*, TIFF*); static tsize_t t2p_write_pdf_page(uint32, T2P*, TIFF*); static void t2p_compose_pdf_page(T2P*); static void t2p_compose_pdf_page_orient(T2P_BOX*, uint16); static void t2p_compose_pdf_page_orient_flip(T2P_BOX*, uint16); static tsize_t t2p_write_pdf_xobject_cs(T2P*, TIFF*); static tsize_t t2p_write_pdf_transfer(T2P*, TIFF*); static tsize_t t2p_write_pdf_transfer_dict(T2P*, TIFF*, uint16); static tsize_t t2p_write_pdf_transfer_stream(T2P*, TIFF*, uint16); static tsize_t t2p_write_pdf_xobject_calcs(T2P*, TIFF*); static tsize_t t2p_write_pdf_xobject_icccs(T2P*, TIFF*); static tsize_t t2p_write_pdf_xobject_icccs_dict(T2P*, TIFF*); static tsize_t t2p_write_pdf_xobject_icccs_stream(T2P*, TIFF*); static tsize_t t2p_write_pdf_xobject_decode(T2P*, TIFF*); static tsize_t t2p_write_pdf_xobject_stream_filter(ttile_t, T2P*, TIFF*); static tsize_t t2p_write_pdf_xreftable(T2P*, TIFF*); static tsize_t t2p_write_pdf_trailer(T2P*, TIFF*); /* -------------------------------------------------- * Replacement for tiffiop functions * -------------------------------------------------- */ static unused tsize_t t2pReadFile(TIFF *tif, tdata_t data, tsize_t size) { thandle_t client = TIFFClientdata(tif); TIFFReadWriteProc proc = TIFFGetReadProc(tif); if (proc) return proc(client, data, size); return -1; } static unused tsize_t t2pWriteFile(TIFF *tif, tdata_t data, tsize_t size) { thandle_t client = TIFFClientdata(tif); TIFFReadWriteProc proc = TIFFGetWriteProc(tif); if (proc) return proc(client, data, size); return -1; } static unused toff_t t2pSeekFile(TIFF *tif, toff_t offset, int whence) { thandle_t client = TIFFClientdata(tif); TIFFSeekProc proc = TIFFGetSeekProc(tif); if (proc) return proc(client, offset, whence); return -1; } #ifdef TIFFReadFile # undef TIFFReadFile #endif #ifndef TIFFReadFile # define TIFFReadFile t2pReadFile #endif #ifdef TIFFWriteFile # undef TIFFWriteFile #endif #ifndef TIFFWriteFile # define TIFFWriteFile t2pWriteFile #endif #ifdef TIFFSeekFile # undef TIFFSeekFile #endif #ifndef TIFFSeekFile # define TIFFSeekFile t2pSeekFile #endif static void t2p_disable(TIFF *tif) { T2P *t2p = (T2P*) TIFFClientdata(tif); t2p->outputdisable = 1; } static void t2p_enable(TIFF *tif) { T2P *t2p = (T2P*) TIFFClientdata(tif); t2p->outputdisable = 0; } /* -------------------------------------------------- * Procs for TIFFClientOpen * -------------------------------------------------- */ static tsize_t t2p_readproc(thandle_t unused handle, tdata_t unused data , tsize_t unused size) { return -1; } static tsize_t t2p_writeproc(thandle_t handle, tdata_t data, tsize_t size) { T2P *t2p = (T2P*) handle; if (t2p->outputdisable <= 0 && t2p->outputfile) { tsize_t written = fwrite(data, 1, size, t2p->outputfile); t2p->outputwritten += written; return written; } return size; } static toff_t t2p_seekproc(thandle_t handle, toff_t offset, int whence) { T2P *t2p = (T2P*) handle; if (t2p->outputdisable <= 0 && t2p->outputfile) return fseek(t2p->outputfile, offset, whence); return offset; } static int t2p_closeproc(thandle_t unused handle) { return 0; } static toff_t t2p_sizeproc(thandle_t unused handle) { return -1; } static int t2p_mapproc(thandle_t unused handle, tdata_t unused *data, toff_t unused *offset) { return -1; } static void t2p_unmapproc(thandle_t unused handle, tdata_t unused data, toff_t unused offset) { } /* -------------------------------------------------- * Ports * -------------------------------------------------- */ #ifdef WIN32 /* * Copyright (c) 1987, 1993, 1994 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #if 0 static char sccsid[] = "@(#)getopt.c 8.3 (Berkeley) 4/27/95"; __RCSID("$NetBSD: getopt.c,v 1.26 2003/08/07 16:43:40 agc Exp $"); #endif #include #include int opterr = 1, /* if error message should be printed */ optind = 1, /* index into parent argv vector */ optopt, /* character checked for validity */ optreset; /* reset getopt */ char *optarg; /* argument associated with option */ #define BADCH (int)'?' #define BADARG (int)':' #define EMSG "" /* * getopt -- * Parse argc/argv argument vector. */ int getopt(int argc, char * const argv[], const char *optstring) { static char *place = EMSG; /* option letter processing */ char *oli; /* option letter list index */ if (optreset || *place == 0) { /* update scanning pointer */ optreset = 0; place = argv[optind]; if (optind >= argc || *place++ != '-') { /* Argument is absent or is not an option */ place = EMSG; return (-1); } optopt = *place++; if (optopt == '-' && *place == 0) { /* "--" => end of options */ ++optind; place = EMSG; return (-1); } if (optopt == 0) { /* Solitary '-', treat as a '-' option if the program (eg su) is looking for it. */ place = EMSG; if (strchr(optstring, '-') == NULL) return -1; optopt = '-'; } } else optopt = *place++; /* See if option letter is one the caller wanted... */ if (optopt == ':' || (oli = strchr(optstring, optopt)) == NULL) { if (*place == 0) ++optind; if (opterr && *optstring != ':') (void)fprintf(stderr, "unknown option -- %c\n", optopt); return (BADCH); } /* Does this option need an argument? */ if (oli[1] != ':') { /* don't need argument */ optarg = NULL; if (*place == 0) ++optind; } else { /* Option-argument is either the rest of this argument or the entire next argument. */ if (*place) optarg = place; else if (argc > ++optind) optarg = argv[optind]; else { /* option-argument absent */ place = EMSG; if (*optstring == ':') return (BADARG); if (opterr) (void)fprintf(stderr, "option requires an argument -- %c\n", optopt); return (BADCH); } place = EMSG; ++optind; } return (optopt); /* return option letter */ } #endif /* -------------------------------------------------- * Main function * -------------------------------------------------- */ /* This is the main function. The program converts one TIFF file to one PDF file, including multiple page TIFF files, tiled TIFF files, black and white. grayscale, and color TIFF files that contain data of TIFF photometric interpretations of bilevel, grayscale, RGB, YCbCr, CMYK separation, and ICC L*a*b* as supported by libtiff and PDF. If you have multiple TIFF files to convert into one PDF file then use tiffcp or other program to concatenate the files into a multiple page TIFF file. If the input TIFF file is of huge dimensions (greater than 10000 pixels height or width) convert the input image to a tiled TIFF if it is not already. The standard output is standard output. Set the output file name with the "-o output.pdf" option. All black and white files are compressed into a single strip CCITT G4 Fax compressed PDF, unless tiled, where tiled black and white images are compressed into tiled CCITT G4 Fax compressed PDF, libtiff CCITT support is assumed. Color and grayscale data can be compressed using either JPEG compression, ITU-T T.81, or Zip/Deflate LZ77 compression, per PNG 1.2 and RFC 1951. Set the compression type using the -j or -z options. JPEG compression support requires that libtiff be configured with JPEG support, and Zip/Deflate compression support requires that libtiff is configured with Zip support, in tiffconf.h. Use only one or the other of -j and -z. The -q option sets the image compression quality, that is 1-100 with libjpeg JPEG compression and one of 1, 10, 11, 12, 13, 14, or 15 for PNG group compression predictor methods, add 100, 200, ..., 900 to set zlib compression quality 1-9. PNG Group differencing predictor methods are not currently implemented. If the input TIFF contains single strip CCITT G4 Fax compressed information, then that is written to the PDF file without transcoding, unless the options of no compression and no passthrough are set, -d and -n. If the input TIFF contains JPEG or single strip Zip/Deflate compressed information, and they are configured, then that is written to the PDF file without transcoding, unless the options of no compression and no passthrough are set. The default page size upon which the TIFF image is placed is determined by the resolution and extent of the image data. Default values for the TIFF image resolution can be set using the -x and -y options. The page size can be set using the -p option for paper size, or -w and -l for paper width and length, then each page of the TIFF image is centered on its page. The distance unit for default resolution and page width and length can be set by the -u option, the default unit is inch. Various items of the output document information can be set with the -e, -c, -a, -t, -s, and -k tags. Setting the argument of the option to "" for these tags causes the relevant document information field to be not written. Some of the document information values otherwise get their information from the input TIFF image, the software, author, document name, and image description. The output PDF file conforms to the PDF 1.1 specification or PDF 1.2 if using Zip/Deflate compression. The Portable Document Format (PDF) specification is copyrighted by Adobe Systems, Incorporated. Todos derechos reservados. Here is a listing of the usage example and the options to the tiff2pdf program that is part of the libtiff distribution. Options followed by a colon have a required argument. usage: tiff2pdf [options] input.tif options: -o: output to file name -j compress with JPEG (requires libjpeg configured with libtiff) -z compress with Zip/Deflate (requires zlib configured with libtiff) -q: compression quality -n no compressed data passthrough -d do not compress (decompress) -i invert colors -u: set distance unit, 'i' for inch, 'm' for centimeter -x: set x resolution default -y: set y resolution default -w: width in units -l: length in units -r: 'd' for resolution default, 'o' for resolution override -p: paper size, eg "letter", "legal", "A4" -f set PDF "Fit Window" user preference -b set PDF "Interpolate" user preference -e: date, overrides image or current date/time default, YYYYMMDDHHMMSS -c: creator, overrides image software default -a: author, overrides image artist default -t: title, overrides image document name default -s: subject, overrides image image description default -k: keywords -h usage examples: tiff2pdf -o output.pdf input.tiff The above example would generate the file output.pdf from input.tiff. tiff2pdf input.tiff The above example would generate PDF output from input.tiff and write it to standard output. tiff2pdf -j -p letter -o output.pdf input.tiff The above example would generate the file output.pdf from input.tiff, putting the image pages on a letter sized page, compressing the output with JPEG. Please report bugs through: http://bugzilla.remotesensing.org/buglist.cgi?product=libtiff See also libtiff.3t, tiffcp. */ int tiff2pdf(TIFF *input, FILE *outputfile, int argc, const char **argv) { extern char *optarg; const char *outfilename = ""; T2P *t2p = NULL; TIFF *output = NULL; int c; /* T2P */ t2p = t2p_init(); if (t2p == NULL){ TIFFError(TIFF2PDF_MODULE, "Can't initialize context"); goto fail; } /* Options */ while (argv && (c = getopt(argc, (char**)argv, "o:q:u:x:y:w:l:r:p:e:c:a:t:s:k:jzndifbh")) != -1) { switch (c) { case 'o': outfilename = optarg; break; #ifdef JPEG_SUPPORT case 'j': t2p->pdf_defaultcompression=T2P_COMPRESS_JPEG; break; #endif #ifdef ZIP_SUPPORT case 'z': t2p->pdf_defaultcompression=T2P_COMPRESS_ZIP; break; #endif case 'q': t2p->pdf_defaultcompressionquality=atoi(optarg); break; case 'n': t2p->pdf_nopassthrough=1; break; case 'd': t2p->pdf_defaultcompression=T2P_COMPRESS_NONE; break; case 'u': if(optarg[0]=='m'){ t2p->pdf_centimeters=1; } break; case 'x': t2p->pdf_defaultxres = (float)atof(optarg) / (t2p->pdf_centimeters?2.54F:1.0F); break; case 'y': t2p->pdf_defaultyres = (float)atof(optarg) / (t2p->pdf_centimeters?2.54F:1.0F); break; case 'w': t2p->pdf_overridepagesize=1; t2p->pdf_defaultpagewidth = ((float)atof(optarg) * 72.0F) / (t2p->pdf_centimeters?2.54F:1.0F); break; case 'l': t2p->pdf_overridepagesize=1; t2p->pdf_defaultpagelength = ((float)atof(optarg) * 72.0F) / (t2p->pdf_centimeters?2.54F:1.0F); break; case 'r': if(optarg[0]=='o'){ t2p->pdf_overrideres=1; } break; case 'p': if(tiff2pdf_match_paper_size(&(t2p->pdf_defaultpagewidth), &(t2p->pdf_defaultpagelength), optarg)){ t2p->pdf_overridepagesize=1; } else { TIFFWarning(TIFF2PDF_MODULE, "Unknown paper size %s, ignoring option", optarg); } break; case 'i': t2p->pdf_colorspace_invert=1; break; case 'f': t2p->pdf_fitwindow=1; break; case 'e': t2p->pdf_datetime = (char*)_TIFFmalloc(17); if(t2p->pdf_datetime){ if(strlen(optarg)==0){ t2p->pdf_datetime[0]=0; } else { if(strlen(optarg)>14){optarg[14]=0;} t2p->pdf_datetime[0]='D'; t2p->pdf_datetime[1]=':'; strcpy(&(t2p->pdf_datetime[2]), optarg); } } break; case 'c': t2p->pdf_creator = (char *)_TIFFmalloc(strlen(optarg) + 1); if(t2p->pdf_creator){ strcpy(t2p->pdf_creator, optarg); t2p->pdf_creator[strlen(optarg)]=0; } break; case 'a': t2p->pdf_author = (char *)_TIFFmalloc(strlen(optarg) + 1); if(t2p->pdf_author){ strcpy(t2p->pdf_author, optarg); t2p->pdf_author[strlen(optarg)]=0; } break; case 't': t2p->pdf_title= (char*)_TIFFmalloc(strlen(optarg)+1); if(t2p->pdf_title){ strcpy(t2p->pdf_title, optarg); t2p->pdf_title[strlen(optarg)]=0; } break; case 's': t2p->pdf_subject= (char*)_TIFFmalloc(strlen(optarg)+1); if(t2p->pdf_subject){ strcpy(t2p->pdf_subject, optarg); t2p->pdf_subject[strlen(optarg)]=0; } break; case 'k': t2p->pdf_keywords= (char*)_TIFFmalloc(strlen(optarg)+1); if(t2p->pdf_keywords){ strcpy(t2p->pdf_keywords, optarg); t2p->pdf_keywords[strlen(optarg)]=0; } break; case 'b': t2p->pdf_image_interpolate = 1; break; } } /* Output */ t2p->outputdisable = 0; t2p->outputfile = outputfile; output = TIFFClientOpen(outfilename, "w", (thandle_t) t2p, t2p_readproc, t2p_writeproc, t2p_seekproc, t2p_closeproc, t2p_sizeproc, t2p_mapproc, t2p_unmapproc ); if (output == NULL){ TIFFError(TIFF2PDF_MODULE, "Can't initialize output descriptor"); goto fail; } /* Validate */ t2p_validate(t2p); TIFFSeekFile(output, (toff_t) 0, SEEK_SET); /* Write */ t2p_write_pdf(t2p, input, output); if(t2p->t2p_error != 0){ TIFFError(TIFF2PDF_MODULE, "An error occurred creating output PDF file"); goto fail; } if (output != NULL) TIFFClose(output); if (t2p != NULL) t2p_free(t2p); return(EXIT_SUCCESS); fail: if (output != NULL) TIFFClose(output); if (t2p != NULL) t2p_free(t2p); return(EXIT_FAILURE); } static int tiff2pdf_match_paper_size(float* width, float* length, char* papersize) { int i=0; int len=0; const char* sizes[]={ "LETTER", "A4", "LEGAL", "EXECUTIVE", "LETTER", "LEGAL", "LEDGER", "TABLOID", "A", "B", "C", "D", "E", "F", "G", "H", "J", "K", "A10", "A9", "A8", "A7", "A6", "A5", "A4", "A3", "A2", "A1", "A0", "2A0", "4A0", "2A", "4A", "B10", "B9", "B8", "B7", "B6", "B5", "B4", "B3", "B2", "B1", "B0", "JISB10", "JISB9", "JISB8", "JISB7", "JISB6", "JISB5", "JISB4", "JISB3", "JISB2", "JISB1", "JISB0", "C10", "C9", "C8", "C7", "C6", "C5", "C4", "C3", "C2", "C1", "C0", "RA2", "RA1", "RA0", "SRA4", "SRA3", "SRA2", "SRA1", "SRA0", "A3EXTRA", "A4EXTRA", "STATEMENT", "FOLIO", "QUARTO", NULL } ; const int widths[]={ 612, 595, 612, 522, 612,612,792,792, 612,792,1224,1584,2448,2016,792,2016,2448,2880, 74,105,147,210,298,420,595,842,1191,1684,2384,3370,4768,3370,4768, 88,125,176,249,354,499,709,1001,1417,2004,2835, 91,128,181,258,363,516,729,1032,1460,2064,2920, 79,113,162,230,323,459,649,918,1298,1298,2599, 1219,1729,2438,638,907,1276,1814,2551, 914,667, 396, 612, 609, 0 }; const int lengths[]={ 792,842,1008, 756,792,1008,1224,1224, 792,1224,1584,2448,3168,2880,6480,10296,12672,10296, 105,147,210,298,420,595,842,1191,1684,2384,3370,4768,6741,4768,6741, 125,176,249,354,499,709,1001,1417,2004,2835,4008, 128,181,258,363,516,729,1032,1460,2064,2920,4127, 113,162,230,323,459,649,918,1298,1837,1837,3677, 1729,2438,3458,907,1276,1814,2551,3628, 1262,914, 612, 936, 780, 0 }; len=strlen(papersize); for(i=0;ipdf_majorversion=1; t2p->pdf_minorversion=1; t2p->pdf_defaultxres=300.0; t2p->pdf_defaultyres=300.0; t2p->pdf_defaultpagewidth=612.0; t2p->pdf_defaultpagelength=792.0; t2p->pdf_xrefcount=3; /* Catalog, Info, Pages */ t2p->outputfile = NULL; t2p->outputdisable = 0; t2p->outputwritten = 0; return(t2p); } /* This function frees a T2P context struct pointer and any allocated data fields of it. */ static void t2p_free(T2P* t2p){ int i=0; if(t2p != NULL){ if(t2p->pdf_xrefoffsets != NULL){ _TIFFfree( (tdata_t) t2p->pdf_xrefoffsets); } if(t2p->tiff_pages != NULL){ _TIFFfree( (tdata_t) t2p->tiff_pages); } for(i=0;itiff_pagecount;i++){ if(t2p->tiff_tiles[i].tiles_tiles != NULL){ _TIFFfree( (tdata_t) t2p->tiff_tiles[i].tiles_tiles); } } if(t2p->tiff_tiles != NULL){ _TIFFfree( (tdata_t) t2p->tiff_tiles); } if(t2p->pdf_palette != NULL){ _TIFFfree( (tdata_t) t2p->pdf_palette); } if(t2p->pdf_fileid != NULL){ _TIFFfree( (tdata_t) t2p->pdf_fileid); } if(t2p->pdf_datetime != NULL){ _TIFFfree( (tdata_t) t2p->pdf_datetime); } if(t2p->pdf_creator != NULL){ _TIFFfree( (tdata_t) t2p->pdf_creator); } if(t2p->pdf_author != NULL){ _TIFFfree( (tdata_t) t2p->pdf_author); } if(t2p->pdf_title != NULL){ _TIFFfree( (tdata_t) t2p->pdf_title); } if(t2p->pdf_subject != NULL){ _TIFFfree( (tdata_t) t2p->pdf_subject); } if(t2p->pdf_keywords != NULL){ _TIFFfree( (tdata_t) t2p->pdf_keywords); } #ifdef OJPEG_SUPPORT if(t2p->pdf_ojpegdata != NULL){ _TIFFfree( (tdata_t) t2p->pdf_ojpegdata); } #endif _TIFFfree( (tdata_t) t2p ); } return; } /* This function validates the values of a T2P context struct pointer before calling t2p_write_pdf with it. */ static void t2p_validate(T2P* t2p){ #ifdef JPEG_SUPPORT if(t2p->pdf_defaultcompression==T2P_COMPRESS_JPEG){ if(t2p->pdf_defaultcompressionquality<100 || t2p->pdf_defaultcompressionquality<1){ t2p->pdf_defaultcompressionquality=0; } } #endif #ifdef ZIP_SUPPORT if(t2p->pdf_defaultcompression==T2P_COMPRESS_ZIP){ switch (t2p->pdf_defaultcompressionquality){ case 1: case 10: case 11: case 12: case 13: case 14: case 15: case 101: case 110: case 111: case 112: case 113: case 114: case 115: case 201: case 210: case 211: case 212: case 213: case 214: case 215: case 301: case 310: case 311: case 312: case 313: case 314: case 315: case 401: case 410: case 411: case 412: case 413: case 414: case 415: case 501: case 510: case 511: case 512: case 513: case 514: case 515: case 601: case 610: case 611: case 612: case 613: case 614: case 615: case 701: case 710: case 711: case 712: case 713: case 714: case 715: case 801: case 810: case 811: case 812: case 813: case 814: case 815: case 901: case 910: case 911: case 912: case 913: case 914: case 915: break; default: t2p->pdf_defaultcompressionquality=0; } if(t2p->pdf_defaultcompressionquality%100 !=0){ TIFFError( TIFF2PDF_MODULE, "PNG Group predictor differencing not implemented, assuming compression quality %u", t2p->pdf_defaultcompressionquality); } t2p->pdf_defaultcompressionquality%=100; if(t2p->pdf_minorversion<2){t2p->pdf_minorversion=2;} } #endif (void)0; return; } /* This function scans the input TIFF file for pages. It attempts to determine which IFD's of the TIFF file contain image document pages. For each, it gathers some information that has to do with the output of the PDF document as a whole. */ static void t2p_read_tiff_init(T2P* t2p, TIFF* input){ tdir_t directorycount=0; tdir_t i=0; uint16 pagen=0; uint16 paged=0; uint16 xuint16=0; directorycount=TIFFNumberOfDirectories(input); t2p->tiff_pages = (T2P_PAGE*) _TIFFmalloc(directorycount * sizeof(T2P_PAGE)); if(t2p->tiff_pages==NULL){ TIFFError( TIFF2PDF_MODULE, "Can't allocate %u bytes of memory for tiff_pages array, %s", directorycount * (int)sizeof(T2P_PAGE), TIFFFileName(input)); t2p->t2p_error = T2P_ERR_ERROR; return; } _TIFFmemset( t2p->tiff_pages, 0x00, directorycount * sizeof(T2P_PAGE)); t2p->tiff_tiles = (T2P_TILES*) _TIFFmalloc(directorycount * sizeof(T2P_TILES)); if(t2p->tiff_tiles==NULL){ TIFFError( TIFF2PDF_MODULE, "Can't allocate %u bytes of memory for tiff_tiles array, %s", directorycount * (int)sizeof(T2P_TILES), TIFFFileName(input)); t2p->t2p_error = T2P_ERR_ERROR; return; } _TIFFmemset( t2p->tiff_tiles, 0x00, directorycount * sizeof(T2P_TILES)); for(i=0;ipaged) && (paged != 0)){ t2p->tiff_pages[t2p->tiff_pagecount].page_number = paged; } else { t2p->tiff_pages[t2p->tiff_pagecount].page_number = pagen; } goto ispage2; } if(TIFFGetField(input, TIFFTAG_SUBFILETYPE, &subfiletype)){ if ( ((subfiletype & FILETYPE_PAGE) != 0) || (subfiletype == 0)){ goto ispage; } else { goto isnotpage; } } if(TIFFGetField(input, TIFFTAG_OSUBFILETYPE, &subfiletype)){ if ((subfiletype == OFILETYPE_IMAGE) || (subfiletype == OFILETYPE_PAGE) || (subfiletype == 0) ){ goto ispage; } else { goto isnotpage; } } ispage: t2p->tiff_pages[t2p->tiff_pagecount].page_number=t2p->tiff_pagecount; ispage2: t2p->tiff_pages[t2p->tiff_pagecount].page_directory=i; if(TIFFIsTiled(input)){ t2p->tiff_pages[t2p->tiff_pagecount].page_tilecount = TIFFNumberOfTiles(input); } t2p->tiff_pagecount++; isnotpage: (void)0; } qsort((void*) t2p->tiff_pages, t2p->tiff_pagecount, sizeof(T2P_PAGE), t2p_cmp_t2p_page); for(i=0;itiff_pagecount;i++){ t2p->pdf_xrefcount += 5; TIFFSetDirectory(input, t2p->tiff_pages[i].page_directory ); if((TIFFGetField(input, TIFFTAG_PHOTOMETRIC, &xuint16) && (xuint16==PHOTOMETRIC_PALETTE)) || TIFFGetField(input, TIFFTAG_INDEXED, &xuint16)) { t2p->tiff_pages[i].page_extra++; t2p->pdf_xrefcount++; } #ifdef ZIP_SUPPORT if (TIFFGetField(input, TIFFTAG_COMPRESSION, &xuint16)) { if( (xuint16== COMPRESSION_DEFLATE || xuint16== COMPRESSION_ADOBE_DEFLATE) && ((t2p->tiff_pages[i].page_tilecount != 0) || TIFFNumberOfStrips(input)==1) && (t2p->pdf_nopassthrough==0) ){ if(t2p->pdf_minorversion<2){t2p->pdf_minorversion=2;} } } #endif if (TIFFGetField(input, TIFFTAG_TRANSFERFUNCTION, &(t2p->tiff_transferfunction[0]), &(t2p->tiff_transferfunction[1]), &(t2p->tiff_transferfunction[2]))) { if(t2p->tiff_transferfunction[1] != t2p->tiff_transferfunction[0]) { t2p->tiff_transferfunctioncount = 3; t2p->tiff_pages[i].page_extra += 4; t2p->pdf_xrefcount += 4; } else { t2p->tiff_transferfunctioncount = 1; t2p->tiff_pages[i].page_extra += 2; t2p->pdf_xrefcount += 2; } if(t2p->pdf_minorversion < 2) t2p->pdf_minorversion = 2; } else { t2p->tiff_transferfunctioncount=0; } if( TIFFGetField( input, TIFFTAG_ICCPROFILE, &(t2p->tiff_iccprofilelength), &(t2p->tiff_iccprofile)) != 0){ t2p->tiff_pages[i].page_extra++; t2p->pdf_xrefcount++; if(t2p->pdf_minorversion<3){t2p->pdf_minorversion=3;} } t2p->tiff_tiles[i].tiles_tilecount= t2p->tiff_pages[i].page_tilecount; if( (TIFFGetField(input, TIFFTAG_PLANARCONFIG, &xuint16) != 0) && (xuint16 == PLANARCONFIG_SEPARATE ) ){ TIFFGetField(input, TIFFTAG_SAMPLESPERPIXEL, &xuint16); t2p->tiff_tiles[i].tiles_tilecount/= xuint16; } if( t2p->tiff_tiles[i].tiles_tilecount > 0){ t2p->pdf_xrefcount += (t2p->tiff_tiles[i].tiles_tilecount -1)*2; TIFFGetField(input, TIFFTAG_TILEWIDTH, &( t2p->tiff_tiles[i].tiles_tilewidth) ); TIFFGetField(input, TIFFTAG_TILELENGTH, &( t2p->tiff_tiles[i].tiles_tilelength) ); t2p->tiff_tiles[i].tiles_tiles = (T2P_TILE*) _TIFFmalloc( t2p->tiff_tiles[i].tiles_tilecount * sizeof(T2P_TILE) ); if( t2p->tiff_tiles[i].tiles_tiles == NULL){ TIFFError( TIFF2PDF_MODULE, "Can't allocate %u bytes of memory for t2p_read_tiff_init, %s", t2p->tiff_tiles[i].tiles_tilecount * (int)sizeof(T2P_TILE), TIFFFileName(input)); t2p->t2p_error = T2P_ERR_ERROR; return; } } } return; } /* This function is used by qsort to sort a T2P_PAGE* array of page structures by page number. */ static int t2p_cmp_t2p_page(const void* e1, const void* e2){ return( ((T2P_PAGE*)e1)->page_number - ((T2P_PAGE*)e2)->page_number ); } /* This function sets the input directory to the directory of a given page and determines information about the image. It checks the image characteristics to determine if it is possible to convert the image data into a page of PDF output, setting values of the T2P struct for this page. It determines what color space is used in the output PDF to represent the image. It determines if the image can be converted as raw data without requiring transcoding of the image data. */ static void t2p_read_tiff_data(T2P* t2p, TIFF* input){ int i=0; uint16* r; uint16* g; uint16* b; uint16* a; uint16 xuint16; uint16* xuint16p; float* xfloatp; t2p->pdf_transcode = T2P_TRANSCODE_ENCODE; t2p->pdf_sample = T2P_SAMPLE_NOTHING; t2p->pdf_switchdecode = t2p->pdf_colorspace_invert; TIFFSetDirectory(input, t2p->tiff_pages[t2p->pdf_page].page_directory); TIFFGetField(input, TIFFTAG_IMAGEWIDTH, &(t2p->tiff_width)); if(t2p->tiff_width == 0){ TIFFError( TIFF2PDF_MODULE, "No support for %s with zero width", TIFFFileName(input) ); t2p->t2p_error = T2P_ERR_ERROR; return; } TIFFGetField(input, TIFFTAG_IMAGELENGTH, &(t2p->tiff_length)); if(t2p->tiff_length == 0){ TIFFError( TIFF2PDF_MODULE, "No support for %s with zero length", TIFFFileName(input) ); t2p->t2p_error = T2P_ERR_ERROR; return; } if(TIFFGetField(input, TIFFTAG_COMPRESSION, &(t2p->tiff_compression)) == 0){ TIFFError( TIFF2PDF_MODULE, "No support for %s with no compression tag", TIFFFileName(input) ); t2p->t2p_error = T2P_ERR_ERROR; return; } if( TIFFIsCODECConfigured(t2p->tiff_compression) == 0){ TIFFError( TIFF2PDF_MODULE, "No support for %s with compression type %u: not configured", TIFFFileName(input), t2p->tiff_compression ); t2p->t2p_error = T2P_ERR_ERROR; return; } TIFFGetFieldDefaulted(input, TIFFTAG_BITSPERSAMPLE, &(t2p->tiff_bitspersample)); switch(t2p->tiff_bitspersample){ case 1: case 2: case 4: case 8: break; case 0: TIFFWarning( TIFF2PDF_MODULE, "Image %s has 0 bits per sample, assuming 1", TIFFFileName(input)); t2p->tiff_bitspersample=1; break; default: TIFFError( TIFF2PDF_MODULE, "No support for %s with %u bits per sample", TIFFFileName(input), t2p->tiff_bitspersample); t2p->t2p_error = T2P_ERR_ERROR; return; } TIFFGetFieldDefaulted(input, TIFFTAG_SAMPLESPERPIXEL, &(t2p->tiff_samplesperpixel)); if(t2p->tiff_samplesperpixel>4){ TIFFError( TIFF2PDF_MODULE, "No support for %s with %u samples per pixel", TIFFFileName(input), t2p->tiff_samplesperpixel); t2p->t2p_error = T2P_ERR_ERROR; return; } if(t2p->tiff_samplesperpixel==0){ TIFFWarning( TIFF2PDF_MODULE, "Image %s has 0 samples per pixel, assuming 1", TIFFFileName(input)); t2p->tiff_samplesperpixel=1; } if(TIFFGetField(input, TIFFTAG_SAMPLEFORMAT, &xuint16) != 0 ){ switch(xuint16){ case 0: case 1: case 4: break; default: TIFFError( TIFF2PDF_MODULE, "No support for %s with sample format %u", TIFFFileName(input), xuint16); t2p->t2p_error = T2P_ERR_ERROR; return; break; } } TIFFGetFieldDefaulted(input, TIFFTAG_FILLORDER, &(t2p->tiff_fillorder)); if(TIFFGetField(input, TIFFTAG_PHOTOMETRIC, &(t2p->tiff_photometric)) == 0){ TIFFError( TIFF2PDF_MODULE, "No support for %s with no photometric interpretation tag", TIFFFileName(input) ); t2p->t2p_error = T2P_ERR_ERROR; return; } switch(t2p->tiff_photometric){ case PHOTOMETRIC_MINISWHITE: case PHOTOMETRIC_MINISBLACK: if (t2p->tiff_bitspersample==1){ t2p->pdf_colorspace=T2P_CS_BILEVEL; if(t2p->tiff_photometric==PHOTOMETRIC_MINISWHITE){ t2p->pdf_switchdecode ^= 1; } } else { t2p->pdf_colorspace=T2P_CS_GRAY; if(t2p->tiff_photometric==PHOTOMETRIC_MINISWHITE){ t2p->pdf_switchdecode ^= 1; } } break; case PHOTOMETRIC_RGB: t2p->pdf_colorspace=T2P_CS_RGB; if(t2p->tiff_samplesperpixel == 3){ break; } if(TIFFGetField(input, TIFFTAG_INDEXED, &xuint16)){ if(xuint16==1) goto photometric_palette; } if(t2p->tiff_samplesperpixel > 3) { if(t2p->tiff_samplesperpixel == 4) { t2p->pdf_colorspace = T2P_CS_RGB; if(TIFFGetField(input, TIFFTAG_EXTRASAMPLES, &xuint16, &xuint16p) && xuint16 == 1) { if(xuint16p[0] == EXTRASAMPLE_ASSOCALPHA){ t2p->pdf_sample=T2P_SAMPLE_RGBAA_TO_RGB; break; } if(xuint16p[0] == EXTRASAMPLE_UNASSALPHA){ t2p->pdf_sample=T2P_SAMPLE_RGBA_TO_RGB; break; } TIFFWarning( TIFF2PDF_MODULE, "RGB image %s has 4 samples per pixel, assuming RGBA", TIFFFileName(input)); break; } t2p->pdf_colorspace=T2P_CS_CMYK; t2p->pdf_switchdecode ^= 1; TIFFWarning( TIFF2PDF_MODULE, "RGB image %s has 4 samples per pixel, assuming inverse CMYK", TIFFFileName(input)); break; } else { TIFFError( TIFF2PDF_MODULE, "No support for RGB image %s with %u samples per pixel", TIFFFileName(input), t2p->tiff_samplesperpixel); t2p->t2p_error = T2P_ERR_ERROR; break; } } else { TIFFError( TIFF2PDF_MODULE, "No support for RGB image %s with %u samples per pixel", TIFFFileName(input), t2p->tiff_samplesperpixel); t2p->t2p_error = T2P_ERR_ERROR; break; } case PHOTOMETRIC_PALETTE: photometric_palette: if(t2p->tiff_samplesperpixel!=1){ TIFFError( TIFF2PDF_MODULE, "No support for palettized image %s with not one sample per pixel", TIFFFileName(input) ); t2p->t2p_error = T2P_ERR_ERROR; return; } t2p->pdf_colorspace=T2P_CS_RGB | T2P_CS_PALETTE; t2p->pdf_palettesize=0x0001<tiff_bitspersample; if(!TIFFGetField(input, TIFFTAG_COLORMAP, &r, &g, &b)){ TIFFError( TIFF2PDF_MODULE, "Palettized image %s has no color map", TIFFFileName(input)); t2p->t2p_error = T2P_ERR_ERROR; return; } if(t2p->pdf_palette != NULL){ _TIFFfree(t2p->pdf_palette); t2p->pdf_palette=NULL; } t2p->pdf_palette = (unsigned char*) _TIFFmalloc(t2p->pdf_palettesize*3); if(t2p->pdf_palette==NULL){ TIFFError( TIFF2PDF_MODULE, "Can't allocate %u bytes of memory for t2p_read_tiff_image, %s", t2p->pdf_palettesize, TIFFFileName(input)); t2p->t2p_error = T2P_ERR_ERROR; return; } for(i=0;ipdf_palettesize;i++){ t2p->pdf_palette[(i*3)] = (unsigned char) (r[i]>>8); t2p->pdf_palette[(i*3)+1]= (unsigned char) (g[i]>>8); t2p->pdf_palette[(i*3)+2]= (unsigned char) (b[i]>>8); } t2p->pdf_palettesize *= 3; break; case PHOTOMETRIC_SEPARATED: if(TIFFGetField(input, TIFFTAG_INDEXED, &xuint16)){ if(xuint16==1){ goto photometric_palette_cmyk; } } if( TIFFGetField(input, TIFFTAG_INKSET, &xuint16) ){ if(xuint16 != INKSET_CMYK){ TIFFError( TIFF2PDF_MODULE, "No support for %s because its inkset is not CMYK", TIFFFileName(input) ); t2p->t2p_error = T2P_ERR_ERROR; return; } } if(t2p->tiff_samplesperpixel==4){ t2p->pdf_colorspace=T2P_CS_CMYK; } else { TIFFError( TIFF2PDF_MODULE, "No support for %s because it has %u samples per pixel", TIFFFileName(input), t2p->tiff_samplesperpixel); t2p->t2p_error = T2P_ERR_ERROR; return; } break; photometric_palette_cmyk: if(t2p->tiff_samplesperpixel!=1){ TIFFError( TIFF2PDF_MODULE, "No support for palettized CMYK image %s with not one sample per pixel", TIFFFileName(input) ); t2p->t2p_error = T2P_ERR_ERROR; return; } t2p->pdf_colorspace=T2P_CS_CMYK | T2P_CS_PALETTE; t2p->pdf_palettesize=0x0001<tiff_bitspersample; if(!TIFFGetField(input, TIFFTAG_COLORMAP, &r, &g, &b, &a)){ TIFFError( TIFF2PDF_MODULE, "Palettized image %s has no color map", TIFFFileName(input)); t2p->t2p_error = T2P_ERR_ERROR; return; } if(t2p->pdf_palette != NULL){ _TIFFfree(t2p->pdf_palette); t2p->pdf_palette=NULL; } t2p->pdf_palette = (unsigned char*) _TIFFmalloc(t2p->pdf_palettesize*4); if(t2p->pdf_palette==NULL){ TIFFError( TIFF2PDF_MODULE, "Can't allocate %u bytes of memory for t2p_read_tiff_image, %s", t2p->pdf_palettesize, TIFFFileName(input)); t2p->t2p_error = T2P_ERR_ERROR; return; } for(i=0;ipdf_palettesize;i++){ t2p->pdf_palette[(i*4)] = (unsigned char) (r[i]>>8); t2p->pdf_palette[(i*4)+1]= (unsigned char) (g[i]>>8); t2p->pdf_palette[(i*4)+2]= (unsigned char) (b[i]>>8); t2p->pdf_palette[(i*4)+2]= (unsigned char) (a[i]>>8); } t2p->pdf_palettesize *= 4; break; case PHOTOMETRIC_YCBCR: t2p->pdf_colorspace=T2P_CS_RGB; if(t2p->tiff_samplesperpixel==1){ t2p->pdf_colorspace=T2P_CS_GRAY; t2p->tiff_photometric=PHOTOMETRIC_MINISBLACK; break; } t2p->pdf_sample=T2P_SAMPLE_YCBCR_TO_RGB; #ifdef JPEG_SUPPORT if(t2p->pdf_defaultcompression==T2P_COMPRESS_JPEG){ t2p->pdf_sample=T2P_SAMPLE_NOTHING; } #endif break; case PHOTOMETRIC_CIELAB: t2p->pdf_labrange[0]= -127; t2p->pdf_labrange[1]= 127; t2p->pdf_labrange[2]= -127; t2p->pdf_labrange[3]= 127; t2p->pdf_sample=T2P_SAMPLE_LAB_SIGNED_TO_UNSIGNED; t2p->pdf_colorspace=T2P_CS_LAB; break; case PHOTOMETRIC_ICCLAB: t2p->pdf_labrange[0]= 0; t2p->pdf_labrange[1]= 255; t2p->pdf_labrange[2]= 0; t2p->pdf_labrange[3]= 255; t2p->pdf_colorspace=T2P_CS_LAB; break; case PHOTOMETRIC_ITULAB: t2p->pdf_labrange[0]=-85; t2p->pdf_labrange[1]=85; t2p->pdf_labrange[2]=-75; t2p->pdf_labrange[3]=124; t2p->pdf_sample=T2P_SAMPLE_LAB_SIGNED_TO_UNSIGNED; t2p->pdf_colorspace=T2P_CS_LAB; break; case PHOTOMETRIC_LOGL: case PHOTOMETRIC_LOGLUV: TIFFError( TIFF2PDF_MODULE, "No support for %s with photometric interpretation LogL/LogLuv", TIFFFileName(input)); t2p->t2p_error = T2P_ERR_ERROR; return; default: TIFFError( TIFF2PDF_MODULE, "No support for %s with photometric interpretation %u", TIFFFileName(input), t2p->tiff_photometric); t2p->t2p_error = T2P_ERR_ERROR; return; } if(TIFFGetField(input, TIFFTAG_PLANARCONFIG, &(t2p->tiff_planar))){ switch(t2p->tiff_planar){ case 0: TIFFWarning( TIFF2PDF_MODULE, "Image %s has planar configuration 0, assuming 1", TIFFFileName(input)); t2p->tiff_planar=PLANARCONFIG_CONTIG; case PLANARCONFIG_CONTIG: break; case PLANARCONFIG_SEPARATE: t2p->pdf_sample=T2P_SAMPLE_PLANAR_SEPARATE_TO_CONTIG; if(t2p->tiff_bitspersample!=8){ TIFFError( TIFF2PDF_MODULE, "No support for %s with separated planar configuration and %u bits per sample", TIFFFileName(input), t2p->tiff_bitspersample); t2p->t2p_error = T2P_ERR_ERROR; return; } break; default: TIFFError( TIFF2PDF_MODULE, "No support for %s with planar configuration %u", TIFFFileName(input), t2p->tiff_planar); t2p->t2p_error = T2P_ERR_ERROR; return; } } TIFFGetFieldDefaulted(input, TIFFTAG_ORIENTATION, &(t2p->tiff_orientation)); if(t2p->tiff_orientation>8){ TIFFWarning(TIFF2PDF_MODULE, "Image %s has orientation %u, assuming 0", TIFFFileName(input), t2p->tiff_orientation); t2p->tiff_orientation=0; } if(TIFFGetField(input, TIFFTAG_XRESOLUTION, &(t2p->tiff_xres) ) == 0){ t2p->tiff_xres=0.0; } if(TIFFGetField(input, TIFFTAG_YRESOLUTION, &(t2p->tiff_yres) ) == 0){ t2p->tiff_yres=0.0; } TIFFGetFieldDefaulted(input, TIFFTAG_RESOLUTIONUNIT, &(t2p->tiff_resunit) ); if(t2p->tiff_resunit==RESUNIT_CENTIMETER){ t2p->tiff_xres*=2.54F; t2p->tiff_yres*=2.54F; } else if (t2p->tiff_resunit!=RESUNIT_INCH && t2p->pdf_centimeters!=0){ t2p->tiff_xres*=2.54F; t2p->tiff_yres*=2.54F; } t2p_compose_pdf_page(t2p); t2p->pdf_transcode = T2P_TRANSCODE_ENCODE; if(t2p->pdf_nopassthrough==0){ #ifdef CCITT_SUPPORT if(t2p->tiff_compression==COMPRESSION_CCITTFAX4 ){ if(TIFFIsTiled(input) || (TIFFNumberOfStrips(input)==1) ){ t2p->pdf_transcode = T2P_TRANSCODE_RAW; t2p->pdf_compression=T2P_COMPRESS_G4; } } #endif #ifdef ZIP_SUPPORT if(t2p->tiff_compression== COMPRESSION_ADOBE_DEFLATE || t2p->tiff_compression==COMPRESSION_DEFLATE){ if(TIFFIsTiled(input) || (TIFFNumberOfStrips(input)==1) ){ t2p->pdf_transcode = T2P_TRANSCODE_RAW; t2p->pdf_compression=T2P_COMPRESS_ZIP; } } #endif #ifdef OJPEG_SUPPORT if(t2p->tiff_compression==COMPRESSION_OJPEG){ t2p->pdf_transcode = T2P_TRANSCODE_RAW; t2p->pdf_compression=T2P_COMPRESS_JPEG; t2p_process_ojpeg_tables(t2p, input); } #endif #ifdef JPEG_SUPPORT if(t2p->tiff_compression==COMPRESSION_JPEG){ t2p->pdf_transcode = T2P_TRANSCODE_RAW; t2p->pdf_compression=T2P_COMPRESS_JPEG; } #endif (void)0; } if(t2p->pdf_transcode!=T2P_TRANSCODE_RAW){ t2p->pdf_compression = t2p->pdf_defaultcompression; } #ifdef JPEG_SUPPORT if(t2p->pdf_defaultcompression==T2P_COMPRESS_JPEG){ if(t2p->pdf_colorspace & T2P_CS_PALETTE){ t2p->pdf_sample|=T2P_SAMPLE_REALIZE_PALETTE; t2p->pdf_colorspace ^= T2P_CS_PALETTE; t2p->tiff_pages[t2p->pdf_page].page_extra--; } } if(t2p->tiff_compression==COMPRESSION_JPEG){ if(t2p->tiff_planar==PLANARCONFIG_SEPARATE){ TIFFError( TIFF2PDF_MODULE, "No support for %s with JPEG compression and separated planar configuration", TIFFFileName(input)); t2p->t2p_error=T2P_ERR_ERROR; return; } } #endif #ifdef OJPEG_SUPPORT if(t2p->tiff_compression==COMPRESSION_OJPEG){ if(t2p->tiff_planar==PLANARCONFIG_SEPARATE){ TIFFError( TIFF2PDF_MODULE, "No support for %s with OJPEG compression and separated planar configuration", TIFFFileName(input)); t2p->t2p_error=T2P_ERR_ERROR; return; } } #endif if(t2p->pdf_sample & T2P_SAMPLE_REALIZE_PALETTE){ if(t2p->pdf_colorspace & T2P_CS_CMYK){ t2p->tiff_samplesperpixel=4; t2p->tiff_photometric=PHOTOMETRIC_SEPARATED; } else { t2p->tiff_samplesperpixel=3; t2p->tiff_photometric=PHOTOMETRIC_RGB; } } if (TIFFGetField(input, TIFFTAG_TRANSFERFUNCTION, &(t2p->tiff_transferfunction[0]), &(t2p->tiff_transferfunction[1]), &(t2p->tiff_transferfunction[2]))) { if(t2p->tiff_transferfunction[1] != t2p->tiff_transferfunction[0]) { t2p->tiff_transferfunctioncount=3; } else { t2p->tiff_transferfunctioncount=1; } } else { t2p->tiff_transferfunctioncount=0; } if(TIFFGetField(input, TIFFTAG_WHITEPOINT, &xfloatp)!=0){ t2p->tiff_whitechromaticities[0]=xfloatp[0]; t2p->tiff_whitechromaticities[1]=xfloatp[1]; if(t2p->pdf_colorspace & T2P_CS_GRAY){ t2p->pdf_colorspace |= T2P_CS_CALGRAY; } if(t2p->pdf_colorspace & T2P_CS_RGB){ t2p->pdf_colorspace |= T2P_CS_CALRGB; } } if(TIFFGetField(input, TIFFTAG_PRIMARYCHROMATICITIES, &xfloatp)!=0){ t2p->tiff_primarychromaticities[0]=xfloatp[0]; t2p->tiff_primarychromaticities[1]=xfloatp[1]; t2p->tiff_primarychromaticities[2]=xfloatp[2]; t2p->tiff_primarychromaticities[3]=xfloatp[3]; t2p->tiff_primarychromaticities[4]=xfloatp[4]; t2p->tiff_primarychromaticities[5]=xfloatp[5]; if(t2p->pdf_colorspace & T2P_CS_RGB){ t2p->pdf_colorspace |= T2P_CS_CALRGB; } } if(t2p->pdf_colorspace & T2P_CS_LAB){ if(TIFFGetField(input, TIFFTAG_WHITEPOINT, &xfloatp) != 0){ t2p->tiff_whitechromaticities[0]=xfloatp[0]; t2p->tiff_whitechromaticities[1]=xfloatp[1]; } else { t2p->tiff_whitechromaticities[0]=0.3457F; /* 0.3127F; */ t2p->tiff_whitechromaticities[1]=0.3585F; /* 0.3290F; */ } } if(TIFFGetField(input, TIFFTAG_ICCPROFILE, &(t2p->tiff_iccprofilelength), &(t2p->tiff_iccprofile))!=0){ t2p->pdf_colorspace |= T2P_CS_ICCBASED; } else { t2p->tiff_iccprofilelength=0; t2p->tiff_iccprofile=NULL; } #ifdef CCITT_SUPPORT if( t2p->tiff_bitspersample==1 && t2p->tiff_samplesperpixel==1){ t2p->pdf_compression = T2P_COMPRESS_G4; } #endif return; } /* This function returns the necessary size of a data buffer to contain the raw or uncompressed image data from the input TIFF for a page. */ static void t2p_read_tiff_size(T2P* t2p, TIFF* input){ uint32* sbc=NULL; #if defined(JPEG_SUPPORT) || defined (OJPEG_SUPPORT) unsigned char* jpt=NULL; uint32 xuint32=0; tstrip_t i=0; tstrip_t stripcount=0; #endif #ifdef OJPEG_SUPPORT tsize_t k = 0; #endif if(t2p->pdf_transcode == T2P_TRANSCODE_RAW){ #ifdef CCITT_SUPPORT if(t2p->pdf_compression == T2P_COMPRESS_G4 ){ TIFFGetField(input, TIFFTAG_STRIPBYTECOUNTS, &sbc); t2p->tiff_datasize=sbc[0]; return; } #endif #ifdef ZIP_SUPPORT if(t2p->pdf_compression == T2P_COMPRESS_ZIP){ TIFFGetField(input, TIFFTAG_STRIPBYTECOUNTS, &sbc); t2p->tiff_datasize=sbc[0]; return; } #endif #ifdef OJPEG_SUPPORT if(t2p->tiff_compression == COMPRESSION_OJPEG){ if(!TIFFGetField(input, TIFFTAG_STRIPBYTECOUNTS, &sbc)){ TIFFError(TIFF2PDF_MODULE, "Input file %s missing field: TIFFTAG_STRIPBYTECOUNTS", TIFFFileName(input)); t2p->t2p_error = T2P_ERR_ERROR; return; } stripcount=TIFFNumberOfStrips(input); for(i=0;itiff_dataoffset))){ if(t2p->tiff_dataoffset != 0){ if(TIFFGetField(input, TIFFTAG_JPEGIFBYTECOUNT, &(t2p->tiff_datasize))!=0){ if(t2p->tiff_datasize < k) { t2p->pdf_ojpegiflength=t2p->tiff_datasize; t2p->tiff_datasize+=k; t2p->tiff_datasize+=6; t2p->tiff_datasize+=2*stripcount; TIFFWarning(TIFF2PDF_MODULE, "Input file %s has short JPEG interchange file byte count", TIFFFileName(input)); return; } return; }else { TIFFError(TIFF2PDF_MODULE, "Input file %s missing field: TIFFTAG_JPEGIFBYTECOUNT", TIFFFileName(input)); t2p->t2p_error = T2P_ERR_ERROR; return; } } } t2p->tiff_datasize+=k; t2p->tiff_datasize+=2*stripcount; t2p->tiff_datasize+=2048; return; } #endif #ifdef JPEG_SUPPORT if(t2p->tiff_compression == COMPRESSION_JPEG){ t2p->tiff_datasize = 2048; /* safety margin (actually used!) */ if(TIFFGetField(input, TIFFTAG_JPEGTABLES, &xuint32, &jpt) != 0 ){ if(xuint32>4){ t2p->tiff_datasize+= xuint32; t2p->tiff_datasize -=2; /* don't use EOI of header */ } } else { t2p->tiff_datasize=2; /* SOI for first strip */ } stripcount=TIFFNumberOfStrips(input); if(!TIFFGetField(input, TIFFTAG_STRIPBYTECOUNTS, &sbc)){ TIFFError(TIFF2PDF_MODULE, "Input file %s missing field: TIFFTAG_STRIPBYTECOUNTS", TIFFFileName(input)); t2p->t2p_error = T2P_ERR_ERROR; return; } for(i=0;itiff_datasize += sbc[i]; t2p->tiff_datasize -=4; /* don't use SOI or EOI of strip */ } t2p->tiff_datasize +=2; /* use EOI of last strip */ return; } #endif (void) 0; } t2p->tiff_datasize=TIFFScanlineSize(input) * t2p->tiff_length; if(t2p->tiff_planar==PLANARCONFIG_SEPARATE){ t2p->tiff_datasize*= t2p->tiff_samplesperpixel; } return; } /* This function returns the necessary size of a data buffer to contain the raw or uncompressed image data from the input TIFF for a tile of a page. */ static void t2p_read_tiff_size_tile(T2P* t2p, TIFF* input, ttile_t tile){ uint32* tbc = NULL; uint16 edge=0; #ifdef JPEG_SUPPORT uint32 xuint32=0; unsigned char* jpt; #endif edge |= t2p_tile_is_right_edge(t2p->tiff_tiles[t2p->pdf_page], tile); edge |= t2p_tile_is_bottom_edge(t2p->tiff_tiles[t2p->pdf_page], tile); if(t2p->pdf_transcode==T2P_TRANSCODE_RAW){ if(edge #if defined(JPEG_SUPPORT) || defined(OJPEG_SUPPORT) && !(t2p->pdf_compression==T2P_COMPRESS_JPEG) #endif ){ t2p->tiff_datasize=TIFFTileSize(input); return; } else { TIFFGetField(input, TIFFTAG_TILEBYTECOUNTS, &tbc); t2p->tiff_datasize=tbc[tile]; #ifdef OJPEG_SUPPORT if(t2p->tiff_compression==COMPRESSION_OJPEG){ t2p->tiff_datasize+=2048; return; } #endif #ifdef JPEG_SUPPORT if(t2p->tiff_compression==COMPRESSION_JPEG){ if(TIFFGetField(input, TIFFTAG_JPEGTABLES, &xuint32, &jpt)!=0){ if(xuint32>4){ t2p->tiff_datasize+=xuint32; t2p->tiff_datasize-=4; /* don't use EOI of header or SOI of tile */ } } } #endif return; } } t2p->tiff_datasize=TIFFTileSize(input); if(t2p->tiff_planar==PLANARCONFIG_SEPARATE){ t2p->tiff_datasize*= t2p->tiff_samplesperpixel; } return; } /* This functions returns a non-zero value when the tile is on the right edge and does not have full imaged tile width. */ static int t2p_tile_is_right_edge(T2P_TILES tiles, ttile_t tile){ if( ((tile+1) % tiles.tiles_tilecountx == 0) && (tiles.tiles_edgetilewidth != 0) ){ return(1); } else { return(0); } return(0); } /* This functions returns a non-zero value when the tile is on the bottom edge and does not have full imaged tile length. */ static int t2p_tile_is_bottom_edge(T2P_TILES tiles, ttile_t tile){ if( ((tile+1) > (tiles.tiles_tilecount-tiles.tiles_tilecountx) ) && (tiles.tiles_edgetilelength != 0) ){ return(1); } else { return(0); } return(0); } /* This function reads the raster image data from the input TIFF for an image and writes the data to the output PDF XObject image dictionary stream. It returns the amount written or zero on error. */ static tsize_t t2p_readwrite_pdf_image(T2P* t2p, TIFF* input, TIFF* output){ tsize_t written=0; unsigned char* buffer=NULL; unsigned char* samplebuffer=NULL; tsize_t bufferoffset=0; tsize_t samplebufferoffset=0; tsize_t read=0; tstrip_t i=0; tstrip_t j=0; tstrip_t stripcount=0; tsize_t stripsize=0; tsize_t sepstripcount=0; tsize_t sepstripsize=0; #ifdef OJPEG_SUPPORT toff_t inputoffset=0; uint16 h_samp=1; uint16 v_samp=1; uint16 ri=1; uint32 rows=0; #endif #ifdef JPEG_SUPPORT unsigned char* jpt; uint32 xuint32=0; uint16 xuint16_1=0; uint16 xuint16_2=0; float* xfloatp; uint32* sbc; unsigned char* stripbuffer; tsize_t striplength=0; uint32 max_striplength=0; #endif if(t2p->pdf_transcode == T2P_TRANSCODE_RAW){ #ifdef CCITT_SUPPORT if(t2p->pdf_compression == T2P_COMPRESS_G4){ buffer= (unsigned char*) _TIFFmalloc(t2p->tiff_datasize); if(buffer==NULL){ TIFFError(TIFF2PDF_MODULE, "Can't allocate %u bytes of memory for t2p_readwrite_pdf_image, %s", t2p->tiff_datasize, TIFFFileName(input)); t2p->t2p_error = T2P_ERR_ERROR; return(0); } TIFFReadRawStrip(input, 0, (tdata_t) buffer, t2p->tiff_datasize); if (t2p->tiff_fillorder==FILLORDER_LSB2MSB){ /* make sure is lsb-to-msb bit-endianness fill order */ TIFFReverseBits(buffer, t2p->tiff_datasize); } TIFFWriteFile(output, (tdata_t) buffer, t2p->tiff_datasize); _TIFFfree(buffer); return(t2p->tiff_datasize); } #endif #ifdef ZIP_SUPPORT if(t2p->pdf_compression == T2P_COMPRESS_ZIP){ buffer= (unsigned char*) _TIFFmalloc(t2p->tiff_datasize); memset(buffer, 0, t2p->tiff_datasize); if(buffer==NULL){ TIFFError(TIFF2PDF_MODULE, "Can't allocate %u bytes of memory for t2p_readwrite_pdf_image, %s", t2p->tiff_datasize, TIFFFileName(input)); t2p->t2p_error = T2P_ERR_ERROR; return(0); } TIFFReadRawStrip(input, 0, (tdata_t) buffer, t2p->tiff_datasize); if (t2p->tiff_fillorder==FILLORDER_LSB2MSB){ TIFFReverseBits(buffer, t2p->tiff_datasize); } TIFFWriteFile(output, (tdata_t) buffer, t2p->tiff_datasize); _TIFFfree(buffer); return(t2p->tiff_datasize); } #endif #ifdef OJPEG_SUPPORT if(t2p->tiff_compression == COMPRESSION_OJPEG){ if(t2p->tiff_dataoffset != 0){ buffer= (unsigned char*) _TIFFmalloc(t2p->tiff_datasize); memset(buffer, 0, t2p->tiff_datasize); if(buffer==NULL){ TIFFError(TIFF2PDF_MODULE, "Can't allocate %u bytes of memory for t2p_readwrite_pdf_image, %s", t2p->tiff_datasize, TIFFFileName(input)); t2p->t2p_error = T2P_ERR_ERROR; return(0); } if(t2p->pdf_ojpegiflength==0){ inputoffset=TIFFSeekFile(input, 0, SEEK_CUR); TIFFSeekFile(input, t2p->tiff_dataoffset, SEEK_SET); TIFFReadFile(input, (tdata_t) buffer, t2p->tiff_datasize); TIFFSeekFile(input, inputoffset, SEEK_SET); TIFFWriteFile(output, (tdata_t) buffer, t2p->tiff_datasize); _TIFFfree(buffer); return(t2p->tiff_datasize); } else { inputoffset=TIFFSeekFile(input, 0, SEEK_CUR); TIFFSeekFile(input, t2p->tiff_dataoffset, SEEK_SET); bufferoffset=TIFFReadFile(input, (tdata_t) buffer, t2p->pdf_ojpegiflength); t2p->pdf_ojpegiflength=0; TIFFSeekFile(input, inputoffset, SEEK_SET); TIFFGetField(input, TIFFTAG_YCBCRSUBSAMPLING, &h_samp, &v_samp); buffer[bufferoffset++]= 0xff; buffer[bufferoffset++]= 0xdd; buffer[bufferoffset++]= 0x00; buffer[bufferoffset++]= 0x04; h_samp*=8; v_samp*=8; ri=(t2p->tiff_width+h_samp-1) / h_samp; TIFFGetField(input, TIFFTAG_ROWSPERSTRIP, &rows); ri*=(rows+v_samp-1)/v_samp; buffer[bufferoffset++]= (ri>>8) & 0xff; buffer[bufferoffset++]= ri & 0xff; stripcount=TIFFNumberOfStrips(input); for(i=0;ipdf_ojpegdata){ TIFFError(TIFF2PDF_MODULE, "No support for OJPEG image %s with bad tables", TIFFFileName(input)); t2p->t2p_error = T2P_ERR_ERROR; return(0); } buffer=(unsigned char*) _TIFFmalloc(t2p->tiff_datasize); memset(buffer, 0, t2p->tiff_datasize); if(buffer==NULL){ TIFFError(TIFF2PDF_MODULE, "Can't allocate %u bytes of memory for t2p_readwrite_pdf_image, %s", t2p->tiff_datasize, TIFFFileName(input)); t2p->t2p_error = T2P_ERR_ERROR; return(0); } _TIFFmemcpy(buffer, t2p->pdf_ojpegdata, t2p->pdf_ojpegdatalength); bufferoffset=t2p->pdf_ojpegdatalength; stripcount=TIFFNumberOfStrips(input); for(i=0;it2p_error = T2P_ERR_ERROR; return(0); } return(t2p->tiff_datasize); } #endif #ifdef JPEG_SUPPORT if(t2p->tiff_compression == COMPRESSION_JPEG){ buffer= (unsigned char*) _TIFFmalloc(t2p->tiff_datasize); memset(buffer, 0, t2p->tiff_datasize); if(buffer==NULL){ TIFFError(TIFF2PDF_MODULE, "Can't allocate %u bytes of memory for t2p_readwrite_pdf_image, %s", t2p->tiff_datasize, TIFFFileName(input)); t2p->t2p_error = T2P_ERR_ERROR; return(0); } if(TIFFGetField(input, TIFFTAG_JPEGTABLES, &xuint32, &jpt) != 0){ if(xuint32>4){ _TIFFmemcpy(buffer, jpt, xuint32); bufferoffset+=xuint32-2; } } stripcount=TIFFNumberOfStrips(input); TIFFGetField(input, TIFFTAG_STRIPBYTECOUNTS, &sbc); for(i=0;imax_striplength) max_striplength=sbc[i]; } stripbuffer=(unsigned char*) _TIFFmalloc(max_striplength); if(stripbuffer==NULL){ TIFFError(TIFF2PDF_MODULE, "Can't allocate %u bytes of memory for t2p_readwrite_pdf_image, %s", max_striplength, TIFFFileName(input)); _TIFFfree(buffer); t2p->t2p_error = T2P_ERR_ERROR; return(0); } for(i=0;itiff_length)){ TIFFError(TIFF2PDF_MODULE, "Can't process JPEG data in input file %s", TIFFFileName(input)); _TIFFfree(stripbuffer); _TIFFfree(buffer); t2p->t2p_error = T2P_ERR_ERROR; return(0); } } buffer[bufferoffset++]=0xff; buffer[bufferoffset++]=0xd9; TIFFWriteFile(output, (tdata_t) buffer, bufferoffset); _TIFFfree(stripbuffer); _TIFFfree(buffer); return(bufferoffset); } #endif (void)0; } if(t2p->pdf_sample==T2P_SAMPLE_NOTHING){ buffer = (unsigned char*) _TIFFmalloc(t2p->tiff_datasize); memset(buffer, 0, t2p->tiff_datasize); if(buffer==NULL){ TIFFError(TIFF2PDF_MODULE, "Can't allocate %u bytes of memory for t2p_readwrite_pdf_image, %s", t2p->tiff_datasize, TIFFFileName(input)); t2p->t2p_error = T2P_ERR_ERROR; return(0); } stripsize=TIFFStripSize(input); stripcount=TIFFNumberOfStrips(input); for(i=0;it2p_error=T2P_ERR_ERROR; return(0); } bufferoffset+=read; } } else { if(t2p->pdf_sample & T2P_SAMPLE_PLANAR_SEPARATE_TO_CONTIG){ sepstripsize=TIFFStripSize(input); sepstripcount=TIFFNumberOfStrips(input); stripsize=sepstripsize*t2p->tiff_samplesperpixel; stripcount=sepstripcount/t2p->tiff_samplesperpixel; buffer = (unsigned char*) _TIFFmalloc(t2p->tiff_datasize); memset(buffer, 0, t2p->tiff_datasize); if(buffer==NULL){ TIFFError(TIFF2PDF_MODULE, "Can't allocate %u bytes of memory for t2p_readwrite_pdf_image, %s", t2p->tiff_datasize, TIFFFileName(input)); t2p->t2p_error = T2P_ERR_ERROR; return(0); } samplebuffer = (unsigned char*) _TIFFmalloc(stripsize); if(samplebuffer==NULL){ TIFFError(TIFF2PDF_MODULE, "Can't allocate %u bytes of memory for t2p_readwrite_pdf_image, %s", t2p->tiff_datasize, TIFFFileName(input)); t2p->t2p_error = T2P_ERR_ERROR; return(0); } for(i=0;itiff_samplesperpixel;j++){ read = TIFFReadEncodedStrip(input, i + j*stripcount, (tdata_t) &(samplebuffer[samplebufferoffset]), sepstripsize); if(read==-1){ TIFFError(TIFF2PDF_MODULE, "Error on decoding strip %u of %s", i + j*stripcount, TIFFFileName(input)); _TIFFfree(buffer); t2p->t2p_error=T2P_ERR_ERROR; return(0); } samplebufferoffset+=read; } t2p_sample_planar_separate_to_contig( t2p, &(buffer[bufferoffset]), samplebuffer, samplebufferoffset); bufferoffset+=samplebufferoffset; } _TIFFfree(samplebuffer); goto dataready; } buffer = (unsigned char*) _TIFFmalloc(t2p->tiff_datasize); memset(buffer, 0, t2p->tiff_datasize); if(buffer==NULL){ TIFFError(TIFF2PDF_MODULE, "Can't allocate %u bytes of memory for t2p_readwrite_pdf_image, %s", t2p->tiff_datasize, TIFFFileName(input)); t2p->t2p_error = T2P_ERR_ERROR; return(0); } stripsize=TIFFStripSize(input); stripcount=TIFFNumberOfStrips(input); for(i=0;it2p_error=T2P_ERR_ERROR; return(0); } bufferoffset+=read; } if(t2p->pdf_sample & T2P_SAMPLE_REALIZE_PALETTE){ samplebuffer=(unsigned char*)_TIFFrealloc( (tdata_t) buffer, t2p->tiff_datasize * t2p->tiff_samplesperpixel); if(samplebuffer==NULL){ TIFFError(TIFF2PDF_MODULE, "Can't allocate %u bytes of memory for t2p_readwrite_pdf_image, %s", t2p->tiff_datasize, TIFFFileName(input)); t2p->t2p_error = T2P_ERR_ERROR; _TIFFfree(buffer); } else { buffer=samplebuffer; t2p->tiff_datasize *= t2p->tiff_samplesperpixel; } t2p_sample_realize_palette(t2p, buffer); } if(t2p->pdf_sample & T2P_SAMPLE_RGBA_TO_RGB){ t2p->tiff_datasize=t2p_sample_rgba_to_rgb( (tdata_t)buffer, t2p->tiff_width*t2p->tiff_length); } if(t2p->pdf_sample & T2P_SAMPLE_RGBAA_TO_RGB){ t2p->tiff_datasize=t2p_sample_rgbaa_to_rgb( (tdata_t)buffer, t2p->tiff_width*t2p->tiff_length); } if(t2p->pdf_sample & T2P_SAMPLE_YCBCR_TO_RGB){ samplebuffer=(unsigned char*)_TIFFrealloc( (tdata_t)buffer, t2p->tiff_width*t2p->tiff_length*4); if(samplebuffer==NULL){ TIFFError(TIFF2PDF_MODULE, "Can't allocate %u bytes of memory for t2p_readwrite_pdf_image, %s", t2p->tiff_datasize, TIFFFileName(input)); t2p->t2p_error = T2P_ERR_ERROR; _TIFFfree(buffer); return(0); } else { buffer=samplebuffer; } if(!TIFFReadRGBAImageOriented( input, t2p->tiff_width, t2p->tiff_length, (uint32*)buffer, ORIENTATION_TOPLEFT, 0)){ TIFFError(TIFF2PDF_MODULE, "Can't use TIFFReadRGBAImageOriented to extract RGB image from %s", TIFFFileName(input)); t2p->t2p_error = T2P_ERR_ERROR; return(0); } t2p->tiff_datasize=t2p_sample_abgr_to_rgb( (tdata_t) buffer, t2p->tiff_width*t2p->tiff_length); } if(t2p->pdf_sample & T2P_SAMPLE_LAB_SIGNED_TO_UNSIGNED){ t2p->tiff_datasize=t2p_sample_lab_signed_to_unsigned( (tdata_t)buffer, t2p->tiff_width*t2p->tiff_length); } } dataready: t2p_disable(output); TIFFSetField(output, TIFFTAG_PHOTOMETRIC, t2p->tiff_photometric); TIFFSetField(output, TIFFTAG_BITSPERSAMPLE, t2p->tiff_bitspersample); TIFFSetField(output, TIFFTAG_SAMPLESPERPIXEL, t2p->tiff_samplesperpixel); TIFFSetField(output, TIFFTAG_IMAGEWIDTH, t2p->tiff_width); TIFFSetField(output, TIFFTAG_IMAGELENGTH, t2p->tiff_length); TIFFSetField(output, TIFFTAG_ROWSPERSTRIP, t2p->tiff_length); TIFFSetField(output, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG); TIFFSetField(output, TIFFTAG_FILLORDER, FILLORDER_MSB2LSB); switch(t2p->pdf_compression){ case T2P_COMPRESS_NONE: TIFFSetField(output, TIFFTAG_COMPRESSION, COMPRESSION_NONE); break; #ifdef CCITT_SUPPORT case T2P_COMPRESS_G4: TIFFSetField(output, TIFFTAG_COMPRESSION, COMPRESSION_CCITTFAX4); break; #endif #ifdef JPEG_SUPPORT case T2P_COMPRESS_JPEG: if(t2p->tiff_photometric==PHOTOMETRIC_YCBCR){ if(TIFFGetField(input, TIFFTAG_YCBCRSUBSAMPLING, &xuint16_1, &xuint16_2)!=0){ if(xuint16_1 != 0 && xuint16_2 != 0){ TIFFSetField(output, TIFFTAG_YCBCRSUBSAMPLING, xuint16_1, xuint16_2); } } if(TIFFGetField(input, TIFFTAG_REFERENCEBLACKWHITE, &xfloatp)!=0){ TIFFSetField(output, TIFFTAG_REFERENCEBLACKWHITE, xfloatp); } } if(TIFFSetField(output, TIFFTAG_COMPRESSION, COMPRESSION_JPEG)==0){ TIFFError(TIFF2PDF_MODULE, "Unable to use JPEG compression for input %s and output %s", TIFFFileName(input), TIFFFileName(output)); _TIFFfree(buffer); t2p->t2p_error = T2P_ERR_ERROR; return(0); } TIFFSetField(output, TIFFTAG_JPEGTABLESMODE, 0); if(t2p->pdf_colorspace & (T2P_CS_RGB | T2P_CS_LAB)){ TIFFSetField(output, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_YCBCR); if(t2p->tiff_photometric != PHOTOMETRIC_YCBCR){ TIFFSetField(output, TIFFTAG_JPEGCOLORMODE, JPEGCOLORMODE_RGB); } else { TIFFSetField(output, TIFFTAG_JPEGCOLORMODE, JPEGCOLORMODE_RAW); } } if(t2p->pdf_colorspace & T2P_CS_GRAY){ (void)0; } if(t2p->pdf_colorspace & T2P_CS_CMYK){ (void)0; } if(t2p->pdf_defaultcompressionquality != 0){ TIFFSetField(output, TIFFTAG_JPEGQUALITY, t2p->pdf_defaultcompressionquality); } break; #endif #ifdef ZIP_SUPPORT case T2P_COMPRESS_ZIP: TIFFSetField(output, TIFFTAG_COMPRESSION, COMPRESSION_DEFLATE); if(t2p->pdf_defaultcompressionquality%100 != 0){ TIFFSetField(output, TIFFTAG_PREDICTOR, t2p->pdf_defaultcompressionquality % 100); } if(t2p->pdf_defaultcompressionquality/100 != 0){ TIFFSetField(output, TIFFTAG_ZIPQUALITY, (t2p->pdf_defaultcompressionquality / 100)); } break; #endif default: break; } t2p_enable(output); t2p->outputwritten = 0; #ifdef JPEG_SUPPORT if(t2p->pdf_compression==T2P_COMPRESS_JPEG && t2p->tiff_photometric==PHOTOMETRIC_YCBCR){ bufferoffset=TIFFWriteEncodedStrip(output, (tstrip_t)0, buffer,stripsize*stripcount); } else #endif bufferoffset=TIFFWriteEncodedStrip(output, (tstrip_t)0, buffer, t2p->tiff_datasize); if(buffer != NULL){ _TIFFfree(buffer); buffer=NULL; } if(bufferoffset==(tsize_t)-1){ TIFFError(TIFF2PDF_MODULE, "Error writing encoded strip to output PDF %s", TIFFFileName(output)); t2p->t2p_error = T2P_ERR_ERROR; return(0); } written= t2p->outputwritten; return(written); } /* This function reads the raster image data from the input TIFF for an image tile and writes the data to the output PDF XObject image dictionary stream for the tile. It returns the amount written or zero on error. */ static tsize_t t2p_readwrite_pdf_image_tile(T2P* t2p, TIFF* input, TIFF* output, ttile_t tile){ uint16 edge=0; tsize_t written=0; unsigned char* buffer=NULL; tsize_t bufferoffset=0; unsigned char* samplebuffer=NULL; tsize_t samplebufferoffset=0; tsize_t read=0; uint16 i=0; ttile_t tilecount=0; ttile_t septilecount=0; tsize_t septilesize=0; #ifdef JPEG_SUPPORT unsigned char* jpt; uint16 xuint16_1=0; uint16 xuint16_2=0; float* xfloatp; uint32 xuint32=0; #endif edge |= t2p_tile_is_right_edge(t2p->tiff_tiles[t2p->pdf_page], tile); edge |= t2p_tile_is_bottom_edge(t2p->tiff_tiles[t2p->pdf_page], tile); if( (t2p->pdf_transcode == T2P_TRANSCODE_RAW) && ((edge == 0) #if defined(JPEG_SUPPORT) || defined(OJPEG_SUPPORT) || (t2p->pdf_compression == T2P_COMPRESS_JPEG) #endif ) ){ #ifdef CCITT_SUPPORT if(t2p->pdf_compression == T2P_COMPRESS_G4){ buffer= (unsigned char*) _TIFFmalloc(t2p->tiff_datasize); if(buffer==NULL){ TIFFError(TIFF2PDF_MODULE, "Can't allocate %u bytes of memory " "for t2p_readwrite_pdf_image_tile, %s", t2p->tiff_datasize, TIFFFileName(input)); t2p->t2p_error = T2P_ERR_ERROR; return(0); } TIFFReadRawTile(input, tile, (tdata_t) buffer, t2p->tiff_datasize); if (t2p->tiff_fillorder==FILLORDER_LSB2MSB){ TIFFReverseBits(buffer, t2p->tiff_datasize); } TIFFWriteFile(output, (tdata_t) buffer, t2p->tiff_datasize); _TIFFfree(buffer); return(t2p->tiff_datasize); } #endif #ifdef ZIP_SUPPORT if(t2p->pdf_compression == T2P_COMPRESS_ZIP){ buffer= (unsigned char*) _TIFFmalloc(t2p->tiff_datasize); if(buffer==NULL){ TIFFError(TIFF2PDF_MODULE, "Can't allocate %u bytes of memory " "for t2p_readwrite_pdf_image_tile, %s", t2p->tiff_datasize, TIFFFileName(input)); t2p->t2p_error = T2P_ERR_ERROR; return(0); } TIFFReadRawTile(input, tile, (tdata_t) buffer, t2p->tiff_datasize); if (t2p->tiff_fillorder==FILLORDER_LSB2MSB){ TIFFReverseBits(buffer, t2p->tiff_datasize); } TIFFWriteFile(output, (tdata_t) buffer, t2p->tiff_datasize); _TIFFfree(buffer); return(t2p->tiff_datasize); } #endif #ifdef OJPEG_SUPPORT if(t2p->tiff_compression == COMPRESSION_OJPEG){ if(! t2p->pdf_ojpegdata){ TIFFError(TIFF2PDF_MODULE, "No support for OJPEG image %s with " "bad tables", TIFFFileName(input)); t2p->t2p_error = T2P_ERR_ERROR; return(0); } buffer=(unsigned char*) _TIFFmalloc(t2p->tiff_datasize); if(buffer==NULL){ TIFFError(TIFF2PDF_MODULE, "Can't allocate %u bytes of memory " "for t2p_readwrite_pdf_image, %s", t2p->tiff_datasize, TIFFFileName(input)); t2p->t2p_error = T2P_ERR_ERROR; return(0); } _TIFFmemcpy(buffer, t2p->pdf_ojpegdata, t2p->pdf_ojpegdatalength); if(edge!=0){ if(t2p_tile_is_bottom_edge(t2p->tiff_tiles[t2p->pdf_page], tile)){ buffer[7]= (t2p->tiff_tiles[t2p->pdf_page].tiles_edgetilelength >> 8) & 0xff; buffer[8]= (t2p->tiff_tiles[t2p->pdf_page].tiles_edgetilelength ) & 0xff; } if(t2p_tile_is_right_edge(t2p->tiff_tiles[t2p->pdf_page], tile)){ buffer[9]= (t2p->tiff_tiles[t2p->pdf_page].tiles_edgetilewidth >> 8) & 0xff; buffer[10]= (t2p->tiff_tiles[t2p->pdf_page].tiles_edgetilewidth ) & 0xff; } } bufferoffset=t2p->pdf_ojpegdatalength; bufferoffset+=TIFFReadRawTile(input, tile, (tdata_t) &(((unsigned char*)buffer)[bufferoffset]), -1); ((unsigned char*)buffer)[bufferoffset++]=0xff; ((unsigned char*)buffer)[bufferoffset++]=0xd9; TIFFWriteFile(output, (tdata_t) buffer, bufferoffset); _TIFFfree(buffer); return(bufferoffset); } #endif #ifdef JPEG_SUPPORT if(t2p->tiff_compression == COMPRESSION_JPEG){ unsigned char table_end[2]; buffer= (unsigned char*) _TIFFmalloc(t2p->tiff_datasize); if(buffer==NULL){ TIFFError(TIFF2PDF_MODULE, "Can't allocate %u bytes of memory " "for t2p_readwrite_pdf_image_tile, %s", t2p->tiff_datasize, TIFFFileName(input)); t2p->t2p_error = T2P_ERR_ERROR; return(0); } if(TIFFGetField(input, TIFFTAG_JPEGTABLES, &xuint16_1, &jpt) != 0) { if(xuint16_1 > 0){ _TIFFmemcpy(buffer, jpt, xuint16_1); bufferoffset += xuint16_1 - 2; table_end[0] = buffer[bufferoffset-2]; table_end[1] = buffer[bufferoffset-1]; } if(xuint16_1 > 0) { xuint32 = bufferoffset; bufferoffset += TIFFReadRawTile( input, tile, (tdata_t) &(((unsigned char*)buffer)[bufferoffset-2]), -1); buffer[xuint32-2]=table_end[0]; buffer[xuint32-1]=table_end[1]; } else { bufferoffset += TIFFReadRawTile( input, tile, (tdata_t) &(((unsigned char*)buffer)[bufferoffset]), -1); } } TIFFWriteFile(output, (tdata_t) buffer, bufferoffset); _TIFFfree(buffer); return(bufferoffset); } #endif (void)0; } if(t2p->pdf_sample==T2P_SAMPLE_NOTHING){ buffer = (unsigned char*) _TIFFmalloc(t2p->tiff_datasize); if(buffer==NULL){ TIFFError(TIFF2PDF_MODULE, "Can't allocate %u bytes of memory for " "t2p_readwrite_pdf_image_tile, %s", t2p->tiff_datasize, TIFFFileName(input)); t2p->t2p_error = T2P_ERR_ERROR; return(0); } read = TIFFReadEncodedTile( input, tile, (tdata_t) &buffer[bufferoffset], t2p->tiff_datasize); if(read==-1){ TIFFError(TIFF2PDF_MODULE, "Error on decoding tile %u of %s", tile, TIFFFileName(input)); _TIFFfree(buffer); t2p->t2p_error=T2P_ERR_ERROR; return(0); } } else { if(t2p->pdf_sample == T2P_SAMPLE_PLANAR_SEPARATE_TO_CONTIG){ septilesize=TIFFTileSize(input); septilecount=TIFFNumberOfTiles(input); tilecount=septilecount/t2p->tiff_samplesperpixel; buffer = (unsigned char*) _TIFFmalloc(t2p->tiff_datasize); if(buffer==NULL){ TIFFError(TIFF2PDF_MODULE, "Can't allocate %u bytes of memory " "for t2p_readwrite_pdf_image_tile, %s", t2p->tiff_datasize, TIFFFileName(input)); t2p->t2p_error = T2P_ERR_ERROR; return(0); } samplebuffer = (unsigned char*) _TIFFmalloc(t2p->tiff_datasize); if(samplebuffer==NULL){ TIFFError(TIFF2PDF_MODULE, "Can't allocate %u bytes of memory " "for t2p_readwrite_pdf_image_tile, %s", t2p->tiff_datasize, TIFFFileName(input)); t2p->t2p_error = T2P_ERR_ERROR; return(0); } samplebufferoffset=0; for(i=0;itiff_samplesperpixel;i++){ read = TIFFReadEncodedTile(input, tile + i*tilecount, (tdata_t) &(samplebuffer[samplebufferoffset]), septilesize); if(read==-1){ TIFFError(TIFF2PDF_MODULE, "Error on decoding tile %u of %s", tile + i*tilecount, TIFFFileName(input)); _TIFFfree(samplebuffer); _TIFFfree(buffer); t2p->t2p_error=T2P_ERR_ERROR; return(0); } samplebufferoffset+=read; } t2p_sample_planar_separate_to_contig( t2p, &(buffer[bufferoffset]), samplebuffer, samplebufferoffset); bufferoffset+=samplebufferoffset; _TIFFfree(samplebuffer); } if(buffer==NULL){ buffer = (unsigned char*) _TIFFmalloc(t2p->tiff_datasize); if(buffer==NULL){ TIFFError(TIFF2PDF_MODULE, "Can't allocate %u bytes of memory " "for t2p_readwrite_pdf_image_tile, %s", t2p->tiff_datasize, TIFFFileName(input)); t2p->t2p_error = T2P_ERR_ERROR; return(0); } read = TIFFReadEncodedTile( input, tile, (tdata_t) &buffer[bufferoffset], t2p->tiff_datasize); if(read==-1){ TIFFError(TIFF2PDF_MODULE, "Error on decoding tile %u of %s", tile, TIFFFileName(input)); _TIFFfree(buffer); t2p->t2p_error=T2P_ERR_ERROR; return(0); } } if(t2p->pdf_sample & T2P_SAMPLE_RGBA_TO_RGB){ t2p->tiff_datasize=t2p_sample_rgba_to_rgb( (tdata_t)buffer, t2p->tiff_tiles[t2p->pdf_page].tiles_tilewidth *t2p->tiff_tiles[t2p->pdf_page].tiles_tilelength); } if(t2p->pdf_sample & T2P_SAMPLE_RGBAA_TO_RGB){ t2p->tiff_datasize=t2p_sample_rgbaa_to_rgb( (tdata_t)buffer, t2p->tiff_tiles[t2p->pdf_page].tiles_tilewidth *t2p->tiff_tiles[t2p->pdf_page].tiles_tilelength); } if(t2p->pdf_sample & T2P_SAMPLE_YCBCR_TO_RGB){ TIFFError(TIFF2PDF_MODULE, "No support for YCbCr to RGB in tile for %s", TIFFFileName(input)); _TIFFfree(buffer); t2p->t2p_error = T2P_ERR_ERROR; return(0); } if(t2p->pdf_sample & T2P_SAMPLE_LAB_SIGNED_TO_UNSIGNED){ t2p->tiff_datasize=t2p_sample_lab_signed_to_unsigned( (tdata_t)buffer, t2p->tiff_tiles[t2p->pdf_page].tiles_tilewidth *t2p->tiff_tiles[t2p->pdf_page].tiles_tilelength); } } if(t2p_tile_is_right_edge(t2p->tiff_tiles[t2p->pdf_page], tile) != 0){ t2p_tile_collapse_left( buffer, TIFFTileRowSize(input), t2p->tiff_tiles[t2p->pdf_page].tiles_tilewidth, t2p->tiff_tiles[t2p->pdf_page].tiles_edgetilewidth, t2p->tiff_tiles[t2p->pdf_page].tiles_tilelength); } t2p_disable(output); TIFFSetField(output, TIFFTAG_PHOTOMETRIC, t2p->tiff_photometric); TIFFSetField(output, TIFFTAG_BITSPERSAMPLE, t2p->tiff_bitspersample); TIFFSetField(output, TIFFTAG_SAMPLESPERPIXEL, t2p->tiff_samplesperpixel); if(t2p_tile_is_right_edge(t2p->tiff_tiles[t2p->pdf_page], tile) == 0){ TIFFSetField( output, TIFFTAG_IMAGEWIDTH, t2p->tiff_tiles[t2p->pdf_page].tiles_tilewidth); } else { TIFFSetField( output, TIFFTAG_IMAGEWIDTH, t2p->tiff_tiles[t2p->pdf_page].tiles_edgetilewidth); } if(t2p_tile_is_bottom_edge(t2p->tiff_tiles[t2p->pdf_page], tile) == 0){ TIFFSetField( output, TIFFTAG_IMAGELENGTH, t2p->tiff_tiles[t2p->pdf_page].tiles_tilelength); TIFFSetField( output, TIFFTAG_ROWSPERSTRIP, t2p->tiff_tiles[t2p->pdf_page].tiles_tilelength); } else { TIFFSetField( output, TIFFTAG_IMAGELENGTH, t2p->tiff_tiles[t2p->pdf_page].tiles_edgetilelength); TIFFSetField( output, TIFFTAG_ROWSPERSTRIP, t2p->tiff_tiles[t2p->pdf_page].tiles_edgetilelength); } TIFFSetField(output, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG); TIFFSetField(output, TIFFTAG_FILLORDER, FILLORDER_MSB2LSB); switch(t2p->pdf_compression){ case T2P_COMPRESS_NONE: TIFFSetField(output, TIFFTAG_COMPRESSION, COMPRESSION_NONE); break; #ifdef CCITT_SUPPORT case T2P_COMPRESS_G4: TIFFSetField(output, TIFFTAG_COMPRESSION, COMPRESSION_CCITTFAX4); break; #endif #ifdef JPEG_SUPPORT case T2P_COMPRESS_JPEG: if(t2p->tiff_photometric==PHOTOMETRIC_YCBCR){ if(TIFFGetField(input, TIFFTAG_YCBCRSUBSAMPLING, &xuint16_1, &xuint16_2)!=0){ if(xuint16_1 != 0 && xuint16_2 != 0){ TIFFSetField(output, TIFFTAG_YCBCRSUBSAMPLING, xuint16_1, xuint16_2); } } if(TIFFGetField(input, TIFFTAG_REFERENCEBLACKWHITE, &xfloatp)!=0){ TIFFSetField(output, TIFFTAG_REFERENCEBLACKWHITE, xfloatp); } } TIFFSetField(output, TIFFTAG_COMPRESSION, COMPRESSION_JPEG); TIFFSetField(output, TIFFTAG_JPEGTABLESMODE, 0); /* JPEGTABLESMODE_NONE */ if(t2p->pdf_colorspace & (T2P_CS_RGB | T2P_CS_LAB)){ TIFFSetField(output, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_YCBCR); if(t2p->tiff_photometric != PHOTOMETRIC_YCBCR){ TIFFSetField(output, TIFFTAG_JPEGCOLORMODE, JPEGCOLORMODE_RGB); } else { TIFFSetField(output, TIFFTAG_JPEGCOLORMODE, JPEGCOLORMODE_RAW); } } if(t2p->pdf_colorspace & T2P_CS_GRAY){ (void)0; } if(t2p->pdf_colorspace & T2P_CS_CMYK){ (void)0; } if(t2p->pdf_defaultcompressionquality != 0){ TIFFSetField(output, TIFFTAG_JPEGQUALITY, t2p->pdf_defaultcompressionquality); } break; #endif #ifdef ZIP_SUPPORT case T2P_COMPRESS_ZIP: TIFFSetField(output, TIFFTAG_COMPRESSION, COMPRESSION_DEFLATE); if(t2p->pdf_defaultcompressionquality%100 != 0){ TIFFSetField(output, TIFFTAG_PREDICTOR, t2p->pdf_defaultcompressionquality % 100); } if(t2p->pdf_defaultcompressionquality/100 != 0){ TIFFSetField(output, TIFFTAG_ZIPQUALITY, (t2p->pdf_defaultcompressionquality / 100)); } break; #endif default: break; } t2p_enable(output); t2p->outputwritten = 0; bufferoffset=TIFFWriteEncodedStrip(output, (tstrip_t) 0, buffer, TIFFStripSize(output)); if(buffer != NULL){ _TIFFfree(buffer); buffer=NULL; } if(bufferoffset==-1){ TIFFError(TIFF2PDF_MODULE, "Error writing encoded tile to output PDF %s", TIFFFileName(output)); t2p->t2p_error = T2P_ERR_ERROR; return(0); } written= t2p->outputwritten; return(written); } #ifdef OJPEG_SUPPORT static int t2p_process_ojpeg_tables(T2P* t2p, TIFF* input){ uint16 proc=0; void* q; uint32 q_length=0; void* dc; uint32 dc_length=0; void* ac; uint32 ac_length=0; uint16* lp; uint16* pt; uint16 h_samp=1; uint16 v_samp=1; unsigned char* ojpegdata; uint16 table_count; uint32 offset_table; uint32 offset_ms_l; uint32 code_count; uint32 i=0; uint32 dest=0; uint16 ri=0; uint32 rows=0; if(!TIFFGetField(input, TIFFTAG_JPEGPROC, &proc)){ TIFFError(TIFF2PDF_MODULE, "Missing JPEGProc field in OJPEG image %s", TIFFFileName(input)); t2p->t2p_error = T2P_ERR_ERROR; return(0); } if(proc!=JPEGPROC_BASELINE && proc!=JPEGPROC_LOSSLESS){ TIFFError(TIFF2PDF_MODULE, "Bad JPEGProc field in OJPEG image %s", TIFFFileName(input)); t2p->t2p_error = T2P_ERR_ERROR; return(0); } if(!TIFFGetField(input, TIFFTAG_JPEGQTABLES, &q_length, &q)){ TIFFError(TIFF2PDF_MODULE, "Missing JPEGQTables field in OJPEG image %s", TIFFFileName(input)); t2p->t2p_error = T2P_ERR_ERROR; return(0); } if(q_length < (64U * t2p->tiff_samplesperpixel)){ TIFFError(TIFF2PDF_MODULE, "Bad JPEGQTables field in OJPEG image %s", TIFFFileName(input)); t2p->t2p_error = T2P_ERR_ERROR; return(0); } if(!TIFFGetField(input, TIFFTAG_JPEGDCTABLES, &dc_length, &dc)){ TIFFError(TIFF2PDF_MODULE, "Missing JPEGDCTables field in OJPEG image %s", TIFFFileName(input)); t2p->t2p_error = T2P_ERR_ERROR; return(0); } if(proc==JPEGPROC_BASELINE){ if(!TIFFGetField(input, TIFFTAG_JPEGACTABLES, &ac_length, &ac)){ TIFFError(TIFF2PDF_MODULE, "Missing JPEGACTables field in OJPEG image %s", TIFFFileName(input)); t2p->t2p_error = T2P_ERR_ERROR; return(0); } } else { if(!TIFFGetField(input, TIFFTAG_JPEGLOSSLESSPREDICTORS, &lp)){ TIFFError(TIFF2PDF_MODULE, "Missing JPEGLosslessPredictors field in OJPEG image %s", TIFFFileName(input)); t2p->t2p_error = T2P_ERR_ERROR; return(0); } if(!TIFFGetField(input, TIFFTAG_JPEGPOINTTRANSFORM, &pt)){ TIFFError(TIFF2PDF_MODULE, "Missing JPEGPointTransform field in OJPEG image %s", TIFFFileName(input)); t2p->t2p_error = T2P_ERR_ERROR; return(0); } } if(!TIFFGetField(input, TIFFTAG_YCBCRSUBSAMPLING, &h_samp, &v_samp)){ h_samp=1; v_samp=1; } if(t2p->pdf_ojpegdata != NULL){ _TIFFfree(t2p->pdf_ojpegdata); t2p->pdf_ojpegdata=NULL; } t2p->pdf_ojpegdata = _TIFFmalloc(2048); if(t2p->pdf_ojpegdata == NULL){ TIFFError(TIFF2PDF_MODULE, "Can't allocate %u bytes of memory for t2p_process_ojpeg_tables, %s", 2048, TIFFFileName(input)); return(0); } _TIFFmemset(t2p->pdf_ojpegdata, 0x00, 2048); t2p->pdf_ojpegdatalength = 0; table_count=t2p->tiff_samplesperpixel; if(proc==JPEGPROC_BASELINE){ if(table_count>2) table_count=2; } ojpegdata=(unsigned char*)t2p->pdf_ojpegdata; ojpegdata[t2p->pdf_ojpegdatalength++]=0xff; ojpegdata[t2p->pdf_ojpegdatalength++]=0xd8; ojpegdata[t2p->pdf_ojpegdatalength++]=0xff; if(proc==JPEGPROC_BASELINE){ ojpegdata[t2p->pdf_ojpegdatalength++]=0xc0; } else { ojpegdata[t2p->pdf_ojpegdatalength++]=0xc3; } ojpegdata[t2p->pdf_ojpegdatalength++]=0x00; ojpegdata[t2p->pdf_ojpegdatalength++]=(8 + 3*t2p->tiff_samplesperpixel); ojpegdata[t2p->pdf_ojpegdatalength++]=(t2p->tiff_bitspersample & 0xff); if(TIFFIsTiled(input)){ ojpegdata[t2p->pdf_ojpegdatalength++]= (t2p->tiff_tiles[t2p->pdf_page].tiles_tilelength >> 8) & 0xff; ojpegdata[t2p->pdf_ojpegdatalength++]= (t2p->tiff_tiles[t2p->pdf_page].tiles_tilelength ) & 0xff; ojpegdata[t2p->pdf_ojpegdatalength++]= (t2p->tiff_tiles[t2p->pdf_page].tiles_tilewidth >> 8) & 0xff; ojpegdata[t2p->pdf_ojpegdatalength++]= (t2p->tiff_tiles[t2p->pdf_page].tiles_tilewidth ) & 0xff; } else { ojpegdata[t2p->pdf_ojpegdatalength++]= (t2p->tiff_length >> 8) & 0xff; ojpegdata[t2p->pdf_ojpegdatalength++]= (t2p->tiff_length ) & 0xff; ojpegdata[t2p->pdf_ojpegdatalength++]= (t2p->tiff_width >> 8) & 0xff; ojpegdata[t2p->pdf_ojpegdatalength++]= (t2p->tiff_width ) & 0xff; } ojpegdata[t2p->pdf_ojpegdatalength++]=(t2p->tiff_samplesperpixel & 0xff); for(i=0;itiff_samplesperpixel;i++){ ojpegdata[t2p->pdf_ojpegdatalength++]=i; if(i==0){ ojpegdata[t2p->pdf_ojpegdatalength] |= h_samp<<4 & 0xf0;; ojpegdata[t2p->pdf_ojpegdatalength++] |= v_samp & 0x0f; } else { ojpegdata[t2p->pdf_ojpegdatalength++]= 0x11; } ojpegdata[t2p->pdf_ojpegdatalength++]=i; } for(dest=0;desttiff_samplesperpixel;dest++){ ojpegdata[t2p->pdf_ojpegdatalength++]=0xff; ojpegdata[t2p->pdf_ojpegdatalength++]=0xdb; ojpegdata[t2p->pdf_ojpegdatalength++]=0x00; ojpegdata[t2p->pdf_ojpegdatalength++]=0x43; ojpegdata[t2p->pdf_ojpegdatalength++]=dest; _TIFFmemcpy( &(ojpegdata[t2p->pdf_ojpegdatalength++]), &(((unsigned char*)q)[64*dest]), 64); t2p->pdf_ojpegdatalength+=64; } offset_table=0; for(dest=0;destpdf_ojpegdatalength++]=0xff; ojpegdata[t2p->pdf_ojpegdatalength++]=0xc4; offset_ms_l=t2p->pdf_ojpegdatalength; t2p->pdf_ojpegdatalength+=2; ojpegdata[t2p->pdf_ojpegdatalength++]=dest & 0x0f; _TIFFmemcpy( &(ojpegdata[t2p->pdf_ojpegdatalength]), &(((unsigned char*)dc)[offset_table]), 16); code_count=0; offset_table+=16; for(i=0;i<16;i++){ code_count+=ojpegdata[t2p->pdf_ojpegdatalength++]; } ojpegdata[offset_ms_l]=((19+code_count)>>8) & 0xff; ojpegdata[offset_ms_l+1]=(19+code_count) & 0xff; _TIFFmemcpy( &(ojpegdata[t2p->pdf_ojpegdatalength]), &(((unsigned char*)dc)[offset_table]), code_count); offset_table+=code_count; t2p->pdf_ojpegdatalength+=code_count; } if(proc==JPEGPROC_BASELINE){ offset_table=0; for(dest=0;destpdf_ojpegdatalength++]=0xff; ojpegdata[t2p->pdf_ojpegdatalength++]=0xc4; offset_ms_l=t2p->pdf_ojpegdatalength; t2p->pdf_ojpegdatalength+=2; ojpegdata[t2p->pdf_ojpegdatalength] |= 0x10; ojpegdata[t2p->pdf_ojpegdatalength++] |=dest & 0x0f; _TIFFmemcpy( &(ojpegdata[t2p->pdf_ojpegdatalength]), &(((unsigned char*)ac)[offset_table]), 16); code_count=0; offset_table+=16; for(i=0;i<16;i++){ code_count+=ojpegdata[t2p->pdf_ojpegdatalength++]; } ojpegdata[offset_ms_l]=((19+code_count)>>8) & 0xff; ojpegdata[offset_ms_l+1]=(19+code_count) & 0xff; _TIFFmemcpy( &(ojpegdata[t2p->pdf_ojpegdatalength]), &(((unsigned char*)ac)[offset_table]), code_count); offset_table+=code_count; t2p->pdf_ojpegdatalength+=code_count; } } if(TIFFNumberOfStrips(input)>1){ ojpegdata[t2p->pdf_ojpegdatalength++]=0xff; ojpegdata[t2p->pdf_ojpegdatalength++]=0xdd; ojpegdata[t2p->pdf_ojpegdatalength++]=0x00; ojpegdata[t2p->pdf_ojpegdatalength++]=0x04; h_samp*=8; v_samp*=8; ri=(t2p->tiff_width+h_samp-1) / h_samp; TIFFGetField(input, TIFFTAG_ROWSPERSTRIP, &rows); ri*=(rows+v_samp-1)/v_samp; ojpegdata[t2p->pdf_ojpegdatalength++]= (ri>>8) & 0xff; ojpegdata[t2p->pdf_ojpegdatalength++]= ri & 0xff; } ojpegdata[t2p->pdf_ojpegdatalength++]=0xff; ojpegdata[t2p->pdf_ojpegdatalength++]=0xda; ojpegdata[t2p->pdf_ojpegdatalength++]=0x00; ojpegdata[t2p->pdf_ojpegdatalength++]=(6 + 2*t2p->tiff_samplesperpixel); ojpegdata[t2p->pdf_ojpegdatalength++]=t2p->tiff_samplesperpixel & 0xff; for(i=0;itiff_samplesperpixel;i++){ ojpegdata[t2p->pdf_ojpegdatalength++]= i & 0xff; if(proc==JPEGPROC_BASELINE){ ojpegdata[t2p->pdf_ojpegdatalength] |= ( ( (i>(table_count-1U)) ? (table_count-1U) : i) << 4U) & 0xf0; ojpegdata[t2p->pdf_ojpegdatalength++] |= ( (i>(table_count-1U)) ? (table_count-1U) : i) & 0x0f; } else { ojpegdata[t2p->pdf_ojpegdatalength++] = (i << 4) & 0xf0; } } if(proc==JPEGPROC_BASELINE){ t2p->pdf_ojpegdatalength++; ojpegdata[t2p->pdf_ojpegdatalength++]=0x3f; t2p->pdf_ojpegdatalength++; } else { ojpegdata[t2p->pdf_ojpegdatalength++]= (lp[0] & 0xff); t2p->pdf_ojpegdatalength++; ojpegdata[t2p->pdf_ojpegdatalength++]= (pt[0] & 0x0f); } return(1); } #endif #ifdef JPEG_SUPPORT static int t2p_process_jpeg_strip( unsigned char* strip, tsize_t* striplength, unsigned char* buffer, tsize_t* bufferoffset, tstrip_t no, uint32 height){ tsize_t i=0; uint16 ri =0; uint16 v_samp=1; uint16 h_samp=1; int j=0; i++; while(i<(*striplength)){ switch( strip[i] ){ case 0xd8: i+=2; break; case 0xc0: case 0xc1: case 0xc3: case 0xc9: case 0xca: if(no==0){ _TIFFmemcpy(&(buffer[*bufferoffset]), &(strip[i-1]), strip[i+2]+2); for(j=0;j>4) > h_samp) h_samp = (buffer[*bufferoffset+11+(2*j)]>>4); if( (buffer[*bufferoffset+11+(2*j)] & 0x0f) > v_samp) v_samp = (buffer[*bufferoffset+11+(2*j)] & 0x0f); } v_samp*=8; h_samp*=8; ri=((( ((uint16)(buffer[*bufferoffset+5])<<8) | (uint16)(buffer[*bufferoffset+6]) )+v_samp-1)/ v_samp); ri*=((( ((uint16)(buffer[*bufferoffset+7])<<8) | (uint16)(buffer[*bufferoffset+8]) )+h_samp-1)/ h_samp); buffer[*bufferoffset+5]= (unsigned char) ((height>>8) & 0xff); buffer[*bufferoffset+6]= (unsigned char) (height & 0xff); *bufferoffset+=strip[i+2]+2; i+=strip[i+2]+2; buffer[(*bufferoffset)++]=0xff; buffer[(*bufferoffset)++]=0xdd; buffer[(*bufferoffset)++]=0x00; buffer[(*bufferoffset)++]=0x04; buffer[(*bufferoffset)++]=(ri >> 8) & 0xff; buffer[(*bufferoffset)++]= ri & 0xff; } else { i+=strip[i+2]+2; } break; case 0xc4: case 0xdb: _TIFFmemcpy(&(buffer[*bufferoffset]), &(strip[i-1]), strip[i+2]+2); *bufferoffset+=strip[i+2]+2; i+=strip[i+2]+2; break; case 0xda: if(no==0){ _TIFFmemcpy(&(buffer[*bufferoffset]), &(strip[i-1]), strip[i+2]+2); *bufferoffset+=strip[i+2]+2; i+=strip[i+2]+2; } else { buffer[(*bufferoffset)++]=0xff; buffer[(*bufferoffset)++]= (unsigned char)(0xd0 | ((no-1)%8)); i+=strip[i+2]+2; } _TIFFmemcpy(&(buffer[*bufferoffset]), &(strip[i-1]), (*striplength)-i-1); *bufferoffset+=(*striplength)-i-1; return(1); default: i+=strip[i+2]+2; } } return(0); } #endif /* This functions converts a tilewidth x tilelength buffer of samples into an edgetilewidth x tilelength buffer of samples. */ static void t2p_tile_collapse_left( tdata_t buffer, tsize_t scanwidth, uint32 tilewidth, uint32 edgetilewidth, uint32 tilelength){ uint32 i=0; tsize_t edgescanwidth=0; edgescanwidth = (scanwidth * edgetilewidth + (tilewidth - 1))/ tilewidth; for(i=i;it2p_error = T2P_ERR_ERROR; return; } t2p_enable(output); return; } static tsize_t t2p_sample_planar_separate_to_contig(T2P* t2p, unsigned char* buffer, unsigned char* samplebuffer, tsize_t samplebuffersize){ tsize_t stride=0; tsize_t i=0; tsize_t j=0; stride=samplebuffersize/t2p->tiff_samplesperpixel; for(i=0;itiff_samplesperpixel;j++){ buffer[i*t2p->tiff_samplesperpixel + j] = samplebuffer[i + j*stride]; } } return(samplebuffersize); } static tsize_t t2p_sample_realize_palette(T2P* t2p, unsigned char* buffer){ uint32 sample_count=0; uint16 component_count=0; uint32 palette_offset=0; uint32 sample_offset=0; uint32 i=0; uint32 j=0; sample_count=t2p->tiff_width*t2p->tiff_length; component_count=t2p->tiff_samplesperpixel; for(i=sample_count;i>0;i--){ palette_offset=buffer[i-1] * component_count; sample_offset= (i-1) * component_count; for(j=0;jpdf_palette[palette_offset+j]; } } return(0); } /* This functions converts in place a buffer of ABGR interleaved data into RGB interleaved data, discarding A. */ static tsize_t t2p_sample_abgr_to_rgb(tdata_t data, uint32 samplecount) { uint32 i=0; uint32 sample=0; for(i=0;i>8) & 0xff); ((char*)data)[i*3+2]= (char) ((sample>>16) & 0xff); } return(i*3); } /* * This functions converts in place a buffer of RGBA interleaved data * into RGB interleaved data, discarding A. */ static tsize_t t2p_sample_rgbaa_to_rgb(tdata_t data, uint32 samplecount) { uint32 i; for(i = 0; i < samplecount; i++) memcpy((uint8*)data + i * 3, (uint8*)data + i * 4, 3); return(i * 3); } /* * This functions converts in place a buffer of RGBA interleaved data * into RGB interleaved data, adding 255-A to each component sample. */ static tsize_t t2p_sample_rgba_to_rgb(tdata_t data, uint32 samplecount) { uint32 i = 0; uint32 sample = 0; uint8 alpha = 0; for (i = 0; i < samplecount; i++) { sample=((uint32*)data)[i]; alpha=(uint8)((255 - (sample & 0xff))); ((uint8 *)data)[i * 3] = (uint8) ((sample >> 24) & 0xff) + alpha; ((uint8 *)data)[i * 3 + 1] = (uint8) ((sample >> 16) & 0xff) + alpha; ((uint8 *)data)[i * 3 + 2] = (uint8) ((sample >> 8) & 0xff) + alpha; } return (i * 3); } /* This function converts the a and b samples of Lab data from signed to unsigned. */ static tsize_t t2p_sample_lab_signed_to_unsigned(tdata_t buffer, uint32 samplecount){ uint32 i=0; for(i=0;ipdf_majorversion&0xff, t2p->pdf_minorversion&0xff); written += TIFFWriteFile(output, (tdata_t) buffer, buflen); written += TIFFWriteFile(output, (tdata_t)"\r%\342\343\317\323\r\n", 8); return(written); } /* This function writes the beginning of a PDF object to output. */ static tsize_t t2p_write_pdf_obj_start(uint32 number, TIFF* output){ tsize_t written=0; char buffer[16]; int buflen=0; buflen=sprintf(buffer, "%lu", (unsigned long)number); written += TIFFWriteFile(output, (tdata_t) buffer, buflen ); written += TIFFWriteFile(output, (tdata_t) " 0 obj\r", 7); return(written); } /* This function writes the end of a PDF object to output. */ static tsize_t t2p_write_pdf_obj_end(TIFF* output){ tsize_t written=0; written += TIFFWriteFile(output, (tdata_t) "endobj\r", 7); return(written); } /* This function writes a PDF string object to output. */ static tsize_t t2p_write_pdf_string(char* pdfstr, TIFF* output){ tsize_t written=0; uint32 i=0; char buffer[5]; uint32 len=0; len=strlen(pdfstr); written += TIFFWriteFile(output, (tdata_t) "(", 1); for (i=0;i>\r", 4); return(written); } /* This function writes a number to output. */ static tsize_t t2p_write_pdf_stream_length(tsize_t len, TIFF* output){ tsize_t written=0; char buffer[16]; int buflen=0; buflen=sprintf(buffer, "%lu", (unsigned long)len); written += TIFFWriteFile(output, (tdata_t) buffer, buflen); written += TIFFWriteFile(output, (tdata_t) "\r", 1); return(written); } /* This function writes the PDF Catalog structure to output. */ static tsize_t t2p_write_pdf_catalog(T2P* t2p, TIFF* output){ tsize_t written=0; char buffer[16]; int buflen=0; written += TIFFWriteFile(output, (tdata_t)"<< \r/Type /Catalog \r/Pages ", 27); buflen=sprintf(buffer, "%lu", (unsigned long)t2p->pdf_pages); written += TIFFWriteFile(output, (tdata_t) buffer, buflen ); written += TIFFWriteFile(output, (tdata_t) " 0 R \r", 6); if(t2p->pdf_fitwindow){ written += TIFFWriteFile(output, (tdata_t) "/ViewerPreferences <>\r", 39); } written += TIFFWriteFile(output, (tdata_t)">>\r", 3); return(written); } /* This function writes the PDF Info structure to output. */ static tsize_t t2p_write_pdf_info(T2P* t2p, TIFF* input, TIFF* output){ tsize_t written=0; char* info; char buffer[512]; if(t2p->pdf_datetime==NULL){ t2p_pdf_tifftime(t2p, input); } if(strlen(t2p->pdf_datetime) > 0){ written += TIFFWriteFile(output, (tdata_t) "<< \r/CreationDate ", 18); written += t2p_write_pdf_string(t2p->pdf_datetime, output); written += TIFFWriteFile(output, (tdata_t) "\r/ModDate ", 10); written += t2p_write_pdf_string(t2p->pdf_datetime, output); } written += TIFFWriteFile(output, (tdata_t) "\r/Producer ", 11); _TIFFmemset((tdata_t)buffer, 0x00, 512); 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){ if(strlen(t2p->pdf_creator)>0){ if(strlen(t2p->pdf_creator)>511){t2p->pdf_creator[512]=(char)0;} written += TIFFWriteFile(output, (tdata_t) "/Creator ", 9); written += t2p_write_pdf_string(t2p->pdf_creator, output); written += TIFFWriteFile(output, (tdata_t) "\r", 1); } } else{ if( TIFFGetField(input, TIFFTAG_SOFTWARE, &info) != 0){ if(strlen(info)>511){info[512]=(char)0;} written += TIFFWriteFile(output, (tdata_t) "/Creator ", 9); written += t2p_write_pdf_string(info, output); written += TIFFWriteFile(output, (tdata_t) "\r", 1); } } if(t2p->pdf_author != NULL){ if(strlen(t2p->pdf_author)>0){ if(strlen(t2p->pdf_author)>511){t2p->pdf_author[512]=(char)0;} written += TIFFWriteFile(output, (tdata_t) "/Author ", 8); written += t2p_write_pdf_string(t2p->pdf_author, output); written += TIFFWriteFile(output, (tdata_t) "\r", 1); } } else{ if( TIFFGetField(input, TIFFTAG_ARTIST, &info) != 0){ if(strlen(info)>511){info[512]=(char)0;} written += TIFFWriteFile(output, (tdata_t) "/Author ", 8); written += t2p_write_pdf_string(info, output); written += TIFFWriteFile(output, (tdata_t) "\r", 1); } else if ( TIFFGetField(input, TIFFTAG_COPYRIGHT, &info) != 0){ if(strlen(info)>511){info[512]=(char)0;} written += TIFFWriteFile(output, (tdata_t) "/Author ", 8); written += t2p_write_pdf_string(info, output); written += TIFFWriteFile(output, (tdata_t) "\r", 1); } } if(t2p->pdf_title != NULL){ if(strlen(t2p->pdf_title)>0){ if(strlen(t2p->pdf_title)>511){t2p->pdf_title[512]=(char)0;} written += TIFFWriteFile(output, (tdata_t) "/Title ", 7); written += t2p_write_pdf_string(t2p->pdf_title, output); written += TIFFWriteFile(output, (tdata_t) "\r", 1); } } else{ if( TIFFGetField(input, TIFFTAG_DOCUMENTNAME, &info) != 0){ if(strlen(info)>511){info[512]=(char)0;} written += TIFFWriteFile(output, (tdata_t) "/Title ", 7); written += t2p_write_pdf_string(info, output); written += TIFFWriteFile(output, (tdata_t) "\r", 1); } } if(t2p->pdf_subject != NULL){ if(strlen(t2p->pdf_subject)>0){ if(strlen(t2p->pdf_subject)>511){t2p->pdf_subject[512]=(char)0;} written += TIFFWriteFile(output, (tdata_t) "/Subject ", 9); written += t2p_write_pdf_string(t2p->pdf_subject, output); written += TIFFWriteFile(output, (tdata_t) "\r", 1); } } else{ if( TIFFGetField(input, TIFFTAG_IMAGEDESCRIPTION, &info) != 0){ if(strlen(info)>511){info[512]=(char)0;} written += TIFFWriteFile(output, (tdata_t) "/Subject ", 9); written += t2p_write_pdf_string(info, output); written += TIFFWriteFile(output, (tdata_t) "\r", 1); } } if(t2p->pdf_keywords != NULL){ if(strlen(t2p->pdf_keywords)>0){ if(strlen(t2p->pdf_keywords)>511){t2p->pdf_keywords[512]=(char)0;} written += TIFFWriteFile(output, (tdata_t) "/Keywords ", 10); written += t2p_write_pdf_string(t2p->pdf_keywords, output); written += TIFFWriteFile(output, (tdata_t) "\r", 1); } } written += TIFFWriteFile(output, (tdata_t) ">> \r", 4); return(written); } /* This function fills a string of a T2P struct with the current time as a PDF date string, it is called by t2p_pdf_tifftime. */ static void t2p_pdf_currenttime(T2P* t2p){ struct tm* currenttime; time_t timenow; timenow=time(0); currenttime=localtime(&timenow); sprintf(t2p->pdf_datetime, "D:%.4d%.2d%.2d%.2d%.2d%.2d", (currenttime->tm_year+1900) % 65536, (currenttime->tm_mon+1) % 256, (currenttime->tm_mday) % 256, (currenttime->tm_hour) % 256, (currenttime->tm_min) % 256, (currenttime->tm_sec) % 256); return; } /* This function fills a string of a T2P struct with the date and time of a TIFF file if it exists or the current time as a PDF date string. */ static void t2p_pdf_tifftime(T2P* t2p, TIFF* input){ char* datetime; t2p->pdf_datetime= (char*) _TIFFmalloc(19); if(t2p->pdf_datetime==NULL){ TIFFError(TIFF2PDF_MODULE, "Can't allocate %u bytes of memory for t2p_pdf_tiff_time", 17); t2p->t2p_error = T2P_ERR_ERROR; return; } t2p->pdf_datetime[16]=0; if( TIFFGetField(input, TIFFTAG_DATETIME, &datetime) != 0 && (strlen(datetime) >= 19) ){ t2p->pdf_datetime[0]='D'; t2p->pdf_datetime[1]=':'; t2p->pdf_datetime[2]=datetime[0]; t2p->pdf_datetime[3]=datetime[1]; t2p->pdf_datetime[4]=datetime[2]; t2p->pdf_datetime[5]=datetime[3]; t2p->pdf_datetime[6]=datetime[5]; t2p->pdf_datetime[7]=datetime[6]; t2p->pdf_datetime[8]=datetime[8]; t2p->pdf_datetime[9]=datetime[9]; t2p->pdf_datetime[10]=datetime[11]; t2p->pdf_datetime[11]=datetime[12]; t2p->pdf_datetime[12]=datetime[14]; t2p->pdf_datetime[13]=datetime[15]; t2p->pdf_datetime[14]=datetime[17]; t2p->pdf_datetime[15]=datetime[18]; } else { t2p_pdf_currenttime(t2p); } return; } /* This function writes a PDF Pages Tree structure to output. */ static tsize_t t2p_write_pdf_pages(T2P* t2p, TIFF* output){ tsize_t written=0; tdir_t i=0; char buffer[16]; int buflen=0; int page=0; written += TIFFWriteFile(output, (tdata_t) "<< \r/Type /Pages \r/Kids [ ", 26); page = t2p->pdf_pages+1; for (i=0;itiff_pagecount;i++){ buflen=sprintf(buffer, "%d", page); written += TIFFWriteFile(output, (tdata_t) buffer, buflen); written += TIFFWriteFile(output, (tdata_t) " 0 R ", 5); if ( ((i+1)%8)==0 ) { written += TIFFWriteFile(output, (tdata_t) "\r", 1); } page +=3; page += t2p->tiff_pages[i].page_extra; if(t2p->tiff_pages[i].page_tilecount>0){ page += (2 * t2p->tiff_pages[i].page_tilecount); } else { page +=2; } } written += TIFFWriteFile(output, (tdata_t) "] \r/Count ", 10); _TIFFmemset(buffer, 0x00, 16); buflen=sprintf(buffer, "%d", t2p->tiff_pagecount); written += TIFFWriteFile(output, (tdata_t) buffer, buflen); written += TIFFWriteFile(output, (tdata_t) " \r>> \r", 6); return(written); } /* This function writes a PDF Page structure to output. */ static tsize_t t2p_write_pdf_page(uint32 object, T2P* t2p, TIFF* output){ unsigned int i=0; tsize_t written=0; char buffer[16]; int buflen=0; written += TIFFWriteFile(output, (tdata_t) "<<\r/Type /Page \r/Parent ", 24); buflen=sprintf(buffer, "%lu", (unsigned long)t2p->pdf_pages); written += TIFFWriteFile(output, (tdata_t) buffer, buflen); written += TIFFWriteFile(output, (tdata_t) " 0 R \r", 6); written += TIFFWriteFile(output, (tdata_t) "/MediaBox [", 11); buflen=sprintf(buffer, "%.4f",t2p->pdf_mediabox.x1); written += TIFFWriteFile(output, (tdata_t) buffer, buflen); written += TIFFWriteFile(output, (tdata_t) " ", 1); buflen=sprintf(buffer, "%.4f",t2p->pdf_mediabox.y1); written += TIFFWriteFile(output, (tdata_t) buffer, buflen); written += TIFFWriteFile(output, (tdata_t) " ", 1); buflen=sprintf(buffer, "%.4f",t2p->pdf_mediabox.x2); written += TIFFWriteFile(output, (tdata_t) buffer, buflen); written += TIFFWriteFile(output, (tdata_t) " ", 1); buflen=sprintf(buffer, "%.4f",t2p->pdf_mediabox.y2); written += TIFFWriteFile(output, (tdata_t) buffer, buflen); written += TIFFWriteFile(output, (tdata_t) "] \r", 3); written += TIFFWriteFile(output, (tdata_t) "/Contents ", 10); buflen=sprintf(buffer, "%lu", (unsigned long)(object + 1)); written += TIFFWriteFile(output, (tdata_t) buffer, buflen); written += TIFFWriteFile(output, (tdata_t) " 0 R \r", 6); written += TIFFWriteFile(output, (tdata_t) "/Resources << \r", 15); if( t2p->tiff_tiles[t2p->pdf_page].tiles_tilecount != 0 ){ written += TIFFWriteFile(output, (tdata_t) "/XObject <<\r", 12); for(i=0;itiff_tiles[t2p->pdf_page].tiles_tilecount;i++){ written += TIFFWriteFile(output, (tdata_t) "/Im", 3); buflen = sprintf(buffer, "%u", t2p->pdf_page+1); written += TIFFWriteFile(output, (tdata_t) buffer, buflen); written += TIFFWriteFile(output, (tdata_t) "_", 1); buflen = sprintf(buffer, "%u", i+1); written += TIFFWriteFile(output, (tdata_t) buffer, buflen); written += TIFFWriteFile(output, (tdata_t) " ", 1); buflen = sprintf( buffer, "%lu", (unsigned long)(object+3+(2*i)+t2p->tiff_pages[t2p->pdf_page].page_extra)); written += TIFFWriteFile(output, (tdata_t) buffer, buflen); written += TIFFWriteFile(output, (tdata_t) " 0 R ", 5); if(i%4==3){ written += TIFFWriteFile(output, (tdata_t) "\r", 1); } } written += TIFFWriteFile(output, (tdata_t) ">>\r", 3); } else { written += TIFFWriteFile(output, (tdata_t) "/XObject <<\r", 12); written += TIFFWriteFile(output, (tdata_t) "/Im", 3); buflen = sprintf(buffer, "%u", t2p->pdf_page+1); written += TIFFWriteFile(output, (tdata_t) buffer, buflen); written += TIFFWriteFile(output, (tdata_t) " ", 1); buflen = sprintf( buffer, "%lu", (unsigned long)(object+3+(2*i)+t2p->tiff_pages[t2p->pdf_page].page_extra)); written += TIFFWriteFile(output, (tdata_t) buffer, buflen); written += TIFFWriteFile(output, (tdata_t) " 0 R ", 5); written += TIFFWriteFile(output, (tdata_t) ">>\r", 3); } if(t2p->tiff_transferfunctioncount != 0) { written += TIFFWriteFile(output, (tdata_t) "/ExtGState <<", 13); TIFFWriteFile(output, (tdata_t) "/GS1 ", 5); buflen = sprintf( buffer, "%lu", (unsigned long)(object + 3)); written += TIFFWriteFile(output, (tdata_t) buffer, buflen); written += TIFFWriteFile(output, (tdata_t) " 0 R ", 5); written += TIFFWriteFile(output, (tdata_t) ">> \r", 4); } written += TIFFWriteFile(output, (tdata_t) "/ProcSet [ ", 11); if(t2p->pdf_colorspace == T2P_CS_BILEVEL || t2p->pdf_colorspace == T2P_CS_GRAY ){ written += TIFFWriteFile(output, (tdata_t) "/ImageB ", 8); } else { written += TIFFWriteFile(output, (tdata_t) "/ImageC ", 8); if(t2p->pdf_colorspace & T2P_CS_PALETTE){ written += TIFFWriteFile(output, (tdata_t) "/ImageI ", 8); } } written += TIFFWriteFile(output, (tdata_t) "]\r>>\r>>\r", 8); return(written); } /* This function composes the page size and image and tile locations on a page. */ static void t2p_compose_pdf_page(T2P* t2p){ uint32 i=0; uint32 i2=0; T2P_TILE* tiles=NULL; T2P_BOX* boxp=NULL; uint32 tilecountx=0; uint32 tilecounty=0; uint32 tilewidth=0; uint32 tilelength=0; int istiled=0; float f=0; t2p->pdf_xres = t2p->tiff_xres; t2p->pdf_yres = t2p->tiff_yres; if(t2p->pdf_overrideres){ t2p->pdf_xres = t2p->pdf_defaultxres; t2p->pdf_yres = t2p->pdf_defaultyres; } if(t2p->pdf_xres==0.0){ t2p->pdf_xres = t2p->pdf_defaultxres; } if(t2p->pdf_yres==0.0){ t2p->pdf_yres = t2p->pdf_defaultyres; } t2p->pdf_imagewidth=((float)(t2p->tiff_width)) *72.0F / t2p->pdf_xres; t2p->pdf_imagelength=((float)(t2p->tiff_length)) *72.0F / t2p->pdf_yres; if(t2p->pdf_overridepagesize != 0){ t2p->pdf_pagewidth = t2p->pdf_defaultpagewidth; t2p->pdf_pagelength = t2p->pdf_defaultpagelength; } else { t2p->pdf_pagewidth = t2p->pdf_imagewidth; t2p->pdf_pagelength = t2p->pdf_imagelength; } t2p->pdf_mediabox.x1=0.0; t2p->pdf_mediabox.y1=0.0; t2p->pdf_mediabox.x2=t2p->pdf_pagewidth; t2p->pdf_mediabox.y2=t2p->pdf_pagelength; t2p->pdf_imagebox.x1=0.0; t2p->pdf_imagebox.y1=0.0; t2p->pdf_imagebox.x2=t2p->pdf_imagewidth; t2p->pdf_imagebox.y2=t2p->pdf_imagelength; if(t2p->pdf_overridepagesize!=0){ t2p->pdf_imagebox.x1+=((t2p->pdf_pagewidth-t2p->pdf_imagewidth)/2.0F); t2p->pdf_imagebox.y1+=((t2p->pdf_pagelength-t2p->pdf_imagelength)/2.0F); t2p->pdf_imagebox.x2+=((t2p->pdf_pagewidth-t2p->pdf_imagewidth)/2.0F); t2p->pdf_imagebox.y2+=((t2p->pdf_pagelength-t2p->pdf_imagelength)/2.0F); } if(t2p->tiff_orientation > 4){ f=t2p->pdf_mediabox.x2; t2p->pdf_mediabox.x2=t2p->pdf_mediabox.y2; t2p->pdf_mediabox.y2=f; } istiled=((t2p->tiff_tiles[t2p->pdf_page]).tiles_tilecount==0) ? 0 : 1; if(istiled==0){ t2p_compose_pdf_page_orient(&(t2p->pdf_imagebox), t2p->tiff_orientation); return; } else { tilewidth=(t2p->tiff_tiles[t2p->pdf_page]).tiles_tilewidth; tilelength=(t2p->tiff_tiles[t2p->pdf_page]).tiles_tilelength; tilecountx=(t2p->tiff_width + tilewidth -1)/ tilewidth; (t2p->tiff_tiles[t2p->pdf_page]).tiles_tilecountx=tilecountx; tilecounty=(t2p->tiff_length + tilelength -1)/ tilelength; (t2p->tiff_tiles[t2p->pdf_page]).tiles_tilecounty=tilecounty; (t2p->tiff_tiles[t2p->pdf_page]).tiles_edgetilewidth= t2p->tiff_width % tilewidth; (t2p->tiff_tiles[t2p->pdf_page]).tiles_edgetilelength= t2p->tiff_length % tilelength; tiles=(t2p->tiff_tiles[t2p->pdf_page]).tiles_tiles; for(i2=0;i2x1 = t2p->pdf_imagebox.x1 + ((float)(t2p->pdf_imagewidth * i * tilewidth) / (float)t2p->tiff_width); boxp->x2 = t2p->pdf_imagebox.x1 + ((float)(t2p->pdf_imagewidth * (i+1) * tilewidth) / (float)t2p->tiff_width); boxp->y1 = t2p->pdf_imagebox.y2 - ((float)(t2p->pdf_imagelength * (i2+1) * tilelength) / (float)t2p->tiff_length); boxp->y2 = t2p->pdf_imagebox.y2 - ((float)(t2p->pdf_imagelength * i2 * tilelength) / (float)t2p->tiff_length); } boxp=&(tiles[i2*tilecountx+i].tile_box); boxp->x1 = t2p->pdf_imagebox.x1 + ((float)(t2p->pdf_imagewidth * i * tilewidth) / (float)t2p->tiff_width); boxp->x2 = t2p->pdf_imagebox.x2; boxp->y1 = t2p->pdf_imagebox.y2 - ((float)(t2p->pdf_imagelength * (i2+1) * tilelength) / (float)t2p->tiff_length); boxp->y2 = t2p->pdf_imagebox.y2 - ((float)(t2p->pdf_imagelength * i2 * tilelength) / (float)t2p->tiff_length); } for(i=0;ix1 = t2p->pdf_imagebox.x1 + ((float)(t2p->pdf_imagewidth * i * tilewidth) / (float)t2p->tiff_width); boxp->x2 = t2p->pdf_imagebox.x1 + ((float)(t2p->pdf_imagewidth * (i+1) * tilewidth) / (float)t2p->tiff_width); boxp->y1 = t2p->pdf_imagebox.y1; boxp->y2 = t2p->pdf_imagebox.y2 - ((float)(t2p->pdf_imagelength * i2 * tilelength) / (float)t2p->tiff_length); } boxp=&(tiles[i2*tilecountx+i].tile_box); boxp->x1 = t2p->pdf_imagebox.x1 + ((float)(t2p->pdf_imagewidth * i * tilewidth) / (float)t2p->tiff_width); boxp->x2 = t2p->pdf_imagebox.x2; boxp->y1 = t2p->pdf_imagebox.y1; boxp->y2 = t2p->pdf_imagebox.y2 - ((float)(t2p->pdf_imagelength * i2 * tilelength) / (float)t2p->tiff_length); } if(t2p->tiff_orientation==0 || t2p->tiff_orientation==1){ for(i=0;i<(t2p->tiff_tiles[t2p->pdf_page]).tiles_tilecount;i++){ t2p_compose_pdf_page_orient( &(tiles[i].tile_box) , 0); } return; } for(i=0;i<(t2p->tiff_tiles[t2p->pdf_page]).tiles_tilecount;i++){ boxp=&(tiles[i].tile_box); boxp->x1 -= t2p->pdf_imagebox.x1; boxp->x2 -= t2p->pdf_imagebox.x1; boxp->y1 -= t2p->pdf_imagebox.y1; boxp->y2 -= t2p->pdf_imagebox.y1; if(t2p->tiff_orientation==2 || t2p->tiff_orientation==3){ boxp->x1 = t2p->pdf_imagebox.x2 - t2p->pdf_imagebox.x1 - boxp->x1; boxp->x2 = t2p->pdf_imagebox.x2 - t2p->pdf_imagebox.x1 - boxp->x2; } if(t2p->tiff_orientation==3 || t2p->tiff_orientation==4){ boxp->y1 = t2p->pdf_imagebox.y2 - t2p->pdf_imagebox.y1 - boxp->y1; boxp->y2 = t2p->pdf_imagebox.y2 - t2p->pdf_imagebox.y1 - boxp->y2; } if(t2p->tiff_orientation==8 || t2p->tiff_orientation==5){ boxp->y1 = t2p->pdf_imagebox.y2 - t2p->pdf_imagebox.y1 - boxp->y1; boxp->y2 = t2p->pdf_imagebox.y2 - t2p->pdf_imagebox.y1 - boxp->y2; } if(t2p->tiff_orientation==5 || t2p->tiff_orientation==6){ boxp->x1 = t2p->pdf_imagebox.x2 - t2p->pdf_imagebox.x1 - boxp->x1; boxp->x2 = t2p->pdf_imagebox.x2 - t2p->pdf_imagebox.x1 - boxp->x2; } if(t2p->tiff_orientation > 4){ f=boxp->x1; boxp->x1 = boxp->y1; boxp->y1 = f; f=boxp->x2; boxp->x2 = boxp->y2; boxp->y2 = f; t2p_compose_pdf_page_orient_flip(boxp, t2p->tiff_orientation); } else { t2p_compose_pdf_page_orient(boxp, t2p->tiff_orientation); } } return; } static void t2p_compose_pdf_page_orient(T2P_BOX* boxp, uint16 orientation){ float m1[9]; float f=0.0; if( boxp->x1 > boxp->x2){ f=boxp->x1; boxp->x1=boxp->x2; boxp->x2 = f; } if( boxp->y1 > boxp->y2){ f=boxp->y1; boxp->y1=boxp->y2; boxp->y2 = f; } boxp->mat[0]=m1[0]=boxp->x2-boxp->x1; boxp->mat[1]=m1[1]=0.0; boxp->mat[2]=m1[2]=0.0; boxp->mat[3]=m1[3]=0.0; boxp->mat[4]=m1[4]=boxp->y2-boxp->y1; boxp->mat[5]=m1[5]=0.0; boxp->mat[6]=m1[6]=boxp->x1; boxp->mat[7]=m1[7]=boxp->y1; boxp->mat[8]=m1[8]=1.0; switch(orientation){ case 0: case 1: break; case 2: boxp->mat[0]=0.0F-m1[0]; boxp->mat[6]+=m1[0]; break; case 3: boxp->mat[0]=0.0F-m1[0]; boxp->mat[4]=0.0F-m1[4]; boxp->mat[6]+=m1[0]; boxp->mat[7]+=m1[4]; break; case 4: boxp->mat[4]=0.0F-m1[4]; boxp->mat[7]+=m1[4]; break; case 5: boxp->mat[0]=0.0F; boxp->mat[1]=0.0F-m1[0]; boxp->mat[3]=0.0F-m1[4]; boxp->mat[4]=0.0F; boxp->mat[6]+=m1[4]; boxp->mat[7]+=m1[0]; break; case 6: boxp->mat[0]=0.0F; boxp->mat[1]=0.0F-m1[0]; boxp->mat[3]=m1[4]; boxp->mat[4]=0.0F; boxp->mat[7]+=m1[0]; break; case 7: boxp->mat[0]=0.0F; boxp->mat[1]=m1[0]; boxp->mat[3]=m1[4]; boxp->mat[4]=0.0F; break; case 8: boxp->mat[0]=0.0F; boxp->mat[1]=m1[0]; boxp->mat[3]=0.0F-m1[4]; boxp->mat[4]=0.0F; boxp->mat[6]+=m1[4]; break; } return; } static void t2p_compose_pdf_page_orient_flip(T2P_BOX* boxp, uint16 orientation){ float m1[9]; float f=0.0; if( boxp->x1 > boxp->x2){ f=boxp->x1; boxp->x1=boxp->x2; boxp->x2 = f; } if( boxp->y1 > boxp->y2){ f=boxp->y1; boxp->y1=boxp->y2; boxp->y2 = f; } boxp->mat[0]=m1[0]=boxp->x2-boxp->x1; boxp->mat[1]=m1[1]=0.0F; boxp->mat[2]=m1[2]=0.0F; boxp->mat[3]=m1[3]=0.0F; boxp->mat[4]=m1[4]=boxp->y2-boxp->y1; boxp->mat[5]=m1[5]=0.0F; boxp->mat[6]=m1[6]=boxp->x1; boxp->mat[7]=m1[7]=boxp->y1; boxp->mat[8]=m1[8]=1.0F; switch(orientation){ case 5: boxp->mat[0]=0.0F; boxp->mat[1]=0.0F-m1[4]; boxp->mat[3]=0.0F-m1[0]; boxp->mat[4]=0.0F; boxp->mat[6]+=m1[0]; boxp->mat[7]+=m1[4]; break; case 6: boxp->mat[0]=0.0F; boxp->mat[1]=0.0F-m1[4]; boxp->mat[3]=m1[0]; boxp->mat[4]=0.0F; boxp->mat[7]+=m1[4]; break; case 7: boxp->mat[0]=0.0F; boxp->mat[1]=m1[4]; boxp->mat[3]=m1[0]; boxp->mat[4]=0.0F; break; case 8: boxp->mat[0]=0.0F; boxp->mat[1]=m1[4]; boxp->mat[3]=0.0F-m1[0]; boxp->mat[4]=0.0F; boxp->mat[6]+=m1[0]; break; } return; } /* This function writes a PDF Contents stream to output. */ static tsize_t t2p_write_pdf_page_content_stream(T2P* t2p, TIFF* output){ tsize_t written=0; ttile_t i=0; char buffer[512]; int buflen=0; T2P_BOX box; if(t2p->tiff_tiles[t2p->pdf_page].tiles_tilecount>0){ for(i=0;itiff_tiles[t2p->pdf_page].tiles_tilecount; i++){ box=t2p->tiff_tiles[t2p->pdf_page].tiles_tiles[i].tile_box; buflen=sprintf(buffer, "q %s %.4f %.4f %.4f %.4f %.4f %.4f cm /Im%d_%ld Do Q\r", t2p->tiff_transferfunctioncount?"/GS1 gs ":"", box.mat[0], box.mat[1], box.mat[3], box.mat[4], box.mat[6], box.mat[7], t2p->pdf_page + 1, (long)(i + 1)); written += t2p_write_pdf_stream(buffer, buflen, output); } } else { box=t2p->pdf_imagebox; buflen=sprintf(buffer, "q %s %.4f %.4f %.4f %.4f %.4f %.4f cm /Im%d Do Q\r", t2p->tiff_transferfunctioncount?"/GS1 gs ":"", box.mat[0], box.mat[1], box.mat[3], box.mat[4], box.mat[6], box.mat[7], t2p->pdf_page+1); written += t2p_write_pdf_stream(buffer, buflen, output); } return(written); } /* This function writes a PDF Image XObject stream dictionary to output. */ static tsize_t t2p_write_pdf_xobject_stream_dict(ttile_t tile, T2P* t2p, TIFF* output){ tsize_t written=0; char buffer[16]; int buflen=0; written += t2p_write_pdf_stream_dict(0, t2p->pdf_xrefcount+1, output); written += TIFFWriteFile(output, (tdata_t) "/Type /XObject \r/Subtype /Image \r/Name /Im", 42); buflen=sprintf(buffer, "%u", t2p->pdf_page+1); written += TIFFWriteFile(output, (tdata_t) buffer, buflen); if(tile != 0){ written += TIFFWriteFile(output, (tdata_t) "_", 1); buflen=sprintf(buffer, "%lu", (unsigned long)tile); written += TIFFWriteFile(output, (tdata_t) buffer, buflen); } written += TIFFWriteFile(output, (tdata_t) "\r/Width ", 8); _TIFFmemset((tdata_t)buffer, 0x00, 16); if(tile==0){ buflen=sprintf(buffer, "%lu", (unsigned long)t2p->tiff_width); } else { if(t2p_tile_is_right_edge(t2p->tiff_tiles[t2p->pdf_page], tile-1)!=0){ buflen=sprintf( buffer, "%lu", (unsigned long)t2p->tiff_tiles[t2p->pdf_page].tiles_edgetilewidth); } else { buflen=sprintf( buffer, "%lu", (unsigned long)t2p->tiff_tiles[t2p->pdf_page].tiles_tilewidth); } } written += TIFFWriteFile(output, (tdata_t) buffer, buflen); written += TIFFWriteFile(output, (tdata_t) "\r/Height ", 9); _TIFFmemset((tdata_t)buffer, 0x00, 16); if(tile==0){ buflen=sprintf(buffer, "%lu", (unsigned long)t2p->tiff_length); } else { if(t2p_tile_is_bottom_edge(t2p->tiff_tiles[t2p->pdf_page], tile-1)!=0){ buflen=sprintf( buffer, "%lu", (unsigned long)t2p->tiff_tiles[t2p->pdf_page].tiles_edgetilelength); } else { buflen=sprintf( buffer, "%lu", (unsigned long)t2p->tiff_tiles[t2p->pdf_page].tiles_tilelength); } } written += TIFFWriteFile(output, (tdata_t) buffer, buflen); written += TIFFWriteFile(output, (tdata_t) "\r/BitsPerComponent ", 19); _TIFFmemset((tdata_t)buffer, 0x00, 16); buflen=sprintf(buffer, "%u", t2p->tiff_bitspersample); written += TIFFWriteFile(output, (tdata_t) buffer, buflen); written += TIFFWriteFile(output, (tdata_t) "\r/ColorSpace ", 13); written += t2p_write_pdf_xobject_cs(t2p, output); if (t2p->pdf_image_interpolate) written += TIFFWriteFile(output, (tdata_t) "\r/Interpolate true", 18); if( (t2p->pdf_switchdecode != 0) #ifdef CCITT_SUPPORT && ! (t2p->pdf_colorspace == T2P_CS_BILEVEL && t2p->pdf_compression == T2P_COMPRESS_G4) #endif ){ written += t2p_write_pdf_xobject_decode(t2p, output); } written += t2p_write_pdf_xobject_stream_filter(tile, t2p, output); return(written); } /* * This function writes a PDF Image XObject Colorspace name to output. */ static tsize_t t2p_write_pdf_xobject_cs(T2P* t2p, TIFF* output){ tsize_t written=0; char buffer[128]; int buflen=0; float X_W=1.0; float Y_W=1.0; float Z_W=1.0; if( (t2p->pdf_colorspace & T2P_CS_ICCBASED) != 0){ written += t2p_write_pdf_xobject_icccs(t2p, output); return(written); } if( (t2p->pdf_colorspace & T2P_CS_PALETTE) != 0){ written += TIFFWriteFile(output, (tdata_t) "[ /Indexed ", 11); t2p->pdf_colorspace ^= T2P_CS_PALETTE; written += t2p_write_pdf_xobject_cs(t2p, output); t2p->pdf_colorspace |= T2P_CS_PALETTE; buflen=sprintf(buffer, "%u", (0x0001 << t2p->tiff_bitspersample)-1 ); written += TIFFWriteFile(output, (tdata_t) buffer, buflen); written += TIFFWriteFile(output, (tdata_t) " ", 1); _TIFFmemset(buffer, 0x00, 16); buflen=sprintf(buffer, "%lu", (unsigned long)t2p->pdf_palettecs ); written += TIFFWriteFile(output, (tdata_t) buffer, buflen); written += TIFFWriteFile(output, (tdata_t) " 0 R ]\r", 7); return(written); } if(t2p->pdf_colorspace & T2P_CS_BILEVEL){ written += TIFFWriteFile(output, (tdata_t) "/DeviceGray \r", 13); } if(t2p->pdf_colorspace & T2P_CS_GRAY){ if(t2p->pdf_colorspace & T2P_CS_CALGRAY){ written += t2p_write_pdf_xobject_calcs(t2p, output); } else { written += TIFFWriteFile(output, (tdata_t) "/DeviceGray \r", 13); } } if(t2p->pdf_colorspace & T2P_CS_RGB){ if(t2p->pdf_colorspace & T2P_CS_CALRGB){ written += t2p_write_pdf_xobject_calcs(t2p, output); } else { written += TIFFWriteFile(output, (tdata_t) "/DeviceRGB \r", 12); } } if(t2p->pdf_colorspace & T2P_CS_CMYK){ written += TIFFWriteFile(output, (tdata_t) "/DeviceCMYK \r", 13); } if(t2p->pdf_colorspace & T2P_CS_LAB){ written += TIFFWriteFile(output, (tdata_t) "[/Lab << \r", 10); written += TIFFWriteFile(output, (tdata_t) "/WhitePoint ", 12); X_W = t2p->tiff_whitechromaticities[0]; Y_W = t2p->tiff_whitechromaticities[1]; Z_W = 1.0F - (X_W + Y_W); X_W /= Y_W; Z_W /= Y_W; Y_W = 1.0F; buflen=sprintf(buffer, "[%.4f %.4f %.4f] \r", X_W, Y_W, Z_W); written += TIFFWriteFile(output, (tdata_t) buffer, buflen); X_W = 0.3457F; /* 0.3127F; */ /* D50, commented D65 */ Y_W = 0.3585F; /* 0.3290F; */ Z_W = 1.0F - (X_W + Y_W); X_W /= Y_W; Z_W /= Y_W; Y_W = 1.0F; buflen=sprintf(buffer, "[%.4f %.4f %.4f] \r", X_W, Y_W, Z_W); written += TIFFWriteFile(output, (tdata_t) buffer, buflen); written += TIFFWriteFile(output, (tdata_t) "/Range ", 7); buflen=sprintf(buffer, "[%d %d %d %d] \r", t2p->pdf_labrange[0], t2p->pdf_labrange[1], t2p->pdf_labrange[2], t2p->pdf_labrange[3]); written += TIFFWriteFile(output, (tdata_t) buffer, buflen); written += TIFFWriteFile(output, (tdata_t) ">>] \r", 5); } return(written); } static tsize_t t2p_write_pdf_transfer(T2P* t2p, TIFF* output){ tsize_t written=0; char buffer[16]; int buflen=0; written += TIFFWriteFile(output, (tdata_t) "<< /Type /ExtGState \r/TR ", 25); if(t2p->tiff_transferfunctioncount == 1){ buflen=sprintf(buffer, "%lu", (unsigned long)(t2p->pdf_xrefcount + 1)); written += TIFFWriteFile(output, (tdata_t) buffer, buflen); written += TIFFWriteFile(output, (tdata_t) " 0 R ", 5); } else { written += TIFFWriteFile(output, (tdata_t) "[ ", 2); buflen=sprintf(buffer, "%lu", (unsigned long)(t2p->pdf_xrefcount + 1)); written += TIFFWriteFile(output, (tdata_t) buffer, buflen); written += TIFFWriteFile(output, (tdata_t) " 0 R ", 5); buflen=sprintf(buffer, "%lu", (unsigned long)(t2p->pdf_xrefcount + 2)); written += TIFFWriteFile(output, (tdata_t) buffer, buflen); written += TIFFWriteFile(output, (tdata_t) " 0 R ", 5); buflen=sprintf(buffer, "%lu", (unsigned long)(t2p->pdf_xrefcount + 3)); written += TIFFWriteFile(output, (tdata_t) buffer, buflen); written += TIFFWriteFile(output, (tdata_t) " 0 R ", 5); written += TIFFWriteFile(output, (tdata_t) "/Identity ] ", 12); } written += TIFFWriteFile(output, (tdata_t) " >> \r", 5); return(written); } static tsize_t t2p_write_pdf_transfer_dict(T2P* t2p, TIFF* output, uint16 i){ tsize_t written=0; char buffer[32]; int buflen=0; (void)i; // XXX written += TIFFWriteFile(output, (tdata_t) "/FunctionType 0 \r", 17); written += TIFFWriteFile(output, (tdata_t) "/Domain [0.0 1.0] \r", 19); written += TIFFWriteFile(output, (tdata_t) "/Range [0.0 1.0] \r", 18); buflen=sprintf(buffer, "/Size [%u] \r", (1<tiff_bitspersample)); written += TIFFWriteFile(output, (tdata_t) buffer, buflen); written += TIFFWriteFile(output, (tdata_t) "/BitsPerSample 16 \r", 19); written += t2p_write_pdf_stream_dict(1<<(t2p->tiff_bitspersample+1), 0, output); return(written); } static tsize_t t2p_write_pdf_transfer_stream(T2P* t2p, TIFF* output, uint16 i){ tsize_t written=0; written += t2p_write_pdf_stream( t2p->tiff_transferfunction[i], (1<<(t2p->tiff_bitspersample+1)), output); return(written); } /* This function writes a PDF Image XObject Colorspace array to output. */ static tsize_t t2p_write_pdf_xobject_calcs(T2P* t2p, TIFF* output){ tsize_t written=0; char buffer[128]; int buflen=0; float X_W=0.0; float Y_W=0.0; float Z_W=0.0; float X_R=0.0; float Y_R=0.0; float Z_R=0.0; float X_G=0.0; float Y_G=0.0; float Z_G=0.0; float X_B=0.0; float Y_B=0.0; float Z_B=0.0; float x_w=0.0; float y_w=0.0; float z_w=0.0; float x_r=0.0; float y_r=0.0; float x_g=0.0; float y_g=0.0; float x_b=0.0; float y_b=0.0; float R=1.0; float G=1.0; float B=1.0; written += TIFFWriteFile(output, (tdata_t) "[", 1); if(t2p->pdf_colorspace & T2P_CS_CALGRAY){ written += TIFFWriteFile(output, (tdata_t) "/CalGray ", 9); X_W = t2p->tiff_whitechromaticities[0]; Y_W = t2p->tiff_whitechromaticities[1]; Z_W = 1.0F - (X_W + Y_W); X_W /= Y_W; Z_W /= Y_W; Y_W = 1.0F; } if(t2p->pdf_colorspace & T2P_CS_CALRGB){ written += TIFFWriteFile(output, (tdata_t) "/CalRGB ", 8); x_w = t2p->tiff_whitechromaticities[0]; y_w = t2p->tiff_whitechromaticities[1]; x_r = t2p->tiff_primarychromaticities[0]; y_r = t2p->tiff_primarychromaticities[1]; x_g = t2p->tiff_primarychromaticities[2]; y_g = t2p->tiff_primarychromaticities[3]; x_b = t2p->tiff_primarychromaticities[4]; y_b = t2p->tiff_primarychromaticities[5]; z_w = y_w * ((x_g - x_b)*y_r - (x_r-x_b)*y_g + (x_r-x_g)*y_b); Y_R = (y_r/R) * ((x_g-x_b)*y_w - (x_w-x_b)*y_g + (x_w-x_g)*y_b) / z_w; X_R = Y_R * x_r / y_r; Z_R = Y_R * (((1-x_r)/y_r)-1); Y_G = ((0.0F-(y_g))/G) * ((x_r-x_b)*y_w - (x_w-x_b)*y_r + (x_w-x_r)*y_b) / z_w; X_G = Y_G * x_g / y_g; Z_G = Y_G * (((1-x_g)/y_g)-1); Y_B = (y_b/B) * ((x_r-x_g)*y_w - (x_w-x_g)*y_r + (x_w-x_r)*y_g) / z_w; X_B = Y_B * x_b / y_b; Z_B = Y_B * (((1-x_b)/y_b)-1); X_W = (X_R * R) + (X_G * G) + (X_B * B); Y_W = (Y_R * R) + (Y_G * G) + (Y_B * B); Z_W = (Z_R * R) + (Z_G * G) + (Z_B * B); X_W /= Y_W; Z_W /= Y_W; Y_W = 1.0; } written += TIFFWriteFile(output, (tdata_t) "<< \r", 4); if(t2p->pdf_colorspace & T2P_CS_CALGRAY){ written += TIFFWriteFile(output, (tdata_t) "/WhitePoint ", 12); buflen=sprintf(buffer, "[%.4f %.4f %.4f] \r", X_W, Y_W, Z_W); written += TIFFWriteFile(output, (tdata_t) buffer, buflen); written += TIFFWriteFile(output, (tdata_t) "/Gamma 2.2 \r", 12); } if(t2p->pdf_colorspace & T2P_CS_CALRGB){ written += TIFFWriteFile(output, (tdata_t) "/WhitePoint ", 12); buflen=sprintf(buffer, "[%.4f %.4f %.4f] \r", X_W, Y_W, Z_W); written += TIFFWriteFile(output, (tdata_t) buffer, buflen); written += TIFFWriteFile(output, (tdata_t) "/Matrix ", 8); buflen=sprintf(buffer, "[%.4f %.4f %.4f %.4f %.4f %.4f %.4f %.4f %.4f] \r", X_R, Y_R, Z_R, X_G, Y_G, Z_G, X_B, Y_B, Z_B); written += TIFFWriteFile(output, (tdata_t) buffer, buflen); written += TIFFWriteFile(output, (tdata_t) "/Gamma [2.2 2.2 2.2] \r", 22); } written += TIFFWriteFile(output, (tdata_t) ">>] \r", 5); return(written); } /* This function writes a PDF Image XObject Colorspace array to output. */ static tsize_t t2p_write_pdf_xobject_icccs(T2P* t2p, TIFF* output){ tsize_t written=0; char buffer[16]; int buflen=0; written += TIFFWriteFile(output, (tdata_t) "[/ICCBased ", 11); buflen=sprintf(buffer, "%lu", (unsigned long)t2p->pdf_icccs); written += TIFFWriteFile(output, (tdata_t) buffer, buflen); written += TIFFWriteFile(output, (tdata_t) " 0 R] \r", 7); return(written); } static tsize_t t2p_write_pdf_xobject_icccs_dict(T2P* t2p, TIFF* output){ tsize_t written=0; char buffer[16]; int buflen=0; written += TIFFWriteFile(output, (tdata_t) "/N ", 3); buflen=sprintf(buffer, "%u \r", t2p->tiff_samplesperpixel); written += TIFFWriteFile(output, (tdata_t) buffer, buflen); written += TIFFWriteFile(output, (tdata_t) "/Alternate ", 11); t2p->pdf_colorspace ^= T2P_CS_ICCBASED; written += t2p_write_pdf_xobject_cs(t2p, output); t2p->pdf_colorspace |= T2P_CS_ICCBASED; written += t2p_write_pdf_stream_dict(t2p->tiff_iccprofilelength, 0, output); return(written); } static tsize_t t2p_write_pdf_xobject_icccs_stream(T2P* t2p, TIFF* output){ tsize_t written=0; written += t2p_write_pdf_stream( (tdata_t) t2p->tiff_iccprofile, (tsize_t) t2p->tiff_iccprofilelength, output); return(written); } /* This function writes a palette stream for an indexed color space to output. */ static tsize_t t2p_write_pdf_xobject_palettecs_stream(T2P* t2p, TIFF* output){ tsize_t written=0; written += t2p_write_pdf_stream( (tdata_t) t2p->pdf_palette, (tsize_t) t2p->pdf_palettesize, output); return(written); } /* This function writes a PDF Image XObject Decode array to output. */ static tsize_t t2p_write_pdf_xobject_decode(T2P* t2p, TIFF* output){ tsize_t written=0; int i=0; written += TIFFWriteFile(output, (tdata_t) "/Decode [ ", 10); for (i=0;itiff_samplesperpixel;i++){ written += TIFFWriteFile(output, (tdata_t) "1 0 ", 4); } written += TIFFWriteFile(output, (tdata_t) "]\r", 2); return(written); } /* This function writes a PDF Image XObject stream filter name and parameters to output. */ static tsize_t t2p_write_pdf_xobject_stream_filter(ttile_t tile, T2P* t2p, TIFF* output){ tsize_t written=0; char buffer[16]; int buflen=0; if(t2p->pdf_compression==T2P_COMPRESS_NONE){ return(written); } written += TIFFWriteFile(output, (tdata_t) "/Filter ", 8); switch(t2p->pdf_compression){ #ifdef CCITT_SUPPORT case T2P_COMPRESS_G4: written += TIFFWriteFile(output, (tdata_t) "/CCITTFaxDecode ", 16); written += TIFFWriteFile(output, (tdata_t) "/DecodeParms ", 13); written += TIFFWriteFile(output, (tdata_t) "<< /K -1 ", 9); if(tile==0){ written += TIFFWriteFile(output, (tdata_t) "/Columns ", 9); buflen=sprintf(buffer, "%lu", (unsigned long)t2p->tiff_width); written += TIFFWriteFile(output, (tdata_t) buffer, buflen); written += TIFFWriteFile(output, (tdata_t) " /Rows ", 7); buflen=sprintf(buffer, "%lu", (unsigned long)t2p->tiff_length); written += TIFFWriteFile(output, (tdata_t) buffer, buflen); } else { if(t2p_tile_is_right_edge(t2p->tiff_tiles[t2p->pdf_page], tile-1)==0){ written += TIFFWriteFile(output, (tdata_t) "/Columns ", 9); buflen=sprintf( buffer, "%lu", (unsigned long)t2p->tiff_tiles[t2p->pdf_page].tiles_tilewidth); written += TIFFWriteFile(output, (tdata_t) buffer, buflen); } else { written += TIFFWriteFile(output, (tdata_t) "/Columns ", 9); buflen=sprintf( buffer, "%lu", (unsigned long)t2p->tiff_tiles[t2p->pdf_page].tiles_edgetilewidth); written += TIFFWriteFile(output, (tdata_t) buffer, buflen); } if(t2p_tile_is_bottom_edge(t2p->tiff_tiles[t2p->pdf_page], tile-1)==0){ written += TIFFWriteFile(output, (tdata_t) " /Rows ", 7); buflen=sprintf( buffer, "%lu", (unsigned long)t2p->tiff_tiles[t2p->pdf_page].tiles_tilelength); written += TIFFWriteFile(output, (tdata_t) buffer, buflen); } else { written += TIFFWriteFile(output, (tdata_t) " /Rows ", 7); buflen=sprintf( buffer, "%lu", (unsigned long)t2p->tiff_tiles[t2p->pdf_page].tiles_edgetilelength); written += TIFFWriteFile(output, (tdata_t) buffer, buflen); } } if(t2p->pdf_switchdecode == 0){ written += TIFFWriteFile(output, (tdata_t) " /BlackIs1 true ", 16); } written += TIFFWriteFile(output, (tdata_t) ">>\r", 3); break; #endif #ifdef JPEG_SUPPORT case T2P_COMPRESS_JPEG: written += TIFFWriteFile(output, (tdata_t) "/DCTDecode ", 11); if(t2p->tiff_photometric != PHOTOMETRIC_YCBCR) { written += TIFFWriteFile(output, (tdata_t) "/DecodeParms ", 13); written += TIFFWriteFile(output, (tdata_t) "<< /ColorTransform 0 >>\r", 24); } break; #endif #ifdef ZIP_SUPPORT case T2P_COMPRESS_ZIP: written += TIFFWriteFile(output, (tdata_t) "/FlateDecode ", 13); if(t2p->pdf_compressionquality%100){ written += TIFFWriteFile(output, (tdata_t) "/DecodeParms ", 13); written += TIFFWriteFile(output, (tdata_t) "<< /Predictor ", 14); _TIFFmemset(buffer, 0x00, 16); buflen=sprintf(buffer, "%u", t2p->pdf_compressionquality%100); written += TIFFWriteFile(output, (tdata_t) buffer, buflen); written += TIFFWriteFile(output, (tdata_t) " /Columns ", 10); _TIFFmemset(buffer, 0x00, 16); buflen = sprintf(buffer, "%lu", (unsigned long)t2p->tiff_width); written += TIFFWriteFile(output, (tdata_t) buffer, buflen); written += TIFFWriteFile(output, (tdata_t) " /Colors ", 9); _TIFFmemset(buffer, 0x00, 16); buflen=sprintf(buffer, "%u", t2p->tiff_samplesperpixel); written += TIFFWriteFile(output, (tdata_t) buffer, buflen); written += TIFFWriteFile(output, (tdata_t) " /BitsPerComponent ", 19); _TIFFmemset(buffer, 0x00, 16); buflen=sprintf(buffer, "%u", t2p->tiff_bitspersample); written += TIFFWriteFile(output, (tdata_t) buffer, buflen); written += TIFFWriteFile(output, (tdata_t) ">>\r", 3); } break; #endif default: break; } return(written); } /* This function writes a PDF xref table to output. */ static tsize_t t2p_write_pdf_xreftable(T2P* t2p, TIFF* output){ tsize_t written=0; char buffer[21]; int buflen=0; uint32 i=0; written += TIFFWriteFile(output, (tdata_t) "xref\r0 ", 7); buflen=sprintf(buffer, "%lu", (unsigned long)(t2p->pdf_xrefcount + 1)); written += TIFFWriteFile(output, (tdata_t) buffer, buflen); written += TIFFWriteFile(output, (tdata_t) " \r0000000000 65535 f\r\n", 22); for (i=0;ipdf_xrefcount;i++){ sprintf(buffer, "%.10lu 00000 n\r\n", (unsigned long)t2p->pdf_xrefoffsets[i]); written += TIFFWriteFile(output, (tdata_t) buffer, 20); } return(written); } /* * This function writes a PDF trailer to output. */ static tsize_t t2p_write_pdf_trailer(T2P* t2p, TIFF* output) { tsize_t written = 0; char buffer[32]; int buflen = 0; int ifileidbuf[4]; char *fileidbuf = (char*)ifileidbuf; int i = 0; ifileidbuf[0] = rand(); ifileidbuf[1] = rand(); ifileidbuf[2] = rand(); ifileidbuf[3] = rand(); t2p->pdf_fileid = (char*)_TIFFmalloc(33); if(t2p->pdf_fileid == NULL) { TIFFError( TIFF2PDF_MODULE, "Can't allocate %u bytes of memory for t2p_write_pdf_trailer", 33 ); t2p->t2p_error = T2P_ERR_ERROR; return(0); } _TIFFmemset(t2p->pdf_fileid, 0x00, 33); for (i=0; i<16; i++) sprintf(&(t2p->pdf_fileid[2*i]), "%.2hhX", fileidbuf[i]); written += TIFFWriteFile(output, (tdata_t) "trailer\r<<\r/Size ", 17); buflen = sprintf(buffer, "%lu", (unsigned long)(t2p->pdf_xrefcount+1)); written += TIFFWriteFile(output, (tdata_t) buffer, buflen); _TIFFmemset(buffer, 0x00, 32); written += TIFFWriteFile(output, (tdata_t) "\r/Root ", 7); buflen=sprintf(buffer, "%lu", (unsigned long)t2p->pdf_catalog); written += TIFFWriteFile(output, (tdata_t) buffer, buflen); _TIFFmemset(buffer, 0x00, 32); written += TIFFWriteFile(output, (tdata_t) " 0 R \r/Info ", 12); buflen=sprintf(buffer, "%lu", (unsigned long)t2p->pdf_info); written += TIFFWriteFile(output, (tdata_t) buffer, buflen); _TIFFmemset(buffer, 0x00, 32); written += TIFFWriteFile(output, (tdata_t) " 0 R \r/ID[<", 11); written += TIFFWriteFile(output, (tdata_t) t2p->pdf_fileid, 32); written += TIFFWriteFile(output, (tdata_t) "><", 2); written += TIFFWriteFile(output, (tdata_t) t2p->pdf_fileid, 32); written += TIFFWriteFile(output, (tdata_t) ">]\r>>\rstartxref\r", 16); buflen=sprintf(buffer, "%lu", (unsigned long)t2p->pdf_startxref); written += TIFFWriteFile(output, (tdata_t) buffer, buflen); _TIFFmemset(buffer, 0x00, 32); written += TIFFWriteFile(output, (tdata_t) "\r%%EOF\r", 7); return(written); } /* This function writes a PDF to a file given a pointer to a TIFF. The idea with using a TIFF* as output for a PDF file is that the file can be created with TIFFClientOpen for memory-mapped use within the TIFF library, and TIFFWriteEncodedStrip can be used to write compressed data to the output. The output is not actually a TIFF file, it is a PDF file. This function uses only TIFFWriteFile and TIFFWriteEncodedStrip to write to the output TIFF file. When libtiff would otherwise be writing data to the output file, the write procedure of the TIFF structure is replaced with an empty implementation. The first argument to the function is an initialized and validated T2P context struct pointer. The second argument to the function is the TIFF* that is the input that has been opened for reading and no other functions have been called upon it. The third argument to the function is the TIFF* that is the output that has been opened for writing. It has to be opened so that it hasn't written any data to the output. If the output is seekable then it's OK to seek to the beginning of the file. The function only writes to the output PDF and does not seek. See the example usage in the main() function. TIFF* output = TIFFOpen("output.pdf", "w"); assert(output != NULL); if(output->tif_seekproc != NULL){ TIFFSeekFile(output, (toff_t) 0, SEEK_SET); } This function returns the file size of the output PDF file. On error it returns zero and the t2p->t2p_error variable is set to T2P_ERR_ERROR. After this function completes, call t2p_free on t2p, TIFFClose on input, and TIFFClose on output. */ static tsize_t t2p_write_pdf(T2P* t2p, TIFF* input, TIFF* output){ tsize_t written=0; ttile_t i2=0; tsize_t streamlen=0; uint16 i=0; t2p_read_tiff_init(t2p, input); if(t2p->t2p_error!=T2P_ERR_OK){return(0);} t2p->pdf_xrefoffsets= (uint32*) _TIFFmalloc(t2p->pdf_xrefcount * sizeof(uint32) ); if(t2p->pdf_xrefoffsets==NULL){ TIFFError( TIFF2PDF_MODULE, "Can't allocate %lu bytes of memory for t2p_write_pdf", t2p->pdf_xrefcount * sizeof(uint32) ); return(written); } t2p->pdf_xrefcount=0; t2p->pdf_catalog=1; t2p->pdf_info=2; t2p->pdf_pages=3; written += t2p_write_pdf_header(t2p, output); t2p->pdf_xrefoffsets[t2p->pdf_xrefcount++]=written; t2p->pdf_catalog=t2p->pdf_xrefcount; written += t2p_write_pdf_obj_start(t2p->pdf_xrefcount, output); written += t2p_write_pdf_catalog(t2p, output); written += t2p_write_pdf_obj_end(output); t2p->pdf_xrefoffsets[t2p->pdf_xrefcount++]=written; t2p->pdf_info=t2p->pdf_xrefcount; written += t2p_write_pdf_obj_start(t2p->pdf_xrefcount, output); written += t2p_write_pdf_info(t2p, input, output); written += t2p_write_pdf_obj_end(output); t2p->pdf_xrefoffsets[t2p->pdf_xrefcount++]=written; t2p->pdf_pages=t2p->pdf_xrefcount; written += t2p_write_pdf_obj_start(t2p->pdf_xrefcount, output); written += t2p_write_pdf_pages(t2p, output); written += t2p_write_pdf_obj_end(output); for(t2p->pdf_page=0;t2p->pdf_pagetiff_pagecount;t2p->pdf_page++){ t2p_read_tiff_data(t2p, input); if(t2p->t2p_error!=T2P_ERR_OK){return(0);} t2p->pdf_xrefoffsets[t2p->pdf_xrefcount++]=written; written += t2p_write_pdf_obj_start(t2p->pdf_xrefcount, output); written += t2p_write_pdf_page(t2p->pdf_xrefcount, t2p, output); written += t2p_write_pdf_obj_end(output); t2p->pdf_xrefoffsets[t2p->pdf_xrefcount++]=written; written += t2p_write_pdf_obj_start(t2p->pdf_xrefcount, output); written += t2p_write_pdf_stream_dict_start(output); written += t2p_write_pdf_stream_dict(0, t2p->pdf_xrefcount+1, output); written += t2p_write_pdf_stream_dict_end(output); written += t2p_write_pdf_stream_start(output); streamlen=written; written += t2p_write_pdf_page_content_stream(t2p, output); streamlen=written-streamlen; written += t2p_write_pdf_stream_end(output); written += t2p_write_pdf_obj_end(output); t2p->pdf_xrefoffsets[t2p->pdf_xrefcount++]=written; written += t2p_write_pdf_obj_start(t2p->pdf_xrefcount, output); written += t2p_write_pdf_stream_length(streamlen, output); written += t2p_write_pdf_obj_end(output); if(t2p->tiff_transferfunctioncount != 0){ t2p->pdf_xrefoffsets[t2p->pdf_xrefcount++]=written; written += t2p_write_pdf_obj_start(t2p->pdf_xrefcount, output); written += t2p_write_pdf_transfer(t2p, output); written += t2p_write_pdf_obj_end(output); for(i=0; i < t2p->tiff_transferfunctioncount; i++){ t2p->pdf_xrefoffsets[t2p->pdf_xrefcount++]=written; written += t2p_write_pdf_obj_start(t2p->pdf_xrefcount, output); written += t2p_write_pdf_stream_dict_start(output); written += t2p_write_pdf_transfer_dict(t2p, output, i); written += t2p_write_pdf_stream_dict_end(output); written += t2p_write_pdf_stream_start(output); streamlen=written; written += t2p_write_pdf_transfer_stream(t2p, output, i); streamlen=written-streamlen; written += t2p_write_pdf_stream_end(output); written += t2p_write_pdf_obj_end(output); } } if( (t2p->pdf_colorspace & T2P_CS_PALETTE) != 0){ t2p->pdf_xrefoffsets[t2p->pdf_xrefcount++]=written; t2p->pdf_palettecs=t2p->pdf_xrefcount; written += t2p_write_pdf_obj_start(t2p->pdf_xrefcount, output); written += t2p_write_pdf_stream_dict_start(output); written += t2p_write_pdf_stream_dict(t2p->pdf_palettesize, 0, output); written += t2p_write_pdf_stream_dict_end(output); written += t2p_write_pdf_stream_start(output); streamlen=written; written += t2p_write_pdf_xobject_palettecs_stream(t2p, output); streamlen=written-streamlen; written += t2p_write_pdf_stream_end(output); written += t2p_write_pdf_obj_end(output); } if( (t2p->pdf_colorspace & T2P_CS_ICCBASED) != 0){ t2p->pdf_xrefoffsets[t2p->pdf_xrefcount++]=written; t2p->pdf_icccs=t2p->pdf_xrefcount; written += t2p_write_pdf_obj_start(t2p->pdf_xrefcount, output); written += t2p_write_pdf_stream_dict_start(output); written += t2p_write_pdf_xobject_icccs_dict(t2p, output); written += t2p_write_pdf_stream_dict_end(output); written += t2p_write_pdf_stream_start(output); streamlen=written; written += t2p_write_pdf_xobject_icccs_stream(t2p, output); streamlen=written-streamlen; written += t2p_write_pdf_stream_end(output); written += t2p_write_pdf_obj_end(output); } if(t2p->tiff_tiles[t2p->pdf_page].tiles_tilecount !=0){ for(i2=0;i2tiff_tiles[t2p->pdf_page].tiles_tilecount;i2++){ t2p->pdf_xrefoffsets[t2p->pdf_xrefcount++]=written; written += t2p_write_pdf_obj_start(t2p->pdf_xrefcount, output); written += t2p_write_pdf_stream_dict_start(output); written += t2p_write_pdf_xobject_stream_dict( i2+1, t2p, output); written += t2p_write_pdf_stream_dict_end(output); written += t2p_write_pdf_stream_start(output); streamlen=written; t2p_read_tiff_size_tile(t2p, input, i2); written += t2p_readwrite_pdf_image_tile(t2p, input, output, i2); t2p_write_advance_directory(t2p, output); if(t2p->t2p_error!=T2P_ERR_OK){return(0);} streamlen=written-streamlen; written += t2p_write_pdf_stream_end(output); written += t2p_write_pdf_obj_end(output); t2p->pdf_xrefoffsets[t2p->pdf_xrefcount++]=written; written += t2p_write_pdf_obj_start(t2p->pdf_xrefcount, output); written += t2p_write_pdf_stream_length(streamlen, output); written += t2p_write_pdf_obj_end(output); } } else { t2p->pdf_xrefoffsets[t2p->pdf_xrefcount++]=written; written += t2p_write_pdf_obj_start(t2p->pdf_xrefcount, output); written += t2p_write_pdf_stream_dict_start(output); written += t2p_write_pdf_xobject_stream_dict( 0, t2p, output); written += t2p_write_pdf_stream_dict_end(output); written += t2p_write_pdf_stream_start(output); streamlen=written; t2p_read_tiff_size(t2p, input); written += t2p_readwrite_pdf_image(t2p, input, output); t2p_write_advance_directory(t2p, output); if(t2p->t2p_error!=T2P_ERR_OK){return(0);} streamlen=written-streamlen; written += t2p_write_pdf_stream_end(output); written += t2p_write_pdf_obj_end(output); t2p->pdf_xrefoffsets[t2p->pdf_xrefcount++]=written; written += t2p_write_pdf_obj_start(t2p->pdf_xrefcount, output); written += t2p_write_pdf_stream_length(streamlen, output); written += t2p_write_pdf_obj_end(output); } } t2p->pdf_startxref=written; written += t2p_write_pdf_xreftable(t2p, output); written += t2p_write_pdf_trailer(t2p, output); t2p_disable(output); return(written); } #endif /* vim: set ts=8 sts=8 sw=8 noet: */ djview4/src/tiff2pdf.h000066400000000000000000000025351174072760700151160ustar00rootroot00000000000000//C- -*- C -*- //C- ------------------------------------------------------------------- //C- DjView4 //C- Copyright (c) 2006- Leon Bottou //C- //C- This software is subject to, and may be distributed under, the //C- GNU General Public License, either version 2 of the license, //C- or (at your option) any later version. The license should have //C- accompanied the software or you may obtain a copy of the license //C- from the Free Software Foundation at http://www.fsf.org . //C- //C- This program is distributed in the hope that it will be useful, //C- but WITHOUT ANY WARRANTY; without even the implied warranty of //C- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //C- GNU General Public License for more details. //C- ------------------------------------------------------------------ #ifndef TIFF2PDF_H # define TIFF2PDF_H # if AUTOCONF # include "config.h" # endif # if HAVE_TIFF # include # include # include # include # include # include # ifdef TIFFLIB_VERSION # if TIFFLIB_VERSION > 20041104 # define HAVE_TIFF2PDF 1 # endif # endif # endif # if HAVE_TIFF2PDF # ifdef __cplusplus extern "C" { # endif int tiff2pdf(TIFF *input, FILE *output, int argc, const char **argv); # ifdef __cplusplus } # endif # endif /* HAVE_TIFF2PDF */ #endif /* TIFF2PDF_H */